I am uploading a paper to arxiv, which does not allow the use of shell-escape.
Currently my paper uses pgfplots as in the following MWE:
temp.tex
----------------------------
\documentclass{article}
\usepackage{tikz,pgfplots}
\begin{document}
\begin{figure}
\begin{tikzpicture}[domain=-2:2]
\draw plot function{x*x};
\end{tikzpicture}
\end{figure}
\begin{figure}
\begin{tikzpicture}[domain=0:4]
\draw plot function{sqrt(x)};
\end{tikzpicture}
\end{figure}
\end{document}
When I compile with the following, everything works fine:
pdflatex --shell-escape temp.tex
How can I create the figures and include them in my document without using shell-escape? Ideally, I would run some script to produce fig1.pdf and fig2.pdf, then replace the MWE above with:
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\includegraphics{fig1}
\end{figure}
\begin{figure}
\includegraphics{fig2}
\end{figure}
\end{document}
temp.tex
to have\documentclass[tikz]{standalone}
and remove thefigure
environments, and then have a different.tex
file with e.g.\includegraphics[page=1]{temp}
? – Torbjørn T. Sep 28 '17 at 16:44\documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \draw (0,0) -- (1,1); \end{tikzpicture} \begin{tikzpicture} \draw (0,2) -- (2,0); \end{tikzpicture} \end{document}
will produce a 2 page PDF, one page pertikzpicture
, where each page is exactly the size of thetikzpicture
. Thepage
option forincludegraphics
does exactly what you think: it determines which page of a multi-page PDF is included. – Torbjørn T. Sep 28 '17 at 17:10