latex3 / babel

The babel system for LaTeX, LuaLaTeX and XeLaTeX
LaTeX Project Public License v1.3c
126 stars 34 forks source link

shorthands=off breaks translation for \appendixname and \listfigurename in Dutch #140

Closed ComaVN closed 2 years ago

ComaVN commented 3 years ago

When loading the Babel package for Dutch using the shorthands=off parameter, "y is no longer a shorthand for the IJ ligature. However, some command translations still use them, such as \appendixname and \listfigurename. This makes these commands fail, with:

! Undefined control sequence.
\appendixname ->B"
                  ylage
l.16 \appendixname

See https://github.com/ComaVN/babel-shorthand-dutch-poc for a minimal example.

jbezos commented 2 years ago

It works for me. From the link it seems you are using an old version. Upgrade, and if it still doesn't work post a minimal example.

ComaVN commented 2 years ago

Thanks for the speedy response.

My version, from Ubuntu 20.04.2 LTS (focal)'s texlive 2019 package, does seem to be ancient:

/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty
Package: babel 2020/02/14 3.40 The Babel package

I'll try to update and report back

ComaVN commented 2 years ago

I can confirm that the Babel package in TexLive 2021 (babel 2021/06/28 3.61) does work correctly.

I apologize for the noise

ComaVN commented 2 years ago

For anyone else running into this issue: Babel v3.44 still had the problem, Babel v3.55 (The last version for TexLive 2020) does not.

ComaVN commented 2 years ago

I found another way to reproduce this, which unfortunatly still happens in v3.62: https://github.com/ComaVN/babel-shorthand-dutch-poc/blob/c80be6ca083d0ae6de19f4946ff7104e767b4b93/minimal.tex

I'm not sure if this is a bug in Babel or with \MakeUppercase tho...

jbezos commented 2 years ago

Version 3.8l of the Dutch style, now in CTAN, should fix this bug, as well as another bug I’ve discovered, namely, \ij was not uppercased with \MakeUppercase.

FrankMittelbach commented 2 years ago

bug I’ve discovered, namely, \ij was not uppercased with \MakeUppercase.

is this a bug on the babel level or should that be fixed in LaTeX's version of \MakeUppercase?

blefloch commented 2 years ago

Seems to be LaTeX.

$ latexdef ij @uclclist

\ij:
macro:->\T1-cmd \ij \T1\ij 

\@uclclist:
macro:->\oe \OE \o \O \ae \AE \dh \DH \dj \DJ \l \L \ng \NG \ss \SS \th \TH 
jbezos commented 2 years ago

🤔 Good question. As Babel is defining \ij I just assumed it belongs to Babel, but as Bruno points out it belongs to LaTeX itself (and the corresponding code must be removed from Babel, at least for T1).

FrankMittelbach commented 2 years ago

Babel should not define it I would say. If it is missing in OT1 (which I would be surprised if, but who knows :-) then it should be defined there and it should be included in the uclclist. Could you please open a bug report against LaTeX then?

jbezos commented 2 years ago

I'll open it. OTH, I wonder if these definitions were included in babel for compatibility with Plain (there are a few more, like \dj and \SS) or they are just obsolete.

jbezos commented 2 years ago

Continued here: https://github.com/latex3/latex2e/issues/658