Menu

#109 Compatibility with Tex Live 2026 when using varioref

KOMA-Script 3.49.3
closed
nobody
3 days ago
3 days ago
No

Summary

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.

Why this is filed here rather than with the LaTeX Project

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.)

Environment

  • TeX Live 2026 (pdfTeX 3.141592653-2.6-1.40.29, LaTeX2e <2026-06-01>)
  • KOMA-Script scrreprt 2026/02/02 v3.49.2
  • varioref (current, with \DeclareVrefOptions per latex3/latex2e#1978)
  • Confirmed absent under TeX Live 2025 / varioref v1.6g (2025/01/14)

Minimal example (crashes)

\documentclass{scrreprt}
\usepackage[UKenglish]{babel}
\usepackage{hyperref}
\usepackage{varioref}
\usepackage{cleveref}
\begin{document}
x
\end{document}

Same example under article (works fine, isolates the trigger)

\documentclass{article}
\usepackage[UKenglish]{babel}
\usepackage{hyperref}
\usepackage{varioref}
\usepackage{cleveref}
\begin{document}
x
\end{document}

Error

./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!

Note

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.

Discussion

  • Markus Kohm

    Markus Kohm - 3 days ago
    • labels: --> duplicate
    • status: open --> closed
    • discussion: enabled --> disabled
     
  • Markus Kohm

    Markus Kohm - 3 days ago

    Duplicate of [#107].

     

    Related

    Issues: #107

  • Markus Kohm

    Markus Kohm - 3 days ago
    • labels: duplicate --> duplicate, LaTeX, varioref
     
  • Markus Kohm

    Markus Kohm - 3 days ago
    • discussion: disabled --> enabled
     
  • Markus Kohm

    Markus Kohm - 3 days ago

    BTW: scrbase does not overwrite \DeclareOption, \OverwriteOption or \ExecuteOptions. And as you can see in The LaTeX3 Project bugtracker, the issue is not KOMA-Script specific and clearly a varioref bug, 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

Log in to post a comment.