For the sake of speed and potential file size errors I have been trying to set up the externalization of pgfplots/tikz for my figures including/excluding luatex.
I have the following question which is unclear to me:
- After externalization, should you call the figure from the
pdf, or doestikz/pgfautomatically determine if it should run the.texfile or if it should load thepdf?
It is giving me a few issues:
- When externalizing using
pdflatex, I get a memory exceedance error. Which is not produced with externalization switched of. - If externalization is performed all the way using
lualatex, it still crashes when compiling withpdflatexafterwards.
I am not sure if this is a correct MWE:
Compile with either:
pdflatex.exe -synctex=1 -shell-escape -interaction=nonstopmode %.tex
lualatex.exe -synctex=1 -shell-escape -interaction=nonstopmode %.tex
In the main document:
\documentclass{book}
\usepackage{pgf}
\usepackage{tikz}
\usepackage{pgfplots}
\usepgfplotslibrary{external}
\tikzexternalize
\tikzsetexternalprefix{figures/}
\tikzset{external/force remake}
\begin{figure}[h!]
{\input{Figure1.tex}}
\end{figure}
\end{document}
A random tikz figure document (actually contains thousends of datapoints):
Figure1.tex:
\begin{tikzpicture}
\begin{axis}[%
\addplot [color=black, forget plot]
table[row_sep=crcr][%
0 0 \\
0.1 20\\
}
\end{axis}
\end{tikzpicture}%

\tikzset{external/force remake}do? Do you only want to save your tikz image in the folderfigures/? Ispdflatexokay? – Bobyandbob Oct 30 '17 at 14:07Yes I want to save the images in
How can I check if pdflatex is ok?