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.
269 {\bbl@tempa}%<br />
270 {\noexpand\bbl@load@language{\bbl@tempa}}}%<br />
271 \bbl@tempb}%<br />
272 \@empty}<br />
Now, we make sure an option is explicitly declared <strong>for</strong> any language set as global<br />
option, by checking if an ldf exists. The previous step was, in fact, somewhat<br />
redundant, but that way we minimize accesing the file system just to see if the<br />
option could be a language.<br />
273 \bbl@<strong>for</strong>\bbl@tempa\@classoptionslist{%<br />
274 \@ifundefined{ds@\bbl@tempa}%<br />
275 {\IfFileExists{\bbl@tempa.ldf}%<br />
276 {\edef\bbl@tempb{%<br />
277 \noexpand\DeclareOption<br />
278 {\bbl@tempa}%<br />
279 {\noexpand\bbl@load@language{\bbl@tempa}}}%<br />
280 \bbl@tempb}%<br />
281 \@empty}%<br />
282 \@empty}<br />
If a main language has been set, store it <strong>for</strong> the third pass.<br />
283 \ifx\bbl@opt@main\@nnil\else<br />
284 \expandafter<br />
285 \let\expandafter\bbl@loadmain\csname ds@\bbl@opt@main\endcsname<br />
286 \DeclareOption{\bbl@opt@main}{}<br />
287 \fi<br />
And we are done, beca<strong>use</strong> all options <strong>for</strong> this pass has been declared. Those<br />
already processed in the first pass are just ignored.<br />
The options have to be processed in the order in which the <strong>use</strong>r specified them<br />
(except, of course, global options, which L A T E X processes be<strong>for</strong>e):<br />
288 \def\After<strong>Babel</strong>Language#1{%<br />
289 \bbl@ifsamestring\CurrentOption{#1}{\global\bbl@add\bbl@afterlang}{}}<br />
290 \DeclareOption*{}<br />
291 \ProcessOptions*<br />
This finished the second pass. Now the third one begins, which loads the main<br />
language set <strong>with</strong> the key main. A warning is raised if the main language is not the<br />
same as the last named one, or if the value of the key main is not a language. Then<br />
execute directly the option (beca<strong>use</strong> it could be <strong>use</strong>d only in main). After loading<br />
all languages, we deactivate \After<strong>Babel</strong>Language.<br />
292 \ifx\bbl@opt@main\@nnil<br />
293 \edef\bbl@tempa{\@classoptionslist,\bbl@language@opts}<br />
294 \let\bbl@tempc\@empty<br />
295 \bbl@<strong>for</strong>\bbl@tempb\bbl@tempa{%<br />
296 \@expandtwoargs\in@{,\bbl@tempb,}{,\bbl@loaded,}%<br />
297 \ifin@\edef\bbl@tempc{\bbl@tempb}\fi}<br />
298 \def\bbl@tempa#1,#2\@nnil{\def\bbl@tempb{#1}}<br />
299 \expandafter\bbl@tempa\bbl@loaded,\@nnil<br />
300 \ifx\bbl@tempb\bbl@tempc\else<br />
301 \bbl@warning{%<br />
302 Last declared language option is ‘\bbl@tempc,\\%<br />
303 but the last processed one was ‘\bbl@tempb’.\\%<br />
304 The main language cannot be set as both a global\\%<br />
305 and a <strong>package</strong> option. Use ‘main=\bbl@tempc’ as\\%<br />
306 option. Reported}%<br />
307 \fi<br />
39