If I try to define a tree, with a child, inside a pic and later use this pic with a prefix, I get an error.
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{figure}
\begin{tikzpicture}
\tikzset {
tree/.pic = {
\coordinate (-root) child;
}
}
\pic[draw] (t) {tree};
\end{tikzpicture}
\end{figure}
\end{document}
ERROR: Package pgf Error: No shape named tt-root is known.
It works fine if I delete child from the pic or don't try to prefix the \pic command.
What am I doing wrong?
to, but the issue seems to be the same. Thank you for the reference. Should I delete the question? – user170268 Sep 12 '18 at 19:37