0

I tried to compile an europecv document, but it fails with

(/usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty))

! LaTeX hooks Error: Sorting rule for 'begindocument' hook applied too late. (hooks) Try setting this rule earlier.

For immediate help type H <return>. ...

l.421 ...begindocument}{showkeys}{before}{nameref}

error. The strange thing is that I tried to put the modifications David Carlisle recommended, and in the europecv.cls file there are no line containing the incriminated command, nor the lines David said to being modded... Now I laugh in agony, frome where is this error coming, and when I applies

\AddToHook{begindocument/before}%
\RequirePackage{hyperref}%
}%

the error remains.

1 Answers1

1

I appear to have a fixed copy of the class, presumably for a previous answer.

\documentclass{europecv}
\begin{document} x \end{document}

runs without error in a class fixed as follows

$ diff /usr/local/texlive/2023/texmf-dist/tex/latex/europecv/europecv.cls .
10c10
< \ProvidesClass{europecv}[08/03/2022 (Unicode TeX detection) European curriculum vitae class]
---
> \ProvidesClass{europecv}[13/03/2022 (Unicode TeX detection) European curriculum vitae class]
264c264
<    \includegraphics[width=\ecv@logowidth]{europasslogo}}
---
>    \includegraphics[width=\ecv@logowidth]{europasslogo.eps}}
420a421,422
> %\RequirePackage{ucs}
> %\RequirePackage[utf8x]{inputenc}
448c450
< \AtBeginDocument{%
---
> \AddToHook{begindocument/before}{%
David Carlisle
  • 757,742
  • Thank you, this solved the problem. Maybe I was lame, because I added the \AddToHook command after the \AtBeginDocument, today I exchanged... – Thomas Benko May 21 '23 at 10:34