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.)
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\pdfVersionused for. Additionally what does the log file say? – daleif Jan 14 '21 at 14:09\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