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 56\MT@rem@from@list962 \def\MT@rem@from@list#1{%963 \MT@exp@cs\ifx{MT@\@tempa @#1font@list}\relax\else964 \expandafter\MT@exp@one@n\expandafter\MT@rem@from@clist\expandafter965 \MT@font \csname MT@\@tempa @#1font@list\endcsname966 \fi967 }968 }\relax969 Here’s the promised dirty trick for users of older pdfTEX versions, which worksaround the problem that the use of the same font with different expansion parametersis prohibited. If you do not want to create a clone of the font setup (thiswould require duplicating the tfm/vf files under a new name, and writing new fdfiles and map entries), you can load a minimally larger font for the paragraph inquestion. E.g., for a document typeset in 10 pt:\SetExpansion[ stretch = 30,shrink = 60,step = 5 ]{ encoding = * ,size = 10.001 }{ }\newcommand{\expandpar}[1]{{%\fontsize{10.001}{\baselineskip}\selectfont #1\par}}% ...\expandpar{This paragraph contains an `unnecessary' widow.}Note that the \expandpar command can only be applied to complete paragraphs. Ifyou are using Computer Modern Roman, you have to load the fix-cm <strong>package</strong> tobe able to select fonts in arbitrary sizes. Finally, the reason I suggest to use a largerfont, and not a smaller one, is to prevent a different design size being selected.\MT@split@name\MT@encoding\MT@family\MT@series\MT@shape\MT@size\MT@familyalias\MT@scrubfeature\MT@scrubfeaturesSplit up the font name (〈#6〉 may be a protrusion/expansion context and/or aletterspacing amount). With fontspec we also need to remove its internal instancecounter.970 971 \def\MT@split@name#1/#2/#3/#4/#5/#6\@nil{%972 \def\MT@encoding{#1}%973 \ifMT@fontspec974 \edef\MT@family{\MT@scrubfeature#2()\relax}%975 \else976 \def\MT@family{#2}%977 \fi978 \def\MT@series {#3}%979 \def\MT@shape {#4}%980 \def\MT@size {#5}%Alias family?981 \MT@ifdefined@n@TF{MT@\MT@family @alias}%982 {\MT@let@cn\MT@familyalias{MT@\MT@family @alias}}%983 {\let\MT@familyalias\@empty}%984 }Remove one resp. all feature counters (fontspec).985 \def\MT@scrubfeature#1(#2)#3\relax{#1}986 \def\MT@scrubfeatures#1(#2)#3\relax{%987 #1%988 \ifx\relax#3\relax\else

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

Saved successfully!

Ooh no, something went wrong!