Skip to content

Drawing with TikZ

Drawing inside LaTeX

  • You can draw diagrams with code using the TikZ package — no image files needed.
  • Load it once, then draw inside a tikzpicture:
\usepackage{tikz}
...
\begin{tikzpicture}
  \draw (0,0) -- (2,1);
\end{tikzpicture}
  • \draw (0,0) -- (2,1); draws a line from one point to another. Every command ends with ;.

Three TikZ commands and the line, circle and rectangle they draw

Log in or create account

IGCSE & A-Level