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
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
105 \DeclareOption{math=normal}{\def\bbl@mathnormal{\noexpand\textormath}}<br />
106 \DeclareOption{hyphenmap=off}{\chardef\bbl@hymapopt\z@}<br />
107 \DeclareOption{hyphenmap=first}{\chardef\bbl@hymapopt\@ne}<br />
108 \DeclareOption{hyphenmap=select}{\chardef\bbl@hymapopt\tw@}<br />
109 \DeclareOption{hyphenmap=other}{\chardef\bbl@hymapopt\thr@@}<br />
110 \DeclareOption{hyphenmap=other*}{\chardef\bbl@hymapopt4\relax}<br />
Handling of <strong>package</strong> options is done in three passes. (I [JBL] am not very happy<br />
<strong>with</strong> the idea, anyway.) The first one processes options which has been declared<br />
above or follow the syntax =, the second one loads the requested<br />
languages, except the main one if set <strong>with</strong> the key main, and the third one loads<br />
the latter. First, we “flag” valid keys <strong>with</strong> a nil value.<br />
111 \let\bbl@opt@shorthands\@nnil<br />
112 \let\bbl@opt@config\@nnil<br />
113 \let\bbl@opt@main\@nnil<br />
114 \let\bbl@opt@strings\@nnil<br />
115 \let\bbl@opt@headfoot\@nnil<br />
The following tool is defined temporarily to store the values of options.<br />
116 \def\bbl@tempa#1=#2\bbl@tempa{%<br />
117 \expandafter\ifx\csname bbl@opt@#1\endcsname\@nnil<br />
118 \expandafter\edef\csname bbl@opt@#1\endcsname{#2}%<br />
119 \else<br />
120 \bbl@error{%<br />
121 Bad option ‘#1=#2’. Either you have misspelled the\\%<br />
122 key or there is a previous setting of ‘#1’}{%<br />
123 Valid keys are ‘shorthands’, ‘config’, ‘strings’, ‘main’,\\%<br />
124 ‘headfoot’, ‘safe’, ‘math’}<br />
125 \fi}<br />
Now the option list is processed, taking into account only currently declared<br />
options (including those declared <strong>with</strong> a =), and = options (the<br />
<strong>for</strong>mer take precedence). Unrecognized options are saved in<br />
\bbl@language@opts, beca<strong>use</strong> they are language options.<br />
126 \let\bbl@language@opts\@empty<br />
127 \DeclareOption*{%<br />
128 \@expandtwoargs\in@{\string=}{\CurrentOption}%<br />
129 \ifin@<br />
130 \expandafter\bbl@tempa\CurrentOption\bbl@tempa<br />
131 \else<br />
132 \edef\bbl@language@opts{%<br />
133 \ifx\bbl@language@opts\@empty\else\bbl@language@opts,\fi<br />
134 \CurrentOption}%<br />
135 \fi}<br />
Now we finish the first pass (and start over).<br />
136 \ProcessOptions*<br />
6.3 Conditional loading of shorthands<br />
If there is no shorthands=, the original babel macros are left untouched,<br />
but if there is, these macros are wrapped (in babel.def) to define only those given.<br />
A bit of optimization: if there is no shorthands=, then \bbl@ifshorthands is<br />
always true, and it is always false if shorthands is empty. Also, some code makes<br />
sense only <strong>with</strong> shorthands=....<br />
137 \def\bbl@sh@string#1{%<br />
35