Download The microtype package

Transcript
IMPLEMENTATION: Preliminaries
}
\MT@in@rlist
\MT@in@rlist@
\MT@in@rlist@@
\MT@size@name
50
\MT@inlist@true
\expandafter\MT@tlist@break
\fi
Test whether size \MT@size is in a list of ranges. Store the name of the list in
\MT@size@name
\def\MT@in@rlist#1{%
\MT@inlist@false
\MT@map@tlist@c#1\MT@in@rlist@
}
\def\MT@in@rlist@#1{\expandafter\MT@in@rlist@@#1}
\def\MT@in@rlist@@#1#2#3{%
\MT@ifdim{#2}=\m@ne{%
\MT@ifdim{#1}=\MT@size
\MT@inlist@true
\relax
}{%
\MT@ifdim\MT@size<{#1}\relax{%
\MT@ifdim\MT@size<{#2}%
\MT@inlist@true
\relax
}%
}%
\ifMT@inlist@
\def\MT@size@name{#3}%
\expandafter\MT@tlist@break
\fi
}
\MT@loop
\MT@iterate
\MT@repeat
This is the same as LATeX’s \loop, which we mustn’t use, since this could confuse
an outer \loop in the document.
\MT@while@num
Execute h#3 i from h#1 i up to (excluding) h#2 i (much faster than LATeX’s
\@whilenum).
h/packagei
\def\MT@loop#1\MT@repeat{%
\def\MT@iterate{#1\relax\expandafter\MT@iterate\fi}%
\MT@iterate \let\MT@iterate\relax
}
\let\MT@repeat\fi
\def\MT@while@num#1#2#3{%
\@tempcnta#1\relax
\MT@loop #3%
\advance\@tempcnta \@ne
\ifnum\@tempcnta < #2\MT@repeat
}
\MT@do@font
Execute h#1 i 256 times.
\def\MT@do@font{\MT@while@num\z@\@cclvi}
h∗packagei
\MT@count
\MT@increment
Increment macro h#1 i by one. Saves using up too many counters. The e-TeX way
is slightly faster.
\newcount\MT@count
\def\MT@increment#1{%
^^X \edef#1{\number\numexpr #1 + 1\relax}%
^^Q \MT@count=#1\relax
^^Q \advance\MT@count \@ne