| 1 |
%% |
| 2 |
%% This is file `microtype-luatex.def', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% microtype.dtx (with options: `lua-') |
| 8 |
%% |
| 9 |
%% ------------------------------------------------------------------------ |
| 10 |
%% |
| 11 |
%% The `microtype' package |
| 12 |
%% Subliminal refinements towards typographical perfection |
| 13 |
%% Copyright (c) 2004--2026 R Schlicht <[email protected]> |
| 14 |
%% |
| 15 |
%% This work may be distributed and/or modified under the conditions of the |
| 16 |
%% LaTeX Project Public License, either version 1.3c of this license or (at |
| 17 |
%% your option) any later version. The latest version of this license is in: |
| 18 |
%% https://www.latex-project.org/lppl.txt, and version 1.3c or later is part |
| 19 |
%% of all distributions of LaTeX version 2005/12/01 or later. |
| 20 |
%% |
| 21 |
%% This work has the LPPL maintenance status `maintained'. |
| 22 |
%% |
| 23 |
%% This work consists of the files microtype.dtx, microtype-utf.dtx and |
| 24 |
%% microtype.ins and the derived files microtype.sty, microtype-pdftex.def, |
| 25 |
%% microtype-luatex.def, microtype-xetex.def, microtype.lua, letterspace.sty |
| 26 |
%% and microtype-show.sty. |
| 27 |
%% |
| 28 |
%% ------------------------------------------------------------------------ |
| 29 |
%% This file contains enginge-specific definitions. |
| 30 |
%% ------------------------------------------------------------------------ |
| 31 |
%% |
| 32 |
\ProvidesFile |
| 33 |
{microtype-luatex.def} |
| 34 |
[2026/03/01 v3.2d |
| 35 |
Definitions specific to |
| 36 |
luatex |
| 37 |
(RS)] |
| 38 |
\let\MT@lua\directlua |
| 39 |
\def\MT@luatex@no{6} |
| 40 |
\ifnum\luatexversion<110 |
| 41 |
\def\MT@luatex@no{5} |
| 42 |
\ifnum\luatexversion<90 |
| 43 |
\def\MT@luatex@no{4} |
| 44 |
\ifnum\luatexversion<85 |
| 45 |
\def\MT@luatex@no{3} |
| 46 |
\ifnum\luatexversion<62 |
| 47 |
\def\MT@luatex@no{2} |
| 48 |
\ifnum\luatexversion<36 |
| 49 |
\def\MT@lua{\directlua0} |
| 50 |
\def\MT@luatex@no{1} |
| 51 |
\fi |
| 52 |
\fi |
| 53 |
\fi |
| 54 |
\fi |
| 55 |
\fi |
| 56 |
\def |
| 57 |
\MT@requires@luatex% |
| 58 |
#1{\ifnum |
| 59 |
\MT@luatex@no |
| 60 |
<#1 \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi} |
| 61 |
\IfFormatAtLeastTF{2016/01/01}\relax{\RequirePackage{luatexbase}} |
| 62 |
\IfFormatAtLeastTF{2017/01/01}\relax{\RequirePackage{luaotfload}} |
| 63 |
\MT@lua{require("microtype")} |
| 64 |
\MT@requires@luatex6{\let\MT@glet\glet}\relax |
| 65 |
\def\MT@ifint#1{\csname\MT@lua{microtype.if_int([[#1]])}\endcsname} |
| 66 |
\def\MT@ifdimen#1{\csname\MT@lua{microtype.if_dimen([[#1]])}\endcsname} |
| 67 |
\def\MT@ifstreq#1#2{\csname\MT@lua{microtype.if_str_eq([[#1]],[[#2]])}\endcsname} |
| 68 |
\MT@check@MT@version |
| 69 |
{\MT@lua{tex.write(microtype.module['date'] .. ' v' .. microtype.module['version'])}} |
| 70 |
{\[email protected]} |
| 71 |
\def\MT@if@opentype@font{\csname\MT@lua{% |
| 72 |
microtype.if_opentype_font() |
| 73 |
}\endcsname |
| 74 |
} |
| 75 |
\def\MT@do@font#1{% |
| 76 |
\MT@if@opentype@font{% |
| 77 |
\def\MT@dofont@function{#1}% |
| 78 |
\MT@lua{microtype.do_font()}% |
| 79 |
}{\MT@while@num\z@\@cclvi{#1}}% |
| 80 |
} |
| 81 |
\def\MT@ledmac@setup{% |
| 82 |
\ifMT@protrusion |
| 83 |
\MT@ifdefined@c@TF\l@dunhbox@line{% |
| 84 |
\MT@info@nl{Patching ((r)e)ledmac to enable character protrusion}% |
| 85 |
\let\MT@led@unhbox@line\l@dunhbox@line |
| 86 |
\renewcommand*{\l@dunhbox@line}[1]{% |
| 87 |
\ifhbox##1% |
| 88 |
\kern\leftmarginkern##1% |
| 89 |
\expandafter\MT@led@unhbox@line\expandafter##1\expandafter |
| 90 |
\kern\rightmarginkern##1% |
| 91 |
\fi |
| 92 |
}% |
| 93 |
}{% |
| 94 |
\MT@warning@nl{% |
| 95 |
Character protrusion in paragraphs with line\MessageBreak |
| 96 |
numbering will only work if you update ledmac,\MessageBreak |
| 97 |
or use one of its successors, eledmac or reledmac}% |
| 98 |
}% |
| 99 |
\fi |
| 100 |
} |
| 101 |
\def\MT@varwidth@setup{% |
| 102 |
\ifMT@protrusion |
| 103 |
^^Q \MT@warning@nl{Cannot patch varwidth without etex extensions}% |
| 104 |
^^X \MT@info@nl{Patching varwidth to enable character protrusion}% |
| 105 |
^^X \newdimen\MT@vwid@leftmargin |
| 106 |
^^X \newdimen\MT@vwid@rightmargin |
| 107 |
^^X \patchcmd\@vwid@sift{\sift@deathcycles\z@} |
| 108 |
^^X {\ifhbox\z@ \MT@vwid@leftmargin\leftmarginkern\z@ |
| 109 |
^^X \MT@vwid@rightmargin\rightmarginkern\z@\fi \sift@deathcycles\z@}{}{}% |
| 110 |
^^X \patchcmd\@vwid@resetb{\kern\@vwid@loff \unhbox\z@} |
| 111 |
^^X {\kern\@vwid@loff \ifdim\MT@vwid@leftmargin=\z@\else\kern\MT@vwid@leftmargin\fi |
| 112 |
^^X \unhbox\z@ \ifdim\MT@vwid@rightmargin=\z@\else\kern\MT@vwid@rightmargin\fi}{}{}% |
| 113 |
^^X \patchcmd\@vwid@measure{\kern\@vwid@loff \unhbox\z@} |
| 114 |
^^X {\kern\@vwid@loff \ifdim\MT@vwid@leftmargin=\z@\else\kern\MT@vwid@leftmargin\fi |
| 115 |
^^X \unhbox\z@ \ifdim\MT@vwid@rightmargin=\z@\else\kern\MT@vwid@rightmargin\fi}{}{}% |
| 116 |
\fi |
| 117 |
} |
| 118 |
\def\MT@setupfont{% |
| 119 |
\MT@font |
| 120 |
\MT@setupfont@hook} |
| 121 |
\g@addto@macro\MT@setupfont\MT@copy@font |
| 122 |
\g@addto@macro\MT@setupfont{% |
| 123 |
\MT@exp@two@c\MT@split@name\string\MT@font/\@nil |
| 124 |
\MT@exp@one@n\MT@find@file\MT@family |
| 125 |
\ifx\MT@familyalias\@empty \else |
| 126 |
\MT@exp@one@n\MT@find@file\MT@familyalias\fi |
| 127 |
} |
| 128 |
\MT@requires@luatex3 |
| 129 |
{ |
| 130 |
\g@addto@macro\MT@setupfont\MT@tracking |
| 131 |
}\relax |
| 132 |
\g@addto@macro\MT@setupfont{% |
| 133 |
\MT@check@font |
| 134 |
\ifMT@inlist@ |
| 135 |
\else |
| 136 |
\MT@vinfo{Setting up font `\MT@@font'\on@line}% |
| 137 |
\MT@info@notracking |
| 138 |
\MT@protrusion |
| 139 |
\MT@expansion |
| 140 |
} |
| 141 |
\g@addto@macro\MT@setupfont\MT@noligatures |
| 142 |
\g@addto@macro\MT@setupfont{% |
| 143 |
\MT@register@font |
| 144 |
\fi |
| 145 |
} |
| 146 |
\let\MT@copy@font\relax |
| 147 |
\def\MT@copy@font@{% |
| 148 |
\xdef\MT@font@copy{\csname\MT@@font/\MT@pr@context/\MT@ex@context\endcsname}% |
| 149 |
\expandafter\ifx\MT@font@copy\relax |
| 150 |
\edef\MT@font@orig{\csname\expandafter\string\font@name @orig\endcsname}% |
| 151 |
\expandafter\ifx\MT@font@orig\relax |
| 152 |
\MT@exp@two@c\MT@glet\MT@font@orig\font@name |
| 153 |
\else |
| 154 |
\MT@exp@two@c\let\font@name\MT@font@orig |
| 155 |
\fi |
| 156 |
\MT@exp@two@c\MT@lua@copyfont\meaning\font@name\@nil |
| 157 |
\MT@map@clist@c\MT@active@features{% |
| 158 |
\MT@exp@cs\ifx{MT@\@nameuse{MT@abbr@##1}}\relax\else |
| 159 |
\def\@tempa{##1}% |
| 160 |
\MT@exp@cs\MT@map@tlist@c{MT@##1@doc@contexts}\MT@rem@from@list |
| 161 |
\fi |
| 162 |
}% |
| 163 |
\fi |
| 164 |
\MT@exp@two@c\let\MT@font\MT@font@copy |
| 165 |
\let\font@name\MT@font@copy |
| 166 |
\aftergroup\let\aftergroup\font@name\aftergroup\MT@font@copy |
| 167 |
} |
| 168 |
\def\MT@rem@from@list#1{% |
| 169 |
\MT@exp@cs\ifx{MT@\@tempa @#1font@list}\relax\else |
| 170 |
\expandafter\MT@exp@one@n\expandafter\MT@rem@from@clist\expandafter |
| 171 |
\MT@font \csname MT@\@tempa @#1font@list\endcsname |
| 172 |
\fi |
| 173 |
} |
| 174 |
\def\MT@lua@copyfont #1 #2 #3\@nil{% |
| 175 |
\global\expandafter\font\MT@font@copy=#3\relax} |
| 176 |
\def\MT@fix@fontdimen@six{% |
| 177 |
\ifnum\fontdimen6\MT@font=\z@ |
| 178 |
\fontdimen6\MT@font=% |
| 179 |
\MT@requires@luatex4{\ifnum\outputmode=\@ne \pdffeedback fontsize\else |
| 180 |
\MT@size pt% |
| 181 |
\expandafter\@gobble\fi}{\pdffontsize}\MT@font |
| 182 |
\MT@info{Fixing zero \@backslashchar fontdimen 6 for font `\MT@@font'\MessageBreak |
| 183 |
(new value: \the\fontdimen6\MT@font)}% |
| 184 |
\fi |
| 185 |
\edef\MT@dimen@six{\number\fontdimen6\MT@font}% |
| 186 |
} |
| 187 |
\def\MT@set@pr@codes |
| 188 |
{% |
| 189 |
\MT@nofamilyfalse |
| 190 |
\MT@if@list@exists{% |
| 191 |
\ifMT@nofamily |
| 192 |
\MT@ifdefined@n@TF{\MT@encoding-\MT@family-settings}\relax{% |
| 193 |
\MT@info@nl{Loading generic protrusion settings for font family\MessageBreak |
| 194 |
`\MT@family' (encoding: \MT@encoding).\MessageBreak |
| 195 |
For optimal results, create family-specific settings.\MessageBreak |
| 196 |
See the microtype manual for details}% |
| 197 |
\MT@glet@nc{\MT@encoding-\MT@family-settings}\@empty |
| 198 |
}% |
| 199 |
\fi |
| 200 |
\MT@get@opt |
| 201 |
\MT@reset@pr@codes |
| 202 |
\MT@get@inh@list |
| 203 |
\MT@set@inputenc{c}% |
| 204 |
\MT@load@list\MT@pr@c@name |
| 205 |
\MT@set@listname |
| 206 |
\MT@let@cn\@tempc{MT@pr@c@\MT@pr@c@name}% |
| 207 |
\expandafter\MT@set@codes\@tempc,\relax,% |
| 208 |
\MT@set@pr@prefixheirs |
| 209 |
}% |
| 210 |
\MT@reset@pr@codes |
| 211 |
} |
| 212 |
\def\MT@set@all@pr#1#2{% |
| 213 |
\let\MT@temp\@empty |
| 214 |
\MT@ifempty{#1}\relax{\g@addto@macro\MT@temp{\lpcode\MT@font\@tempcnta=#1}}% |
| 215 |
\MT@ifempty{#2}\relax{\g@addto@macro\MT@temp{\rpcode\MT@font\@tempcnta=#2}}% |
| 216 |
\MT@do@font\MT@temp |
| 217 |
} |
| 218 |
\def\MT@reset@pr@codes@{\MT@set@all@pr\z@\z@} |
| 219 |
\let\MT@reset@pr@codes\relax |
| 220 |
\def\MT@the@pr@code{\@tempcntb} |
| 221 |
\MT@requires@luatex3 |
| 222 |
{\def\MT@the@pr@code@tr{% |
| 223 |
\numexpr\@tempcntb+\MT@letterspace@/2\relax |
| 224 |
} |
| 225 |
}\relax |
| 226 |
\def\MT@set@codes#1,{% |
| 227 |
\ifx\relax#1\@empty\else |
| 228 |
\MT@split@codes #1==\relax |
| 229 |
\expandafter\MT@set@codes |
| 230 |
\fi |
| 231 |
} |
| 232 |
\def\MT@split@codes#1=#2=#3\relax{% |
| 233 |
\def\@tempa{#1}% |
| 234 |
\ifx\@tempa\@empty \else |
| 235 |
\MT@get@slot |
| 236 |
\ifnum\MT@char > \m@ne |
| 237 |
\MT@get@char@unit |
| 238 |
\csname MT@\MT@feat @split@val\endcsname#2\relax |
| 239 |
\fi |
| 240 |
\fi |
| 241 |
} |
| 242 |
\def\MT@pr@split@val#1,#2\relax |
| 243 |
{\def\@tempb{#1}% |
| 244 |
\MT@ifempty\@tempb |
| 245 |
\relax |
| 246 |
{\MT@scale@to@em |
| 247 |
\lpcode\MT@font\MT@char=\MT@the@pr@code |
| 248 |
}% |
| 249 |
\def\@tempb{#2}% |
| 250 |
\MT@ifempty\@tempb |
| 251 |
\relax |
| 252 |
{\MT@scale@to@em |
| 253 |
\rpcode\MT@font\MT@char=\MT@the@pr@code |
| 254 |
}% |
| 255 |
\MT@ifdefined@c@T\MT@pr@inh@name{% |
| 256 |
\MT@ifdefined@n@T{MT@inh@\MT@pr@inh@name @\MT@char @}{% |
| 257 |
\MT@exp@cs\MT@map@tlist@c |
| 258 |
{MT@inh@\MT@pr@inh@name @\MT@char @}% |
| 259 |
\MT@set@pr@heirs |
| 260 |
}% |
| 261 |
}% |
| 262 |
} |
| 263 |
\def\MT@scale@to@em{% |
| 264 |
\@tempcntb=\MT@count\relax |
| 265 |
\MT@scale\@tempcntb \@tempb \MT@dimen@six |
| 266 |
\ifnum\@tempcntb=\z@ \else |
| 267 |
\MT@scale@factor |
| 268 |
\fi |
| 269 |
} |
| 270 |
\def\MT@get@charwd{% |
| 271 |
\MT@count=\fontcharwd\MT@font\MT@char\relax |
| 272 |
\ifnum\MT@count=\z@ \MT@info@missing@char \fi |
| 273 |
} |
| 274 |
\def\MT@set@pr@prefixes#1{\MT@set@pr@prefixes@#1} |
| 275 |
\def\MT@set@pr@prefixes@#1#2#3#4% |
| 276 |
{% |
| 277 |
\@tempcnta=\z@ |
| 278 |
\ifnum#3>\z@ |
| 279 |
\@tempcnta=\numexpr |
| 280 |
(\fontcharwd\MT@font#2-\fontcharwd\MT@font#1)% |
| 281 |
*#3/\MT@dimen@six\relax |
| 282 |
\fi |
| 283 |
\lpcode\MT@font #2=\numexpr\lpcode\MT@font#1+\@tempcnta\relax |
| 284 |
\@tempcnta=\z@ |
| 285 |
\ifnum#4>\z@ |
| 286 |
\@tempcnta=\numexpr |
| 287 |
(\fontcharwd\MT@font#2-\fontcharwd\MT@font#1)% |
| 288 |
*#4/\MT@dimen@six\relax |
| 289 |
\fi |
| 290 |
\rpcode\MT@font #2=\numexpr\rpcode\MT@font#1+\@tempcnta\relax |
| 291 |
} |
| 292 |
\def\MT@prot@addtoken@next#1{% |
| 293 |
\MT@toks\expandafter{\the\MT@toks#1}% |
| 294 |
\setbox\MT@tempbox\hbox{% |
| 295 |
\begingroup |
| 296 |
\let\maybe@ic\relax |
| 297 |
\MT@exp@one@n\MT@maybe@textcmd{\the\MT@toks}% |
| 298 |
\endgroup |
| 299 |
}\setbox\MT@tempbox\hbox{\unhbox\MT@tempbox |
| 300 |
\ifnum\lastnodetype=7 \aftergroup\@firstoftwo\else\aftergroup\@secondoftwo\fi}% |
| 301 |
\MT@prot@get@nexttoken |
| 302 |
{\MT@exp@one@n\MT@prot@l{\the\MT@toks}}% |
| 303 |
} |
| 304 |
\def\MT@expansion{\MT@maybe@do{ex}} |
| 305 |
\def\MT@set@ex@codes@s{% |
| 306 |
\MT@if@list@exists{% |
| 307 |
\MT@get@ex@opt |
| 308 |
\let\MT@get@char@unit\relax |
| 309 |
\MT@reset@ef@codes |
| 310 |
\MT@get@inh@list |
| 311 |
\MT@set@inputenc{c}% |
| 312 |
\MT@load@list\MT@ex@c@name |
| 313 |
\MT@set@listname |
| 314 |
\MT@let@cn\@tempc{MT@ex@c@\MT@ex@c@name}% |
| 315 |
\expandafter\MT@set@codes\@tempc,\relax,% |
| 316 |
\MT@expandfont |
| 317 |
}\relax |
| 318 |
} |
| 319 |
\def\MT@set@ex@codes@n{% |
| 320 |
\MT@nonselectedtrue |
| 321 |
\MT@if@list@exists |
| 322 |
\MT@get@ex@opt |
| 323 |
{% |
| 324 |
\let\MT@stretch@ \MT@stretch |
| 325 |
\let\MT@shrink@ \MT@shrink |
| 326 |
\let\MT@step@ \MT@step |
| 327 |
\let\MT@auto@ \MT@auto |
| 328 |
\let\MT@ex@factor@\MT@ex@factor |
| 329 |
}% |
| 330 |
\MT@reset@ef@codes |
| 331 |
\MT@expandfont |
| 332 |
\MT@nonselectedfalse |
| 333 |
} |
| 334 |
\let\MT@set@ex@codes\MT@set@ex@codes@n |
| 335 |
\MT@requires@luatex3{ |
| 336 |
\MT@requires@luatex4{\let\pdffontexpand\expandglyphsinfont}\relax |
| 337 |
\ifnum\luatexversion<79 |
| 338 |
\def\MT@expandfont{% |
| 339 |
\pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@ autoexpand\relax |
| 340 |
} |
| 341 |
\else |
| 342 |
\def\MT@expandfont{% |
| 343 |
\pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@\relax |
| 344 |
} |
| 345 |
\fi |
| 346 |
}{ |
| 347 |
\def\MT@expandfont{% |
| 348 |
\pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@ \MT@auto@\relax |
| 349 |
} |
| 350 |
} |
| 351 |
\def\MT@set@all@ex#1{% |
| 352 |
\MT@do@font{\efcode\MT@font\@tempcnta=#1\relax}% |
| 353 |
} |
| 354 |
\def\MT@reset@ef@codes@{\MT@set@all@ex\MT@ex@factor@} |
| 355 |
\MT@requires@luatex5 |
| 356 |
{ |
| 357 |
\def\MT@reset@ef@codes{% |
| 358 |
\ifnum\MT@ex@factor@=\@m \else |
| 359 |
\MT@reset@ef@codes@ |
| 360 |
\fi |
| 361 |
} |
| 362 |
}{ |
| 363 |
\let\MT@reset@ef@codes\MT@reset@ef@codes@ |
| 364 |
} |
| 365 |
\def\MT@ex@split@val#1\relax{% |
| 366 |
\@tempcntb=#1\relax |
| 367 |
\ifnum\MT@ex@factor@=\@m \else |
| 368 |
\MT@scale\@tempcntb \MT@ex@factor@ \@m |
| 369 |
\fi |
| 370 |
\ifnum\@tempcntb > \MT@ex@max |
| 371 |
\MT@warn@ex@too@large\MT@ex@max |
| 372 |
\else |
| 373 |
\ifnum\@tempcntb < \MT@ex@min |
| 374 |
\MT@warn@ex@too@large\MT@ex@min |
| 375 |
\fi |
| 376 |
\fi |
| 377 |
\efcode\MT@font\MT@char=\@tempcntb |
| 378 |
\MT@ifdefined@c@T\MT@ex@inh@name{% |
| 379 |
\MT@ifdefined@n@T{MT@inh@\MT@ex@inh@name @\MT@char @}{% |
| 380 |
\MT@exp@cs\MT@map@tlist@c{MT@inh@\MT@ex@inh@name @\MT@char @}\MT@set@ex@heirs |
| 381 |
}% |
| 382 |
}% |
| 383 |
} |
| 384 |
\def\MT@warn@ex@too@large#1{% |
| 385 |
\MT@warning@nl{Expansion factor \number\@tempcntb\space too large for |
| 386 |
character\MessageBreak `\the\MT@toks' in \MT@curr@list@name.\MessageBreak |
| 387 |
Setting it to the maximum of \number#1}% |
| 388 |
\@tempcntb=#1\relax |
| 389 |
} |
| 390 |
\def\MT@get@ex@opt{% |
| 391 |
\MT@set@listname |
| 392 |
\MT@ifdefined@n@TF{MT@ex@c@\MT@ex@c@name @factor}{% |
| 393 |
\MT@let@cn\MT@ex@factor@{MT@ex@c@\MT@ex@c@name @factor}% |
| 394 |
\MT@vinfo{... : Multiplying expansion factors by \number\MT@ex@factor@/1000}% |
| 395 |
}{% |
| 396 |
\let\MT@ex@factor@\MT@ex@factor |
| 397 |
}% |
| 398 |
\MT@get@ex@opt@{stretch}{Setting stretch limit to \number\MT@stretch@}% |
| 399 |
\MT@get@ex@opt@{shrink} {Setting shrink limit to \number\MT@shrink@}% |
| 400 |
\MT@get@ex@opt@{step} {Setting expansion step to \number\MT@step@}% |
| 401 |
\MT@requires@luatex3\relax{% |
| 402 |
\MT@get@ex@opt@{auto}{\MT@ifstreq{\MT@auto@}{autoexpand}{En}{Dis}abling automatic expansion}% |
| 403 |
}% |
| 404 |
\MT@ifdefined@n@T{MT@ex@c@\MT@ex@c@name @preset}{% |
| 405 |
\MT@preset@ex |
| 406 |
\let\MT@reset@ef@codes\relax |
| 407 |
}% |
| 408 |
} |
| 409 |
\def\MT@get@ex@opt@#1#2{% |
| 410 |
\MT@ifdefined@n@TF{MT@ex@c@\MT@ex@c@name @#1}{% |
| 411 |
\MT@let@nn{MT@#1@}{MT@ex@c@\MT@ex@c@name @#1}% |
| 412 |
\MT@vinfo{... : #2}% |
| 413 |
}{% |
| 414 |
\MT@let@nn{MT@#1@}{MT@#1}% |
| 415 |
}% |
| 416 |
} |
| 417 |
\def\MT@set@ex@heirs#1{% |
| 418 |
\efcode\MT@font#1=\efcode\MT@font\MT@char |
| 419 |
} |
| 420 |
\def\MT@preset@ex{% |
| 421 |
\@tempcntb=\csname MT@ex@c@\MT@ex@c@name @preset\endcsname\relax |
| 422 |
\MT@scale@factor |
| 423 |
\MT@set@all@ex\@tempcntb |
| 424 |
} |
| 425 |
\MT@requires@luatex3 |
| 426 |
{ |
| 427 |
\let\MT@tr@font@list\@empty |
| 428 |
\def\MT@tracking@{% |
| 429 |
\MT@exp@one@n\MT@in@clist\MT@font\MT@tr@font@list |
| 430 |
\ifMT@inlist@\else |
| 431 |
\MT@maybe@do{tr}% |
| 432 |
\ifMT@do\else |
| 433 |
\xdef\MT@tr@font@list{\MT@tr@font@list\MT@font,}% |
| 434 |
\fi |
| 435 |
\fi |
| 436 |
} |
| 437 |
\let\MT@tracking |
| 438 |
\MT@tracking@ |
| 439 |
\def\MT@set@tr@codes{% |
| 440 |
\MT@vinfo{Tracking font `\MT@@font'\on@line}% |
| 441 |
\MT@if@list@exists |
| 442 |
\MT@get@tr@opt |
| 443 |
\relax |
| 444 |
\MT@ifdefined@c@TF\MT@letterspace@\relax{\let\MT@letterspace@\MT@letterspace}% |
| 445 |
\ifnum\MT@letterspace@=\z@ |
| 446 |
\MT@set@tr@zero |
| 447 |
\else |
| 448 |
\MT@vinfo{... Tracking by \number\MT@letterspace@}% |
| 449 |
\MT@warn@tracking@DVI |
| 450 |
\xdef\MT@lsfont{\csname\expandafter\string\font@name |
| 451 |
/\number\MT@letterspace@ ls\endcsname}% |
| 452 |
\expandafter\ifx\MT@lsfont\relax |
| 453 |
\MT@get@ls@basefont |
| 454 |
\MT@if@opentype@font{% |
| 455 |
\let\MT@tr@features\@empty |
| 456 |
\MT@ifdefined@c@T\MT@tr@feat\MT@tr@set@features |
| 457 |
\global\expandafter\font\MT@lsfont=\MT@ls@fontspec@font |
| 458 |
}{% |
| 459 |
\MT@ifdefined@c@T\MT@tr@feat |
| 460 |
{\MT@warning{\MT@@font\space is a legacy font.\MessageBreak |
| 461 |
Cannot disable Opentype `features' in \MT@curr@list@name}}% |
| 462 |
\global\expandafter\letterspacefont\MT@lsfont\font@name\MT@letterspace@ |
| 463 |
}% |
| 464 |
\MT@ifdefined@c@TF\MT@tr@ispace |
| 465 |
{\let\@tempa\MT@tr@ispace}% |
| 466 |
{\edef\@tempa{\MT@letterspace@*,,}}% |
| 467 |
\MT@ifdefined@c@TF\MT@tr@ospace |
| 468 |
{\edef\@tempa{\@tempa,\MT@tr@ospace}}% |
| 469 |
{\edef\@tempa{\@tempa,,,}}% |
| 470 |
\expandafter\MT@tr@set@space\@tempa,% |
| 471 |
\MT@ifdefined@c@TF\MT@tr@okern{\let\@tempa\MT@tr@okern}{\def\@tempa{*,*}}% |
| 472 |
\expandafter\MT@tr@set@okern\@tempa,% |
| 473 |
\MT@ifdefined@c@T\MT@tr@ligatures\MT@tr@noligatures |
| 474 |
\MT@if@opentype@font\relax{% |
| 475 |
\MT@do@font{\lpcode\MT@lsfont\@tempcnta=\numexpr\MT@letterspace@/2\relax |
| 476 |
\rpcode\MT@lsfont\@tempcnta=\numexpr\MT@letterspace@/2\relax}% |
| 477 |
\let\MT@the@pr@code\MT@the@pr@code@tr |
| 478 |
}% |
| 479 |
\fi |
| 480 |
\aftergroup\MT@set@lsfont |
| 481 |
\let\MT@font\MT@lsfont |
| 482 |
\MT@if@opentype@font\MT@font\relax |
| 483 |
\xdef\MT@set@curr@ls{\def\noexpand\MT@curr@ls{\MT@letterspace@}}% |
| 484 |
\aftergroup\MT@set@curr@ls |
| 485 |
\MT@outer@space=\csname MT@outer@space\expandafter\string\font@name\endcsname\relax |
| 486 |
\xdef\MT@set@curr@os{\MT@outer@space=\the\MT@outer@space\relax}% |
| 487 |
\MT@tr@outer@l |
| 488 |
\ifx\MT@ls@adjust\@empty |
| 489 |
\MT@outer@kern=-\dimexpr\MT@letterspace@ sp * \fontdimen6\font@name/2000\relax |
| 490 |
\MT@ls@outer@k |
| 491 |
\else |
| 492 |
\MT@outer@kern=\expandafter\expandafter\expandafter\@firstoftwo |
| 493 |
\csname MT@outer@kern\expandafter\string\font@name\endcsname\relax |
| 494 |
\ifdim\MT@outer@kern=\z@\else \MT@ls@outer@k \fi |
| 495 |
\MT@outer@kern=\expandafter\expandafter\expandafter\@secondoftwo |
| 496 |
\csname MT@outer@kern\expandafter\string\font@name\endcsname\relax |
| 497 |
\fi |
| 498 |
\xdef\MT@set@curr@ok{\MT@outer@kern=\the\MT@outer@kern\relax}% |
| 499 |
\MT@afteraftergroup{% |
| 500 |
\MT@set@curr@os |
| 501 |
\MT@set@curr@ok |
| 502 |
\noexpand\MT@tr@outer@r |
| 503 |
}% |
| 504 |
\fi |
| 505 |
} |
| 506 |
\def\MT@afteraftergroup#1{% |
| 507 |
\MT@maybe@gobble@with@tikz{% |
| 508 |
\MT@ifdefined@n@TF{MT@aftergroup@\number\currentgrouplevel}\relax{% |
| 509 |
\MT@exp@cs\xdef{MT@aftergroup@\number\currentgrouplevel}% |
| 510 |
{\MT@exp@cs\MT@glet{MT@aftergroup@\number\currentgrouplevel}\noexpand\@undefined#1}% |
| 511 |
\expandafter\aftergroup\expandafter\aftergroup\MT@exp@cs\aftergroup |
| 512 |
{MT@aftergroup@\number\currentgrouplevel}% |
| 513 |
}% |
| 514 |
}% |
| 515 |
} |
| 516 |
\def\MT@ls@fontspec@font{% |
| 517 |
\MT@lua{microtype.add_ls([[\MT@letterspace@]],[[\MT@tr@features]])}% |
| 518 |
} |
| 519 |
\def\MT@get@tr@opt{% |
| 520 |
\MT@set@listname |
| 521 |
\let\MT@tr@factor@\@m |
| 522 |
\MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name @unit}{% |
| 523 |
\MT@let@cn\MT@tr@unit@{MT@tr@c@\MT@tr@c@name @unit}% |
| 524 |
\ifdim\MT@tr@unit@=1em |
| 525 |
\let\MT@tr@unit@\@undefined |
| 526 |
\else |
| 527 |
\MT@get@unit\MT@tr@unit@ |
| 528 |
\fi |
| 529 |
}% |
| 530 |
\MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name}{% |
| 531 |
\MT@let@cn\MT@letterspace{MT@tr@c@\MT@tr@c@name}% |
| 532 |
\MT@ifdefined@c@T\MT@tr@unit@{% |
| 533 |
\let\@tempb\MT@letterspace |
| 534 |
\MT@scale@to@em |
| 535 |
\edef\MT@letterspace{\number\@tempcntb}% |
| 536 |
}% |
| 537 |
}% |
| 538 |
\MT@get@tr@opt@{spacing} {ispace}% |
| 539 |
\MT@get@tr@opt@{outerspacing}{ospace}% |
| 540 |
\MT@get@tr@opt@{outerkerning}{okern}% |
| 541 |
\MT@get@tr@opt@{noligatures} {ligatures}% |
| 542 |
\MT@get@tr@opt@{features} {feat}% |
| 543 |
} |
| 544 |
\def\MT@get@tr@opt@#1#2{% |
| 545 |
\MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name @#1}% |
| 546 |
{\MT@let@nn{MT@tr@#2}{MT@tr@c@\MT@tr@c@name @#1}}% |
| 547 |
} |
| 548 |
\def\MT@tr@set@features{% |
| 549 |
\MT@map@clist@c\MT@tr@feat{% |
| 550 |
\MT@ifempty{##1}\relax{% |
| 551 |
\MT@if@false |
| 552 |
\lowercase{\edef\@tempa{##1}}% |
| 553 |
\MT@map@tlist@n{{{required} {rlig}} |
| 554 |
{{common} {liga}} |
| 555 |
{{contextual} {clig}} |
| 556 |
{{rare} {dlig}} |
| 557 |
{{discretionary}{dlig}} |
| 558 |
{{historic} {hlig}} |
| 559 |
{{tex} {tlig}} |
| 560 |
}\MT@tr@set@feature@ |
| 561 |
\ifMT@if@\else |
| 562 |
\MT@ifstreq{\@tempa}{resetall}{% |
| 563 |
\MT@xadd\MT@tr@features{+dlig;-dlig;+rlig;-rlig;+liga;-liga;+clig;-clig;+hlig;-hlig;% |
| 564 |
+tlig,-tlig;% |
| 565 |
}% |
| 566 |
}{% |
| 567 |
\MT@warning@nl{Unknown Ligatures feature `##1' in \MT@curr@list@name. |
| 568 |
Ignoring it}% |
| 569 |
}% |
| 570 |
\fi |
| 571 |
}% |
| 572 |
}% |
| 573 |
} |
| 574 |
\def\MT@tr@set@feature@#1{% |
| 575 |
\MT@tr@set@feature@@#1% |
| 576 |
} |
| 577 |
\def\MT@tr@set@feature@@#1#2{% |
| 578 |
\MT@ifstreq\@tempa{#1}{% |
| 579 |
\MT@tr@set@feature@@@{+#2}% |
| 580 |
}{% |
| 581 |
\MT@ifstreq\@tempa{#1off}{% |
| 582 |
\MT@tr@set@feature@@@{-#2}% |
| 583 |
}{% |
| 584 |
\MT@ifstreq\@tempa{no#1}{% |
| 585 |
\MT@tr@set@feature@@@{-#2}% |
| 586 |
}{% |
| 587 |
\MT@ifstreq\@tempa{#1reset}{% |
| 588 |
\MT@tr@set@feature@@@{+#2;-#2}% |
| 589 |
}\relax |
| 590 |
}% |
| 591 |
}% |
| 592 |
}% |
| 593 |
} |
| 594 |
\def\MT@tr@set@feature@@@#1{% |
| 595 |
\MT@xadd\MT@tr@features{#1;}% |
| 596 |
\MT@if@true |
| 597 |
\MT@tlist@break |
| 598 |
} |
| 599 |
\def\MT@set@lsfont{\MT@exp@two@c\let\font@name\MT@lsfont} |
| 600 |
\DeclareRobustCommand\lsstyle{% |
| 601 |
\not@math@alphabet\lsstyle\textls |
| 602 |
\let\glb@currsize\@empty |
| 603 |
\MT@maybe@gobble@with@tikz{\aftergroup\glb@settings}% |
| 604 |
\def\MT@feat{tr}% |
| 605 |
\let\MT@tracking\MT@set@tr@codes |
| 606 |
\selectfont |
| 607 |
} |
| 608 |
\DeclareRobustCommand\lslig[1]{% |
| 609 |
{\MT@ifdefined@c@TF\MT@curr@ls{% |
| 610 |
\escapechar\m@ne |
| 611 |
\xdef\font@name{\csname\curr@fontshape/\f@size\endcsname}% |
| 612 |
\MT@get@ls@basefont |
| 613 |
\MT@outer@kern=\dimexpr\MT@curr@ls sp * \fontdimen6\font@name/2000\relax |
| 614 |
\kern\MT@outer@kern |
| 615 |
\font@name #1% |
| 616 |
\kern\MT@outer@kern |
| 617 |
}{#1}}% |
| 618 |
} |
| 619 |
\def\MT@get@ls@basefont{% |
| 620 |
\xdef\MT@ls@basefont{\csname\expandafter\string\font@name @base\endcsname}% |
| 621 |
\expandafter\ifx\MT@ls@basefont\relax |
| 622 |
\MT@exp@two@c\MT@glet\MT@ls@basefont\font@name |
| 623 |
\else |
| 624 |
\MT@set@lsbasefont |
| 625 |
\fi |
| 626 |
} |
| 627 |
\def\MT@set@lsbasefont{\MT@exp@two@c\let\font@name\MT@ls@basefont} |
| 628 |
\def\MT@set@tr@zero{% |
| 629 |
\xdef\MT@ls@basefont{\csname\expandafter\string\font@name @base\endcsname}% |
| 630 |
\expandafter\ifx\MT@ls@basefont\relax \else |
| 631 |
\aftergroup\MT@set@lsbasefont |
| 632 |
\fi |
| 633 |
} |
| 634 |
\def\MT@tr@noligatures{% |
| 635 |
\ifx\MT@tr@ligatures\@empty |
| 636 |
\MT@noligatures@\MT@lsfont\@undefined |
| 637 |
\else |
| 638 |
\MT@ifstreq\MT@tr@ligatures{all}{% |
| 639 |
\MT@noligatures@\MT@lsfont\@undefined |
| 640 |
}{% |
| 641 |
\MT@ifstreq\MT@tr@ligatures{none}\relax{% |
| 642 |
\MT@noligatures@\MT@lsfont\MT@tr@ligatures |
| 643 |
}% |
| 644 |
}% |
| 645 |
\fi |
| 646 |
} |
| 647 |
\newskip\MT@outer@space |
| 648 |
\def\MT@tr@set@space#1,#2,#3,#4,#5,#6,{% |
| 649 |
\let\MT@temp\@empty |
| 650 |
\MT@tr@set@space@{#1}{#4}{2}\@empty |
| 651 |
\MT@tr@set@space@{#2}{#5}{3}\@plus |
| 652 |
\MT@tr@set@space@{#3}{#6}{4}\@minus |
| 653 |
\MT@glet@nc{MT@outer@space\expandafter\string\font@name}\MT@temp |
| 654 |
} |
| 655 |
\def\MT@tr@set@space@#1#2#3#4{% |
| 656 |
\MT@ifempty{#2}{% |
| 657 |
\MT@ifempty{#1}\relax{% |
| 658 |
\MT@tr@set@space@@{#1}{#3}{1000}% |
| 659 |
\fontdimen#3\MT@lsfont=\@tempdima |
| 660 |
}% |
| 661 |
\edef\MT@temp{\MT@temp#4\the\fontdimen#3\MT@lsfont}% |
| 662 |
}{% |
| 663 |
\MT@tr@set@space@@{#2}{#3}{2000}% |
| 664 |
\edef\MT@temp{\MT@temp#4\the\@tempdima}% |
| 665 |
\MT@ifempty{#1}\relax{% |
| 666 |
\MT@tr@set@space@@{#1}{#3}{1000}% |
| 667 |
\fontdimen#3\MT@lsfont=\@tempdima |
| 668 |
}% |
| 669 |
}% |
| 670 |
} |
| 671 |
\def\MT@tr@set@space@@#1#2#3{% |
| 672 |
\MT@test@ast#1*\@nil{% |
| 673 |
\MT@ifdefined@c@TF\MT@tr@unit@ |
| 674 |
{\edef\@tempb{#1}\MT@scale@to@em} |
| 675 |
{\@tempcntb=#1\relax}% |
| 676 |
\@tempdima=\dimexpr\@tempcntb sp*\MT@dimen@six/1000\relax |
| 677 |
\ifnum#2=\tw@ |
| 678 |
\MT@if@opentype@font\relax{% |
| 679 |
\advance\@tempdima -\dimexpr\MT@letterspace@ sp*\MT@dimen@six/#3\relax |
| 680 |
}% |
| 681 |
\fi |
| 682 |
}{% |
| 683 |
\MT@ifempty\@tempa{\let\@tempa\MT@letterspace@}\relax |
| 684 |
\@tempdima=\dimexpr \numexpr1000+\@tempa sp *\fontdimen#2\MT@lsfont/1000\relax |
| 685 |
}% |
| 686 |
} |
| 687 |
\def\MT@tr@outer@l{% |
| 688 |
\ifhmode |
| 689 |
\ifdim\lastskip>5sp |
| 690 |
\edef\x{\the\lastskip minus 0pt}% |
| 691 |
\setbox\z@\hbox{\MT@outer@space=\x}% |
| 692 |
\ifdim\wd\z@>\z@ |
| 693 |
\unskip \hskip\MT@outer@space\relax |
| 694 |
\let\MT@ls@outer@k\relax |
| 695 |
\else |
| 696 |
\ifdim\lastskip=% |
| 697 |
\ifnum\spacefactor<2000 |
| 698 |
\spaceskip |
| 699 |
\else |
| 700 |
\ifdim\xspaceskip=\z@ |
| 701 |
\dimexpr\spaceskip+\fontdimen7\font@name\relax |
| 702 |
\else |
| 703 |
\xspaceskip |
| 704 |
\fi |
| 705 |
\fi |
| 706 |
\unskip \hskip\MT@outer@space\relax |
| 707 |
\let\MT@ls@outer@k\relax |
| 708 |
\fi |
| 709 |
\fi |
| 710 |
\fi |
| 711 |
\fi |
| 712 |
} |
| 713 |
\def\MT@tr@outer@r{% |
| 714 |
\futurelet\MT@tr@outer@next\MT@tr@outer@r@ |
| 715 |
} |
| 716 |
\def\MT@if@outer@next#1{% |
| 717 |
\ifx\MT@tr@outer@next#1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi |
| 718 |
} |
| 719 |
\def\MT@tr@outer@r@{% |
| 720 |
\def\MT@temp*{}% |
| 721 |
\ifmmode \else |
| 722 |
\ifnum\currentgrouptype=10 \else |
| 723 |
\def\MT@temp*##1{\ifhmode\hskip\MT@outer@space |
| 724 |
\fi}% |
| 725 |
\expandafter\ifcat\expandafter\noexpand\csname MT@tr@outer@next\endcsname\egroup |
| 726 |
\ifhmode\unkern\fi\egroup |
| 727 |
\MT@set@curr@ok \MT@set@curr@os |
| 728 |
\def\MT@temp*{\afterassignment\MT@tr@outer@r\let\MT@temp=}% |
| 729 |
\else |
| 730 |
\MT@if@outer@next\maybe@ic{% |
| 731 |
\MT@set@curr@ok \MT@set@curr@os |
| 732 |
\def\MT@temp*{\afterassignment\MT@tr@outer@icr\let\MT@temp=}% |
| 733 |
}{% |
| 734 |
\MT@if@outer@next\check@icr{% |
| 735 |
\def\MT@temp*{\aftergroup\MT@tr@outer@r\check@icr\let\MT@temp=}% |
| 736 |
}{% |
| 737 |
\MT@if@outer@next\@sptoken{% |
| 738 |
\def\MT@temp* {\ifhmode\hskip\MT@outer@space |
| 739 |
\fi}% |
| 740 |
}{% |
| 741 |
\MT@if@outer@next~{% |
| 742 |
\def\MT@temp*~{\nobreak\hskip\MT@outer@space |
| 743 |
}% |
| 744 |
}{% |
| 745 |
\MT@if@outer@next\ \relax{% |
| 746 |
\MT@if@outer@next\space\relax{% |
| 747 |
\MT@if@outer@next\@xobeysp\relax{% |
| 748 |
\MT@if@outer@next\xspace{% |
| 749 |
\def\MT@temp*\xspace{\MT@xspace}% |
| 750 |
}{% |
| 751 |
\def\MT@temp*{\ifdim\MT@outer@kern=\z@\else\MT@ls@outer@k |
| 752 |
\fi}% |
| 753 |
\MT@let@nc{MT@tr@outer@next}\relax |
| 754 |
}}}}}}}}\fi |
| 755 |
\fi\fi |
| 756 |
\MT@temp*% |
| 757 |
} |
| 758 |
\def\MT@tr@outer@icr{\afterassignment\MT@tr@outer@icr@\MT@tr@outer@r} |
| 759 |
\def\MT@tr@outer@icr@{% |
| 760 |
\let\@let@token= \MT@tr@outer@next |
| 761 |
\maybe@ic@ |
| 762 |
} |
| 763 |
\def\MT@xspace{\futurelet\@let@token\MT@xspace@} |
| 764 |
\def\MT@xspace@{\@xspace@firsttrue\@xspace |
| 765 |
\ifdim\lastskip>5sp |
| 766 |
\unskip \hskip\MT@outer@space |
| 767 |
\else |
| 768 |
\ifdim\MT@outer@kern=\z@\else\MT@ls@outer@k \fi |
| 769 |
\fi |
| 770 |
} |
| 771 |
}{ |
| 772 |
\DeclareRobustCommand\lsstyle{% |
| 773 |
\MT@error{Letterspacing only works with \MT@engine tex version |
| 774 |
0.62% |
| 775 |
\MessageBreak or newer} |
| 776 |
{Upgrade \MT@engine tex, or try the `soul' package instead.}% |
| 777 |
\MT@glet\lsstyle\relax |
| 778 |
} |
| 779 |
} |
| 780 |
\def\MT@tr@set@okern#1,#2,{% |
| 781 |
\let\MT@temp\@empty |
| 782 |
\MT@ifempty{#1}{\MT@tr@set@okern@{*}}{\MT@tr@set@okern@{#1}}% |
| 783 |
\MT@ifempty{#2}{\MT@tr@set@okern@{*}}{\MT@tr@set@okern@{#2}}% |
| 784 |
\MT@glet@nc{MT@outer@kern\expandafter\string\font@name}\MT@temp |
| 785 |
} |
| 786 |
\def\MT@tr@set@okern@#1{% |
| 787 |
\MT@test@ast#1*\@nil{% |
| 788 |
\MT@ifdefined@c@TF\MT@tr@unit@ |
| 789 |
{\edef\@tempb{#1}\MT@scale@to@em} |
| 790 |
{\@tempcntb=#1\relax}% |
| 791 |
\@tempdima=\dimexpr \@tempcntb sp * \MT@dimen@six/1000\relax |
| 792 |
}{% |
| 793 |
\MT@ifempty\@tempa{\let\@tempa\@m}\relax |
| 794 |
\@tempdima=\dimexpr \numexpr\@tempa*\MT@letterspace@/1000\relax sp |
| 795 |
* \fontdimen6\MT@lsfont/2000\relax |
| 796 |
}% |
| 797 |
\MT@if@opentype@font\relax{% |
| 798 |
\advance\@tempdima -\dimexpr \MT@letterspace@ sp |
| 799 |
* \fontdimen6\MT@lsfont/2000\relax |
| 800 |
}% |
| 801 |
\edef\MT@temp{\MT@temp{\the\@tempdima}}% |
| 802 |
} |
| 803 |
\def\MT@ls@outer@k{% |
| 804 |
\ifhmode |
| 805 |
\ifdim\lastkern=-3sp \unkern |
| 806 |
\ifdim\lastkern=3sp \kern-3sp |
| 807 |
\expandafter\expandafter\expandafter\@gobble |
| 808 |
\else \unkern |
| 809 |
\expandafter\expandafter\expandafter\@firstofone |
| 810 |
\fi |
| 811 |
\else |
| 812 |
\expandafter\@firstofone |
| 813 |
\fi |
| 814 |
{\kern\MT@outer@kern\kern3sp\kern-3sp\relax}% |
| 815 |
\fi |
| 816 |
} |
| 817 |
\def\MT@noligatures{% |
| 818 |
\MT@dotrue |
| 819 |
\let\@tempa\MT@nl@setname |
| 820 |
\def\MT@feat{nl}% |
| 821 |
\MT@map@clist@n{font,encoding,family,series,shape,size}{% |
| 822 |
\MT@ifdefined@n@TF{MT@checklist@##1}% |
| 823 |
{\csname MT@checklist@##1\endcsname}% |
| 824 |
{\MT@checklist@{##1}}% |
| 825 |
{nl}% |
| 826 |
}% |
| 827 |
\ifMT@do |
| 828 |
\MT@noligatures@\MT@font\MT@nl@ligatures |
| 829 |
\fi |
| 830 |
} |
| 831 |
\MT@requires@luatex4{\let\pdfnoligatures\ignoreligaturesinfont}\relax |
| 832 |
\def\MT@noligatures@#1#2{% |
| 833 |
\MT@ifdefined@c@TF#2{% |
| 834 |
\MT@ifdefined@c@TF\tagcode{% |
| 835 |
\let\MT@warn@maybe@inputenc\@empty |
| 836 |
\MT@ifstreq\MT@feat{tr}\relax |
| 837 |
{\def\MT@curr@list@name{\@backslashchar DisableLigatures}}% |
| 838 |
\MT@map@clist@c#2{% |
| 839 |
\MT@ifempty{##1}\relax{% |
| 840 |
\KV@@sp@def\@tempa{##1}\MT@get@slot |
| 841 |
\ifnum\MT@char>\m@ne |
| 842 |
\tagcode#1\MT@char=\m@ne |
| 843 |
\MT@if@opentype@font |
| 844 |
{\MT@lua{microtype.noligatures([[#1]],[[\MT@char]])}}\relax |
| 845 |
\fi |
| 846 |
}% |
| 847 |
}% |
| 848 |
\MT@vinfo{... Disabling ligatures for characters: #2}% |
| 849 |
}{% |
| 850 |
\pdfnoligatures#1% |
| 851 |
\MT@warning{Cannot disable selected ligatures (pdftex doesn't\MessageBreak |
| 852 |
know \@backslashchar tagcode). Disabling all ligatures of\MessageBreak |
| 853 |
the font instead}% |
| 854 |
}% |
| 855 |
}{% |
| 856 |
\pdfnoligatures#1% |
| 857 |
\MT@if@opentype@font |
| 858 |
{\MT@lua{microtype.noligatures([[#1]],"_all_")}}\relax |
| 859 |
\MT@vinfo{... Disabling all ligatures}% |
| 860 |
}% |
| 861 |
} |
| 862 |
\def\MT@get@slot@{% |
| 863 |
\ifnum\MT@char > \m@ne |
| 864 |
\ifnum\MT@char=47\relax |
| 865 |
\ifMT@norest \else |
| 866 |
\@tempcnta=\MT@lua{ |
| 867 |
local glyph = microtype.name_to_slot([[\expandafter\@gobble\@tempa]],true) |
| 868 |
if glyph then tex.write(glyph) |
| 869 |
else tex.write(-1) |
| 870 |
end |
| 871 |
}\relax |
| 872 |
\ifnum\@tempcnta<\z@ |
| 873 |
\MT@warn@unknown |
| 874 |
\let\MT@char\m@ne |
| 875 |
\else |
| 876 |
\edef\MT@char{\the\@tempcnta}% |
| 877 |
\fi |
| 878 |
\fi |
| 879 |
\else |
| 880 |
\ifMT@norest \else |
| 881 |
\MT@warn@rest |
| 882 |
\let\MT@char\m@ne |
| 883 |
\fi |
| 884 |
\fi |
| 885 |
\else |
| 886 |
\MT@warn@unknown |
| 887 |
\fi |
| 888 |
} |
| 889 |
\def\MT@max@char |
| 890 |
{1114111 } |
| 891 |
\def\MT@max@slot |
| 892 |
{1114111 } |
| 893 |
\MT@requires@luatex3 |
| 894 |
{% |
| 895 |
\def\MT@active@features{,tr}% |
| 896 |
}{\let\MT@active@features\@empty} |
| 897 |
\def\DisableLigatures{% |
| 898 |
\MT@begin@catcodes |
| 899 |
\MT@DisableLigatures |
| 900 |
} |
| 901 |
\newcommand*\MT@DisableLigatures[2][]{% |
| 902 |
\MT@ifempty{#1}\relax{\gdef\MT@nl@ligatures{#1}}% |
| 903 |
\xdef\MT@active@features{\MT@active@features,nl}% |
| 904 |
\global\MT@noligaturestrue |
| 905 |
\MT@declare@sets{nl}{no ligatures}{#2}% |
| 906 |
\gdef\MT@nl@setname{no ligatures}% |
| 907 |
\MT@end@catcodes |
| 908 |
} |
| 909 |
\def\SetExpansion{% |
| 910 |
\MT@begin@catcodes |
| 911 |
\MT@SetExpansion |
| 912 |
} |
| 913 |
\newcommand*\MT@SetExpansion[3][]{% |
| 914 |
\let\MT@extra@context\@empty |
| 915 |
\MT@set@named@keys{MT@ex@c}{#1}% |
| 916 |
\MT@ifdefined@n@T{MT@ex@c@\MT@ex@c@name @factor}{% |
| 917 |
\ifnum\csname MT@ex@c@\MT@ex@c@name @factor\endcsname > \@m |
| 918 |
\MT@warning@nl{Expansion factor \number\@nameuse{MT@ex@c@\MT@ex@c@name @factor} |
| 919 |
too large in list\MessageBreak `\MT@ex@c@name'. Setting it to the |
| 920 |
maximum of 1000}% |
| 921 |
\MT@glet@nc{MT@ex@c@\MT@ex@c@name @factor}\@m |
| 922 |
\fi |
| 923 |
}% |
| 924 |
\def\MT@permutelist{ex@c}% |
| 925 |
\setkeys{MT@cfg}{#2}% |
| 926 |
\MT@permute |
| 927 |
\MT@gdef@n{MT@ex@c@\MT@ex@c@name}{#3}% |
| 928 |
\MT@end@catcodes |
| 929 |
} |
| 930 |
\def\SetTracking{% |
| 931 |
\MT@begin@catcodes |
| 932 |
\MT@SetTracking |
| 933 |
} |
| 934 |
\newcommand*\MT@SetTracking[3][]{% |
| 935 |
\let\MT@extra@context\@empty |
| 936 |
\MT@set@named@keys{MT@tr@c}{#1}% |
| 937 |
\def\MT@permutelist{tr@c}% |
| 938 |
\setkeys{MT@cfg}{#2}% |
| 939 |
\MT@permute |
| 940 |
\KV@@sp@def\@tempa{#3}% |
| 941 |
\MT@ifempty\@tempa\relax{% |
| 942 |
\MT@ifint\@tempa |
| 943 |
{\MT@xdef@n{MT@tr@c@\MT@tr@c@name}{\@tempa}}% |
| 944 |
{\MT@warning{Value `\@tempa' is not a number in\MessageBreak |
| 945 |
tracking set `\MT@curr@set@name'}}}% |
| 946 |
\MT@end@catcodes |
| 947 |
} |
| 948 |
\define@key{MT@ex@c}{context}[]{% |
| 949 |
\MT@ifempty{#1}\relax{% |
| 950 |
\MT@glet\MT@copy@font\MT@copy@font@ |
| 951 |
\def\MT@extra@context{#1}% |
| 952 |
}% |
| 953 |
} |
| 954 |
\MT@addto@setup{% |
| 955 |
\define@key{MT@ex@c}{context}[]{% |
| 956 |
\ifx\MT@copy@font\MT@copy@font@ |
| 957 |
\MT@ifempty{#1}\relax{\def\MT@extra@context{#1}}% |
| 958 |
\else |
| 959 |
\MT@error{\MT@MT\space isn't set up for expansion contexts.\MessageBreak |
| 960 |
Ignoring `context' key\on@line}% |
| 961 |
{Either move the settings inside the preamble,\MessageBreak |
| 962 |
or load the package with the `copyfonts' option.}% |
| 963 |
\fi |
| 964 |
}% |
| 965 |
} |
| 966 |
\define@key{MT@pr@c}{context}[]{% |
| 967 |
\MT@ifempty{#1}\relax{% |
| 968 |
\MT@glet\MT@copy@font\MT@copy@font@ |
| 969 |
\def\MT@extra@context{#1}% |
| 970 |
}% |
| 971 |
} |
| 972 |
\MT@addto@setup{% |
| 973 |
\define@key{MT@pr@c}{context}[]{% |
| 974 |
\MT@ifempty{#1}\relax{\def\MT@extra@context{#1}}% |
| 975 |
\ifx\MT@copy@font\MT@copy@font@\else |
| 976 |
\MT@warning@nl{If protrusion contexts don't work as expected, |
| 977 |
\MessageBreak load the package with the `copyfonts' option}% |
| 978 |
\fi |
| 979 |
}% |
| 980 |
} |
| 981 |
\MT@map@clist@n{stretch,shrink,step}{% |
| 982 |
\define@key{MT@ex@c}{#1}[]{% |
| 983 |
\MT@ifempty{##1}\relax{% |
| 984 |
\MT@ifint{##1}{% |
| 985 |
\MT@gdef@n{MT@ex@c@\MT@curr@set@name @#1}{##1 }% |
| 986 |
}{% |
| 987 |
\MT@warning{% |
| 988 |
Value `##1' for option `#1' is not a number.\MessageBreak |
| 989 |
Ignoring it}% |
| 990 |
}% |
| 991 |
}% |
| 992 |
}% |
| 993 |
} |
| 994 |
\define@key{MT@ex@c}{auto}[true]{% |
| 995 |
\def\@tempa{#1}% |
| 996 |
\csname if\@tempa\endcsname |
| 997 |
\MT@requires@luatex3\relax |
| 998 |
{\MT@gdef@n{MT@ex@c@\MT@curr@set@name @auto}{autoexpand}}% |
| 999 |
\else |
| 1000 |
\MT@requires@luatex3{% |
| 1001 |
\MT@warning{Non-automatic font expansion doesn't work with\MessageBreak |
| 1002 |
luatex}}% |
| 1003 |
{\MT@glet@nc{MT@ex@c@\MT@curr@set@name @auto}\@empty}% |
| 1004 |
\fi |
| 1005 |
} |
| 1006 |
\MT@define@opt@key{tr}{spacing} |
| 1007 |
\MT@define@opt@key{tr}{outerspacing} |
| 1008 |
\MT@define@opt@key{tr}{outerkerning} |
| 1009 |
\MT@define@opt@key{tr}{features} |
| 1010 |
\define@key{MT@tr@c}{noligatures}[]% |
| 1011 |
{\MT@xdef@n{MT@tr@c@\MT@curr@set@name @noligatures}{#1}} |
| 1012 |
\define@key{MT@tr@c}{outer spacing}[]{\setkeys{MT@tr@c}{outerspacing={#1}}} |
| 1013 |
\define@key{MT@tr@c}{outer kerning}[]{\setkeys{MT@tr@c}{outerkerning={#1}}} |
| 1014 |
\define@key{MT@tr@c}{no ligatures}[]{\setkeys{MT@tr@c}{noligatures={#1}}} |
| 1015 |
\def\MT@inh@split#1=#2=#3\relax{% |
| 1016 |
\def\@tempa{#1}% |
| 1017 |
\ifx\@tempa\@empty \else |
| 1018 |
\expandafter\MT@has@inh@prefix\@tempa()\relax\@nil |
| 1019 |
\MT@get@slot |
| 1020 |
\ifnum\MT@char > \m@ne |
| 1021 |
\let\MT@val\MT@char |
| 1022 |
\MT@map@clist@n{#2}{% |
| 1023 |
\def\@tempa{##1}% |
| 1024 |
\ifx\@tempa\@empty \else |
| 1025 |
\MT@get@slot |
| 1026 |
\ifnum\MT@char > \m@ne |
| 1027 |
\ifx\MT@inh@prefix\@empty |
| 1028 |
\MT@exp@cs\MT@xadd{MT@inh@\MT@listname @\MT@val @}{{\MT@char}}% |
| 1029 |
\else |
| 1030 |
\MT@exp@cs\MT@xadd{MT@inh@\MT@listname @prefixes}% |
| 1031 |
{{{\MT@val}{\MT@char}\MT@inh@prefix@}}% |
| 1032 |
\fi |
| 1033 |
\fi |
| 1034 |
\fi |
| 1035 |
}% |
| 1036 |
\fi |
| 1037 |
\fi |
| 1038 |
} |
| 1039 |
\MT@requires@luatex4{\let\pdfoutput\outputmode}\relax |
| 1040 |
\MT@def@bool@opt{DVIoutput}{% |
| 1041 |
\csname if\@tempa\endcsname |
| 1042 |
\ifnum\pdfoutput>\z@ \MT@opt@DVItrue \fi |
| 1043 |
\pdfoutput\z@ |
| 1044 |
\else |
| 1045 |
\ifnum\pdfoutput<\@ne \MT@opt@DVItrue \fi |
| 1046 |
\pdfoutput\@ne |
| 1047 |
\fi |
| 1048 |
} |
| 1049 |
\MT@def@bool@opt{copyfonts}{% |
| 1050 |
\csname if\@tempa\endcsname |
| 1051 |
\MT@glet\MT@copy@font\MT@copy@font@ |
| 1052 |
\else |
| 1053 |
\MT@glet\MT@copy@font\relax |
| 1054 |
\fi |
| 1055 |
} |
| 1056 |
\ifnum\pdfoutput<\@ne \else |
| 1057 |
\MT@expansiontrue |
| 1058 |
\fi |
| 1059 |
\MT@autotrue |
| 1060 |
\def\MT@define@optionX#1#2{% |
| 1061 |
\define@key{MTX}{#1}[true]{% |
| 1062 |
\edef\@tempb{\csname MT@rbba@#1\endcsname}% |
| 1063 |
\MT@map@clist@n{##1}{% |
| 1064 |
\KV@@sp@def\MT@val{####1}% |
| 1065 |
\MT@ifempty\MT@val\relax{% |
| 1066 |
\@tempcnta=\m@ne |
| 1067 |
\MT@ifstreq\MT@val{true}{% |
| 1068 |
\MT@checksetup{#1}{% |
| 1069 |
\@tempcnta=\csname MT@\@tempb @level\endcsname |
| 1070 |
\MT@vinfo{Enabling #1 |
| 1071 |
(level \number\csname MT@\@tempb @level\endcsname)\on@line}% |
| 1072 |
}% |
| 1073 |
}{% |
| 1074 |
\MT@ifstreq\MT@val{false}{% |
| 1075 |
\@tempcnta=\z@ |
| 1076 |
\MT@vinfo{Disabling #1\on@line}% |
| 1077 |
}{% |
| 1078 |
\MT@ifstreq\MT@val{compatibility}{% |
| 1079 |
\MT@checksetup{#1}{% |
| 1080 |
\@tempcnta=\@ne |
| 1081 |
\MT@let@nc{MT@\@tempb @level}\@ne |
| 1082 |
\MT@vinfo{Setting #1 to level 1\on@line}% |
| 1083 |
}% |
| 1084 |
}{% |
| 1085 |
\MT@ifstreq\MT@val{nocompatibility}{% |
| 1086 |
\MT@checksetup{#1}{% |
| 1087 |
\@tempcnta=\tw@ |
| 1088 |
\MT@let@nc{MT@\@tempb @level}\tw@ |
| 1089 |
\MT@vinfo{Setting #1 to level 2\on@line}% |
| 1090 |
}% |
| 1091 |
}{\MT@error{Value `\MT@val' for key `#1' not recognised} |
| 1092 |
{Use any of `true', `false', `compatibility' or |
| 1093 |
`nocompatibility'.}% |
| 1094 |
}% |
| 1095 |
}% |
| 1096 |
}% |
| 1097 |
}% |
| 1098 |
\ifnum\@tempcnta>\m@ne |
| 1099 |
#2\@tempcnta\relax |
| 1100 |
\fi |
| 1101 |
}% |
| 1102 |
}% |
| 1103 |
}% |
| 1104 |
} |
| 1105 |
\def\MT@checksetup#1{% |
| 1106 |
\csname ifMT@#1\endcsname |
| 1107 |
\expandafter\@firstofone |
| 1108 |
\else |
| 1109 |
\MT@error{You cannot enable #1 if it was disabled\MessageBreak |
| 1110 |
in the package options}{Load microtype with #1 enabled.}% |
| 1111 |
\expandafter\@gobble |
| 1112 |
\fi |
| 1113 |
} |
| 1114 |
\MT@define@optionX{protrusion}\MT@protrudechars |
| 1115 |
\MT@define@optionX{expansion}\MT@adjustspacing |
| 1116 |
\MT@requires@luatex4{ |
| 1117 |
\let\pdfprotrudechars\protrudechars |
| 1118 |
\let\pdfadjustspacing\adjustspacing |
| 1119 |
}\relax |
| 1120 |
\let\MT@protrudechars\pdfprotrudechars |
| 1121 |
\let\MT@adjustspacing\pdfadjustspacing |
| 1122 |
\MT@requires@luatex3{ |
| 1123 |
\def\MT@define@optionX@#1#2{% |
| 1124 |
\define@key{MTX}{#1}[true]{% |
| 1125 |
\MT@map@clist@n{##1}{% |
| 1126 |
\KV@@sp@def\MT@val{####1}% |
| 1127 |
\MT@ifempty\MT@val\relax{% |
| 1128 |
\@tempcnta=\m@ne |
| 1129 |
\MT@ifstreq\MT@val{true}{% |
| 1130 |
\MT@checksetup{#1}{% |
| 1131 |
\@tempcnta=\@ne |
| 1132 |
\MT@vinfo{Enabling #1\on@line}% |
| 1133 |
}% |
| 1134 |
}{% |
| 1135 |
\MT@ifstreq\MT@val{false}{% |
| 1136 |
\@tempcnta=\z@ |
| 1137 |
\MT@vinfo{Disabling #1\on@line}% |
| 1138 |
}{\MT@error{Value `\MT@val' for key `#1' not recognised} |
| 1139 |
{Use either `true' or `false'}% |
| 1140 |
}% |
| 1141 |
}% |
| 1142 |
\ifnum\@tempcnta>\m@ne |
| 1143 |
#2\relax |
| 1144 |
\fi |
| 1145 |
}% |
| 1146 |
}% |
| 1147 |
}% |
| 1148 |
} |
| 1149 |
\MT@define@optionX@{tracking}{\ifnum\@tempcnta=\z@ \let\MT@tracking\MT@set@tr@zero |
| 1150 |
\else \let\MT@tracking\MT@tracking@ \fi} |
| 1151 |
}{ |
| 1152 |
\define@key{MTX}{tracking}[true]{\MT@warning{Ignoring tracking setup}} |
| 1153 |
} |
| 1154 |
\define@key{MTX}{kerning}[true]{\MT@warning{Ignoring kerning setup}} |
| 1155 |
\define@key{MTX}{spacing}[true]{\MT@warning{Ignoring spacing setup}} |
| 1156 |
\define@key{MTX}{activate}[true]{% |
| 1157 |
\setkeys{MTX}{protrusion={#1}}% |
| 1158 |
\setkeys{MTX}{expansion={#1}}% |
| 1159 |
} |
| 1160 |
\def\MT@setup@PDF{% |
| 1161 |
\MT@info@nl{Generating \ifnum\pdfoutput<\@ne DVI \else PDF \fi output% |
| 1162 |
\ifMT@opt@DVI\space (changed by \MT@MT)\fi}% |
| 1163 |
} |
| 1164 |
\def\MT@setup@copies{% |
| 1165 |
\ifx\MT@copy@font\relax\else \MT@info@nl{Using font copies for contexts}\fi |
| 1166 |
} |
| 1167 |
\def\MT@setup@protrusion{% |
| 1168 |
\ifMT@protrusion |
| 1169 |
\edef\MT@active@features{\MT@active@features,pr}% |
| 1170 |
\MT@protrudechars\MT@pr@level |
| 1171 |
\MT@info@nl{Character protrusion enabled (level \number\MT@pr@level)% |
| 1172 |
\ifnum\MT@pr@factor=\MT@factor@default \else,\MessageBreak |
| 1173 |
factor: \number\MT@pr@factor\fi |
| 1174 |
\ifx\MT@pr@unit\@empty \else,\MessageBreak unit: \MT@pr@unit\fi}% |
| 1175 |
\MT@check@active@set{pr}% |
| 1176 |
\else |
| 1177 |
\let\MT@protrusion\relax |
| 1178 |
\MT@info@nl{No character protrusion}% |
| 1179 |
\fi |
| 1180 |
} |
| 1181 |
\def\MT@setup@expansion{% |
| 1182 |
\ifnum\pdfoutput<\@ne |
| 1183 |
\ifMT@opt@expansion |
| 1184 |
\ifMT@expansion |
| 1185 |
\MT@requires@luatex3{% |
| 1186 |
\MT@warning@nl{Font expansion doesn't work properly with luatex in\MessageBreak |
| 1187 |
DVI mode: the glyphs won't be actually transformed,\MessageBreak |
| 1188 |
but will only be shifted. You might want to use\MessageBreak |
| 1189 |
pdflatex instead. I'll continue anyway ..}% |
| 1190 |
%\MT@expansionfalse |
| 1191 |
}\relax |
| 1192 |
\fi |
| 1193 |
\else |
| 1194 |
\MT@expansionfalse |
| 1195 |
\fi |
| 1196 |
\fi |
| 1197 |
\ifMT@expansion |
| 1198 |
\ifnum\MT@stretch=\m@ne |
| 1199 |
\let\MT@stretch\MT@stretch@default |
| 1200 |
\fi |
| 1201 |
\ifnum\MT@shrink=\m@ne |
| 1202 |
\let\MT@shrink\MT@stretch |
| 1203 |
\fi |
| 1204 |
\ifnum\MT@step=\m@ne |
| 1205 |
\def\MT@step{1 }% |
| 1206 |
\fi |
| 1207 |
\ifnum\MT@step=\z@ |
| 1208 |
\MT@warning@nl{The expansion step cannot be set to zero.\MessageBreak |
| 1209 |
Setting it to one}% |
| 1210 |
\def\MT@step{1 }% |
| 1211 |
\fi |
| 1212 |
\let\MT@auto\@empty |
| 1213 |
\ifMT@auto |
| 1214 |
\MT@requires@luatex3\relax{\def\MT@auto{autoexpand}}% |
| 1215 |
\else |
| 1216 |
\MT@requires@luatex3{% |
| 1217 |
\ifMT@opt@auto |
| 1218 |
\MT@error{Non-automatic font expansion does not work with\MessageBreak |
| 1219 |
luatex}{Remove `auto=false' from the package options, or use pdftex.}% |
| 1220 |
\MT@autotrue |
| 1221 |
\fi |
| 1222 |
}\relax |
| 1223 |
\fi |
| 1224 |
\ifMT@selected |
| 1225 |
\let\MT@set@ex@codes\MT@set@ex@codes@s |
| 1226 |
\else |
| 1227 |
\let\MT@set@ex@codes\MT@set@ex@codes@n |
| 1228 |
\fi |
| 1229 |
\ifnum\MT@stretch=\z@ |
| 1230 |
\ifnum\MT@shrink=\z@ |
| 1231 |
\MT@warning@nl{% |
| 1232 |
Both the stretch and shrink limit are set to zero.\MessageBreak |
| 1233 |
Disabling font expansion}% |
| 1234 |
\MT@expansionfalse |
| 1235 |
\fi |
| 1236 |
\fi |
| 1237 |
\fi |
| 1238 |
\ifMT@expansion |
| 1239 |
\edef\MT@active@features{\MT@active@features,ex}% |
| 1240 |
\MT@adjustspacing\MT@ex@level |
| 1241 |
\MT@info@nl{\ifMT@auto A\else Non-a\fi utomatic font expansion enabled |
| 1242 |
(level \number\MT@ex@level),\MessageBreak |
| 1243 |
stretch: \number\MT@stretch, shrink: \number\MT@shrink, |
| 1244 |
step: \number\MT@step, \ifMT@selected\else non-\fi selected}% |
| 1245 |
\def\MT@check@step##1{% |
| 1246 |
\@tempcnta=\csname MT@##1\endcsname |
| 1247 |
\divide\@tempcnta \MT@step |
| 1248 |
\multiply\@tempcnta \MT@step |
| 1249 |
\ifnum\@tempcnta=\csname MT@##1\endcsname\else |
| 1250 |
\MT@warning@nl{The ##1 amount is not a multiple of step.\MessageBreak |
| 1251 |
The effective maximum ##1 is \the\@tempcnta\space |
| 1252 |
(step \number\MT@step)}% |
| 1253 |
\fi |
| 1254 |
}% |
| 1255 |
\MT@check@step{stretch}% |
| 1256 |
\MT@check@step{shrink}% |
| 1257 |
\MT@check@active@set{ex}% |
| 1258 |
\MT@ifdefined@n@TF{showhyphens }{% |
| 1259 |
\MT@exp@cs\patchcmd{showhyphens }{\color@begingroup}{\color@begingroup\pdfadjustspacing\z@} |
| 1260 |
{\MT@info@nl{Patching command `\string\showhyphens'}} |
| 1261 |
{\MT@warning@nl{Unable to patch command `\string\showhyphens'}}% |
| 1262 |
}{% |
| 1263 |
\CheckCommand*\showhyphens[1]{\setbox0\vbox{\color@begingroup |
| 1264 |
\everypar{}\parfillskip\z@skip\hsize\maxdimen\normalfont |
| 1265 |
\pretolerance\m@ne\tolerance\m@ne\hbadness\z@\showboxdepth\z@\ ##1\color@endgroup}} |
| 1266 |
\gdef\showhyphens##1{\setbox0\vbox{\color@begingroup\pdfadjustspacing\z@ |
| 1267 |
\everypar{}\parfillskip\z@skip\hsize\maxdimen\normalfont |
| 1268 |
\pretolerance\m@ne\tolerance\m@ne\hbadness\z@\showboxdepth\z@\ ##1\color@endgroup}}% |
| 1269 |
}% |
| 1270 |
\else |
| 1271 |
\let\MT@expansion\relax |
| 1272 |
\MT@info@nl{No font expansion}% |
| 1273 |
\fi |
| 1274 |
} |
| 1275 |
\MT@requires@luatex3{% |
| 1276 |
\def\MT@setup@tracking{% |
| 1277 |
\ifMT@tracking |
| 1278 |
\MT@info@nl{Tracking enabled}% |
| 1279 |
\MT@check@active@set{tr}% |
| 1280 |
\ifMT@protrusion\else\MT@protrudechars\@ne\fi |
| 1281 |
\else |
| 1282 |
\let\MT@tracking\relax |
| 1283 |
\MT@info@nl{No adjustment of tracking}% |
| 1284 |
\fi |
| 1285 |
} |
| 1286 |
}{ |
| 1287 |
\def\MT@setup@tracking{% |
| 1288 |
\ifMT@tracking |
| 1289 |
\MT@error{The tracking feature only works with luatex 0.62\MessageBreak |
| 1290 |
or newer. Switching it off}{Upgrade luatex.}% |
| 1291 |
\MT@trackingfalse |
| 1292 |
\MT@let@nc{MT@tracking}\relax |
| 1293 |
\else |
| 1294 |
\MT@info@nl{No adjustment of tracking (luatex too old)}% |
| 1295 |
\fi |
| 1296 |
} |
| 1297 |
} |
| 1298 |
\def\MT@error@doesnt@work#1{% |
| 1299 |
\csname ifMT@#1\endcsname |
| 1300 |
\MT@error{The #1 feature only works with pdftex 1.40\MessageBreak |
| 1301 |
or newer. Switching it off} |
| 1302 |
{Use pdftex instead.}% |
| 1303 |
\csname MT@#1false\endcsname |
| 1304 |
\MT@let@nc{MT@#1}\relax |
| 1305 |
\else |
| 1306 |
\MT@info@nl{No adjustment of #1% |
| 1307 |
}% |
| 1308 |
\fi |
| 1309 |
} |
| 1310 |
\def\MT@setup@kerning {\MT@error@doesnt@work{kerning}} |
| 1311 |
\def\MT@setup@spacing {\MT@error@doesnt@work{spacing}} |
| 1312 |
\def\MT@setup@warntracking |
| 1313 |
{% |
| 1314 |
\def\MT@warn@tracking@DVI{% |
| 1315 |
\ifnum\pdfprotrudechars<\@ne \global\pdfprotrudechars\@ne \fi |
| 1316 |
\MT@glet\MT@warn@tracking@DVI\relax |
| 1317 |
}% |
| 1318 |
\ifnum\MT@letterspace=\m@ne |
| 1319 |
\let\MT@letterspace\MT@letterspace@default |
| 1320 |
\else |
| 1321 |
\MT@ls@too@large\MT@letterspace |
| 1322 |
\fi |
| 1323 |
} |
| 1324 |
\def\MT@setup@noligatures{% |
| 1325 |
\ifMT@noligatures \else |
| 1326 |
\let\MT@noligatures\relax |
| 1327 |
\fi |
| 1328 |
} |
| 1329 |
\endinput |
| 1330 |
%% |
| 1331 |
%% End of file `microtype-luatex.def'. |