TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

  % 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}%
   %pstricks can do this with \pscharpath from pstricks


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?

share|improve this question

closed as not a real question by Joseph Wright Sep 4 '11 at 13:35

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Welcome to tex.sx! A tip: If you indent lines by 4 spaces, then they are marked as a code sample. You can also highlight the code and click the "code" button (with "101010" on it). – Edd Apr 4 '11 at 13:36
You might want to take a look at the contour package, 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 4 '11 at 13:49
I think you asking the wrong way: Either ask "How to do draw character outlines in TikZ" or "How to change the color in \pdfliteral". The \pdfliteral adds plain PDF code into the PDF. It has nothing to do with TikZ. – Martin Scharrer Apr 4 '11 at 13:52
A very fine document is pdf-trans.tex . You can find it here : 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 : \pdfliteral has nothing to do with TikZ. But it's possible to mix TikZ and \pdfliteral. More precisely, TikZ uses a lot of \pdfliteral inside the drivers. – Alain Matthes Apr 4 '11 at 15:01
We've not had any clarification on this question, and it's clear that there is confusion about the relationship between Tikz and PDF output. This is therefore 'not a real question'. – Joseph Wright Sep 4 '11 at 13:35