Semi-transparent text in beamer (pdflatex)
Edit: improved the solution by turning it into a command with an optional argument.
Okay, discovered how to do it:
\newcommand{\semitransp}[2][35]{\color{fg!#1}#2}
...
$
\begin{matrix}
& \{-2,3,5,0,8\} & \\
\{-2,3,5,0\} & & \{-2,3,5,8\} \\
& \semitransp{\{-2,3,5\}} &
\end{matrix}
$
The optional parameter controls the transparency. So \semitransp[20]{text}
is lighter, and \semitransp[60]{text}
is heavier. The default value 35 looks good on my computer screen. It is yet to be seen how it looks projected on a wall.
Ari's answer may work for him (and in 2010), but the given command will make all following text transparent, not only the given text.
An improved solution for making only the given text transparent:
\newcommand{\semitransp}[2][35]{\textcolor{fg!#1}{#2}}
% Swap \color with \textcolor and add another curly brackets pair.
...
$
\begin{matrix}
& \{-2,3,5,0,8\} & \\
\{-2,3,5,0\} & & \{-2,3,5,8\} \\
& \semitransp{\{-2,3,5\}} &
\end{matrix}
$
To get real semi-transparency, one can use \pgfsetfillopacity
. The advantage compared to faking the opacity by mixing the foreground colour with the background is, that this will also work if the there is a background image or some other coloured element.
\documentclass{beamer}
\begin{document}
\begin{frame}
$
\begin{matrix}
& \{-2,3,5,0,8\} & \\
\{-2,3,5,0\} & & \{-2,3,5,8\} \\
& {\pgfsetfillopacity{0.2}\{-2,3,5\}} &
\end{matrix}
$
\end{frame}
\setbeamertemplate{background canvas}{\includegraphics[width=\paperwidth]{example-grid-100x100bp}}
\begin{frame}
$
\begin{matrix}
& \{-2,3,5,0,8\} & \\
\{-2,3,5,0\} & & \{-2,3,5,8\} \\
& {\pgfsetfillopacity{0.2}\{-2,3,5\}} &
\end{matrix}
$
\end{frame}
\end{document}