[tex-live] Re: Strange behaviour of Babel package re. hyphenation

Thomas Esser te at dbs.uni-hannover.de
Sun Jul 13 15:17:57 CEST 2003


On Sun, Jul 13, 2003 at 12:20:59PM +0200, Gerben Wierda wrote:
> >\usepackage[german,french,english]{babel}

The format file has both "american" and "british" patterns loaded. Without
babel, the pattern for "american" are used. With the above babel line,
the "english" patterns are used and "english" is an alias for either
"american" or "british" depending on language.dat.

In this case, "english" is an alias for "british" which explains the
difference.

> >well: for example, without Babel the word "mechanism" is hyphenated as
> >mecha-nism, and with Babel as mechan-ism, and the same happen with many
> >other words.

Try this test document. It shows that \language is set to "1" by the
options english and british and to 0 by the option american (which
is also the default if no babel is used):

  \documentclass{minimal}
  \usepackage[american,british,english]{babel}
  \begin{document}
  \makeatletter
  \scrollmode
  \selectlanguage{english}  \showthe\language \showhyphens{mechanism}
  \selectlanguage{american} \showthe\language \showhyphens{mechanism}
  \selectlanguage{british}  \showthe\language \showhyphens{mechanism}
  \end{document}

> >- if the Babel package is not used, all patterns are used  
> >simultaneously,
> >yielding unpredictible output;

No, if babel is not loaded and \language is not changed, the patterns for
\language0 are used (which are in your case the american patterns).

> >- if the Babel package is used, it selects the one hyphenation pattern  
> >used.

In TeX, hyphenation for a paragraph is done depending on the value of
\language which is active at the end of a paragraph. babel gives you a
way to manipulate \language without having to know the precise numbers
of the language to use. Your confusion comes from the fact that "english"
is defined as an alias for british.

> >In other words, with Gerben's teTeX, is use of the Babel package
> >mandatory? I hope not, and the reason for English hyphenation to be
> >different with or without Babel comes from elsewhere (different  
> >tolerance
> >parameters, etc.). Otherwise that would break compatibiliity.

For not breaking compatibility with documents that don't load babel,
\language0 should use Knuth's patterns (i.e. the american ones). If your
hyphenation should be compatible with other people's who don't use babel,
you should stop using the alias "english" and use "american" instead.

Thomas


More information about the tex-live mailing list