2

I'm trying to plot some figures based on measurements with tikz because the number of data points is to large for LaTeX I'm using a 'system call' to use LuaLaTeX for them.

As long I do not load microtype everything works pretty well but for some reason microtype seems to cause an error. Any ideas?

TeX capacity exceeded, sorry [main memory size=3000000]. \end{axis}
\documentclass[fontsize=12pt]{scrreprt}

\usepackage[english,ngerman]{babel}% neue deutsche Rechtschreibung verwenden
\usepackage[T1]{fontenc}            % Wahl des Fonts, bzw.
\usepackage[utf8]{inputenc} % Zeichkodierung , Umlaute \usepackage{}


%\usepackage[activate={true,nocompatibility},final,tracking=true,kerning=true,spacing=true,factor=1100,stretch=10,shrink=10]{microtype}

\usepackage[activate={true,nocompatibility},
            final,
            tracking=true,
            kerning=true,
            spacing=true,
            factor=1200,
            stretch=50,
            shrink=0]{microtype}

      \usepackage{tikz,pgfplots}
      \pgfplotsset{compat=newest}
      \pgfplotsset{plot coordinates/math parser=false}
      \pgfplotsset{every axis/.append style={
            /pgf/number format/.cd,
            use comma,
            1000 sep={},
            set decimal separator={,},
            clip marker paths=true,
            grid style={densely dotted, draw=black},
            x tick style={color=black},
            y tick style={color=black},
        }}
        \usetikzlibrary{plotmarks}
        \usetikzlibrary{patterns}      

        \newlength\figureheight
        \newlength\figurewidth

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


\begin{document}

\begin{figure}
\microtypesetup{kerning=false}
\microtypesetup{spacing=false}
\microtypesetup{expansion=false}
\microtypesetup{protrusion=false}
\microtypesetup{activate=false}
\microtypesetup{disable}    
\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}
\microtypesetup{enable}
\microtypesetup{activate=true}
\microtypesetup{protrusion=true}
\microtypesetup{expansion=true}
\microtypesetup{spacing=true}
\microtypesetup{kerning=true}
\end{figure}

\end{document}  

Values: enter link description here

Furthermore, I'm using:

MiKTeX 2.9 64-bit
pdfTeX, Version 3.14159265-2.6-1.40.15
LuaTeX, Version beta-0.76.0-2013062821

edit: Because LuaLateX does not support spacing and kerning I tried to disable this features for the tikzpicture environment but it seems not to work any ideas?

\microtypesetup{kerning=false}
\microtypesetup{spacing=false}
\begin{tikzpicture}
...
\end{tikzpicture}
\microtypesetup{spacing=true}
\microtypesetup{kerning=true}
2
  • 1
    Does that mean that your example in the other thread actually works and wasn't the one you were working with? Mar 7, 2015 at 13:41
  • The manual of microtype says that spacing and kerning only work with pdfTeX. So they may not work with luaTeX. Try with kerning=false,spacing=false. Mar 7, 2015 at 14:12

2 Answers 2

3

Load the ifluatex-package and use it to deactivate settings not allowed or useful for lualatex:

\usepackage{ifluatex}
\usepackage[activate={true,nocompatibility},
            final,
            tracking=true,
            %kerning=true,
            %spacing=true,
            factor=1200,
            stretch=50,
            shrink=0, 
            ]{microtype}
\ifluatex \else \microtypesetup{kerning=true,spacing=true}\fi 
6

The manual of microtype says that kerning and spacing work only with pdfTeX. So try with

...,kerning=false,spacing=false,...

I have confirmed that

pdflatex --shell-escape filename.tex

works.

1
  • 1
    It definitely works this way but I would prefer to disable kerning and spacing only in tikz -- i tried \microtypesetup{kerning=false), \microtypesetup{spacing=false) as well as \microtypesetup{disable) to disable this features for the tikzpicture but it seems not to work.
    – jlk
    Mar 7, 2015 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.