10.07.2015 Views

The microtype package

The microtype package

The microtype package

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

IMPLEMENTATION: Font setup 93\MT@warn@rest\MT@warn@unknown\MT@warn@maybe@inputenc2640 \MT@warning@nl{%2641 Number #1 in encoding `\MT@encoding’ too large!\MessageBreak2642 Ignoring it in \MT@curr@list@name}%2643 }Not all of the string has been parsed.2644 \def\MT@warn@rest{%2645 \MT@warning@nl{%2646 Unknown slot number of character\MessageBreak`\the\MT@toks’%2647 \MT@warn@maybe@inputenc\MessageBreak2648 in font encoding `\MT@encoding’.\MessageBreak2649 Make sure it’s a single character\MessageBreak2650 (or a number) in \MT@curr@list@name}%2651 }No idea what went wrong.2652 \def\MT@warn@unknown{%2653 \MT@warning@nl{%2654 Unknown slot number of character\MessageBreak`\the\MT@toks’%2655 \MT@warn@maybe@inputenc\MessageBreak2656 in font encoding `\MT@encoding’ in \MT@curr@list@name}%2657 }In case an input encoding had been requested.2658 \def\MT@warn@maybe@inputenc{%2659 \MT@ifdefined@n@T2660 {MT@\MT@feat @\MT@cat @\csname MT@\MT@feat @\MT@cat @name\endcsname @inputenc}%2661 { (input encoding `\@nameuse2662 {MT@\MT@feat @\MT@cat @\csname MT@\MT@feat @\MT@cat @name\endcsname @inputenc}’)}%2663 }14.2.9 Hook into L A TEX’s font selectionWe append \MT@setupfont to \pickup@font, which is called by L A TEX every time afont is selected. We then check whether we’ve already seen this font, and if not,set it up for micro-typography. This ensures that we will catch all fonts, and thatwe will not set up fonts more than once. <strong>The</strong> whole <strong>package</strong> really hangs on thiscommand.In contrast to the pdfcprot <strong>package</strong>, it is not necessary to declare in advancewhich fonts should benefit from micro-typographic treatment. Also, only thosefonts that are actually being used will be set up.For my reference:• \pickup@font is called by \selectfont, \wrong@fontshape, or\getanddefine@fonts (for math).• \pickup@font calls \define@newfont.• \define@newfont may call (inside a group!)– \wrong@fontshape, which in turn will call \pickup@font, and thus\define@newfont again, or– \extract@font.• \get@external@font is called by \extract@font, by itself, and by the substitutionmacros.Up to version 1.3 of this <strong>package</strong>, we were using \define@newfont as the hook,which is only called for new fonts, and therefore seemed the natural choice. However,this meant that we had to take special care to catch all fonts: we additionally

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

Saved successfully!

Ooh no, something went wrong!