10.07.2015 Views

The microtype package

The microtype package

The microtype package

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

IMPLEMENTATION: Font setup 92\MT@curr@list@name\MT@set@listname\MT@warn@ascii\MT@warn@number@too@large2614 \def\MT@is@composite#1#2\relax{%2615 \ifx\\#2\\\elseAgain, we construct a control sequence, this time of the form: \\〈encoding〉\〈accent〉-〈character〉, e.g., \\T1\"-a, which we then expand once to see if it is aletter (if it has been defined by \DeclareTextComposite). This should be robust,finally, especially, since we also \detokenize the input instead of only \stringifyingit. Thus, we will die gracefully even on wrong Unicode input without utf8.2616 \expandafter\def\expandafter\MT@char\expandafter{\csname\expandafter2617 \string\csname\MT@encoding\endcsname2618 \MT@detokenize@n{#1}-\MT@detokenize@n{#2}\endcsname}%2619 \expandafter\expandafter\expandafter\MT@is@letter\MT@char\relax\relaxAgain, xunicode.2620 \ifnum\MT@char@ < \z@2621 \ifMT@xunicode2622 \edef\MT@char{\MT@exp@two@c\MT@strip@prefix\meaning\MT@char>\relax}%2623 \expandafter\MT@exp@two@c\expandafter\MT@is@charx\expandafter2624 \MT@char\MT@charxstring\relax\relax\relax\relax\relax2625 \fi2626 \fi2627 \fi2628 }[What about math? Well, for a moment the following looked like a solution, with\mt@is@mathchar defined accordingly, analogous to \MT@is@char above, to pick upthe last two tokens (the \meaning of a \mathchardef’ed command expands to itshexadecimal notation):\def\MT@is@mathchar#1{%\if\relax\noexpand#1% it's a macro\let\x#1%\else % it's a character\mathchardef\x=\mathcode`#1\relax\fi\expandafter\MT@exp@two@c\expandafter\mt@is@mathchar\expandafter\meaning\expandafter\x\mt@mathcharstring\relax\relax\relax}However, the problem is that \mathcodes and \mathchardefs have global scope.<strong>The</strong>refore, if they are changed by a <strong>package</strong> that loads different math fonts, thereis no guarantee whatsoever that things will still be correct (e.g., the minus in cmsywhen the euler <strong>package</strong> is loaded). So, no way to go, unfortunately.]Some warning messages, for performance reasons separated here.<strong>The</strong> type and name of the current list, defined at various places.2629 \def\MT@set@listname{%2630 \edef\MT@curr@list@name{\@nameuse{MT@abbr@\MT@feat} list\noexpand\MessageBreak2631 `\@nameuse{MT@\MT@feat @c@name}’}%2632 }For ‘other’ characters > 127, we issue a warning (inputenc probably hasn’t beenloaded), since correspondence with the slot numbers would be purely coincidental.2633 \def\MT@warn@ascii{%2634 \MT@warning@nl{Character `\the\MT@toks’ (= \MT@char@)2635 is outside of ASCII range.\MessageBreak2636 You must load the `inputenc’ <strong>package</strong> before using\MessageBreak2637 8-bit characters in \MT@curr@list@name}%2638 }Number too large.2639 \def\MT@warn@number@too@large#1{%

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!