Is there a way to run the --shell-escape command for the LuaLaTex engine in Texshop? I know there are editable TEX and Latex commands in the Texshop settings under Engine->pdfTeX settings, but I do not see anything for the LuaLaTeX engine.
1 Answers
If you always use lualatex as your default engine, you can simply replace the LaTeX engine default line in the preferences to read
lualatex --file-line-error --synctex=1 --shell-escape
I wouldn't really recommend this route, since it's probably best to only use --shell-escape when you absolutely need it, rather than make it the default.
I just have an Engine file to do this, or use the arara engine. Save the following file as lualatex-shell.engine in ~/Library/TeXShop/Engines.
#!/bin/tcsh
set path= ($path /usr/texbin /usr/local/bin)
lualatex --shell-escape --file-line-error --synctex=1 "$1"
In the Terminal type:
chmod +x ~/Library/TeXShop/Engines/lualatex-shell.engine
Then restart TeXShop and you can invoke it either by choosing it from the Program item in the Macros menu, or by adding a magic comment line:
% !TEX TS-program = lualatex-shell
Alternatively, you can use the arara engine, and add shell-escape as one of the options. You may need to move the arara engine from the Inactive folder to the main Engines folder (and restart TeXShop) if it doesn't appear in your list of Engines.
% !TEX TS-program = arara
% arara: lualatex: {shell: true}
- 218,180

l.10 \end{lilypond}
– Oбжорoв Nov 23 '23 at 13:24