[luatex] shell-escape broken?

David Carlisle d.p.carlisle at gmail.com
Wed Jun 8 08:45:22 CEST 2016

On 8 June 2016 at 06:56, Norbert Preining <preining at logic.at> wrote:

> Hi David,
> > The first line is
> >
> > \ifx\ProvidesPackage\undefined
> That does not suffice:
> [~] pdftex
> This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded
> format=pdftex)
>  restricted \write18 enabled.
> **\relax
> entering extended mode
> *\input shellesc.sty
> (/home/norbert/tl/2016/texmf-dist/tex/latex/tools/shellesc.sty
> ! Undefined control sequence.
> l.67   \PackageInfo
>                       {shellesc}{Restricted shell escape ensabled}
> ?
> All the best
> Norbert

yes sorry, that's why it was there, but as Joseph also commented, it isn't
I've fixed that in the latex svn yesterday after your message.


so you could now go

\catcode`@=11 \input shellesc.sty

in (extended) plain tex (needs \protected still as I haven't guarded that)

I could guard guard \protected and the catcode of @ but really I think it
isn't worth it, the actual code needed is one ifx and a couple of def so
adding too much code to guard latex constructs for plain tex seems out of

overloading \write to check for 18 is just a short term compatibility hack
to ease the changeover, and I plan to add an option to shellesc not to do
it, so the real code you need is just a switch between write18 and
os.execute so something like

  \protected\def\ShellEscape{\immediate\write18 }

and defining that in plain is (even with the changes I just made) is
simpler than loading shellesc.sty

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/luatex/attachments/20160608/9de81eba/attachment.html>

More information about the luatex mailing list