ho-tex / oberdiek

Updating the oberdiek bundle
Other
16 stars 6 forks source link

\pdf@shellescape breaks with --no-shell-escape in LuaLaTeX #45

Closed PhelypeOleinik closed 6 years ago

PhelypeOleinik commented 6 years ago

This issue was spotted in this question.

The following code breaks when compiled with lualatex --no-shell-escape file.tex:

\documentclass{article}
\usepackage{pdftexcmds}
\makeatletter
\count@=\pdf@shellescape
\makeatother
\begin{document}
\end{document}

When compiled with --no-shell-escape LuaTeX returns a 0 which, at the moment \pdf@shellescape is defined, has \catcode 9, so it disappears and \pdf@shellescape expands to \numexpr \relax and it breaks with Missing number, treated as zero.

I thought that maybe doing a local \catcode change while defining \pdf@shellescape would be one way to solve it. Or maybe moving the definition a few lines below, where the \catcode of 0 is back to 12.

In the StackExchange chat Ulrike Fischer suggested to remove the \directlua0 thing and the compatibility ti LuaTeX < 0.36 altogether (with a very good argument).

davidcarlisle commented 6 years ago

Thanks I think that should be fixed now, and it's anyway safer to use a fixed catcode regime in these internal sprint functions.

davidcarlisle commented 6 years ago

last comment should have been issue #38

davidcarlisle commented 6 years ago

the updated dtx has a changelog describing the fix, but not the fix, sorry, another update will be needed, re-opening.