In a fashion similar to this and this question, I now get a "Extra endgroup" error at the \begin{document}
of documents that previously compiled fine.
I understand this is because of the new LaTeX update that inter alia changed the AtBeginDocument
hook to integrate it into a more systematic hook scheme.
So I suspect one of the very numerous packages I am using is not (yet) compatible. I reverted to an earlier version of LaTeX as suggested in this answer (also had to revert eso-pic).
How can I pinpoint which package(s) is at fault ? This seems hard to me because the faulty constructions are added to the hook and everything explodes at \begin{document}
.
How can I inspect the content of what is to be done at that point and what should I look for ? I used to use \show
to explore what is going on, often needing a \makeatletter
to get to internal commands, but now the internals of \UseOneTimeHook
are in the new syntax eg. \hook_use_one:n
and I cannot \show
it at the latex prompt.
\csname
to build any control sequence (even if it includes spaces) in the following way:\expandafter\show\csname hook_use_one:n\endcsname
. Also you can use\ExplSyntaxOn
like you use\makeatletter
to get the category codes for\show\hook_use_one:n
.\listfiles
at the top of your document and show us the file list, it should be easy to pinpoint the faulty package. However, the error happens before thebegindocument
hook: the faulty packages break because they redefine\document
, so if you use\show\document
you can have a clue of which package did the redefinition. Looking at the definition of\hook_use_once:n
will not help here