0

I have been using LuaLatex with the externalization library with these options in my preamble

   \usepgfplotslibrary{external}
   \tikzsetexternalprefix{figurescache/}
   \tikzexternalize[mode=list and make]

After I compile my main latex document, I have to perform a "make" on the main file in order for the pgfplots/tikz figures to be generated. This step is fine. However, when there is an error in my tikz code, I am not able to see a detailed error message. I want to be able to see something similar to

"line 110, undefined control sequence"

in the command prompt. Is there an option for it?

As requested, a MWE would be something similar to

  \documentclass{article}
   \usepackage{pgfplots}
   \usepackage{tikz}
  \usepgfplotslibrary{external}
  \tikzsetexternalprefix{figurescache/}
  \tikzexternalize[mode=list and make]
   \begin{document}
    Random Text here.
    \begin{figure}
    \centering{
    \begin{tikzpicture}
    \begin{axis}[xmin=0, xmax=5,ymin=0,ymax=5, axis lines=none]
    \addplot[only marks, mark size=2pt] table[x=xs, y=ys]{
        xs  ys
         1     1
         1     2
         1     3
    };
    \draw (axis cs: 2, 1) node[left]{{\footnotesize $i-1$}};
    \draw (axis cs: 2, 2) node[left]{{\footnotesize$i$}};
    \draw (axis cs: 2, 3) node[left]{{\footnotesize$i+1$}};
    \end{axis}
    \end{tikzpicture}
     }
    \end{figure}
  \end{document}

After compiling the above code, one would have to create the figure using the make command from the terminal. Now, if there happens to be a typo in the block containing the tikzpicture, the make command will just abort and no meaningful error will show in the terminal. If you remove

       \usepgfplotslibrary{external}
       \tikzsetexternalprefix{figurescache/}
       \tikzexternalize[mode=list and make]

and perform a simple compilation, if there is an error, a more meaningful error message will show. What I want is to be able to see meaningful errors while performing the make command. Thanks

1
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Jun 7, 2015 at 5:18

1 Answer 1

1

So I found the answer to my own question. What I needed to do was to disable the interaction mode. This can be done by adding the following options in the preamble:

\tikzset{external/system call={lualatex -shell-escape -synctex=1 -halt-on-error -jobname "\image" "\texsource"}}

With that option, I am now able to read the error regarding the pgfplots in the command line.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .