As explained in the pgf manual under 32.4 and in various other questions/comments here on TeX.sX (https://tex.stackexchange.com/a/44508/9077, https://tex.stackexchange.com/a/32363/9077, https://tex.stackexchange.com/a/23565/9077), it's possible to export a TikZ picture as a pdf with document like this:
\documentclass{article}
% main document, called main.tex
\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize % activate!
\begin{document}
\begin{tikzpicture}
\node {root}
child {node {left}}
child {node {right}
child {node {child}}
child {node {child}}
};
\end{tikzpicture}
\end{document}
The problem, however, is that neither the manual nor these answers provide any detailed explanation for how to compile this document. I'm using texlive in Windows 7 with TeXworks, so please do not suggest command line compilation procedures.
I need to compile with XeLaTeX since I'm using fontspec. My XeLaTeX compilations look like the following:


What do I need to change to be able to use the external TikZ library?


--shell-escapeactive. – Qrrbrbirlbel Nov 10 '13 at 20:21--shell-escapein various places, but it never works. Could you (or someone) please provide a complete compilation procedure for XeLaTeX? – Sverre Nov 11 '13 at 11:32xelatex --shell-escape --synctex <filename>should do. However, you also need to setupexternalto use XeLaTeX, especially if the preamble uses XeLaTeX-specific stuff, the/tikz/external/system callneeds to be setup correctly. – Qrrbrbirlbel Nov 11 '13 at 19:13<filename>there indicates to me that this is a command line interface? I don't use the command line, so I wondering (as indicated in my question) what I need to include in TeXworks compilation. 2. I'm sure I need to set upexternalcorrectly, but I have no idea how to do that ... – Sverre Nov 11 '13 at 19:46+button and add--shell-escapeto the options? I don’t know aboutlatexmkbut it probably has also an option to use the compiler with--shell-escape. – Qrrbrbirlbel Nov 11 '13 at 20:02<filename>? If I need to add the name of my file here every time I compile, then the compilation is not automatic anymore, which I believe is the point of this feature in TeXworks. But this wouldn't matter much in the end if it won't compile anyway without me having set upexternal"correctly" first ... – Sverre Nov 11 '13 at 20:40$fullname? – Qrrbrbirlbel Nov 11 '13 at 21:00$fullnamemeans. The reason I am asking how to modify these TeXworks compilations is that I don't have much knowledge of these things. If I did, I presumably would have figured out how to do this on my own. What about the "correct" setup forexternal? – Sverre Nov 11 '13 at 21:02--shell-escapein TeXworks by now? Or is this still an open issue? – Paul Gessler Mar 02 '14 at 04:43