10.07.2015 Views

The microtype package

The microtype package

The microtype package

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

IMPLEMENTATION: Preliminaries 53853 \MT@with@<strong>package</strong>@T{tex4ht}\MT@if@true854 \MT@with@<strong>package</strong>@T{mathastext}\MT@if@true855 \ifMT@if@\g@addto@macro\MT@setupfont@hook\MT@restore@p@h\fi<strong>The</strong> listings <strong>package</strong> makes numbers and letters active,856 \MT@with@<strong>package</strong>@T{listings}{%857 \g@addto@macro\MT@cfg@catcodes{%858 \MT@while@num{"30}{"3A}{\catcode\@tempcnta 12\relax}%859 \MT@while@num{"41}{"5B}{\catcode\@tempcnta 11\relax}%860 \MT@while@num{"61}{"7B}{\catcode\@tempcnta 11\relax}%861 }%. . . and the backslash (which would lead to problems in \MT@get@slot).862 \g@addto@macro\MT@setupfont@hook{%863 \catcode`\\\z@Inside a listing, \space is redefined.864 \def\space{ }%When loaded with the extendedchar option, listings will also redefine 8-bit activecharacters (inputenc). Luckily, this simple redefinition will make them expand totheir original definition, so that they could be used in the configuration.865 \let\lst@ProcessLetter\@empty866 }%867 }%Of course, using both soul’s and <strong>microtype</strong>’s letterspacing mechanisms at thesame time doesn’t make much sense. But soul can do more, e.g., underlining. <strong>The</strong>optional argument to \textls may not be used.868 869 \MT@requires@latex2{870 \MT@with@<strong>package</strong>@T{soul}{%871 \soulregister\lsstyle 0%872 \soulregister\textls 1%873 }%Under plain TEX, soul doesn’t register itself the L A TEX way, hence we have to use adifferent test in this case.874 875 }{\ifx\SOUL@\@undefined\else876 \soulregister\lsstyle 0%877 \soulregister\textls 1%878 \fi}%879 880 Compatibility with the pinyin <strong>package</strong> (from CJK): disable <strong>microtype</strong> in \py@macron,which loads a different font for the accent. In older versions of pinyin (pre-4.6.0),\py@macron had only one argument.881 \MT@with@<strong>package</strong>@T{pinyin}{%882 \let\MT@orig@py@macron\py@macron883 \@if<strong>package</strong>later{pinyin}{2005/08/11}{% 4.6.0884 \def\py@macron#1#2{%885 \let\pickup@font\MT@orig@pickupfont886 \MT@orig@py@macron{#1}{#2}%887 \let\pickup@font\MT@pickupfont}%888 }{%889 \def\py@macron#1{%890 \let\pickup@font\MT@orig@pickupfont891 \MT@orig@py@macron{#1}%892 \let\pickup@font\MT@pickupfont}%893 }%894 }%

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

Saved successfully!

Ooh no, something went wrong!