How could I achieve with LaTeX a trendy text reflection effect as the following one?

Asked
Active
Viewed 1,698 times
15
Denis Bitouzé
- 9,652
- 4
- 27
- 85
1 Answers
22
Here is a solution:
\documentclass[tikz,margin=2mm]{standalone}
\usetikzlibrary{fadings}
\begin{document}
\begin{tikzpicture}
\def\mytext{Reflec\textcolor{red}{t}ion}
\tikzset{mynode/.style={anchor=south,inner sep=0,font=\ttfamily\Huge}}
\node[mynode]{\mytext};
\node[scope fading=south,opacity=0.4,yscale=-1,mynode]{\mytext};
\end{tikzpicture}
\end{document}

Note: To remove the gap between the node and its reflection, you may use anchor=base or line width=0.
Note 2: Unlike Inkscape, TikZ does not know the true bounding box of glyphs:

Paul Gaborit
- 70,770
- 10
- 176
- 283
TikZmanual, I just didn't look at the cover page :) – Denis Bitouzé Oct 30 '14 at 09:41