3

I'd like to plot some measured values with TikZ, but despite "calling" LuaLaTeX I get the error message that TeX's main memory is exceeded. I can compile the plots under LuaLaTeX but it doesn't work with LaTeX calling LuaLaTeX. What can I do except deleting some values?

TeX capacity exceeded, sorry [main memory size=3000000].

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{tikz,pgfplots}
\pgfplotsset{compat=newest}

\usetikzlibrary{external}
\tikzset{external/system call={lualatex
        \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode
        -jobname "\image" "\texsource"}}
\tikzexternalize[shell escape=-enable-write18]


\begin{document}

\begin{tikzpicture}

\begin{axis}[%
width=5cm,
height=10cm,
at={(0.790898in,0.967508in)},
scale only axis,
xlabel={$x~\rightarrow$},
ylabel={$y~\rightarrow$},
legend style={legend cell align=left,align=left,draw=black}
]
\addplot [color=gray,line width=.45pt,mark size=.45pt,only marks,mark=*,mark options={solid}]
table [ x expr=\thisrow{tmess}*1e6, y=uoutmess, col sep=comma] {tmessuoutmess.csv};
\addlegendentry{Messung};

\addplot [color=black,solid,line width=1.5pt]
table [x expr=\thisrow{tapprox}*1e6, y=uoutapprox, col sep=comma] {tapproxuoutapprox.csv};
\addlegendentry{Approximation};

\addplot [color=black,loosely dotted,line width=1.5pt]
table [x expr=\thisrow{tsim}*1e6,y=uoutsim, col sep=comma] {tsimuoutsim.csv};
\addlegendentry{Simulation};
\end{axis}
\end{tikzpicture}
\end{document}     

Values:

http://www72.zippyshare.com/v/QUAuSl3J/file.html

output

jlk
  • 1,729
  • 1
    You have to call pdflatex with the -shell-escape. I'm no expert in MiKTeX, but -src shell-escape looks suspicious and it should probably be -shell-escape. – egreg Mar 06 '15 at 20:40
  • 1
    Which TeX distribution do you run? Which version of LuaTeX do you have? The latter piece of information is provided on line 1 of the log file. (I run MacTeX2014 on a MacBookPro with 8GByte of RAM, and when I compile your program under LuaTeX 0.79.1, I don't experience the problems you report.) – Mico Mar 06 '15 at 20:41
  • I'm using MiKTex 2.9.4248 and LuaTeX, Version beta-0.76.0-2013062821 (rev 4627) with pdfTeX, Version 3.14159265-2.6-1.40.15 (MiKTeX 2.9 64-bit) under Windows 8.1. - – jlk Mar 06 '15 at 21:16
  • I have installed LuaTex, Version beta-0.79.3 (TeX Live 2014/W32TeX) (rev 5140) and changed the entry in TexStudio to latex.exe -synctex=1 -interaction=nonstopmode --shell-escape %.tex but it has no effect. (BTW my version of pddfTeX is 3.14159265-2.6-1.40.15 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2015.2.18) ) – jlk Mar 06 '15 at 21:57
  • The log files says: ! Package tikz Error: Sorry, the system call 'lualatex -halt-on-error -interaction=batchmode -jobname "document-figure0" "\def\tikzexternalrealjob{document}\input{document}"' did NOT result in a usable output file 'document-figure0' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that. Or maybe the command simply failed? Error messages can be found in 'document-figure0.log'. If youcontinue now, I'll try to typeset the picture. – jlk Mar 06 '15 at 22:09
  • if you are running pdflatex you must add --shell-escape to the pdflatex entry not latex. – Ulrike Fischer Mar 06 '15 at 22:38
  • It seems to make no difference: latex This is pdfTeX, Version 3.14159265-2.6-1.40.15 (MiKTeX 2.9 64-bit) in comparison to pdflatex This is pdfTeX, Version 3.14159265-2.6-1.40.15 (MiKTeX 2.9 64-bit) – jlk Mar 06 '15 at 22:42
  • 2
    No I meant that in your image above you have configured only latex to use shell-escape, so naturally it won't work if you are using pdflatex. I tried your example with pdflatex in a current in miktex (32bit) and it worked without problems. – Ulrike Fischer Mar 06 '15 at 22:50
  • Thanks, good point. Unfortunately it still does not work. – jlk Mar 06 '15 at 23:01
  • Do you have multiple installations of TeX? You appear to be using LuaTeX from 32 bit TeX Live 2014 but pdfTeX from 64 bit MiKTeX 2.9. This is going to end in tears...? At least, mixing multiple distributions causes trouble on Unix-like systems, so I'm guessing it is not good on Windows, either? – cfr Mar 06 '15 at 23:51
  • At the beginning I used Miktex (ie at the first post) I used only the version provided by Miktex but I installed a newer version of Luatex and as long as I use only Lualatex every still works. – jlk Mar 07 '15 at 00:14
  • @cfr: I have miktex 2.9, texlive 2012, 2013, and 2014 on my PC and can use all of them without problems. I only need to change the path variable. No tears at all. It is a bit more complicated to use context-standalone too, there one has to adapt more environment variables. – Ulrike Fischer Mar 07 '15 at 10:46
  • @harryhaller: You should perhaps restart. Move your document to an empty folder and then try to compile with pdflatex --shell-escape <document> on the command line. If it still fails show the complete log-file. – Ulrike Fischer Mar 07 '15 at 10:48
  • @UlrikeFischer I have multiple TeX Live versions, too. But that is not the same as e.g. using pdflatex from one version to call lualatex from a different one, is it? That is, from what you say, you are not mixing different distributions. You just have different distributions installed and can switch between them. – cfr Mar 07 '15 at 12:08
  • 1
    @harryhaller: Please edit your question to include relevant information insted of burying it in comments. – Martin Schröder Mar 07 '15 at 12:29
  • @cfr: I don't think that Harry is mixing distributions (at least not in reality, in the comments there is quite a mess). – Ulrike Fischer Mar 07 '15 at 13:23
  • @UlrikeFischer To be honest, it is not clear to me at all. But I don't know Windows so if you can tell that, I'm sure you're right. – cfr Mar 07 '15 at 13:29
  • @cfr It is not easy to mix distributions: One of them is always first in the path and this one is used. – Ulrike Fischer Mar 07 '15 at 13:36
  • @UlrikeFischer Fair enough. It is easy on Unix-like platforms. However, the OP did indicate that they were using LuaLaTeX from TL 2014 and the rest from MiKTeX which is what made me think they might be. However, it is not really clear to me that this is what is actually being used given the editor configuration. – cfr Mar 07 '15 at 13:42

0 Answers0