28.03.2013 Views

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

256 Chapter 11. Multilingual L AT E X<br />

• redefining \originalTeX <strong>to</strong> be \noextraslang so that the next<br />

language switch will remove those features specific <strong>to</strong> lang.<br />

11.2 Contents of the language.dat file<br />

As has been mentioned before, with T E X version 3.0 <strong>and</strong> later it is possible<br />

<strong>to</strong> s<strong>to</strong>re more than one set of hyphenation patterns in the format file.<br />

The counter \language is used <strong>to</strong> switch between them by setting it <strong>to</strong> a<br />

different number.<br />

However, there is no st<strong>and</strong>ard <strong>to</strong> dictate which languages belong <strong>to</strong><br />

which numbers. If a package were <strong>to</strong> assume a certain ordering, it would<br />

most certainly function incorrectly at installations other than the one<br />

for which it was designed. The babel system invokes a more reliable<br />

procedure.<br />

During the production of the format by initex (Section B.1.3), the file<br />

hyphen.cfg is input, which in turn reads in language.dat, the only file<br />

<strong>to</strong> be tailored <strong>to</strong> the local installation. This file contains a list of languages<br />

<strong>to</strong> add as well as the name of the file with the hyphenation patterns <strong>and</strong><br />

the name of any additional file <strong>to</strong> be included. It also indicates names of<br />

dialects that use the same hyphenations by prefixing the name with an<br />

equals sign. For example, if language.dat contains<br />

=USenglish<br />

american ushyphen.tex<br />

english ukhyphen.tex<br />

=UKenglish<br />

=british<br />

french frhyphen.tex<br />

german dehypht.tex<br />

ngerman dehyphn.tex<br />

the hyphenation patterns s<strong>to</strong>red in files ushyphen.tex, ukhyphen.tex,<br />

frhyphen.tex, dehypht.tex, <strong>and</strong> dehyphn.tex are loaded under the<br />

language numbers 0 <strong>to</strong> 4 respectively, <strong>and</strong> \l@american, \l@english,<br />

\l@french, \@german, <strong>and</strong> \l@ngerman are defined as numbers 0 through<br />

4 for use with the \selectlanguage comm<strong>and</strong>. Languages \l@USenglish<br />

<strong>and</strong> \l@UKenglish are synonyms for the current language, in this case 0<br />

<strong>and</strong> 1, respectively. Similarly \l@british is identical <strong>to</strong> \l@UKenglish.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!