Download The microtype package

Transcript
IMPLEMENTATION: Package options
122
\MT@protrusiontrue
\ifnum\pdfoutput<\@ne \else
Also, we only enable expansion by default if pdfTeX can expand the fonts automatically.
\MT@requires@pdftex4{
\MT@expansiontrue
\MT@autotrue
}\relax
\fi
\MT@config@file
\MT@get@config
The main configuration file will be loaded before processing the package options.
However, the config option must of course be evaluated beforehand. We also have
to define a no-op for the regular option processing later.
\define@key{MT}{config}[]{\relax}
\def\MT@get@config#1config=#2,#3\@nil{%
\MT@ifempty{#2}%
{\def\MT@config@file{\[email protected]}}%
{\def\MT@config@file{#2.cfg}}%
}
\expandafter\expandafter\expandafter\MT@get@config
\csname opt@\@currname.\@currext\endcsname,config=,\@nil
Load the file.
\IfFileExists{\MT@config@file}{%
\MT@info@nl{Loading configuration file \MT@config@file}%
\MT@begin@catcodes
\let\MT@begin@catcodes\relax
\let\MT@end@catcodes\relax
\let\MT@curr@file\MT@config@file
\input{\MT@config@file}%
\endgroup
}{\MT@warning@nl{%
Could not find configuration file ‘\MT@config@file’!\MessageBreak
This will almost certainly cause undesired results.\MessageBreak
Please fix your installation}%
}
\MT@check@active@set
We have to make sure that font sets are active. If the user didn’t activate any, we
use those sets declared by \DeclareMicrotypeSetDefault (this is done at the end
of the preamble).
\def\MT@check@active@set#1{%
\MT@ifdefined@n@TF{MT@#1@setname}{%
\MT@info@nl{Using \@nameuse{MT@abbr@#1} set ‘\@nameuse{MT@#1@setname}’}%
}{%
\MT@ifdefined@n@TF{MT@default@#1@set}{%
\MT@glet@nn{MT@#1@setname}{MT@default@#1@set}%
\MT@info@nl{Using default \@nameuse{MT@abbr@#1} set ‘\@nameuse{MT@#1@setname}’}%
}{%
If no default font set has been declared in the main configuration file, we use the
(empty, non-existent) set ‘@’, and issue a warning.
}
}%
}%
\MT@gdef@n{MT@#1@setname}{@}%
\MT@warning@nl{No \@nameuse{MT@abbr@#1} set chosen, no default set declared.
\MessageBreak Using empty set}%