[luatex] How to detect option '--shell-escape'?

David Carlisle d.p.carlisle at gmail.com
Sat Oct 7 15:54:56 CEST 2023


 > Thanks, David, for the pointer to 'shellesc.sty'. (Unlike 'iftex.sty',
> it can't be '\input' in plain TeX.)

sigh, it could when I wrote it, but I have let some latex creep in

! Undefined control sequence.
l.55 \@makeother

that's just `\catcode`\@=12  I'll probably fix that for next time, thanks

David


On Sat, 7 Oct 2023 at 14:38, Andreas Scherer <andreas_tex at freenet.de> wrote:

> Thanks, David, for the pointer to 'shellesc.sty'. (Unlike 'iftex.sty',
> it can't be '\input' in pöain TeX.)
>
> In 'pwebmac.tex' I reduced the code to
>
>    \chardef\pdfshellescape
>      \directlua{tex.sprint((status.shell_escape or os.execute()) .. " ")}
>
> for LuaTeX and it works nicely further below in
>
>    \ifpdflua \makebookmarks % added in Version 4.5
>      \ifnum\pdfshellescape=1 {\let\\=\BS % count the @<named sections@>
>        \global\countD=\input{|grep -c -e '\\:\\X' \jobname.tex}} \fi\fi
>
> Cheers,
> Andreas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/luatex/attachments/20231007/c30ffd42/attachment.htm>


More information about the luatex mailing list.