3

Before an update of TeXLive distribution, I used without problem the menukeys package. Since the update (a couple of days), the results are correct (PDF) but the following compilation error occurs (PDFLaTeX and LuaLaTeX):

 ! Extra \endgroup.
\document ->\endgroup 
    \let \BeforeStartOfDocument \@firstofone \cpt@beforestartdoc \let \BeforeStartOfDocument \@notprerr \gundefcs \cpt@beforestartdoc \gdef \cpt@docstarted {}\begingroup \UseOneTimeHook {begindocument/before}\@kernel@after@begindocum...
l.11 \begin{document}

Tracing back to the error with a MWE, it seems that the catoptions package induces the issue. The fact that this package has not been updated for several years is disturbing...

From where this issue may be coming from ?

MWE

\documentclass[10pt]{article}
\usepackage[a4paper,margin=1in]{geometry}
%\usepackage{menukeys}% Compilation error
\usepackage{catoptions}% Same compilation error

\begin{document}

\section{Menukeys test}

Where is the issue ? %\menu{File>New File}

\end{document}
  • catoptions is broken in the new LaTeX kernel because it does some heavy patching of internal commands. The author was already contacted, but no response so far – Phelype Oleinik Oct 8 at 12:55
  • the menukeys author has been notified some time ago too, and there is also an issue in the github: github.com/tweh/menukeys/issues/59 – Ulrike Fischer Oct 8 at 12:59
  • Thanks for your prompt and useful remarks. – ejazz Oct 8 at 14:17
3

catoptions is incompatible with a lot of latex code and finally does not work at all in the current latex release. Until it is updated you can roll back the changes as follows

\RequirePackage[2020-02-02]{latexrelease}
\documentclass[10pt]{article}
\usepackage[a4paper,margin=1in]{geometry}
%\usepackage{menukeys}% Compilation error
\usepackage{catoptions}% Same compilation error

\begin{document}

\section{Menukeys test}

Where is the issue ? %\menu{File>New File}

\end{document}

| improve this answer | |
  • 1
    Thanks for your prompt response. Your solution works for catoptions but not for menukeys where the incompatibility seems to be deported to the xstring package. – ejazz Oct 8 at 14:18
  • 2
    @ejazz the xstring error is an error in the rollback code, that should be corrected. – Ulrike Fischer Oct 8 at 14:39
  • @UlrikeFischer oh you mean uncomment that menu command? – David Carlisle Oct 8 at 15:00
  • 2
    @DavidCarlisle no simply using the package (it loads xparse and then everything explodes because of issue 406 I just opened) – Ulrike Fischer Oct 8 at 15:01
  • 1
    @UlrikeFischer so I see and unfortunately you can't roll back further to 2019 and really remove expl3... – David Carlisle Oct 8 at 15:02
1

EDIT: As pointed out by ejazz, the below is merely a workaround.

I reverted with tlmgr by doing

$ tlmgr restore latex
Available backups for latex: 53958 (2020-10-08 13:20)
$ tlmgr restore latex 53958

and now I can compile documents using menukeys again without any error.

| improve this answer | |
  • Thank you for the temporary workaround. The aim stays to have an updated distribution that works with menukeys too. – ejazz Oct 9 at 13:06
  • Thank you for the clarification. I edited the answer accordingly. – toromtomtom Oct 10 at 5:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.