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'm trying to compile a picture with the following formula in the label

\node[label=left:$f_{23}(r(x_2,\tau)) $] (F012) at (0,2) {};

However, every time I put a comma inside the formula, TeX writes me an error message:

Missing \endcsname inserted.
<to be read again>
l.207 \node[label=left:$f_{23}(r(x_2,\tau)) $]

I understand that this comma violates some internal rule of tikz, but how can I overcome this problem?

share|improve this question
Have you tried enclosing it with braces? \node[label=left:{$f_{23}(r(x_2,\tau)) $}] – clemens Jul 29 '12 at 9:14
up vote 16 down vote accepted

Almost everywhere in tikz where commas are part of a value, you must enclose that value in braces. The following should work:

\node[label=left:{$f_{23}(r(x_2,\tau)) $}] (F012) at (0,2) {};

You can find it in the section »Setting Keys« of chapter V (Utilities) in the pgfmanual (emphasis added):

\pgfkeys{ key list }
The key list should be a list of key–value pairs, separated by commas. A key–value pair can have the following two forms: key = value or just key . Any spaces around the key or around the value are removed. It is permissible to surround both the key or the value in curly braces, which are also removed. Especially putting the value in curly braces needs to be done quite often, namely whenever the value contains an equal-sign or a comma.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.