latex3 / babel

The multilingual framework to localize LaTeX, LuaLaTeX and XeLaTeX
https://latex3.github.io/babel/
LaTeX Project Public License v1.3c
130 stars 35 forks source link

`ngermanb.sty` fails in Plain TeX #118

Closed lemzwerg closed 3 years ago

lemzwerg commented 3 years ago

[TeXLive rev. 57852, 2021-02-23]

Contrary to the babel documentation, this simple document

\input ngermanb.sty
\begindocument
\showhyphens{Fassade modernste Abendstern Mordopfer}
\bye

fails with

! Undefined control sequence.
l.2 \begindocument

Looking up the code I see that ngermanb.sty doesn't execute any code at all! It only defines two macros. It's missing these two lines at the end:

\def\CurrentOption{ngerman}
\input ngermanb.ldf\relax
lemzwerg commented 3 years ago

For documentation purposes: When was this bug introduced to Babel?

u-fischer commented 3 years ago

ngerman.sty is not part of babel and it contains quite a lot code. At what file are you actually looking?

lemzwerg commented 3 years ago

I'm not talking about ngerman.sty. I'm talking about ngermanb.sty, which is part of Babel; it gets generated in bbcompat.dtx.

lemzwerg commented 3 years ago

It's a typo in bbcompat.dtx:

diff --git a/bbcompat.dtx b/bbcompat.dtx
index 3008f47..889260f 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -194,8 +194,8 @@
 %<+germanb>\def\CurrentOption{german}
 %<+austrian|german|germanb>\input germanb.ldf\relax
 %<+naustrian>\def\CurrentOption{naustrian}
-%<+ngerman>\def\CurrentOption{ngerman}
-%<+naustrian|ngerman>\input ngermanb.ldf\relax
+%<+ngermanb>\def\CurrentOption{ngerman}
+%<+naustrian|ngermanb>\input ngermanb.ldf\relax
 %<+greek>\def\CurrentOption{greek}
 %<+greek>\input greek.ldf\relax
 %<+icelandic>\def\CurrentOption{icelandic}
u-fischer commented 3 years ago

ah right, sorry. But I'm not sure if it will work after adding the two lines, it still errors for me in plain.

lemzwerg commented 3 years ago

Yep, see issue #119.

jbezos commented 3 years ago

This part can be easily fixed. Done in my local copy. I'm investigating #119.