summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/microtype/microtype.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/microtype/microtype.sty')
-rw-r--r--Master/texmf-dist/tex/latex/microtype/microtype.sty1783
1 files changed, 172 insertions, 1611 deletions
diff --git a/Master/texmf-dist/tex/latex/microtype/microtype.sty b/Master/texmf-dist/tex/latex/microtype/microtype.sty
index 018f1f958ac..5c925868330 100644
--- a/Master/texmf-dist/tex/latex/microtype/microtype.sty
+++ b/Master/texmf-dist/tex/latex/microtype/microtype.sty
@@ -4,13 +4,13 @@
%%
%% The original source files were:
%%
-%% microtype.dtx (with options: `package,lua')
+%% microtype.dtx (with options: `package')
%%
%% ------------------------------------------------------------------------
%%
%% The `microtype' package
-%% An interface to the micro-typographic extensions of pdfTeX
-%% Copyright (c) 2004--2010 R Schlicht <w.m.l@gmx.net>
+%% Subliminal refinements towards typographical perfection
+%% Copyright (c) 2004--2013 R Schlicht <w.m.l@gmx.net>
%%
%% This work may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3c of this license or (at
@@ -21,15 +21,16 @@
%% This work has the LPPL maintenance status `author-maintained'.
%%
%% This work consists of the files microtype.dtx and microtype.ins and the
-%% derived files microtype.sty, microtype.lua and letterspace.sty.
+%% derived files microtype.sty, microtype-pdftex.def, microtype-xetex.def,
+%% microtype-luatex.def, microtype.lua and letterspace.sty.
%%
%% ------------------------------------------------------------------------
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage
{microtype}
- [2010/01/10 v2.4
- Micro-typography with pdfTeX
+ [2013/03/13 v2.5
+ Micro-typographical refinements
(RS)]
\def\MT@MT
{microtype}
@@ -90,6 +91,7 @@
\@onlypreamble\DisableLigatures
\@onlypreamble\DeclareMicrotypeVariants
\@onlypreamble\DeclareMicrotypeBabelHook
+\expandafter\let\csname ver@letterspace.sty\endcsname\@empty
\def\MT@old@cmd#1#2{%
\newcommand*#1{\MT@warning{%
\string#1 is deprecated. Please use\MessageBreak
@@ -109,66 +111,43 @@
This error message appears because you loaded the `\MT@MT'\MessageBreak
package with the option `verbose=errors'. Consult the documentation\MessageBreak
in \MT@MT.pdf to find out what went wrong.}}
-\def\MT@pdftex@no{0}
+\ifcase 0%
+ \ifx\eTeXversion\@undefined 1\else
+ \ifx\eTeXversion\relax 1\else
+ \ifcase\eTeXversion 1\fi
+ \fi
+ \fi
+\else
+ \catcode`\^^Q=9 \catcode`\^^X=14
+\fi
+\def\MT@clear@options{%
+ \AtEndOfPackage{\let\@unprocessedoptions\relax\MT@restore@catcodes}%
+ \let\CurrentOption\@empty
+ \let\MT@endinput\endinput
+}
\ifx\normalpdftexversion\@undefined \else
\let\pdftexversion \normalpdftexversion
\let\pdftexrevision\normalpdftexrevision
\let\pdfoutput \normalpdfoutput
\fi
+\let\MT@engine\relax
\ifx\pdftexversion\@undefined \else
\ifx\pdftexversion\relax \else
- \def\MT@pdftex@no{7}
- \ifnum\pdftexversion = 140
- \ifnum\pdftexrevision < 4
- \def\MT@pdftex@no{6}
- \fi
- \else
- \ifnum\pdftexversion < 140
- \def\MT@pdftex@no{5}
- \ifnum\pdftexversion < 130
- \def\MT@pdftex@no{4}
- \ifnum\pdftexversion < 120
- \def\MT@pdftex@no{3}
- \ifnum\pdftexversion = 14
- \ifnum \expandafter`\pdftexrevision < `h
- \def\MT@pdftex@no{2}
- \ifnum \expandafter`\pdftexrevision < `f
- \def\MT@pdftex@no{1}
- \fi
- \fi
- \else
- \ifnum\pdftexversion < 14
- \def\MT@pdftex@no{1}
- \fi
- \fi
- \fi
- \fi
+ \def\MT@engine{pdf}
+ \ifx\directlua\@undefined \else
+ \ifx\directlua\relax \else
+ \def\MT@engine{lua}
\fi
\fi
\fi
\fi
-\def\MT@clear@options{%
- \AtEndOfPackage{\let\@unprocessedoptions\relax}%
- \let\CurrentOption\@empty
-}
-\ifnum\MT@pdftex@no <
- 2
- \MT@warning@nl{You
- \ifcase\MT@pdftex@no
- don't seem to be using pdftex.\MessageBreak
- `\MT@MT' only works with pdftex.\MessageBreak
- Try running `pdflatex' instead of
- `\ifx\XeTeXversion\@undefined\else xe\fi latex'%
- \else
- are using a pdftex version older than
- 0.14f%
- .\MessageBreak
- `\MT@MT' does not work with this version.\MessageBreak
- Please install a newer version of pdftex%
+\ifx\MT@engine\relax
+ \ifx\XeTeXversion\@undefined \else
+ \ifx\XeTeXversion\relax \else
+ \def\MT@engine{xe}
\fi
- }
- \MT@clear@options\MT@restore@catcodes
-\endinput\fi
+ \fi
+\fi
\RequirePackage{keyval}[1997/11/10]
\newtoks\MT@toks
\newif\ifMT@if@
@@ -207,41 +186,9 @@
\def\MT@factor@default{1000 }
\def\MT@stretch@default{20 }
\def\MT@shrink@default{20 }
-\def\MT@step@default{4 }
\let\MT@letterspace\m@ne
\def\MT@letterspace@default{100}
\newif\ifMT@document
-\ifcase 0%
- \ifx\eTeXversion\@undefined 1\else
- \ifx\eTeXversion\relax 1\else
- \ifcase\eTeXversion 1\fi
- \fi
- \fi
-\else
- \catcode`\^^Q=9 \catcode`\^^X=14
-\fi
-\def\MT@requires@pdftex#1{%
- \ifnum\MT@pdftex@no<#1 \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi
-}
-\let\MT@requires@luatex\@secondoftwo
-\ifx\directlua\@undefined \else
- \ifx\directlua\relax \else
- \let\MT@requires@luatex\@firstoftwo
- \fi
-\fi
-\MT@requires@luatex{
-\ifnum\luatexversion<36
- \def\MT@lua{\directlua0}
-\else
- \def\MT@lua{\directlua}
-\fi
-\MT@lua{
- if (luatextra and luatextra.use_module) then
- luatextra.use_module("microtype")
- else
- dofile(kpse.find_file("microtype.lua"))
- end}
-}\relax
\def\MT@glet{\global\let}
\def\MT@exp@cs#1#2{\expandafter#1\csname#2\endcsname}
\def\MT@exp@gcs#1#2{\begingroup\expandafter\endgroup\expandafter#1\csname#2\endcsname}
@@ -303,52 +250,6 @@
\fi
}
\endgroup
-\MT@requires@pdftex6{
- \MT@requires@luatex{
- \def\MT@ifint#1{\csname\MT@lua{microtype.ifint([[#1]])}\endcsname}
- }{
- \def\MT@ifint#1{%
- \ifcase\pdfmatch{^-*[0-9]+ *$}{#1}\relax
- \expandafter\@secondoftwo
- \else
- \expandafter\@firstoftwo
- \fi
- }
- }
-}{
- \def\MT@ifint#1{%
- \if!\ifnum9<1#1!\else?\fi
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- }
-}
-\MT@requires@pdftex6{
- \MT@requires@luatex{
- \def\MT@ifdimen#1{\csname\MT@lua{microtype.ifdimen([[#1]])}\endcsname}
- }{
- \def\MT@ifdimen#1{%
- \ifcase\pdfmatch{^([0-9]+([.,][0-9]+)?|[.,][0-9]+)%
- (em|ex|cm|mm|in|pc|pt|dd|cc|bp|sp|nd|nc|px)? *$}{#1}\relax
- \expandafter\@secondoftwo
- \else
- \expandafter\@firstoftwo
- \fi
- }
- }
-}{
- \def\MT@ifdimen#1{%
- \setbox\z@=\hbox{%
- \MT@count=1#1\relax
- \ifnum\MT@count=\@ne
- \aftergroup\@secondoftwo
- \else
- \aftergroup\@firstoftwo
- \fi
- }%
- }
-}
\def\MT@ifdim#1#2#3{%
\ifdim #1\p@ #2 #3\p@
\expandafter\@firstoftwo
@@ -356,29 +257,6 @@
\expandafter\@secondoftwo
\fi
}
-\MT@requires@pdftex5{
- \MT@requires@luatex{
- \def\MT@ifstreq#1#2{\csname\MT@lua{microtype.ifstreq([[#1]],[[#2]])}\endcsname}
- }{
- \def\MT@ifstreq#1#2{%
- \ifcase\pdfstrcmp{#1}{#2}\relax
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- }
- }
-}{
- \def\MT@ifstreq#1#2{%
- \edef\MT@res@a{#1}%
- \edef\MT@res@b{#2}%
- \ifx\MT@res@a\MT@res@b
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- }
-}
\def\MT@xadd#1#2{%
\ifx#1\relax
\xdef#1{#2}%
@@ -480,7 +358,6 @@
\advance\@tempcnta \@ne
\ifnum\@tempcnta < #2\MT@repeat
}
-\def\MT@do@font{\MT@while@num\z@\@cclvi}
\newcount\MT@count
\def\MT@increment#1{%
^^X \edef#1{\number\numexpr #1 + 1\relax}%
@@ -532,7 +409,7 @@
\@ifl@aded{tex}{wordcount}{%
\MT@warning@nl{Detected the `wordcount' utility.\MessageBreak
Disabling `\MT@MT', since it wouldn't work}%
- \MT@clear@options\MT@restore@catcodes\endinput}\relax
+ \MT@clear@options\endinput}\relax
\let\MT@setup@\@empty
\def\MT@addto@setup{\g@addto@macro\MT@setup@}
\def\MT@with@package@T#1{\@ifpackageloaded{#1}\@firstofone\@gobble}
@@ -543,42 +420,13 @@
\ifMT@inlist@\expandafter\@gobble\fi
}\@gobble
}
-\MT@let@nc{ver@letterspace.sty}\@empty
-\MT@requires@pdftex5{
- \def\MT@ledmac@setup{%
- \ifMT@protrusion
- \MT@ifdefined@c@TF\l@dunhbox@line{%
- \MT@info@nl{Patching ledmac to enable character protrusion}%
- \newdimen\MT@led@kern
- \let\MT@led@unhbox@line\l@dunhbox@line
- \renewcommand*{\l@dunhbox@line}[1]{%
- \ifhbox##1%
- \MT@led@kern=\rightmarginkern##1%
- \kern\leftmarginkern##1%
- \MT@led@unhbox@line##1%
- \kern\MT@led@kern
- \fi
- }%
- }{%
- \MT@warning@nl{%
- Character protrusion in paragraphs with line\MessageBreak
- numbering will only work if you update ledmac}%
- }%
- \fi
- }
-}{
- \def\MT@ledmac@setup{%
- \ifMT@protrusion
- \MT@warning@nl{%
- The pdftex version you are using does not allow\MessageBreak
- character protrusion in paragraphs with line\MessageBreak
- numbering by the `ledmac' package.\MessageBreak
- Upgrade pdftex to version 1.30 or later}%
- \fi
- }
-}
\def\MT@restore@p@h{\chardef\%`\% \chardef\#`\# }
+\newif\ifMT@xunicode
+\newif\ifMT@fontspec
+\MT@with@package@T{xunicode}\MT@xunicodetrue
+\MT@with@package@T{fontspec}\MT@fontspectrue
\def\MT@setupfont@hook{%
+ \ifMT@fontspec\MT@font\fi
\MT@if@false
\MT@with@babel@and@T{spanish} \MT@if@true
\MT@with@babel@and@T{galician}\MT@if@true
@@ -587,8 +435,9 @@
\MT@with@package@T{csquotes}{%
\@ifpackagelater{csquotes}{2005/05/11}\@disablequotes\relax}%
\MT@if@false
- \MT@with@package@T{hyperref}\MT@if@true
- \MT@with@package@T{tex4ht} \MT@if@true
+ \MT@with@package@T{hyperref} \MT@if@true
+ \MT@with@package@T{tex4ht} \MT@if@true
+ \MT@with@package@T{mathastext}\MT@if@true
\ifMT@if@\MT@restore@p@h\fi
}
\MT@addto@setup{%
@@ -600,7 +449,12 @@ So does the `\MT@MT' package. Using both packages at the same\MessageBreak
time will almost certainly lead to undesired results. Have your choice!}%
}%
\MT@with@package@T{ledmac}\MT@ledmac@setup
+ \MT@with@package@T{xunicode}\MT@xunicodetrue
+ \MT@with@package@T{fontspec}\MT@fontspectrue
\let\MT@setupfont@hook\@empty
+ \ifMT@fontspec
+ \g@addto@macro\MT@setupfont@hook{\MT@font}%
+ \fi
\MT@if@false
\MT@with@babel@and@T{spanish} \MT@if@true
\MT@with@babel@and@T{galician}\MT@if@true
@@ -630,6 +484,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@if@true
}%
\MT@with@package@T{tex4ht}\MT@if@true
+ \MT@with@package@T{mathastext}\MT@if@true
\ifMT@if@\g@addto@macro\MT@setupfont@hook\MT@restore@p@h\fi
\MT@with@package@T{listings}{%
\g@addto@macro\MT@cfg@catcodes{%
@@ -639,6 +494,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
}%
\g@addto@macro\MT@setupfont@hook{%
\catcode`\\\z@
+ \def\space{ }%
\let\lst@ProcessLetter\@empty
}%
}%
@@ -662,66 +518,13 @@ time will almost certainly lead to undesired results. Have your choice!}%
}%
}
\expandafter\ifx\the\font\nullfont\normalfont\fi
-\def\MT@setupfont{\MT@setupfont@hook}
-\MT@requires@pdftex7
- {\g@addto@macro\MT@setupfont\MT@copy@font}\relax
-\g@addto@macro\MT@setupfont{%
- \MT@exp@two@c\MT@split@name\string\MT@font/\@nil
- \MT@exp@one@n\MT@find@file\MT@family
- \ifx\MT@familyalias\@empty \else
- \MT@exp@one@n\MT@find@file\MT@familyalias\fi
-}
-\MT@requires@pdftex6
- {\g@addto@macro\MT@setupfont\MT@tracking}\relax
-\g@addto@macro\MT@setupfont{%
- \MT@check@font
- \ifMT@inlist@
- \else
- \MT@vinfo{Setting up font `\MT@@font'\on@line}%
- \MT@protrusion
- \MT@expansion
-}
-\MT@requires@pdftex6
- {\g@addto@macro\MT@setupfont{\MT@spacing\MT@kerning}}\relax
-\MT@requires@pdftex5
- {\g@addto@macro\MT@setupfont\MT@noligatures}\relax
-\g@addto@macro\MT@setupfont{%
- \MT@register@font
- \fi
-}
-\let\MT@copy@font\relax
-\MT@requires@pdftex7{
-\def\MT@copy@font@{%
- \xdef\MT@font@copy{\csname\MT@@font/\MT@pr@context/\MT@ex@context\endcsname}%
- \expandafter\ifx\MT@font@copy\relax
- \edef\MT@font@orig{\csname\expandafter\string\font@name @orig\endcsname}%
- \expandafter\ifx\MT@font@orig\relax
- \MT@exp@two@c\MT@glet\MT@font@orig\font@name
- \else
- \MT@exp@two@c\let\font@name\MT@font@orig
- \fi
- \global\MT@exp@two@c\pdfcopyfont\MT@font@copy\font@name
- \MT@map@clist@c\MT@active@features{%
- \MT@exp@cs\ifx{MT@\@nameuse{MT@abbr@##1}}\relax\else
- \def\@tempa{##1}%
- \MT@exp@cs\MT@map@tlist@c{MT@##1@doc@contexts}\MT@rem@from@list
- \fi
- }%
- \fi
- \MT@exp@two@c\let\MT@font\MT@font@copy
- \let\font@name\MT@font@copy
- \aftergroup\let\aftergroup\font@name\aftergroup\MT@font@copy
-}
-\def\MT@rem@from@list#1{%
- \MT@exp@cs\ifx{MT@\@tempa @#1font@list}\relax\else
- \expandafter\MT@exp@one@n\expandafter\MT@rem@from@clist\expandafter
- \MT@font \csname MT@\@tempa @#1font@list\endcsname
- \fi
-}
-}\relax
\def\MT@split@name#1/#2/#3/#4/#5/#6\@nil{%
\def\MT@encoding{#1}%
- \def\MT@family {#2}%
+ \ifMT@fontspec
+ \edef\MT@family{\MT@scrubfeature#2()\relax}%
+ \else
+ \def\MT@family{#2}%
+ \fi
\def\MT@series {#3}%
\def\MT@shape {#4}%
\def\MT@size {#5}%
@@ -729,6 +532,13 @@ time will almost certainly lead to undesired results. Have your choice!}%
{\MT@let@cn\MT@familyalias{MT@\MT@family @alias}}%
{\let\MT@familyalias\@empty}%
}
+\def\MT@scrubfeature#1(#2)#3\relax{#1}
+\def\MT@scrubfeatures#1(#2)#3\relax{%
+ #1%
+ \ifx\relax#3\relax\else
+ \MT@scrubfeatures#3\relax
+ \fi
+}
\newif\ifMT@do
\def\MT@maybe@do#1{%
\csname ifMT@\csname MT@abbr@#1\endcsname\endcsname
@@ -811,110 +621,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\fi
}%
}
-\def\MT@protrusion{\MT@maybe@do{pr}}
-\def\MT@set@pr@codes{%
- \MT@if@list@exists{%
- \MT@get@font@dimen@six{%
- \MT@get@opt
- \MT@reset@pr@codes
- \MT@get@inh@list
- \MT@set@inputenc{c}%
- \MT@load@list\MT@pr@c@name
- \MT@set@listname
- \MT@let@cn\@tempc{MT@pr@c@\MT@pr@c@name}%
- \expandafter\MT@set@codes\@tempc,\relax,}%
- }\MT@reset@pr@codes
-}
-\def\MT@get@font@dimen@six{%
- \ifnum\fontdimen6\MT@font=\z@
- \MT@warning@nl{%
- Font `\MT@@font' does not specify its\MessageBreak
- \@backslashchar fontdimen 6 (width of an `em')! Therefore,\MessageBreak
- \@nameuse{MT@abbr@\MT@feat} will not work with this font}%
- \expandafter\@gobble
- \else
- \edef\MT@dimen@six{\number\fontdimen6\MT@font}%
- \expandafter\@firstofone
- \fi
-}
-\def\MT@set@all@pr#1#2{%
- \let\MT@temp\@empty
- \MT@ifempty{#1}\relax{\g@addto@macro\MT@temp{\lpcode\MT@font\@tempcnta=#1\relax}}%
- \MT@ifempty{#2}\relax{\g@addto@macro\MT@temp{\rpcode\MT@font\@tempcnta=#2\relax}}%
- \MT@do@font\MT@temp
-}
-\def\MT@reset@pr@codes@{\MT@set@all@pr\z@\z@}
-\let\MT@reset@pr@codes\relax
-\def\MT@the@pr@code{\@tempcntb}
-\MT@requires@pdftex6{
- \def\MT@the@pr@code@tr{%
- \numexpr\@tempcntb+\MT@letterspace@/2\relax
- }
-}\relax
-\def\MT@set@codes#1,{%
- \ifx\relax#1\@empty\else
- \MT@split@codes #1==\relax
- \expandafter\MT@set@codes
- \fi
-}
-\def\MT@split@codes#1=#2=#3\relax{%
- \def\@tempa{#1}%
- \ifx\@tempa\@empty \else
- \MT@get@slot
- \ifnum\MT@char > \m@ne
- \MT@get@char@unit
- \csname MT@\MT@feat @split@val\endcsname#2\relax
- \fi
- \fi
-}
-\def\MT@pr@split@val#1,#2\relax{%
- \def\@tempb{#1}%
- \MT@ifempty\@tempb\relax{%
- \MT@scale@to@em
- \lpcode\MT@font\MT@char=\MT@the@pr@code
- }%
- \def\@tempb{#2}%
- \MT@ifempty\@tempb\relax{%
- \MT@scale@to@em
- \rpcode\MT@font\MT@char=\MT@the@pr@code
- }%
- \MT@ifdefined@c@T\MT@pr@inh@name{%
- \MT@ifdefined@n@T{MT@inh@\MT@pr@inh@name @\MT@char @}{%
- \MT@exp@cs\MT@map@tlist@c
- {MT@inh@\MT@pr@inh@name @\MT@char @}%
- \MT@set@pr@heirs
- }%
- }%
-}
-\MT@requires@pdftex3{
- \def\MT@scale@to@em{%
- \@tempcntb=\MT@count\relax
- \MT@scale\@tempcntb \@tempb \MT@dimen@six
- \ifnum\@tempcntb=\z@ \else
- \MT@scale@factor
- \fi
- }
- \def\MT@get@charwd{%
-^^X \MT@count=\fontcharwd\MT@font\MT@char\relax
-^^Q \setbox\z@=\hbox{\MT@font \char\MT@char}%
-^^Q \MT@count=\wd\z@
- \ifnum\MT@count=\z@ \MT@info@missing@char \fi
- }
- \MT@requires@pdftex6{
- \g@addto@macro\MT@get@charwd{%
- \MT@ifdefined@c@T\MT@letterspace@
- {\advance\MT@count -\dimexpr\MT@letterspace@ sp *\dimexpr 1em/1000\relax}%
- }
- }\relax
-}{
- \def\MT@scale@to@em{%
- \MT@count=\@tempb\relax
- \ifnum\MT@count=\z@ \else
- \MT@scale@factor
- \fi
- }
- \def\MT@get@charwd{\MT@count=\MT@dimen@six}
-}
+\newif\ifMT@nofamily
\def\MT@get@font@dimen#1{%
\ifnum\fontdimen#1\MT@font=\z@
\MT@warning@nl{Font `\MT@@font' does not specify its\MessageBreak
@@ -926,7 +633,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
}
\def\MT@info@missing@char{%
\MT@info@nl{Character `\the\MT@toks'
-^^X \iffontchar\MT@font\MT@char
+^^X \iffontchar\MT@font\MT@char@
has a width of 0pt
^^X \else is missing\fi
^^Q \MessageBreak (it's probably missing)
@@ -1054,554 +761,13 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@cfg@catcodes
\inputencoding{\@nameuse{\@tempa}}%
}
-\def\MT@set@pr@heirs#1{%
- \lpcode\MT@font#1=\lpcode\MT@font\MT@char
- \rpcode\MT@font#1=\rpcode\MT@font\MT@char
-}
-\def\MT@preset@pr{%
- \expandafter\expandafter\expandafter\MT@preset@pr@
- \csname MT@pr@c@\MT@pr@c@name @preset\endcsname\@nil
-}
-\def\MT@preset@pr@#1,#2\@nil{%
- \ifx\MT@pr@unit@\@empty
- \MT@warn@preset@towidth{pr}%
- \let\MT@preset@aux\MT@preset@aux@factor
- \else
- \def\MT@preset@aux{\MT@preset@aux@space2}%
- \fi
- \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux{#1}\@tempa}%
- \MT@ifempty{#2}{\let\@tempb\@empty}{\MT@preset@aux{#2}\@tempb}%
- \MT@set@all@pr\@tempa\@tempb
-}
-\def\MT@preset@aux@factor#1#2{%
- \@tempcntb=#1\relax
- \MT@scale@factor
- \edef#2{\number\@tempcntb}%
-}
-\def\MT@preset@aux@space#1#2#3{%
- \def\@tempb{#2}%
- \MT@get@space@unit#1%
- \MT@scale@to@em
- \edef#3{\number\@tempcntb}%
-}
-\def\MT@warn@preset@towidth#1{%
- \MT@warning@nl{%
- Cannot preset characters relative to their widths\MessageBreak
- for \@nameuse{MT@abbr@#1} list `\@nameuse{MT@#1@c@name}'. Presetting them%
- \MessageBreak relative to 1em instead}%
-}
-\def\MT@expansion{\MT@maybe@do{ex}}
-\def\MT@set@ex@codes@s{%
- \MT@if@list@exists{%
- \MT@get@ex@opt
- \let\MT@get@char@unit\relax
- \MT@reset@ef@codes
- \MT@get@inh@list
- \MT@set@inputenc{c}%
- \MT@load@list\MT@ex@c@name
- \MT@set@listname
- \MT@let@cn\@tempc{MT@ex@c@\MT@ex@c@name}%
- \expandafter\MT@set@codes\@tempc,\relax,%
- \MT@expandfont
- }\relax
-}
\newif\ifMT@nonselected
-\def\MT@set@ex@codes@n{%
- \MT@nonselectedtrue
- \MT@if@list@exists
- \MT@get@ex@opt
- {%
- \let\MT@stretch@ \MT@stretch
- \let\MT@shrink@ \MT@shrink
- \let\MT@step@ \MT@step
- \let\MT@auto@ \MT@auto
- \let\MT@ex@factor@\MT@ex@factor
- }%
- \MT@reset@ef@codes
- \MT@expandfont
- \MT@nonselectedfalse
-}
-\let\MT@set@ex@codes\MT@set@ex@codes@n
-\def\MT@expandfont{%
- \pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@ \MT@auto@\relax
-}
-\def\MT@set@all@ex#1{%
- \MT@do@font{\efcode\MT@font\@tempcnta=#1\relax}%
-}
-\def\MT@reset@ef@codes@{\MT@set@all@ex\MT@ex@factor@}
-\MT@requires@pdftex4{
- \def\MT@reset@ef@codes{%
- \ifnum\MT@ex@factor@=\@m \else
- \MT@reset@ef@codes@
- \fi
- }
-}{
- \let\MT@reset@ef@codes\MT@reset@ef@codes@
-}
-\def\MT@ex@split@val#1\relax{%
- \@tempcntb=#1\relax
- \ifnum\MT@ex@factor@=\@m \else
- \MT@scale\@tempcntb \MT@ex@factor@ \@m
- \fi
- \ifnum\@tempcntb > \MT@ex@max
- \MT@warn@ex@too@large\MT@ex@max
- \else
- \ifnum\@tempcntb < \MT@ex@min
- \MT@warn@ex@too@large\MT@ex@min
- \fi
- \fi
- \efcode\MT@font\MT@char=\@tempcntb
- \MT@ifdefined@c@T\MT@ex@inh@name{%
- \MT@ifdefined@n@T{MT@inh@\MT@ex@inh@name @\MT@char @}{%
- \MT@exp@cs\MT@map@tlist@c{MT@inh@\MT@ex@inh@name @\MT@char @}\MT@set@ex@heirs
- }%
- }%
-}
-\def\MT@warn@ex@too@large#1{%
- \MT@warning@nl{Expansion factor \number\@tempcntb\space too large for
- character\MessageBreak `\the\MT@toks' in \MT@curr@list@name.\MessageBreak
- Setting it to the maximum of \number#1}%
- \@tempcntb=#1\relax
-}
-\def\MT@get@ex@opt{%
- \MT@set@listname
- \MT@ifdefined@n@TF{MT@ex@c@\MT@ex@c@name @factor}{%
- \MT@let@cn\MT@ex@factor@{MT@ex@c@\MT@ex@c@name @factor}%
- \MT@vinfo{... : Multiplying expansion factors by \number\MT@ex@factor@/1000}%
- }{%
- \let\MT@ex@factor@\MT@ex@factor
- }%
- \MT@get@ex@opt@{stretch}{Setting stretch limit to \number\MT@stretch@}%
- \MT@get@ex@opt@{shrink} {Setting shrink limit to \number\MT@shrink@}%
- \MT@get@ex@opt@{step} {Setting expansion step to \number\MT@step@}%
- \def\@tempa{autoexpand}%
- \MT@get@ex@opt@{auto}{\ifx\@tempa\MT@auto@ En\else Dis\fi abling automatic expansion}%
- \MT@ifdefined@n@T{MT@ex@c@\MT@ex@c@name @preset}{%
- \MT@preset@ex
- \let\MT@reset@ef@codes\relax
- }%
-}
-\def\MT@get@ex@opt@#1#2{%
- \MT@ifdefined@n@TF{MT@ex@c@\MT@ex@c@name @#1}{%
- \MT@let@nn{MT@#1@}{MT@ex@c@\MT@ex@c@name @#1}%
- \MT@vinfo{... : #2}%
- }{%
- \MT@let@nn{MT@#1@}{MT@#1}%
- }%
-}
-\def\MT@set@ex@heirs#1{%
- \efcode\MT@font#1=\efcode\MT@font\MT@char
-}
-\def\MT@preset@ex{%
- \@tempcntb=\csname MT@ex@c@\MT@ex@c@name @preset\endcsname\relax
- \MT@scale@factor
- \MT@set@all@ex\@tempcntb
-}
-\MT@requires@pdftex6{
-\def\MT@spacing{\MT@maybe@do{sp}}
-\def\MT@set@sp@codes{%
- \MT@if@list@exists{%
- \MT@get@font@dimen@six{%
- \MT@get@opt
- \MT@reset@sp@codes
- \MT@get@inh@list
- \MT@set@inputenc{c}%
- \MT@load@list\MT@sp@c@name
- \MT@set@listname
- \MT@let@cn\@tempc{MT@sp@c@\MT@sp@c@name}%
- \expandafter\MT@set@codes\@tempc,\relax,}%
- }\MT@reset@sp@codes
-}
-\def\MT@sp@split@val#1,#2,#3\relax{%
- \def\@tempb{#1}%
- \MT@ifempty\@tempb\relax{%
- \MT@get@space@unit2%
- \MT@scale@to@em
- \knbscode\MT@font\MT@char=\@tempcntb
- }%
- \def\@tempb{#2}%
- \MT@ifempty\@tempb\relax{%
- \MT@get@space@unit3%
- \MT@scale@to@em
- \stbscode\MT@font\MT@char=\@tempcntb
- }%
- \def\@tempb{#3}%
- \MT@ifempty\@tempb\relax{%
- \MT@get@space@unit4%
- \MT@scale@to@em
- \shbscode\MT@font\MT@char=\@tempcntb
- }%
- \MT@ifdefined@c@T\MT@sp@inh@name{%
- \MT@ifdefined@n@T{MT@inh@\MT@sp@inh@name @\MT@char @}{%
- \MT@exp@cs\MT@map@tlist@c{MT@inh@\MT@sp@inh@name @\MT@char @}\MT@set@sp@heirs
- }%
- }%
-}
-\def\MT@set@sp@heirs#1{%
- \knbscode\MT@font#1=\knbscode\MT@font\MT@char
- \stbscode\MT@font#1=\stbscode\MT@font\MT@char
- \shbscode\MT@font#1=\shbscode\MT@font\MT@char
-}
-\def\MT@set@all@sp#1#2#3{%
- \let\MT@temp\@empty
- \MT@ifempty{#1}\relax{\g@addto@macro\MT@temp{\knbscode\MT@font\@tempcnta=#1\relax}}%
- \MT@ifempty{#2}\relax{\g@addto@macro\MT@temp{\stbscode\MT@font\@tempcnta=#2\relax}}%
- \MT@ifempty{#3}\relax{\g@addto@macro\MT@temp{\shbscode\MT@font\@tempcnta=#3\relax}}%
- \MT@do@font\MT@temp
-}
-\def\MT@reset@sp@codes@{\MT@set@all@sp\z@\z@\z@}
-\let\MT@reset@sp@codes\relax
-\def\MT@preset@sp{%
- \expandafter\expandafter\expandafter\MT@preset@sp@
- \csname MT@sp@c@\MT@sp@c@name @preset\endcsname\@nil
-}
-\def\MT@preset@sp@#1,#2,#3\@nil{%
- \ifx\MT@sp@unit@\@empty
- \MT@warn@preset@towidth{sp}%
- \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux@factor{#1}\@tempa}%
- \MT@ifempty{#2}{\let\@tempc\@empty}{\MT@preset@aux@factor{#2}\@tempc}%
- \MT@ifempty{#3}{\let\@tempb\@empty}{\MT@preset@aux@factor{#3}\@tempb}%
- \else
- \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux@space2{#1}\@tempa}%
- \MT@ifempty{#2}{\let\@tempc\@empty}{\MT@preset@aux@space3{#2}\@tempc}%
- \MT@ifempty{#3}{\let\@tempb\@empty}{\MT@preset@aux@space4{#3}\@tempb}%
- \fi
- \MT@set@all@sp\@tempa\@tempc\@tempb
-}
-}\relax
-\MT@requires@pdftex6{
-\def\MT@kerning{\MT@maybe@do{kn}}
-\def\MT@set@kn@codes{%
- \MT@if@list@exists{%
- \MT@get@font@dimen@six{%
- \MT@get@opt
- \MT@reset@kn@codes
- \MT@get@inh@list
- \MT@set@inputenc{c}%
- \MT@load@list\MT@kn@c@name
- \MT@set@listname
- \MT@let@cn\@tempc{MT@kn@c@\MT@kn@c@name}%
- \expandafter\MT@set@codes\@tempc,\relax,}%
- }\MT@reset@kn@codes
-}
-\def\MT@kn@split@val#1,#2\relax{%
- \def\@tempb{#1}%
- \MT@ifempty\@tempb\relax{%
- \MT@get@space@unit2%
- \MT@scale@to@em
- \knbccode\MT@font\MT@char=\@tempcntb
- }%
- \def\@tempb{#2}%
- \MT@ifempty\@tempb\relax{%
- \MT@get@space@unit2%
- \MT@scale@to@em
- \knaccode\MT@font\MT@char=\@tempcntb
- }%
- \MT@ifdefined@c@T\MT@kn@inh@name{%
- \MT@ifdefined@n@T{MT@inh@\MT@kn@inh@name @\MT@char @}{%
- \MT@exp@cs\MT@map@tlist@c{MT@inh@\MT@kn@inh@name @\MT@char @}\MT@set@kn@heirs
- }%
- }%
-}
-\def\MT@set@kn@heirs#1{%
- \knbccode\MT@font#1=\knbccode\MT@font\MT@char
- \knaccode\MT@font#1=\knaccode\MT@font\MT@char
-}
-\def\MT@set@all@kn#1#2{%
- \let\MT@temp\@empty
- \MT@ifempty{#1}\relax{\g@addto@macro\MT@temp{\knbccode\MT@font\@tempcnta=#1\relax}}%
- \MT@ifempty{#2}\relax{\g@addto@macro\MT@temp{\knaccode\MT@font\@tempcnta=#2\relax}}%
- \MT@do@font\MT@temp
-}
-\def\MT@reset@kn@codes@{\MT@set@all@kn\z@\z@}
-\let\MT@reset@kn@codes\relax
-\def\MT@preset@kn{%
- \expandafter\expandafter\expandafter\MT@preset@kn@
- \csname MT@kn@c@\MT@kn@c@name @preset\endcsname\@nil
-}
-\def\MT@preset@kn@#1,#2\@nil{%
- \ifx\MT@kn@unit@\@empty
- \MT@warn@preset@towidth{kn}%
- \let\MT@preset@aux\MT@preset@aux@factor
- \else
- \def\MT@preset@aux{\MT@preset@aux@space2}%
- \fi
- \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux{#1}\@tempa}%
- \MT@ifempty{#2}{\let\@tempb\@empty}{\MT@preset@aux{#2}\@tempb}%
- \MT@set@all@kn\@tempa\@tempb
-}
-}\relax
-\MT@requires@pdftex6{
-\let\MT@tr@font@list\@empty
-\def\MT@tracking@{%
- \MT@exp@one@n\MT@in@clist\MT@font\MT@tr@font@list
- \ifMT@inlist@\else
- \MT@maybe@do{tr}%
- \ifMT@do\else
- \xdef\MT@tr@font@list{\MT@tr@font@list\MT@font,}%
- \fi
- \fi
-}
-\let\MT@tracking
- \MT@tracking@
-\def\MT@set@tr@codes{%
- \MT@vinfo{Tracking font `\MT@@font'\on@line}%
- \MT@get@font@dimen@six{%
- \MT@if@list@exists
- \MT@get@tr@opt
- \relax
- \MT@ifdefined@c@TF\MT@letterspace@\relax{\let\MT@letterspace@\MT@letterspace}%
- \ifnum\MT@letterspace@=\z@
- \MT@set@tr@zero
- \else
- \MT@vinfo{... Tracking by \number\MT@letterspace@}%
- \MT@warn@tracking@DVI
- \xdef\MT@lsfont{\csname\expandafter\string\font@name
- /\number\MT@letterspace@ ls\endcsname}%
- \expandafter\ifx\MT@lsfont\relax
- \MT@get@ls@basefont
- \global\expandafter\letterspacefont\MT@lsfont\font@name\MT@letterspace@
- \MT@ifdefined@c@TF\MT@tr@ispace
- {\let\@tempa\MT@tr@ispace}%
- {\edef\@tempa{\MT@letterspace@*,,}}%
- \MT@ifdefined@c@TF\MT@tr@ospace
- {\edef\@tempa{\@tempa,\MT@tr@ospace}}%
- {\edef\@tempa{\@tempa,,,}}%
- \expandafter\MT@tr@set@space\@tempa,%
- \MT@ifdefined@c@TF\MT@tr@okern{\let\@tempa\MT@tr@okern}{\def\@tempa{*,*}}%
- \expandafter\MT@tr@set@okern\@tempa,%
- \MT@ifdefined@c@T\MT@tr@ligatures\MT@tr@noligatures
- \MT@do@font{\lpcode\MT@lsfont\@tempcnta=\numexpr\MT@letterspace@/2\relax
- \rpcode\MT@lsfont\@tempcnta=\numexpr\MT@letterspace@/2\relax}%
- \let\MT@the@pr@code\MT@the@pr@code@tr
- \fi
- \aftergroup\MT@set@lsfont
- \let\MT@font\MT@lsfont
- \xdef\MT@set@curr@ls{\def\noexpand\MT@curr@ls{\MT@letterspace@}}%
- \aftergroup\MT@set@curr@ls
- \MT@outer@space=\csname MT@outer@space\expandafter\string\font@name\endcsname\relax
- \xdef\MT@set@curr@os{\MT@outer@space=\the\MT@outer@space\relax}%
- \MT@tr@outer@l
- \ifx\MT@ls@adjust\@empty
- \MT@outer@kern=-\dimexpr\MT@letterspace@ sp * \fontdimen6\font@name/2000\relax
- \MT@ls@outer@k
- \else
- \MT@outer@kern=\expandafter\expandafter\expandafter\@firstoftwo
- \csname MT@outer@kern\expandafter\string\font@name\endcsname\relax
- \ifdim\MT@outer@kern=\z@\else \MT@ls@outer@k \fi
- \MT@outer@kern=\expandafter\expandafter\expandafter\@secondoftwo
- \csname MT@outer@kern\expandafter\string\font@name\endcsname\relax
- \fi
- \xdef\MT@set@curr@ok{\MT@outer@kern=\the\MT@outer@kern\relax}%
- \aftergroup\aftergroup\aftergroup\MT@ls@aftergroup
- \fi
- }%
-}
\MT@addto@setup{%
\@ifpackageloaded{tikz}
{\def\MT@ls@aftergroup{%
\ifnum\tikz@expandcount>\z@ \else
\MT@set@curr@os\MT@set@curr@ok\expandafter\MT@tr@outer@r\fi}}
{\def\MT@ls@aftergroup{\MT@set@curr@os\MT@set@curr@ok\MT@tr@outer@r}}}
-\def\MT@get@tr@opt{%
- \MT@set@listname
- \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name}{%
- \MT@let@cn\MT@letterspace{MT@tr@c@\MT@tr@c@name}%
- \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name @unit}{%
- \MT@let@cn\MT@tr@unit@{MT@tr@c@\MT@tr@c@name @unit}%
- \ifdim\MT@tr@unit@=1em
- \let\MT@tr@unit@\@undefined
- \else
- \MT@let@cn\@tempb{MT@tr@c@\MT@tr@c@name}%
- \MT@get@unit\MT@tr@unit@
- \let\MT@tr@factor@\@m
- \MT@scale@to@em
- \edef\MT@letterspace{\number\@tempcntb}%
- \fi
- }%
- }%
- \MT@get@tr@opt@{spacing} {ispace}%
- \MT@get@tr@opt@{outerspacing}{ospace}%
- \MT@get@tr@opt@{outerkerning}{okern}%
- \MT@get@tr@opt@{noligatures} {ligatures}%
-}
-\def\MT@get@tr@opt@#1#2{%
- \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name @#1}%
- {\MT@let@nn{MT@tr@#2}{MT@tr@c@\MT@tr@c@name @#1}}%
-}
-\def\MT@set@lsfont{\MT@exp@two@c\let\font@name\MT@lsfont}
-\DeclareRobustCommand\lsstyle{%
- \not@math@alphabet\lsstyle\textls
- \def\MT@feat{tr}%
- \let\MT@tracking\MT@set@tr@codes
- \selectfont
-}
-\DeclareRobustCommand\lslig[1]{%
- {\MT@ifdefined@c@TF\MT@curr@ls{%
- \escapechar\m@ne
- \MT@get@ls@basefont
- \MT@outer@kern=\dimexpr\MT@curr@ls sp * \fontdimen6\font@name/2000\relax
- \kern\MT@outer@kern
- \font@name #1%
- \kern\MT@outer@kern%
- }{#1}}%
-}
-\def\MT@get@ls@basefont{%
- \xdef\MT@ls@basefont{\csname\expandafter\string\font@name @base\endcsname}%
- \expandafter\ifx\MT@ls@basefont\relax
- \MT@exp@two@c\MT@glet\MT@ls@basefont\font@name
- \else
- \MT@exp@two@c\let\font@name\MT@ls@basefont
- \fi
-}
-\def\MT@set@lsbasefont{\MT@exp@two@c\let\font@name\MT@ls@basefont}
-\def\MT@set@tr@zero{%
- \xdef\MT@ls@basefont{\csname\expandafter\string\font@name @base\endcsname}%
- \expandafter\ifx\MT@ls@basefont\relax \else
- \aftergroup\MT@set@lsbasefont
- \fi
-}
-\MT@requires@pdftex7{
- \def\MT@tr@noligatures{%
- \ifx\MT@tr@ligatures\@empty
- \MT@noligatures@\MT@lsfont\@undefined
- \else
- \MT@noligatures@\MT@lsfont\MT@tr@ligatures
- \fi
- }
-}{
- \def\MT@tr@noligatures{%
- \MT@warning@nl{%
- Disabling selected ligatures is only possible since\MessageBreak
- pdftex 1.40.4. Disabling all ligatures instead}%
- \MT@glet\MT@tr@noligatures\relax
- }
-}
-\newskip\MT@outer@space
-\def\MT@tr@set@space#1,#2,#3,#4,#5,#6,{%
- \let\MT@temp\@empty
- \MT@tr@set@space@{#1}{#4}{2}\@empty
- \MT@tr@set@space@{#2}{#5}{3}\@plus
- \MT@tr@set@space@{#3}{#6}{4}\@minus
- \MT@glet@nc{MT@outer@space\expandafter\string\font@name}\MT@temp
-}
-\def\MT@tr@set@space@#1#2#3#4{%
- \MT@ifempty{#2}{%
- \MT@ifempty{#1}{%
- \edef\MT@temp{\MT@temp#4\the\fontdimen#3\MT@lsfont}%
- }{%
- \MT@tr@set@space@@{#1}{#3}{1000}%
- \edef\MT@temp{\MT@temp#4\the\@tempdima}%
- \fontdimen#3\MT@lsfont=\@tempdima
- }%
- }{%
- \MT@tr@set@space@@{#2}{#3}{2000}%
- \edef\MT@temp{\MT@temp#4\the\@tempdima}%
- \MT@ifempty{#1}\relax{%
- \MT@tr@set@space@@{#1}{#3}{1000}%
- \fontdimen#3\MT@lsfont=\@tempdima
- }%
- }%
-}
-\def\MT@tr@set@space@@#1#2#3{%
- \MT@test@ast#1*\@nil{%
- \MT@ifdefined@c@TF\MT@tr@unit@
- {\edef\@tempb{#1}\MT@scale@to@em}
- {\@tempcntb=#1\relax}%
- \@tempdima=\dimexpr \dimexpr\@tempcntb sp*\MT@dimen@six/1000\relax
- -\fontdimen#2\MT@lsfont\relax
- \ifnum#2=\tw@
- \advance\@tempdima -\dimexpr\MT@letterspace@ sp*\MT@dimen@six/#3\relax
- \fi
- \@tempdima=\dimexpr \fontdimen#2\MT@lsfont+\@tempdima\relax
- }{%
- \MT@ifempty\@tempa{\let\@tempa\MT@letterspace@}\relax
- \@tempdima=\dimexpr \numexpr1000+\@tempa sp *\fontdimen#2\MT@lsfont/1000\relax
- }%
-}
-\def\MT@tr@outer@l{%
- \ifhmode
- \ifdim\lastskip>5sp
- \edef\x{\the\lastskip minus 0pt}%
- \setbox\z@\hbox{\MT@outer@space=\x}%
- \ifdim\wd\z@>\z@
- \unskip \hskip\MT@outer@space\relax
- \let\MT@ls@outer@k\relax
- \else
- \ifdim\lastskip=%
- \ifnum\spacefactor<2000
- \spaceskip
- \else
- \ifdim\xspaceskip=\z@
- \dimexpr\spaceskip+\fontdimen7\font@name\relax
- \else
- \xspaceskip
- \fi
- \fi
- \unskip \hskip\MT@outer@space\relax
- \let\MT@ls@outer@k\relax
- \fi
- \fi
- \fi
- \fi
-}
-\def\MT@tr@outer@r{%
- \futurelet\MT@tr@outer@next\MT@tr@outer@r@
-}
-\def\MT@tr@outer@r@{%
- \def\MT@temp*{}%
- \ifmmode \else
- \ifnum\currentgrouptype=10 \else
- \def\MT@temp*##1{\ifhmode\hskip\MT@outer@space
- \fi}%
- \ifcat\egroup\noexpand\MT@tr@outer@next
- \ifhmode\unkern\fi\egroup
- \MT@set@curr@ok \MT@set@curr@os
- \def\MT@temp*{\afterassignment\MT@tr@outer@r\let\MT@temp=}%
- \else
- \ifx\maybe@ic\MT@tr@outer@next
- \MT@set@curr@ok \MT@set@curr@os
- \def\MT@temp*{\afterassignment\MT@tr@outer@icr\let\MT@temp=}%
- \else
- \ifx\check@icr\MT@tr@outer@next
- \def\MT@temp*{\aftergroup\MT@tr@outer@r\check@icr\let\MT@temp=}%
- \else
- \ifx\@sptoken\MT@tr@outer@next
- \def\MT@temp* {\ifhmode\hskip\MT@outer@space
- \fi}%
- \else
- \ifx~\MT@tr@outer@next
- \def\MT@temp*~{\nobreak\hskip\MT@outer@space
- }%
- \else
- \ifx\ \MT@tr@outer@next \else
- \ifx\space\MT@tr@outer@next \else
- \ifx\@xobeysp\MT@tr@outer@next \else
- \def\MT@temp*{\ifdim\MT@outer@kern=\z@\else\MT@ls@outer@k
- \fi}%
- \let\MT@tr@outer@next\relax
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
- \MT@temp*%
-}
-\def\MT@tr@outer@icr{\afterassignment\MT@tr@outer@icr@\MT@tr@outer@r}
-\def\MT@tr@outer@icr@{%
- \let\@let@token= \MT@tr@outer@next
- \maybe@ic@
-}
-}{
- \DeclareRobustCommand\lsstyle{%
- \MT@error{Letterspacing only works with pdftex version 1.40\MessageBreak
- or newer}{Upgrade pdftex, or use the `soul' package instead.}%
- \MT@glet\lsstyle\relax
- }
-}
-\MT@requires@luatex{
- \DeclareRobustCommand\lsstyle{%
- \MT@error{Letterspacing currently doesn't work with luatex}
- {Run pdftex, or use the `soul' package instead.}%
- \MT@glet\lsstyle\relax
- }
-}\relax
\DeclareRobustCommand\textls{%
\@ifstar{\let\MT@ls@adjust@\MT@ls@adjust@empty\MT@textls}%
{\let\MT@ls@adjust@\MT@ls@adjust@relax\MT@textls}%
@@ -1623,6 +789,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@ifempty{#1}%
{\let\MT@letterspace@\@undefined}%
{\KV@@sp@def\MT@letterspace@{#1}%
+ \edef\MT@letterspace@{\number\MT@letterspace@}%
\MT@ls@too@large\MT@letterspace@}%
\MT@ls@adjust@
}
@@ -1638,63 +805,6 @@ time will almost certainly lead to undesired results. Have your choice!}%
\fi
}
\newdimen\MT@outer@kern
-\def\MT@tr@set@okern#1,#2,{%
- \let\MT@temp\@empty
- \MT@ifempty{#1}{\MT@tr@set@okern@{*}}{\MT@tr@set@okern@{#1}}%
- \MT@ifempty{#2}{\MT@tr@set@okern@{*}}{\MT@tr@set@okern@{#2}}%
- \MT@glet@nc{MT@outer@kern\expandafter\string\font@name}\MT@temp
-}
-\def\MT@tr@set@okern@#1{%
- \MT@test@ast#1*\@nil{%
- \MT@ifdefined@c@TF\MT@tr@unit@
- {\edef\@tempb{#1}\MT@scale@to@em}
- {\@tempcntb=#1\relax}%
- \@tempdima=\dimexpr \@tempcntb sp * \MT@dimen@six/1000\relax
- }{%
- \MT@ifempty\@tempa{\let\@tempa\@m}\relax
- \@tempdima=\dimexpr \numexpr\@tempa*\MT@letterspace@/1000\relax sp
- * \fontdimen6\MT@lsfont/2000\relax
- }%
- \advance\@tempdima -\dimexpr \MT@letterspace@ sp
- * \fontdimen6\MT@lsfont/2000\relax
- \edef\MT@temp{\MT@temp{\the\@tempdima}}%
-}
-\def\MT@ls@outer@k{\ifhmode\kern\MT@outer@kern\relax\fi}
-\MT@requires@pdftex5{
-\def\MT@noligatures{%
- \MT@dotrue
- \let\@tempa\MT@nl@setname
- \MT@map@clist@n{font,encoding,family,series,shape,size}{%
- \MT@ifdefined@n@TF{MT@checklist@##1}%
- {\csname MT@checklist@##1\endcsname}%
- {\MT@checklist@{##1}}%
- {nl}%
- }%
- \ifMT@do
- \MT@noligatures@\MT@font\MT@nl@ligatures
- \fi
-}
-\def\MT@noligatures@#1#2{%
- \MT@ifdefined@c@TF#2{%
- \MT@ifdefined@c@TF\tagcode{%
- \let\MT@warn@maybe@inputenc\@empty
- \def\MT@curr@list@name{\@backslashchar DisableLigatures}%
- \MT@map@clist@c#2{%
- \KV@@sp@def\@tempa{##1}\MT@get@slot
- \ifnum\MT@char>\m@ne \tagcode#1\MT@char=\m@ne \fi}%
- \MT@vinfo{... Disabling ligatures for characters: #2}%
- }{%
- \pdfnoligatures#1%
- \MT@warning{Cannot disable selected ligatures (pdftex doesn't\MessageBreak
- know \@backslashchar tagcode). Disabling all ligatures of\MessageBreak
- the font instead}%
- }%
- }{%
- \pdfnoligatures#1%
- \MT@vinfo{... Disabling ligatures}%
- }%
-}
-}\relax
\def\MT@load@list#1{%
\edef\@tempa{#1}%
\MT@let@cn\@tempb{MT@\MT@feat @c@\@tempa @load}%
@@ -1799,11 +909,12 @@ time will almost certainly lead to undesired results. Have your choice!}%
{0111}{0110}{0101}{0100}{0011}{0010}{0001}{0000}%
}
\def\MT@next@listname#1#2#3#4{%
+ \ifnum#1=\z@\MT@nofamilytrue\fi
\edef\@tempa{\MT@encoding
- /\ifnum#1=\@ne \MT@family\fi
- /\ifnum#2=\@ne \MT@series\fi
- /\ifnum#3=\@ne \MT@shape\fi
- /\ifnum#4=\@ne *\fi
+/\ifnum#1=\@ne \MT@family \fi
+/\ifnum#2=\@ne \MT@series \fi
+/\ifnum#3=\@ne \MT@shape \fi
+/\ifnum#4=\@ne *\fi
\MT@context}%
\MT@ifdefined@n@TF{MT@\@tempb @\@tempa}{%
\MT@next@listname@#4%
@@ -1895,14 +1006,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\fi
\fi
\let\MT@char\MT@char@
- \ifnum\MT@char < \z@
- \MT@warn@unknown
- \else
- \ifMT@norest \else
- \MT@warn@rest
- \let\MT@char\m@ne
- \fi
- \fi
+ \MT@get@slot@
\escapechar\m@ne
}
\newif\ifMT@norest
@@ -1917,7 +1021,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\ifcat !\noexpand#1\relax
\edef\MT@char@{\number`#1}%
\ifx\\#2\\%
- \ifnum\MT@char@ > 127 \MT@warn@ascii \fi
+ \ifnum\MT@char@ > \MT@max@char \MT@warn@ascii \fi
\else
\MT@norestfalse
\expandafter\MT@is@number#1#2\relax\relax
@@ -1940,7 +1044,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
}\MT@norestfalse
\fi
\fi
- \ifnum\MT@char@ > \@cclv
+ \ifnum\MT@char@ > \MT@max@slot
\MT@warn@number@too@large{\noexpand#1\noexpand#2\noexpand#3}%
\let\MT@char@\m@ne
\fi
@@ -1976,18 +1080,35 @@ time will almost certainly lead to undesired results. Have your choice!}%
}
\begingroup
\catcode`\/=\z@
- /MT@map@tlist@n{/\CHAR}/@makeother
+ /MT@map@tlist@n{/\CHARLEX}/@makeother
/lowercase{%
/def/x{/endgroup
/def/MT@charstring{\CHAR"}%
/def/MT@is@char##1\CHAR"##2##3##4/relax{%
+ /ifx/relax##4/relax
+ /ifMT@xunicode
+ /expandafter/MT@is@charx/MT@strip@prefix##1>/relax\CHAR "%
+ /relax/relax/relax/relax/relax
+ /fi
+ /else
+ /ifx/relax##1/relax
+ /if##3\/relax
+ /edef/MT@char@{/number"##2}%
+ /MT@ifstreq/MT@charstring{##3##4}/relax/MT@norestfalse
+ /else
+ /edef/MT@char@{/number"##2##3}%
+ /MT@ifstreq/MT@charstring{##4}/relax/MT@norestfalse
+ /fi
+ /fi
+ /fi
+ }%
+ /def/MT@charxstring{\CHAR "}%
+ /def/MT@strip@prefix##1>##2/relax{##2}%
+ /def/MT@is@charx##1\CHAR "##2##3##4##5##6/relax{%
/ifx/relax##1/relax
- /if##3\/relax
- /edef/MT@char@{/number"##2}%
- /MT@ifstreq/MT@charstring{##3##4}/relax/MT@norestfalse
- /else
- /edef/MT@char@{/number"##2##3}%
- /MT@ifstreq/MT@charstring{##4}/relax/MT@norestfalse
+ /ifx/relax##6/relax/else
+ /edef/MT@char@{/number"##2##3##4##5}%
+ /MT@ifstreq{\RELAX >\CHAR "}{##6}/relax/MT@norestfalse
/fi
/fi
}%
@@ -2000,6 +1121,13 @@ time will almost certainly lead to undesired results. Have your choice!}%
\string\csname\MT@encoding\endcsname
\MT@detokenize@n{#1}-\MT@detokenize@n{#2}\endcsname}%
\expandafter\expandafter\expandafter\MT@is@letter\MT@char\relax\relax
+ \ifnum\MT@char@ < \z@
+ \ifMT@xunicode
+ \edef\MT@char{\MT@exp@two@c\MT@strip@prefix\meaning\MT@char>\relax}%
+ \expandafter\MT@exp@two@c\expandafter\MT@is@charx\expandafter
+ \MT@char\MT@charxstring\relax\relax\relax\relax\relax
+ \fi
+ \fi
\fi
}
\def\MT@set@listname{%
@@ -2103,8 +1231,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
}%
}
\def\MT@check@font{\MT@exp@one@n\MT@in@clist\MT@font\MT@font@list}
-\def\MT@register@subst@font{\xdef\MT@font@list{\MT@font@list\font@name,}}
\def\MT@register@font{\xdef\MT@font@list{\MT@font@list\MT@font,}}
+\def\MT@register@subst@font{\MT@exp@one@n\MT@in@clist\font@name\MT@font@list
+ \ifMT@inlist@\else\xdef\MT@font@list{\MT@font@list\font@name,}\fi}
\let\MT@active@features\@empty
\def\MT@check@font@cx{%
\MT@if@true
@@ -2121,9 +1250,13 @@ time will almost certainly lead to undesired results. Have your choice!}%
}
\def\MT@register@subst@font@cx{%
\MT@map@clist@c\MT@active@features{%
- \MT@exp@cs\MT@xadd
- {MT@##1@\csname MT@##1@context\endcsname font@list}%
- {\font@name,}%
+ \expandafter\MT@exp@one@n\expandafter\MT@in@clist\expandafter\font@name
+ \csname MT@##1@\csname MT@##1@context\endcsname font@list\endcsname
+ \ifMT@inlist@ \else
+ \MT@exp@cs\MT@xadd
+ {MT@##1@\csname MT@##1@context\endcsname font@list}%
+ {\font@name,}%
+ \fi
}%
}
\def\MT@register@font@cx{%
@@ -2148,6 +1281,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\DeclareRobustCommand\microtypecontext[1]{%
\MT@setup@contexts
\let\MT@reset@context\relax
+ \let\glb@currsize\@empty
\setkeys{MTC}{#1}%
\selectfont
\MT@reset@context
@@ -2256,6 +1390,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
\let\MT@font@sets\@empty
\def\MT@fix@font@set#1{%
\xdef#1{#1}%
+ \ifMT@fontspec
+ \xdef#1{\expandafter\MT@scrubfeatures#1()\relax}%
+ \fi
\global\@onelevel@sanitize#1%
}
\def\MT@define@set@key@size#1{%
@@ -2459,8 +1596,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
}%
}
\renewcommand*\DeclareMicrotypeAlias[2]{%
- \KV@@sp@def\@tempa{#1}%
- \KV@@sp@def\@tempb{#2}%
+ \edef\@tempa{\zap@space#1 \@empty}%
+ \edef\@tempb{\zap@space#2 \@empty}%
\@onelevel@sanitize\@tempb
\MT@ifdefined@n@T{MT@\@tempa @alias}{%
\MT@warning{Alias font family `\@tempb' will override
@@ -2472,7 +1609,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
}%
}
\def\LoadMicrotypeFile#1{%
- \KV@@sp@def\@tempa{#1}%
+ \edef\@tempa{\zap@space#1 \@empty}%
\@onelevel@sanitize\@tempa
\MT@exp@one@n\MT@in@clist\@tempa\MT@file@list
\ifMT@inlist@
@@ -2490,110 +1627,12 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@end@catcodes
\fi
}
-\MT@requires@pdftex5{
-\def\DisableLigatures{%
- \MT@begin@catcodes
- \MT@DisableLigatures
-}
-\newcommand*\MT@DisableLigatures[2][]{%
- \MT@ifempty{#1}\relax{\gdef\MT@nl@ligatures{#1}}%
- \xdef\MT@active@features{\MT@active@features,nl}%
- \global\MT@noligaturestrue
- \MT@declare@sets{nl}{no ligatures}{#2}%
- \gdef\MT@nl@setname{no ligatures}%
- \MT@end@catcodes
-}
-}{
-\renewcommand*\DisableLigatures[2][]{%
- \MT@error{Disabling ligatures of a font is only possible\MessageBreak
- with pdftex version 1.30 or newer.\MessageBreak
- Ignoring \string\DisableLigatures}{Upgrade pdftex.}%
-}
-}
\def\DeclareMicrotypeBabelHook#1#2{%
\MT@map@clist@n{#1}{%
\KV@@sp@def\@tempa{##1}%
\MT@gdef@n{MT@babel@\@tempa}{#2}%
}%
}
-\def\SetProtrusion{%
- \MT@begin@catcodes
- \MT@SetProtrusion
-}
-\newcommand*\MT@SetProtrusion[3][]{%
- \let\MT@extra@context\@empty
- \MT@set@named@keys{MT@pr@c}{#1}%
- \def\MT@permutelist{pr@c}%
- \setkeys{MT@cfg}{#2}%
- \MT@permute
- \MT@gdef@n{MT@pr@c@\MT@pr@c@name}{#3}%
- \MT@end@catcodes
-}
-\def\SetExpansion{%
- \MT@begin@catcodes
- \MT@SetExpansion
-}
-\newcommand*\MT@SetExpansion[3][]{%
- \let\MT@extra@context\@empty
- \MT@set@named@keys{MT@ex@c}{#1}%
- \MT@ifdefined@n@T{MT@ex@c@\MT@ex@c@name @factor}{%
- \ifnum\csname MT@ex@c@\MT@ex@c@name @factor\endcsname > \@m
- \MT@warning@nl{Expansion factor \number\@nameuse{MT@ex@c@\MT@ex@c@name @factor}
- too large in list\MessageBreak `\MT@ex@c@name'. Setting it to the
- maximum of 1000}%
- \MT@glet@nc{MT@ex@c@\MT@ex@c@name @factor}\@m
- \fi
- }%
- \def\MT@permutelist{ex@c}%
- \setkeys{MT@cfg}{#2}%
- \MT@permute
- \MT@gdef@n{MT@ex@c@\MT@ex@c@name}{#3}%
- \MT@end@catcodes
-}
-\def\SetTracking{%
- \MT@begin@catcodes
- \MT@SetTracking
-}
-\newcommand*\MT@SetTracking[3][]{%
- \let\MT@extra@context\@empty
- \MT@set@named@keys{MT@tr@c}{#1}%
- \def\MT@permutelist{tr@c}%
- \setkeys{MT@cfg}{#2}%
- \MT@permute
- \KV@@sp@def\@tempa{#3}%
- \MT@ifempty\@tempa\relax{%
- \MT@ifint\@tempa
- {\MT@xdef@n{MT@tr@c@\MT@tr@c@name}{\@tempa}}%
- {\MT@warning{Value `\@tempa' is not a number in\MessageBreak
- tracking set `\MT@curr@set@name'}}}%
- \MT@end@catcodes
-}
-\def\SetExtraSpacing{%
- \MT@begin@catcodes
- \MT@SetExtraSpacing
-}
-\newcommand*\MT@SetExtraSpacing[3][]{%
- \let\MT@extra@context\@empty
- \MT@set@named@keys{MT@sp@c}{#1}%
- \def\MT@permutelist{sp@c}%
- \setkeys{MT@cfg}{#2}%
- \MT@permute
- \MT@gdef@n{MT@sp@c@\MT@sp@c@name}{#3}%
- \MT@end@catcodes
-}
-\def\SetExtraKerning{%
- \MT@begin@catcodes
- \MT@SetExtraKerning
-}
-\newcommand*\MT@SetExtraKerning[3][]{%
- \let\MT@extra@context\@empty
- \MT@set@named@keys{MT@kn@c}{#1}%
- \def\MT@permutelist{kn@c}%
- \setkeys{MT@cfg}{#2}%
- \MT@permute
- \MT@gdef@n{MT@kn@c@\MT@kn@c@name}{#3}%
- \MT@end@catcodes
-}
\def\MT@set@named@keys#1#2{%
\def\x##1name=##2,##3\@nil{%
\setkeys{#1}{name=##2}%
@@ -2614,6 +1653,20 @@ time will almost certainly lead to undesired results. Have your choice!}%
}%
}%
}
+\def\MT@define@code@key@family#1{%
+ \define@key{MT@#1}{family}[]{%
+ \@tempcnta=\@ne
+ \MT@map@clist@n{##1}{%
+ \KV@@sp@def\MT@val{####1}%
+ \MT@get@highlevel{family}%
+ \ifMT@fontspec
+ \edef\x{\edef\noexpand\MT@val{\noexpand\MT@scrubfeature\MT@val()\relax}}\x
+ \fi
+ \MT@edef@n{MT@tempfamily\the\@tempcnta}{\MT@val}%
+ \advance\@tempcnta \@ne
+ }%
+ }%
+}
\def\MT@define@code@key@size#1{%
\define@key{MT@#1}{size}[]{%
\MT@map@clist@n{##1}{%
@@ -2632,6 +1685,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
\KV@@sp@def\MT@val{####1}%
\MT@ifstreq\MT@val*{\def\MT@val{*/*/*/*/*}}\relax
\expandafter\MT@get@font@and@size\MT@val/////\@nil
+ \ifMT@fontspec
+ \edef\@tempb{\expandafter\MT@scrubfeatures\@tempb()\relax}%
+ \fi
\MT@xdef@n{MT@\MT@permutelist @\@tempb\MT@extra@context}%
{\csname MT@\MT@permutelist @name\endcsname}%
\MT@exp@cs\MT@xaddb
@@ -2644,7 +1700,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@get@font@{#1}{#2}{#3}{#4}{#5}{1}%
}
\MT@define@code@key{encoding}{cfg}
-\MT@define@code@key{family} {cfg}
+\MT@define@code@key@family {cfg}
\MT@define@code@key{series} {cfg}
\MT@define@code@key{shape} {cfg}
\MT@define@code@key@size {cfg}
@@ -2653,10 +1709,17 @@ time will almost certainly lead to undesired results. Have your choice!}%
\define@key{MT@#1@c}{#2}[]{\MT@ifempty{##1}\relax{%
\MT@xdef@n{MT@#1@c@\MT@curr@set@name @#2}{##1}}}%
}
+\newcount\MT@listname@count
\MT@map@clist@c\MT@features{%
\define@key{MT@#1@c}{name}[]{%
\MT@ifempty{##1}{%
- \MT@edef@n{MT@#1@c@name}{\MT@curr@file/\the\inputlineno}%
+ \MT@ifdefined@n@TF{MT@#1@c@\MT@curr@file/\the\inputlineno}{%
+ \global\advance\MT@listname@count\@ne
+ \MT@edef@n{MT@#1@c@name}{\MT@curr@file/\the\inputlineno
+ (\number\MT@listname@count)}%
+ }{%
+ \MT@edef@n{MT@#1@c@name}{\MT@curr@file/\the\inputlineno}%
+ }%
}{%
\MT@edef@n{MT@#1@c@name}{##1}%
\MT@ifdefined@n@T{MT@#1@c@\csname MT@#1@c@name\endcsname}{%
@@ -2671,125 +1734,10 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@define@opt@key{#1}{inputenc}%
\define@key{MT@#1@c}{context}[]{\MT@ifempty{##1}\relax{\def\MT@extra@context{##1}}}%
}
-\MT@requires@pdftex7{
- \MT@requires@luatex{
- \define@key{MT@ex@c}{context}[]{%
- \MT@error{Expansion contexts currently don't work with luatex.\MessageBreak
- Ignoring `context' key\on@line}%
- {Use pdftex instead.}%
- }
- }{
- \define@key{MT@ex@c}{context}[]{%
- \MT@ifempty{#1}\relax{%
- \MT@glet\MT@copy@font\MT@copy@font@
- \def\MT@extra@context{#1}%
- }%
- }
- \MT@addto@setup{%
- \define@key{MT@ex@c}{context}[]{%
- \ifx\MT@copy@font\MT@copy@font@
- \MT@ifempty{#1}\relax{\def\MT@extra@context{#1}}%
- \else
- \MT@error{\MT@MT\space isn't set up for expansion contexts.\MessageBreak
- Ignoring `context' key\on@line}%
- {Either move the settings inside the preamble,\MessageBreak
- or load the package with the `copyfonts' option.}%
- \fi
- }%
- }
- \define@key{MT@pr@c}{context}[]{%
- \MT@ifempty{#1}\relax{%
- \MT@glet\MT@copy@font\MT@copy@font@
- \def\MT@extra@context{#1}%
- }%
- }
- \MT@addto@setup{%
- \define@key{MT@pr@c}{context}[]{%
- \MT@ifempty{#1}\relax{\def\MT@extra@context{#1}}%
- \ifx\MT@copy@font\MT@copy@font@\else
- \MT@warning@nl{If protrusion contexts don't work as expected,
- \MessageBreak load the package with the `copyfonts' option}%
- \fi
- }%
- }
- }
-}{
- \define@key{MT@ex@c}{context}[]{%
- \MT@error{Expansion contexts only work with pdftex 1.40.4\MessageBreak
- or later. Ignoring `context' key\on@line}%
- {Upgrade pdftex.}%
- }
-}
\def\MT@warn@nodim#1{%
\MT@warning{`\@tempa' is not a dimension.\MessageBreak
Ignoring it and setting values relative to\MessageBreak #1}%
}
-\define@key{MT@pr@c}{unit}[character]{%
- \MT@glet@nc{MT@pr@c@\MT@curr@set@name @unit}\@empty
- \def\@tempa{#1}%
- \MT@ifstreq\@tempa{character}\relax{%
- \MT@ifdimen\@tempa
- {\MT@glet@nc{MT@pr@c@\MT@curr@set@name @unit}\@tempa}%
- {\MT@warn@nodim{character widths}}%
- }%
-}
-\define@key{MT@tr@c}{unit}[1em]{%
- \MT@glet@nc{MT@tr@c@\MT@curr@set@name @unit}\@empty
- \def\@tempa{#1}%
- \MT@ifdimen\@tempa
- {\MT@glet@nc{MT@tr@c@\MT@curr@set@name @unit}\@tempa}%
- {\MT@warn@nodim{1em}%
- \MT@gdef@n{MT@tr@c@\MT@curr@set@name @unit}{1em}}%
-}
-\MT@map@clist@n{sp,kn}{%
- \define@key{MT@#1@c}{unit}[space]{%
- \MT@glet@nc{MT@#1@c@\MT@curr@set@name @unit}\@empty
- \def\@tempa{##1}%
- \MT@ifstreq\@tempa{character}\relax{%
- \MT@glet@nc{MT@#1@c@\MT@curr@set@name @unit}\m@ne
- \MT@ifstreq\@tempa{space}\relax{%
- \MT@ifdimen\@tempa
- {\MT@glet@nc{MT@#1@c@\MT@curr@set@name @unit}\@tempa}%
- {\MT@warn@nodim{width of space}}%
- }%
- }%
- }%
-}
-\MT@map@clist@n{stretch,shrink,step}{%
- \define@key{MT@ex@c}{#1}[]{%
- \MT@ifempty{##1}\relax{%
- \MT@ifint{##1}{%
- \MT@gdef@n{MT@ex@c@\MT@curr@set@name @#1}{##1 }%
- }{%
- \MT@warning{%
- Value `##1' for option `#1' is not a number.\MessageBreak
- Ignoring it}%
- }%
- }%
- }%
-}
-\define@key{MT@ex@c}{auto}[true]{%
- \def\@tempa{#1}%
- \csname if\@tempa\endcsname
- \MT@requires@pdftex4{%
- \MT@gdef@n{MT@ex@c@\MT@curr@set@name @auto}{autoexpand}%
- }{%
- \MT@warning{pdftex too old for automatic font expansion}%
- }
- \else
- \MT@requires@pdftex4{%
- \MT@glet@nc{MT@ex@c@\MT@curr@set@name @auto}\@empty
- }\relax
- \fi
-}
-\MT@define@opt@key{tr}{spacing}
-\MT@define@opt@key{tr}{outerspacing}
-\MT@define@opt@key{tr}{outerkerning}
-\define@key{MT@tr@c}{noligatures}[]%
- {\MT@xdef@n{MT@tr@c@\MT@curr@set@name @noligatures}{#1}}
-\define@key{MT@tr@c}{outer spacing}[]{\setkeys{MT@tr@c}{outerspacing={#1}}}
-\define@key{MT@tr@c}{outer kerning}[]{\setkeys{MT@tr@c}{outerkerning={#1}}}
-\define@key{MT@tr@c}{no ligatures}[]{\setkeys{MT@tr@c}{noligatures={#1}}}
\renewcommand*\DeclareCharacterInheritance[1][]{%
\let\MT@extra@context\@empty
\let\MT@extra@inputenc\@undefined
@@ -2826,48 +1774,18 @@ time will almost certainly lead to undesired results. Have your choice!}%
\setkeys{MT@inh}{#2}%
\MT@permute
}
-\define@key{MT@inh}{encoding}[]{%
- \def\MT@val{#1}%
- \expandafter\MT@encoding@check\MT@val,\@nil
- \MT@get@highlevel{encoding}%
- \MT@edef@n{MT@tempencoding1}{\MT@val}%
-}
-\def\MT@encoding@check#1,#2\@nil{%
- \MT@ifempty{#2}\relax{%
- \edef\MT@val{#1}%
- \MT@warning{You may only specify one encoding for character\MessageBreak
- inheritance lists. Ignoring encoding(s) #2}%
- }%
-}
-\MT@define@code@key{family}{inh}
-\MT@define@code@key{series}{inh}
-\MT@define@code@key{shape} {inh}
-\MT@define@code@key@size {inh}
-\MT@define@code@key@font {inh}
+\MT@define@code@key{encoding}{inh}
+\MT@define@code@key@family {inh}
+\MT@define@code@key{series} {inh}
+\MT@define@code@key{shape} {inh}
+\MT@define@code@key@size {inh}
+\MT@define@code@key@font {inh}
\def\MT@inh@do#1,{%
\ifx\relax#1\@empty \else
\MT@inh@split #1==\relax
\expandafter\MT@inh@do
\fi
}
-\def\MT@inh@split#1=#2=#3\relax{%
- \def\@tempa{#1}%
- \ifx\@tempa\@empty \else
- \MT@get@slot
- \ifnum\MT@char > \m@ne
- \let\MT@val\MT@char
- \MT@map@clist@n{#2}{%
- \def\@tempa{##1}%
- \ifx\@tempa\@empty \else
- \MT@get@slot
- \ifnum\MT@char > \m@ne
- \MT@exp@cs\MT@xadd{MT@inh@\MT@listname @\MT@val @}{{\MT@char}}%
- \fi
- \fi
- }%
- \fi
- \fi
-}
\def\MT@permute{%
\let\MT@cnt@encoding\@ne
\MT@permute@
@@ -3093,15 +2011,6 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@map@clist@n{draft,selected,babel}{%
\MT@def@bool@opt{#1}{\csname MT@#1\@tempa\endcsname}}
\MT@def@bool@opt{auto}{\csname MT@auto\@tempa\endcsname \MT@opt@autotrue}
-\MT@def@bool@opt{DVIoutput}{%
- \csname if\@tempa\endcsname
- \ifnum\pdfoutput>\z@ \MT@opt@DVItrue \fi
- \pdfoutput\z@
- \else
- \ifnum\pdfoutput<\@ne \MT@opt@DVItrue \fi
- \pdfoutput\@ne
- \fi
-}
\MT@def@bool@opt{defersetup}{%
\csname if\@tempa\endcsname \else
\AtEndOfPackage{%
@@ -3111,31 +2020,6 @@ time will almost certainly lead to undesired results. Have your choice!}%
}%
\fi
}
-\MT@requires@pdftex7{
- \MT@requires@luatex{
- \MT@def@bool@opt{copyfonts}{%
- \csname if\@tempa\endcsname
- \MT@error{The `copyfonts' option doesn't work with luatex}
- {Use pdftex instead.}%
- \fi
- }
- }{
- \MT@def@bool@opt{copyfonts}{%
- \csname if\@tempa\endcsname
- \MT@glet\MT@copy@font\MT@copy@font@
- \else
- \MT@glet\MT@copy@font\relax
- \fi
- }
- }
-}{
- \MT@def@bool@opt{copyfonts}{%
- \csname if\@tempa\endcsname
- \MT@error{The pdftex version you are using is too old\MessageBreak
- to use the `copyfonts' option}{Upgrade pdftex.}%
- \fi
- }
-}
\MT@def@bool@opt{final}{%
\csname if\@tempa\endcsname
\MT@draftfalse
@@ -3187,13 +2071,17 @@ time will almost certainly lead to undesired results. Have your choice!}%
character widths}}%
}%
}
-\MT@protrusiontrue
-\ifnum\pdfoutput<\@ne \else
- \MT@requires@pdftex4{
- \MT@expansiontrue
- \MT@autotrue
- }\relax
+\let\MT@endinput\relax
+\ifx\MT@engine\relax
+ \MT@warning@nl{You don't seem to be using either pdftex, luatex, or xetex.\MessageBreak
+ `\MT@MT' only works with these engines.\MessageBreak
+ I will quit now.}
+ \MT@clear@options
+\else
+ \input{microtype-\MT@engine tex.def}
\fi
+\MT@endinput
+\MT@protrusiontrue
\define@key{MT}{config}[]{\relax}
\def\MT@get@config#1config=#2,#3\@nil{%
\MT@ifempty{#2}%
@@ -3235,106 +2123,6 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@ifdefined@c@T\Microtype@Hook\Microtype@Hook
\def\microtypesetup{\setkeys{MT}}
\MT@addto@setup{\def\microtypesetup#1{\setkeys{MTX}{#1}\selectfont}}
-\def\MT@define@optionX#1#2{%
- \define@key{MTX}{#1}[true]{%
- \edef\@tempb{\csname MT@rbba@#1\endcsname}%
- \MT@map@clist@n{##1}{%
- \KV@@sp@def\MT@val{####1}%
- \MT@ifempty\MT@val\relax{%
- \@tempcnta=\m@ne
- \MT@ifstreq\MT@val{true}{%
- \MT@checksetup{#1}{%
- \@tempcnta=\csname MT@\@tempb @level\endcsname
- \MT@vinfo{Enabling #1
- (level \number\csname MT@\@tempb @level\endcsname)\on@line}%
- }%
- }{%
- \MT@ifstreq\MT@val{false}{%
- \@tempcnta=\z@
- \MT@vinfo{Disabling #1\on@line}%
- }{%
- \MT@ifstreq\MT@val{compatibility}{%
- \MT@checksetup{#1}{%
- \@tempcnta=\@ne
- \MT@let@nc{MT@\@tempb @level}\@ne
- \MT@vinfo{Setting #1 to level 1\on@line}%
- }%
- }{%
- \MT@ifstreq\MT@val{nocompatibility}{%
- \MT@checksetup{#1}{%
- \@tempcnta=\tw@
- \MT@let@nc{MT@\@tempb @level}\tw@
- \MT@vinfo{Setting #1 to level 2\on@line}%
- }%
- }{\MT@error{Value `\MT@val' for key `#1' not recognised}
- {Use any of `true', `false', `compatibility' or
- `nocompatibility'.}%
- }%
- }%
- }%
- }%
- \ifnum\@tempcnta>\m@ne
- #2\@tempcnta\relax
- \fi
- }%
- }%
- }%
-}
-\def\MT@checksetup#1{%
- \csname ifMT@#1\endcsname
- \expandafter\@firstofone
- \else
- \MT@error{You cannot enable #1 if it was disabled\MessageBreak
- in the package options}{Load microtype with #1 enabled.}%
- \expandafter\@gobble
- \fi
-}
-\MT@define@optionX{protrusion}\pdfprotrudechars
-\MT@define@optionX{expansion}\pdfadjustspacing
-\MT@requires@pdftex6{
- \MT@requires@luatex\@firstofone{
- \def\MT@define@optionX@#1#2{%
- \define@key{MTX}{#1}[true]{%
- \MT@map@clist@n{##1}{%
- \KV@@sp@def\MT@val{####1}%
- \MT@ifempty\MT@val\relax{%
- \@tempcnta=\m@ne
- \MT@ifstreq\MT@val{true}{%
- \MT@checksetup{#1}{%
- \@tempcnta=\@ne
- \MT@vinfo{Enabling #1\on@line}%
- }%
- }{%
- \MT@ifstreq\MT@val{false}{%
- \@tempcnta=\z@
- \MT@vinfo{Disabling #1\on@line}%
- }{\MT@error{Value `\MT@val' for key `#1' not recognised}
- {Use either `true' or `false'}%
- }%
- }%
- \ifnum\@tempcnta>\m@ne
- #2\relax
- \fi
- }%
- }%
- }%
- }
- \MT@define@optionX@{tracking}{\ifnum\@tempcnta=\z@ \let\MT@tracking\MT@set@tr@zero
- \else \let\MT@tracking\MT@tracking@ \fi}
- \MT@define@optionX@{spacing}{\pdfadjustinterwordglue\@tempcnta}
- \MT@define@optionX@{kerning}{\pdfprependkern\@tempcnta
- \pdfappendkern \@tempcnta}
- \@gobble
- }
-}\@firstofone
-{\define@key{MTX}{tracking}[true]{\MT@warning{Ignoring tracking setup}}
- \define@key{MTX}{kerning}[true]{\MT@warning{Ignoring kerning setup}}
- \define@key{MTX}{spacing}[true]{\MT@warning{Ignoring spacing setup}}
-}
-\define@key{MTX}{activate}[true]{%
- \setkeys{MTX}{protrusion={#1}}%
- \setkeys{MTX}{expansion={#1}}%
-}
\let\MT@saved@setupfont\MT@setupfont
\define@key{MTX}{disable}[]{%
\MT@info{Inactivate `\MT@MT' package}%
@@ -3373,229 +2161,17 @@ time will almost certainly lead to undesired results. Have your choice!}%
\renewcommand*\microtypecontext[1]{}%
\renewcommand*\lsstyle{}%
\else
- \ifnum\pdfoutput<\@ne
- \ifMT@opt@expansion \else
- \MT@expansionfalse
- \fi
- \fi
- \MT@info@nl{Generating \ifnum\pdfoutput<\@ne DVI \else PDF \fi output%
- \ifMT@opt@DVI\space (changed by \MT@MT)\fi}%
- \ifx\MT@copy@font\relax\else \MT@info@nl{Using font copies for contexts}\fi
+ \MT@setup@PDF
+ \MT@setup@copies
\MT@map@tlist@c\MT@font@sets\MT@fix@font@set
- \ifMT@protrusion
- \edef\MT@active@features{\MT@active@features,pr}%
- \pdfprotrudechars\MT@pr@level
- \MT@info@nl{Character protrusion enabled (level \number\MT@pr@level)%
- \ifnum\MT@pr@factor=\MT@factor@default \else,\MessageBreak
- factor: \number\MT@pr@factor\fi
- \ifx\MT@pr@unit\@empty \else,\MessageBreak unit: \MT@pr@unit\fi}%
- \MT@check@active@set{pr}%
- \else
- \let\MT@protrusion\relax
- \MT@info@nl{No character protrusion}%
- \fi
- \ifMT@expansion
- \ifnum\MT@stretch=\m@ne
- \let\MT@stretch\MT@stretch@default
- \fi
- \ifnum\MT@shrink=\m@ne
- \let\MT@shrink\MT@stretch
- \fi
- \MT@requires@pdftex6{\def\MT@step{1 }}{%
- \ifnum\MT@step=\m@ne
- \ifnum\MT@stretch>\MT@shrink
- \ifnum\MT@shrink=\z@
- \@tempcnta=\MT@stretch
- \else
- \@tempcnta=\MT@shrink
- \fi
- \else
- \ifnum\MT@stretch=\z@
- \@tempcnta=\MT@shrink
- \else
- \@tempcnta=\MT@stretch
- \fi
- \fi
- \divide\@tempcnta 5\relax
- \else
- \@tempcnta=\MT@step
- \ifnum\@tempcnta=\z@
- \MT@warning@nl{The expansion step cannot be set to zero.\MessageBreak
- Setting it to one}
- \fi
- \fi
- \ifnum\@tempcnta=\z@ \@tempcnta=\@ne \fi
- \edef\MT@step{\number\@tempcnta\space}}%
- \let\MT@auto\@empty
- \ifMT@auto
- \MT@requires@pdftex4{%
- \ifnum\pdfoutput<\@ne
- \ifMT@opt@auto
- \MT@error{%
- Automatic font expansion only works for PDF output.\MessageBreak
- However, you are creating a DVI file}
- {If you have created expanded fonts instances, remove `auto' from%
- \MessageBreak the package options. Otherwise, you have to switch
- off expansion\MessageBreak completely.}%
- \fi
- \MT@autofalse
- \else
- \def\MT@auto{autoexpand}%
- \fi
- }{%
- \MT@error{%
- The pdftex version you are using is too old for\MessageBreak
- automatic font expansion}%
- {If you have created expanded fonts instances, remove `auto' from\MessageBreak
- the package options. Otherwise, you have to switch off expansion\MessageBreak
- completely, or upgrade pdftex to version 1.20 or newer.}%
- \MT@autofalse
- \def\MT@auto{1000 }%
- }%
- \else
- \MT@requires@pdftex4\relax{%
- \def\MT@auto{1000 }%
- }%
- \fi
- \ifMT@selected
- \let\MT@set@ex@codes\MT@set@ex@codes@s
- \else
- \let\MT@set@ex@codes\MT@set@ex@codes@n
- \fi
- \ifnum\MT@stretch=\z@
- \ifnum\MT@shrink=\z@
- \MT@warning@nl{%
- Both the stretch and shrink limit are set to zero.\MessageBreak
- Disabling font expansion}%
- \MT@expansionfalse
- \fi
- \fi
- \fi
- \ifMT@expansion
- \edef\MT@active@features{\MT@active@features,ex}%
- \pdfadjustspacing\MT@ex@level
- \MT@info@nl{\ifMT@auto A\else Non-a\fi utomatic font expansion enabled
- (level \number\MT@ex@level),\MessageBreak
- stretch: \number\MT@stretch, shrink: \number\MT@shrink,
- step: \number\MT@step, \ifMT@selected\else non-\fi selected}%
- \def\MT@check@step#1{%
- \@tempcnta=\csname MT@#1\endcsname
- \divide\@tempcnta \MT@step
- \multiply\@tempcnta \MT@step
- \ifnum\@tempcnta=\csname MT@#1\endcsname\else
- \MT@warning@nl{The #1 amount is not a multiple of step.\MessageBreak
- The effective maximum #1 is \the\@tempcnta\space
- (step \number\MT@step)}%
- \fi
- }%
- \MT@check@step{stretch}%
- \MT@check@step{shrink}%
- \MT@check@active@set{ex}%
- \CheckCommand*\showhyphens[1]{\setbox0\vbox{%
- \color@begingroup\everypar{}\parfillskip\z@skip
- \hsize\maxdimen\normalfont\pretolerance\m@ne\tolerance\m@ne
- \hbadness\z@\showboxdepth\z@\ #1\color@endgroup}}%
- \gdef\showhyphens#1{\setbox0\vbox{%
- \color@begingroup\pdfadjustspacing\z@\everypar{}\parfillskip\z@skip
- \hsize\maxdimen\normalfont\pretolerance\m@ne\tolerance\m@ne
- \hbadness\z@\showboxdepth\z@\ #1\color@endgroup}}%
- \else
- \let\MT@expansion\relax
- \MT@info@nl{No font expansion}%
- \fi
+ \MT@setup@protrusion
+ \MT@setup@expansion
+ \MT@setup@tracking
+ \MT@setup@warntracking
+ \MT@setup@spacing
+ \MT@setup@kerning
+ \MT@setup@noligatures
}
-\MT@requires@pdftex6{
- \def\MT@warn@lua#1{%
- \MT@error{The `#1' feature doesn't currently work\MessageBreak with luatex}
- {Use pdftex instead.}%
- \csname MT@#1false\endcsname
- \MT@let@nc{MT@#1}\relax
- }
- \MT@addto@setup{%
- \ifMT@tracking
- \MT@requires@luatex{\MT@warn@lua{tracking}}{%
- \edef\MT@active@features{\MT@active@features,tr}%
- \MT@info@nl{Tracking enabled}%
- \MT@check@active@set{tr}%
- \ifMT@protrusion\else\pdfprotrudechars\@ne\fi
- }%
- \else
- \let\MT@tracking\relax
- \MT@info@nl{No tracking}%
- \fi
- \ifMT@spacing
- \MT@requires@luatex{\MT@warn@lua{spacing}}{%
- \edef\MT@active@features{\MT@active@features,sp}%
- \pdfadjustinterwordglue\@ne
- \MT@info@nl{Adjustment of interword spacing enabled}%
- \MT@check@active@set{sp}%
- }%
- \else
- \let\MT@spacing\relax
- \MT@info@nl{No adjustment of interword spacing}%
- \fi
- \ifMT@kerning
- \MT@requires@luatex{\MT@warn@lua{kerning}}{%
- \edef\MT@active@features{\MT@active@features,kn}%
- \pdfprependkern\@ne
- \pdfappendkern\@ne
- \MT@info@nl{Adjustment of character kerning enabled}%
- \MT@check@active@set{kn}%
- }%
- \else
- \let\MT@kerning\relax
- \MT@info@nl{No adjustment of character kerning}%
- \fi
- \ifnum\pdfoutput<\@ne
- \def\MT@warn@tracking@DVI{%
- \MT@warning@nl{%
- You are using tracking/letterspacing in DVI mode.\MessageBreak
- This will probably not work, unless the post-\MessageBreak
- processing program (dvips, dvipdfm(x), ...) is\MessageBreak
- able to create the virtual fonts on the fly}%
- \MT@glet\MT@warn@tracking@DVI\relax
- }%
- \else
- \def\MT@warn@tracking@DVI{%
- \ifnum\pdfprotrudechars<\@ne \global\pdfprotrudechars\@ne \fi
- \MT@glet\MT@warn@tracking@DVI\relax
- }%
- \fi
- \ifnum\MT@letterspace=\m@ne
- \let\MT@letterspace\MT@letterspace@default
- \else
- \MT@ls@too@large\MT@letterspace
- \fi
- }%
-}{
- \MT@addto@setup{%
- \ifMT@tracking
- \MT@error{Tracking only works with pdftex version 1.40\MessageBreak
- or newer. Switching it off}{Upgrade pdftex.}%
- \else
- \MT@info@nl{No tracking (pdftex too old)}%
- \fi
- \ifMT@spacing
- \MT@error{Adjustment of interword spacing only works with\MessageBreak
- pdftex version 1.40 or newer. Switching it off}{Upgrade pdftex.}%
- \else
- \MT@info@nl{No adjustment of interword spacing (pdftex too old)}%
- \fi
- \ifMT@kerning
- \MT@error{Character kerning only works with\MessageBreak
- pdftex version 1.40 or newer. Switching it off}{Upgrade pdftex.}%
- \else
- \MT@info@nl{No adjustment of character kerning (pdftex too old)}%
- \fi
- }
-}
-\MT@requires@pdftex5{
- \MT@addto@setup{%
- \ifMT@noligatures \else
- \let\MT@noligatures\relax
- \fi
- }
-}\relax
\MT@addto@setup{%
\ifx\MT@active@features\@empty \else
\edef\MT@active@features{\expandafter\@gobble\MT@active@features}%
@@ -3658,23 +2234,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
\selectfont}
\edef\MT@curr@file{\jobname.tex}
\AtBeginDocument{\MT@setup@ \MT@glet\MT@setup@\@empty}
-\MT@requires@pdftex6{
- \AtBeginDocument{%
- \ifMT@spacing
- \ifMT@babel \else
- \ifnum\sfcode`\. > 1500
- \MT@ifstreq\MT@sp@context{nonfrench}\relax{%
- \MT@warning@nl{%
- \string\nonfrenchspacing\space is active. Adjustment of\MessageBreak
- interword spacing will disable it. You might want\MessageBreak
- to add `\@backslashchar\MT@MT context{spacing=nonfrench}'\MessageBreak
- to your preamble}%
- }%
- \fi
- \fi
- \fi
- }
-}\relax
+\MT@ifdefined@c@T\MT@setup@spacing@check
+ {\AtBeginDocument{\MT@setup@spacing@check}}
\MT@restore@catcodes
\endinput
%%