zauguin / luaul

7 stars 3 forks source link

lua-ul loops in compilation with pdflatex #22

Closed u-fischer closed 3 months ago

u-fischer commented 4 months ago

(extracted from https://tex.stackexchange.com/q/718530/2388)

If a document using lua-ul is compiled with pdflatex in nonstopmode it loops:

\documentclass{article}
\usepackage{lua-ul}
\begin{document}
blub
\end{document}
! Undefined control sequence.
<output> {\LuaULResetUnderline 
                               *\let \par \@@par \ifnum \outputpenalty <-\@M...
l.12 \end{document}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<output> {\LuaULResetUnderline 
                               *\let \par \@@par \ifnum \outputpenalty <-\@M...
l.12 \end{document}

I would suggest to add after (or at least before redefining the kernel commands and \output)

\sys_if_engine_luatex:F {
  \msg_error:nn {lua-ul} {luatex-required}
}
\sys_if_engine_luatex:F {
  \endinput
}
zauguin commented 3 months ago

Fixed by switching to iftex's \RequireLuaTeX which triggers a hard error instead.