No \write18 or \pdfxxx commands in luatex 0.85+ (texlive 2016)

Create issue
Issue #23 resolved
Former user created an issue

current luatex builds drop support for \write18 the package shellesc (in latex/required/tools) overloads \write to add this back and provides a generic \ShellEscape command that coul cbe used in preference (using \write18 or \directlua{os.execute depending on the engine)

similarly luatex has dropped or renamed almost all the pdftex commands \pdfoutput, \pdfshellescape etc, the simplest quick fix for that would be


where luatex85 is already on ctan and aliases all the old names using new luatex primitives.

Comments (12)

  1. Martin Scharrer repo owner

    What if someone uses an older luatex and doesn't have the package luatex85? There should be a better fix.

  2. u_fischer

    If someone got a new version of one of your packages he/she should also be able to get luatex85. luatex85 works also with older luatex (e.g. I'm using it currently e.g. with miktex without problems)

  3. David Carlisle

    Note this has come up again today on texlive list If you want to avoid changes on older luatex you could use \ifx\pdfextension\@undefined rather than \ifx\directlua and then just load the compatibility layer if it is defined. You may also want to load shellesc.sty in that case (as \write18 does not work by default in new luatex either)


  4. Falk Hanisch

    The Issue is still pending, although it can be circumvented with the two packages luatex85 and shellesc. However, if the convert option is enabled, there is still a problem in code lines 919--922 of standalone.cls:

        \expandafter\ifx\csname pdfshellescape\endcsname\relax
        \ifeof18 \else 3\fi
    \relax% 0

    As \pdfshellescape is not defined anymore for lualatex the test fails. With package pdftexcmds something like

        \expandafter\ifx\csname pdf@shellescape\endcsname\relax%
        \ifeof18 \else 3\fi%
        \else\expandafter\ifx\csname pdfshellescape\endcsname\relax%
    \relax% 0

    would solve this problem.

    Edit: Link to source

  5. Elliott Sales de Andrade

    Just chiming in to see if there's any updates.

    The new lua(la)tex/TeXLive is now in Fedora 25 as well, so this is being troublesome there too.

  6. Elliott Sales de Andrade

    I've made an attempt at implementing this in pull request #1. I did not apply the suggestion from @tudscr because I don't really understand what I'm doing, and it seemed to be working... There are still a few kinks to work out first, I think.

  7. ArTourter

    Just to add my voice to this issue after testing the different solutions posted here on texlive2017, I cannot fix the issue highlighted by @tudscr regarding the use of the convert option with lualatex85+ with either the changes proposed by @tudscr or pull request #1

    It would be very nice to have this fixed before texlive2017 is officially out, unfortunately my raw TeX skills are currently very much insufficient to fix this. However, I am more than happy to test any code available.

  8. jarrn

    A quick workaround without changing the standalone.cls is to use


    Link on TeX.Stackexchange

  9. Log in to comment