latex2e
latex2e copied to clipboard
Extra \endgroup in \AddToHook
Brief outline of the bug
The command \AddToHook
causes an error in special circumstances.
Minimal example showing the bug
\RequirePackage{latexbug}
\documentclass{article}
\ExplSyntaxOn
\NewDocumentCommand{\test}{m}{
\group_begin:
\cs_set_eq:cN { ~ } \space
\group_end:
}
\AddToHook{cmd/test/before}{\relax}
\ExplSyntaxOff
\begin{document}
nothing
\end{document}
Note the error goes away if the {m}
spec is replaced with {}
. Also note I have no idea about \cs_set_eq:cN { ~ } \space
, this is minimised from a function in a package I did not write (Piton, function \__piton_piton_standard
).
Log file (required) and possibly PDF file
texstudio_VuFlvC.log No PDF file is produced.