
Ich zeichne ein Bild mit TikZ und zwei \draw
Befehlen.
Der erste funktioniert, aber beim zweiten behauptet LaTeX
! Undefined control sequence. l.44 \draw (0,2) -- (-.5,2);
Was kann ich tun, um das zu beheben?
Dank im Vorwort
BEARBEITEN: MWE
\begin{figure}[htbp]
\centering
\begin{tikz}
% First the house
\draw [thick,color=gray] (0,0) -- (0,2) -- (1,3) -- (2,2) -- (2,0) -- cycle (0,2) -- (2,2);
% This command doesnt work...
\draw (0,1) -- (-.5,1);
\end{tikz}
\end{figure}
Antwort1
Versuchen Sie dies. Es sollte funktionieren.
\begin{tikzpicture}
% First the house
\draw [thick,color=gray] (0,0) -- (0,2) -- (1,3) -- (2,2) -- (2,0) -- cycle (0,2) -- (2,2);
% This command DOES work!
\draw (0,1) -- (-.5,1);
\end{tikzpicture}