I want to generate multiple pdf files with different font sizes. I referred to this solution, and formed the following code.
% test.tex
\documentclass{article}
\usepackage{shellesc}
\ShellEscape{%
lualatex --jobname="\jobname-8pt"
"\PassOptionsToClass{8pt}{article}"
}%
\ShellEscape{%
lualatex --jobname="\jobname-12pt"
"\PassOptionsToClass{12pt}{article}"
}%
\expandafter\stop
\begin{document}
Hello world.
\end{document}
It doesn't work with the -shell-escape flag on the terminal. What is the correct way of coding this? What is the purpose of \gdef\string and \string\input\space\jobname in the original answer?
\gdef\string\PassOptionsToClass{8pt}{article}\string\input\space\jobnamework? – Niranjan Dec 27 '20 at 10:18