0

Working command

If I use the following command

latexmk -pdf -pdflatex="pdflatex -interaction=nonstopmode -shell-escape" filename.tex

to compile my .tex file everything works well.

(Somewhere in the filename.tex there is something like \newcommand{\pdfVersion}{2.0.0}.)

Not working command

If I use the following command (source)

latexmk -pdf -pdflatex='pdflatex -interaction=nonstopmode -shell-escape "\newcommand{\pdfVersion}{2.0.0}\input{filename}"' filename.tex

in the pdf the table of contents is missing (everything else looks fine).

I want to pass the latex command definition as an parameter.

(This time I try to pass \newcommand{\pdfVersion}{2.0.0} as a parameter.)

  • Probably hard to say without knowing what is in filename.tex. So please provide mode details that makes it easier for others to check your problem. Works just fine when I use the simplest doc I could think of. – daleif Jan 14 '21 at 13:42
  • I noticed that the problem was the command I try to pass in the script call. That's why I highly modified my question. – Andreas Schneider Jan 14 '21 at 14:04
  • Again no issues here. But we really need a sample file. What is \pdfVersion used for. Additionally what does the log file say? – daleif Jan 14 '21 at 14:09
  • 1
    I figured out why it didn't work: I wrote \include{filename} instead of \input{filename} (actually in the question I did it right). Thank you anyway! – Andreas Schneider Jan 14 '21 at 15:42

0 Answers0