Closed lemzwerg closed 3 years ago
It seems that babel's plain TeX support is missing a definition for \IfFileExists
.
It works fine with languages like spanish
, dutch
, polish
, estonian
and others (my test files are based on some of these), so I wonder if it's related to the complex file structure in the german
style. I have to investigate.
It seems there is a bug in ngermanb
, because the line:
\LdfInit\CurrentOption{captions\CurrentOption}
is misplaced. It must be just after \ProvidesLanguage
. With this change it works for me.
@jspitz Can you have a look at it?
@jbezos sure. Is there a MWE I can test with?
@jspitz See the linked issue above: https://github.com/latex3/babel/issues/118
It seems there is a bug in
ngermanb
, because the line:\LdfInit\CurrentOption{captions\CurrentOption}
is misplaced. It must be just after
\ProvidesLanguage
. With this change it works for me.
Moving this still produces the same error for me. Also I think the movement is not possible as \CurrentOption
needs to be defined in the preceding lines (in order to support the different varieties)
@jspitz You may need to update to the version in GitHub because there was a bug in babel
(oddly, it has not been detected in years). Or add by hand to ngermanb.sty
the two missing lines at the end:
\def\CurrentOption{ngerman}
\input ngermanb.ldf\relax
See https://github.com/latex3/babel/issues/118#issuecomment-785717226. In Plain, the catcodes are set by \LdfInit
, so it must be placed before any macro containing @
. Alternatively, you can change the catcodes explicitly.
Should be fixed in the repo. @lemzwerg can you test from https://github.com/jspitz/babel-german/?
Thanks for the fix. It works for ngermanb.sty
. However, it still fails for germanb.sty
. This test file
\input germanb.sty
\begindocument
\showhyphens{Fassade modernste Abendstern Mordopfer}
\bye
produces
! Undefined control sequence.
\bbl@provide@locale ...sname \relax \IfFileExists
{babel-\languagename .tex}...
\select@language ...guagename \bbl@provide@locale
\bbl@iflanguage \languagen...
\bbl@set@language ...ect@language {\languagename }
\expandafter \ifx \csname ...
\@begindocumenthook ...after {\bbl@main@language }
\ifbbl@single \renewcomman...
\begindocument ->\@begindocumenthook
\global \let \@begindocumenthook \@unde...
l.2 \begindocument
Better now?
Yep, this works now, thanks.
[TeXLive rev. 57852, 2021-02-23]
At least for the files
germanb.sty
,austrian.sty
, andnaustrian.sty
the macro\begindocument
fails if used with Plain TeX, in contradiction to the documentation.