Closed AlMa1r closed 3 months ago
I’ve just installed TeXLive 2024 and there are no errors with pdflatex, xelatex or lualatex. Please, post the log
file.
@jbezos Thank you. I've inserted the full output and log into the original post. Try the minimal plain+latex TeX Live 2024 installation and add packages then. (Probably the log or the console should contain a complaint about some missing package, but they don't.)
Your log shows \l@unhyphenated=\language5
and
! Missing number, treated as zero.
<to be read again>
\l@norsk
whereas mine (with a full tl2024 install) shows no error and
\l@unhyphenated=\language89
so the difference is that I have many more languages installed in particular norsk
so I assume
tlmgr install babel-norsk
will fix it at your site although (@jbezos) I guess it could give a higher level missing language error at some point rather than hitting a low level tex missing number.
actually your log has (/home/username/usr/local/texlive/2024/texmf-dist/tex/generic/babel-norsk/norsk.ldf
so I think babel-norsk
is installed but the format has not been rebuilt, in which case
fmtutil-sys --all
should fix things.
or the creation of language.dat etc failed, in this case tlmgr generate language
and then rebuilding the formats could be needed.
@davidcarlisle @u-fischer Thank you for looking into this.
tlmgr install babel-norsk
said that the package was installed:
tlmgr: package repository https://ctan.space-pro.be/tex-archive/systems/texlive/tlnet (verified)
tlmgr install: package already present: babel-norsk
Then I ran fmtutil-sys --all
. It took some minutes and produced lots of output on the console, but the bug still persisted. As for your last suggestion:
$ tlmgr generate language
To make the newly-generated language.dat.lua take effect, run fmtutil-sys --byhyphen /home/username/usr/local/texlive/2024/texmf-var/tex/generic/config/language.dat.lua.
To make the newly-generated language.dat take effect, run fmtutil-sys --byhyphen /home/username/usr/local/texlive/2024/texmf-var/tex/generic/config/language.dat.
To make the newly-generated language.def take effect, run fmtutil-sys --byhyphen /home/username/usr/local/texlive/2024/texmf-var/tex/generic/config/language.def.
Running these three fmtutil-sys --byhyphen …
commands followed by fmtutil-sys --all
produced lots of output on the console, but even after them the final result was the same:
$ latex mwe
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(./mwe.tex
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-02-20>
(/home/username/usr/local/texlive/2024/texmf-dist/tex/latex/base/article.cls
Document Class: article 2023/05/17 v1.4n Standard LaTeX document class
(/home/username/usr/local/texlive/2024/texmf-dist/tex/latex/base/size10.clo))
(/home/username/usr/local/texlive/2024/texmf-dist/tex/generic/babel/babel.sty
(/home/username/usr/local/texlive/2024/texmf-dist/tex/generic/babel/txtbabel.de
f)
(/home/username/usr/local/texlive/2024/texmf-dist/tex/generic/babel-norsk/norsk
.ldf
(/home/username/usr/local/texlive/2024/texmf-dist/tex/generic/babel-norsk/norwe
gian.ldf
! Missing number, treated as zero.
<to be read again>
\l@norsk
l.45 \bbl@tempa\l@norsk
? Q
OK, entering \batchmode
Any other ideas? I could clean up and start from TeX Live 2024 plain+latex again if this helps.
what does kpsewhich --engine=pdftex pdflatex.fmt
show? it should be
/home/username/usr/local/texlive/2024/texmf-var/web2c/pdftex/pdflatex.fmt
also as Ulrike says check language'dat
which should have a block that looks like
% from hyphen-norwegian:
bokmal loadhyph-nb.tex
=norwegian
=norsk
nynorsk loadhyph-nn.tex
in
/home/username/usr/local/texlive/2024/texmf-var/tex/generic/config/language.dat
@davidcarlisle
$ kpsewhich --engine=pdftex pdflatex.fmt
/home/username/usr/local/texlive/2024/texmf-var/web2c/pdftex/pdflatex.fmt
$ cat ~/usr/local/texlive/2024/texmf-var/tex/generic/config/language.dat
% Generated by /home/username/usr/local/texlive/2024/bin/x86_64-linux/tlmgr on Fri Mar 15 10:44:07 2024
% $Id: language.us 68317 2023-09-18 21:21:09Z karl $
% language.us (and the start of language.dat)
% - initial hyphenation patterns.
% Created long ago by Sebastian Rahtz and others. Public domain.
%
% DO NOT EDIT THIS FILE (language.dat)! It is generated by tlmgr.
%
% To enable or disable languages, there are two options:
% - if the language is provided by a TeX Live package, you can
% (un)install the corresponding package using tlmgr. Examples:
% tlmgr install hyphen-french
% tlmgr remove hyphen-english
% - in any case, you can use local configuration files:
% TEXMFLOCAL/tex/generic/config/language-local.dat
% TEXMFLOCAL/tex/generic/config/language-local.dat.lua
% TEXMFLOCAL/tex/generic/config/language-local.def
% See the tlmgr documentation (try `man tlmgr' or `texdoc tlmgr'),
% section "generate" for details.
%
% The preferred comment for actual language lines in language.dat and
% language.us is %!; do not use %! for normal comments. This
% is to be able to separate textual comments from commented-out language
% in such a way that automatic parsing by programs is possible, so that
% we can present the user with `all possible languages'.
%
% We must keep english as the default (first) here, and let it refer to
% hyphen.tex (not anything else), and do not change the hyphen.tex file,
% or name some other file hyphen.tex. In other words, hyphen.tex must
% remain the original file from Knuth, and it must be \language0. This
% is one important aspect of ensuring that the original, frozen TeX
% always produces the same line and page breaks.
%
% The babel system allows you to easily change the active language for
% LaTeX. For more information, see the documentation in
% texmf-dist/doc/generic/babel/. ConTeXt has its own language support too.
%
english hyphen.tex % do not change!
=usenglish
=USenglish
=american
%
% ushyphmax.tex, on the other hand, includes Gerard Kuiken's additional
% patterns; it is not frozen. It is provided by the hyphen-english
% package, not listed here. Also, in hyph-utf8 and current TL, it has
% been renamed to hyph-en-us.tex, along with other *hyph-en-us.* files.
%
% FYI, ushyph.tex is Dr. Kuiken's smaller set of patterns; with today's
% large memories, there is no reason to use it, and we don't list it here.
% ushyph1.tex is another (historical) name for hyphen.tex.
% ushyph2.tex is another (historical) name for ushyph.tex.
%
% dumylang was invented by Bernard Gaulle for testing, many years ago,
% when portable filenames could be at most eight characters long, hence
% the single m in "dumyhyph.tex". --karl
%
dumylang dumyhyph.tex % for testing a new language.
nohyphenation zerohyph.tex % a language with no patterns at all.
% temp until hyph-utf8 is updated, per message from Javier,
% https://tug.org/pipermail/tex-live/2023-September/049478.html
vietnamese zerohyph.tex
hebrew zerohyph.tex
% (end of static file language.us)
Next, I tried out tlmgr install hyphen-norwegian
and then ran latex mwe
(where mwe.tex contains the source from the original post) again. Now, I got no errors. So probably the original error message should be indeed, well, actionable or at least more informative without incurring the need to invoke the LaTeX gurus such as you or Ulrike here. Or the package babel-norsk should perhaps depend on hyphen-norwegian (or hyphen-norsk if only it existed).
It’s a bug. If the language is not defined in language.dat
it must fallback to \language0
. I’ll try to fix in a few days.
It’s a bug. If the language is not defined in
language.dat
it must fallback to\language0
. I’ll try to fix in a few days.
Javier, one can argue that this should be done this way as a compatibility setting, but in my opinion it is the wrong fallback and instead it would better fall back to the unhyphened language (whatever number that is 1 perhaps).
@FrankMittelbach Agreed, but, as you said, it’s for compatibility.
well, yes, but I think compatibility to error handling (and a missing language is an error) is of lesser importance to do a good error handling, and in my opinion if I send a document to a different site and that sight is missing the languages the document uses it is better to have no hyphenation than to have wrong hyphenation suddenly.
🤔 Compatibility has been one of my main concerns, but, to be honest, not so much anymore. Interestingly, this only affects languages in the Latin script, because \language0
only hyphenates words in the ASCII range, so languages in the Cyrillic script (there are about 20 in babel
) behave in practice as nohyphenation
. The logic for hyphenation rules is hardcoded in the ldf
files 🙁, which is an obstacle, but I don't think it’s insurmountable.
while babel picking up this case better would be good, it seems weird that a user can get in that position, shouldn't at the texlive level tlmgr install babel-whatever
also do tlmgr install hyphen-something
with a suitable dependency list setup?
I’ve just submitted a bug fix to CTAN.
Running
latex
from TeX Live 2024 onyields
on the console. No other warnings or errors are noted. The log file contains
The same error message (and slightly deviating printout and log) are generated when
pdflatex
instead oflatex
is run. A bug? Any package I might be missing?