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 75\lsstyle\lslig\MT@lslig\MT@ls@basefont\MT@get@ls@basefont\MT@set@lsbasefont\MT@set@tr@zeroDisable the tests whether the font should be letterspaced, then trigger the setup.Only \textls can be used in math mode (\lsstyle may be used inside anothertext switch, of course). Still, we have to ensure that math fonts are set up again.1830 \DeclareRobustCommand\lsstyle{%1831 \not@math@alphabet\lsstyle\textls1832 \let\glb@currsize\@empty1833 \def\MT@feat{tr}%1834 \let\MT@tracking\MT@set@tr@codes1835 \selectfont1836 }Now the definitions for the letterspace <strong>package</strong> with plain TEX.1837 1838 }{1839 \def\MT@set@lsfont{\MT@lsfont}1840 \def\lsstyle{%1841 \begingroup1842 \escapechar\m@ne1843 \xdef\font@name{\csname\expandafter\string\the\font\endcsname}%1844 \MT@set@tr@codes1845 \endgroup1846 }1847 \let\textls\@undefined1848 \let\lslig\@undefined1849 }1850 For Fraktur fonts, some ligatures shouldn’t be broken up. This command willtemporarily select the base font and insert the correct kerning.1851 \DeclareRobustCommand\lslig[1]{%1852 {\MT@ifdefined@c@TF\MT@curr@ls{%1853 \escapechar\m@ne1854 \MT@get@ls@basefont1855 \MT@outer@kern=\dimexpr\MT@curr@ls sp * \fontdimen6\font@name/2000\relax1856 \kern\MT@outer@kern1857 \font@name #1%1858 \kern\MT@outer@kern1859 }{#1}}%1860 }pdfTEX cannot letterspace fonts that already are letterspaced. <strong>The</strong>refore, we haveto save the base font in \〈font name〉@base.<strong>The</strong> previous solution (checking the macro’s meaning with \pdfmatch), wherewe were loading the base font via the \font primitive again, would destroy allpreviously set up micro-typographic features of the font.1861 \def\MT@get@ls@basefont{%1862 \xdef\MT@ls@basefont{\csname\expandafter\string\font@name @base\endcsname}%1863 \expandafter\ifx\MT@ls@basefont\relax1864 \MT@exp@two@c\MT@glet\MT@ls@basefont\font@name1865 \else1866 \MT@dinfo@nl{1}{... fixing base font}%1867 \MT@exp@two@c\let\font@name\MT@ls@basefont1868 \fi1869 }If tracking is switched off in the middle of the document, or if \textls is calledwith a zero letterspacing amount, we have to retrieve the base font and select it.1870 \def\MT@set@lsbasefont{\MT@exp@two@c\let\font@name\MT@ls@basefont}1871 \def\MT@set@tr@zero{%1872 \MT@dinfo@nl{1}{... zero tracking}%1873 \xdef\MT@ls@basefont{\csname\expandafter\string\font@name @base\endcsname}%1874 \expandafter\ifx\MT@ls@basefont\relax \else

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

Saved successfully!

Ooh no, something went wrong!