Loading babel + varioref (directly, or transitively via cleveref) under a KOMA-Script class (tested with scrreprt) causes \extras<lang> (e.g. \extrasenglish) to become self-referential, crashing at \begin{document} with "TeX capacity exceeded, sorry [input stack size=10000]". The identical document compiles fine under the standard article class with the same package loads, which isolates the trigger to something in KOMA-Script's option-processing machinery (scrbase.sty overrides \DeclareOption/\ProcessOptions/\ExecuteOptions for its own key=value option handling).</lang>
This only started happening with TeX Live 2026 -- it does not occur under TeX Live 2025. The relevant change on the other side is that varioref recently (v1.6h, 2025-12-31, merged into the LaTeX2e kernel repo via latex3/latex2e#1978) replaced its old per-language \DeclareOption{english}{\vref@addto\extrasenglish{...}} pattern with a new \DeclareVrefOptions helper built on
\ExpandArgs{oo}\DeclareOption{...}. Under article this works fine; under a KOMA-Script class it doesn't.
I ran the LaTeX Project's own latexbug triage package against this example. scrreprt.cls and its full dependency chain (scrkbase.sty, scrbase.sty, scrlfile.sty, scrlfile-hook.sty, scrlogo.sty, tocbasic.sty, typearea.sty, scrsize11pt.clo) do not appear in latexbug's database of LaTeX-Project-maintained files, nor does cleveref.sty -- so latexbug flags them as third-party and, per the LaTeX Project's own stated process, would reject a report filed with them. Since removing the KOMA-Script class (switching to article) makes the crash disappear, their own criterion points here rather than to latex3/latex2e. (varioref.sty itself IS a LaTeX-Project file, so I want to flag the possibility that varioref's new option- declaration code is doing something that isn't robust against a class overriding \DeclareOption/\ProcessOptions -- happy to help relay this to the LaTeX Team / latex3/latex2e#1978 if you conclude the fault is on that side rather than in scrbase.sty.)
\documentclass{scrreprt}
\usepackage[UKenglish]{babel}
\usepackage{hyperref}
\usepackage{varioref}
\usepackage{cleveref}
\begin{document}
x
\end{document}
article (works fine, isolates the trigger)\documentclass{article}
\usepackage[UKenglish]{babel}
\usepackage{hyperref}
\usepackage{varioref}
\usepackage{cleveref}
\begin{document}
x
\end{document}
./test.tex:6: TeX capacity exceeded, sorry [input stack size=10000].
\extrasenglish ->\extrasenglish
\def \reftextfaceafter {on the \reftextvario...
l.6 \begin{document}
./test.tex:6: ==> Fatal error occurred, no output PDF file produced!
I have a workaround in place (vendoring the pre-regression varioref v1.6g into the project) so this isn't urgent on my end -- filing so it's tracked and others hitting the same combination (KOMA-Script + babel + varioref/cleveref, on TeX Live 2026) can find it.
Duplicate of [#107].
Related
Issues:
#107BTW:
scrbasedoes not overwrite\DeclareOption,\OverwriteOptionor\ExecuteOptions. And as you can see in The LaTeX3 Project bugtracker, the issue is not KOMA-Script specific and clearly avariorefbug, which is already corrected but not yet released. And sorry, there is nothing I can do to speed up the next release of LaTeX tools.Last edit: Markus Kohm 3 days ago