Menu

#336 `node contents` key for nodes on a path

v1.0 (example)
open
None
5
2019-01-21
2014-10-18
No

In the example below, I need to add {} just after "but this is not", or I get an error. I would expect the correct this extra pair of braces not to be needed.

\documentclass{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}
\node[at={(0,0)}, node contents=this is fine];
\draw (0,0) to node [node contents=but this is not]{} (0,-1);
\end{tikzpicture}

\end{document}

Discussion

  • Henri Menke

    Henri Menke - 2018-12-28

    The problem is that if node is encountered as part of a path, TikZ first scans the rest of the path before processing the node options.

     
  • Henri Menke

    Henri Menke - 2019-01-21
    • assigned_to: Henri Menke
     
MongoDB Logo MongoDB