I have the following piece of code
\documentclass{article}
\usepackage{tikz}
\def\pos{5,5}
\begin{document}
\begin{tikzpicture}
\node (b) at (0,0) {test};
\node (a) \ifx\pos\pgfutil@empty\else at(\pos)\fi {something};
\end{tikzpicture}
\end{document}
I want to test if the macro \pos holds a position or not and in case it does I want to use it to print the node. However, when I compile the example above I get some errors in the way of:
Package tikz Error: A node must have a (possibly empty) label text.
Use of
\@nextdoesn't match its definition.
What am I doing wrong? Or in which way can I achieve my goal of testing the macro for display?
http://tex.stackexchange.com/questions/8351/what-do-makeatletter-and-makeatother-do
– David Carlisle Feb 09 '12 at 09:29\pgfutil@emptyis examined, but of course the@problem is relevant anyway. – egreg Feb 09 '12 at 09:33