# Given a list of arara compilation commands, at which step/s should I use “shell : yes” option?

In case you need to run a complex compilation command list with arara, I know that synctex: yes is necessary only at the last step, for example:

% arara: pdflatex
% arara: frontespizio
% arara: biber
% arara: pdflatex
% arara: pdflatex: { synctex: yes }


But if I need the shell : yes option, for example because I'm using tikzexternalize, at which point/s should I put it?

Here a mwe:

% arara: pdflatex: { shell : yes }
% arara: biber
% arara: pdflatex: { shell : yes }
% arara: pdflatex: { shell : yes , synctex: yes }
\documentclass[11pt,openright]{book}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[british]{babel}

\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize[prefix={Figures/}] % activate!

\usepackage[style=authoryear-icomp, backend=biber,hyperref=true]{biblatex}
\usepackage{csquotes}
\usepackage{hyperref}

\begin{document}

\begin{tikzpicture}
\fill[green] (0,0) rectangle (1,1);
\end{tikzpicture}

\cite{aristotle:rhetoric}
\printbibliography

\end{document}

• My guess: on the first run should be more then enough. In theory you should only need it if the figure is not yet existing or you changed something in the figure [assuming the figure itself does not contain any references or similar] – user36296 Jan 28 '17 at 21:48

I saved your file as test.tex (and removed the prefix for the figure files, but it's irrelevant).

Then I ran

pdflatex -shell-escape test
pdflatex test


which gave no problem. The second run issues the message

===== Image 'test-figure0' is up-to-date. ======


which confirms my statement.

Thus I conclude that shell: yes is only needed for the first batch run, leading to

% arara: pdflatex { shell: yes }
% arara: frontespizio
% arara: biber
% arara: pdflatex
% arara: pdflatex: { synctex: yes }


You would have problems if some TikZ picture contains \ref or \cite, but this is independent of arara and always running pdflatex with the -shell-escape option would not cure it.

On the other hand, other packages needing -shell-escape might behave differently, so there's no general rule, I'm afraid.