1

Apologies for bug reporting here, but thought I might as well. My current banner is:

$ pdflatex -version | grep 'TeX Live'
pdfTeX 3.14159265-2.6-1.40.15 (TeX Live 2014)

The problem seems to be described in Printing sentence in ancient Greek - comp.text.tex, and in my case stems from here: Getting Texlive version in pdflatex?; regardless of which example I try, say:

\documentclass{article}

\def\gettexliveversion#1(#2 #3 #4#5#6#7#8)#9\relax{#4#5#6#7}
\edef\texliveversion{\expandafter\gettexliveversion\pdftexbanner\relax}
% \usepackage{unravel}

% [Printing sentence in ancient Greek - Google Groups](https://groups.google.com/forum/?_escaped_fragment_=topic/comp.text.tex/ajGFiDqpvW0#!topic/comp.text.tex/ajGFiDqpvW0)
% fail at step 16200 (16190)
% \unravel{
\usepackage[greek,english]{babel}
\usepackage[utf8]{inputenc}
\ifnum\texliveversion<2013
  \usepackage[LGRx,T1]{fontenc}
\else
  \usepackage[T1]{fontenc}
\fi
% }

\listfiles

\begin{document}

The starting verse of the Iliad is
\begin{quotation}\greektext
Μῆνιν ἄειδε, θεά, Πηληιάδεω Ἀχιλῆος
\end{quotation}
and it's really great.

\end{document}

... it fails with:

Package babel Warning: No hyphenation patterns were preloaded for
(babel)                the language `greek' into the format.
(babel)                Please, configure your TeX system to add them and
(babel)                rebuild the format. Now I will use the patterns
(babel)                preloaded for english instead on input line 44.

! Undefined control sequence.
l.50 ...\bbl@monogreek \bbl@monogreek=\l@monogreek

If I keep on pressing ENTER at each error, eventually it compiles a PDF, and the listfiles output is:

 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
   babel.sty    2014/09/25 3.9l The Babel package
   greek.ldf    2014/09/18 v1.9b Greek support for the babel system
  lgrenc.def    2013/12/02 v0.11.2 LGR Greek font encoding definitions
greek-fontenc.def    2013/11/28 v0.11 Common Greek font encoding definitions
 english.ldf    2012/08/20 v3.3p English support from the babel system
inputenc.sty    2014/04/30 v1.2b Input encoding file
    utf8.def    2008/04/05 v1.1m UTF-8 support for inputenc
   t1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
  ot1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
  omsenc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
  lgrenc.dfu    2014/09/14 1.5 UTF-8 support for Greek
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
  lgrcmr.fd    2013/09/01 v1.0 Greek European Computer Regular
 ***********

The comp.text.tex thread actually mentions:

Actually, to get this far I edited /usr/share/texlive/texmf-local/texmf-compat/tex/latex/greek.ldf replacing

\ifx\l@monogreek\@undefined
  \adddialect\@monogreek 0\fi
\ifx\l@ancientgreek\@undefined
  \adddialect\@ancientgreek 0\fi

by

\ifx\l@monogreek\@undefined
  \adddialect\l@monogreek 0\fi
\ifx\l@ancientgreek\@undefined
  \adddialect\l@ancientgreek 0\fi

...

The second version has \l@monogreek in the second line (for \@monogreek), and a similar change in the fourth line.

After the change my problems go away.

For me, that snippet is in /media/texlive/2014/texmf-dist/tex/generic/babel-greek/greek.ldf, and contains:

...
\ProvidesLanguage{greek}
        [2014/09/18 v1.9b Greek support for the babel system]
%% File `babel-greek.dtx'
...
\ifx\l@greek\@undefined
  \@nopatterns{greek}
  \adddialect\l@greek 0\fi
\ifx\l@monogreek\@undefined
  \adddialect\@monogreek 0\fi
\ifx\l@ancientgreek\@undefined
  \adddialect\@ancientgreek 0\fi

Clearly, it should be \adddialect\l@monogreek, not \adddialect\@monogreek as it is; and indeed, when I make that change as well, the document compiles just fine.


The thing is this: I installed TexLive from scratch (install-tl), tried to compile the given MWE, it fails with given error - had to hack babel-greek/greek.ldf as described to get it to compile. So, there's either faulty code in greek.ldf and it's a bug -- or I miss some package, and Latex cannot tell me which with the usual "file not found" message. Since no one else can reproduce this error, it is probably not a bug - but how do I find what I am missing, then?

  • 1
    Isn't this off-topic? It is not, after all, a question. Why don't you report the bug? You apologise for reporting it here but you literally cannot report it here in the sense usually meant by 'reporting a bug'. You can report that you believe this is a bug here. You can report that this is a bug here. But you cannot report the bug here. To put this another way: what exactly are you looking for in an answer? – cfr Oct 9 '14 at 2:34
  • 1
    And what do I have to do to reproduce the bug? If I run your code as is, it compiles fine. – cfr Oct 9 '14 at 2:38
  • 1
    I can't confirm the 'bug' you described – user31729 Oct 9 '14 at 4:15
  • 1
    I'd agree with the above comments and can't see the bug, but also note this is nothing to do with TeX Live. If there is a bug in a package it's an issue for the package maintainer(s): in this case, babel is handled by the LaTeX team so any issues should be reported to latex-project.org/bugs.html. – Joseph Wright Oct 9 '14 at 5:59
  • 1
    @sdaau I don't think the .ldf file is wrong here (I have \ifx\l@monogreek\@undefined\adddialect\@monogreek 0\fi and so on, and I think this looks right). What I do wonder is about file paths: have you got mismatched files. Can you post the part of your .log file which shows the various files being loaded so we can see the full paths? – Joseph Wright Oct 9 '14 at 7:18
1

Ok, I think I got it. The thing is - what I usually do if I install a new TexLive version, I install the minimal packages, and then try to tex my docs and add packages until they compile - so obviously there was some missing stuff here. Here is a log of what I did to get it properly working (without hacks).

As pointed out in comments: the first key thing is that my log said:

Babel <3.9l> and hyphenation patterns for 2 languages loaded.

... and this is, typically, far too little. This can be confirmed by inspecting kpsewhich language.dat, which in my case, had only these uncommented lines:

%
english         hyphen.tex  % do not change!
=usenglish
=USenglish
=american
% ...
%
dumylang        dumyhyph.tex    %for testing a new language.
nohyphenation   zerohyph.tex    %a language with no patterns at all.

So these hyphenation patterns for 2 languages reported, may have been english and dummylang - I wouldn't know.

So the question is what to do to add hyphenation for Greek; as @UlrikeFischer hinted, this "depends on the location of the language.dat" - and I apparently use the autogenerated, not a local one:

$ kpsewhich language.dat
/media/texlive/2014/texmf-var/tex/generic/config/language.dat

So, I did search for "hyphen" using tlmgr search --global --file hyphen, and installed what I thought was interesting like this:

$ tlmgr install hyph-utf8 hyphen-ancientgreek hyphen-greek 
...
[1/2, ??:??/??:??] install: hyphen-ancientgreek [17k]
[2/2, 00:00/00:00] install: hyphen-greek [717k]
...
running fmtutil-sys --no-error-if-no-engine=luajittex --byhyphen "/media/texlive/2014/texmf-var/tex/generic/config/language.dat" ...
...

Now when I checked the language.dat, it had this at end:

...
% 
dumylang        dumyhyph.tex    %for testing a new language.
nohyphenation   zerohyph.tex    %a language with no patterns at all.
% from hyphen-ancientgreek:
ancientgreek loadhyph-grc.tex
ibycus ibyhyph.tex
% from hyphen-greek:
monogreek loadhyph-el-monoton.tex
greek loadhyph-el-polyton.tex
=polygreek

Neat - but the example still didn't compile! So, I tried:

tlmgr install --reinstall babel-greek 

Nope. Then I tried as per hints in No hyphenation patterns were loaded for the language:

fmtutil --all 

Nope - example still didn't compile. Then I tried as per: TeX Frequently Asked Questions -- Using a new language with Babel / question label "newlang":

$ texconfig hyphen latex
texconfig hyphen is no longer supported, because manual edits of
language.dat (or language.def) will be overwritten by the new TeX Live
package manager, tlmgr, which regenerates those configuration files as
needed upon package changes.  Thus, to add or remove hyphenation
patterns, the recommended method is to use tlmgr to add or remove the
appropriate package.

If you need to make manual additions, you can edit the files
language-local.dat and language-local.def under TEXMFLOCAL.  Further
information with tlmgr --help and at http://tug.org/texlive/tlmgr.html.

Exiting.

So that's a no-go. So then I tried this:

$ fmtutil --byhyphen language.dat
fmtutil: no format depends on hyphen file `/tmp/language.dat'.

Ah, so here it refers to current working directory? Let's throw in an absolute path:

$ fmtutil --byhyphen `kpsewhich language.dat` 2>&1 | tee fmtutil.log
...
$ grep 'language\|installed' fmtutil.log
...
  50 for language 6
  18 for language 5
  148 for language 4
  97 for language 3
  2 for language 1
  181 for language 0
fmtutil: ~/.texlive2014/texmf-var/web2c/pdftex/latex.fmt installed.
  50 for language 6
  18 for language 5
  148 for language 4
  97 for language 3
  2 for language 1
  181 for language 0
fmtutil: ~/.texlive2014/texmf-var/web2c/pdftex/pdflatex.fmt installed.
...

Ah, so it looks like now the hyphenation patterns for all newly installed languages are now reconstructed? But the example still didn't compile?

Finally, I enter almost by accident this:

/tmp$ kpsewhich pdflatex.fmt
./pdflatex.fmt
/tmp$ rm pdflatex.fmt 
/tmp$ kpsewhich pdflatex.fmt
/tmp$

... and realize that I have a pdflatex.fmt in my current working directory /tmp, probably generated by fmtutil --byfmt pdflatex when I was messing with this earlier. So I delete this /tmp/pdflatex.fmt, then kpsewhich cannot find a pdflatex.fmt anymore - and then FINALLY the pdflatex test.tex completes compiling without an error; with the log now being:

...
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 6 languages loaded.
... 
 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
inputenc.sty    2014/04/30 v1.2b Input encoding file
    utf8.def    2008/04/05 v1.1m UTF-8 support for inputenc
   t1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
  ot1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
  omsenc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
   babel.sty    2014/09/25 3.9l The Babel package
   greek.ldf    2014/09/18 v1.9b Greek support for the babel system
  lgrenc.def    2013/12/02 v0.11.2 LGR Greek font encoding definitions
  lgrenc.dfu    2014/09/14 1.5 UTF-8 support for Greek
greek-fontenc.def    2013/11/28 v0.11 Common Greek font encoding definitions
 english.ldf    2012/08/20 v3.3p English support from the babel system
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
  lgrcmr.fd    2013/09/01 v1.0 Greek European Computer Regular
 ***********
Output written on test.pdf (1 page, 26870 bytes).
Transcript written on test.log.

And hopefully, this is now installed as it should be for TexLive 2014.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.