Closed John02139 closed 1 year ago
A simpler example is
\RequirePackage{latexbug}
\documentclass{article}
\usepackage{babel}
\begin{document}
\MakeUppercase{abc\label{blub}}
\end{document}
But I think that should be moved to the babel issues, as babel redefines \MakeUppercase
.
you can avoid the redefinition by defining \BabelCaseHack
:
\def\BabelCaseHack{}
\usepackage{babel}
...
Thanks, that line fixes my production file.
It appears that the general issue has appeared in babel's github.
I will link this into the babel github, issue latex3/latex2e#189.
😮 I’ve just pushed a new dev version here unaware of this report. With a quick test, apparently the issue is fixed.
@jbezos I'm working on the longer-term mechanism here: I hope to have something for the Fall 2022 LaTeX, so code committed in a week or two
I’m closing this issue for two reasons: (1) it’s basically a duplicate of #189 (well, not quite, but the very closely related); (2) the last commit mostly fixes this particular issue.
I’d like to note the minimal file by Ulrike failed in TeXLive 2021, too, and the label/ref is wrong even if protected. Actually, the new implementation of \MakeUppercase
and \MakeLowercase
in LaTeX attempts to improve their behavior. However, babel
restores partially the old code for the localized casing to work again, which explain why the problem is back.
Any sense of whether/when a fix for this issue might be posted -- does it require first the work Joseph plans on the kernel? Or will babel continue to not support constructions that place \label
inside uppercased captions? (If the latter, is any functionality lost with a patch that uses Ulrike's \def\BabelCaseHack{}
? My code lives in a template used by others, & I'm trying to insulate end-users from the details.)
@John02139 Very likely I’ll submit a new version to CTAN in 7-10 days. No functionality is lost except if you need Medieval Latin or a few other languages.
Brief outline of the bug
Under the most recent releases, \label must be \protect'd in uppercase environments if babel is loaded. This issue is related to issue latex3/latex2e#881. This behavior was not present in mid-September 2022.
Minimal example showing the bug
Log file (required) and possibly PDF file
caption-label-issue.log