15.04.2014 Views

Babel, a multilingual package for use with LATEX's ... - linsrv.net

Babel, a multilingual package for use with LATEX's ... - linsrv.net

Babel, a multilingual package for use with LATEX's ... - linsrv.net

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.

It simply means you must reconfigure language.dat, either by hand or <strong>with</strong> the<br />

tools provided by your distribution.<br />

3 The interface between the core of babel and the<br />

language definition files<br />

The language definition files (ldf) must con<strong>for</strong>m to a number of conventions,<br />

beca<strong>use</strong> these files have to fill in the gaps left by the common code in babel.def,<br />

i. e., the definitions of the macros that produce texts. Also the language-switching<br />

possibility which has been built into the babel system has its implications.<br />

The following assumptions are made:<br />

• Some of the language-specific definitions might be <strong>use</strong>d by plain T E X <strong>use</strong>rs,<br />

so the files have to be coded so that they can be read by both L A T E X and plain<br />

T E X. The current <strong>for</strong>mat can be checked by looking at the value of the macro<br />

\fmtname.<br />

• The common part of the babel system redefines a number of macros and<br />

environments (defined previously in the document style) to put in the names<br />

of macros that replace the previously hard-wired texts. These macros have to<br />

be defined in the language definition files.<br />

• The language definition files must define five macros, <strong>use</strong>d to activate and<br />

deactivate the language-specific definitions. These macros are<br />

\〈lang〉hyphenmins, \captions〈lang〉, \date〈lang〉, \extras〈lang〉 and<br />

\noextras〈lang〉(the last two may be left empty); where 〈lang〉 is either the<br />

name of the language definition file or the name of the L A T E X option that is to<br />

be <strong>use</strong>d. These macros and their functions are discussed below. You must<br />

define all or none <strong>for</strong> a language (or a dialect); defining, say, \date〈lang〉 but<br />

not \captions〈lang〉 does not raise an error but can lead to unexpected<br />

results.<br />

• When a language definition file is loaded, it can define \l@〈lang〉 to be a<br />

dialect of \language0 when \l@〈lang〉 is undefined.<br />

• Language names must be all lowercase. If an unknow language is selected,<br />

babel will attempt setting it after lowercasing its name.<br />

• The semantics of modifiers is not defined (on purpose). In most cases, they<br />

will just be simple separated options (eg., spanish), but a language might<br />

require, say, a set of options organized as a tree <strong>with</strong> suboptions (in such a<br />

case, the recommended separator is /).<br />

Some recommendations:<br />

• The preferred shorthand is ", which is not <strong>use</strong>d in L A T E X (quotes are entered<br />

as ‘‘ and ’’). Other good choices are characters which are not <strong>use</strong>d in a<br />

certain context (eg, = in an ancient language). Note however =, , : and<br />

the like can be dangerous, beca<strong>use</strong> they may be <strong>use</strong>d as part of the syntax of<br />

some elements (numeric expressions, key/value pairs, etc.).<br />

• Captions should not contain shorthands or encoding dependent commands<br />

(the latter is not always possible, but should be clearly documented). They<br />

should be defined using the LICR. You may also <strong>use</strong> the new tools <strong>for</strong><br />

encoded strings, described below.<br />

19

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

Saved successfully!

Ooh no, something went wrong!