2

I want to put both nodes and pics along a path. This works perfectly well:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikzset{p/.pic={\node [circle, draw] at (0,0) {};}}
$\tikz{
  \draw (0,0) node {x} pic {p}
    to (1,1) pic {p};
}$
\end{document}

I get a path from (0,0) to (1,1), with a node labelled 'x' and my pic p at (0,0), and my pic p at (1,1).

But if I change my tikz picture to the following, I get errors:

$\tikz{
  \draw (0,0) node {x} pic {p}
    to (1,1) node {y};
}$

In fact, it seems that I can place some nodes, and then I can place some pics, but then I cannot place any more nodes along the path.

How can I achieve what I want? Is this a bug with PGF 3.0?

Jamie Vicary
  • 11,098

0 Answers0