# Tikz line drawing error

I want to draw this picture in LaTeX. I am using tikz package for drawing. I am using overleaf to create this document.

I wrote this code:

\begin{figure}
\centering
\begin{tikzpicture}
\draw[->][thick](0,0) to (6,0)
\draw[->](4,3) to (6,2)
\end{tikzpicture}
\caption{Timeline}
\label{fig:my_label1}
\end{figure}


But it take huge time to compile and after compile throw a error message. Timed out. Sorry, your compile took too long to run and timed out. This may be due to a large number of high-res images, or complicated diagrams.

Now if I draw just one line in between two lines this code run well. But when both the line drawing command activate it give a error.

Can any one tell me what is the problem?

• You need ; after each line. I.e., \draw .. ;. Plus the first one should be \draw[thick,->] .. ;. – Manuel Dec 11 '18 at 23:40
• @Manuel \draw[->][thick](0,0) to (6,0); and \draw[->,thick](0,0) to (6,0); do the same, but of course you are right about the ;s. – marmot Dec 12 '18 at 4:10

As @Manuel stated in a comment, every tikz drawing command must end with a semi-colon ; or the compiler searches forever trying to find a meaningful interpretation for your command and hence the error message you saw. That said, you can draw these lines in one command using edge which allows adding multiple arrow tips. Also, you can add thick as a global option, if all your lines should be thick, instead of repeating it.

\documentclass[12pt,a4paper]{article}
\usepackage{tikz}
\begin{document}

\begin{figure}
\centering
\begin{tikzpicture}[thick]
\path[->] (0,0) edge (6,0) (4,3) edge (6,2);
\end{tikzpicture}
\caption{Timeline}
\label{fig:my_label1}
\end{figure}

\end{document}