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.
\csnameto 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\ExplSyntaxOnlike you use\makeatletterto get the category codes for\show\hook_use_one:n. – Skillmon Oct 26 '20 at 14:04\listfilesat 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 thebegindocumenthook: the faulty packages break because they redefine\document, so if you use\show\documentyou can have a clue of which package did the redefinition. Looking at the definition of\hook_use_once:nwill not help here – Phelype Oleinik Oct 26 '20 at 14:09menukeys(the workaround is not exactly robust, so depending which parts ofcatoptionsare used, it may or may not work). – Phelype Oleinik Oct 26 '20 at 15:57