## TikZ figures in org mode files

TikZ images deserve a footnote in the Org-manual. For future reference, I include an example that seems to work.

Say we have a tikz diagram, in a file diagram.tex such as:

\begin{tikzpicture}
\draw (0,0) grid (7,5);
\draw (0,0) node[below left] {$A$};
\draw (7,5) node[above right] {$B$};
\fill (0,0) circle (2pt);
\fill (7,5) circle (2pt);
\end{tikzpicture}


Then we can include it in an org file:

#+title: A test

* A TikZ figure

#+name: diag
[[./diagram.tex]]


It helps to set org-latex-image-default-width to the empty string, to avoid resizing the image when exporting to LaTeX. See the discusion here.