LaTeX error "No shape named `stop' is known": cause and fix
A TikZ path uses a node name in parentheses, such as (stop), and no node with that name exists at this point. TikZ calls nodes "shapes" in this message.
Why it happens
- The node name has a typo or another name than the one you defined, for example
(stop)when the node is called(end). Names are case-sensitive. - The node is used before it is defined. TikZ works through the picture from top to bottom, so the
\nodeline has to come before the\drawline that uses it. - The node has no name. In
\node at (0,0) {A};theAis the text of the node, not its name.
How to fix it
- Give the node a name in parentheses right after
\node:\node (a) at (0,0) {A};. Then(a)works in later paths. - Compare the name in the message with the names in your
\nodelines. - Move the
\nodelines above the paths that connect them.
A document that produces the message
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node (start) at (0,0) {Start};
\node (end) at (3,0) {End};
\draw[->] (start) -- (stop);
\end{tikzpicture}
\end{document}The corrected document
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node (start) at (0,0) {Start};
\node (end) at (3,0) {End};
\draw[->] (start) -- (end);
\end{tikzpicture}
\end{document}Both documents were compiled with pdfLaTeX from TeX Live 2023. The first produces the message, the second compiles without an error.
Finding the line in the editor
The editor lists every error and warning of a compile run with file and line. Select an entry and the cursor jumps to that line. See Error list with jump to the line.