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: Package options 123simpler than testing whether the <strong>package</strong> was loaded both in the preamble as wellas at the beginning of the document (which is what one would have to do).Package authors should check whether the command is already defined so thatexisting definitions by other <strong>package</strong>s aren’t overwritten. Example:\def\MinionPro@MT@Hook{\DeclareMicrotypeAlias{MinionPro-LF}{MinionPro}}\@if<strong>package</strong>loaded{<strong>microtype</strong>}\MinionPro@MT@Hook{\@ifundefined{Microtype@Hook}{\let\Microtype@Hook\MinionPro@MT@Hook}{\g@addto@macro\Microtype@Hook{\MinionPro@MT@Hook}}}\MicroType@Hook with a capital T (which only existed in version 1.7) is providedfor compatibility reasons. At some point in the future, it will no longer be available,hence it should not be used.3998 \MT@ifdefined@c@T\MicroType@Hook{\MT@warning{%3999 Command \string\MicroType@Hook\space is deprecated.\MessageBreak4000 Use \string\Microtype@Hook\space instead}\MicroType@Hook}4001 \MT@ifdefined@c@T\Microtype@Hook\Microtype@Hook\<strong>microtype</strong>setup\MT@define@optionX14.4.5 Changing options laterInside the preamble, \<strong>microtype</strong>setup accepts the same options as the <strong>package</strong> (unlessdefersetup=false). In the document body, it accepts the options: protrusion,expansion, activate, tracking, spacing and kerning. Specifying font sets is notallowed.4002 \def\<strong>microtype</strong>setup{\setkeys{MT}}4003 \MT@addto@setup{\def\<strong>microtype</strong>setup#1{\setkeys{MTX}{#1}\selectfont}}4004 4005 4006 \def\MT@define@optionX#1#2{%4007 \define@key{MTX}{#1}[true]{%4008 \edef\@tempb{\csname MT@rbba@#1\endcsname}%4009 \MT@map@clist@n{##1}{%4010 \KV@@sp@def\MT@val{####1}%4011 \MT@ifempty\MT@val\relax{%4012 \@tempcnta=\m@ne4013 \MT@ifstreq\MT@val{true}{%Enabling micro-typography in the middle of the document is not allowed if it hasbeen disabled in the <strong>package</strong> options since fonts might already have been loadedand hence wouldn’t be set up.4014 \MT@checksetup{#1}{%4015 \@tempcnta=\csname MT@\@tempb @level\endcsname4016 \MT@vinfo{Enabling #14017 (level \number\csname MT@\@tempb @level\endcsname)\on@line}%4018 }%4019 }{%4020 \MT@ifstreq\MT@val{false}{%4021 \@tempcnta=\z@4022 \MT@vinfo{Disabling #1\on@line}%4023 }{%4024 \MT@ifstreq\MT@val{compatibility}{%4025 \MT@checksetup{#1}{%4026 \@tempcnta=\@ne4027 \MT@let@nc{MT@\@tempb @level}\@ne4028 \MT@vinfo{Setting #1 to level 1\on@line}%4029 }%4030 }{%4031 \MT@ifstreq\MT@val{nocompatibility}{%4032 \MT@checksetup{#1}{%

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

Saved successfully!

Ooh no, something went wrong!