I am learning tikz and how to draw stuff in it. One of the examples I have is to draw the periodic table (since I need to be able to draw a nice one and modify it to my needs). The piece of code that is giving me problems is:
\ifpdf
% Couldn't find a nicer way of doing an outline font with TikZ
% other than using pdfliteral 1 Tr
\pdfliteral direct {0.5 w 1 Tr}{#1}%
\pdfliteral direct {1 w 0 Tr}%
\else
%pstricks can do this with \pscharpath from pstricks
\pscharpath[shadow=false,
fillstyle=solid,
fillcolor=white,
linestyle=solid,
linecolor=black,
linewidth=.2pt]{#1}
\fi
This code compiles well and produces text that has a black outline and is filled in white (when combined with all the other commands). What I want is to change the color of the fill. I cannot find information on \pdfliteral and the code given makes no sense to me. The pstricks part is easy. Can someone please explain this very strange way of writing commands and what each part of the command means?
contourpackage, which is also topic of the following question: How can I put a coloured outline around fraction lines. The package works fine with TikZ nodes. – Jake Apr 04 '11 at 13:49\pdfliteraladds plain PDF code into the PDF. It has nothing to do with TikZ. – Martin Scharrer Apr 04 '11 at 13:52pdf-trans.tex. You can find it here : http://tug.ctan.org/tex-archive/macros/generic/pdf-trans. It's a set of macros for various transformations of TeX boxes. And as Martin wrote :\pdfliteralhas nothing to do with TikZ. But it's possible to mix TikZ and\pdfliteral. More precisely, TikZ uses a lot of\pdfliteralinside the drivers. – Alain Matthes Apr 04 '11 at 15:01