> 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 <[email protected]> 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 >
