| 1 |
%% |
| 2 |
%% This is file `xebabel.def', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% babel.dtx (with options: `xetex') |
| 8 |
%% |
| 9 |
%% |
| 10 |
%% Copyright (C) 2012-2026 Javier Bezos and Johannes L. Braams. |
| 11 |
%% Copyright (C) 1989-2012 Johannes L. Braams and |
| 12 |
%% any individual authors listed elsewhere in this file. |
| 13 |
%% All rights reserved. |
| 14 |
%% |
| 15 |
%% |
| 16 |
%% This file is part of the Babel system. |
| 17 |
%% -------------------------------------- |
| 18 |
%% |
| 19 |
%% It may be distributed and/or modified under the |
| 20 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 21 |
%% of this license or (at your option) any later version. |
| 22 |
%% The latest version of this license is in |
| 23 |
%% http://www.latex-project.org/lppl.txt |
| 24 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 25 |
%% version 2003/12/01 or later. |
| 26 |
%% |
| 27 |
%% This work has the LPPL maintenance status "maintained". |
| 28 |
%% |
| 29 |
%% The Current Maintainer of this work is Javier Bezos. |
| 30 |
%% |
| 31 |
%% The list of derived (unpacked) files belonging to the distribution |
| 32 |
%% and covered by LPPL is defined by the unpacking scripts (with |
| 33 |
%% extension |.ins|) which are part of the distribution. |
| 34 |
%% |
| 35 |
\def\BabelStringsDefault{unicode} |
| 36 |
\let\xebbl@stop\relax |
| 37 |
\AddBabelHook{xetex}{encodedcommands}{% |
| 38 |
\def\bbl@tempa{#1}% |
| 39 |
\ifx\bbl@tempa\@empty |
| 40 |
\XeTeXinputencoding"bytes"% |
| 41 |
\else |
| 42 |
\XeTeXinputencoding"#1"% |
| 43 |
\fi |
| 44 |
\def\xebbl@stop{\XeTeXinputencoding"utf8"}} |
| 45 |
\AddBabelHook{xetex}{stopcommands}{% |
| 46 |
\xebbl@stop |
| 47 |
\let\xebbl@stop\relax} |
| 48 |
\def\bbl@input@classes{% Used in CJK intraspaces |
| 49 |
\input{load-unicode-xetex-classes.tex}% |
| 50 |
\let\bbl@input@classes\relax} |
| 51 |
\def\bbl@intraspace#1 #2 #3\@@{% |
| 52 |
\bbl@csarg\gdef{xeisp@\languagename}% |
| 53 |
{\XeTeXlinebreakskip #1em plus #2em minus #3em\relax}} |
| 54 |
\def\bbl@intrapenalty#1\@@{% |
| 55 |
\bbl@csarg\gdef{xeipn@\languagename}% |
| 56 |
{\XeTeXlinebreakpenalty #1\relax}} |
| 57 |
\def\bbl@provide@intraspace{% |
| 58 |
\bbl@xin@{/s}{/\bbl@cl{lnbrk}}% |
| 59 |
\ifin@\else\bbl@xin@{/c}{/\bbl@cl{lnbrk}}\fi |
| 60 |
\ifin@ |
| 61 |
\bbl@ifunset{bbl@intsp@\languagename}{}% |
| 62 |
{\expandafter\ifx\csname bbl@intsp@\languagename\endcsname\@empty\else |
| 63 |
\ifx\bbl@KVP@intraspace\@nnil |
| 64 |
\bbl@exp{% |
| 65 |
\\\bbl@intraspace\bbl@cl{intsp}\\\@@}% |
| 66 |
\fi |
| 67 |
\ifx\bbl@KVP@intrapenalty\@nnil |
| 68 |
\bbl@intrapenalty0\@@ |
| 69 |
\fi |
| 70 |
\fi |
| 71 |
\ifx\bbl@KVP@intraspace\@nnil\else % We may override the ini |
| 72 |
\expandafter\bbl@intraspace\bbl@KVP@intraspace\@@ |
| 73 |
\fi |
| 74 |
\ifx\bbl@KVP@intrapenalty\@nnil\else |
| 75 |
\expandafter\bbl@intrapenalty\bbl@KVP@intrapenalty\@@ |
| 76 |
\fi |
| 77 |
\bbl@exp{% |
| 78 |
\\\bbl@add\<extras\languagename>{% |
| 79 |
\XeTeXlinebreaklocale "\bbl@cl{tbcp}"% |
| 80 |
\<bbl@xeisp@\languagename>% |
| 81 |
\<bbl@xeipn@\languagename>}% |
| 82 |
\\\bbl@toglobal\<extras\languagename>% |
| 83 |
\\\bbl@add\<noextras\languagename>{% |
| 84 |
\XeTeXlinebreaklocale ""}% |
| 85 |
\\\bbl@toglobal\<noextras\languagename>}% |
| 86 |
\ifx\bbl@ispacesize\@undefined |
| 87 |
\gdef\bbl@ispacesize{\bbl@cl{xeisp}}% |
| 88 |
\ifx\AtBeginDocument\@notprerr |
| 89 |
\expandafter\@secondoftwo % to execute right now |
| 90 |
\fi |
| 91 |
\AtBeginDocument{\bbl@patchfont{\bbl@ispacesize}}% |
| 92 |
\fi}% |
| 93 |
\fi} |
| 94 |
\ifx\DisableBabelHook\@undefined\endinput\fi |
| 95 |
\let\bbl@set@renderer\relax |
| 96 |
\let\bbl@unset@renderer\relax |
| 97 |
\bbl@trace{Font handling with fontspec} |
| 98 |
\AddBabelHook{babel-fontspec}{afterextras}{\bbl@switchfont} |
| 99 |
\AddBabelHook{babel-fontspec}{beforestart}{\bbl@ckeckstdfonts} |
| 100 |
\DisableBabelHook{babel-fontspec} |
| 101 |
\@onlypreamble\babelfont |
| 102 |
\ifx\NewDocumentCommand\@undefined\else % Not plain |
| 103 |
\NewDocumentCommand\babelfont{O{}mO{}mO{}}{% |
| 104 |
\bbl@bblfont@o[#1]{#2}[#3,#5]{#4}} |
| 105 |
\fi |
| 106 |
\newcommand\bbl@bblfont@o[2][]{% 1=langs/scripts 2=fam |
| 107 |
\ifx\fontspec\@undefined |
| 108 |
\usepackage{fontspec}% |
| 109 |
\fi |
| 110 |
\EnableBabelHook{babel-fontspec}% |
| 111 |
\edef\bbl@tempa{#1}% |
| 112 |
\def\bbl@tempb{#2}% Used by \bbl@bblfont |
| 113 |
\bbl@bblfont} |
| 114 |
\newcommand\bbl@bblfont[2][]{% 1=features 2=fontname, @font=rm|sf|tt |
| 115 |
\bbl@ifunset{\bbl@tempb family}% |
| 116 |
{\bbl@providefam{\bbl@tempb}}% |
| 117 |
{}% |
| 118 |
% For the default font, just in case: |
| 119 |
\bbl@ifunset{bbl@lsys@\languagename}{\bbl@provide@lsys{\languagename}}{}% |
| 120 |
\expandafter\bbl@ifblank\expandafter{\bbl@tempa}% |
| 121 |
{\bbl@csarg\edef{\bbl@tempb dflt@}{<>{#1}{#2}}% save bbl@rmdflt@ |
| 122 |
\bbl@exp{% |
| 123 |
\let\<bbl@\bbl@tempb dflt@\languagename>\<bbl@\bbl@tempb dflt@>% |
| 124 |
\\\bbl@font@set\<bbl@\bbl@tempb dflt@\languagename>% |
| 125 |
\<\bbl@tempb default>\<\bbl@tempb family>}}% |
| 126 |
{\bbl@foreach\bbl@tempa{% i.e., bbl@rmdflt@lang / *scrt |
| 127 |
\bbl@csarg\def{\bbl@tempb dflt@##1}{<>{#1}{#2}}}}}% |
| 128 |
\def\bbl@providefam#1{% |
| 129 |
\bbl@exp{% |
| 130 |
\\\newcommand\<#1default>{}% Just define it |
| 131 |
\\\bbl@add@list\\\bbl@font@fams{#1}% |
| 132 |
\\\NewHook{#1family}% |
| 133 |
\\\DeclareRobustCommand\<#1family>{% |
| 134 |
\\\not@math@alphabet\<#1family>\relax |
| 135 |
% \\\prepare@family@series@update{#1}\<#1default>% TODO. Fails |
| 136 |
\\\fontfamily\<#1default>% |
| 137 |
\\\UseHook{#1family}% |
| 138 |
\\\selectfont}% |
| 139 |
\\\DeclareTextFontCommand{\<text#1>}{\<#1family>}}} |
| 140 |
\def\bbl@nostdfont#1{% |
| 141 |
\bbl@once{nostdfam-\f@family}% |
| 142 |
{\bbl@infowarn{The current font is not a babel standard family:\\% |
| 143 |
#1% |
| 144 |
\fontname\font\\% |
| 145 |
There is nothing intrinsically wrong, and you can\\%, |
| 146 |
ignore this message altogether if you do not need\\% |
| 147 |
this font. If they are used in the document, be aware\\% |
| 148 |
'babel' will not set Script and Language for it, so\\% |
| 149 |
you may consider defining a new family with \string\babelfont.\\% |
| 150 |
See the manual for further details about \string\babelfont. |
| 151 |
Reported}}% |
| 152 |
{}}% |
| 153 |
\gdef\bbl@switchfont{% |
| 154 |
\bbl@ifunset{bbl@lsys@\languagename}{\bbl@provide@lsys{\languagename}}{}% |
| 155 |
\bbl@exp{% e.g., Arabic -> arabic |
| 156 |
\lowercase{\edef\\\bbl@tempa{\bbl@cl{sname}}}}% |
| 157 |
\bbl@foreach\bbl@font@fams{% |
| 158 |
\bbl@ifunset{bbl@##1dflt@\languagename}% (1) language? |
| 159 |
{\bbl@ifunset{bbl@##1dflt@*\bbl@tempa}% (2) from script? |
| 160 |
{\bbl@ifunset{bbl@##1dflt@}% 2=F - (3) from generic? |
| 161 |
{}% 123=F - nothing! |
| 162 |
{\bbl@exp{% 3=T - from generic |
| 163 |
\global\let\<bbl@##1dflt@\languagename>% |
| 164 |
\<bbl@##1dflt@>}}}% |
| 165 |
{\bbl@exp{% 2=T - from script |
| 166 |
\global\let\<bbl@##1dflt@\languagename>% |
| 167 |
\<bbl@##1dflt@*\bbl@tempa>}}}% |
| 168 |
{}}% 1=T - language, already defined |
| 169 |
\def\bbl@tempa{\bbl@nostdfont{}}% |
| 170 |
\bbl@foreach\bbl@font@fams{% don't gather with prev for |
| 171 |
\bbl@ifunset{bbl@##1dflt@\languagename}% |
| 172 |
{\bbl@cs{famrst@##1}% |
| 173 |
\global\bbl@csarg\let{famrst@##1}\relax}% |
| 174 |
{\bbl@exp{% order is relevant. |
| 175 |
\\\bbl@add\\\originalTeX{% |
| 176 |
\\\bbl@font@rst{\bbl@cl{##1dflt}}% |
| 177 |
\<##1default>\<##1family>{##1}}% |
| 178 |
\\\bbl@font@set\<bbl@##1dflt@\languagename>% the main part! |
| 179 |
\<##1default>\<##1family>}}}% |
| 180 |
\bbl@ifrestoring{}{\bbl@tempa}}% |
| 181 |
\ifx\f@family\@undefined\else % if latex |
| 182 |
\ifcase\bbl@engine % if pdftex |
| 183 |
\let\bbl@ckeckstdfonts\relax |
| 184 |
\else |
| 185 |
\def\bbl@ckeckstdfonts{% |
| 186 |
\begingroup |
| 187 |
\global\let\bbl@ckeckstdfonts\relax |
| 188 |
\let\bbl@tempa\@empty |
| 189 |
\bbl@foreach\bbl@font@fams{% |
| 190 |
\bbl@ifunset{bbl@##1dflt@}% |
| 191 |
{\@nameuse{##1family}% |
| 192 |
\bbl@csarg\gdef{WFF@\f@family}{}% Flag |
| 193 |
\bbl@exp{\\\bbl@add\\\bbl@tempa{* \<##1family>= \f@family\\\\% |
| 194 |
\space\space\fontname\font\\\\}}% |
| 195 |
\bbl@csarg\xdef{##1dflt@}{\f@family}% |
| 196 |
\expandafter\xdef\csname ##1default\endcsname{\f@family}}% |
| 197 |
{}}% |
| 198 |
\ifx\bbl@tempa\@empty\else |
| 199 |
\bbl@infowarn{The following font families will use the default\\% |
| 200 |
settings for all or some languages:\\% |
| 201 |
\bbl@tempa |
| 202 |
There is nothing intrinsically wrong with it, but\\% |
| 203 |
'babel' will no set Script and Language, which could\\% |
| 204 |
be relevant in some languages. If your document uses\\% |
| 205 |
these families, consider redefining them with \string\babelfont.\\% |
| 206 |
Reported}% |
| 207 |
\fi |
| 208 |
\endgroup} |
| 209 |
\fi |
| 210 |
\fi |
| 211 |
\def\bbl@font@set#1#2#3{% e.g., \bbl@rmdflt@lang \rmdefault \rmfamily |
| 212 |
\bbl@xin@{<>}{#1}% |
| 213 |
\ifin@ |
| 214 |
\bbl@exp{\\\bbl@fontspec@set\\#1\expandafter\@gobbletwo#1\\#3}% |
| 215 |
\fi |
| 216 |
\bbl@exp{% 'Unprotected' macros return prev values |
| 217 |
\def\\#2{#1}% e.g., \rmdefault{\bbl@rmdflt@lang} |
| 218 |
\\\bbl@ifsamestring{#2}{\f@family}% |
| 219 |
{\\#3% |
| 220 |
\\\bbl@ifsamestring{\f@series}{\bfdefault}{\\\bfseries}{}% |
| 221 |
\let\\\bbl@tempa\relax}% |
| 222 |
{}}} |
| 223 |
\def\bbl@fontspec@set#1#2#3#4{% eg \bbl@rmdflt@lang fnt-opt fnt-nme \xxfamily |
| 224 |
\let\bbl@tempe\bbl@mapselect |
| 225 |
\edef\bbl@tempb{\bbl@stripslash#4/}% Catcodes hack (better pass it). |
| 226 |
\bbl@exp{\\\bbl@replace\\\bbl@tempb{\bbl@stripslash\family/}{}}% |
| 227 |
\let\bbl@mapselect\relax |
| 228 |
\let\bbl@temp@fam#4% e.g., '\rmfamily', to be restored below |
| 229 |
\let#4\@empty % Make sure \renewfontfamily is valid |
| 230 |
\bbl@set@renderer |
| 231 |
\bbl@exp{% |
| 232 |
\let\\\bbl@temp@pfam\<\bbl@stripslash#4\space>% e.g., '\rmfamily ' |
| 233 |
\<keys_if_exist:nnF>{fontspec-opentype}{Script/\bbl@cl{sname}}% |
| 234 |
{\\\newfontscript{\bbl@cl{sname}}{\bbl@cl{sotf}}}% |
| 235 |
\<keys_if_exist:nnF>{fontspec-opentype}{Language/\bbl@cl{lname}}% |
| 236 |
{\\\newfontlanguage{\bbl@cl{lname}}{\bbl@cl{lotf}}}% |
| 237 |
\\\renewfontfamily\\#4% |
| 238 |
[\bbl@cl{lsys},% xetex removes unknown features :-( |
| 239 |
\ifcase\bbl@engine\or RawFeature={family=\bbl@tempb},\fi |
| 240 |
#2]}{#3}% i.e., \bbl@exp{..}{#3} |
| 241 |
\bbl@unset@renderer |
| 242 |
\begingroup |
| 243 |
#4% |
| 244 |
\xdef#1{\f@family}% e.g., \bbl@rmdflt@lang{FreeSerif(0)} |
| 245 |
\endgroup |
| 246 |
\bbl@xin@{\string>\string s\string s\string u\string b\string*}% |
| 247 |
{\expandafter\meaning\csname TU/#1/bx/sc\endcsname}% |
| 248 |
\ifin@ |
| 249 |
\global\bbl@ccarg\let{TU/#1/bx/sc}{TU/#1/b/sc}% |
| 250 |
\fi |
| 251 |
\bbl@xin@{\string>\string s\string s\string u\string b\string*}% |
| 252 |
{\expandafter\meaning\csname TU/#1/bx/scit\endcsname}% |
| 253 |
\ifin@ |
| 254 |
\global\bbl@ccarg\let{TU/#1/bx/scit}{TU/#1/b/scit}% |
| 255 |
\fi |
| 256 |
\let#4\bbl@temp@fam |
| 257 |
\bbl@exp{\let\<\bbl@stripslash#4\space>}\bbl@temp@pfam |
| 258 |
\let\bbl@mapselect\bbl@tempe}% |
| 259 |
\def\bbl@font@rst#1#2#3#4{% |
| 260 |
\bbl@csarg\def{famrst@#4}{\bbl@font@set{#1}#2#3}} |
| 261 |
\def\bbl@font@fams{rm,sf,tt} |
| 262 |
\def\bbl@provide@extra#1{} |
| 263 |
\def\bbl@xenohyph@d{% |
| 264 |
\bbl@ifset{bbl@prehc@\languagename}% |
| 265 |
{\ifnum\hyphenchar\font=\defaulthyphenchar |
| 266 |
\iffontchar\font\bbl@cl{prehc}\relax |
| 267 |
\hyphenchar\font\bbl@cl{prehc}\relax |
| 268 |
\else\iffontchar\font"200B |
| 269 |
\hyphenchar\font"200B |
| 270 |
\else |
| 271 |
\bbl@warning |
| 272 |
{Neither 0 nor ZERO WIDTH SPACE are available\\% |
| 273 |
in the current font, and therefore the hyphen\\% |
| 274 |
will be printed. Try changing the fontspec's\\% |
| 275 |
'HyphenChar' to another value, but be aware\\% |
| 276 |
this setting is not safe (see the manual).\\% |
| 277 |
Reported}% |
| 278 |
\hyphenchar\font\defaulthyphenchar |
| 279 |
\fi\fi |
| 280 |
\fi}% |
| 281 |
{\hyphenchar\font\defaulthyphenchar}} |
| 282 |
\ifnum\xe@alloc@intercharclass<\thr@@ |
| 283 |
\xe@alloc@intercharclass\thr@@ |
| 284 |
\fi |
| 285 |
\chardef\bbl@xeclass@default@=\z@ |
| 286 |
\chardef\bbl@xeclass@cjkideogram@=\@ne |
| 287 |
\chardef\bbl@xeclass@cjkleftpunctuation@=\tw@ |
| 288 |
\chardef\bbl@xeclass@cjkrightpunctuation@=\thr@@ |
| 289 |
\chardef\bbl@xeclass@boundary@=4095 |
| 290 |
\chardef\bbl@xeclass@ignore@=4096 |
| 291 |
\AddBabelHook{babel-interchar}{beforeextras}{% |
| 292 |
\@nameuse{bbl@xechars@\languagename}} |
| 293 |
\DisableBabelHook{babel-interchar} |
| 294 |
\protected\def\bbl@charclass#1{% |
| 295 |
\ifnum\count@<\z@ |
| 296 |
\count@-\count@ |
| 297 |
\loop |
| 298 |
\bbl@exp{% |
| 299 |
\\\babel@savevariable{\XeTeXcharclass`\Uchar\count@}}% |
| 300 |
\XeTeXcharclass\count@ \bbl@tempc |
| 301 |
\ifnum\count@<`#1\relax |
| 302 |
\advance\count@\@ne |
| 303 |
\repeat |
| 304 |
\else |
| 305 |
\babel@savevariable{\XeTeXcharclass`#1}% |
| 306 |
\XeTeXcharclass`#1 \bbl@tempc |
| 307 |
\fi |
| 308 |
\count@`#1\relax} |
| 309 |
\newcommand\bbl@ifinterchar[1]{% |
| 310 |
\let\bbl@tempa\@gobble % Assume to ignore |
| 311 |
\edef\bbl@tempb{\zap@space#1 \@empty}% |
| 312 |
\ifx\bbl@KVP@interchar\@nnil\else |
| 313 |
\bbl@replace\bbl@KVP@interchar{ }{,}% |
| 314 |
\bbl@foreach\bbl@tempb{% |
| 315 |
\bbl@xin@{,##1,}{,\bbl@KVP@interchar,}% |
| 316 |
\ifin@ |
| 317 |
\let\bbl@tempa\@firstofone |
| 318 |
\fi}% |
| 319 |
\fi |
| 320 |
\bbl@tempa} |
| 321 |
\newcommand\IfBabelIntercharT[2]{% |
| 322 |
\bbl@carg\bbl@add{bbl@icsave@\CurrentOption}{\bbl@ifinterchar{#1}{#2}}}% |
| 323 |
\newcommand\babelcharclass[3]{% |
| 324 |
\EnableBabelHook{babel-interchar}% |
| 325 |
\bbl@csarg\newXeTeXintercharclass{xeclass@#2@#1}% |
| 326 |
\def\bbl@tempb##1{% |
| 327 |
\ifx##1\@empty\else |
| 328 |
\ifx##1-% |
| 329 |
\bbl@upto |
| 330 |
\else |
| 331 |
\bbl@charclass{% |
| 332 |
\ifcat\noexpand##1\relax\bbl@stripslash##1\else\string##1\fi}% |
| 333 |
\fi |
| 334 |
\expandafter\bbl@tempb |
| 335 |
\fi}% |
| 336 |
\bbl@ifunset{bbl@xechars@#1}% |
| 337 |
{\toks@{% |
| 338 |
\babel@savevariable\XeTeXinterchartokenstate |
| 339 |
\XeTeXinterchartokenstate\@ne |
| 340 |
}}% |
| 341 |
{\toks@\expandafter\expandafter\expandafter{% |
| 342 |
\csname bbl@xechars@#1\endcsname}}% |
| 343 |
\bbl@csarg\edef{xechars@#1}{% |
| 344 |
\the\toks@ |
| 345 |
\bbl@usingxeclass\csname bbl@xeclass@#2@#1\endcsname |
| 346 |
\bbl@tempb#3\@empty}} |
| 347 |
\protected\def\bbl@usingxeclass#1{\count@\z@ \let\bbl@tempc#1} |
| 348 |
\protected\def\bbl@upto{% |
| 349 |
\ifnum\count@>\z@ |
| 350 |
\advance\count@\@ne |
| 351 |
\count@-\count@ |
| 352 |
\else\ifnum\count@=\z@ |
| 353 |
\bbl@charclass{-}% |
| 354 |
\else |
| 355 |
\bbl@error{double-hyphens-class}{}{}{}% |
| 356 |
\fi\fi} |
| 357 |
\def\bbl@ignoreinterchar{% |
| 358 |
\ifnum\language=\l@nohyphenation |
| 359 |
\expandafter\@gobble |
| 360 |
\else |
| 361 |
\expandafter\@firstofone |
| 362 |
\fi} |
| 363 |
\newcommand\babelinterchar[5][]{% |
| 364 |
\let\bbl@kv@label\@empty |
| 365 |
\bbl@forkv{#1}{\bbl@csarg\edef{kv@##1}{##2}}% |
| 366 |
\@namedef{\zap@space bbl@xeinter@\bbl@kv@label @#3@#4@#2 \@empty}% |
| 367 |
{\bbl@ignoreinterchar{#5}}% |
| 368 |
\bbl@csarg\let{ic@\bbl@kv@label @#2}\@firstofone |
| 369 |
\bbl@exp{\\\bbl@for\\\bbl@tempa{\zap@space#3 \@empty}}{% |
| 370 |
\bbl@exp{\\\bbl@for\\\bbl@tempb{\zap@space#4 \@empty}}{% |
| 371 |
\XeTeXinterchartoks |
| 372 |
\@nameuse{bbl@xeclass@\bbl@tempa @% |
| 373 |
\bbl@ifunset{bbl@xeclass@\bbl@tempa @#2}{}{#2}} % |
| 374 |
\@nameuse{bbl@xeclass@\bbl@tempb @% |
| 375 |
\bbl@ifunset{bbl@xeclass@\bbl@tempb @#2}{}{#2}} % |
| 376 |
= \expandafter{% |
| 377 |
\csname bbl@ic@\bbl@kv@label @#2\expandafter\endcsname |
| 378 |
\csname\zap@space bbl@xeinter@\bbl@kv@label |
| 379 |
@#3@#4@#2 \@empty\endcsname}}}} |
| 380 |
\DeclareRobustCommand\enablelocaleinterchar[1]{% |
| 381 |
\bbl@ifunset{bbl@ic@#1@\languagename}% |
| 382 |
{\bbl@error{unknown-interchar}{#1}{}{}}% |
| 383 |
{\bbl@csarg\let{ic@#1@\languagename}\@firstofone}} |
| 384 |
\DeclareRobustCommand\disablelocaleinterchar[1]{% |
| 385 |
\bbl@ifunset{bbl@ic@#1@\languagename}% |
| 386 |
{\bbl@error{unknown-interchar-b}{#1}{}{}}% |
| 387 |
{\bbl@csarg\let{ic@#1@\languagename}\@gobble}} |
| 388 |
\providecommand\bbl@provide@intraspace{} |
| 389 |
\bbl@trace{Redefinitions for bidi layout} |
| 390 |
\ifx\bbl@opt@layout\@nnil\else % if layout=.. |
| 391 |
\IfBabelLayout{nopars} |
| 392 |
{} |
| 393 |
{\edef\bbl@opt@layout{\bbl@[email protected].}}% |
| 394 |
\def\bbl@startskip{\ifcase\bbl@thepardir\leftskip\else\rightskip\fi} |
| 395 |
\def\bbl@endskip{\ifcase\bbl@thepardir\rightskip\else\leftskip\fi} |
| 396 |
\ifnum\bbl@bidimode>\z@ |
| 397 |
\IfBabelLayout{pars} |
| 398 |
{\def\@hangfrom#1{% |
| 399 |
\setbox\@tempboxa\hbox{{#1}}% |
| 400 |
\hangindent\ifcase\bbl@thepardir\wd\@tempboxa\else-\wd\@tempboxa\fi |
| 401 |
\noindent\box\@tempboxa} |
| 402 |
\def\raggedright{% |
| 403 |
\let\\\@centercr |
| 404 |
\bbl@startskip\z@skip |
| 405 |
\@rightskip\@flushglue |
| 406 |
\bbl@endskip\@rightskip |
| 407 |
\parindent\z@ |
| 408 |
\parfillskip\bbl@startskip} |
| 409 |
\def\raggedleft{% |
| 410 |
\let\\\@centercr |
| 411 |
\bbl@startskip\@flushglue |
| 412 |
\bbl@endskip\z@skip |
| 413 |
\parindent\z@ |
| 414 |
\parfillskip\bbl@endskip}} |
| 415 |
{} |
| 416 |
\fi |
| 417 |
\IfBabelLayout{lists} |
| 418 |
{\bbl@sreplace\list |
| 419 |
{\@totalleftmargin\leftmargin}{\@totalleftmargin\bbl@listleftmargin}% |
| 420 |
\def\bbl@listleftmargin{% |
| 421 |
\ifcase\bbl@thepardir\leftmargin\else\rightmargin\fi}% |
| 422 |
\ifcase\bbl@engine |
| 423 |
\def\labelenumii{)\theenumii(}% pdftex doesn't reverse () |
| 424 |
\def\p@enumiii{\p@enumii)\theenumii(}% |
| 425 |
\fi |
| 426 |
\bbl@sreplace\@verbatim |
| 427 |
{\leftskip\@totalleftmargin}% |
| 428 |
{\bbl@startskip\textwidth |
| 429 |
\advance\bbl@startskip-\linewidth}% |
| 430 |
\bbl@sreplace\@verbatim |
| 431 |
{\rightskip\z@skip}% |
| 432 |
{\bbl@endskip\z@skip}}% |
| 433 |
{} |
| 434 |
\IfBabelLayout{contents} |
| 435 |
{\bbl@sreplace\@dottedtocline{\leftskip}{\bbl@startskip}% |
| 436 |
\bbl@sreplace\@dottedtocline{\rightskip}{\bbl@endskip}} |
| 437 |
{} |
| 438 |
\IfBabelLayout{columns} |
| 439 |
{\bbl@sreplace\@outputdblcol{\hb@xt@\textwidth}{\bbl@outputhbox}% |
| 440 |
\def\bbl@outputhbox#1{% |
| 441 |
\hb@xt@\textwidth{% |
| 442 |
\hskip\columnwidth |
| 443 |
\hfil |
| 444 |
{\normalcolor\vrule \@width\columnseprule}% |
| 445 |
\hfil |
| 446 |
\hb@xt@\columnwidth{\box\@leftcolumn \hss}% |
| 447 |
\hskip-\textwidth |
| 448 |
\hb@xt@\columnwidth{\box\@outputbox \hss}% |
| 449 |
\hskip\columnsep |
| 450 |
\hskip\columnwidth}}}% |
| 451 |
{} |
| 452 |
\IfBabelLayout{counters*}% |
| 453 |
{\bbl@add\bbl@opt@layout{.counters.}% |
| 454 |
\AddToHook{shipout/before}{% |
| 455 |
\let\bbl@tempa\babelsublr |
| 456 |
\let\babelsublr\@firstofone |
| 457 |
\let\bbl@save@thepage\thepage |
| 458 |
\protected@edef\thepage{\thepage}% |
| 459 |
\let\babelsublr\bbl@tempa}% |
| 460 |
\AddToHook{shipout/after}{% |
| 461 |
\let\thepage\bbl@save@thepage}}{} |
| 462 |
\IfBabelLayout{counters}% |
| 463 |
{\let\bbl@latinarabic=\@arabic |
| 464 |
\def\@arabic#1{\babelsublr{\bbl@latinarabic#1}}% |
| 465 |
\let\bbl@asciiroman=\@roman |
| 466 |
\def\@roman#1{\babelsublr{\ensureascii{\bbl@asciiroman#1}}}% |
| 467 |
\let\bbl@asciiRoman=\@Roman |
| 468 |
\def\@Roman#1{\babelsublr{\ensureascii{\bbl@asciiRoman#1}}}}{} |
| 469 |
\fi % end if layout |
| 470 |
\endinput |
| 471 |
%% |
| 472 |
%% End of file `xebabel.def'. |