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 94\MT@font@list\MT@font\MT@orig@pickupfonthad to set up the default font, the error font (if it wasn’t the default font), we hadto check for some <strong>package</strong>s that might have been loaded before <strong>microtype</strong> andwere loading fonts, e.g., jurabib, ledmac, pifont (loaded by hyperref), tipa, andprobably many more. Furthermore, we had to include a hack for the IEEEtran classwhich loads all fonts in the class file itself (to fine tune inter-word spacing), andthe memoir class, too. To cut this short: it seemed to get out of hand, and I decidedthat it would be better to use \pickup@font and decide for ourselves whether we’vealready seen that font. I hope the overhead isn’t too large.We use a comma separated list.2664 \let\MT@font@list\@empty2665 \let\MT@font\@emptyAll this is done at the beginning of the document. It doesn’t work for plain, ofcourse, which doesn’t have \pickup@font.2666 2667 2668 \MT@requires@latex2{2669 \MT@addto@setup{%<strong>microtype</strong> also works with CJK in the sense that nothing will break when both<strong>package</strong>s are used at the same time. However, since CJK has its own way of encoding,it is currently not possible to create character-specific settings. That is, the onlyfeature available with CJK fonts is expansion. (Tracking doesn’t really work forother reasons.) Like us, CJK redefines \pickup@font.2670 \@if<strong>package</strong>loaded{CJK}{%2671 \@if<strong>package</strong>later{CJK}{2006/10/17}% 4.7.02672 {\def\MT@orig@pickupfont{\CJK@ifundefined\CJK@plane}}%2673 {\def\MT@orig@pickupfont{\@ifundefined{CJK@plane}}}%2674 \g@addto@macro\MT@orig@pickupfont2675 {{\expandafter\ifx\font@name\relax\define@newfont\fi}}%CJKutf8 redefines \pickup@font once more (recent versions, in PDF mode, asdetermined by ifpdf, which CJKutf8 loads).2676 \@if<strong>package</strong>loaded{CJKutf8}%2677 {\@if<strong>package</strong>later{CJKutf8}{2008/05/22}% 4.8.02678 {\ifpdf\expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi}%2679 {\@firstoftwo}}%2680 {\@firstoftwo}%2681 {\g@addto@macro\MT@orig@pickupfont{%2682 {\expandafter\ifx\csname\curr@fontshape/\f@size/\CJK@plane\endcsname\relax2683 \define@newfont\else\xdef\font@name{%2684 \csname \curr@fontshape/\f@size/\CJK@plane\endcsname}\fi}}}%2685 {\g@addto@macro\MT@orig@pickupfont{%2686 {\expandafter\ifx\csname \curr@fontshape/\f@size/\CJK@plane\endcsname\relax2687 \define@newfont\def\CJK@temp{v}%2688 \ifx\CJK@temp\CJK@plane2689 \expandafter\ifx\csname CJK@cmap@\f@family\CJK@plane\endcsname\relax2690 \else\csname CJK@cmap@\f@family\CJK@plane\endcsname\fi2691 \else \CJK@addcmap\CJK@plane \fi2692 \else\xdef\font@name{%2693 \csname \curr@fontshape/\f@size/\CJK@plane\endcsname}\fi}}}%2694 }{%2695 \def\MT@orig@pickupfont{\expandafter\ifx\font@name\relax\define@newfont\fi}%2696 }%Check whether \pickup@font is defined as expected. <strong>The</strong> warning issued by\CheckCommand* would be a bit too generic.2697 \ifx\pickup@font\MT@orig@pickupfont \else2698 \MT@warning@nl{%2699 Command \string\pickup@font\space is not defined as expected.%

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

Saved successfully!

Ooh no, something went wrong!