← Back to Commentary and Essays

TikZ for Your Website

TikZ is a LaTeX drawing system for publication-grade diagrams and figures.

It is best when you want precise control over layout and the figure belongs in a book-quality context rather than a quick web sketch.

Simple example

\begin{tikzpicture}
  \draw[->] (0,0) -- (2,0);
  \draw[->] (0,0) -- (0,2);
  \node at (1.2,1.2) {Idea};
\end{tikzpicture}

Rendered result

Idea

What you need to show it on your site

To display a live figure, the site needs a build step that compiles the TikZ source into PDF, SVG, or another static asset before publishing.

For permanent pages, the build-time asset path is the safest approach. It keeps the figure stable and avoids asking the browser to compile LaTeX on demand.

Authoritative sources