# Tag Info

6

Another solution exploiting the text rendering modes of the PDF specification to render the text as a clipping path: \documentclass[border=5]{standalone} \usepackage{tikz} \newcommand\shadetext[2][]{% \setbox0=\hbox{{\special{pdf:literal 7 Tr }#2}}% \tikz[baseline=0]\path [#1] \pgfextra{\rlap{\copy0}} (0,-\dp0) rectangle (\wd0,\ht0);% } \begin{document} ...

23

7

Here is a solution with pstricks, and more precisely with pst-grad and pst-text. It is compilable with pdf LaTeX, and the box size can be changed with \psframebox[framesep=…]{…}: \documentclass[pdf, x11names]{article} \usepackage{pst-grad,pst-text} \psset{framesep=2pt} \begin{document} Some text \begin{tabular}{lll} \psframebox[linecolor = Coral1!20]{% ...

4

It is possible to create a more reasonable box by printing the character again and anchoring the shading at this node: \fbox{ \begin{tikzpicture}[scale=10] \node [text=white,inner sep=0pt,outer sep=0pt] (textnode) {$4$}; \shade[path fading=mixed 4,fit fading=false,top color=orange,bottom color=purple] (textnode.south west) rectangle ...

8

Yes, it is possible. In this answer I will try to cover the vertical shading: the concepts can be applied in the same way to the horizontal shading. Radial shading, instead is a bit different and the idea has been already implemented in TikZ: radial shading of a ring to some extent. The code: \documentclass[tikz,border=10pt]{standalone} \makeatletter ...

Top 50 recent answers are included