# How can I put “=” in a TikZ node label specified as an option

When I try to put an = symbol into a TikZ node label specified as an option (using label=), I get an error:

Extra }, or forgotten $.  Is there a way to specify = in such cases that I'm missing? \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node(x){$X$}; \path(x)[late options={label=right:=$A$}]; % Works but doesn't display anything \path(x)[late options={label=above:$\neq B$}]; % Works \path(x)[late options={label=below:$C$}]; % Works \path(x)[late options={label=left:$=D$}]; % Fails! \end{tikzpicture} \end{document}  - Related: Equal (=) sign within TikZ label – Qrrbrbirlbel Oct 17 '13 at 12:16 ## 1 Answer Key-value systems look for =, and can't 'tell' that the = here is part of the 'value'. You therefore need braces: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node(x){$X$}; \path(x)[late options={label={right:=$A$}}]; \path(x)[late options={label=above:$\neq B$}]; \path(x)[late options={label=below:$C$}]; \path(x)[late options={label={left:$=D\$}}];
\end{tikzpicture}
\end{document}


(You get an error as the = inside math mode leaves to grouping issues, which don't happen in the first case.)

-
Thanks! I thought I tried that too, but must have put the braces around the wrong thing. – raxacoricofallapatorius Jun 27 '12 at 19:32
An answer is in the pgfmanual : /tikz/late options=⟨options⟩ with an example : \path (a) [late options={label=above:world}]; – Alain Matthes Jun 28 '12 at 7:51