I am using .pic
to use a same picture several times. I noticed a difference of behavior between the same code inside a .pic
or outside. In the example below, one can notice that within a .pic
, the node on the edge is not at the place it should be.
\documentclass{standalone}
\usepackage{tikz}
\tikzset{thepic/.pic = {\draw (0, 0) edge node {0} (1, 0);}}
\begin{document}
Without \texttt{.pic}: \tikz{\draw (0, 0) edge node {0} (1, 0);}
With \texttt{.pic}: \tikz{\pic{thepic};}
\end{document}
The result
Is this a (known) bug?
article
class also defining the pic after\begin{document}
, just to be sure: the result is the same. – egreg Nov 10 '16 at 13:37