pdf/Tikz Secuencia de control indefinida

pdf/Tikz Secuencia de control indefinida

Estoy dibujando una imagen usando TikZ con dos \drawcomandos.
El primero funciona pero en el segundo afirma LaTeX.

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

¿Qué puedo hacer para solucionarlo...?
Gracias en el prefacio

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}

Respuesta1

Prueba esto. Deberia de 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}

información relacionada