pdf/Tikz Sequência de controle indefinida

pdf/Tikz Sequência de controle indefinida

Estou desenhando uma imagem usando TikZ com dois \drawcomandos.
O primeiro funciona, mas no segundo o LaTeX afirma

! Undefined control sequence. l.44 \draw (0,2) -- (-.5,2);

O que posso fazer para consertar isso...
Obrigado no prefácio

EDITAR: 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}

Responder1

Experimente isso. Deveria funcionar.

\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}

informação relacionada