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

error with global options #134

Closed Keks-Dose closed 3 years ago

Keks-Dose commented 3 years ago

I stumbled upon an error with lualatex-dev last night.

MWE:

\documentclass[unusedglobaloption]{article}

\usepackage{babel}

\makeatletter
\show\ds@unusedglobaloption
\makeatother

\begin{document}

\end{document}

Result:

Running `LaTeX' on `210528-babel-bug' with ``lualatex-dev  -file-line-error   --synctex=1 -interaction=nonstopmode 210528-babel-bug.tex''
This is LuaHBTeX, Version 1.13.2 (TeX Live 2021) 
 restricted system commands enabled.
(./210528-babel-bug.tex
LaTeX2e <2021-06-01> pre-release-3 (develop 2021-5-13 branch)
 L3 programming layer <2021-05-07>
(/local/texlive/2021/texmf-dist/tex/latex-dev/base/article.cls
Document Class: article 2021/02/12 v1.4n Standard LaTeX document class
(/local/texlive/2021/texmf-dist/tex/latex-dev/base/size10.clo))
(/local/texlive/2021/texmf-dist/tex/generic/babel/babel.sty
(/local/texlive/2021/texmf-dist/tex/generic/babel/babel.def
(/local/texlive/2021/texmf-dist/tex/generic/babel/luababel.def)
(/local/texlive/2021/texmf-dist/tex/generic/babel/luababel.def))
(/local/texlive/2021/texmf-dist/tex/generic/babel/nil.ldf))
> \ds@unusedglobaloption=macro:
->.
l.6 \show\ds@unusedglobaloption

(/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-luatex.def)
No file 210528-babel-bug.aux.
(/local/texlive/2021/texmf-dist/tex/latex-dev/base/ts1cmr.fd)
(./210528-babel-bug.aux))
(see the transcript file for additional information)
 426 words of node memory still in use:
   3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 1 glyph, 9 attribute, 48 glue_spec, 6 attribute_list, 3 write nodes
   avail lists: 2:8,3:1,4:1,5:4,7:1,9:1

warning  (pdf backend): no pages of output.
Transcript written on 210528-babel-bug.log.

TeX Output exited abnormally with code 1 at Fri May 28 10:18:16

If I remove babel, result:

Running `LaTeX' on `210528-babel-bug' with ``lualatex-dev  -file-line-error   --synctex=1 -interaction=nonstopmode 210528-babel-bug.tex''
This is LuaHBTeX, Version 1.13.2 (TeX Live 2021) 
 restricted system commands enabled.
(./210528-babel-bug.tex
LaTeX2e <2021-06-01> pre-release-3 (develop 2021-5-13 branch)
 L3 programming layer <2021-05-07>
(/local/texlive/2021/texmf-dist/tex/latex-dev/base/article.cls
Document Class: article 2021/02/12 v1.4n Standard LaTeX document class
(/local/texlive/2021/texmf-dist/tex/latex-dev/base/size10.clo))
> \ds@unusedglobaloption=\relax.
l.6 \show\ds@unusedglobaloption

(/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-luatex.def)

LaTeX Warning: Unused global option(s):
    [unusedglobaloption].

(./210528-babel-bug.aux)
(/local/texlive/2021/texmf-dist/tex/latex-dev/base/ts1cmr.fd)
(./210528-babel-bug.aux))
(see the transcript file for additional information)
 413 words of node memory still in use:
   3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 1 glyph, 5 attribute, 48 glue_spec, 5 attribute_list, 2 write nodes
   avail lists: 2:7,3:1,4:1,5:4,7:1,9:1

warning  (pdf backend): no pages of output.
Transcript written on 210528-babel-bug.log.

TeX Output exited abnormally with code 1 at Fri May 28 10:23:55

This is way above my paygrade, I got the MWE from the KOMA-script dev site:

here

and as well here:

https://github.com/latex3/latex2e/issues/572

Thank you to you all!

komascript commented 3 years ago

Potential fix here.

jbezos commented 3 years ago

I have to study what’s exactly going on, because this part is somewhat tricky. And also if things have changed in the LaTeX kernel wrt global options (at least formerly global options were not recognized except if declared explicitly, and this is not possible with babel).