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

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

\ifx\directlua\@undefined
\else
\RequirePackage{luatex85}
\fi


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

1. repo owner

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

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)

Note this has come up again today on texlive list http://tug.org/pipermail/tex-live/2016-May/038441.html 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)

David

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:

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


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

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


would solve this problem.

https://bitbucket.org/martin_scharrer/standalone/src/8b07ab674eacc7cd38c4fa27049693be68146d6e/standalone.cls?at=default&fileviewer=file-view-default#standalone.cls-1555:1559

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.

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.

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.

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

\RequirePackage{shellesc}
\RequirePackage{pdftexcmds}
\makeatletter
\let\pdfshellescape\pdf@shellescape
\makeatother
\RequirePackage{luatex85}
\documentclass[convert]{standalone}

\begin{document}
MWE
\end{document}