42

I am trying to make a picture for the cover of my thesis using LaTeX. I have a background picture and I would like to have transparent (math) text on top of it, how do I achieve this? I have tried to install the transparent package, but was not successful.

Werner
  • 603,163
marie
  • 463
  • 10
    I am amazed you have the latitude to do this in a thesis! When I wrote mine we had a very tough spec on typesetting. – yannisl Jan 08 '12 at 22:13

4 Answers4

59

Here is a non-TikZ solution. We specify the transparency using \transparent{<value>}, where the value is from 0 to 1 (0 will make the text invisible and 1 will make the text stay the same as before using the transparent package). Adjust the values to suit.

\documentclass[12pt]{article}
\usepackage{graphicx}
 \usepackage{color}
 \usepackage{transparent}
 \begin{document}
\includegraphics[width=0.5\textwidth]{./graphics/amato}\par
\vspace*{-3cm}
\hspace*{-1cm} \hbox{%
 \bfseries\Huge
 \color{red}%
 \transparent{0.4}%
 MY THESIS
 }
\end{document}

enter image description here

user1271772
  • 594
  • 6
  • 26
yannisl
  • 117,160
  • 3
    +1 for the only non-TikZ answer :-) (Didn't know about the transparent package before.) – Daniel Jan 09 '12 at 08:52
  • 6
    it works only with pdftex, not with xelatex, if i am right – deeenes Mar 31 '12 at 23:18
  • 2
    having \usepackage{transparent} in my document seems to break the use of \node[opacity=X,...] for all tikz nodes if I try to use the \transparent inside the text of a node. – peter karasev Apr 01 '13 at 21:40
33

You could use a tikz node and include the opacity option:

enter image description here

\documentclass{article}
\usepackage{graphicx}

\usepackage{tikz}

\begin{document} 
\begin{tikzpicture}
\node (0,0) {\includegraphics[width=5.0cm]{images/eiffel_tower}};
\node [opacity=0.2] (0,0) {\scalebox{5.0}{\textcolor{green}{$\displaystyle\sum_{n=0}^\infty \frac{1}{x^n}$}}};
\end{tikzpicture}
\end{document}
Peter Grill
  • 223,288
9

You may do this with TikZ. In the following solution I put an overlay picture in the title. When the titlepage is printed, it adds the overlay picture. You have to compile this at least twice.

Please note that this solution does put the transparent text on the titlepage, as requested, and should work for any document class. You can control the position of the transparent text by providing a proper coordinate in the \draw command. In the example it's current page.center but it can be anywhere on the page.

\documentclass{book}
\usepackage{tikz}

\makeatletter
\title{How I Got My MSc\overlay@picture}
\author{Me}

\newcommand\overlay@picture{%
\begin{tikzpicture}[overlay,remember picture]
\draw[fill opacity=0.5]
     (current page.center)
     node[scale=10] {$A = B$};
\end{tikzpicture}
}
\makeatother

\begin{document}
\frontmatter
\maketitle
\mainmatter
\ldots
\end{document}
5

When using OpTeX, we don't need Tikz:

\hbox{\rlap{\picw=5cm \inspic{eiffeltower.jpg}}%
   \raise3cm\hbox{\transparency150 \Green
       \typosize[50/]$\displaystyle\sum_{n=0}^\infty {1\over x^n}$}}
\bye

Eiffeltower

wipet
  • 74,238