I am using recently updated MacTex Distribution 2016 on a MacBook Pro Mid 2009 and Texmaker is my editor. I want to include a phase portrait created with matlab2tikz
with a lot of lines. Reducing the samples is no option since it reduces quality and I can see kinks in the lines... So I get the well known error:
! TeX capacity exceeded, sorry [main memory size=5000000].
Since I want to avoid to change memory allocation hard bounds I use lualatex in the system call with \tikzset
. See my MWE below and the phase_portrait.tex
\documentclass{article}
\usepackage{pgfplots}
\usepgfplotslibrary{external}
\tikzset{external/system call={lualatex -shell-escape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}}
\begin{document}
\input{phase_portrait.tex}
\end{document}
I run the file with
"pdflatex" --shell-escape -synctex=1 -interaction=nonstopmode %.tex
and it doesn't work and I get the same error. Why do I still get it? even though I call Lualatex
which has dynamic memory allocation? Any help is appreciated. Thanks!
My versions are respectively:
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex 2016.7.11)
This is LuaTeX, Version 0.95.0 (TeX Live 2016) (format=lualatex 2016.7.11)
EDIT: For me I solved the issue now by compiling my whole document with LuaLaTeX. But this is still not the answer I was looking for since now I am forced to compile with LuaLaTeX. So there is further interest in a solution to the problem ;)
.tex
is too much in my opinion, have you conside to split it, and then call files somehow, like putting data in a single file?\input \include
and so on.