Opened 13 years ago

Closed 11 years ago

#29750 closed defect (fixed)

texlive-latex: babel is unusable as is (\iflanguage does not work)

Reported by: akimd (Akim Demaille) Owned by: drkp (Dan Ports)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: texlive-latex

Description

Hi!

I have lost hours on this issue (together with a friend of mine on whose machine everything worked fine, to understand where the difference was).

The following document, on my MacPorts:

\documentclass{article}
\usepackage[francais,english]{babel}
\begin{document}
\iflanguage{francais}{FR}{}
\iflanguage{english}{EN}{}
\end{document}

displays

FR EN

Yes, both. Where, of course, one expects only "EN". The problem was tracked down to the fact that I don't have the package "texlive-lang-french" installed!!! Thanks to diff between log files, this was guessed when we saw the "warning" that follows:

-
-Package babel Warning: No hyphenation patterns were loaded for
-(babel)                the language `French'
-(babel)                I will use the patterns loaded for \language=0 instead.
-
-\l@french = a dialect from \language0

It turns out I also have others:

 Language: english 2005/03/30 v3.3o English support from the babel system
-\l@british = a dialect from \language\l@english 
-\l@UKenglish = a dialect from \language\l@english 
 \l@canadian = a dialect from \language\l@american 
 \l@australian = a dialect from \language\l@british 
 \l@newzealand = a dialect from \language\l@british 

which is suspicious.

The TeX document started to behave properly when I installex texlive-lang-french.

Bottom line is: my document should *not* compile when the said package is not installed. This is really asking for troubles, on behalf of the users. Babel should frankly die when I ask

\usepackage[francais]{babel}

when texlive-lang-french is not installed.

Thanks!

Change History (4)

comment:1 Changed 13 years ago by mf2k (Frank Schima)

Cc: dports@… removed
Owner: changed from macports-tickets@… to dports@…

comment:2 Changed 13 years ago by drkp (Dan Ports)

It sounds like what you want is for babel to treat a missing hyphenation package as an error rather than a warning?

I'm not sure this is a bug. To the extent that it is, it is with babel (upstream) rather than MacPorts. (I do agree that it's unfortunate.)

comment:3 Changed 13 years ago by akimd (Akim Demaille)

Hi! Thanks for answering.

Yes, it should be an error. Actually, I had more in mind something like moving the definition of the french files of babel into texlive-lang-french. That makes more sense to me: either you get the whole language definition, or nothing (since apparently babel is considered to be part of core-LaTeX, it seems reasonable).

So I don't know whether this should be handled at the package or babel level. Maybe both.

Would you like me to report this somewhere for babel authors?

comment:4 Changed 11 years ago by drkp (Dan Ports)

Resolution: fixed
Status: newclosed

This seems to be fixed in texlive 2013 thanks to some reorganization of the babel packages in CTAN.

Note: See TracTickets for help on using tickets.