The microtype package - ctan.math.utah.edu

253
The microtype package Subliminal refinements towards typographical perfection R Schlicht [email protected] v2.8c 2021/03/14 The microtype package provides a L A T E X interface to the micro-typographic exten- sions that were introduced by pdfT E X and have since also propagated to LuaT E X and X E T E X: most prominently, character protrusion and font expansion, furthermore the adjustment of interword spacing and additional kerning, as well as hyphenatable letterspacing (tracking) and the possibility to disable all or selected ligatures. These features may be applied to customisable sets of fonts, and all micro-typographic aspects of the fonts can be configured in a straight-forward and flexible way. Settings for various fonts are provided. Note that character protrusion requires pdfT E X (version 0.14f or later), LuaT E X, or X E T E X (at least version 0.9997). Font expansion works with pdfT E X (version 1.20 for automatic expansion) or LuaT E X. The package will by default enable protrusion and expansion if they can safely be assumed to work. Disabling ligatures requires pdfT E X(1.30) or LuaT E X, while the adjustment of interword spacing and of kerning only works with pdfT E X(1.40). Letterspacing is available with pdfT E X(1.40) or LuaT E X(0.62). The alternative package letterspace, which also works with plain T E X, provides the user commands for letterspacing only, omitting support for all other extensions (see section 7). This package is copyright © 2004–2021 R Schlicht. It may be distributed and/or modified under the conditions of the L A T E X Project Public License, either version 1.3c of this license or (at your option) any later version. This work has the LPPL mainten- ance status ‘author-maintained’.

Transcript of The microtype package - ctan.math.utah.edu

Page 1: The microtype package - ctan.math.utah.edu

The microtype packageSubliminal refinements towards typographical perfection

R Schlichtwmlgmxnet

v28c20210314

The microtype package provides a LATEX interface to the micro-typographic exten-sions that were introduced by pdfTEX and have since also propagated to LuaTEX and

XETEX most prominently character protrusion and font expansion furthermore theadjustment of interword spacing and additional kerning as well as hyphenatableletterspacing (tracking) and the possibility to disable all or selected ligatures Thesefeatures may be applied to customisable sets of fonts and all micro-typographicaspects of the fonts can be configured in a straight-forward and flexible way Settingsfor various fonts are provided

Note that character protrusion requires pdfTEX (version 014f or later) LuaTEXor XETEX (at least version 09997) Font expansion works with pdfTEX (version 120for automatic expansion) or LuaTEX The package will by default enable protrusionand expansion if they can safely be assumed to work Disabling ligatures requirespdfTEX (ge 130) or LuaTEX while the adjustment of interword spacing and of kerningonly works with pdfTEX (ge 140) Letterspacing is available with pdfTEX (ge 140) orLuaTEX (ge062)

The alternative package letterspace which also works with plain TEX providesthe user commands for letterspacing only omitting support for all other extensions(see section 7)

This package is copyright copy 2004ndash2021 R Schlicht It may be distributed andormodified under the conditions of the LATEX Project Public License either version 13cof this license or (at your option) any later version This work has the LPPL mainten-ance status lsquoauthor-maintainedrsquo

CONTENTS 2

Contents

1 Micro-typography with TEX 4

2 Getting started 5

3 Options 631 Enabling the micro-typographic features 632 Character protrusion 733 Font expansion 734 Tracking 835 Miscellaneous options 936 Changing options later 9

4 Selecting fonts for micro-typography 10

5 Micro fine tuning 1251 Character protrusion 1352 Font expansion 1453 Tracking 1554 Additional kerning 1855 Interword spacing 1956 Character inheritance 2057 Configuration files 20

6 Context-sensitive setup 22

7 Letterspacing revisited 23

8 Disabling ligatures 24

9 Hints and caveats 25

10 Contributions 28

11 Acknowledgments 28

12 References 30

13 Short history 30

14 Implementation 34141 Preliminaries 35

Debugging [36] Requirements [38] Declarations [42] Auxiliary macros [43]Compatibility [52]

142 Font setup 56Protrusion [62] Expansion [69] Interword spacing (glue) [72] Additional kern-ing [73] Tracking [75] Disabling ligatures [85] Loading the configuration [87]Translating characters into slots [91] Hook into LATEXrsquos font selection [99]Context-sensitive setup [102]

143 Configuration 105Font sets [105] Variants and aliases [111] Disabling ligatures [112] Interactionwith babel [113] Fine tuning [113] Character inheritance [120] Permuta-tion [121]

LIST OF TABLES 3

144 Package options 125Declaring the options [125] Loading the definition file [129] Reading theconfiguration file [129] Hook for other packages [130] Changing optionslater [131] Processing the options [133]

15 Configuration files 143151 Font sets 143152 Font variants and aliases 144153 Interaction with babel 146154 Note on admissible characters 147155 Character inheritance 147

OT1 [147] T1 [148] LY1 [148] OT4 [149] QX [149] T5 [150] EU1 EU2 TU [151]Euro symbols [151]

156 Tracking 152157 Font expansion 152158 Character protrusion 154

Normal [155] Italics [163] Small caps [174] Italic small caps [177] Textcompanion [178] Computer Modern math [183] AMS symbols [187] Euler [190]Euro symbols [194]

159 Interword spacing 195Nonfrenchspacing [197]

1510 Additional kerning 198French [199] Turkish [199]

16 OpenType configuration files 201161 Character inheritance 201162 Character protrusion 205

17 Auxiliary file for micro fine tuning 219

A The title logo 221A1 Macros 221A2 Document 226

B The letterspacing illustration 226B1 Macros 226B2 Document 229

C Change history 231

D Index 241

E The LATEX Project Public License 250

List of Tables1 Availability of micro-typographic features 72 Predefined font sets 113 Fonts with tailored protrusion settings 214 Order for matching font attributes 89

MICRO-TYPOGRAPHY WITH TEX 4

1 Micro-typography with TEXMicro-typography is the art of enhancing the appearance and readability of adocument while exhibiting a minimum degree of visual obtrusion It is concernedwith what happens between or at the margins of characters words or lines Whereasthe macro-typographical aspects of a document (ie its layout) are clearly visibleeven to the untrained eye micro-typographical refinements should ideally not evenbe recognisable That is you may think that a document looks beautiful but youmight not be able to tell exactly why good micro-typographic practice tries toreduce all potential irritations that might disturb a reader

Some essential micro-typographical aspects are already taken care of by TEX outof the box ndash and in an outstanding manner ndash namely hyphenation and justificationas well as kerning and ligatures Other aspects are in the userrsquos scope of responsib-ilities eg to specify the right amounts of spacing around punctuation charactersnumbers or quotation marks On top of this a number of long-standing micro-typographic techniques have been introduced to the TEX world relatively recentlywith pdfTEX and have since also propagated to LuaTEX and XETEX These featuresmake them the tool of choice not only for the creation of electronic documentsbut also of works of outstanding time-honoured typography most prominentlycharacter protrusion (also known as margin kerning) and font expansion QuotingHagraven Thecirc Thagravenh the author of pdfTEX who writes in his thesis

After you have read the texton the right you can viewthe effect of the features itdescribes by clicking on thelinks

Protrusion onoff

Expansion onoff

Both features are enabledthroughout this document

lsquoMargin kerning is the adjustments of the characters at the margins of a typeset textA simplified employment of margin kerning is hanging punctuation Margin kerningis needed for optical alignment of the margins of a typeset text because mechanicaljustification of the margins makes them look rather ragged Some characters canmake a line appear shorter to the human eye than others Shifting such charactersby an appropriate amount into the margins would greatly improve the appearanceof a typeset text

Composing with font expansion is the method to use a wider or narrower variantof a font to make interword spacing more even A font in a loose line can be substi-tuted by a wider variant so the interword spaces are stretched by a smaller amountSimilarly a font in a tight line can be replaced by a narrower variant to reducethe amount that the interword spaces are shrunk by There is certainly a potentialdanger of font distortion when using such manipulations thus they must be usedwith extreme care The potentiality to adjust a line width by font expansion can betaken into consideration while a paragraph is being broken into lines in order tochoose better breakpointsrsquo [Thagravenh 2000 p 323]

lsquoMargin kerning is the adjustments of the characters at the margins of a typeset textA simplified employment of margin kerning is hanging punctuation Margin kerningis needed for optical alignment of the margins of a typeset text because mechanicaljustification of the margins makes them look rather ragged Some characters canmake a line appear shorter to the human eye than others Shifting such charactersby an appropriate amount into the margins would greatly improve the appearanceof a typeset text

Composing with font expansion is the method to use a wider or narrower variant ofa font to make interword spacing more even A font in a loose line can be substitutedby a wider variant so the interword spaces are stretched by a smaller amountSimilarly a font in a tight line can be replaced by a narrower variant to reducethe amount that the interword spaces are shrunk by There is certainly a potentialdanger of font distortion when using such manipulations thus they must be usedwith extreme care The potentiality to adjust a line width by font expansion can betaken into consideration while a paragraph is being broken into lines in order tochoose better breakpointsrsquo [Thagravenh 2000 p 323]

lsquoMargin kerning is the adjustments of the characters at the margins of a typeset textA simplified employment of margin kerning is hanging punctuation Margin kerningis needed for optical alignment of the margins of a typeset text because mechanicaljustification of the margins makes them look rather ragged Some characters canmake a line appear shorter to the human eye than others Shifting such charactersby an appropriate amount into the margins would greatly improve the appearanceof a typeset text

Composing with font expansion is the method to use a wider or narrower variantof a font to make interword spacing more even A font in a loose line can be substi-tuted by a wider variant so the interword spaces are stretched by a smaller amountSimilarly a font in a tight line can be replaced by a narrower variant to reducethe amount that the interword spaces are shrunk by There is certainly a potentialdanger of font distortion when using such manipulations thus they must be usedwith extreme care The potentiality to adjust a line width by font expansion can betaken into consideration while a paragraph is being broken into lines in order tochoose better breakpointsrsquo [Thagravenh 2000 p 323]

If you had a PDF viewer thatunderstands PDF 15 youcould view the effect of themicro-typographic features byclicking on the links

Both features are enabledthroughout this document

lsquoMargin kerning is the adjustments of the characters at the margins of a typeset textA simplified employment of margin kerning is hanging punctuation Margin kerningis needed for optical alignment of the margins of a typeset text because mechanicaljustification of the margins makes them look rather ragged Some characters canmake a line appear shorter to the human eye than others Shifting such charactersby an appropriate amount into the margins would greatly improve the appearanceof a typeset text

Composing with font expansion is the method to use a wider or narrower variant of afont to make interword spacing more even A font in a loose line can be substituted bya wider variant so the interword spaces are stretched by a smaller amount Similarlya font in a tight line can be replaced by a narrower variant to reduce the amountthat the interword spaces are shrunk by There is certainly a potential danger of fontdistortion when using such manipulations thus they must be used with extremecare The potentiality to adjust a line width by font expansion can be taken intoconsideration while a paragraph is being broken into lines in order to choose betterbreakpointsrsquo [Thagravenh 2000 p 323]

Another micro-typographic technique which has always been extremely difficultto achieve in TEX is robust and hyphenatable letterspacing (tracking)1 Whereasletterspacing can easily be and often is abused when applying it to lowercaseletters readability may be increased by slightly letterspacing (small) capitals or bydecreasing the tracking of very large uppercase type

Setting additional kerning for individual characters is especially (but not only)useful for languages whose typographical tradition requires certain characters to beseparated by a space For example it is customary in French typography to add asmall space before question mark exclamation mark and semi-colon and a biggerspace before the colon and the guillemets Until now this could only be achieved

1 The soul package undertakes great efforts but may still fail in certain circumstances even to systemat-ically adjust the tracking of a font throughout the document remains impossible

GETTING STARTED 5

by making these characters active (as is done for example by the babel package)which may not always be a robust solution In contrast to the standard kerningbuilt into the fonts (which will of course apply as usual) this additional kerningrelates to single characters not to character pairs

Adjustment of interword spacing is based upon the idea that in order to achievea uniform greyness of the text the space between words should also depend onthe surrounding characters For example if a word ends with an lsquorrsquo the followingspace should be a tiny bit smaller than that following say an lsquomrsquo You can thinkof this concept as an extension to TEXrsquos lsquospace factorsrsquo This feature may enhancethe appearance of paragraphs even more Emphasis in the last sentence is onthe word lsquomayrsquo this extension is still highly experimental ndash in particular onlyending characters will currently influence the interword space Also the settingsshipped with microtype are but a first approximation and I would highly welcomecorrections and improvements I suggest reading the reasoning behind the settingsin section 159

The possibility finally to disable all or selected ligatures is particularly useful fortypewriter fonts

The microtype package provides an interface to all these micro-typographic exten-sions All micro-typographic aspects may be customised to your taste and needs ina straight-forward and systematic manner The next chapters present a survey ofall options and customisation possibilities Should the micro-typographic extensiondiscussed in a section work only with certain TEX engines this requirement ismarked inside a grey text box on the right

2 Getting startedThere is nothing surprising in loading this package

usepackagemicrotype

This will be sufficient in most cases and if you are not interested in fine-tuningthe micro-typographic appearance of your document (however unlikely this wouldseem since using this package is proof of your interest in typographic issues) youmay actually skip the rest of this document If this on the other hand does notsatisfy you ndash be it for theoretical or practical reasons ndash this manual will guide youon the path to the desired results along the following milestones

bull Enable the desired micro-typographic features either via the respective packageoption or with the microtypesetup command (section 3)

bull Select the fonts to which this feature should be applied by declaring and activatinglsquosets of fontsrsquo A number of sets are predefined which may be activated directly inthe package options (section 4)

bull Fine-tune the micro-typographic settings of the fonts or sets of fonts (section 5)

bull If yoursquore of the kind who always wants to march on you will certainly be interestedin the possibility of context-sensitive setup (section 6)

bull You are even countenanced to leave the path of typographic virtue and steal somesheep (section 7) or trespass in other ways (section 8)

bull Should you encounter any obstacles follow the hints and caveats (section 9)

OPTIONS 6

3 OptionsLike many other LATEX packages the microtype package accepts options in thewell-known key=value syntax In the following you will find a description of allkeys and their possible values (lsquotruersquo may be omitted multiple values whereallowed must be enclosed in braces the default value is shown on the right ndashif preceded by an asterisk this default only applies when running an up-to-datepdfTEX in PDF mode)

31 Enabling the micro-typographic featurestrue false compatibility nocompatibility langfont set namerang trueprotrusion

These are the main options to control the level of micro-typographic refinementexpansionwhich the fonts in your document should gain By default the package is moderatelygreedy character protrusion will always be enabled font expansion will only bedisabled when the fonts cannot be expanded automatically that is with pdfTEXversions older than 120 or in DVI output mode (see section 35) or with XETEX Inother words microtype will try to apply as much micro-typography as can safely beexpected to work under the respective conditions (hence it is usually not necessaryto load the package with different options eg for PDF resp DVI mode)

Protrusion and expansion may be enabled or disabled independently from eachother by setting the respective key to true resp false The activate option is aactivateshortcut for setting both options at the same time Therefore the following linesall have the same effect (when creating PDF files with a recent version of pdfTEX)

usepackage[protrusion=trueexpansion]microtype

usepackage[activate=truenocompatibility]microtype

usepackagemicrotype

With activated font expansion andor character protrusion line breaks (and con-sequently page breaks) may turn out differently If this is not desired ndash because youare re-typesetting a book whose pagination must not change ndash you may pass thevalue compatibility to the protrusion andor expansion options Typographicallyhowever the results will be suboptimal hence the default value is nocompatibility

Finally you may also specify the name of a font set to which character protrusionandor font expansion should be restricted See section 4 for a detailed discussionSpecifying a font set for a feature implicitly activates this feature

true false langfont set namerang falsetracking

This option will systematically change the tracking of the fonts specified in theactive font set (by default all small capitals) It is not available with XETEX (youmay use the lsquoLetterSpacersquo option of the fontspec package instead) With pdfTEXit is only available in PDF mode

true false langfont set namerang falsekerning

These features do not unconditionally improve the quality of the typeset text thespacingspacing feature is still considered experimental while the kerning feature onlymakes sense in special cases Therefore neither feature is enabled by default Theyare not available with XETEX or LuaTEX

OPTIONS Character protrusion 7

Table 1

Availability of micro-typographic features

TEX engine Micro-typographic features

Engine Version Output Protrusion Expansion Tracking Kerning Spacing

manual automatic

pdfTEX lt 014f DVIPDF empty empty empty empty empty emptyge 014f DVIPDF AElig empty empty empty emptyge 120 DVI AElig empty empty empty empty

PDF AElig AElig empty empty emptyge 140 DVI AElig empty empty

PDF AElig AElig

LuaTEX ge 030 DVI AElig empty empty empty emptyPDF AElig AElig empty empty empty

ge 062 DVI AElig empty ()a empty emptyPDF AElig empty AElig empty empty

XETEX ge 09997 PDF AElig empty empty empty empty empty

AElig = enabled = not enabled empty = not available a by means of variable tracking

Table 1 presents an overview of which micro-typographic features are availableand enabled by default for the relevant TEX versions and output modes

Whether ligatures should be disabled cannot be controlled via a package optionbut by using the DisableLigatures command which is explained in section 8

32 Character protrusion pdfTEX 014f | LuaTEX 030 | XETEX 09997

langintegerrang 1000factor

Using this option you can globally increase or decrease the amount by which thecharacters will be protruded While a value of 1000 means that the full protrusionas specified in the configuration (see section 51) will be used a value of 500 wouldresult in halving all protrusion factors of the configuration This might be useful ifyou are generally satisfied with the settings but prefer the margin kerning to beless or more visible (eg if you are so proud of being able to use this feature thatyou want everybody to see it or ndash to mention a motivation more in compliancewith typographical correctness ndash if you are using a large font that calls for moremodest protrusion)

character langdimensionrang characterunit

This option is described in section 51 apropos the command SetProtrusion Usewith care

33 Font expansion pdfTEX 014f | LuaTEX 030

true false trueauto

Beginning with pdfTEX version 120 (inherited by LuaTEX) the expanded instancesof the fonts may be calculated automatically and at run-time instead of the user

OPTIONS Tracking 8

having to prepare them in advance This option is true by default provided that youare using a TEX engine with this capability and the output mode is PDF2 If auto isset to false the font instances for all expansion steps must exist (with files calledlangfont namerangplusmnlangexpansion valuerang eg cmr12+10 as described in the pdfTEX manual)With recent versions of LuaTEX expansion is always automatic

When generating DVI files font expansion has to be enabled explicitly WithpdfTEX automatic font expansion will not work because the postprocessing drivers(dvips dvipdfm etc) resp the DVI viewer are not able to generate the fonts on thefly With LuaTEX on the other hand expansion in DVI mode is realised by modifyingthe inter-letter spacing (tracking) instead of the glyphs themselves which may ormay not be desired

langintegerrang 20stretch

You may specify the stretchability and shrinkability of a font ie the maximumshrinkamount that a font may be stretched or shrunk The numbers will be divided by1000 so that a stretch limit of 10 means that the font may be expanded by upto 1 The default stretch limit is 20 The shrink limit will by default be the sameas the stretch limit

langintegerrang 1step

Fonts are not expanded by arbitrary amounts but only by certain discrete stepswithin the expansion limits With recent versions of pdfTEX (140 or newer) orLuaTEX this option is by default set to 1 in order to allow trying the maximumnumber of font instances and hence to guarantee the best possible output3 OlderpdfTEX versions however had to include every font instance in the PDF file whichmay increase the file size quite dramatically Therefore in case you are using apre-140 pdfTEX version step is by default set to one fifth of the smaller value ofstretch and shrink

true false falseselected

When applying font expansion it is possible to restrict the expansion of somecharacters that are more sensitive to deformation than others (eg the lsquoOrsquo incontrast to the lsquoIrsquo) This is called selected expansion and its usage allows increasingthe stretch and shrink limits (to say 30 instead of 20) however the gain is limitedsince at the same time the average stretch variance will be decreased Thereforethis option is by default set to false so that all characters will be expanded by thesame amount See section 52 for a more detailed discussion

34 Tracking pdfTEX 140 | LuaTEX 062

langintegerrang 100letterspace

This option changes the default amount for tracking (see section 53) resp letter-spacing (see section 7) The amount is specified in thousandths of 1em admissiblevalues are in the range of minus1000 to +1000

2 With pdfTEX automatic font expansion does not work with bitmap fonts Therefore if you are using theComputer Modern Roman fonts in T1 encoding you should either install the cm-super package or usethe Latin Modern fonts (package lmodern)

3 The downside with this default is that pdfTEX may run out of memory with huge documents in thiscase read about the error messages in the lsquoHints and caveatsrsquo section (9) or try with a larger step

OPTIONS Miscellaneous options 9

35 Miscellaneous optionstrue false falsedraft

If the draft option is passed to the package all micro-typographic extensions willfinalbe disabled which may lead to different line and hence page breaks The draftand final options may also be inherited from the class options of course you canoverride them in the package options Eg if you are using the class option draftto show any overfull boxes you should load microtype with the final option

true false errors silent falseverbose

Information on the settings used for each font will be written into the log file ifyou enable the verbose option When microtype encounters a problem that is notfatal (eg an unknown character in the settings or non-existent settings) it willby default only issue a warning and try to continue Loading the package withverbose=errors will turn all warnings into errors so that you can be sure that noproblem will go unnoticed If on the other hand you have investigated all warningsand decide to ignore them you may silence microtype with verbose=silent

true false falsebabel

Loading the package with the babel option will adjust the typesetting according tothe respective selected language Read section 6 for further information

langfile namerang microtypeconfig

Various settings for this package will be loaded from a main configuration file bydefault microtypecfg (see section 57) You can have a different configuration fileloaded instead by specifying its name without the extension eg config=mycrotype

true false falseDVIoutput

pdfTEX and LuaTEX are not only able to generate PDF output but can also spit outDVI files In fact all recent TEX systems are using pdfTEX as the default enginealso for DVI output and LuaTEX too can be called in DVI mode However sincechanging the output mode inside the document may have undesired effects thisoption should be considered deprecated instead it is recommended to just callthe respective program (latex resp dvilualatex) For XETEX this option is notapplicable

36 Changing options laterlangkey = value listrangmicrotypesetup

Inside the preamble this command accepts all package options described above(except for config) In the document body this command may be used to changethe general settings of the micro-typographic extensions It then accepts all optionsfrom section 31 expansion protrusion and activate which in turn may receivethe values true false compatibility or nocompatibility and tracking kerningand spacing with the admissible values true or false Passing the name of a fontset is not allowed Using this command you could for instance temporarily disablefont expansion by saying

microtypesetupexpansion=false

SELECTING FONTS FOR MICRO-TYPOGRAPHY 10

4 Selecting fonts for micro-typographyBy default character protrusion will be applied to all text fonts used in the docu-ment and a basic set of fonts will be subject to font expansion You may want tocustomise which fonts should get the benefit of micro-typographic treatment Thiscan be achieved by declaring and activating lsquofont setsrsquo these font sets are specifiedvia font attributes that have to match

[langfeaturesrang] langset namerang langset of fontsrangDeclareMicrotypeSet

This command declares a new set of fonts to which the micro-typographic exten-DeclareMicrotypeSetsions should be applied The optional argument may contain a comma-separatedlist of features to which this set should be restricted The starred version of thecommand declares and activates the font set at the same time

The set of fonts is specified by assigning values to the NFSS font attributes encod-ing family series shape and size (cf LATEX 2ε font selection) Letrsquos start with anexample In the main configuration file microtypecfg a font set called lsquobasictextrsquois defined as follows

DeclareMicrotypeSetbasictext encoding = OT1T1T2ALY1OT4QXT5EU1EU2TU family = rmsf series = md size = normalsizefootnotesizesmalllarge

If you now call

UseMicrotypeSet[protrusion]basictext

in the documentrsquos preamble only fonts in the text encodings roman or sansserif families normal (or lsquomediumrsquo) series and in sizes called by normalsizefootnotesize small or large will be protruded Math fonts on the other handwill not since they are in another encoding Neither will fonts in bold face or hugefonts Etc

If an attribute list is empty or missing ndash like the lsquoshapersquo attribute in the aboveexample ndash it does not constitute a restriction In other words this is equivalentto specifying all possible values for that attribute Therefore the predefined setlsquoalltextrsquo which is declared as

DeclareMicrotypeSetalltext encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU

is far less restrictive The only condition here is that the encoding must matchIf a value is followed by an asterisk (like lsquormrsquo and lsquosfrsquo in the first example)

it does not designate an NFSS code but will be translated into the documentrsquoslangvaluerangdefault eg rmdefault4 A single asterisk means langattributerangdefaulteg encodingdefault respectively normalsize for the size axis Sizes may eitherbe specified as a dimension (lsquo10rsquo or lsquo10ptrsquo) or as a size selection command withoutthe backslash You may also specify ranges (eg lsquosmall-Largersquo) while the lower

4 These translations will take place AtBeginDocument which means that changes to the defaults inside thepreamble will also be taken into account Only in cases where you change font defaults AtBeginDocumentyourself you need to load microtype after these changes

SELECTING FONTS FOR MICRO-TYPOGRAPHY 11

Table 2

Predefined font sets

Set name Font attributes

Encoding Family Series Shape Size

all empty empty empty empty empty

alltext(allmath)

Text encodings TS1(OML OMS U)

empty empty empty empty

alltext-nott(allmath-nott)

Text encodings TS1(OML OMS U)

rmsf

empty empty empty

basictext(basicmath)

Text encodings(OML OMS)

rmsf

md empty normalsizefootnotesizesmall large

smallcaps Text encodings empty empty scsiscit empty

footnotesize Text encodings TS1 empty empty empty -small

scriptsize Text encodings TS1 empty empty empty -footnotesize

normalfont encoding family series shape normalsize

lsquoText encodingsrsquo = OT1 T1 T2A LY1 OT4 QX T5 EU1 EU2 TU lsquo rsquo = lsquo defaultrsquo

boundary is included in the range the upper boundary is not Thus lsquo12-16rsquo wouldmatch 12 pt 135 pt and 15999 pt for example but not 16 pt You are allowed toomit the lower or upper bound (lsquo-10rsquo lsquolarge-rsquo)

Additionally to this declaration scheme you can add single fonts to a set usingthe lsquofontrsquo key which expects the concatenation of all font attributes separated byforward slashes ie lsquofont = langencodingranglangfamilyranglangseriesranglangshaperanglangsizerangrsquo This allowsyou to add fonts to the set that are otherwise disjunct from it For instance if youwanted to have the roman family in all sizes protruded but only the normal sizedpossibly italic typewriter font (in contrast to say the small one) this is how youcould declare the set

DeclareMicrotypeSet[protrusion] myset encoding = T1 family = rm font = T1ttmn T1ttmit

As you can tell from the example the asterisk notation is also permitted for thefont key A single asterisk is equivalent to lsquorsquo ie the normal font Sizeselection commands are possible too however ranges are not allowed

Table 2 lists the eleven predefined font sets They may also be activated by passingtheir name to the feature options protrusion expansion tracking kerning andspacing when loading the package for example

usepackage[protrusion=allmathtracking=smallcaps]microtype

MICRO FINE TUNING 12

[langfeaturesrang] langset namerangUseMicrotypeSet

This command activates a font set previously declared by DeclareMicrotypeSetUsing the optional argument you can limit the application of the set to one ormore features This command only has an effect if the feature was activated in thepackage options

[langfeaturesrang] langset namerangDeclareMicrotypeSetDefault

If a feature is enabled but no font set has been chosen explicitly the sets declared bythis command will be activated By default the lsquoalltextrsquo font set will be activatedfor character protrusion and additional kerning the lsquoalltext-nottrsquo set for fontexpansion and interword spacing and the lsquosmallcapsrsquo set for tracking

These commands may only be used in the preamble or in the main configuration fileTheir scope is global to the document Only one set per feature may be activated

5 Micro fine tuningEvery character asks for a particular protrusion kerning or spacing amount Itmay also be desirable to restrict the maximum expansion of certain charactersFurthermore since every font looks different settings have to be specific to afont or set of fonts This package offers flexible and straight-forward methods ofcustomising these finer aspects of micro-typography

All fine-tuning commands follow basically the same syntax they all take threearguments the first one is optional and may contain additional options in thesecond argument you specify the set of fonts to which the settings should apply thethird argument contains the actual settings Here as in all configuration commandsall spaces are ignored

The set of fonts to which the settings should apply is declared using the samesyntax of langfont axisrang = langvalue listrang pairs as for the command DeclareMicrotypeSet(see section 4) with the only difference that values including asterisks (which asyou may recall stand for the respective default) will be translated immediatelyinstead of at the end of the preamble To find the matching settings for a givenfont the package will try all combinations of font encoding family series shapeand size with decreasing significance in this order For instance if settings exist forboth the current family (say T1cmr) and for italic fonts in the normal weight(T1mit) the settings for the cmr family would apply The encoding must alwaysmatch

The characters may be specified either as a single letter (A) as a text sym-bol command (textquoteleft) or as a slot number (resp Unicode number forLuaTEX or XETEX) three or more digits for decimal notation prefixed with forhexadecimal with rsquo for octal numerals (eg the lsquoflrsquo ligature in T1 encoding 0291D rsquo35) 8-bit (and even UTF-8) characters may be entered directly or in LATEXrsquostraditional 7-bit notation both A and Auml are valid provided the character is ac-tually declared in both the input and the font encoding With LuaTEX or XETEXyou may additionally specify a (font-specific) glyph name prefixed with lsquorsquo (egthe lsquoflrsquo ligature as f_l) Note that you also have the possibility to declare lists ofcharacters that should inherit settings (see section 56)

MICRO FINE TUNING Character protrusion 13

51 Character protrusion pdfTEX 014f | LuaTEX 030 | XETEX 09997

[langoptionsrang] langset of fontsrang langprotrusion settingsrangSetProtrusion

Using this command you can set the protrusion factors for each character of a fontor a set of fonts A very incomplete example would be the following

SetProtrusion encoding = T1 family = cmr A = 5050 textquoteleft = 700

which would result in the character lsquoArsquo being protruded by 5 of its width onboth sides and the left quote character by 70 of its width into the left marginThis would apply to all font shapes series and sizes of the T1 encoded ComputerModern Roman family

The protrusion settings consist of langcharacterrang = langprotrusion factorsrang pairs The pro-trusion factors designate the amount that a character should be protruded intothe left margin (first value) respectively into the right margin (second value) Bydefault the values are relative to the character widths so that a value of 1000means that the character should be shifted fully into the margin while for examplewith a value of 50 it would be protruded by 5 of its width Negative values areadmitted as well as numbers larger than 1000 (but effectively not more than 1emof the font) You may omit either number if the character should not be protrudedon that side but must not drop the separating comma

Options

name You may assign a name to the protrusion settings so that you are able toload it by another list

load You can load another list (provided you assigned a name to it) before thecurrent list will be loaded so that the fonts will inherit the values from the loadedlist

In this way the configuration may be simplified considerably You can for instancecreate a default list for a font settings for other shapes or series can then load thesesettings and extend or overwrite them (since the value that comes last will take pre-cedence) Font settings will be loaded recursively The following options will affectall loaded lists in other words any options from the loaded lists will be ignored

factor This option can be used to influence all protrusion factors of the listoverriding any global factor setting (see section 32) For instance if you wantfonts in larger sizes to be protruded less you could load the normal lists just witha different factor applied to them

SetProtrusion [ factor = 700 load = cmr-T1 ] encoding = T1 family = cmr size = large-

MICRO FINE TUNING Font expansion 14

unit By default the protrusion factors are relative to the respective characterrsquoswidth The unit option may be used to override this and make microtype regardall values in the list as thousandths of the specified width Issuing for instancelsquounit=1emrsquo would have the effect that a value of say 50 now results in the characterbeing protruded by 5 of an em of the font (thus simulating the internal measuringof pdfTEXrsquos lpcode and rpcode primitives) The default behaviour can be restoredwith unit=character5

preset Presets the protrusion codes of all characters to the specified values(=langleftranglangrightrang) possibly scaled by a factor A unit setting will only be takeninto account if it is not =character

inputenc Selects an input encoding that should apply to this list regardless ofwhat the documentrsquos input encoding is You may specify any encoding that can beloaded via the inputenc package eg ansinew koi8-r utf8

context The scope of the list may be limited to a certain context For furtherdetails see section 6

52 Font expansion pdfTEX 014f | LuaTEX 030

[langoptionsrang] langset of fontsrang langexpansion settingsrangSetExpansion

By default all characters of a font are allowed to be stretched or shrunk by the sameamount However it is also possible to limit the expansion of certain characters ifthey are more sensitive to deformation This is the purpose of the SetExpansioncommand Note that it will only have an effect if the package has been loadedwith the selected option (cf section 33) Otherwise the expansion settings willbe ignored ndash unlike the options in the optional first argument which will still beevaluated If the selected option has been set to true and settings for a font donrsquotexist font expansion will not be applied to this font at all Should the extraordinarysituation arise that you want to employ selected expansion in general but for aparticular font (set) all characters should be expanded or shrunk by the sameamount you would have to declare an empty list for these fonts

The expansion settings consist of langcharacterrang = langexpansion factorrang pairs You mayspecify one number for each character which determines the amount that a charac-ter may be expanded The numbers denominate thousandths of the full expansionFor example if you set the expansion factor for the character lsquoOrsquo to 500 it will onlybe expanded or shrunk by one half of the amount that the rest of the characterswill be expanded or shrunk While the default value for character protrusion is 0 ndashthat is if you didnrsquot specify any characters none would be protruded ndash the defaultvalue for expansion is 1000 which means that all characters would be expandedby the same amount

Options

name load preset inputenc context Analogous to SetProtrusion the optionalargument may be used to assign a name to the list to load another list to preset

5 The unit option can even be passed globally to the package (cf section 32) However all providedsettings are created under the assumption that the values are relative to the character width Thereforeyou should only change it if you are certain that the default settings will not be used in your document

MICRO FINE TUNING Tracking 15

all expansion factors to set the input encoding or to determine the context of thelist (expansion contexts are only possible with pdfTEX version 1404 or newer)

auto stretch shrink step These keys can be used to override the global set-tings from the package options (see section 33) If you donrsquot specify either one ofstretch shrink and step their respective global value will be used (that is nocalculation will take place)

As a practical example suppose you have a paragraph containing a widow thatcould be avoided by shrinking the font a bit more In conjunction with the contextoption (see section 6 for further details) you could thus allow for more expansionin this particular paragraph

SetExpansion [ context = sloppy stretch = 30 shrink = 60 step = 5 ] encoding = OT1T1TS1 END PREAMBLEmicrotypecontextexpansion=sloppy This paragraph contains a `fussy widow

This method of employing contexts to temporarily apply different expansion para-meters only works with pdfTEX version 1404 or later6 or with LuaTEX Also notethat both pdfTEX and LuaTEX prohibit the use of fonts with different expansionlimits or steps (even of different fonts) within one paragraph hence the sloppycontext would have to be applied to complete paragraphs

factor This option provides a different method to alter expansion settings forcertain fonts working around the restriction just mentioned The factor optioninfluences the expansion factors of all characters (in contrast to the overall stretch-ability) of the font For instance if you want the italic shape to be expanded lessyou could declare

SetExpansion [ factor = 500 ] encoding = shape = it

The factor option can only be used to decrease the stretchability of the charactersthat is it may only receive values smaller than 1000 Also it can only be used forsingle fonts or font sets setting it globally in the package options wouldnrsquot makemuch sense ndash to this end you use the packagersquos stretch and shrink options

53 Tracking pdfTEX 140 | LuaTEX 062

[langoptionsrang] langset of fontsrang langtracking amountrangSetTracking

An important typographic technique ndash which was missing in TEX for a long time ndash isthe adjustment of tracking ie the uniform addition or subtraction of letter space

6 For older versions a dirty trick is laid out in section 142 on page 59

MICRO FINE TUNING Tracking 16

tofrom all the characters in a font For example it is good typographic practiceto slightly space out text set in all capitals or small capitals (as in this document)Legibility may also be improved by minimally increasing the tracking of smallerand decreasing that of larger type7 The SetTracking command allows specifyingthe tracking amount for different fonts or font sets It will also be evaluated by thetextls command which may be used for letterspacing shorter pieces of text (seesection 7)

The tracking amount is specified in thousandths of 1em (or the given unit)negative values are allowed too

Options

name unit context These options serve the same functions as in the previousconfiguration commands The unit may be any dimension default is 1em

spacing When the inter-letter spacing is altered the inter-word spacing probablyalso needs to be adjusted This option expects three numbers for interword spacestretch and shrink respectively which are given in thousandths of 1em (or of thecurrent unit) If a value is followed by an asterisk it denotes thousandths of therespective font dimension which will be added to it For instance with

SetTracking[ spacing = 25166 ] encoding = shape = sc 25

the interword space will be increased by 25 the stretch amount will be set to0166em while the shrink amount will be left untouched If you donrsquot specifythe spacing option the interword space will be scaled by the current letterspaceamount (as in the above example) while stretch and shrink will not be changed

outer spacing If an interword space immediately precedes or follows letter-spaced text it will by default be equal to that within the text With this optionwhich accepts the same values as spacing it may be adjusted independently

outer kerning If on the other hand no interword space precedes or followsyou may still want to slightly set off the first and last letter from adjoining lettersThis option expects the kerning amounts for left and right hand side separated bya comma in thousandths of 1em (or the current unit) If a value is followed byan asterisk it denotes thousandths of the current letterspacing amount A singleasterisk means lsquo500rsquo this is also the default ie the sum of the outer kerns is bydefault equal to the current letterspace amount To remove kerning on both sidesyou would write lsquoouter kerning=00rsquo

no ligatures By default ligatures in letterspaced fonts will be constructed asusual which may be advisable when changing the tracking by only a small amountFor larger letterspacing amounts on the other hand the normal letter space withinligatures would have displeasing e ff e c t s This key expects a comma-separatedlist of characters for which ligatures should be disabled only the character thatbegins a ligature must be specified If the key is given without a value all ligaturesof the font will be disabled With pdfTEX this is not recommended however sinceit entails that kerning will be switched off too With LuaTEX there is no suchlimitation The default settings disable ligatures for the character lsquofrsquo only ie lsquoffrsquo

7 With full-featured fonts like Computer Modern this is usually not necessary though since they come inoptical sizes and the tracking of the small-capitals font is already adjusted

MICRO FINE TUNING Tracking 17

lsquofirsquo ffirsquo etc8 In exceptional situations you can manually break up a ligature byinserting lsquokern0ptrsquo resp babelrsquos | shortcut or protect it by enclosing it inlslig (see section 7)

Since a picture is worth a thousand words probably even more if in our case itdepicts a couple of letterspaced words letrsquos bring one to sum up these somewhatconfusing options Suppose you had the following settings (which are in no wayrecommended they only serve illustrative purposes)

SetTracking [ no ligatures = f spacing = 600-100 outer spacing = 450250150 outer kerning = ] encoding = 160

and then write

Stop textlsstealing sheep

this would be the (typographically dubious) outcomeClick on the image to show thekerns and spacings involvedClick on emphasised words inthe text below to reveal therelation of image and code

If you had a PDF viewer thatunderstands PDF 15 youcould hide the arrows select-ively

Stop T e a l i n g s h e e pWhile the word lsquoStoprsquo is not letterspaced the space between the letters in the othertwo words is expanded by the tracking amounttracking amounttracking amount of 1601000em = 016em Theinner spaceinner spaceinner space within the letterspaced text is increased by 60 while its stretchstretchstretch amountis decreased by 10 and the shrinkshrinkshrink amount is left untouched The outer spaceouter spaceouter space (of045em) immediately before the piece of text may stretchstretchstretch by 025em and shrinkshrinkshrinkby 015em Note that there is no outer space after the text since the exclamationmark immediately follows instead the default outer kernouter kernouter kern of half the letterspaceamount (008em) is added Furthermore one ligatureligatureligature wasnrsquot broken up becausewe neglected to specify the lsquosrsquo in the no ligatures key

As another more realistic example suppose you want to space out all small capitalsby 501000em fonts smaller than small by 002em and to decrease the trackingof large type by 002em This could be achieved with the following settings

usepackage[tracking=true]microtypeDeclareMicrotypeSet[tracking]my encoding = size = -smallLarge- font = sc SetTracking[ no ligatures = f ] encoding = shape = sc 50 SetTracking encoding = size = -small 20 SetTracking encoding = size = Large- -20

Letterspaced fonts for which settings donrsquot exist will be spaced out by the default of01em (adjustable with the package option letterspace see section 35) Suppose

8 With pdfTEX versions older than 1404 all ligatures and hence all kerning will be disabled It istherefore recommended to use at least version 1404

MICRO FINE TUNING Additional kerning 18

your editor wants you to shorten your 1000-pages chef-drsquoœuvre by a handful ofpages you could load microtype with (fingers crossed)

usepackage[tracking=alltextletterspace=-40]microtype

54 Additional kerning pdfTEX 140

[langoptionsrang] langset of fontsrang langkerning settingsrangSetExtraKerning

With this command you can fine tune the extra kerning In contrast to standardkerning which is always associated with a pair of characters and to trackingwhich specifies the space between all characters of a font the extra kerning relatesto single characters that is whenever a particular character appears in the textthe specified kerning will be inserted regardless of which character precedes respfollows it (Put differently this feature allows modifying the left or right sidebearingsof specific glyphs)

It should not be neglected to mention a limitation of this feature words imme-diately following such a kern (not separated by a space) will not be hyphenatedunless you insert the breakpoints manually eg for kerning after the apostrophelsquolrsquoapos-trophersquo Furthermore additional kerning will not be applied in mathmode These restrictions of pdfTEX will hopefully be lifted some time

The kerning settings are specified as pairs of langcharacterrang = langkerning valuesrang wherethe latter consist of two values the kerning added before the character and thekerning appended after the respective character Once again either value may beomitted but not the separating comma

Options

name load factor preset inputenc These options serve the same function asin the previous configuration commands

unit Admissible values are space character and a langdimensionrang By default thevalues denote thousandths of 1em

context When it comes to kerning settings this option is especially useful sinceit allows applying settings depending on the current language

For example you can find the following settings intended to be used for documentswritten in French in the main configuration file

SetExtraKerning [ name = french-default context = french unit = space ] encoding = OT1T1LY1 = 1000 = fontdimen2 = 500 ~ thinspace = 500 = 500

What is the result of these settings If they are active like in the current paragrapha thin space will be inserted in front of each question mark exclamation mark and

MICRO FINE TUNING Interword spacing 19

semicolon a normal space in front of the colon Read section 6 to learn how toactivate these settings This paragraph was input like this

beginmicrotypecontextkerning=french What is the result of these settings If they are active like in the current paragraph a thin space will be inserted in front of each question mark exclamation mark and semicolon a normal space in front of the colon Read section~refseccontext to learn how to activate these settings This paragraph was input like thisendmicrotypecontext

55 Interword spacing pdfTEX 140

[langoptionsrang] langset of fontsrang langspacing settingsrangSetExtraSpacing

This command allows you to fine tune the interword spacing (also known as glue)A preliminary remark on what a lsquospacersquo is may be in order between two wordsTEX will insert a so called glue which is characterised by three parameters ndash thenormal distance between two words the maximum amount of space that may beadded to it and the maximum amount that may be subtracted The latter twoparameters come into effect whenever TEX tries to break a paragraph into lines anddoes not succeed it can then stretch or shrink the spaces between words Thesethree parameters are specific to each font

On top of these glue dimensions TEX has the concept of lsquospace factorsrsquo Theymay be used to increase the space after certain characters most prominently thepunctuation characters pdfTEXrsquos additional spacing adjustment may be consideredas an extension to space factors with much finer control while space factorswill influence all three parameters of interword space (or glue) by the sameamount ndash the kerning the maximum amount that the space may be stretched andthe maximum amount that it may be shrunk ndash you may modify these parametersindependently from one another Furthermore the values may be set differentlyfor each font And probably most importantly the parameters may not only beincreased but also decreased Note that when interword spacing adjustment is ineffect space factors are ignored

The spacing settings are declared as pairs of langcharacterrang = langspacing factorsrang wherethe latter consist of three numbers first the additional kern inserted after thischaracter if it appears before an interword space second the additional stretchamount and third the additional shrink amount All values may also be negativein which case the dimensions will be decreased Not all values have to be specifiedbut the settings must always contain the two separating commas

Options

name load factor preset inputenc context These options serve the same func-tion as in the previous configuration commands

unit You can specify the unit by which the specified numbers are measuredPossible values are character a langdimensionrang and additionally space The latterwill measure the values in thousandths of the respective space dimension set bythe font By default the unit is measured by the space dimensions For examplewith the following (nonsensical) settings

MICRO FINE TUNING Character inheritance 20

SetExtraSpacing [ unit = space ] default font = = 100010001000

the space inserted after a full stop would be doubled (technically speaking 2 timesfontdimen 2) as would the maximum stretch and shrink amounts of the interwordspace (fontdimen3 and 4) Conversely setting all three values to minus1000 wouldcompletely cancel a space after the respective character

56 Character inheritance[langfeaturesrang] langset of fontsrang langinheritance listsrangDeclareCharacterInheritance

In most cases accented characters should inherit the settings from the respectivebase character For example all of the characters Agrave Aacute Acirc Atilde Auml Aring and A shouldprobably be protruded by the same (absolute) amount as the character A Usingthe command DeclareCharacterInheritance you may declare such classes ofcharacters so that you then only have to set up the respective base character Withthe optional argument which may contain a comma-separated list of featuresyou can confine the scope of the list Additionally it accepts the inputenc key toset the input encoding for this list The font set can be declared in the usual wayThe inheritance lists are declared as pairs of langbase characterrang = langlist of inheritingcharactersrang Unless you are using a different encoding or a very peculiarly shapedfont there should be no need to change the default character inheritance settings

The situation is different with LuaTEX and XETEX however the default inherit-ance settings only contain those glyhps that can safely be assumed to exist in anyfont but since OpenType fonts may contain many more glyphs for different scripts(languages) it is quite probable that font-specific settings are necessary whichshould be specified in the fontrsquos configuration file (see next section)

57 Configuration filesThe default configuration consisting of inheritance settings declarations of font setsand alias fonts and generic protrusion expansion spacing and kerning settings willbe loaded from the file microtypecfg You may extend this file with custom settings(or load a different configuration file with the lsquoconfigrsquo option see section 35)

If you embark on creating new settings for a font family you should put theminto a separate file whose name must be lsquomt-langfont familyrangcfgrsquo (eg lsquomt-cmrcfgrsquoany spaces in the font name should be removed eg lsquomt-MinionProcfgrsquo) andmay contain all commands described in the current section 5 These files will beloaded automatically if you are actually using the respective fonts This packageships with configuration files for a number of font families Table 3 lists them all

langlist of suffixesrangDeclareMicrotypeVariants

On its search for a configuration file the package will also try to remove fromDeclareMicrotypeVariantsthe font name a suffix of one or more letters that denotes a lsquovariantrsquo of the basefont (cf Karl Berryrsquos Fontname) It is thus possible to put settings for eg thefonts pplx (expert set) pplj (oldstyle numerals) and ppl (plain) into one and the

MICRO FINE TUNING Configuration files 21

Table 3

Fonts with tailored protru-sion settings

Font family (NFSS code) Features

Type 1 fonts Encodings Shapes

Generic OT1 T1 T2A LY1 QX (TS1)a n (it sl sc)a

Computer Modern Roman (cmr)b OT1 OT4 T1 T2A T5 LY1 TS1 n it sl sc

Bitstream Charter (bch)c OT1 T1 T5 LY1 TS1 n it (sl)d sc

EB Garamonde OT1 T1 LY1 TS1 n it (sl)d sc

URW Garamond (ugm)f OT1 T1 TS1 n it

Bitstream Letter Gothic (blg)g OT1 T1 TS1 n it

Adobe Minion (pmnx pmnj) OT1 T1 T2A LY1 TS1 n it (sl)d sc si

Palatino (ppl pplx pplj)h OT1 OT4 T1 LY1 (TS1)a n it (sl)d sc

Times (ptm ptmx ptmj)i OT1 OT4 T1 LY1 QX (TS1)a n it (sl)d sc

Computer Modern math (cmsy cmm)j OMLOMS nit

AMS symbols (msa msb) U n

Euler (eur eus euf)k U n

Euro symbols (Adobe ITC marvosym) UOT1 n it

OpenType fonts Scripts Shapes

Generic Latin n (it sl sc)a

Latin Modern Romanl Latin Greek n it (sl)d

Charis SIL Latin Cyrillic Greek n it sc

Palatinom Latin n it sc

a Incompleteb Aliases Latin Modern Roman (lmr) ae (aer) zefonts (zer) eco (cmor) hfoldsty (hfor)

mlmodern (mlmr)c Aliases mathdesignCharter (mdbch) MicroPressrsquos chmath (chr) XCharterd Settings inherited from italic shapee Alias Adobe Garamond (pad padx padj)f Aliases mathdesignURW Garamond (mdugm) garamondx (zgmx zgmj)g Alias ulgothic (ulg)h Aliases pxfonts (pxr) qfontsQuasiPalatino TEX Gyre Pagella (qpl) newpx FPL Neu (fp9x fp9j)

domitiani Aliases txfonts (txr) qfontsQuasiTimes TEX Gyre Termes (qtm) newtx tempora step

stixstix2j Aliases Latin Modern (lmsy lmm) mlmodern (mlmsy mlmm)k Alias eulervm (zeur zeus)l Alias New Computer Modernm Aliases Palatino Linotype Palatino LT Std TEX Gyre Pagella Domitian

same file mt-pplcfg This command expects a comma-separated list of variantsuffixes The starred version appends the suffix(es) to the existing list The defaultdeclaration in microtypecfg is

DeclareMicrotypeVariantsxjwad01-LF-TLF-OsF-TOsF

langfont namerang langalias fontrangDeclareMicrotypeAlias

This command may be used for fonts that are very similar or actually the same (forinstance if you did not stick to the Berry naming scheme when installing a font)An example would be the Latin Modern fonts which are derived from ComputerModern so that it is not necessary to create new settings for them ndash you could say

CONTEXT-SENSITIVE SETUP 22

DeclareMicrotypeAliaslmrcmr

which would make the package whenever it encounters the font lmr and does notfind settings for it also try the font cmr In fact you will find this very line alongwith some others in the default configuration file

langfont namerangLoadMicrotypeFile

In rare cases it might be necessary to load a font configuration file manually forinstance from within another configuration file or to be able to extend settingsdefined in a file that would otherwise not be loaded automatically or would beloaded too late9 This command will load the file lsquomt-langfont namerangcfgrsquo

6 Context-sensitive setupThe microtype package also allows applying different micro-typographic settingsto the fonts depending on the context in which they occur This opens up the spacefor infinite possibilities of tweaking the documentrsquos appearance

langcontext assignmentsrangmicrotypecontext

This command may be used anywhere in the document (also in the preamble)to change the micro-typographic context in the current group To each feature(protrusion expansion (or activate as a shortcut for both) tracking spacingand kerning) one context may be assigned Consequently only settings with thecorresponding lsquocontextrsquo keyword will be applied

langcontext assignmentsrangbeginmicrotypecontext

endmicrotypecontext Like many LATEX commands it is also available in the form of an environment

langcontext assignmentsrang langgeneral textrangtextmicrotypecontext

As another possibility the command textmicrotypecontext sets the context(s)for the text given in the second argument

Suppose you want the footnote markers in the text to be protruded by a largeramount You could define settings for the numbers

SetProtrusion [ context = footnote ] font = scriptsize adapt if necessary 1 = 650 2 = 400 3 = 400 4 = 400 5 = 400 6 = 400 7 = 500 8 = 400 9 = 400 0 = 400

and have the context changed in the footnote marker command This commanddiffers among the various classes for the base classes eg article it would be

newcommandnewmakefnmarkhboxtextsuperscriptnormalfont microtypecontextprotrusion=footnotethefnmarkrenewcommandfootnotemark leavevmode ifhmodeedefxsfthespacefactornobreakfi newmakefnmark ifhmodespacefactorxsffi relax

9 Font package authors might also want to have a look at the hook MicrotypeHook described in theimplementation part section 1444

LETTERSPACING REVISITED 23

For the memoir class you would additionally have to disable auto-detection ofmultiple footnotes which prevents protrusion

renewcommandmakefnmarkhboxtextsuperscriptnormalfont microtypecontextprotrusion=footnotethefnmarkletmmmfpreparerelaxletmmmfcheckrelax

Another possibility would be to employ contexts for a language-dependent setupFor instance if you are writing a text in French you could add

microtypecontextkerning=french

to the preamble This would have the effect that kerning settings for the Frenchcontext would be applied to the document Should parts of the document be inEnglish you could write

textmicrotypecontextkerning=English text

to reset the context so that the punctuation characters in these parts will notreceive any extra kerning

Instead of adding these commands manually to your document you may alsoload microtype with the babel option (see section 35) The current language willthen be automatically detected and the contexts set accordingly

langlist of babel languagesrang langcontext listrangDeclareMicrotypeBabelHook

Naturally microtype does not know about the typographic specialties of everylanguage This command is a means of teaching it how to adjust the context when aparticular language is selected The main configuration file contains among othersthe following declaration

DeclareMicrotypeBabelHook frenchfrancaisacadiancanadien kerning=french spacing=

Consequently whenever you switch to the French language the kerning contextwill be changed to lsquofrenchrsquo and the spacing context will be reset This hook onlyhas an effect if the package was loaded with the babel option Currently microtypesupports French and Turkish kerning and English spacing (aka nonfrenchspacing)For unknown languages all contexts will be reset

7 Letterspacing revisited pdfTEX 140 | LuaTEX 062

[langamountrang] langgeneral textrangtextls

While the tracking feature described in section 53 will apply to sets of fontsyou may also want to letterspace shorter pieces of text regardless of the font inwhich they are typeset10 For such ad-hoc letterspacing microtype introduces twocommands that can be used (independently of whether the tracking option isenabled) in the same way as LATEXrsquos text commands textls ndash which also worksin math mode ndash expects the text in the mandatory argument while lsstyle willlsstyle

10 Letterspacing should be used cautiously in particular letterspacing lowercase text is held in abhorrenceby honourable typographers Unless you know what you are doing you should probably only letterspacecapitals or small capitals Another just cause may be emphasis in texts typeset in Fraktur fonts

DISABLING LIGATURES 24

switch on letterspacing for all subsequent fonts until the end of the current groupThe starred version of textls does not add any extra kerning before or aftertextlsthe text which may be useful eg for section titles By default each characterwill be spaced out by 1001000em = 01em this amount may be altered in theoptional argument to textls using the SetTracking command or globally withthe letterspace package option with decreasing significance in this order

langligatureranglslig

Since the commands textls and lsstyle will also evaluate the lsquono ligaturesrsquokey for the respective font you need not worry about protecting or breakingligatures with most fonts However in certain situations there may be a conflict ofligatures beginning with the same letter where some of them should be inhibitedwhile others should not When letterspacing text typeset in Fraktur fonts forexample the ligatures lsquochrsquo lsquockrsquo lsquotzrsquo and lsquoszrsquo (lsquoszligrsquo) should never be broken up youalso usually see the lsquostrsquo (lsquopermilrsquo) ligature in letterspaced text Furthermore at least theyfonts package realises the short s (lsquosrsquo) as the ligature lsquosrsquo On the other handthe lsquoctrsquo ligature and the other lsquolong srsquo ligatures often found in Fraktur fonts shouldbe suppressed There are two ways of solving this problem either donrsquot disablethe lsquosrsquo andor lsquocrsquo ligatures and break those that need to be broken up by insertinglsquokern0ptrsquo or babelrsquos | shortcut or disable them and protect those ligatures thatneed to be protected by enclosing them in the lslig command So the followingtwo solutions have the same result (namely lsquoAu s s i iexcl t s l o s i g k e i t rsquo with ligaturesshown in green inhibited ligatures in red)

SetTracking[no ligatures=f]encoding = LY family = yfrak120textfraklsstyle Ausskern0ptichtsloskern0ptigkeit

SetTracking[no ligatures=fsc]encoding = LY family = yfrak120textfraklsstyle Aulsligssilsligchtlsligslosigkeit

These three commands (plus the letterspace option described in section 34) areletterspacestyalso available with the alternative letterspace package which is in fact a muchstripped-down version of microtype omitting support for all the other extensions(and also omitting the possibilities of the SetTracking command ndash all lsquofrsquo ligatureswill be disabled inner and outer spacing and outer kerning will be set to the defaultvalues described in section 53) If you prefer to forgo microtypersquos specialties youmay load the letterspace package instead Both packages should not be used atthe same time

In contrast to microtype which requires LATEX the letterspace package alsoworks with eplain or even only miniltx for use with eplain load the packagewith usepackage inside the beginpackages endpackages environment withminiltx (which does not support package options) simply input letterspacesty

8 Disabling ligatures pdfTEX 130 | LuaTEX 030

[langcharactersrang] langset of fontsrangDisableLigatures

While completely disabling all ligatures of a font (which will also switch off kerningfor this font) purposely lowers the micro-typographic quality instead of raising

HINTS AND CAVEATS 25

it it is especially useful for typewriter fonts so that eg in a T1 encoded fontlsquotexttt--rsquo will indeed be printed as lsquo--rsquo not as lsquo-rsquo DisableLigatures maybe used to specify in the usual way a set of fonts for which ligatures should bedisabled for example of the typewriter font in T1 encoding

DisableLigaturesencoding = T1 family = tt

It is also possible to disable selected ligatures only The optional argument maycontain a comma-separated list of characters for which the ligature mechanismshould be inhibited

DisableLigatures[]encoding = T1 inhibit lsquo and lsquo but not fi ndash raquo etc

Only the character that begins the ligature(s) should be specified This commandmay only be used in the preamble and only once11

9 Hints and caveatsUse settings that match your font Although the default settings should give reas-onable results for most fonts the particular font you happen to be using may havedifferent character shapes that necessitate more or less protrusion In particularitalic letter shapes may differ wildly in different fonts hence I have decided againstproviding default protrusion settings for them The file test-microtypetex mightbe of some help when adjusting the protrusion settings for a font

Donrsquot use too large a value for expansion Font expansion is a feature that issupposed to enhance the typographic quality of your document by producing amore uniform greyness of the text block (and potentially reducing the number ofnecessary hyphenations) When expanding or shrinking a font too much the effectwill be turned into the opposite Expanding the fonts by more than 2 ie settinga stretch limit of more than 20 should be justified by a typographically trainedeye If you are so lucky as to be in the possession of multiple instances of a MultipleMaster font you may set expansion limits to up to 4

Donrsquot use font expansion for web documents (with older pdfTEX versions) WithpdfTEX versions older than 140 each expanded instance of the font will beembedded in the PDF file hence the file size may increase by quite a large factor(depending on expansion limits and step) Therefore courtesy and thriftiness ofbandwidth command it not to enable font expansion when creating files to bedistributed electronically With pdfTEX 140 and LuaTEX which use a differenttechnique of expansion the increase of file size can be neglected

You might want to disable protrusion in the Table of Contents In unfortunatesituations enabled protrusion might internally alter the line length in the TOC andsimilar lists in such a way that an excess leader dot will fit in The solution is totemporarily disable protrusion for the TOC

microtypesetupprotrusion=falsetableofcontentsmicrotypesetupprotrusion=true

11 With LuaTEX you have to load the fonts with the fontspec option lsquoRenderer=Basicrsquo

HINTS AND CAVEATS 26

You might want to disable protrusion in verbatim environments As you know bynow microtype will by default activate character protrusion for all fonts containedin the font set lsquoalltextrsquo This also includes the typewriter font Although it doesmake sense to protrude the typewriter font if it appears in running text (likefor example in this manual) this is probably not desirable inside the verbatimenvironment However microtype has no knowledge about the context that a fontappears in but will solely decide by examining its attributes Therefore you haveto take care of disabling protrusion in verbatim environments for yourself (thatis if you donrsquot want to disable protrusion for the typewriter font altogether byactivating say the font set lsquoalltext-nottrsquo) While the microtypesetup commandhas of course been designed for cases like this you may find it tiresome to repeat itevery time if you are using the verbatim environment frequently The followingline (which requires the etoolbox package) added to the documentrsquos preamblewould serve the same purpose

AtBeginEnvironmentverbatimmicrotypesetupactivate=false

If you are using the fancyvrb or the listings package this is not necessary sincetheir implementation of the corresponding environments will inhibit protrusionanyway

Settings for GreekThaiArmenian etc encodings are not yet included The defaultsets of fonts for which the micro-typographic features will be enabled (see table 2)only contain those encodings for which configurations exist Therefore if you areusing any other encoding (eg LGR T2B etc) microtype will not apply to thesefonts You have to define and activate a new font set including the encoding(s) youare using (for details see section 4) For protrusion at least you would also haveto create settings for the fonts in question (see section 51) It goes without sayingthat contributions for these encodings are more than welcome

Only employ kerning adjustment if it is customary in the languagersquos typographictradition In contrast to protrusion and expansion additional kerning does notunconditionally improve the micro-typographical quality of your document Youshould only switch it on if you are writing a document in a language whosetypographic tradition warrants such kerning If you are for example writing anEnglish text your readers would probably be rather confused by additional spacesbefore the punctuation characters

Adjustment of interword spacing is still experimental The implementation of thisfeature in pdfTEX is not complete and may not yield the positive effects on thetypographical quality you might expect ndash in certain situations there may even beundesired side effects in particular when used together with the ragged2e packageTherefore the spacing option should not be chosen blindly it is also recommendedto experiment with the settings in order to understand the workings of this feature

Compatibility and interaction with other packages The microtype package is sup-posed to work happily together with all other LATEX packages (except for pdfcprot)However life isnrsquot perfect so problems are to be expected Currently I am aware ofthe following issues

bull Even though all configuration files are still provided in legacy (7-bit) format usingmulti-byte (Unicode) characters in the settings should run smoothly with an up-to-

HINTS AND CAVEATS 27

date LATEX system For older systems or documents in legacy encodings in contrastthis requires loading the inputenc package first Furthermore when using multipleinput encodings in a document 8-bit characters in the settings will only workreliably if you specify the inputenc key

bull When loading the package with the babel option you must load the babel packagebefore microtype

bull Before this package was fully compatible with LuaTEX the following method ofenabling expansion and protrusion with the fontspec package was most oftenfound to be recommended

newfontfeatureMicrotypeprotrusion=defaultexpansion=defaultdefaultfontfeaturesMicrotype

This code should not be used with this package as it will basically override all ofthe settings made by microtype ndash despite the naming the above lines have nothingto do with this package12

bull With pdfTEX it is currently not possible to create character-specific settings forChineseJapaneseKorean fonts Therefore the only micro-typographic extensionthat can be made to work with CJK fonts is (non-selected) font expansion

bull When used with the xeCJK package or the luatexja package text commands (egrsquoA textless) in the configuration will not be understood You therefore haveto ensure that microtype will encounter none of them This requires firstly thatthe glyphs be specified only as single (possibly Unicode) characters as numbersor as glyph names (cf section 5) and secondly if you are using a font for whichpre-defined settings do not exist that you create these settings yourself (becauseotherwise the default settings will be loaded which do contain text commands)Furthermore you should load microtype late

Possible error messages and how to get rid of them (specs may differ)

bull Font csnameendcsname=cmr10+20 at 100pt not loadable Metric (TFM) file not found

This error message will occur if you are trying to employ font expansion whilecreating DVI output Remember that automatic font expansion only works whenrunning pdfTEX or LuaTEX in PDF mode Although expansion is also possible in DVImode with pdfTEX it requires that all instances of the expanded fonts exist on yourTEX system

bull pdfTeX error (font expansion) auto expansion is only possible with scalable fonts

Automatic font expansion has been improved in pdfTEX 140 in that it now notonly works with Type 1 fonts but also with TrueType OpenType and even non-embedded fonts The above error message indicates either that you are trying toapply expansion to a bitmap (pk) font which is still not possible or that the fontisnrsquot found at all eg because of missing map entries

bull Warning pdflatex font ptmr8r cannot be expanded (not an included Type1 font)

and the PDF viewer complains about a missing font eg Adobe Reader thuslyCould not find a font in the Resources dictionary - using Helvetica instead

With pdfTEX versions older than 140 font expansion can only be applied if thefont is actually embedded in the PDF file If you get the above error message your

12 They make use of features provided by luaotfload (via fontspec)

ACKNOWLEDGMENTS 28

TEX system is not set up to embed (or lsquodownloadrsquo) the base PostScript fonts (egTimes Helvetica Courier) In most TEX distributions this can be changed in thefile updmapcfg by setting pdftexDownloadBase14 to true

bull Warning pdflatex (file ecrm1000+20) Font ecrm1000+20 at 1200 not found

Furthermore pdfTEX versions older than 140 require Type 1 fonts for automaticfont expansion When you receive a message like the above you are probably tryingto apply font expansion to a bitmap or TrueType font With older pdfTEX versionsthis is only possible if you manually create expanded instances of the fonts

bull Font T1cmrmn10=ecrm1000 at 100pt not loaded Not enough room left

Memory parameter lsquofont_mem_sizersquo too small

bull TeX capacity exceeded sorry [maximum internal font number (font_max)=2000]

Memory parameter lsquofont_maxrsquo too small

bull TeX capacity exceeded sorry [PDF memory size (pdf_mem_size)=65536]

Memory parameter lsquopdf_mem_sizersquo too small (pdfTEX versions older than 130)

When applying micro-typographic enhancement to a large document with a lot offonts pdfTEX may be running out of some kind of memory It can be increased bysetting the respective parameter to a larger value For web2c-based systems egTEX Live change the settings in texmfcnf for MiKTEX in the file miktexini (24or older) resp pdflatexini (25 or newer)

bull pdfTeX warning (font expansion) font should be expanded before its first use

This warning will occur with pdfTEX versions older than 1404 if tracking andexpansion is applied to a font It is harmless and can be ignored

The source code of this document is freely available If you wonder how this docu-ment was created just have a look at the source code in microtypedtx which iseither already included in your TEX distribution or else can be downloaded fromCTAN For the source code of the logo on the title page and of the letterspacingsample from section 53 see the appendices A and B If you want to re-typeset thedocumentation read the comments at the end of microtypedtx

10 ContributionsI would be glad to include configuration files for more fonts Preparing suchconfigurations is quite a time-consuming task and requires a lot of patience Toalleviate this process this package also includes a test file that can be used tocheck at least the protrusion settings (test-microtypetex) If you have created aconfiguration file for another font or if you have any suggestions for enhancementsin the default configuration files I would gratefully accept them wmlgmxnet

11 AcknowledgmentsThis package would be pointless if Hagraven Thecirc Thagravenh hadnrsquot created the pdfTEXprogramme in the first place which introduced the micro-typographic extensionsand made them available to the TEX world Furthermore I thank him for helping meto improve this package and not least for promoting it in Thagravenh 2004 Thagravenh 2008

ACKNOWLEDGMENTS 29

and elsewhere I also thank him and the rest of the pdfTEX team and more recentlyalso the LuaTEX and XETEX teams for refuting the idea that TEX is dead and forfixing the bugs I find

Harald Harders has contributed protrusion settings for Adobe Minion I wouldalso like to thank him for a number of bug reports and suggestions he had to makeAndreas Buumlhmann has suggested the possibility to specify ranges of font sizes andresourcefully assisted in implementing this He also came up with some good ideasfor the management of complex configurations Ulrich Dirr has made numerous sug-gestion especially concerning the new extensions of interword spacing adjustmentand additional character kerning Georg Duffner has patiently tested microtypeunder XETEX and LuaTEX with his beautiful OpenType font EB Garamond13 Mythanks also go to Maciej Eder for contributing settings for the QX encoding aswell as to Karl Karlsson for providing settings for the Cyrillic T2A encoding andto Hendrik Vogt who made substantial improvements to the Computer ModernRoman italic settings I thank Loren B Davis for providing protrusion settings forOpenType versions of Palatino Linotype I am also very much indebted to Eacutelie Rouxwho not only contributed the lua module in the first place but also together withPhilipp Gesang took care of updating it for the developments in LuaTEX land

I thank Philipp Lehman for adding to his csquotes package the possibility torestore the original meanings of all activated characters thus allowing for thesecharacters to be used in the configuration files Peter Wilson kindly provided a hookin his ledmacledpar packages so that critical editions can finally also benefit fromcharacter protrusion Likewise Donald Arseneau patched his shapepar package toaccommodate protrusion

Additionally the following people have reported bugs made suggestions orhelped otherwise (in chronological order quotes indicate TeXSX user names)Tom Kink Herb Schulz Michael Hoppe Gary L Gray Georg Verweyen Christoph BierPeter Muthesius Bernard Gaulle Adam Kucharczyk Mark Rossi Stephan HennigMichael Zedler Herbert Voszlig Ralf Stubner Holger Uhr Peter Dyballa Morten HoslashgholmSteven Bath Daniel Flipo Michalis Miatidis Sven Naumann Ross HetheringtonWiebke Petersen Geoff Vallis Steven E Harris Karl Berry Peter Meier NathanRosenblum Wolfram Schaalo Vasile Gaburici Sveinung Heggen Axel Berger ColinRourke Maverick Woo Silas S Brown Lars Roumlnnbaumlck Christian Stark Leo MarcinBorkowski hscm George Gratzer Josep Maria Font Juan Acevedo Heiko OberdiekTill A Heilmann Rolf Dieterich Seamus Bradley Meho R Steffen Hoffmann ScottPakin Maiumleul Rouquette Jonas Hogstrom Gabriel Kerneis lsquoRazorXsrrsquo SebastianSchubert lsquoDaversquo Giuseppe Palma Stephan Stiller Christopher Schramm lsquoulirsquo SamMason lsquokleenstarrsquo lsquoHenningrsquo Ronnie Marksch David Carlisle lsquoMaxrsquo lsquoHcNrsquo WillRobertson lsquouser11126rsquo Ulrike Fischer lsquoDanielrsquo lsquoltcomdatarsquo Reinhard Kotucha lsquojcrrsquoNils Anders Danielsson Paolo Ney Frank Mittelbach Franz Wexler Moritz WemheuerlsquoAndy Nrsquo Phelype Oleinik Falk Hanisch Markus Kohm Paolo Polesana Oliver KoppHironori Kitagawa Daniel Benjamin Miller Md Ayquassar Marcel Kruumlger EkkehartSchlicht lsquoCanageekrsquo lsquodsedivecrsquo and lsquoDORpapstrsquo

13 Available from CTAN at pkgebgaramond including configuration files for microtype

SHORT HISTORY 30

12 ReferencesHagraven Thecirc Thagravenh lsquoMicro-typographic extensions to the TEX typesetting systemrsquo DissMasaryk University Brno 2000 in TUGBoat vol 21 (2000) no 4 pp 317ndash434(Online at httpwwwtugorgTUGboatArticlestb21-4tb69thanhpdf)

Hagraven Thecirc Thagravenh lsquoMicro-typographic extensions of pdfTEX in practicersquo in TUGBoatvol 25 (2004) no 1 lsquoProceedings of the Practical TEX 2004 Conferencersquo pp 35ndash38(Online at httpwwwtugorgTUGboatArticlestb25-1thanhpdf)

Hagraven Thecirc Thagravenh lsquoFont-specific issues in pdfTEXrsquo in TUGBoat vol 29 (2008) no 1lsquoEuroBachoTEX 2007 Proceedingsrsquo pp 36ndash41 (Online at httpwwwtugorgTUGboatArticlestb29-1tb91thanh-fontspdf)

Hagraven Thecirc Thagravenh Sebastian Rahtz Hans Hagen Hartmut Henkel Paweł JackowskiMartin Schroumlder Karl Berry The pdfTEX user manual 2 March 2020 (Availablefrom CTAN at systemsdocpdftexmanualpdftex-apdf)

Karl Berry Fontname Filenames for TEX fonts July 2009 (Available from CTAN atinfofontnamefontnamepdf)

LATEX3 Project Team LATEX 2ε font selection November 2020 (Available from CTANat macroslatexbasefntguidepdf)

Will Robertson The fontspec package Font selection for

XELATEX and LuaLATEX21 February 2020 (Available from CTAN at pkgfontspec)

Eacutelie Roux Khaled Hosny Philipp Gesang Ulrike Fischer Marcel Kruumlger Theluaotfload package 8 January 2021 (Available from CTAN at pkgluaotfload)

Carsten Schurig Tobias Schlemmer The pdfcprotsty package 10 June 2005(Available from CTAN at pkgpdfcprot)

Melchior Franz The soul package 17 November 2003 (Available from CTAN atpkgsoul) See also Heiko Oberdiekrsquos extension of this package soulutf8 whichadds Unicode support (Available from CTAN at pkgsoulutf8)

13 Short historyThe comprehensive list of changes can be found in appendix C The following is alist of all changes relevant in the user land bug and compatibility fixes are sweptunder the rug Numbers in brackets indicate the relevant section in this manual

28 (20201207)

bull New default font sets for expansion and spacing lsquoalltext-nottrsquo [4 table 2]

27 (20170707)

bull Allow automatic expansion and letterspacing with LuaTEX in DVI mode (akadvilualatex) [31 33 table 1]

bull Compatibility with LATEX 20170101 (fix warnings)

26 (20160501)

bull Support for LuaTEX ge 085bull Improvements for trackingletterspacing with LuaTEX (Renderer=Basic no longer

required)

SHORT HISTORY 31

bull New font sets lsquoalltext-nottrsquo lsquoallmath-nottrsquo [4 table 2]

25 (20130313)

bull Support for the fontspec package viz for OpenType fonts with LuaTEX and XETEXbull Support for protrusion with XETEX ge 09997bull Support for trackingletterspacing with LuaTEX ge 062bull Allow context-sensitive setup with LuaTEXbull Info if protrusion settings are genericbull Protrusion settings for Latin Modern Roman (OpenType)bull Protrusion settings for Charis SIL (OpenType)bull Protrusion settings for Palatino Linotype (OpenType)

24 (20100110)

bull Protrusion settings for T2A encoded Minion

23e (20091109)

bull Support for the Cyrillic T2A encoding (protrusion expansion spacing)

23d (20090327)

bull New default for expansion option lsquosteprsquo 1 if pdfTEX ge 140 [33]

23c (20081111)

bull Support for LuaTEX enabled by default

23 (20071223)

bull New key lsquoouter kerningrsquo for SetTracking to customise outer kerning [53]bull Adjust protrusion settings for tracking even if protrusion is not enabledbull New option lsquoverbose=silentrsquo to turn all warnings into mere messages [35]bull The letterspace package also works with eplain or miniltx [7]

22 (20070714)

bull Improvements to trackingletterspacing retain kerning (pdfTEX ge 1404) auto-matically adjust protrusion settings

bull New key lsquono ligaturesrsquo for SetTracking to disable selected or all ligatures (pdfTEXge 1404) [53]

bull New keys lsquospacingrsquo and lsquoouter spacingrsquo for SetTracking to customise interwordspacing [53]

bull Possibility to expand a font with different parameters (pdfTEX ge 1404) [52]bull New optional argument for DisableLigatures to disable selected ligatures [8]bull New command DeclareMicrotypeVariants to specify variant suffixes [57]bull New command textmicrotypecontext as a wrapper for microtypecontext [6]bull Protrusion settings for Bitstream Letter Gothic

21 (20070121)

bull New command lslig to protect ligatures in letterspaced text [7]

20 (20070114)

bull Support for the new extensions of pdfTEX ge 140 trackingletterspacing ad-ditional kerning and adjustment of interword spacing (glue) (new commandsSetTracking SetExtraKerning SetExtraSpacing new options lsquotrackingrsquolsquokerningrsquo lsquospacingrsquo) [53 54 55]

SHORT HISTORY 32

bull New commands textls and lsstyle for letterspacing new option lsquoletterspacersquo[34 7]

bull New option lsquobabelrsquo for automatic micro-typographic adjustment to the selectedlanguage [35 6]

bull New font sets lsquosmallcapsrsquo lsquofootnotesizersquo lsquoscriptsizersquo [4 table 2]bull New package lsquoletterspacersquo providing the commands for robust and hyphenatable

letterspacing [7]

19e (20060728)

bull New key lsquoinputencrsquo to specify the listsrsquo input encodings [5]bull Protrusion settings for Euler math fonts

19d (20060505)

bull Support for the Central European QX encoding (protrusion inheritance)bull Protrusion settings for various Euro symbol fonts (Adobe ITC marvosym)bull Support for Unicode input in the configuration (inputencutf8)

19c (20060202)

bull Protrusion settings for URW Garamond

19a (20051205)

bull Defer setup until the end of the preamblebull Inside the preamble microtypesetup accepts all package options [36]bull Protrusion settings for T5 encoded Charter

19 (20051028)

bull New command DisableLigatures to disable ligatures (pdfTEX ge 130) [8]bull New command microtypecontext to change the configuration context new key

lsquocontextrsquo for the configuration commands [6]bull New key lsquofontrsquo to add single fonts to the font sets [4]bull New key lsquopresetrsquo to set all characters to the specified value before loading the listsbull Value lsquorelativersquo renamed to lsquocharacterrsquo for lsquounitrsquo keysbull Support for the Polish OT4 encoding (protrusion expansion inheritance)bull Support for the Vietnamese T5 encoding (protrusion expansion inheritance)

18 (20050623)

bull New command DeclareMicrotypeSetDefault to declare the default font sets [4]bull New option lsquoconfigrsquo to load a different configuration file [35]bull New option lsquounitrsquo to measure protrusion factors relative to a dimension instead of

the character width [51]bull Renamed commands from MicroType to Microtypebull Protrusion settings for AMS math fontsbull Protrusion settings for Times in LY1 encoding completedbull The lsquoallmathrsquo font set also includes U encodingbull Support for protrusion with the ledmac package (pdfTEX ge 130)

17 (20050323)

bull Possibility to specify ranges of font sizes in the set declarations [4 5]bull New command LoadMicrotypeFile to load a configuration file manually [57]bull New command MicrotypeHook for font package authors [1444]bull New option lsquoverbose=errorsrsquo to turn all warnings into errors

SHORT HISTORY 33

bull Warning when running in draft mode

16 (20050124)

bull New option lsquofactorrsquo to influence protrusion resp expansion of all characters of afont or font set [32 5]

bull When pdfTEX is too old to expand fonts automatically expansion has to be enabledexplicitly automatic expansion will be disabled [31]

bull Use e-TEX extensions if available

15 (20041215)

bull When output mode is DVI font expansion has to be enabled explicitly automaticexpansion will be disabled [31]

bull New option lsquoselectedrsquo to enable selected expansion default false [33 52]bull New default for expansion option lsquosteprsquo 4 (min(stretchshrink)5) [33]bull Protrusion settings for Bitstream Charter

14 (20041112)

bull Set up fonts independently from LATEX font loadingbull New option lsquofinalrsquo [35]

12 (20041003)

bull New font sets lsquoallmathrsquo and lsquobasicmathrsquo [4 table 2]bull Protrusion settings for Computer Modern Roman math symbolsbull Protrusion settings for TS1 encoding completed for Computer Modern Roman and

Adobe Garamond

11 (20040921)

bull Protrusion settings for Adobe Minionbull New command DeclareCharacterInheritance [56]bull Characters may also be specified as octal or hexadecimal numbers [5]

10 (20040911)

bull First CTAN release

IMPLEMENTATION 34

14 ImplementationThe docstrip modules in this file are

driver The documentation driver only visible in the dtx file

package The code for the microtype package (microtypesty)

pdftex-def Definitions specific to pdfTEX (microtype-pdftexdef)

xetex-def Definitions specific to XETEX (microtype-xetexdef)

luatex-def Definitions specific to LuaTEX (microtype-luatexdef)

letterspace The code for the letterspace package (letterspacesty)

plain Code for eplain miniltx (letterspace only)

debug Code for additional output in the log fileUsed for ndash surprise ndash debugging purposes

luafile Lua functions (microtypelua)

config Surrounds all configuration modules

cfg-t Surrounds (Latin) text configurations

m-t The main configuration file (microtypecfg)bch Settings for Bitstream Charter (mt-bchcfg)blg Settings for Bitstream Letter Gothic (mt-blgcfg)cmr Settings for Computer Modern Roman (mt-cmrcfg)ebg Settings for EB Garamond (mt-EBGaramondcfg)ppl Settings for Palatino (mt-pplcfg)ptm Settings for Times (mt-ptmcfg)pmn Settings for Adobe Minion (mt-pmncfg)

Contributed by Harald Hardersugm Settings for URW Garamond (mt-ugmcfg)

cfg-u Surrounds non-text configurations (U encoding)

msa Settings for AMS lsquoarsquo symbol font (mt-msacfg)msb Settings for AMS lsquobrsquo symbol font (mt-msbcfg)euf Settings for Euler Fraktur font (mt-eufcfg)eur Settings for Euler Roman font (mt-eurcfg)eus Settings for Euler Script font (mt-euscfg)

cfg-e Surrounds Euro symbol configurations

zpeu Settings for Adobe Euro symbol fonts (mt-zpeucfg)mvs Settings for marvosym Euro symbol (mt-mvscfg)

test A helper file that may be used to create and test protrusion settings(test-microtypetex)

And now for something completely different1 langpackage|letterspacerang

IMPLEMENTATION Preliminaries 35

141 PreliminariesMTMT This is us

2 defMTMT3 langpackagerang microtype4 langletterspacerang letterspace

MTfixcatcode We have to make sure that the category codes of some characters are correct (thegerman package for instance makes active) Probably overly cautious Ceterumcenseo it should be forbidden for packages to change catcodes within the preamble

MTrestorecatcodes Polite as we are wersquoll restore them afterwards5 letMTrestorecatcodesempty

6 defMTfixcatcode127 edefMTrestorecatcodes8 MTrestorecatcodes9 catcode1=thecatcode1relax

10 11 catcode1=2relax12 13 MTfixcatcode1714 ^^Q (comment)14 MTfixcatcode24 9 ^^X (ignore)15 langpackagerangMTfixcatcode3312 16 langpackagerangMTfixcatcode3412 17 MTfixcatcode36 3 $ (math shift)18 MTfixcatcode3912 rsquo19 MTfixcatcode4212 20 MTfixcatcode4312 +21 MTfixcatcode4412 22 MTfixcatcode4512 -23 MTfixcatcode5812 24 MTfixcatcode6012 lt25 MTfixcatcode6112 =26 MTfixcatcode6212 gt27 langpackagerangMTfixcatcode6312 28 MTfixcatcode94 7 ^ (superscript)29 MTfixcatcode9612 `30 langpackagerangMTfixcatcode12412 |

These are all commands for the outside world We define them here as blankcommands so that they wonrsquot generate an error if we are not running pdfTEX

31 langpackagerang32 newcommandDeclareMicrotypeSet[3][]33 newcommandUseMicrotypeSet[2][]34 newcommandDeclareMicrotypeSetDefault[2][]35 newcommandSetProtrusion[3][]36 newcommandSetExpansion[3][]37 newcommandSetTracking[3][]38 newcommandSetExtraKerning[3][]39 newcommandSetExtraSpacing[3][]40 newcommandDisableLigatures[2][]41 newcommandDeclareCharacterInheritance[3][]42 newcommandDeclareMicrotypeVariants[1]43 newcommandDeclareMicrotypeAlias[2]44 newcommandLoadMicrotypeFile[1]45 newcommandDeclareMicrotypeBabelHook[2]46 newcommandmicrotypesetup[1]47 newcommandmicrotypecontext[1]48 newcommandtextmicrotypecontext[2]249 ifpackageloadedletterspaceletMTtextlsrelax50 langpackagerang51 newcommandlsstyle52 newcommandtextls[2][]53 deftextls1

IMPLEMENTATION Preliminaries 36

54 newcommandlslig[1]155 langpackagerang56

These commands also have a starred version57 defDeclareMicrotypeSet1gobbletwo58 defDeclareMicrotypeVariants1gobble

Set declarations are only allowed in the preamble (resp the main configurationfile) The configuration commands on the other hand must be allowed in thedocument too since they may be called inside font configuration files which inprinciple may be loaded at any time

59 onlypreambleDeclareMicrotypeSet60 onlypreambleUseMicrotypeSet61 onlypreambleDeclareMicrotypeSetDefault62 onlypreambleDisableLigatures63 onlypreambleDeclareMicrotypeVariants64 onlypreambleDeclareMicrotypeBabelHook

Donrsquot load letterspace65 expandafterletcsname verletterspacestyendcsnameempty

MToldcmd The old command names had one more hunch66 defMToldcmd1267 newcommand1MTwarning68 string1 is deprecated Please useMessageBreak69 string2 instead70 let 122

71 MToldcmdDeclareMicroTypeAliasDeclareMicrotypeAlias72 MToldcmdDeclareMicroTypeSet DeclareMicrotypeSet73 MToldcmdUseMicroTypeSet UseMicrotypeSet74 MToldcmdLoadMicroTypeFile LoadMicrotypeFile75 langpackagerang

MTwarning

MTwarningnl

MTinfo

MTinfonl

MTvinfo

MTerror

MTwarnerr

Communicate76 defMTwarningPackageWarningMTMT77 defMTwarningnl1MTwarning1gobble78 langpackagerang79 defMTinfoPackageInfoMTMT80 defMTinfonl1MTinfo1gobble81 letMTvinfogobble82 defMTerrorPackageErrorMTMT83 defMTwarnerr1MTerror184 This error message appears because you loaded the `MTMTrsquoMessageBreak85 package with the option `verbose=errorsrsquo Consult the documentationMessageBreak86 in MTMTpdf to find out what went wrong

1411 Debugging

tracingmicrotype

MTdinfo

MTdinfonl

Cases for tracingmicrotype

0 almost none

1 + sets amp lists

2 + heirs

3 + slots

4 + factors87 langdebugrang88 MTwarningnlThis is the debug version89 newcounttracingmicrotype

IMPLEMENTATION Preliminaries 37

90 tracingmicrotype=291 defMTinfo1PackageInfoMTMT1MTaddtoannot192 defMTinfonl1PackageInfoMTMT1gobbleMTaddtoannot193 letMTvinfoMTinfonl94 defMTwarning1PackageWarningMTMT1MTaddtoannotWarning 195 defMTwarningnl1PackageWarningMTMT1gobbleMTaddtoannotWarning 196 defMTdinfo12ifnumtracingmicrotypelt1 elseMTinfo2fi97 defMTdinfonl12ifnumtracingmicrotypelt1 elseMTinfonl2fi

tracingmicrotypeinpdf Another debug method font switches can be marked in the PDF file with a smallcaret an accompanying popup text box displaying all debug messages

Cases for tracingmicrotypeinpdf

1 show new fonts

2 + show known fonts98 newcounttracingmicrotypeinpdf

Letrsquos see how it works (if you donrsquot see anything special on this page your PDFviewer doesnrsquot support annotations)

tracingmicrotypeinpdf=2

MTpdfannot

MTaddtoannot

ifMTinannot

During font setup we save the text for the popup in MTpdfannot (This requirespdfTEX ge 130) The pdftexcmds package provides pdfTEXrsquos utility commands inLuaTEX too

99 RequirePackagepdftexcmds100 newififMTinannot MTinannottrue101 letMTpdfannotempty102 defMTaddtoannot1ifnumtracingmicrotypeinpdfgtz ifMTinannot103 defMessageBreak^^Jspaces104 MTxaddMTpdfannotpdfescapestring1^^Jfifi

iftracingmicrotypeinpdfall With tracingmicrotypeinpdfallfalse the PDF output is (hopefully) identicalbut some font switches will not be displayed otherwise the output is affected butall font switches are visible In the latter case we also insert a small kern so thatmultiple font switches are discernable

105 newififtracingmicrotypeinpdfall

MTshowpdfannot A red caret is shown for fonts which are actually set up by Microtype a green onemarks fonts that we have already seen The Caret annotation requires a viewerfor PDF version 15 (you could use Text if yoursquore using an older PDF viewer)

106 defMTshowpdfannot1107 ifnumtracingmicrotypeinpdflt1 else108 iftracingmicrotypeinpdfallleavevmodefi109 pdfannot height 4pt width 4pt depth 2pt 110 SubtypeCaret111 T(expandafterstringfontname)112 ifcase1or113 Subj(New font)C[1 0 0]114 else115 Subj(Known font)C[0 1 0]116 fi117 Contents(MTpdfannot)118 119 iftracingmicrotypeinpdfallkern1pt fi120 globalMTinannotfalse121 fi122 123 langdebugrang124 langpackagerang

T1blgmn10
Known font
(line 3713)
T1blgmn8
Known font
(line 3713)
T1blgmn10
Known font
(line 3714)
T1blgmn8
Known font
(line 3714)
T1blgmn10
Known font
(line 3715)
T1blgmn8
Known font
(line 3715)
T1blgmn10
Known font
(line 3716)
OT1mdbchmn10
Known font
(line 3717)
OT1mdbchmn7
Known font
(line 3717)
OT1mdbchmn5
Known font
(line 3717)
OMLmdbchmit10
Known font
(line 3717)
OMLmdbchmit7
Known font
(line 3717)
OMLmdbchmit5
Known font
(line 3717)
OMSmdbchmn10
Known font
(line 3717)
OMSmdbchmn7
Known font
(line 3717)
OMSmdbchmn5
Known font
(line 3717)
OMXmdbchmn10
Known font
(line 3717)
OMXmdbchmn7
Known font
(line 3717)
OMXmdbchmn5
Known font
(line 3717)
OMSmdbchmn10
Known font
(line 3717)
OMSmdbchmn7
Known font
(line 3717)
OMSmdbchmn5
Known font
(line 3717)
OMSmdbchmn10
Known font
(line 3717)
OMSmdbchmn7
Known font
(line 3717)
OMSmdbchmn5
Known font
(line 3717)
OMLmdbchmn10
Known font
(line 3717)
OMLmdbchmn7
Known font
(line 3717)
OMLmdbchmn5
Known font
(line 3717)
MDAmdbchmn10
Known font
(line 3717)
MDAmdbchmn7
Known font
(line 3717)
MDAmdbchmn5
Known font
(line 3717)
MDBmdbchmn10
Known font
(line 3717)
MDBmdbchmn7
Known font
(line 3717)
MDBmdbchmn5
Known font
(line 3717)
T1blgmn10
Known font
(line 3718)
T1blgmn10
Known font
(line 3720)
T1blgmn8
Known font
(line 3720)
T1blgmn8
Known font
(line 3727)
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1blgmn10
Known font
(line 3731)
T1blgmn8
Known font
(line 3731)
T1blgmn10
Known font
(line 3732)
T1bchmn9
Known font
(line 3732)
T1bchmn9
Known font
(line 3732)Tracking font `T1bchmn9 on input line 3732trying to find tracking amount list for font `T1bchmn9trying T1bchmntrying T1bchmntrying T1bchmtrying T1bchmtrying T1bchntrying T1bchntrying T1bchtrying T1bchtrying T1mntrying T1mntrying T1mtrying T1mtrying T1ntrying T1ntrying T1trying T1 Loading tracking list `default Tracking by 60
OT1mdbchmn9
Known font
(line 3732)
OT1mdbchmn6
Known font
(line 3732)
OT1mdbchmn5
Known font
(line 3732)
OMLmdbchmit9
Known font
(line 3732)
OMLmdbchmit6
Known font
(line 3732)
OMLmdbchmit5
Known font
(line 3732)
OMSmdbchmn9
Known font
(line 3732)
OMSmdbchmn6
Known font
(line 3732)
OMSmdbchmn5
Known font
(line 3732)
OMXmdbchmn9
Known font
(line 3732)
OMXmdbchmn6
Known font
(line 3732)
OMXmdbchmn5
Known font
(line 3732)
OMSmdbchmn9
Known font
(line 3732)
OMSmdbchmn6
Known font
(line 3732)
OMSmdbchmn5
Known font
(line 3732)
OMSmdbchmn9
Known font
(line 3732)
OMSmdbchmn6
Known font
(line 3732)
OMSmdbchmn5
Known font
(line 3732)
OMLmdbchmn9
Known font
(line 3732)
OMLmdbchmn6
Known font
(line 3732)
OMLmdbchmn5
Known font
(line 3732)
MDAmdbchmn9
Known font
(line 3732)
MDAmdbchmn6
Known font
(line 3732)
MDAmdbchmn5
Known font
(line 3732)
MDBmdbchmn9
Known font
(line 3732)
MDBmdbchmn6
Known font
(line 3732)
MDBmdbchmn5
Known font
(line 3732)
T1bchmit10
Known font
(line 3734)
T1blgmn10
Known font
(line 3736)
T1blgmn8
Known font
(line 3736)
T1blgmn8
Known font
(line 3738)
T1bchmn8
Known font
(line 3738)
T1SourceSansPro-TLFmn8
Known font
(line 3738)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3738)= substituted with T1SourceSansPro-TLFregularn7
T1blgmn10
Known font
(line 3740)
T1blgmn8
Known font
(line 3740)
T1pzcmit10
New font
(line 3742) No configuration file mt-pzccfgSetting up font `T1pzcmit10 on input line 3742protrusion font list emptyprotrusion encoding `T1 in listprotrusion family `pzc not in list No protrusionexpansion font list emptyexpansion encoding `T1 in listexpansion family list emptyexpansion series list emptyexpansion shape list emptyexpansion size list emptytrying to find expansion codes list for font `T1pzcmit10trying T1pzcmittrying T1pzcmittrying T1pzcmtrying T1pzcmtrying T1pzcittrying T1pzcittrying T1pzctrying T1pzctrying T1mittrying T1mittrying T1mtrying T1mtrying T1ittrying T1ittrying T1trying T1 Applying non-selected expansion (list `default)kerning font `T1pzcmit10 not in listkerning encoding `T1 in listkerning family `pzc not in list No kerningnoligatures font list emptynoligatures encoding `T1 in listnoligatures family `pzc not in list
T1blgmn10
Known font
(line 3744)
T1bchmn9
Known font
(line 3745)
T1bchmn9
Known font
(line 3745)Tracking font `T1bchmn9 on input line 3745trying to find tracking amount list for font `T1bchmn9trying T1bchmntrying T1bchmntrying T1bchmtrying T1bchmtrying T1bchntrying T1bchntrying T1bchtrying T1bchtrying T1mntrying T1mntrying T1mtrying T1mtrying T1ntrying T1ntrying T1trying T1 Loading tracking list `default Tracking by 60
OT1mdbchmn9
Known font
(line 3745)
OT1mdbchmn6
Known font
(line 3745)
OT1mdbchmn5
Known font
(line 3745)
OMLmdbchmit9
Known font
(line 3745)
OMLmdbchmit6
Known font
(line 3745)
OMLmdbchmit5
Known font
(line 3745)
OMSmdbchmn9
Known font
(line 3745)
OMSmdbchmn6
Known font
(line 3745)
OMSmdbchmn5
Known font
(line 3745)
OMXmdbchmn9
Known font
(line 3745)
OMXmdbchmn6
Known font
(line 3745)
OMXmdbchmn5
Known font
(line 3745)
OMSmdbchmn9
Known font
(line 3745)
OMSmdbchmn6
Known font
(line 3745)
OMSmdbchmn5
Known font
(line 3745)
OMSmdbchmn9
Known font
(line 3745)
OMSmdbchmn6
Known font
(line 3745)
OMSmdbchmn5
Known font
(line 3745)
OMLmdbchmn9
Known font
(line 3745)
OMLmdbchmn6
Known font
(line 3745)
OMLmdbchmn5
Known font
(line 3745)
MDAmdbchmn9
Known font
(line 3745)
MDAmdbchmn6
Known font
(line 3745)
MDAmdbchmn5
Known font
(line 3745)
MDBmdbchmn9
Known font
(line 3745)
MDBmdbchmn6
Known font
(line 3745)
MDBmdbchmn5
Known font
(line 3745)
T1blgmn10
Known font
(line 3745)
T1bchmn9
Known font
(line 3746)
T1bchmn9
Known font
(line 3746)Tracking font `T1bchmn9 on input line 3746trying to find tracking amount list for font `T1bchmn9trying T1bchmntrying T1bchmntrying T1bchmtrying T1bchmtrying T1bchntrying T1bchntrying T1bchtrying T1bchtrying T1mntrying T1mntrying T1mtrying T1mtrying T1ntrying T1ntrying T1trying T1 Loading tracking list `default Tracking by 60
OT1mdbchmn9
Known font
(line 3746)
OT1mdbchmn6
Known font
(line 3746)
OT1mdbchmn5
Known font
(line 3746)
OMLmdbchmit9
Known font
(line 3746)
OMLmdbchmit6
Known font
(line 3746)
OMLmdbchmit5
Known font
(line 3746)
OMSmdbchmn9
Known font
(line 3746)
OMSmdbchmn6
Known font
(line 3746)
OMSmdbchmn5
Known font
(line 3746)
OMXmdbchmn9
Known font
(line 3746)
OMXmdbchmn6
Known font
(line 3746)
OMXmdbchmn5
Known font
(line 3746)
OMSmdbchmn9
Known font
(line 3746)
OMSmdbchmn6
Known font
(line 3746)
OMSmdbchmn5
Known font
(line 3746)
OMSmdbchmn9
Known font
(line 3746)
OMSmdbchmn6
Known font
(line 3746)
OMSmdbchmn5
Known font
(line 3746)
OMLmdbchmn9
Known font
(line 3746)
OMLmdbchmn6
Known font
(line 3746)
OMLmdbchmn5
Known font
(line 3746)
MDAmdbchmn9
Known font
(line 3746)
MDAmdbchmn6
Known font
(line 3746)
MDAmdbchmn5
Known font
(line 3746)
MDBmdbchmn9
Known font
(line 3746)
MDBmdbchmn6
Known font
(line 3746)
MDBmdbchmn5
Known font
(line 3746)
T1blgmn10
Known font
(line 3747)
T1blgmn8
Known font
(line 3747)
T1blgmn8
Known font
(line 3767)
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
OT1mdbchmn8
Known font
(line 3767)
OT1mdbchmn6
Known font
(line 3767)
OT1mdbchmn5
Known font
(line 3767)
OMLmdbchmit8
Known font
(line 3767)
OMLmdbchmit6
Known font
(line 3767)
OMLmdbchmit5
Known font
(line 3767)
OMSmdbchmn8
Known font
(line 3767)
OMSmdbchmn6
Known font
(line 3767)
OMSmdbchmn5
Known font
(line 3767)
OMXmdbchmn8
Known font
(line 3767)
OMXmdbchmn6
Known font
(line 3767)
OMXmdbchmn5
Known font
(line 3767)
OMSmdbchmn8
Known font
(line 3767)
OMSmdbchmn6
Known font
(line 3767)
OMSmdbchmn5
Known font
(line 3767)
OMSmdbchmn8
Known font
(line 3767)
OMSmdbchmn6
Known font
(line 3767)
OMSmdbchmn5
Known font
(line 3767)
OMLmdbchmn8
Known font
(line 3767)
OMLmdbchmn6
Known font
(line 3767)
OMLmdbchmn5
Known font
(line 3767)
MDAmdbchmn8
Known font
(line 3767)
MDAmdbchmn6
Known font
(line 3767)
MDAmdbchmn5
Known font
(line 3767)
MDBmdbchmn8
Known font
(line 3767)
MDBmdbchmn6
Known font
(line 3767)
MDBmdbchmn5
Known font
(line 3767)
T1blgmit8
Known font
(line 3767)
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1blgmit8
Known font
(line 3767)
T1blgmn8
Known font
(line 3767)
T1blgmn8
Known font
(line 3767)

IMPLEMENTATION Preliminaries 38

1412 Requirements

MTplain The letterspace package works with

0 miniltx

1 eplain

2 LATEX

For plain usage we have to copy some commands from latexltx125 langplainrang126 defMTplain2127 ifxdocumentclassundefined128 defMTplain1129 defhmodebgroupleavevmodebgroup130 defnfsstext1mbox1131 lettypesetprotectrelax132 ifxeplainundefined133 defMTplain0134 defPackageWarning12135 begingroup136 newlinechar=10 137 defMessageBreak^^J(1)spacesspacesspacesspaces138 immediatewrite16^^JPackage 1 Warning 2online^^J139 endgroup140 141 defonline on input line theinputlineno142 defspacesspacespacespacespace143 fi144 fi

MTrequireslatex Better use groups than plain ifs145 defMTrequireslatex1146 ifnumMTplainlt1 expandaftersecondoftwoelseexpandafterfirstoftwofi147 148 langplainrang

For definitions that depend on e-TEX features149 ifcase 0150 ifxeTeXversionundefined 1else151 ifxeTeXversionrelax 1else152 ifcaseeTeXversion 1fi153 fi154 fi155 else156 catcode`^^Q=9 catcode`^^X=14157 fi158 langletterspacerang^^QMTwarningnlThis package requires the etex extensions159 langletterspacerang^^Q MessageBreak ExitingMTrestorecatcodesendinput160 langdebugrangMTdinfonl0this is161 langdebugrang^^Q not162 langdebugrang etex

We check whether we are running pdfTEX XETEX or LuaTEX and load the appro-priate definition file

MTclearoptions If we are using neither of these engines we disable everything and exit163 defMTclearoptions164 langplainrang MTrequireslatex1165 AtEndOfPackageletunprocessedoptionsrelaxMTrestorecatcodes166 letCurrentOptionempty167 langpackagerang letMTendinputendinput168 langplainrang relax169

IMPLEMENTATION Preliminaries 39

A hack circumventing the TEX Live 2004 hack which undefines the pdfTEX primitivesin the format in order to hide the fact that pdfTEX is being run from the user Thishas been fixed in TEX Live 2005

170 ifxnormalpdftexversionundefined else171 letpdftexversion normalpdftexversion172 letpdftexrevisionnormalpdftexrevision173 letpdfoutput normalpdfoutput174 fi

MTengine

MTenginetooold

Old packages might have let pdftexversion to relax175 letMTenginerelax176 langletterspacerangdefMTenginetooold0177 ifxpdftexversionundefined else178 ifxpdftexversionrelax else179 defMTenginepdf180 langletterspacerang letMTpdforluafirstoftwo181 langletterspacerang ifnumpdftexversion gt 139 defMTenginetooold1fi182 fi183 fi184 ifxdirectluaundefined else185 ifxdirectluarelax else186 defMTenginelua

Since approx LuaTEX 080 pdftexversion is let to luatexversion so that wewould be fooled to think that pdfTEX is too old

187 langletterspacerang188 letMTpdforluasecondoftwo189 ifnumluatexversion lt 62 defMTenginetooold0190 else191 defMTenginetooold1192 letMTluadirectlua193 ifnumluatexversion gt 84194 letpdfoutputoutputmode195 letpdfprotrudecharsprotrudechars196 letpdfadjustspacingadjustspacing197 fi198 fi199 langletterspacerang200 fi201 fi202 langpackagerang203 ifxMTenginerelax204 ifxXeTeXversionundefined else205 ifxXeTeXversionrelax else206 defMTenginexe207 fi208 fi209 fi210 langpackagerang211 langpackage|letterspacerang

MTpdftexno pdfTEXrsquos features for which we provide an interface here havenrsquot always beenavailable and some specifics have changed over time Therefore we have to testwhich pdfTEX wersquore using if any MTpdftexno will be used throughout thepackage to respectively do the right thing

Currently we have to distinguish seven cases for pdfTEX

0 not running pdfTEX

1 pdfTEX (lt 014f)

2 + micro-typographic extensions (014fg)

3 + protrusion relative to 1em (ge 014h)

IMPLEMENTATION Preliminaries 40

4 + automatic font expansion protrusion no longer has to be set up first scalefactor fixed to 1000 default efcode= 1000 (ge 120)

5 + (leftright)marginkern pdfnoligatures pdfstrcmp pdfescapestring(ge 130)

6 + adjustment of interword spacing extra kerning letterspacefont pdfmatch14pdftracingfonts always e-TEX (ge 140)

7 + letterspacefont doesnrsquot disable ligatures and kerns pdfcopyfont (ge 1404)

212 langpdftex-defrang213 langdebugrangMTdinfonl0this is pdftex thepdftexversion(pdftexrevision)214 defMTpdftexno7215 ifnumpdftexversion = 140216 ifnumpdftexrevision lt 4217 defMTpdftexno6218 fi219 else220 ifnumpdftexversion lt 140221 defMTpdftexno5222 ifnumpdftexversion lt 130223 defMTpdftexno4224 ifnumpdftexversion lt 120225 defMTpdftexno3226 ifnumpdftexversion = 14227 ifnum expandafter`pdftexrevision lt `h228 defMTpdftexno2229 ifnum expandafter`pdftexrevision lt `f230 defMTpdftexno1231 fi232 fi233 else234 ifnumpdftexversion lt 14235 defMTpdftexno1236 fi237 fi238 fi239 fi240 fi241 fi242 langdebugrangMTdinfonl0pdftex no MTpdftexno243 langpdftex-defrang

MTxetexno XETEX supports character protrusion since version 09997244 langxetex-defrang245 langdebugrangMTdinfonl0this is xetex (theXeTeXversionXeTeXrevision)246 ifdim 0XeTeXrevision pt lt 09997pt247 defMTxetexno1248 else249 defMTxetexno2250 fi251 langdebugrangMTdinfonl0xetex no MTxetexno252 langxetex-defrang

MTluatexno Cases for LuaTEX (luatexversion ought to have been enabled by the format)

0 NA

1 LuaTEX (lt 036)

2 + directlua without state number (ge 036)

14 This command was actually introduced in 130 but failed on strings longer than 1023 bytes

IMPLEMENTATION Preliminaries 41

3 + letterspacefont non-automatic expansion doesnrsquot work anymore andautomatic expansion in DVI mode is realised by modifying the tracking notthe glyphs15 (ge 062)

4 + almost all of the pdfTEX primitives have been renamed (ge 085)

5 + default efcode= 1000 protrusionboundary [not yet supported] (ge 090)

6 + glet(ge 110)

Also sometime between 104 and 107 the function fontsetexpansion has beenintroduced (but wersquore not using it for now)

253 langluatex-defrang254 langdebugrangMTdinfonl0this is luatex (theluatexversion)

MTlua Communicate with lua Beginning with LuaTEX 036 directlua no longer requiresa state number

255 letMTluadirectlua256 defMTluatexno6257 ifnumluatexversionlt110258 defMTluatexno5259 ifnumluatexversionlt90260 defMTluatexno4261 ifnumluatexversionlt85262 defMTluatexno3263 ifnumluatexversionlt62264 defMTluatexno2265 ifnumluatexversionlt36266 defMTluadirectlua0267 defMTluatexno1268 fi269 fi270 fi271 fi272 fi

273 langdebugrangMTdinfonl0luatex no MTluatexno274 langluatex-defrang275 langpdftex-def|xetex-def|letterspacerang276 ifnum277 langpdftex-def|xetex-defrang csname MTMTengine texnoendcsname lt 2278 langletterspacerang MTenginetooold=z279 MTwarningnlYou280 langletterspacerang281 ifxMTenginerelax282 donrsquot seem to be using pdftex or luatexMessageBreak283 Try running `pdftexrsquo or `luatexrsquo instead ofMessageBreak284 `ifxXeTeXversionundefinedelse xefi texrsquo285 else286 langletterspacerang287 are using a MTengine tex version older than288 langpdftex-defrang 014f289 langxetex-defrang 09997290 langletterspacerang MTpdforlua140062291 MessageBreak292 `MTMTrsquo does not work with this versionMessageBreak293 Please install a newer version of MTengine tex294 langletterspacerang fi295 MessageBreak I will quit now296 MTclearoptions297 endinputfi298 langpdftex-def|xetex-def|letterspacerang

15 This may have been changed earlier but Irsquom no longer able to find out when (the last version thatactually works for me is 040)

IMPLEMENTATION Preliminaries 42

Still there Then we can begin We need the keyval package including the lsquonewrsquoKVspdef implementation

299 langpackage|letterspacerang300 RequirePackagekeyval[19971110]301 langpackagerang

MTtoks We need a token register302 newtoksMTtoks

ifMTif A scratch if303 newififMTif

1413 Declarations

ifMTprotrusion

ifMTexpansion

ifMTauto

ifMTselected

ifMTnoligatures

ifMTdraft

ifMTspacing

ifMTkerning

ifMTtracking

ifMTbabel

These are the global switches 304 newififMTprotrusion305 newififMTexpansion306 newififMTauto307 newififMTselected308 newififMTnoligatures309 newififMTdraft310 newififMTspacing311 newififMTkerning312 newififMTtracking313 newififMTbabel

[This line intentionally left blank]MTprlevel

MTexlevel

MTprfactor

MTexfactor

MTspfactor

MTknfactor

and numbers314 letMTprleveltw315 letMTexleveltw316 letMTprfactorm317 letMTexfactorm318 letMTspfactorm319 letMTknfactorm

MTprunit

MTspunit

MTknunit

Default unit for protrusion settings is character width for spacing space for kerning(and tracking) 1em

320 letMTprunitempty321 letMTspunitmne322 defMTknunit1em

MTstretch

MTshrink

MTstep

Expansion settings323 letMTstretchmne324 letMTshrink mne325 letMTstep mne

MTprmin

MTprmax

MTexmin

MTexmax

MTspmin

MTspmax

MTknmin

MTknmax

MTtrmin

MTtrmax

Minimum and maximum values allowed by pdfTEX326 defMTprmin-m327 letMTprmaxm328 letMTexminz329 letMTexmaxm330 defMTspmin-m331 letMTspmaxm332 defMTknmin-m333 letMTknmaxm334 langpackagerang335 defMTtrmin-m336 letMTtrmaxm337 langpackagerang

MTfactordefault Default factor338 defMTfactordefault1000

IMPLEMENTATION Preliminaries 43

MTstretchdefault

MTshrinkdefault

Default values for expansion339 defMTstretchdefault20 340 defMTshrinkdefault20

MTletterspace

MTletterspacedefault

Default value for letterspacing (in thousandths of 1em)341 langpackagerang342 letMTletterspacemne343 defMTletterspacedefault100344 langpackagerang

ifMTdocument Our private test whether wersquore still in the preamble345 newififMTdocument346 langpackagerang347 langpackage|letterspacerang

1414 Auxiliary macros

MTrequirespdftex

MTrequiresluatex

For definitions that depend on a particular pdfTEX resp LuaTEX version348 langpdftex-def|luatex-defrang349 def350 langpdftex-defrang MTrequirespdftex351 langluatex-defrang MTrequiresluatex352 1ifnum353 langpdftex-defrang MTpdftexno354 langluatex-defrang MTluatexno355 lt1 expandaftersecondoftwoelseexpandafterfirstoftwofi356 langluatex-defampdebugrangMTrequiresluatex4MTluatexenableprimitives(rsquopdfrsquorsquotracingfontsrsquo)relax357 langpdftex-defampdebugrangMTrequirespdftex6358 langdebugrangpdftracingfonts=1359 langpdftex-defampdebugrangrelax360 langpdftex-def|luatex-defrang

Some functions are loaded from a dedicated lua file This avoids character escapingproblems and incompatibilities between versions of LuaTEX Unless running arecent LATEX we load the luatexbase package

361 langluatex-defrang362 ifltrfmtversion20160101relaxRequirePackageluatexbase

We load luaotfload because some of its functions are required in microtypeluaThis eliminates the need for the user to load fontspec before microtype Therewill hardly be any LuaTEX documents that donrsquot load this package anyway Since20170101 it is already loaded in the format

363 ifltrfmtversion20170101relaxRequirePackageluaotfload364 MTluarequire(microtype)365 langluatex-defrang

Here it begins The module was contributed by Eacutelie Roux366 langluafilerang367368 function microtypeinfo()369 luatexbasemodule_info(microtype)370 end371372 local find = stringfind373 local match = stringmatch374 local tex_write = texwrite375376 local catpackage377 if luatexbaseregisternumber then378 catpackage = luatexbaseregisternumber(catcodetableatletter) -- LaTeX379 else

IMPLEMENTATION Preliminaries 44

380 catpackage = luatexbasecatcodetablesCatcodeTableLaTeXAtLetter -- luatexbase381 end382 function microtypesprint ()383 texsprint(catpackage )384 end385386 langluafilerang

To be continued but first back to primitivesMTglet Herersquos the forgotten one (finally implemented in LuaTEX)

387 langluatex-defrangMTrequiresluatex6letMTgletgletrelax388 langpackage|letterspacerang389 defMTgletgloballet

MTexpcs

MTexpgcs

Commands to create command sequences Those that are going to be definedglobally should be created inside a group so that the save stack wonrsquot explode

390 defMTexpcs12expandafter1csname2endcsname391 langpackagerang392 defMTexpgcs12begingroupexpandafterendgroupexpandafter1csname2endcsname

MTdefn

MTgdefn

This is namedef and global393 defMTdefnMTexpcsdef394 defMTgdefnMTexpgcsgdef

MTedefn

MTxdefn

Its expanding versions395 langpackagerang396 defMTedefnMTexpcsedef397 langpackagerang398 defMTxdefnMTexpgcsxdef

MTletnc

MTgletnc

let a csname sequence to a command399 defMTletncMTexpcslet400 defMTgletncMTexpgcsMTglet

MTletcn let a command to a csname sequence401 langpackagerang402 defMTletcn12expandafterletexpandafter1csname 2endcsname403 langpackagerang

MTletnn

MTgletnn

let a csname sequence to a csname sequence404 defMTletnnMTexpcsMTletcn405 defMTgletnnMTexpgcsglobalexpandafterMTletcn

MTfont Remove trailing space from the font name406 defMTfontexpandafterstringMTfont

MTexponen Expand the second token once and enclose it in braces407 langpackagerang408 defMTexponen12expandafter1expandafter2

MTexptwoc Expand the next two tokens after lang1rang once409 defMTexptwoc1expandafterexpandafterexpandafter1expandafter410 langpackagerang

MTexptwon Expand the next two tokens after lang1rang once and enclose them in braces411 defMTexptwon123412 expandafterexpandafterexpandafter413 1expandafterexpandafterexpandafter414 expandafter2expandafterexpandafter3

You do not wonder why MTexponec doesnrsquot exist do you

IMPLEMENTATION Preliminaries 45

MTifdefinedcT

MTifdefinedcTF

MTifdefinednT

MTifdefinednTF

Wrapper for testing whether command resp csname sequence is defined If weare running e-TEX we will use its primitives ifdefined and ifcsname whichdecreases memory use substantially

415 defMTifdefinedcT1416 ^^X ifdefined1expandafterfirstofoneelseexpandaftergobblefi417 ^^Q ifx1undefinedexpandaftergobbleelseexpandafterfirstofonefi418 419 langpackagerang420 defMTifdefinedcTF1421 ^^X ifdefined1expandafterfirstoftwoelseexpandaftersecondoftwofi422 langpackagerang^^Q ifx1undefined423 langpackagerang^^Q expandaftersecondoftwoelseexpandafterfirstoftwofi424 425 defMTifdefinednT1426 ^^X ifcsname1endcsnameexpandafterfirstofoneelseexpandaftergobblefi427 langpackagerang^^Q begingroupMTexptwocendgroupifxcsname 1endcsnamerelax428 langpackagerang^^Q expandaftergobbleelseexpandafterfirstofonefi429 430 defMTifdefinednTF1431 ^^X ifcsname1endcsnameexpandafterfirstoftwoelseexpandaftersecondoftwofi432 langpackagerang^^Q begingroupMTexptwocendgroupifxcsname 1endcsnamerelax433 langpackagerang^^Q expandaftersecondoftwoelseexpandafterfirstoftwofi434 435 langpackagerang

MTdetokenizen

MTdetokenizec

MTremlastspace

Translate a macro into a token list With e-TEX we can use detokenize We alsoneed to remove the last trailing space and only the last one ndash therefore the fiddling(and the string isnrsquot perfect of course)

436 defMTdetokenizen1437 ^^X expandafterMTremlastspacedetokenize1 nil438 ^^Q string1439 440 defMTdetokenizec1441 ^^X MTexponenMTdetokenizen1442 ^^Q MTexptwocMTremlastspacestripprefixmeaning1 nil443 444 defMTremlastspace1 21445 ifxnil2else space446 expandafterMTremlastspaceexpandafter2fi447

MTifempty Test whether argument is empty448 langpackagerang449 begingroup450 catcode`=12451 catcode`amp=14452 gdefMTifempty1amp453 if 1amp454 expandafterfirstoftwo455 else456 expandaftersecondoftwo457 fi458 459 endgroup460 langpackagerang

MTifint Test whether argument is an integer using an old trick by Mr Arseneau or thelatest and greatest from pdfTEX or LuaTEX (which also allows negative numbers asrequired by the letterspace option)

461 langpackagerang462 langpackage|letterspacerang463 langpdftex-defrangMTrequirespdftex6464 langletterspacerangMTpdforlua

IMPLEMENTATION Preliminaries 46

465 langpdftex-def|letterspacerang466 defMTifint1467 ifcasepdfmatch^-[0-9]+ $1relax468 expandaftersecondoftwo469 else470 expandafterfirstoftwo471 fi472 473 474 langpdftex-def|letterspacerang475 langpdftex-def|xetex-def|letterspacerang476 defMTifint1477 ififnum9lt11elsefi478 expandafterfirstoftwo479 else480 expandaftersecondoftwo481 fi482 483 langpdftex-def|xetex-def|letterspacerang484 langpdftex-def|letterspacerang485 langluatex-defrangdefMTifint1csnameMTluamicrotypeif_int([[1]])endcsname486 langluafilerang487 local function if_int(s)488 if find(s^-[0-9]+ $) then489 tex_write(firstoftwo)490 else491 tex_write(secondoftwo)492 end493 end494 microtypeif_int = if_int495496 langluafilerang

MTifdimen Test whether argument is dimension (or number) (nd and nc are new Didot respCicero added in pdfTEX 130 px is a pixel)

497 langpdftex-defrang498 MTrequirespdftex6499 defMTifdimen1500 ifcasepdfmatch^([0-9]+([][0-9]+)|[][0-9]+)501 (em|ex|cm|mm|in|pc|pt|dd|cc|bp|sp|nd|nc|px) $1relax502 expandaftersecondoftwo503 else504 expandafterfirstoftwo505 fi506 507 508 langpdftex-defrang509 langpdftex-def|xetex-defrang510 defMTifdimen1511 setboxz=hbox512 MTcount=11relax513 ifnumMTcount=ne514 aftergroupsecondoftwo515 else516 aftergroupfirstoftwo517 fi518 519 520 langpdftex-def|xetex-defrang521 langpdftex-defrang522 langluatex-defrangdefMTifdimen1csnameMTluamicrotypeif_dimen([[1]])endcsname523 langluafilerang524 local function if_dimen(s)525 if (find(s ^-[0-9]+(a) $) or526 find(s ^-[0-9][][0-9]+(a) $)) then

IMPLEMENTATION Preliminaries 47

527 tex_write(firstoftwo)528 else529 tex_write(secondoftwo)530 end531 end532 microtypeif_dimen = if_dimen533534 langluafilerang

MTifdim Compare floating point numbers535 langpackagerang536 defMTifdim123537 ifdim 1p 2 3p538 expandafterfirstoftwo539 else540 expandaftersecondoftwo541 fi542 543 langpackagerang

MTifstreq Test whether two strings (fully expanded) are equal544 langpdftex-def|xetex-defrang545 langpdftex-defrangMTrequirespdftex5546 defMTifstreq12547 langpdftex-defrang ifnumpdfstrcmp12=z548 langxetex-defrang ifnumstrcmp12=z549 expandafterfirstoftwo550 else551 expandaftersecondoftwo552 fi553 554 langpdftex-def|xetex-defrang555 langpdftex-defrang556 557 defMTifstreq12558 edefMTresa1559 edefMTresb2560 ifxMTresaMTresb561 expandafterfirstoftwo562 else563 expandaftersecondoftwo564 fi565 566 567 langpdftex-defrang568 langluatex-defrangdefMTifstreq12csnameMTluamicrotypeif_str_eq([[1]][[2]])endcsname569 langluafilerang570 local function if_str_eq(s1 s2)571 if s1 == s2 then572 tex_write(firstoftwo)573 else574 tex_write(secondoftwo)575 end576 end577 microtypeif_str_eq = if_str_eq578579 langluafilerang

MTxadd Add item to a list580 langpackagerang581 defMTxadd12582 ifx1relax583 xdef12584 else585 xdef112

IMPLEMENTATION Preliminaries 48

586 fi587

MTxaddb Add item to the beginning588 defMTxaddb12589 ifx1relax590 xdef12591 else592 xdef121593 fi594 595 langpackagerang

MTmapclistn

MTmapclistc

MTmapclist

MTclistfunction

MTclistbreak

Run lang2rang on all elements of the comma list lang1rang This and the following is modelledafter LATEX3 commands

596 langpackage|letterspacerang597 defMTmapclistn12598 ifxempty1else599 defMTclistfunction12600 MTmapclist1nilnnil601 fi602

603 defMTmapclistc1MTexponenMTmapclistn1604 defMTmapclist1605 ifxnil1606 expandafterMTclistbreak607 fi608 MTclistfunction1609 MTmapclist610 611 letMTclistfunctiongobble612 defMTclistbreak1nnil613 langpackagerang

MTmaptlistn

MTmaptlistc

MTmaptlist

MTtlistbreak

Execute lang2rang on all elements of the token list lang1rang MTtlistbreak can be usedto jump out of the loop

614 defMTmaptlistn12MTmaptlist21nnil615 defMTmaptlistc12expandafterMTmaptlistexpandafter21nnil616 defMTmaptlist12617 ifxnnil2else618 12619 expandafterMTmaptlist620 expandafter1621 fi622 623 defMTtlistbreak1nnilfi

ifMTinlist

MTinclist

Test whether item lang1rang is in comma list lang2rang Using pdfmatch would be slower624 newififMTinlist625 defMTinclist12626 defMTresa1123nnil627 ifx2empty628 MTinlistfalse629 else630 MTinlisttrue631 fi632 633 expandafterMTresaexpandafter21emptynnil634

MTremfromclist Remove item lang1rang from comma list lang2rang This is basically removeelement fromltcntrldtx Using pdfmatch and pdflastmatch here would be really slow

635 defMTremfromclist12

IMPLEMENTATION Preliminaries 49

636 defMTresa112MTresa12MTresb637 defMTresb1MTresb2MTresbifx1emptyelse1fi638 xdef2MTexptwocMTresbMTresaexpandafter2MTresb1MTresa639

MTintlist

MTintlist

Test whether item is in token list Since this isnrsquot too elegant I thought that at leasthere pdfmatch would be more efficient ndash however it turned out to be even slowerthan this solution

640 defMTintlist12641 MTinlistfalse642 defMTresa1643 MTmaptlistc2MTintlist644 645 defMTintlist1646 edefMTresb1647 ifxMTresaMTresb648 MTinlisttrue649 expandafterMTtlistbreak650 fi651

MTinrlist

MTinrlist

MTinrlist

MTsizename

Test whether size MTsize is in a list of ranges Store the name of the list inMTsizename

652 defMTinrlist1653 MTinlistfalse654 MTmaptlistc1MTinrlist655 656 defMTinrlist1expandafterMTinrlist1657 defMTinrlist123658 MTifdim2=mne659 MTifdim1=MTsize660 MTinlisttrue661 relax662 663 MTifdimMTsizelt1relax664 MTifdimMTsizelt2665 MTinlisttrue666 relax667 668 669 ifMTinlist670 defMTsizename3671 expandafterMTtlistbreak672 fi673

MTloop

MTiterate

MTrepeat

This is the same as LATEXrsquos loop which we mustnrsquot use since this could confuse anouter loop in the document

674 langpackagerang675 defMTloop1MTrepeat676 defMTiterate1relaxexpandafterMTiteratefi677 MTiterate letMTiteraterelax678 679 letMTrepeatfi

MTwhilenum Execute lang3rang from lang1rang up to (excluding) lang2rang (much faster than LATEXrsquos whilenum)680 defMTwhilenum123681 tempcnta1relax682 MTloop 3683 advancetempcnta ne684 ifnumtempcnta lt 2MTrepeat685 686 langpackage|letterspacerang

IMPLEMENTATION Preliminaries 50

MTifluaotffont For fonts loaded by luaotfload we query the fontrsquos table687 langletterspacerangMTpdforlualetMTifluaotffontsecondoftwo688 langluatex-def|letterspacerangdefMTifluaotffontcsnameMTlua689 langluatex-defrang microtypeif_luaotf_font()690 langluafile|letterspacerang691 langluafileranglocal function if_luaotf_font()692 local thefont = fontgetfont(fontcurrent())693 if thefont and ( thefontformat == opentype or thefontformat == truetype )694 then texwrite(firstoftwo)695 else texwrite(secondoftwo)696 end697 langluafilerangend698 langluafilerangmicrotypeif_luaotf_font = if_luaotf_font699 langluafilerang700 langluafile|letterspacerang701 langluatex-def|letterspacerang endcsname702 langluatex-def|letterspacerang703 langletterspacerang

MTdofont Execute lang1rang 256 times704 langpdftex-def|letterspacerangdefMTdofontMTwhilenumzcclvi

resp for the whole font for LuaTEX if itrsquos a Unicode font705 langluatex-defrang706 defMTdofont1707 MTifluaotffont708 defMTdofontfunction1709 MTluamicrotypedo_font()710 MTwhilenumzcclvi1711 712 langluatex-defrang

This is the lua function which is much faster than looping through all glyphsin TEX Legacy fonts (which this function should never work on) donrsquot contain avindex field

713 langluafilerang714 local function do_font()715 local thefont = fontgetfont(fontcurrent())716 if thefont then717 for iv in nextthefontcharacters do718 if vindex == nil or vindex gt 0 then719 microtypesprint([[tempcnta=]]i[[relaxMTdofontfunction]])720 end721 end722 end723 end724 microtypedo_font = do_font725726 langluafilerang

The XETEX variant (itrsquos slow )727 langxetex-defrang728 defMTdofont1729 tempcnta=z730 MTloop731 iffontcharMTfonttempcnta 1fi732 advancetempcntane733 ifnumtempcnta lt XeTeXlastfontcharMTfont MTrepeat734 735 langxetex-defrang736 langpackagerang

MTcount

MTincrement

Increment macro lang1rang by one Saves using up too many counters The e-TEX way is

IMPLEMENTATION Preliminaries 51

slightly faster737 newcountMTcount738 defMTincrement1739 ^^X edef1numbernumexpr 1 + 1relax740 ^^Q MTcount=1relax741 ^^Q advanceMTcount ne742 ^^Q edef1numberMTcount743

MTscale Multiply and divide a counter If we are using e-TEX we will use its numexprprimitive This has the advantage that it is less likely to run into arithmetic overflowThe result of the division will be rounded instead of truncated Therefore wersquoll geta different (more accurate) result in about half of the cases

744 defMTscale123745 ^^Q multiply 1 2relax746 ifnum 3 = z747 ^^X 1=numexpr 1 2relax748 else749 ^^X 1=numexpr 1 2 3relax750 ^^Q divide 1 3relax751 fi752

MTabbrpr

MTabbrex

MTabbrprc

MTabbrexc

MTabbrprinh

MTabbrexinh

MTabbrnl

MTabbrsp

MTabbrspc

MTabbrspinh

MTabbrkn

MTabbrknc

MTabbrkninh

MTabbrtr

MTabbrtrc

Some abbreviations Thus we can have short command names but full-length logoutput

753 defMTabbrprprotrusion754 defMTabbrexexpansion755 defMTabbrprcprotrusion codes756 defMTabbrexcexpansion codes757 defMTabbrprinhprotrusion inheritance758 defMTabbrexinhexpansion inheritance759 defMTabbrnlnoligatures760 defMTabbrspspacing761 defMTabbrspcinterword spacing codes762 defMTabbrspinhinterword spacing inheritance763 defMTabbrknkerning764 defMTabbrknckerning codes765 defMTabbrkninhkerning inheritance766 defMTabbrtrtracking767 defMTabbrtrctracking amount

MTrbbaprotrusion

MTrbbaexpansion

MTrbbaspacing

MTrbbakerning

MTrbbatracking

These we also need the other way round768 defMTrbbaprotrusionpr769 defMTrbbaexpansionex770 defMTrbbaspacingsp771 defMTrbbakerningkn772 defMTrbbatrackingtr

MTfeatures

MTfeatureslong

We can work on these lists to save some guards in the dtx file773 defMTfeaturesprexspkntr774 defMTfeatureslongprotrusionexpansionspacingkerningtracking

MTisfeature Whenever an optional argument accepts a list of features we can use this com-mand to check whether a feature exists in order to prevent a rather confusinglsquoMissing endcsname insertedrsquo error message The feature (long form) must be inlang1rang the type of list to ignore in lang2rang then comes the action

775 defMTisfeature12776 MTinclist1MTfeatureslong777 ifMTinlist778 expandafterfirstofone779 else780 MTerror`1rsquo is not an available micro-typographicMessageBreak

IMPLEMENTATION Preliminaries 52

781 feature Ignoring 2Available features are `MTfeatureslongrsquo782 expandaftergobble783 fi784

1415 Compatibility

For the record the following LATEX kernel commands will be modified by microtype

bull pickupfont

bull dosubstcorrection

bull addaccent (all in section 1429)

bull showhyphens (in section 1446)

The wordcount package redefines the font-switching commands which willbreak microtype Since microtype doesnrsquot have an effect on the number of wordsin the document anyway we will simply disable ourselves

785 ifladedtexwordcount786 MTwarningnlDetected the `wordcountrsquo utilityMessageBreak787 Disabling `MTMTrsquo since it wouldnrsquot work788 MTclearoptionsendinputrelax

The minimal class doesnrsquot define any size commands other than normalsize whichwill result in lots of warnings Therefore we issue a warning about the warnings

789 ifclassloadedminimal790 MTwarningnlDetected the `minimalrsquo classMessageBreak791 Expect lots of warnings and some malfunctionsMessageBreak792 You might want to use a proper class instead793 relax

MTsetup The setup is deferred until the end of the preamble This has a couple of advantagesmicrotypesetup can be used to change options later on in the preamble and fontsdonrsquot have to be set up before microtype

794 langpackagerang795 langpackage|letterspacerang796 langplainrangMTrequireslatex1797 letMTsetupempty

MTaddtosetup We use our private hook to have better control over the timing This will also workwith eplain but not with miniltx alone

798 defMTaddtosetupgaddtomacroMTsetup

Donrsquot hesitate with miniltx799 langplainrangletMTaddtosetupfirstofone

MTwithpackageT We almost never do anything if a package is not loaded800 defMTwithpackageT1ifpackageloaded1firstofonegobble801 langpackage|letterspacerang802 langpackagerang

MTwithbabelandT LATEXrsquos ifpackagewith ignores the class options803 defMTwithbabelandT1804 MTifdefinednToptbabelpkgextension805 expandtwoargsMTinclist1806 csname optbabelpkgextensionendcsnameclassoptionslist807 ifMTinlistexpandaftergobblefi808 gobble809

IMPLEMENTATION Preliminaries 53

MTledmacsetup The ledmac package first saves each paragraph in a box from which it then splitsoff the lines one by one This will destroy character protrusion (There arenrsquot anyproblems with the lineno package since it takes a different approach) mdash mdashAfter much to and fro the situation has finally settled and there is a fix Beginningwith pdfTEX version 121b together with ledpatchsty as of 20050602 (v04)character protrusion will work at last

Peter Wilson was so kind to provide the ldunhboxline hook in ledmac toallow for protrusion leftmarginkern and rightmarginkern are new primitivesof pdfTEX 121b (aka 1300) They are also part of recent XETEX The successorpackages eledmac and reledmac are also supported

810 langpackagerang811 langpdftex-defrangMTrequirespdftex5812 langpdftex-def|luatex-def|xetex-defrang813 defMTledmacsetup814 ifMTprotrusion815 MTifdefinedcTFldunhboxline

MTledunhboxline Hook816 MTinfonlPatching ((r)e)ledmac to enable character protrusion817 letMTledunhboxlineldunhboxline818 renewcommandldunhboxline[1]819 ifhbox1820 kernleftmarginkern1821 expandafterMTledunhboxlineexpandafter1expandafter822 kernrightmarginkern1823 fi824

825 826 MTwarningnl827 Character protrusion in paragraphs with lineMessageBreak828 numbering will only work if you update ledmacMessageBreak829 or use one of its successors eledmac or reledmac830 831 fi832 833 langpdftex-def|luatex-def|xetex-defrang834 langpdftex-defrang835 836 defMTledmacsetup837 ifMTprotrusion838 MTwarningnl839 The pdftex version you are using does not allowMessageBreak840 character protrusion in paragraphs with lineMessageBreak841 numbering by the `((r)e)ledmacrsquo packageMessageBreak842 Upgrade pdftex to version 130 or later843 fi844 845 846 langpdftex-defrang

The shapepar package (v22) fixes this in a similar manner by itself so we donrsquothave to bother

MTrestoreph Restore meaning of and 847 langpackage|letterspacerang848 langpackagerang849 defMTrestorephchardef` chardef`

ifMTfontspec

ifMTxunicode

Two new conditionals for use with XETEX or LuaTEX850 newififMTfontspec851 MTwithpackageTfontspecMTfontspectrue

IMPLEMENTATION Preliminaries 54

852 newififMTxunicode853 MTwithpackageTxunicodeMTxunicodetrue

We need the correct value of the former for configuration commands inside thepreamble (to get the default families right)

854 ifltrfmtversion20201001855 AddToHookpackageafterfontspecMTfontspectruerelax

MTmaybegobblewithtikz

MTtikzsetup

If tikzexpandcount is greater than zero wersquore inside or at the end of a tikznode where we donrsquot want to adjust spacing after letterspacing lest we disturbtikz This is used in MTafteraftergroup and we donrsquot need it for letterspace

856 letMTmaybegobblewithtikzfirstofone857 defMTtikzsetup858 defMTmaybegobblewithtikz859 ifnumtikzexpandcountgtz860 expandaftergobble861 else862 expandafterfirstofone863 fi

MTsetupfonthook This hook will be executed every time a font is set up (inside a group)In the preamble we check for the packages each time a font is set up Thus it

will work regardless when the packages are loadedEven for packages that donrsquot activate any characters in the preamble (like

babel and csquotes) we have to check here too in case they were loaded beforemicrotype and a font is loaded AtBeginDocument before microtype (This isno longer needed since the complete setup is now deferred until the end of thepreamble However it is still necessary for defersetup=false)

864 defMTsetupfonthook

Spanish (as well as Galician and Mexican) babel modify storing the originalmeaning in percentsign

865 MTiffalse866 MTwithbabelandTspanish MTiftrue867 MTwithbabelandTgalicianMTiftrue868 MTwithbabelandTmexican MTiftrue869 ifMTifMTifdefinedcTpercentsignletpercentsignfi

Using disablequotes we can restore the original meaning of all charactersmade active by csquotes (It would be doable for older versions too but we wonrsquotbother)

870 MTwithpackageTcsquotes871 ifpackagelatercsquotes20050511disablequotesrelax

hyperref redefines and inside a url We restore the original meanings(which we can only hope are correct) Same for tex4ht and mathastext

872 MTiffalse873 MTwithpackageThyperref MTiftrue874 MTwithpackageTtex4ht MTiftrue875 MTwithpackageTmathastextMTiftrue876 ifMTifMTrestorephfi877 MTwithpackageTtikzMTtikzsetup878

Check again at the end of the preamble879 langpackagerang880 MTaddtosetup881 langpackagerang

Our competitor the pdfcprot package must not be tolerated

IMPLEMENTATION Preliminaries 55

882 MTwithpackageTpdfcprot883 MTerrorDetected the `pdfcprotrsquo packageMessageBreak884 `MTMTrsquo and `pdfcprotrsquo may not be used together885 The `pdfcprotrsquo package provides an interface to character protrusionMessageBreak886 So does the `MTMTrsquo package Using both packages at the sameMessageBreak887 time will almost certainly lead to undesired results Have your choice888 889 MTwithpackageT ledmacMTledmacsetup890 MTwithpackageT eledmacMTledmacsetup891 MTwithpackageTreledmacMTledmacsetup892 MTwithpackageTxunicodeMTxunicodetrue893 MTwithpackageTfontspecMTfontspectrue

We can clean up MTsetupfonthook now894 MTgletMTsetupfonthookempty895 MTiffalse896 MTwithbabelandTspanish MTiftrue897 MTwithbabelandTgalicianMTiftrue898 MTwithbabelandTmexican MTiftrue899 ifMTif900 gaddtomacroMTsetupfonthook901 MTifdefinedcTpercentsignletpercentsign902 fi903 MTwithpackageTcsquotes904 ifpackagelatercsquotes20050511905 gaddtomacroMTsetupfonthookdisablequotes906 907 MTwarningnl908 Should you receive warnings about unknown slotMessageBreak909 numbers try upgrading the `csquotesrsquo package910 911

We disable microtypersquos additions inside hyperrefrsquos pdfstringdef which redefineslots of commands hyperref doesnrsquot work with plain TEX so in that case we donrsquotbother

912 MTiffalse913 langpackagerang914 langplainrang MTrequireslatex2915 MTwithpackageThyperref916 pdfstringdefDisableCommands917 langpackagerang918 MTltxpickupfont919 lettextmicrotypecontextsecondoftwo920 letmicrotypecontextgobble921 langpackagerang922 deflsstylepdfstringdefWarnlsstyle923 deftextls1pdfstringdefWarntextls924 925 langpackagerang MTiftrue926 927 langplainrang relax928 langpackagerang929 MTwithpackageTtex4htMTiftrue930 MTwithpackageTmathastextMTiftrue931 ifMTifgaddtomacroMTsetupfonthookMTrestorephfi

The listings package makes numbers and letters active932 MTwithpackageTlistings933 gaddtomacroMTcfgcatcodes934 MTwhilenum303Acatcodetempcnta=12relax935 MTwhilenum415Bcatcodetempcnta=11relax936 MTwhilenum617Bcatcodetempcnta=11relax937

IMPLEMENTATION Font setup 56

and the backslash (which would lead to problems in MTgetslot)938 gaddtomacroMTsetupfonthook939 catcode`=z

Inside a listing space is redefined940 defspace

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

941 letlstProcessLetterempty942 943

Of course using both soulrsquos and microtypersquos letterspacing mechanisms at thesame time doesnrsquot make much sense But soul can do more eg underlining Theoptional argument to textls may not be used Also we have to disable expansionwithin soulrsquos trial run Under plain TEX soul doesnrsquot register itself the LATEX wayso we just test for its main command

944 langpackagerang945 ifxSOULundefinedelse946 soulregisterlsstyle 0947 soulregistertextls 1948 ifxXeTeXrevisionundefined949 letMTSOULdowordSOULdoword950 defSOULdowordpdfadjustspacing=z MTSOULdoword951 fi952 fi953 langpackagerang954 MTwithpackageTtikzMTtikzsetup

Compatibility with the pinyin package (from CJK) disable microtype in pymacronwhich loads a different font for the accent In older versions of pinyin (pre-460)pymacron had only one argument

955 MTwithpackageTpinyin956 letMTorigpymacronpymacron957 ifpackagelaterpinyin20050811 460958 defpymacron12959 MTltxpickupfont960 MTorigpymacron12961 MTMTpickupfont962 963 defpymacron1964 MTltxpickupfont965 MTorigpymacron1966 MTMTpickupfont967 968 969 langpackagerang970 971 langpackage|letterspacerang

We need a font (the minimal class doesnrsquot load one)972 langpackagerangexpandafterifxthefontnullfontnormalfontfi

142 Font setupMTsetupfont Setting up a font entails checking for each feature whether it should be applied to

the current font (MTfont)973 langpdftex-def|xetex-def|luatex-defrang974 defMTsetupfont

IMPLEMENTATION Font setup 57

With XETEX and LuaTEX the font may not be actually loaded hence we might see awrong font (in MTgetslot) Therefore we first load the current font

975 langxetex-def|luatex-defrang MTfont

We might have to disable stuff when used together with adventurous packages976 MTsetupfonthook

This will use a copy of the font (allowing for expansion parameter variation andthe use of more than one set of protrusion factors for a font within one paragraph)

977 langpdftex-defrangMTrequirespdftex7978 langpdftex-def|luatex-defranggaddtomacroMTsetupfontMTcopyfont979 langpdftex-defrangrelax

The font properties must be extracted from MTfont since the current value offencoding and friends may be wrong

980 gaddtomacroMTsetupfont981 MTexptwocMTsplitnamestringMTfontnil

Try to find a configuration file for the current font family982 MTexponenMTfindfileMTfamily983 ifxMTfamilyaliasempty else984 MTexponenMTfindfileMTfamilyaliasfi

We have to make sure that cfencoding expands to the correct value (for later inMTgetslot) which isnrsquot the case when selectfont chooses a new encoding(this would be done a second later in selectfont anyway ndash three lines to beexact) (I think I do not need this anymore ndash however Irsquom too afraid to remove it Oops I did it Letrsquos see whether anybody complains)

985 ifxfencodingcfencodingelseencupdatefi986

Tracking has to come first since it means actually loading a different font987 langpdftex-defrangMTrequirespdftex6988 langluatex-defrangMTrequiresluatex3989 langpdftex-def|luatex-defrang gaddtomacroMTsetupfontMTtrackingrelax990 gaddtomacroMTsetupfont991 MTcheckfont992 ifMTinlist993 langdebugrangMTshowpdfannot2994 else995 MTvinfoSetting up font `MTfontrsquoonline996 MTinfonotracking

Now we can begin setting up the font for all features that the current pdfTEXprovides The following commands are let to relax if the respective feature isdisabled via package options

For versions older than 120 protrusion has to be set up first beginning with120 the order doesnrsquot matter

997 MTprotrusion998 langpdftex-def|luatex-defrang MTexpansion999

Interword spacing and kerning (pdfTEX 140)1000 langpdftex-defrang1001 MTrequirespdftex61002 gaddtomacroMTsetupfontMTspacingMTkerning1003 relax1004 langpdftex-defrang

Disable ligatures (pdfTEX 130)1005 langpdftex-defrangMTrequirespdftex5

IMPLEMENTATION Font setup 58

1006 langpdftex-def|luatex-defranggaddtomacroMTsetupfontMTnoligatures1007 langpdftex-defrangrelax1008 gaddtomacroMTsetupfont

Debugging1009 langdebugrangMTshowpdfannot1

Finally register the font so that we donrsquot set it up anew each time1010 MTregisterfont1011 fi1012 1013 langpdftex-def|xetex-def|luatex-defrang

MTcopyfont

MTcopyfont

The new (1404) pdfcopyfont command allows expanding a font with differentparameters or to use more than one set of protrusion factors for a given fontwithin one paragraph It will be used when we find a context for SetProtrusionor SetExpansion in the preamble or when the package has been loaded with thecopyfonts option

1014 langpdftex-def|luatex-defrang1015 letMTcopyfontrelax1016 langpdftex-defrangMTrequirespdftex71017 defMTcopyfont

MTfontcopy For every new protrusion and expansion context we create a new copy1018 xdefMTfontcopycsnameMTfontMTprcontextMTexcontextendcsname1019 expandafterifxMTfontcopyrelax

MTfontorig pdfTEX doesnrsquot allow copying a font that has already been copied and expandedletterspaced Hence we have to get the original

1020 edefMTfontorigcsnameexpandafterstringfontname origendcsname1021 expandafterifxMTfontorigrelax1022 MTexptwocMTgletMTfontorigfontname1023 else1024 MTexptwocletfontnameMTfontorig1025 fi1026 langpdftex-defrang globalMTexptwocpdfcopyfontMTfontcopyfontname

Even though LuaTEX also provides the primitive from pdfTEX (even renamed tocopyfont that is lsquopromotedrsquo as per the LuaTEX manual) it is seriously crippled inthat OpenType features will be lost Therefore we do not copy the font but load itanew

1027 langluatex-defrang MTexptwocMTluacopyfontmeaningfontnamenil1028 langdebugrangMTdinfo1creating new copy MTfontcopy

Since itrsquos a new font we have to remove it from the context lists1029 MTmapclistcMTactivefeatures1030 MTexpcsifxMTnameuseMTabbr1relaxelse1031 deftempa11032 MTexpcsMTmaptlistcMT1doccontextsMTremfromlist1033 fi1034 1035 fi1036 MTexptwocletMTfontMTfontcopy

We only need the font identifier for letterspacing1037 letfontnameMTfontcopy

But we have to properly substitute the font after wersquore done1038 aftergroupletaftergroupfontnameaftergroupMTfontcopy1039

MTremfromlist

IMPLEMENTATION Font setup 59

1040 defMTremfromlist11041 MTexpcsifxMTtempa 1fontlistrelaxelse1042 expandafterMTexponenexpandafterMTremfromclistexpandafter1043 MTfont csname MTtempa 1fontlistendcsname1044 fi1045 1046 langpdftex-defrangrelax

MTluacopyfont lang1rang and lang2rang are lsquoselectrsquo and lsquofontrsquo respectively lang3rang is the font spec1047 langluatex-defrangdefMTluacopyfont 1 2 3nil1048 langluatex-defrang globalexpandafterfontMTfontcopy=3relax1049 langpdftex-def|luatex-defrang

Herersquos the promised dirty trick for users of older pdfTEX versions which worksaround the problem that the use of the same font with different expansion para-meters is prohibited If you do not want to create a clone of the font setup (thiswould require duplicating the tfmvf files under a new name and writing new fdfiles and map entries) you can load a minimally larger font for the paragraph inquestion Eg for a document typeset in 10 pt

SetExpansion [ stretch = 30 shrink = 60 step = 5 ] encoding = size = 10001 newcommandexpandpar[1] fontsize10001baselineskipselectfont 1par expandparThis 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 package 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

MTfixfontdimensix

MTdimensix

If fontdimen6 is zero character protrusion spacing kerning and tracking wonrsquotwork and we could skip the settings (for example the dsfont fonts donrsquot specifythis dimension this is probably a bug ndash the fourier and newpxnewtx packageshave been fixed in the meantime) However we can fix it ourselves ndash only trackingstill doesnrsquot work (it seems that letterspacefont uses the fontdimen 6 from theoriginal font) XETEX doesnrsquot provide an equivalent to pdffontsize so we use thenominal size instead

1050 langpdftex-def|luatex-def|xetex-defrang1051 defMTfixfontdimensix1052 ifnumfontdimen6MTfont=z1053 fontdimen6MTfont=1054 langpdftex-defrang pdffontsizeMTfont1055 langluatex-defrang MTrequiresluatex4pdffeedback fontsizepdffontsizeMTfont1056 langxetex-defrang MTsize pt1057 MTinfoFixing zero stringfontdimen 6 for font `MTfontrsquoMessageBreak1058 (new value thefontdimen6MTfont)1059 MTgletncMTfont-fake6empty1060 fi1061 edefMTdimensixnumberfontdimen6MTfont1062 1063 langpdftex-def|luatex-def|xetex-defrang

IMPLEMENTATION Font setup 60

MTsplitname

MTencoding

MTfamily

MTseries

MTshape

MTsize

Split up the font name (lang6rang may be a protrusionexpansion context andor aletterspacing amount) With fontspec we also need to remove its internal instancecounter

1064 langpackagerang1065 defMTsplitname123456nil1066 defMTencoding11067 ifMTfontspec1068 edefMTfamilyMTscrubfeature2()relax1069 else1070 defMTfamily21071 fi1072 defMTseries 31073 defMTshape 41074 defMTsize 51075 MTfixfontdimensix

MTfamilyalias Alias family1076 MTifdefinednTFMTMTfamily alias1077 MTletcnMTfamilyaliasMTMTfamily alias1078 letMTfamilyaliasempty1079

MTscrubfeature

MTscrubfeatures

Remove one resp all feature counters (fontspec)1080 defMTscrubfeature1(2)3relax11081 defMTscrubfeatures1(2)3relax1082 11083 ifxrelax3relaxelse1084 MTscrubfeatures3relax1085 fi1086

ifMTdo

MTfeat

MTmaybedo

We check all features of the current font against the lists of the currently activefont set and set ifMTdo accordingly

1087 newififMTdo1088 defMTmaybedo1

(but only if the feature isnrsquot globally set to false)1089 csname ifMTcsname MTabbr1endcsnameendcsname

Begin with setting micro-typography to true for this font The MTchecklisttests will set it to false if the property is not in the list The first non-empty list thatdoes not contain a match will stop us (except for font)

1090 MTdotrue1091 edeftempacsname MT1setnameendcsname1092 MTmapclistnfontencodingfamilyseriesshapesize1093 MTifdefinednTFMTchecklist11094 csname MTchecklist1endcsname1095 MTchecklist11096 11097 1098 else1099 MTdofalse1100 fi1101 ifMTdo

MTfeat stores the current feature1102 defMTfeat11103 csname MTset1codesendcsname1104 else1105 MTifstreq1tr1106 letMTinfonotrackingMTinfonotracking1107 MTvinfo No nameuseMTabbr11108 fi

IMPLEMENTATION Font setup 61

1109

MTinfonotracking

MTinfonotracking

To defer the message to after the font has actually been logged1110 letMTinfonotrackingrelax1111 defMTinfonotrackingMTvinfo No tracking

MTdinfolist

1112 langdebugrangdefMTdinfolist123MTdinfonl1nameuseMTabbr1 21113 langdebugrang ifx3list emptyelse `nameuseMT2rsquo 3 listfi

MTchecklist The generic test (lang1rang is the axis lang2rang the feature tempa contains the set name)1114 defMTchecklist121115 langdebugrang MTifdefinednT1116 langdebugrang MTifdefinednTF1117 MT2list1tempa

Begin a (neatly masqueraded) expandafter orgy to test whether the font attributeis in the list

1118 expandafterMTexponenexpandafterMTinclist1119 csname MT1expandafterendcsname1120 csname MT2list1tempaendcsname1121 ifMTinlist1122 langdebugrangMTdinfolist21in1123 MTdotrue1124 else1125 langdebugrangMTdinfolist21not in1126 MTdofalse1127 expandafterMTclistbreak1128 fi1129

If no limitations have been specified ie the list for a font attribute has not beendefined at all the font should be set up

1130 langdebugrang MTdinfolist211131

MTchecklistfamily Also test for the alias font if the original font is not in the list1132 defMTchecklistfamily11133 langdebugrang MTifdefinednT1134 langdebugrang MTifdefinednTF1135 MT1listfamilytempa1136 MTexptwonMTinclist1137 MTfamilycsname MT1listfamilytempaendcsname1138 ifMTinlist1139 langdebugrangMTdinfolist1familyin1140 MTdotrue1141 else1142 langdebugrangMTdinfolist1familynot in1143 MTdofalse1144 ifxMTfamilyaliasempty else1145 MTexptwonMTinclist1146 MTfamilyaliascsname MT1listfamilytempaendcsname1147 ifMTinlist1148 langdebugrang MTdinfolist1family aliasin1149 MTdotrue1150 langdebugrangelseMTdinfolist1family aliasnot in1151 fi1152 fi1153 fi1154 ifMTdo else1155 expandafterMTclistbreak1156 fi1157 1158 langdebugrang MTdinfolist1family

IMPLEMENTATION Font setup 62

1159

MTchecklistsize Test whether font size is in list of size ranges1160 defMTchecklistsize11161 langdebugrang MTifdefinednT1162 langdebugrang MTifdefinednTF1163 MT1listsizetempa1164 MTexpcsMTinrlistMT1listsizetempa1165 ifMTinlist1166 langdebugrangMTdinfolist1sizein1167 MTdotrue1168 else1169 langdebugrangMTdinfolist1sizenot in1170 MTdofalse1171 expandafterMTclistbreak1172 fi1173 1174 langdebugrang MTdinfolist1size1175

MTchecklistfont If the font matches we skip the rest of the test1176 defMTchecklistfont11177 langdebugrang MTifdefinednT1178 langdebugrang MTifdefinednTF1179 MT1listfonttempa

Since MTfont may be appended with context andor letterspacing specs weconstruct the name from the font characteristics

1180 edeftempbMTencodingMTfamilyMTseriesMTshapeMTsize1181 expandafterMTexponenexpandafterMTinclistexpandafter1182 tempb csname MT1listfonttempaendcsname1183 ifMTinlist1184 langdebugrangMTdinfolist1fontin1185 expandafterMTclistbreak1186 else1187 langdebugrangMTdinfolist1fontnot in1188 MTdofalse1189 fi1190 1191 langdebugrang MTdinfolist1font1192

1421 Protrusion

ifMTnofamily Info for settings that are not family-specific (Warnings seem to be too irritating)The switch is set in MTnextlistname

1193 newififMTnofamily1194 langpackagerang

MTprotrusion Set up for protrusion1195 langpdftex-def|xetex-def|luatex-defrang1196 defMTprotrusionMTmaybedopr

MTsetprcodes This macro is called by MTsetupfont and does all the work for setting up a fontfor protrusion

1197 defMTsetprcodes1198 MTnofamilyfalse

Check whether and if which list should be applied to the current font If family-specific settings donrsquot exist we write it to the log (for each encoding)

1199 MTiflistexists1200 ifMTnofamily

IMPLEMENTATION Font setup 63

1201 MTifdefinednTFMTencoding-MTfamily-settingsrelax1202 MTinfonlLoading generic protrusion settings for font familyMessageBreak1203 `MTfamilyrsquo (encoding MTencoding)MessageBreak1204 For optimal results create family-specific settingsMessageBreak1205 See the microtype manual for details1206 MTgletncMTencoding-MTfamily-settingsempty1207 1208 fi1209 MTgetopt1210 MTresetprcodes

Get the name of the inheritance list and parse it1211 MTgetinhlist

Set an input encoding1212 MTsetinputencc

Load additional lists1213 MTloadlistMTprcname1214 MTsetlistname

Load the main list1215 MTletcntempcMTprcMTprcname1216 expandafterMTsetcodestempcrelax1217 MTresetprcodes1218

MTsetallpr Set all protrusion codes of the font1219 defMTsetallpr121220 langdebugrangMTdinfonl3-- lprp setting all to 121221 letMTtempempty1222 MTifempty1relaxgaddtomacroMTtemplpcodeMTfonttempcnta=11223 MTifempty2relaxgaddtomacroMTtemprpcodeMTfonttempcnta=21224 MTdofontMTtemp1225

MTresetprcodes

MTresetprcodes

All protrusion codes are zero for new fonts However if we have to reload the fontdue to different contexts we have to reset them This command will be changed bymicrotypecontext if necessary

1226 defMTresetprcodesMTsetallprzz1227 letMTresetprcodesrelax

MTtheprcode

MTtheprcodetr

If the font is letterspaced we have to add half the letterspacing amount to themargin kerns This will be activated in MTsettrcodes

1228 defMTtheprcodetempcntb1229 langpdftex-def|luatex-defrang1230 langpdftex-defrangMTrequirespdftex61231 langluatex-defrangMTrequiresluatex31232 defMTtheprcodetr1233 numexprtempcntb+MTletterspace2relax1234 1235 relax1236 langpdftex-def|luatex-defrang

MTsetcodes Split up the values and set the codes1237 defMTsetcodes11238 ifxrelax1emptyelse1239 MTsplitcodes 1==relax1240 expandafterMTsetcodes1241 fi1242

MTsplitcodes The keyval package would remove spaces here which we neednrsquot do sinceSetProtrusion ignores spaces in the protrusion list anyway MTgetcharunit

IMPLEMENTATION Font setup 64

may mean different things1243 defMTsplitcodes1=2=3relax1244 deftempa11245 ifxtempaempty else1246 MTgetslot1247 langpdftex-def|luatex-defrang ifnumMTchar gt mne1248 langxetex-defrang ifxMTcharempty else1249 MTgetcharunit1250 csname MTMTfeat splitvalendcsname2relax1251 fi1252 fi1253

MTprsplitval

1254 defMTprsplitval12relax1255 deftempb11256 MTifemptytempbrelax1257 MTscaletoem1258 lpcodeMTfontMTchar=MTtheprcode1259 langdebugrangMTdinfonl4 lp (MTchar) numberlpcodeMTfontMTcharspace [1]1260 1261 deftempb21262 MTifemptytempbrelax1263 MTscaletoem1264 rpcodeMTfontMTchar=MTtheprcode1265 langdebugrangMTdinfonl4 rp (MTchar) numberrpcodeMTfontMTcharspace [2]1266

Now we can set the values for the inheriting characters Their slot numbers aresaved in the macro MTinhlanglist nameranglangslot numberrang

1267 MTifdefinedcTMTprinhname1268 MTifdefinednTMTinhMTprinhname MTchar 1269 MTexpcsMTmaptlistc1270 MTinhMTprinhname MTchar 1271 MTsetprheirs1272 1273 1274

MTscaletoem Since pdfTEX version 014h we have to adjust the protrusion factors (ie convertnumbers from thousandths of character width to thousandths of an em of the font)We have to do this before setting the inheriting characters so that the latter inheritthe absolute value not the relative one if they have a differing width (eg the lsquoffrsquoligature) Unlike protcodetex and pdfcprot we do not calculate with lpcoderesp rpcode since this would disallow protrusion factors larger than the characterwidth (since [lr]pcodersquos limit is 1000) Now the maximum protrusion is 1em ofthe font

The unit is in MTcount the desired factor in tempb and the result will bereturned in tempcntb

1275 langpdftex-defrangMTrequirespdftex31276 defMTscaletoem1277 tempcntb=MTcountrelax

For really huge fonts (100 pt or so) an arithmetic overflow could occur with vanillaTEX Using e-TEX this canrsquot happen since the intermediate value is 64 bit whichcould only be reached with a character width larger than maxdimen

1278 MTscaletempcntb tempb MTdimensix1279 ifnumtempcntb=z else1280 MTscalefactor1281 fi1282

IMPLEMENTATION Font setup 65

MTgetcharwd Get the width of the character When using e-TEX we can employ fontcharwdinstead of building scratch boxes

1283 defMTgetcharwd1284 langpdftex-defrang1285 ^^X MTcount=fontcharwdMTfontMTcharrelax1286 ^^Q setboxz=hboxMTfont charMTchar1287 ^^Q MTcount=wdz1288 langpdftex-defrang1289 langluatex-defrang MTcount=fontcharwdMTfontMTcharrelax

MTchar contains a slot number (legacy fonts) a Unicode number or a glyph name(if MTchar is negative)

1290 langxetex-defrang1291 ifnumMTcharltz1292 setboxz=hboxMTfont XeTeXglyph-MTchar1293 MTcount=wdz1294 else1295 MTcount=fontcharwdMTfontMTcharrelax1296 fi1297 langxetex-defrang1298 ifnumMTcount=z MTinfomissingchar fi1299

For letterspaced fonts we have to subtract the letterspacing amount from thecharactersrsquo widths The protrusion amounts will be adjusted in MTsetprcodesThe letterspaced font is already loaded so that 1em = fontdimen6

1300 langpdftex-defrang1301 MTrequirespdftex61302 gaddtomacroMTgetcharwd1303 MTifdefinedcTMTletterspace1304 advanceMTcount -dimexprMTletterspace sp dimexpr 1em1000relax1305 1306 relax1307

No adjustment with versions 014f and 014g1308 defMTscaletoem1309 MTcount=tempbrelax1310 ifnumMTcount=z else1311 MTscalefactor1312 fi1313

We need this in MTwarncodetoolarge (neutralised)1314 defMTgetcharwdMTcount=MTdimensix1315 1316 langpdftex-defrang1317 langpdftex-def|xetex-def|luatex-defrang

MTgetfontdimen For the space unit1318 langpackagerang1319 defMTgetfontdimen11320 ifnumfontdimen1MTfont=z1321 MTwarningnlFont `MTfontrsquo does not specify itsMessageBreak1322 backslashchar fontdimen 1 (itrsquos zero)MessageBreak1323 You should use a different `unitrsquo for MTcurrlistname1324 else1325 MTcount=fontdimen1MTfont1326 fi1327

MTinfomissingchar Info about missing characters or characters with zero width1328 defMTinfomissingchar

IMPLEMENTATION Font setup 66

1329 MTinfonlCharacter `theMTtoksrsquo1330 ^^X ifnumMTcharltz is missingelse1331 ^^X iffontcharMTfontMTchar1332 has a width of 0pt1333 ^^X else is missingfifi1334 ^^Q MessageBreak (itrsquos probably missing)1335 MessageBreak in font `MTfontrsquoMessageBreak1336 Ignoring protrusion settings for this character1337

MTscalefactor Furthermore we might have to multiply with a factor1338 defMTscalefactor1339 ifnumcsname MTMTfeat factorendcsname=m else1340 expandafterMTscaleexpandafter tempcntb1341 csname MTMTfeat factorendcsname m1342 fi1343 ifnumtempcntbgtcsname MTMTfeat maxendcsnamerelax1344 MTexpcsMTwarncodetoolargeMTMTfeat max1345 else1346 ifnumtempcntbltcsname MTMTfeat minendcsnamerelax1347 MTexpcsMTwarncodetoolargeMTMTfeat min1348 fi1349 fi1350

MTwarncodetoolarge Type out a warning if a chosen protrusion factor is too large after the conversionAs a special service we also type out the maximum amount that may be specifiedin the configuration

1351 defMTwarncodetoolarge11352 tempcnta=1relax1353 ifnumcsname MTMTfeat factorendcsname=m else1354 expandafterMTscaleexpandaftertempcntaexpandafter1355 m csname MTMTfeat factorendcsname1356 fi1357 MTscaletempcnta MTdimensix MTcount1358 MTwarningnlThe nameuseMTabbrMTfeat code tempbspace1359 is too large for characterMessageBreak1360 `theMTtoksrsquo in MTcurrlistnameMessageBreak1361 Setting it to the maximum of numbertempcnta1362 tempcntb=1relax1363

MTgetopt The optional argument to the configuration commands (except for SetExpansionand SetTracking which are being dealt with in MTgetexopt and MTgettroptresp)

1364 defMTgetopt1365 MTsetlistname

MTprfactor

MTspfactor

MTknfactor

Apply a factor1366 MTifdefinednTFMTMTfeat ccsname MTMTfeat cnameendcsname factor1367 MTletnnMTMTfeat factor1368 MTMTfeat ccsname MTMTfeat cnameendcsname factor1369 MTvinfo Multiplying nameuseMTabbrMTfeat codes by1370 numbercsname MTMTfeat factorendcsname10001371 1372 MTletnnMTMTfeat factorMTMTfeat factor1373

MTprunit

MTspunit

MTknunit

The unit can only be evaluated here since it might be font-specific If itrsquos emptyitrsquos relative to character widths if itrsquos minus1 relative to space dimensions

1374 MTifdefinednTFMTMTfeat ccsname MTMTfeat cnameendcsname unit1375 MTletnnMTMTfeat unit1376 MTMTfeat ccsname MTMTfeat cnameendcsname unit

IMPLEMENTATION Font setup 67

1377 MTexpcsifxMTMTfeat unitempty1378 MTvinfo Setting nameuseMTabbrMTfeat codes1379 relative to character widths1380 else1381 MTexpcsifxMTMTfeat unitmne1382 MTvinfo Setting nameuseMTabbrMTfeat codes1383 relative to width of space1384 fi1385 fi1386 1387 MTletnnMTMTfeat unitMTMTfeat unit1388

MTgetspaceunit

MTgetcharunit

The codes are either relative to character widths or to a fixed width For spacingand kerning lists they may also be relative to the width of the interword glue Onlythe setting from the top list will be taken into account

1389 letMTgetcharunitrelax1390 letMTgetspaceunitgobble1391 MTexpcsifxMTMTfeat unitempty1392 letMTgetcharunitMTgetcharwd1393 else1394 MTexpcsifxMTMTfeat unitmne1395 letMTgetspaceunitMTgetfontdimen1396 else1397 MTexpcsMTgetunitMTMTfeat unit1398 fi1399 fi

Preset all characters If so we surely donrsquot need to reset too1400 MTifdefinednTMTMTfeat ccsname MTMTfeat cnameendcsname preset1401 csname MTpresetMTfeatendcsname1402 MTletncMTresetMTfeat codesrelax1403 1404

MTgetunit

MTgetunit

If unit contains an em or ex we use the corresponding fontdimen to obtain thereal size Simply converting the em into points might give a wrong result sincethe font probably isnrsquot set up yet so that these dimensions havenrsquot been updatedeither

1405 defMTgetunit11406 expandafterMTgetunit1 enil1407 ifxxemptyelselet1xfi1408 defaultunitstempdima1 ptrelaxnnil1409 ifdimtempdima=z1410 MTwarningnl1411 Cannot set nameuseMTabbrMTfeat factors relative to zeroMessageBreak1412 width Setting factors of list `nameuseMTMTfeat cnamersquoMessageBreak1413 relative to character widths instead1414 let1empty1415 letMTgetcharunitMTgetcharwd1416 else1417 MTvinfo Setting nameuseMTabbrMTfeat factors relative1418 to thetempdima1419 MTcount=tempdimarelax1420 fi1421 1422 defMTgetunit1e23nil1423 ifx3letxempty else1424 if m21425 edefx1fontdimen6MTfont1426 else1427 if x21428 edefx1fontdimen5MTfont1429 fi

IMPLEMENTATION Font setup 68

1430 fi1431 fi1432

MTsetinputenc The configurations may be under the regime of an input encoding1433 defMTsetinputenc1

MTcat We remember the current category (c or inh) in case of warnings later1434 defMTcat1

1435 edeftempaMTMTfeat 1csname MTMTfeat 1nameendcsname inputenc1436 MTifdefinednTtempaMTsetinputenc1437

MTsetinputenc More recent versions of inputenc remember the current encoding so that we cantest whether we really have to load the encoding file

1438 MTaddtosetup1439 ifpackageloadedinputenc1440 ifpackagelaterinputenc200602221441 defMTsetinputenc1442 MTifstreqinputencodingnamecsnametempaendcsnamerelax1443 MTloadinputenc1444 1445 1446 letMTsetinputencMTloadinputenc1447 1448 1449 defMTsetinputenc1450 MTwarningnlKey `inputencrsquo used in MTcurrlistname but the `inputencrsquo1451 MessageBreak package isnrsquot loaded Ignoring input encoding1452 1453 1454

MTloadinputenc Set up normal catcodes since eg listings would otherwise want to actuallytypeset the inputenc file when it is being loaded inside a listing

1455 defMTloadinputenc1456 MTcfgcatcodes1457 langdebugrangMTdinfonl1loading input encoding nameusetempa1458 inputencodingnameusetempa1459 1460 langpackagerang

MTsetprheirs Set the inheriting characters1461 langpdftex-def|xetex-def|luatex-defrang1462 defMTsetprheirs11463 lpcodeMTfont 1=lpcodeMTfontMTcharrelax1464 rpcodeMTfont 1=rpcodeMTfontMTcharrelax1465 langdebugrangMTdinfonl2-- heir of MTchar 11466 langdebugrangMTdinfonl4 lprp (1) numberlpcodeMTfontMTcharspace1467 langdebugrang numberrpcodeMTfontMTcharspace1468

MTpresetpr

MTpresetpr

Preset characters Presetting them relative to their widths is not allowed1469 defMTpresetpr1470 expandafterexpandafterexpandafterMTpresetpr1471 csname MTprcMTprcname presetendcsnamenil1472 1473 defMTpresetpr12nil1474 ifxMTprunitempty1475 MTwarnpresettowidthpr1476 letMTpresetauxMTpresetauxfactor1477 else1478 defMTpresetauxMTpresetauxspace21479 fi

IMPLEMENTATION Font setup 69

1480 MTifempty1lettempaemptyMTpresetaux1tempa1481 MTifempty2lettempbemptyMTpresetaux2tempb1482 MTsetallprtempatempb1483

MTpresetaux

MTpresetauxfactor

MTpresetauxspace

Auxiliary macro for presetting Store value lang1rang in macro lang2rang1484 defMTpresetauxfactor121485 tempcntb=1relax1486 MTscalefactor1487 edef2numbertempcntb1488 1489 defMTpresetauxspace1231490 deftempb21491 MTgetspaceunit11492 MTscaletoem1493 edef3numbertempcntb1494

MTwarnpresettowidth

1495 defMTwarnpresettowidth11496 MTwarningnl1497 Cannot preset characters relative to their widthsMessageBreak1498 for nameuseMTabbr1 list `nameuseMT1cnamersquo Presetting them1499 MessageBreak relative to 1em instead1500 1501 langpdftex-def|xetex-def|luatex-defrang

1422 Expansion

MTexpansion Set up for expansion1502 langpdftex-def|luatex-defrang1503 defMTexpansionMTmaybedoex

MTsetexcodess Setting up font expansion is a bit different because of the selected option Thereare two versions of this macro

If selected=true we only apply font expansion to those fonts for which a listhas been declared (ie like for protrusion)

1504 defMTsetexcodess1505 MTiflistexists1506 MTgetexopt1507 letMTgetcharunitrelax1508 MTresetefcodes1509 MTgetinhlist1510 MTsetinputencc1511 MTloadlistMTexcname1512 MTsetlistname1513 MTletcntempcMTexcMTexcname1514 expandafterMTsetcodestempcrelax1515 MTexpandfont1516 relax1517 1518 langpdftex-def|luatex-defrang

MTsetexcodesn If on the other hand all characters should be expanded by the same amount weonly take the first optional argument to SetExpansion into account

ifMTnonselected We need this boolean in MTiflistexists so that no warning for missing listswill be issued

1519 langpackagerangnewififMTnonselected1520 langpdftex-def|luatex-defrang1521 defMTsetexcodesn1522 MTnonselectedtrue

IMPLEMENTATION Font setup 70

1523 MTiflistexists1524 MTgetexopt1525 1526 letMTstretch MTstretch1527 letMTshrink MTshrink1528 letMTstep MTstep1529 letMTauto MTauto1530 letMTexfactorMTexfactor1531 1532 MTresetefcodes1533 MTexpandfont1534 MTnonselectedfalse1535

MTsetexcodes Default is non-selected It can be changed in the package options1536 letMTsetexcodesMTsetexcodesn

MTexpandfont Expand the font For some reason older LuaTEX versions freeze if the autoexpandmodifier is missing Canrsquot be bothered to find out why For newer versions we couldalso use the function fontsetexpansion or in the future luaotfloadrsquos expansionfont feature

1537 langluatex-defrang1538 MTrequiresluatex31539 MTrequiresluatex4letpdffontexpandexpandglyphsinfontrelax1540 ifnumluatexversionlt791541 defMTexpandfont1542 pdffontexpandMTfont MTstretch MTshrink MTstep autoexpandrelax1543 1544 else1545 defMTexpandfont1546 pdffontexpandMTfont MTstretch MTshrink MTsteprelax1547 1548 fi1549 1550 langluatex-defrang1551 defMTexpandfont1552 pdffontexpandMTfont MTstretch MTshrink MTstep MTautorelax1553 1554 langluatex-defrang

MTsetallex

MTresetefcodes

At first all expansion factors for the characters will be set to 1000 (respectively thefactor of this font)

1555 defMTsetallex11556 langdebugrangMTdinfonl3-- ex setting all to number11557 MTdofontefcodeMTfonttempcnta=1relax1558 1559 defMTresetefcodesMTsetallexMTexfactor

MTresetefcodes However this is only necessary for pdfTEX versions prior to 120 or LuaTEX lt 090(actually I think 087)

1560 langpdftex-defrangMTrequirespdftex41561 langluatex-defrangMTrequiresluatex51562 1563 defMTresetefcodes1564 ifnumMTexfactor=m else1565 MTresetefcodes1566 fi1567 1568 1569 letMTresetefcodesMTresetefcodes1570

MTexsplitval Therersquos only one number per character

IMPLEMENTATION Font setup 71

1571 defMTexsplitval1relax1572 tempcntb=1relax

Take an optional factor into account1573 ifnumMTexfactor=m else1574 MTscaletempcntb MTexfactor m1575 fi1576 ifnumtempcntb gt MTexmax1577 MTwarnextoolargeMTexmax1578 else1579 ifnumtempcntb lt MTexmin1580 MTwarnextoolargeMTexmin1581 fi1582 fi1583 efcodeMTfontMTchar=tempcntb1584 langdebugrangMTdinfonl4 ef (MTchar) numberefcodeMTfontMTchar [1]

Heirs heirs I love thy heirs1585 MTifdefinedcTMTexinhname1586 MTifdefinednTMTinhMTexinhname MTchar 1587 MTexpcsMTmaptlistcMTinhMTexinhname MTchar MTsetexheirs1588 1589 1590

MTwarnextoolarge

1591 defMTwarnextoolarge11592 MTwarningnlExpansion factor numbertempcntbspace too large for1593 characterMessageBreak `theMTtoksrsquo in MTcurrlistnameMessageBreak1594 Setting it to the maximum of number11595 tempcntb=1relax1596

MTgetexopt

MTexfactor

MTstretch

MTshrink

MTstep

MTauto

Apply different values to this font1597 defMTgetexopt1598 MTsetlistname1599 MTifdefinednTFMTexcMTexcname factor1600 MTletcnMTexfactorMTexcMTexcname factor1601 MTvinfo Multiplying expansion factors by numberMTexfactor10001602 1603 letMTexfactorMTexfactor1604 1605 MTgetexoptstretchSetting stretch limit to numberMTstretch1606 MTgetexoptshrink Setting shrink limit to numberMTshrink1607 MTgetexoptstep Setting expansion step to numberMTstep1608 langluatex-defrang MTrequiresluatex3relax1609 MTgetexoptautoMTifstreqMTautoautoexpandEnDisabling automatic expansion1610 langluatex-defrang 1611 MTifdefinednTMTexcMTexcname preset1612 MTpresetex1613 letMTresetefcodesrelax1614 1615

MTgetexopt

1616 defMTgetexopt121617 MTifdefinednTFMTexcMTexcname 11618 MTletnnMT1MTexcMTexcname 11619 MTvinfo 21620 1621 MTletnnMT1MT11622 1623

MTsetexheirs

IMPLEMENTATION Font setup 72

1624 defMTsetexheirs11625 efcodeMTfont1=efcodeMTfontMTchar1626 langdebugrangMTdinfonl2-- heir of MTchar 11627 langdebugrangMTdinfonl4 ef (1) numberefcodeMTfontMTchar1628

MTpresetex

1629 defMTpresetex1630 tempcntb=csname MTexcMTexcname presetendcsnamerelax1631 MTscalefactor1632 MTsetallextempcntb1633 1634 langpdftex-def|luatex-defrang

1423 Interword spacing (glue)

MTspacing Adjustment of interword spacing Only works with pdfTEX1635 langpdftex-defrang1636 MTrequirespdftex61637 defMTspacingMTmaybedosp

MTsetspcodes This is all the same1638 defMTsetspcodes1639 MTiflistexists1640 MTgetopt1641 MTresetspcodes1642 MTgetinhlist1643 MTsetinputencc1644 MTloadlistMTspcname1645 MTsetlistname1646 MTletcntempcMTspcMTspcname1647 expandafterMTsetcodestempcrelax1648 MTresetspcodes1649

MTspsplitval If unit=space MTgetspaceunit will be defined to fetch the correspondingfontdimen (2 for the first 3 for the second and 4 for the third argument)

1650 defMTspsplitval123relax1651 deftempb11652 MTifemptytempbrelax1653 MTgetspaceunit21654 MTscaletoem1655 knbscodeMTfontMTchar=tempcntb1656 langdebugrangMTdinfonl4 knbs (MTchar) numberknbscodeMTfontMTchar [1]1657 1658 deftempb21659 MTifemptytempbrelax1660 MTgetspaceunit31661 MTscaletoem1662 stbscodeMTfontMTchar=tempcntb1663 langdebugrangMTdinfonl4 stbs (MTchar) numberstbscodeMTfontMTchar [2]1664 1665 deftempb31666 MTifemptytempbrelax1667 MTgetspaceunit41668 MTscaletoem1669 shbscodeMTfontMTchar=tempcntb1670 langdebugrangMTdinfonl4 shbs (MTchar) numbershbscodeMTfontMTchar [3]1671 1672 MTifdefinedcTMTspinhname1673 MTifdefinednTMTinhMTspinhname MTchar 1674 MTexpcsMTmaptlistcMTinhMTspinhname MTchar MTsetspheirs1675

IMPLEMENTATION Font setup 73

1676 1677

MTsetspheirs

1678 defMTsetspheirs11679 knbscodeMTfont1=knbscodeMTfontMTchar1680 stbscodeMTfont1=stbscodeMTfontMTchar1681 shbscodeMTfont1=shbscodeMTfontMTchar1682 langdebugrangMTdinfonl2-- heir of MTchar 11683 langdebugrangMTdinfonl4 knbsstbsshbs (1) numberknbscodeMTfontMTchar1684 langdebugrang numberstbscodeMTfontMTcharnumbershbscodeMTfontMTchar1685

MTsetallsp

MTresetspcodes

MTresetspcodes1686 defMTsetallsp1231687 langdebugrangMTdinfonl3-- knbsstbsshbs setting all to 1231688 letMTtempempty1689 MTifempty1relaxgaddtomacroMTtempknbscodeMTfonttempcnta=1relax1690 MTifempty2relaxgaddtomacroMTtempstbscodeMTfonttempcnta=2relax1691 MTifempty3relaxgaddtomacroMTtempshbscodeMTfonttempcnta=3relax1692 MTdofontMTtemp1693 1694 defMTresetspcodesMTsetallspzzz1695 letMTresetspcodesrelax

MTpresetsp

MTpresetsp 1696 defMTpresetsp1697 expandafterexpandafterexpandafterMTpresetsp1698 csname MTspcMTspcname presetendcsnamenil1699 1700 defMTpresetsp123nil1701 ifxMTspunitempty1702 MTwarnpresettowidthsp1703 MTifempty1lettempaemptyMTpresetauxfactor1tempa1704 MTifempty2lettempcemptyMTpresetauxfactor2tempc1705 MTifempty3lettempbemptyMTpresetauxfactor3tempb1706 else1707 MTifempty1lettempaemptyMTpresetauxspace21tempa1708 MTifempty2lettempcemptyMTpresetauxspace32tempc1709 MTifempty3lettempbemptyMTpresetauxspace43tempb1710 fi1711 MTsetallsptempatempctempb1712 1713 relax

1424 Additional kerning

MTkerning Again only check for additional kerning for new versions of pdfTEX1714 MTrequirespdftex61715 defMTkerningMTmaybedokn

MTsetkncodes Itrsquos getting boring I know1716 defMTsetkncodes1717 MTiflistexists1718 MTgetopt1719 MTresetkncodes1720 MTgetinhlist1721 MTsetinputencc1722 MTloadlistMTkncname1723 MTsetlistname1724 MTletcntempcMTkncMTkncname1725 expandafterMTsetcodestempcrelax1726 MTresetkncodes

IMPLEMENTATION Font setup 74

1727

MTknsplitval Again the unit may be measured in the space dimension this time only fontdimen 21728 defMTknsplitval12relax1729 deftempb11730 MTifemptytempbrelax1731 MTgetspaceunit21732 MTscaletoem1733 knbccodeMTfontMTchar=tempcntb1734 langdebugrangMTdinfonl4 knbc (MTchar) numberknbccodeMTfontMTchar [1]1735 1736 deftempb21737 MTifemptytempbrelax1738 MTgetspaceunit21739 MTscaletoem1740 knaccodeMTfontMTchar=tempcntb1741 langdebugrangMTdinfonl4 knac (MTchar) numberknaccodeMTfontMTchar [2]1742 1743 MTifdefinedcTMTkninhname1744 MTifdefinednTMTinhMTkninhname MTchar 1745 MTexpcsMTmaptlistcMTinhMTkninhname MTchar MTsetknheirs1746 1747 1748

MTsetknheirs

1749 defMTsetknheirs11750 knbccodeMTfont1=knbccodeMTfontMTchar1751 knaccodeMTfont1=knaccodeMTfontMTchar1752 langdebugrangMTdinfonl2-- heir of MTchar 11753 langdebugrangMTdinfonl4 knbc (1) numberknbccodeMTfontMTchar1754 langdebugrang numberknaccodeMTfontMTchar1755

MTsetallkn

MTresetkncodes

MTresetkncodes1756 defMTsetallkn121757 langdebugrangMTdinfonl3-- knacknbc setting all to 121758 letMTtempempty1759 MTifempty1relaxgaddtomacroMTtempknbccodeMTfonttempcnta=1relax1760 MTifempty2relaxgaddtomacroMTtempknaccodeMTfonttempcnta=2relax1761 MTdofontMTtemp1762 1763 defMTresetkncodesMTsetallknzz1764 letMTresetkncodesrelax

MTpresetkn

MTpresetkn 1765 defMTpresetkn1766 expandafterexpandafterexpandafterMTpresetkn1767 csname MTkncMTkncname presetendcsnamenil1768 1769 defMTpresetkn12nil1770 ifxMTknunitempty1771 MTwarnpresettowidthkn1772 letMTpresetauxMTpresetauxfactor1773 else1774 defMTpresetauxMTpresetauxspace21775 fi1776 MTifempty1lettempaemptyMTpresetaux1tempa1777 MTifempty2lettempbemptyMTpresetaux2tempb1778 MTsetallkntempatempb1779 1780 relax1781 langpdftex-defrang

IMPLEMENTATION Font setup 75

1425 Tracking

This only works with pdfTEX 140 or LuaTEX 0621782 langpdftex-def|luatex-defrang1783 langpdftex-defrangMTrequirespdftex61784 langluatex-defrangMTrequiresluatex31785

MTtracking

MTtracking

MTtrfontlist

We only check whether a font should not be letterspaced at all not whether wersquovealready done that (because we have to do it again)

1786 letMTtrfontlistempty1787 defMTtracking1788 MTexponenMTinclistMTfontMTtrfontlist1789 ifMTinlistelse1790 MTmaybedotr1791 ifMTdoelse1792 xdefMTtrfontlistMTtrfontlistMTfont1793 fi1794 fi1795 1796 langpdftex-def|luatex-defrang1797 langpdftex-def|luatex-def|letterspacerangletMTtracking1798 langpdftex-def|luatex-defrang MTtracking1799 langletterspacerang relax

MTsettrcodes The tracking amount is determined by the optional argument to textls settingsfrom SetTracking or the global letterspace option in this order

Tracking wonrsquot work if the original fontrsquos fontdimen6 is zero in which casewe issue a warning (once for every font)

1800 langpdftex-def|luatex-def|letterspacerang1801 defMTsettrcodes1802 langpdftex-def|luatex-defrang1803 MTvinfoTracking font `MTfontrsquoonline1804 MTifdefinednTFMTfont-fake61805 expandafterifxcsnameMTfont-fake6endcsnameempty1806 MTwarningnl1807 Font `MTfontrsquo does not specify itsMessageBreak1808 backslashchar fontdimen 6 (width of an `emrsquo) ThereforeMessageBreak1809 nameuseMTabbrMTfeat will not work with this font1810 MTgletncMTfont-fake6relax1811 fi1812 1813 MTiflistexists1814 MTgettropt1815 relax1816 langpdftex-def|luatex-defrang1817 MTifdefinedcTFMTletterspacerelaxletMTletterspaceMTletterspace1818 ifnumMTletterspace=z

Zero tracking requires special treatment1819 MTsettrzero1820 else1821 langpdftex-def|luatex-defrang MTvinfo Tracking by numberMTletterspace

Letterspacing only works in PDF mode1822 MTwarntrackingDVI

MTlsfont The letterspaced font instances are saved in macros langfont nameranglangletterspacingamountrangls

In contrast to MTfont which may reflect the font characteristics more accur-ately (taking substitutions into account) fontname is guaranteed to correspondto an actual font identifier

IMPLEMENTATION Font setup 76

1823 xdefMTlsfontcsnameexpandafterstringfontname1824 numberMTletterspace lsendcsname1825 expandafterifxMTlsfontrelax1826 langdebugrangMTdinfonl1 new letterspacing instance

In case of nested letterspacing with different amounts we have to extract the basefont again

1827 MTgetlsbasefont

luaotfload provides the faux font feature kernfactor which we will use whendealing with non-legacy fonts as it is less problematic and faster than the pdfTEXprimitive letterspacefont

1828 langluatex-def|letterspacerang1829 MTifluaotffont1830 langluatex-defampdebugrangMTdinfonl1 luaotf font MessageBreak1831 langluatex-defampdebugrang expandafterfontnamefontname1832 ifnumMTletterspaceltzdefMTminus-elseletMTminusemptyfi1833 globalexpandafterfontMTlsfont=1834 expandafterMTexptwocexpandafterMTlsfontspecfont1835 expandafterfontnameexpandafterfontnamespace nil1836 1837 langluatex-def|letterspacerang1838 langluatex-defampdebugrangMTdinfonl1 legacy font1839 globalexpandafterletterspacefontMTlsfontfontnameMTletterspace1840 langluatex-def|letterspacerang

Scale interword spacing (not configurable in letterspace)1841 langpdftex-def|luatex-defrang1842 MTifdefinedcTFMTtrispace1843 lettempaMTtrispace1844 edeftempaMTletterspace1845 MTifdefinedcTFMTtrospace1846 edeftempatempaMTtrospace1847 edeftempatempa1848 expandafterMTtrsetspacetempa1849 langpdftex-def|luatex-defrang1850 langletterspacerang1851 spacing = ltletterspace amountgt1852 fontdimen2MTlsfont=dimexprnumexpr 1000+MTletterspacerelax sp1853 fontdimen2MTlsfont1000relax1854 langletterspacerang

Adjust outer kerning (microtype only)1855 langpdftex-def|luatex-defrang1856 MTifdefinedcTFMTtrokernlettempaMTtrokerndeftempa1857 expandafterMTtrsetokerntempa

Disable ligatures (not configurable in letterspace)1858 MTifdefinedcTMTtrligaturesMTtrnoligatures1859 langpdftex-def|luatex-defrang1860 langletterspacerang1861 no ligatures = f1862 tagcodeMTlsfont`f=mne1863 langletterspacerang

Adjust protrusion values now and maybe later (in MTprsplitval) (not forLuaTEX though where letterspacing does not interfere with protrusion)

1864 langluatex-def|letterspacerang MTifluaotffontrelax1865 langdebugrangMTdinfonl2 compensating for tracking (numberMTletterspace)1866 MTdofontlpcodeMTlsfonttempcnta=numexprMTletterspace2relax1867 rpcodeMTlsfonttempcnta=numexprMTletterspace2relax1868 letMTtheprcodeMTtheprcodetr1869 langluatex-def|letterspacerang 1870 fi

IMPLEMENTATION Font setup 77

Finally let the letterspaced font propagate With LuaTEX we also need to load1871 aftergroupMTsetlsfont1872 langpdftex-def|luatex-defrang letMTfontMTlsfont1873 langluatex-defrang MTifluaotffontMTfontrelax

MTsetcurrls

MTcurrls

We need to remember the current letterspacing amount (for lslig)1874 xdefMTsetcurrlsdefnoexpandMTcurrlsMTletterspace1875 aftergroupMTsetcurrls

Adjust surrounding spacing and kerningMTsetcurros We get the current outer spacing and adjust it then after the end of the current

outer group set the current outer spacing again and adjust1876 langpdftex-def|luatex-defrang1877 MTouterspace=csname MTouterspaceexpandafterstringfontnameendcsnamerelax1878 xdefMTsetcurrosMTouterspace=theMTouterspacerelax1879 MTtrouterl1880 langpdftex-def|luatex-defrang

If MTlsadjust is empty itrsquos the starred version of textls Use scaling to avoida lsquoDimension too largersquo

1881 ifxMTlsadjustempty1882 langletterspacerang textls outer kerning = textls outer kerning = 001883 MTouterkern=-dimexprMTletterspace sp fontdimen6fontname2000relax1884 MTlsouterk

Otherwise get the current outer kerning and adjust it for left and right side(microtype only)

1885 langpdftex-def|luatex-defrang1886 else1887 MTouterkern=expandafterexpandafterexpandafterfirstoftwo1888 csname MTouterkernexpandafterstringfontnameendcsnamerelax1889 ifdimMTouterkern=zelse MTlsouterk fi1890 MTouterkern=expandafterexpandafterexpandaftersecondoftwo1891 csname MTouterkernexpandafterstringfontnameendcsnamerelax1892 langpdftex-def|luatex-defrang1893 langletterspacerang1894 xdefMTsetcurrokMTouterkern=theMTouterkernrelax1895 MTafteraftergroup1896 MTsetcurrok1897 noexpandMTlsouterk1898 1899 langletterspacerang1900 fi1901 langpdftex-def|luatex-defrang

MTsetcurrok Carry the outer kerning amount to outside the next group then set outer spacing(which will set kerning if no space follows)

1902 xdefMTsetcurrokMTouterkern=theMTouterkernrelax

Stuff to be done after the letterspace group The letterspace package only adjuststhe kerning

1903 MTafteraftergroup1904 MTsetcurros1905 MTsetcurrok1906 noexpandMTtrouterr1907 1908 langpdftex-def|luatex-defrang1909 fi1910 langpdftex-def|luatex-defrang 1911

MTafteraftergroup This helper macro carries stuff outside of the current group to the end of the nextgroup but will then respect grouping which is crucial for nested letterspacing

IMPLEMENTATION Font setup 78

(Following an idea of Will Robertson)1912 defMTafteraftergroup11913 langletterspacerang MTmaybegobblewithtikz1914 MTifdefinednTFMTaftergroupnumbercurrentgrouplevelrelax1915 MTexpcsxdefMTaftergroupnumbercurrentgrouplevel1916 MTexpcsMTgletMTaftergroupnumbercurrentgrouplevelnoexpandundefined11917 expandafteraftergroupexpandafteraftergroupMTexpcsaftergroup1918 MTaftergroupnumbercurrentgrouplevel1919 1920 langletterspacerang 1921 1922 langpdftex-def|luatex-def|letterspacerang

MTlsfontspeccolon

MTlsfontspecfont

Add the kernfactor feature to a font loaded by fontspec (we might have to addthe colon ourselves)

1923 langluatex-def|letterspacerang1924 defMTlsfontspeccolon1234nilifx312else123fi1925 defMTlsfontspecfont1 2nil1926 MTlsfontspeccolon1relaxnil1927 kernfactor=MTminus ifnumMTletterspace=1000 1else 01928 ifnumMTminusMTletterspacelt100 0fi1929 ifnumMTminusMTletterspacelt10 0fi1930 numberMTminusMTletterspace fi1931 ifx2 at fsize ptelse2firelax1932 1933 langluatex-def|letterspacerang

MTgettropt Various settings (only for the microtype version)1934 langpdftex-def|luatex-defrang1935 defMTgettropt1936 MTsetlistname1937 letMTtrfactorm

MTtrunit Different unit (for letterspace andor (outer)spacing)1938 MTifdefinednTMTtrcMTtrcname unit1939 MTletcnMTtrunitMTtrcMTtrcname unit1940 ifdimMTtrunit=1em1941 letMTtrunitundefined1942 else1943 MTgetunitMTtrunit1944 fi1945 1946 MTifdefinednTMTtrcMTtrcname1947 MTletcnMTletterspaceMTtrcMTtrcname1948 MTifdefinedcTMTtrunit1949 lettempbMTletterspace1950 MTscaletoem1951 edefMTletterspacenumbertempcntb1952 1953

MTtrispace

MTtrospace

Adjust interword spacing1954 MTgettroptspacing ispace1955 MTgettroptouterspacingospace

MTtrokern Adjust outer kerning1956 MTgettroptouterkerningokern

MTtrligatures Which ligatures should we disable (empty means all undefined none)1957 MTgettroptnoligatures ligatures1958

MTgettropt

1959 defMTgettropt12

IMPLEMENTATION Font setup 79

1960 MTifdefinednTMTtrcMTtrcname 11961 MTletnnMTtr2MTtrcMTtrcname 11962 1963 langpdftex-def|luatex-defrang

MTsetlsfont Redefine fontname which will be called a second later (in selectfont)1964 langpdftex-def|luatex-def|letterspacerang1965 langplainrangMTrequireslatex21966 defMTsetlsfontMTexptwocletfontnameMTlsfont

lsstyle Disable the tests whether the font should be letterspaced then trigger the setupOnly 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 againSetting glbcurrsize globally to empty (our previous solution) could throw usinto an infinite loop (eg with the psnfss packages via everymathsize) sowe issue glbsettings instead However in certain situations we may still misssome math fonts so letrsquos try to also enforce it by emptying glbcurrsize fingerscrossed The overhead seems small

1967 DeclareRobustCommandlsstyle1968 notmathalphabetlsstyletextls1969 letglbcurrsizeempty1970 langpdftex-def|luatex-defrang MTmaybegobblewithtikzaftergroupglbsettings1971 langpdftex-def|luatex-defrang defMTfeattr1972 letMTtrackingMTsettrcodes1973 selectfont1974

Now the definitions for the letterspace package with plain TEX1975 langplainrang1976 1977 defMTsetlsfontMTlsfont1978 deflsstyle1979 begingroup1980 escapecharmne1981 xdeffontnamecsnameexpandafterstringthefontendcsname1982 MTsettrcodes1983 endgroup1984 1985 lettextlsundefined1986 letlsligundefined1987 1988 langplainrang

lslig For Fraktur fonts some ligatures shouldnrsquot be broken up This command willtemporarily select the base font and insert the correct kerning

1989 DeclareRobustCommandlslig[1]1990 MTifdefinedcTFMTcurrls1991 escapecharmne1992 MTgetlsbasefont1993 MTouterkern=dimexprMTcurrls sp fontdimen6fontname2000relax1994 kernMTouterkern1995 fontname 11996 kernMTouterkern1997 11998

MTlsbasefont

MTgetlsbasefont

pdfTEX cannot letterspace fonts that already are letterspaced Therefore we haveto save the base font in langfont namerangbase

The previous solution (checking the macrorsquos 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

IMPLEMENTATION Font setup 80

1999 defMTgetlsbasefont2000 xdefMTlsbasefontcsnameexpandafterstringfontname baseendcsname2001 expandafterifxMTlsbasefontrelax2002 MTexptwocMTgletMTlsbasefontfontname2003 else2004 langdebugrangMTdinfonl1 fixing base font2005 MTexptwocletfontnameMTlsbasefont2006 fi2007

MTsetlsbasefont

MTsettrzero

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

2008 defMTsetlsbasefontMTexptwocletfontnameMTlsbasefont2009 defMTsettrzero2010 langdebugrangMTdinfonl1 zero tracking2011 xdefMTlsbasefontcsnameexpandafterstringfontname baseendcsname2012 expandafterifxMTlsbasefontrelax else2013 langdebugrangMTdinfonl1 fixing base font2014 aftergroupMTsetlsbasefont2015 fi2016 2017 langpdftex-def|luatex-def|letterspacerang

MTtrnoligatures pdfTEX 1400ndash1403 disabled all ligatures in letterspaced fonts2018 langpdftex-def|luatex-defrang2019 langpdftex-defrangMTrequirespdftex72020 defMTtrnoligatures2021 ifxMTtrligaturesempty2022 MTnoligaturesMTlsfontundefined2023 else2024 MTnoligaturesMTlsfontMTtrligatures2025 fi2026 2027 langpdftex-defrang2028 2029 defMTtrnoligatures2030 MTwarningnl2031 Disabling selected ligatures is only possible sinceMessageBreak2032 pdftex 1404 Disabling all ligatures instead2033 MTgletMTtrnoligaturesrelax2034 2035 2036 langpdftex-defrang

MTouterspace A new skip for outer spacing2037 newskipMTouterspace

MTtrsetspace Adjust interword spacing (fontdimen234) for inner and outer space For innerspacing the font dimensions will be adjusted the settings for outer spacing will beremembered in a macro

2038 defMTtrsetspace1234562039 langdebugrangMTdinfonl2 orig space thefontdimen2MTlsfont2040 langdebugrang thefontdimen3MTlsfont thefontdimen4MTlsfont2041 langdebugrang MessageBreak (123) (456)2042 letMTtempempty2043 MTtrsetspace142empty2044 MTtrsetspace253plus2045 MTtrsetspace364minus2046 MTgletncMTouterspaceexpandafterstringfontnameMTtemp2047 langdebugrangMTdinfonl2 inner space thefontdimen2MTlsfont2048 langdebugrang thefontdimen3MTlsfont thefontdimen4MTlsfont2049 langdebugrangMTdinfonl2 outer space MTtemp2050

IMPLEMENTATION Font setup 81

MTtrsetspace If settings for outer spacing lang2rang donrsquot exist they will be inherited from the innerspacing settings lang1rang

2051 defMTtrsetspace12342052 MTifempty22053 MTifempty1relax2054 MTtrsetspace1310002055 fontdimen3MTlsfont=tempdima2056 2057 edefMTtempMTtemp4thefontdimen3MTlsfont2058 2059 MTtrsetspace2320002060 edefMTtempMTtemp4thetempdima2061 MTifempty1relax2062 MTtrsetspace1310002063 fontdimen3MTlsfont=tempdima2064 2065 2066

MTtrsetspace If the value is followed by an asterisk the fontdimen will be scaled by the respectiveamount otherwise the value denotes the desired dimension in the respective unit

2067 defMTtrsetspace1232068 MTtestast1nil2069 MTifdefinedcTFMTtrunit2070 edeftempb1MTscaletoem2071 tempcntb=1relax2072 tempdima=dimexprtempcntb spMTdimensix1000relax

For fontdimen2 we also have to subtract the kerning that letterspacing adds toeach side of the characters (only half if itrsquos for outer spacing)

2073 ifnum2=tw2074 advancetempdima -dimexprMTletterspace spMTdimensix3relax2075 fi2076 2077 MTifemptytempalettempaMTletterspacerelax2078 tempdima=dimexpr numexpr1000+tempa sp fontdimen2MTlsfont1000relax2079 2080 langdebugrangMTdinfonl3 font dimen 2 (1) thetempdima2081

MTtrouterl Recall the last skip (must really be an interword space not just a marker nor alsquohardrsquo space ie one that doesnrsquot contain stretch or shrink parts)

2082 defMTtrouterl2083 ifhmode2084 ifdimlastskipgt5sp2085 edefxthelastskip minus 0pt2086 setboxzhboxMTouterspace=x2087 ifdimwdzgtz2088 langdebugrangMTdinfo2[[[ adjusting pre space theMTouterspace2089 unskip hskipMTouterspacerelax

Disable left outer kerning2090 letMTlsouterkrelax2091 else

The ragged2e package sets spaceskip without glue2092 ifdimlastskip=2093 ifnumspacefactorlt20002094 spaceskip2095 else2096 ifdimxspaceskip=z2097 dimexprspaceskip+fontdimen7fontnamerelax2098 else2099 xspaceskip

IMPLEMENTATION Font setup 82

2100 fi2101 fi2102 langdebugrangMTdinfo2[[[ adjusting pre space (skip) theMTouterspace2103 unskip hskipMTouterspacerelax2104 letMTlsouterkrelax2105 fi2106 fi2107 fi2108 fi2109

MTtrouternext

MTtrouterr

microtype also adjusts spacing The following is borrowed from soul Irsquove added thecases for italic correction since tracking may also be triggered by text commands(eg textsc)

2110 defMTtrouterr2111 futureletMTtrouternextMTtrouterr2112

MTifouternext We avoid using ifx tests in case MTtrouternext is let to fi etc2113 defMTifouternext12114 ifxMTtrouternext1expandafterfirstoftwoelseexpandaftersecondoftwofi2115

MTtrouterr

2116 defMTtrouterr2117 defMTtemp

Donrsquot adjust in math mode There was a tricky bug when textls was the lastcommand in a mathchoice group

2118 ifmmode else

A similar bug occurred when adjustment would happen inside a discretionarygroup which we prevent here This only works with e-TEX (which we know isavailable)

2119 ifnumcurrentgrouptype=10 else2120 defMTtemp1ifhmodehskipMTouterspace2121 langdebugrangMTdinfo2]]] adjusting post space (1) theMTouterspace2122 fi2123 expandafterifcatexpandafternoexpandcsname MTtrouternextendcsnameegroup

2124 ifhmodeunkernfiegroup2125 MTsetcurrok MTsetcurros2126 defMTtempafterassignmentMTtrouterrletMTtemp=2127 else

If the next token is maybeic (from an enclosing text command) we gobble itread the next one feed it to maybeic (via MTtroutericr) and then callourselves again

2128 MTifouternextmaybeic2129 MTsetcurrok MTsetcurros2130 defMTtempafterassignmentMTtroutericrletMTtemp=2131

If the next token is checkicr (from an inner text command) we insert ourselvesjust before it This will then call maybeic again the next round (which howeverwill always insert an italic correction since it doesnrsquot read beyond our group)

2132 MTifouternextcheckicr2133 defMTtempaftergroupMTtrouterrcheckicrletMTtemp=2134 2135 MTifouternextsptoken2136 defMTtemp ifhmodehskipMTouterspace2137 langdebugrangMTdinfo2]]] adjusting post space (2) theMTouterspace

IMPLEMENTATION Font setup 83

2138 fi2139 2140 MTifouternext~2141 defMTtemp~nobreakhskipMTouterspace2142 langdebugrangMTdinfo2]]] adjusting post space (3) theMTouterspace2143 2144 2145 MTifouternext relax2146 MTifouternextspacerelax2147 MTifouternextxobeysprelax

xspace requires special treatment2148 MTifouternextxspace2149 defMTtempxspaceMTxspace2150

If therersquos no outer spacing there may be outer kerning2151 defMTtempifdimMTouterkern=zelseMTlsouterk2152 langdebugrangMTdinfo2--- adjusting post kern theMTouterkern2153 fi2154 MTletncMTtrouternextrelax2155 fi2156 fifi2157 MTtemp2158

MTtroutericr

MTtroutericr

Helper macros for the italic correction mess2159 defMTtroutericrafterassignmentMTtroutericrMTtrouterr2160 defMTtroutericr2161 letlettoken= MTtrouternext2162 maybeic2163

MTxspace

MTxspace

If the group is followed by xspace we first feed xspace with the next token thencheck whether it has inserted a space lettoken might be something evil so itshould be encapsulated here

2164 defMTxspacefutureletlettokenMTxspace2165 defMTxspacexspacefirsttruexspace2166 ifdimlastskipgt5sp2167 unskip hskipMTouterspace2168 else2169 ifdimMTouterkern=zelseMTlsouterk fi2170 fi2171

For older pdfTEX versions and LuaTEX throw an error2172 2173 DeclareRobustCommandlsstyle2174 MTerrorLetterspacing only works with MTengine tex version2175 langpdftex-defrang 1402176 langluatex-defrang 0622177 MessageBreak or newer2178 Upgrade MTengine tex or try the `soulrsquo package instead2179 MTgletlsstylerelax2180 2181

And for XETEX too2182 langpdftex-def|luatex-defrang2183 langxetex-defrang2184 DeclareRobustCommandlsstyle2185 MTerrorLetterspacing currently doesnrsquot work with xetex2186 Run pdftex or luatex or use the `soulrsquo package instead2187 MTgletlsstylerelax2188

IMPLEMENTATION Font setup 84

2189 langxetex-defrangtextls

MTlsadjust

This command may be used like the other text commands The starred versionremoves kerning on the sides The optional argument changes the letterspacingfactor

2190 langpackage|letterspacerang2191 DeclareRobustCommandtextls2192 ifstarletMTlsadjustMTlsadjustemptyMTtextls2193 letMTlsadjustMTlsadjustrelaxMTtextls2194

MTtextls

MTletterspace

This is now almost LATEXrsquos DeclareTextFontCommand with the difference that weadjust the outer spacing and kerning also for lsstyle while LATEXrsquos text switchesdonrsquot bother about italic correction

2195 newcommandMTtextls[2][]2196 ifmmode2197 nfsstextMTlssetls1lsstyle22198 else2199 hmodebgroup2200 MTlssetls12201 lsstyle 22202 expandafter2203 egroup2204 fi2205

MTlsadjust

MTlsadjustempty

MTlsadjustrelax

MTlssetls

Set current letterspacing amount and outer kerning This has to be done inside thesame group as the letterspacing command

2206 defMTlsadjustemptyletMTlsadjustempty2207 defMTlsadjustrelaxletMTlsadjustrelax2208 defMTlssetls12209 MTifempty12210 letMTletterspaceundefined2211 KVspdefMTletterspace12212 edefMTletterspacenumberMTletterspace2213 MTlstoolargeMTletterspace2214 MTlsadjust2215

MTlstoolarge Test whether letterspacing amount is too large2216 defMTlstoolarge12217 ifnum1gtMTtrmax2218 MTwarningMaximum for option `letterspacersquo is numberMTtrmax2219 let1MTtrmax2220 else2221 ifnum1ltMTtrmin2222 MTwarningMinimum for option `letterspacersquo is numberMTtrmin2223 let1MTtrmin2224 fi2225 fi2226

MTouterkern

MTtrsetokern

This dimen is used for the starred version of textls for lslig and for adjustedouter kerning

2227 newdimenMTouterkern2228 langpackage|letterspacerang2229 langpdftex-def|luatex-defrang2230 defMTtrsetokern122231 letMTtempempty2232 MTifempty1MTtrsetokernMTtrsetokern12233 MTifempty2MTtrsetokernMTtrsetokern22234 MTgletncMTouterkernexpandafterstringfontnameMTtemp2235 langdebugrangMTdinfonl2 outer kerning (12)

IMPLEMENTATION Font setup 85

2236 langdebugrang = nameuseMTouterkernexpandafterstringfontname2237

MTtrsetokern

2238 defMTtrsetokern12239 MTtestast1nil2240 MTifdefinedcTFMTtrunit2241 edeftempb1MTscaletoem2242 tempcntb=1relax2243 tempdima=dimexpr tempcntb sp MTdimensix1000relax2244 2245 MTifemptytempalettempamrelax2246 tempdima=dimexpr numexprtempaMTletterspace1000relax sp2247 fontdimen6MTlsfont2000relax2248 2249 advancetempdima -dimexpr MTletterspace sp2250 fontdimen6MTlsfont2000relax2251 edefMTtempMTtempthetempdima2252 2253 langpdftex-def|luatex-defrang

MTlsouterk Adjust outer kerning We additionally add a marker (kern3spkern-3sp) for casesof nested letterspacing without anything actually printed

2254 langpdftex-def|luatex-def|letterspacerang2255 defMTlsouterk2256 ifhmode2257 ifdimlastkern=-3sp unkern2258 ifdimlastkern=3sp kern-3sp2259 expandafterexpandafterexpandaftergobble2260 else unkern2261 expandafterexpandafterexpandafterfirstofone2262 fi2263 else2264 expandafterfirstofone2265 fi2266 kernMTouterkernkern3spkern-3sprelax2267 fi2268 2269 langpdftex-def|luatex-def|letterspacerang

1426 Disabling ligatures

MTnoligatures The possibility to disable ligatures is a new features of pdfTEX 130 and also workswith LuaTEX

2270 langpdftex-def|luatex-defrang2271 langpdftex-defrangMTrequirespdftex52272 defMTnoligatures2273 MTdotrue2274 lettempaMTnlsetname2275 MTmapclistnfontencodingfamilyseriesshapesize2276 MTifdefinednTFMTchecklist12277 csname MTchecklist1endcsname2278 MTchecklist12279 nl2280 2281 ifMTdo2282 MTnoligaturesMTfontMTnlligatures2283 fi2284

MTnoligatures This is also used by MTsettrcodes2285 langluatex-defrangMTrequiresluatex4letpdfnoligaturesignoreligaturesinfontrelax2286 defMTnoligatures12

IMPLEMENTATION Font setup 86

2287 MTifdefinedcTF2

Early MiKTEX versions (before 252579) didnrsquot know tagcode2288 MTifdefinedcTFtagcode

No lsquoinputencrsquo key2289 letMTwarnmaybeinputencempty2290 defMTcurrlistnamebackslashchar DisableLigatures2291 MTmapclistc22292 KVspdeftempa1MTgetslot2293 ifnumMTchargtmne2294 tagcode1MTchar=mne

With LuaTEX we additionally register the ligatures that should be inhibited in atable (used by the luaotfload function keepligature)

2295 langluatex-defrang MTifluaotffont2296 langluatex-defrang MTluamicrotypenoligatures([[1]][[MTchar]])relax2297 fi2298 2299 MTvinfo Disabling ligatures for characters 22300 2301 pdfnoligatures12302 MTwarningCannot disable selected ligatures (pdftex doesnrsquotMessageBreak2303 know backslashchar tagcode) Disabling all ligatures ofMessageBreak2304 the font instead2305 2306 2307 pdfnoligatures12308 langluatex-defrang MTifluaotffont2309 langluatex-defrang MTluamicrotypenoligatures([[1]]_all_)relax2310 MTvinfo Disabling all ligatures2311 2312 2313 langpdftex-defrangrelax2314 langpdftex-def|luatex-defrang

For each potential ligature luaotfload will call the keepligature function whichexpects the first node of the ligature to check whether they should be kept orinhibited Herersquos our concoction of this function The table microtypeligs will bepopulated in MTnoligatures

2315 langluafilerang2316 microtypeligs = microtypeligs or 23172318 local function noligatures(fontcsliga)2319 local fontcs = match(fontcs([^ ]+))2320 microtypeligs[fontcs] = microtypeligs[fontcs] or 2321 tableinsert(microtypeligs[fontcs]liga)2322 end2323 microtypenoligatures = noligatures23242325 local function keepligature(c)2326 local nodedirect = nodedirect2327 local getfield = nodedirectgetfield2328 local getfont = nodedirectgetfont2329 local fch2330 if type(c) == userdata then -- in older luaotfload versions c was a node2331 f = cfont2332 ch = ccomponentschar2333 else -- since 26 c is a (direct node) number2334 f = getfont(c)2335 ch = getfield(getfield(ccomponents)char)2336 end2337 -- if ch then -- should always be true2338 local ligs = microtypeligs[match(texfontidentifier(f)([^ ]+))]

IMPLEMENTATION Font setup 87

2339 if ligs then2340 for _lig in pairs(ligs) do2341 if lig == _all_ or tonumber(lig) == ch then2342 return false2343 end2344 end2345 end2346 return true2347 -- end2348 end23492350 if luaotfload and luaotfloadletterspace then2351 if luaotfloadletterspacekeepligature then2352 microtypeinfo(overwriting function `keepligaturersquo)2353 end2354 luaotfloadletterspacekeepligature = keepligature2355 end23562357 langluafilerang

1427 Loading the configuration

MTloadlist Recurse through the lists to be loaded2358 langpackagerang2359 defMTloadlist12360 edeftempa12361 MTletcntempbMTMTfeat ctempa load2362 MTifstreqtempatempb2363 MTerrornameuseMTabbrMTfeat list `temparsquo cannot load itself2364 2365 ifxtempbrelax else2366 MTifdefinednTFMTMTfeat ctempb2367 MTvinfo First loading nameuseMTabbrMTfeat list `tempbrsquo2368 begingroup2369 MTloadlisttempb2370 endgroup2371 edefMTcurrlistnamenameuseMTabbrMTfeat list2372 noexpandMessageBreak`tempbrsquo2373 MTletcntempcMTMTfeat ctempb2374 expandafterMTsetcodestempcrelax2375 2376 MTerrornameuseMTabbrMTfeat list `tempbrsquo undefinedMessageBreak2377 Cannot load it from list `temparsquo2378 2379 fi2380 2381

MTfindfile Micro-typographic settings may be written into a file mt-langfont familyrangcfgMTfilelist We must also record whether wersquove already loaded the file

2382 letMTfilelistempty2383 defMTfindfile1

Check for existence of the file only once2384 MTinclist1MTfilelist2385 ifMTinlist else

Donrsquot forget that because reading the files takes place inside a group all commandsthat may be used there have to be defined globally

2386 MTbegincatcodes2387 letMTbegincatcodesrelax2388 letMTendcatcodesrelax2389 InputIfFileExistsmt-1cfg

IMPLEMENTATION Font setup 88

2390 edefMTcurrfilemt-1cfg2391 MTvinfo Loading configuration file MTcurrfile2392 MTxaddMTfilelist12393 2394 MTgetbasefamily1emptyemptyemptynil2395 MTexponenMTinclisttempaMTfilelist2396 ifMTinlist2397 MTxaddMTfilelist12398 else2399 InputIfFileExistsmt-tempacfg2400 edefMTcurrfilemt-tempacfg2401 MTvinfo Loading configuration file MTcurrfile2402 MTxaddMTfilelisttempa12403 2404 MTvinfo No configuration file mt-1cfg2405 MTxaddMTfilelist12406 2407 fi2408 2409 endgroup2410 fi2411

MTcfgcatcodes We have to make sure that all characters have the correct category code Especiallynew lines and spaces should be ignored since files might be loaded in the middleof the document This is basically nfsscatcodes (from the LATEX kernel) Irsquoveadded amp (in tabulars) (french) $ _ ~ and = (Turkish babel)

OK now all printable characters up to 127 are lsquootherrsquo We hope that letters arealways letters and numbers other (listings makes them active see section 1415)

We leave ^ at catcode 7 so that stuff like lsquo^^ffrsquo remains possible2412 defMTcfgcatcodes2413 makeatletter2414 catcode`^72415 catcode` 92416 catcode`^^I92417 catcode`^^M92418 catcode`z2419 catcode`ne2420 catcode`tw2421 catcode`62422 catcode`142423 MTmaptlistn2424 $amprsquo()+-lt=gt[]_`|~2425 makeother2426

MTbegincatcodes This will be used before reading the files as well as in all configuration commandsso that catcodes are also harmless when these commands are used outside theconfiguration files

2427 defMTbegincatcodes2428 begingroup2429 MTcfgcatcodes2430

MTendcatcodes End group if outside configuration file (otherwise relax)2431 letMTendcatcodesendgroup

MTgetbasefamily The family name might have a suffix eg for expert set (x) old style numbers (j)swash capitals (w) etc We mustnrsquot simply remove the last letter as this would makefor instance cms out of cmss and cmsy (OK cmex will still become cme )

We only work on the font name if it is longer than three characters

IMPLEMENTATION Font setup 89

Table 4

Order for matching fontattributes

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Encoding bull bull bull bull bull bull bull bull bull bull bull bull bull bull bull bullFamily bull bull bull bull bull bull bull bull - - - - - - - -Series bull bull bull bull - - - - bull bull bull bull - - - -Shape bull bull - - bull bull - - bull bull - - bull bull - -Size bull - bull - bull - bull - bull - bull - bull - bull -

2432 defMTgetbasefamily1234nil2433 ifxempty42434 deftempa1232435 else2436 lettempaempty2437 edeftempb12342438 expandafterMTgetbasefamilytempbnil2439 fi2440

MTgetbasefamily This will only remove one suffix (the longest match) so that combinations of suffixeswould have be to added manually (eg DeclareMicrotypeVariantsaw) Butotherwise something like lsquopplxrsquo would be truncated to lsquoprsquo

2441 defMTgetbasefamily12nil2442 edeftempatempa12443 ifx2expandaftergobbleelseexpandafterfirstofonefi2444 MTintlist2MTvariants2445 ifMTinlistelseMTgetbasefamily2nilfi2446

MTlistname

MTgetlistname

MTgetlistname

Try all combinations of font family series shape and size to get a list for the currentfont

2447 defMTgetlistname12448 langdebugrangMTdinfonl1trying to find nameuseMTabbr1 list for font `MTfontrsquo2449 letMTlistnameundefined2450 deftempb12451 MTmaptlistcMTtryorderMTgetlistname2452 2453 defMTgetlistname12454 expandafterMTnextlistname12455 ifxMTlistnameundefined else2456 expandafterMTtlistbreak2457 fi2458

MTtryorder Beginning with version 17 we always check for the font size Since the matchingorder has become more logical now it can be described in words so that we donrsquotneed table 4 in the documentation part any longer and can cast it off here

2459 defMTtryorder2460 111111101101110010111010100110002461 011101100101010000110010000100002462

MTnextlistname The current context is added to the font attributes That is the context must match2463 defMTnextlistname12342464 ifnum1=zMTnofamilytruefi2465 edeftempaMTencoding2466 ifnum1=ne MTfamily fi2467 ifnum2=ne MTseries fi2468 ifnum3=ne MTshape fi2469 ifnum4=ne fi2470 MTcontext

IMPLEMENTATION Font setup 90

2471 langdebugrangMTdinfonl1trying tempa2472 MTifdefinednTFMTtempb tempa2473 MTnextlistname42474

Also try with an alias family2475 ifnum1=ne2476 ifxMTfamilyaliasempty else2477 edeftempaMTencoding2478 MTfamilyalias2479 ifnum2=ne MTseriesfi2480 ifnum3=ne MTshapefi2481 ifnum4=ne fi2482 MTcontext2483 langdebugrangMTdinfonl1(alias) tempa2484 MTifdefinednTMTtempb tempa2485 MTnextlistname42486 2487 fi2488 fi2489 2490

MTnextlistname If size is to be evaluated do that otherwise use the current list2491 defMTnextlistname12492 ifnum1=ne2493 MTexpcsMTinrlistMTtempb tempa sizes2494 ifMTinlist2495 letMTlistnameMTsizename2496 fi2497 else2498 MTletcnMTlistnameMTtempb tempa2499 fi2500

MTiflistexists

MTcontext 2501 defMTiflistexists2502 MTletcnMTcontextMTMTfeat context2503 MTifstreqMTcontextletMTcontextemptyrelax2504 MTgetlistnameMTfeat c2505 MTifdefinedcTFMTlistname2506 MTedefnMTMTfeat cnameMTlistname2507 ifMTnonselected2508 MTvinfo Applying non-selected expansion (list `MTlistnamersquo)2509 else2510 MTvinfo Loading nameuseMTabbrMTfeat list `MTlistnamersquo2511 fi2512 firstoftwo2513

Since the name cannot be empty this is a sound proof that no matching listexists

2514 MTletncMTMTfeat cnameempty

Donrsquot warn if selected=false2515 ifMTnonselected2516 MTvinfo Applying non-selected expansion (no list)2517 else

Tracking doesnrsquot require a list either2518 MTifstreqMTfeattrrelax2519 MTwarningI cannot find a nameuseMTabbrMTfeat list2520 for fontMessageBreak`MTfontrsquo2521 ifxMTcontextemptyelsespace(context `MTcontextrsquo)fi2522 Switching offMessageBreaknameuseMTabbrMTfeat for this font

IMPLEMENTATION Font setup 91

2523 2524 fi2525 secondoftwo2526 2527

MTgetinhlist

MTcontext

The inheritance lists are global (no context)2528 defMTgetinhlist2529 letMTcontextempty

2530 MTgetlistnameMTfeat inh2531 MTifdefinedcTFMTlistname2532 MTedefnMTMTfeat inhnameMTlistname2533 langdebugrangMTdinfonl1 Using nameuseMTabbrMTfeat inheritance list2534 langdebugrang `MTlistnamersquo2535 MTletcntempcMTMTfeat inhMTlistname

If the list is empty it has already been parsed2536 ifxtempcempty else2537 langdebugrangMTdinfonl1parsing inheritance list

The group is only required in case an input encoding is given2538 begingroup2539 edefMTcurrlistnameinheritance listnoexpandMessageBreak`MTlistnamersquo2540 MTsetinputencinh2541 expandafterMTinhdotempcrelax2542 MTgletncMTMTfeat inhMTlistnameempty2543 endgroup2544 fi2545 2546 MTletncMTMTfeat inhnameundefined2547 2548

1428 Translating characters into slots

Get the slot number of the character in the current encodingMTgetslot There are lots of possibilities how a character may be specified in the configuration

files which makes translating them into slot numbers quite expensive Also wewant to have this as robust as possible so that the user does not have to solve asphinxrsquos riddle if anything goes wrong

MTchar

MTchar

The character is in tempa we want its slot number in MTchar2549 defMTgetslot2550 escapechar`2551 letMTcharmne2552 MTnoresttrue

Save unexpanded string in case we need to issue a warning message2553 MTtoks=expandaftertempa

It might be an active character ie an 8-bit character defined by inputenc If sowe will expand it here to its LICR form

2554 MTexptwocMTisactivestringtempanil

Now letrsquos walk through (hopefully) all possible cases

bull Itrsquos a letter a character or a number

2555 expandafterMTislettertemparelaxrelax2556 ifnumMTchar lt z

IMPLEMENTATION Font setup 92

bull OK so it must be a macro We do not allow random commands but only thosedefined in LATEXrsquos idiosyncratic font encoding scheme

If langencodingranglangcommandrang (thatrsquos one command) is defined we try to extract theslot number

We must be cautious not to stumble over accented characters consisting of twocommands like lsquoi or UCYRI hence string wouldnrsquot be safe enough

2557 MTifdefinednTFMTencodingMTdetokenizectempa2558 MTissymbol

bull Now wersquoll catch the rest which hopefully is an accented character (eg a)

2559 expandafterMTiscompositetemparelaxrelax2560 ifnumMTchar lt z

bull It could also be a chardefed command (eg the percent character) This seemsthe least likely case so itrsquos last

2561 expandafterMTexptwocexpandafterMTischarexpandafter2562 meaningexpandaftertempaMTcharstringrelaxrelaxrelax2563 fi2564 fi

2565 letMTcharMTchar2566 MTgetslot2567 escapecharmne2568 2569 langpackagerang

MTgetslot

2570 langpdftex-def|luatex-def|xetex-defrang2571 defMTgetslot

If itrsquos a legacy (ie TFM) font proceed as usual2572 langxetex-defrang ifnumXeTeXfonttypeMTfont=z2573 ifnumMTchar gt mne

In LuaTEX it may also be a glyph name prefixed with lsquorsquo2574 langluatex-defrang2575 ifnumMTchar=47relax2576 ifMTnorest else2577 tempcnta=MTlua2578 local glyph = microtypename_to_slot([[expandaftergobbletempa]]true)2579 if glyph then texwrite(glyph)2580 else texwrite(-1)2581 end2582 relax2583 ifnumtempcntaltz2584 MTwarnunknown2585 letMTcharmne2586 else2587 edefMTcharthetempcnta2588 langdebugrangMTdinfonl3gt `theMTtoksrsquo is a glyph name (thetempcnta)2589 fi2590 fi2591 else2592 langluatex-defrang

If the user has specified something like lsquofirsquo or wanted to define a number butforgot to use three digits wersquoll have something left of the string In this case weissue a warning and forget the complete string

2593 ifMTnorest else

IMPLEMENTATION Font setup 93

2594 MTwarnrest2595 langpdftex-def|luatex-defrang letMTcharmne2596 langxetex-defrang letMTcharempty2597 fi2598 langluatex-defrang fi2599 else2600 MTwarnunknown2601 langxetex-defrang letMTcharempty2602 fi2603 langxetex-defrang2604 else

There are more possibilities for XETEX It may also be a glyph name (prefixedwith lsquorsquo) We indicate this to MTgetcharwd by reversing the sign of MTchar

2605 ifnumMTchar=47relax2606 ifMTnorest edefMTcharU472607 else2608 tempcnta=XeTeXglyphindexexpandaftergobbletemparelax2609 ifnumtempcnta=z2610 MTwarnunknown2611 letMTcharempty2612 else2613 edefMTchartempaspace2614 edefMTchar-thetempcnta2615 langdebugrangMTdinfonl3gt `theMTtoksrsquo is a glyph name (thetempcnta)2616 fi2617 fi2618 else2619 ifnumMTchar gt mne2620 ifMTnorest

Or itrsquos a Unicode number which we mustnrsquot translate into a glyph number sincethe latter is font-specific

2621 tempcnta=XeTeXcharglyphMTcharrelax2622 ifnumtempcnta=z2623 MTinfomissingchar2624 letMTcharempty2625 else2626 langdebugrangMTdinfonl3gt (glyph number thetempcnta2627 langdebugrang glyph name XeTeXglyphnameMTfonttempcnta)2628 edefMTcharUMTchar2629 fi2630 else2631 MTwarnrest2632 letMTcharempty2633 fi2634 else2635 MTwarnunknown2636 letMTcharempty2637 fi2638 fi2639 fi2640 langxetex-defrang2641 2642 langpdftex-def|luatex-def|xetex-defrang

This is the lua function to translate glyph name into slot number Beginning withv22 luaotfload provides this function in an API which we use if available but(for now at least) keep the old code for backward compatibility

2643 langluafilerang2644 if luaotfload and luaotfloadaux and luaotfloadauxslot_of_name then2645 local slot_of_name = luaotfloadauxslot_of_name2646 microtypename_to_slot = function(name unsafe)2647 return slot_of_name(fontcurrent() name unsafe)

IMPLEMENTATION Font setup 94

2648 end2649 else2650 -- we dig into internal structure (should be avoided)2651 local function name_to_slot(name unsafe)2652 if fonts then2653 local unicodes2654 if fontsids then -- legacy luaotfload2655 local tfmdata = fontsids[fontcurrent()]2656 if not tfmdata then return end2657 unicodes = tfmdatasharedotfdataluatexunicodes2658 else -- new location2659 local tfmdata = fontshashesidentifiers[fontcurrent()]2660 if not tfmdata then return end2661 unicodes = tfmdataresourcesunicodes2662 end2663 local unicode = unicodes[name]2664 if unicode then -- does the rsquoorrsquo branch actually exist2665 return type(unicode) == number and unicode or unicode[1]2666 end2667 end2668 end2669 microtypename_to_slot = name_to_slot2670 end26712672 langluafilerang

MTisletter Input is a letter a character or a numberMTmaxchar

MTmaxslot

Warning if resulting character or slot number is too large2673 langpdftex-def|luatex-def|xetex-defrang2674 defMTmaxchar2675 langpdftex-defrang 127 2676 langluatex-def|xetex-defrang 1114111 2677 defMTmaxslot2678 langpdftex-defrang 255 2679 langluatex-def|xetex-defrang 1114111 2680 langpdftex-def|luatex-def|xetex-defrang

ifMTnorest Test whether all of the string has been used up2681 langpackagerang2682 newififMTnorest

2683 defMTisletter12relax2684 ifcat anoexpand1relax2685 edefMTcharnumber`12686 ifx22687 langdebugrangMTdinfonl3gt `theMTtoksrsquo is a letter (MTchar)2688 else2689 MTnorestfalse2690 fi2691 else2692 ifcat noexpand1relax2693 edefMTcharnumber`12694 langdebugrangMTdinfonl3gt `theMTtoksrsquo is a character (MTchar)2695 ifx22696 ifnumMTchar gt MTmaxchar MTwarnascii fi2697 else2698 MTnorestfalse2699 expandafterMTisnumber12relaxrelax2700 fi2701 fi2702 fi2703

MTisnumber Numbers may be specified as a three-digit decimal number (029) as a hexadecimalnumber (prefixed with 1D) or as a octal number (prefixed with rsquo rsquo35) They

IMPLEMENTATION Font setup 95

must consist of at least three characters (including the prefix) that is F is notpermitted

2704 defMTisnumber123relax2705 ifxrelax3relax else2706 ifxrelax2relax else2707 MTnoresttrue2708 if1relax2709 defxuppercaseedefMTcharnumber123x2710 langdebugrangMTdinfonl3gt a hexadecimal number MTchar2711 else2712 if1rsquorelax2713 defMTcharnumber1232714 langdebugrangMTdinfonl3gt an octal number MTchar2715 else2716 MTifint1232717 defMTcharnumber1232718 langdebugrangMTdinfonl3gt a decimal number MTchar2719 MTnorestfalse2720 fi2721 fi2722 ifnumMTchar gt MTmaxslot2723 MTwarnnumbertoolargenoexpand1noexpand2noexpand32724 letMTcharmne2725 fi2726 fi2727 fi2728

MTisactive Expand an active character (This was completely broken in v17 and only workedby chance before) We setdisplayprotect to translate eg Auml into A that isto whatever it is defined in the inputenc encoding file

Unfortunately the (older) inputenc definitions prefer the protectedgenericvariants (eg copyright instead of textcopyright) which our parser wonrsquotbe able to understand (Irsquom fed up now so you have to complain if you reallyreally want to be able to write lsquocopyrsquo instead of textcopyright thus rendering yourconfiguration files unportable)

Unicode characters (inputencutf8utf8x) are also supported2729 defMTisactive12nil2730 ifnumcatcode`1 = active2731 begingroup2732 setdisplayprotect2733 letIeCfirstofone2734 letinpencundefinedMTundefinedchar

Unicode handling has changed again with LATEX 201910012735 letUTFtwooctetsnoexpandempty2736 letUTFthreeoctetsnoexpandempty2737 letUTFfouroctetsnoexpandempty

We refrain from checking whether there is a sufficient number of octets2738 defUTFviiidefined1ifx 1relax2739 MTundefinedcharutf8elseexpandafter 1fi

For ucs (utf8x) Letrsquos call it experimental 2740 MTifdefinedcTPrerenderUnicode2741 PrerenderUnicodetempaletunicodecharfilterfirstofone

The expandafter hocus-pocus should please newunicodechar2742 edefxendgroup2743 defnoexpandtempaexpandafterexpandafterexpandafteremptytempa

Append what we think the translation is to the token register we use for the log

IMPLEMENTATION Font setup 96

2744 MTtoks=theMTtoksspace(=2745 expandafterexpandafterexpandafteremptytempa)2746 2747 x2748 fi2749

MTundefinedchar For characters not defined in the current input encoding2750 defMTundefinedchar1undefined in input encoding ``1rsquorsquo

MTissymbol The symbol commands might expand to funny stuff depending on context Insteadof simply expanding langcommandrang we construct the command langencodingranglangcommandrangand see whether its meaning is charlanghex numberrang which is the case for everythingthat has been defined with DeclareTextSymbol in the encoding definition files

2751 defMTissymbol2752 expandafterdefexpandafterMTcharexpandafter2753 csnameMTencodingMTdetokenizectempaendcsname

Since recently some glyphs are defined optionally in LATEX by checking if the glyphactually exists in the font (eg textasteriskcentered)

2754 expandafterexpandafterexpandafter2755 MTisoptcharMTchariffontcharcharelsefirelax2756 expandafterMTexptwocexpandafterMTischarexpandafter2757 meaningexpandafterMTcharMTcharstringrelaxrelaxrelax2758 ifnumMTchar lt z

In TU encoding some commands (currently textquotesingle textasciigraveand textquotedbl) are defined by means of the auxiliary macro removetligwhich we take care of here

2759 expandafterexpandafterexpandafterMTistligMTcharrelaxrelax2760 ifnumMTchar lt z

Finally if it hasnrsquot been defined by DeclareTextSymbol it could be a letter (egi when using frenchpro)

2761 expandafterexpandafterexpandafterMTisletterMTcharrelaxrelax2762 fi2763 fi2764

MTisoptchar This seems adventurous but wersquore only redefining the text command within thescope of our setup

2765 defMTisoptchar1iffontchar2char3else4firelax2766 ifx12767 iffontchar22768 expandafterchardef2769 csnameMTencodingMTdetokenizectempaendcsname=3relax2770 fi2771 fi2772

MTischar

MTcharstring

A helper macro that inspects the meaning of its argument2773 begingroup2774 catcode`=z

2775 MTmaptlistnCHARLEXmakeother2776 lowercase2777 defxendgroup2778 defMTcharstringCHAR2779 defMTischar1CHAR234relax2780 ifxrelax4relax2781 ifMTxunicode2782 expandafterMTischarxMTstripprefix1gtrelaxCHAR 2783 relaxrelaxrelaxrelaxrelax

IMPLEMENTATION Font setup 97

2784 fi2785 else2786 ifxrelax1relax2787 if3relax2788 edefMTcharnumber22789 MTifstreqMTcharstring34relaxMTnorestfalse2790 else2791 edefMTcharnumber232792 MTifstreqMTcharstring4relax2793 MTisxchar23|4CHARrelax2794 fi2795 langdebugrang MTdinfonl3gt `theMTtoksrsquo is a char (MTchar)2796 fi2797 fi2798

MTisxchar With fontspecrsquos TU encoding glyph numbers may be up to four digits2799 defMTisxchar1|2CHAR34relax2800 MTifstreqMTcharstring342801 edefMTcharnumber12MTnorestfalse2802

MTcharxstring

MTstripprefix

MTischarx

For xunicode which doesnrsquot countdef but rather defs the chars2803 defMTcharxstringCHAR 2804 defMTstripprefix1gt2relax22805 defMTischarx1CHAR 23456relax2806 ifxrelax1relax2807 ifxrelax6relaxelse2808 edefMTcharnumber23452809 MTifstreqRELAX gtCHAR 6relaxMTnorestfalse2810 langdebugrang MTdinfonl3gt `theMTtoksrsquo is a xunicode char (MTchar)2811 fi2812 fi2813 2814 2815 2816 x

MTistlig This might have to change again with the next LATEX release or so I feared butit still seems to be fine

2817 defMTistlig12relax2818 ifxremovetlig12819 langdebugrang MTdinfonl3gt `theMTtoksrsquo (removing removetlig)2820 MTremovetlig2821 fi2822

MTremovetlig We remove the removetlig command and only pass on the number2823 defMTremovetlig2824 expandafterMTexptwocexpandafterMTisnumber2825 expandaftersecondoftwoMTcharrelaxrelax2826

MTiscomposite Here we are dealing with accented characters specified as two tokens2827 defMTiscomposite12relax2828 ifx2else

Again we construct a control sequence this time of the form langencodingranglangaccentrang-langcharacterrang eg T1-a which we then expand once to see if it is aletter (if it has been defined by DeclareTextComposite) This should be robustfinally especially since we also detokenize the input instead of only stringifyingit Thus we will die gracefully even on wrong Unicode input without utf8

2829 expandafterdefexpandafterMTcharexpandaftercsnameexpandafter

IMPLEMENTATION Font setup 98

2830 stringcsnameMTencodingendcsname2831 MTdetokenizen1-MTdetokenizen2endcsname

In 2017 LATEX introduced a new way of declaring accented Unicode commands(DeclareUnicodeComposite) which we take care of here (UnicodeEncodingNamehas been introduced at the same time)

2832 ifxUnicodeEncodingNameundefinedelse2833 expandafterexpandafterexpandafter2834 MTisunicompMTchariffontcharelsefirelax2835 fi2836 expandafterexpandafterexpandafterMTisletterMTcharrelaxrelax

Again xunicode2837 ifnumMTchar lt z2838 ifMTxunicode2839 edefMTcharMTexptwocMTstripprefixmeaningMTchargtrelax2840 expandafterMTexptwocexpandafterMTischarxexpandafter2841 MTcharMTcharxstringrelaxrelaxrelaxrelaxrelax2842 fi2843 fi2844 fi2845

MTisunicomp Helper for DeclareUnicodeComposite2846 defMTisunicomp1iffontchar2else3firelax2847 ifx1edefMTchariffontchar2fifi2848

[What about math Well for a moment the following looked like a solution withmtismathchar defined accordingly analogous to MTischar above to pick upthe last two tokens (the meaning of a mathchardefrsquoed command expands to itshexadecimal notation)

defMTismathchar1 ifrelaxnoexpand1 its a macro letx1 else its a character mathchardefx=mathcode`1relax fi expandafterMTexptwocexpandaftermtismathcharexpandafter meaningexpandafterxmtmathcharstringrelaxrelaxrelax

However the problem is that mathcodes and mathchardefs have global scopeTherefore if they are changed by a package that loads different math fonts thereis no guarantee whatsoever that things will still be correct (eg the minus in cmsywhen the euler package is loaded) So no way to go unfortunately]

Some warning messages for performance reasons separated hereMTcurrlistname

MTsetlistname

The type and name of the current list defined at various places2849 defMTsetlistname2850 edefMTcurrlistnamenameuseMTabbrMTfeat listnoexpandMessageBreak2851 `nameuseMTMTfeat cnamersquo2852

MTwarnascii For lsquootherrsquo characters gt 127 we issue a warning (inputenc probably hasnrsquot beenloaded) since correspondence with the slot numbers would be purely coincidental

2853 defMTwarnascii2854 MTwarningnlCharacter `theMTtoksrsquo (= MTchar)2855 is outside of ASCII rangeMessageBreak2856 You must load the `inputencrsquo package before usingMessageBreak2857 8-bit characters in MTcurrlistname2858

IMPLEMENTATION Font setup 99

MTwarnnumbertoolarge Number too large2859 defMTwarnnumbertoolarge12860 MTwarningnl2861 Number 1 in encoding `MTencodingrsquo too largeMessageBreak2862 Ignoring it in MTcurrlistname2863

MTwarnrest Not all of the string has been parsed2864 defMTwarnrest2865 MTwarningnl2866 Unknown slot number of characterMessageBreak`theMTtoksrsquo2867 MTwarnmaybeinputencMessageBreak2868 in font encoding `MTencodingrsquoMessageBreak2869 Make sure itrsquos a single characterMessageBreak2870 (or a number) in MTcurrlistname2871

MTwarnunknown No idea what went wrong2872 defMTwarnunknown2873 MTwarningnl2874 Unknown slot number of characterMessageBreak`theMTtoksrsquo2875 MTwarnmaybeinputencMessageBreak2876 in font encoding `MTencodingrsquo in MTcurrlistname2877

MTwarnmaybeinputenc In case an input encoding had been requested2878 defMTwarnmaybeinputenc2879 MTifdefinednT2880 MTMTfeat MTcat csname MTMTfeat MTcat nameendcsname inputenc2881 (input encoding `nameuse2882 MTMTfeat MTcat csname MTMTfeat MTcat nameendcsname inputencrsquo)2883

1429 Hook into LATEXrsquos font selection

We append MTsetupfont to pickupfont which is called by LATEX every time afont is selected We then check whether wersquove already seen this font and if notset it up for micro-typography This ensures that we will catch all fonts and thatwe will not set up fonts more than once The whole package really hangs on thiscommand

In contrast to the pdfcprot package it is not necessary to declare in advancewhich fonts should benefit from micro-typographic treatment Also only thosefonts that are actually being used will be set up

For my reference

bull pickupfont is called by selectfont wrongfontshape orgetanddefinefonts (for math)

bull pickupfont calls definenewfont

bull definenewfont may call (inside a group)

ndash wrongfontshape which in turn will call pickupfont and thusdefinenewfont again or

ndash extractfont

bull getexternalfont is called by extractfont by itself and by the substitutionmacros

IMPLEMENTATION Font setup 100

Up to version 13 of this package we were using definenewfont as the hookwhich is only called for new fonts and therefore seemed the natural choice How-ever this meant that we had to take special care to catch all fonts we additionallyhad to set up the default font the error font (if it wasnrsquot the default font) we hadto check for some packages that might have been loaded before microtype andwere loading fonts eg jurabib ledmac pifont (loaded by hyperref) tipa andprobably many more Furthermore we had to include a hack for the IEEEtran classwhich loads all fonts in the class file itself (to fine tune inter-word spacing) andthe memoir class too To cut this short it seemed to get out of hand and I decidedthat it would be better to use pickupfont and decide for ourselves whether wersquovealready seen that font I hope the overhead isnrsquot too large

MTfontlist

MTfont

We use a comma separated list2884 letMTfontlistempty2885 letMTfontempty

All this is done at the beginning of the document It doesnrsquot work for plain ofcourse which doesnrsquot have pickupfont

2886 langpackagerang2887 langpackage|letterspacerang2888 langplainrangMTrequireslatex22889 MTaddtosetup

MTorigpickupfont The luatexja package redefines char which will upset our parsing of text symbolsand commands instead of fixing this we wonrsquot bother at least for the moment butsimply issue a warning and disable all further warnings The fix is left to the user bynot specifying any text commands but only (Unicode) letters The xeCJK packageor rather its xunicode-addon also modifies the way text symbols are defined (likeluatexja but in a different way) Again we only issue a warning

2890 langpackagerang MTwithpackageTluatexjaMTwarnunknownonceluatexja2891 langpackagerang MTwithpackageTxeCJK MTwarnunknownoncexeCJK

microtype also works with CJK in the sense that nothing will break when bothpackages are used at the same time However since CJK has its own way of encodingit is currently not possible to create character-specific settings That is the onlyfeature available with CJK fonts is (non-selected) expansion (Tracking doesnrsquotreally work for other reasons) Like us CJK redefines pickupfont

2892 ifpackageloadedCJK

The xeCJK package in turn pretends that CJK was loaded but does not changethe definition of pickupfont With xeCJK protrusion should be possible also forCJK characters I havenrsquot tried it though

2893 ifpackageloadedxeCJKfirstofone2894 ifpackagelaterCJK20061017 4702895 defMTorigpickupfontCJKifundefinedCJKplane2896 defMTorigpickupfontifundefinedCJKplane2897 gaddtomacroMTorigpickupfont2898 expandafterifxfontnamerelaxdefinenewfontfi

CJKutf8 redefines pickupfont once more (recent versions in PDF mode asdetermined by ifpdf which CJKutf8 loads)

2899 ifpackageloadedCJKutf82900 ifpackagelaterCJKutf820080522 4802901 ifpdfexpandaftersecondoftwoelseexpandafterfirstoftwofi2902 firstoftwo2903 firstoftwo2904 gaddtomacroMTorigpickupfont2905 expandafterifxcsnamecurrfontshapefsizeCJKplaneendcsnamerelax

IMPLEMENTATION Font setup 101

2906 definenewfontelsexdeffontname2907 csname currfontshapefsizeCJKplaneendcsnamefi2908 gaddtomacroMTorigpickupfont2909 expandafterifxcsname currfontshapefsizeCJKplaneendcsnamerelax2910 definenewfontdefCJKtempv2911 ifxCJKtempCJKplane2912 expandafterifxcsname CJKcmapffamilyCJKplaneendcsnamerelax2913 elsecsname CJKcmapffamilyCJKplaneendcsnamefi2914 else CJKaddcmapCJKplane fi2915 elsexdeffontname2916 csname currfontshapefsizeCJKplaneendcsnamefi2917 gobble2918 2919 firstofone

This is the normal LATEX definition2920 defMTorigpickupfontexpandafterifxfontnamerelaxdefinenewfontfi

Check whether pickupfont is defined as expected The warning issued byCheckCommand would be a bit too generic

2921 ifxpickupfontMTorigpickupfont else2922 MTwarningnl2923 Command stringpickupfontspace is not defined as expected2924 MessageBreak Patching it anyway Some things may break2925 langpackagerang2926 MessageBreak Double-check whether micro-typography is indeed2927 MessageBreak applied to the document2928 MessageBreak (Hint Turn on `verbosersquo mode)2929 langpackagerang2930 2931 fi

pickupfont Then we append our stuff Everything is done inside a group2932 gaddtomacropickupfontbegingroup

If the trace package is loaded we turn off tracing of microtypersquos setup which isextremely noisy

2933 MTwithpackageTtracegaddtomacropickupfontconditionallytraceoff2934 gaddtomacropickupfont2935 escapecharmne2936 langpackagerang2937 langdebugrang globalMTinannottrue2938 langdebugrang MTgletMTpdfannotempty2939 langdebugrang MTaddtoannot(line numberinputlineno)

If MTfont is empty no substitution has taken place hence fontname is correctOtherwise if they are different fontname does not describe the font actuallyused This test will catch first order substitutions like bx to b but it will still fail ifthe substituting font is itself substituted

2940 MTletcnMTfontMTsubstexpandafterstringfontname2941 ifxMTfontrelax2942 letMTfontfontname2943 else2944 ifxMTfontfontname else2945 langdebugrang MTaddtoannot= substituted with MTfont2946 MTregistersubstfont2947 fi2948 fi2949 MTsetupfont2950 langpackagerang2951 langletterspacerang MTtracking2952 endgroup2953 2954 langpackagerang

IMPLEMENTATION Font setup 102

MTpickupfont

MTMTpickupfont

MTltxpickupfont

Remember the patched command because we may have to disable ourselves incertain situations

2955 letMTpickupfontpickupfont2956 defMTMTpickupfont letpickupfontMTpickupfont2957 defMTltxpickupfontletpickupfontMTorigpickupfont

dosubstcorrection Additionally we hook into dosubstcorrection which is called if a substitutionhas taken place to record the name of the ersatz font Unfortunately this will onlywork for one-level substitutions We have to remember the substitute for the rest ofthe document not just for the first time it is called since we need it every time afont is letterspaced

2958 gaddtomacrodosubstcorrection2959 edefMTfontcsnamecurrfontshapefsizeendcsname2960 MTgletncMTsubstexpandafterstringfontnameMTfont

addaccent

MTorigaddaccent

Inside addaccent we have to disable microtypersquos setup since the grouping inthe patched pickupfont would break the accent if different fonts are used forthe base character and the accent Fortunately LATEX takes care that the fonts usedfor the accent are already set up so that we cannot be overlooking them

2961 letMTorigaddaccentaddaccent2962 defaddaccent122963 MTltxpickupfont2964 MTorigaddaccent122965 MTMTpickupfont2966 2967 langpackagerang2968 2969 langplainrangrelax2970 langpackagerang

Consequently (if all goes well) we are the last ones to change these commandstherefore there is no need to check whether our definition has survived

MTcheckfont Check whether wersquove already seen the current font2971 defMTcheckfontMTexponenMTinclistMTfontMTfontlist

MTregisterfont Register the current font2972 defMTregisterfontxdefMTfontlistMTfontlistMTfont

MTregistersubstfont Register the substituted font (only if it isnrsquot registered already) Additionally wehave to remove the substitute font from the list of fonts so that we set it up again

2973 defMTregistersubstfont2974 MTexponenMTinclistfontnameMTfontlist2975 ifMTinlistelse2976 xdefMTfontlistMTfontlistfontname2977 expandafterMTremfromclistMTfontMTfontlist2978 fi2979

14210 Context-sensitive setup

Here are the variants for context-sensitive setupMTactivefeatures The activated features are stored in this command

2980 letMTactivefeaturesempty

MTcheckfontcx Every feature has its own list of fonts that have already been dealt with If thefont neednrsquot be set up for a feature we temporarily disable the correspondingsetup command This should be more efficient than book-keeping the fonts in listsassociated with the combination of contexts as wersquove done it before

IMPLEMENTATION Font setup 103

2981 defMTcheckfontcx2982 MTiftrue2983 MTmapclistcMTactivefeatures2984 expandafterMTexponenexpandafterMTinclistexpandafterMTfont2985 csname MT1csname MT1contextendcsname fontlistendcsname2986 ifMTinlist2987 MTletncMTnameuseMTabbr1relax2988 else2989 MTiffalse2990 fi2991 2992 ifMTif MTinlisttrue else MTinlistfalse fi2993

MTregistersubstfontcx Add the substituted font to each feature list and possibly remove substitute font2994 defMTregistersubstfontcx2995 MTmapclistcMTactivefeatures2996 expandafterMTexponenexpandafterMTinclistexpandafterfontname2997 csname MT1csname MT1contextendcsname fontlistendcsname2998 ifMTinlist else2999 MTexpcsMTxadd3000 MT1csname MT1contextendcsname fontlist3001 fontname3002 expandafterMTexponenexpandafterMTremfromclistexpandafterMTfont3003 csname MT1csname MT1contextendcsname fontlistendcsname3004 fi3005 3006

MTregisterfontcx For each feature add the current font to the list unless we didnrsquot set it up3007 defMTregisterfontcx3008 MTmapclistcMTactivefeatures3009 MTexpcsifxMTnameuseMTabbr1relaxelse3010 MTexpcsMTxadd3011 MT1csname MT1contextendcsname fontlist3012 MTfont3013 deftempa13014 MTexpcsMTmaptlistcMT1doccontextsMTmayberemfromlist3015 fi3016 3017

MTmayberemfromlist Recurse through all context font lists of the document and remove the font unlessitrsquos the current context

3018 defMTmayberemfromlist13019 MTifstreqtempa1tempacsname MTtempa contextendcsnamerelax3020 expandafterMTexponenexpandafterMTremfromclistexpandafter3021 MTfont csname MTtempa 1fontlistendcsname3022 3023

microtypecontext

MTmicrotypecontext

The user may change the context so that different setups are possible This isespecially useful for multi-lingual documents

Inside the preamble this command shouldnrsquot actually do anything but remem-ber itself for later

3024 defmicrotypecontextMTbegincatcodesMTmicrotypecontext3025 defMTmicrotypecontext1MTendcatcodesMTaddtosetupmicrotypecontext13026 MTaddtosetup3027 DeclareRobustCommandmicrotypecontext3028 MTbegincatcodes3029 MTmicrotypecontext3030 3031 defMTmicrotypecontext13032 MTendcatcodes

IMPLEMENTATION Font setup 104

3033 MTsetupcontexts3034 letMTresetcontextrelax

We need to ensure that math fonts are set up anew3035 MTgletglbcurrsizeempty3036 setkeysMTC13037 selectfont3038 MTresetcontext3039 3040

textmicrotypecontext

MTtextmicrotypecontext

MTtextmicrotypecontext

This is just a wrapper around microtypecontext3041 DeclareRobustCommandtextmicrotypecontextMTbegincatcodesMTtextmicrotypecontext3042 defMTtextmicrotypecontext1MTendcatcodesMTtextmicrotypecontext13043 defMTtextmicrotypecontext12microtypecontext12

MTresetcontext

MTresetcontext

We have to reset the font at the end of the group provided there actually was achange

3044 defMTresetcontext3045 MTvinfoltltlt Resetting contextsonline3046 langdebugrang MessageBreak= MTprcontextMTexcontext3047 langdebugrang MTtrcontextMTkncontextMTspcontext3048 3049 selectfont3050

MTsetupcontexts The first time microtypecontext is called we initialise the context lists andredefine the commands used in pickupfont

3051 defMTsetupcontexts3052 MTmapclistcMTactivefeatures3053 MTgletncMT1fontlistMTfontlist3054 MTgletMTcheckfontMTcheckfontcx3055 MTgletMTregisterfontMTregisterfontcx3056 MTgletMTregistersubstfontMTregistersubstfontcx3057 MTgletMTsetupcontextsrelax3058

Define context keys3059 MTmapclistcMTfeatureslong3060 definekeyMTC1[]3061 edeftempbnameuseMTrbba13062 MTexponenMTinclisttempbMTactivefeatures3063 ifMTinlist

Using an empty context is only asking for trouble therefore we choose the lsquorsquoinstead (hoping for the LATEX usersrsquo natural awe of this character)

3064 MTifempty1defMTvaldefMTval13065 MTexpcsifxMTtempb contextMTval3066 langdebugrangMTdinfo1gtgtgt no change of 1 context `MTvalrsquo3067 else3068 MTvinfogtgtgt Changing 1 context to `MTvalrsquoMessageBreakonline3069 langdebugrang space(previous `nameuseMTtempb contextrsquo)3070 3071 defMTresetcontextaftergroupMTresetcontext

The next time we see the font we have to reset all factors3072 MTgletnnMTresettempb codesMTresettempb codes

We must also keep track of all contexts in the document3073 expandafterMTexponenexpandafterMTintlistexpandafter3074 MTval csname MTtempb doccontextsendcsname3075 ifMTinlist else3076 MTexpcsMTxaddMTtempb doccontextsMTval3077 langdebugrang MTdinfo1||| added 1 context nameuseMTtempb doccontexts

IMPLEMENTATION Configuration 105

3078 fi3079 MTedefnMTtempb contextMTval3080 fi3081 fi3082 3083

We also allow the activate shortcut3084 definekeyMTCactivate[]3085 setkeysMTCprotrusion=13086 setkeysMTCexpansion=13087

MTprcontext

MTexcontext

MTtrcontext

MTspcontext

MTkncontext

MTprdoccontexts

MTexdoccontexts

MTtrdoccontexts

MTspdoccontexts

MTkndoccontexts

MTextracontext

Initialise the contexts3088 MTexponenMTmapclistnMTfeaturesnl3089 MTdefnMT1context3090 MTdefnMT1doccontexts3091 3092 letMTextracontextempty

143 Configuration1431 Font sets

DeclareMicrotypeSet

DeclareMicrotypeSet

Calling this macro will create a comma list for every font attribute of the formMTlangfeatureranglistlangattributeranglangset namerang If the optional argument is empty lists forall available features will be created

The third argument must be a list of key=value pairs If a font attribute is notspecified we define the corresponding list to relax so that it does not constitutea constraint

3093 defDeclareMicrotypeSet3094 MTbegincatcodes3095 ifstar3096 MTDeclareSetAndUseIt3097 MTDeclareSet3098

MTDeclareSet

3099 newcommandMTDeclareSet[3][]3100 MTifempty13101 MTmapclistcMTfeaturesMTdeclaresets1233102 3103 MTmapclistn13104 MTifempty1relax3105 MTisfeature1set declaration `2rsquo3106 MTexponenMTdeclaresets3107 csname MTrbba1endcsname233108 3109 3110 3111 3112 MTendcatcodes3113

MTDeclareSetAndUseIt

3114 newcommandMTDeclareSetAndUseIt[3][]3115 MTDeclareSet[1]233116 UseMicrotypeSet[1]23117

MTcurrsetname We need to remember the name of the set currently being declared3118 letMTcurrsetnameempty

IMPLEMENTATION Configuration 106

MTdeclaresets Define the current set name and parse the keys3119 defMTdeclaresets1233120 defMTcurrsetname23121 MTifdefinednTMT1setMTcurrsetname3122 MTwarningRedefining nameuseMTabbr1 set `MTcurrsetnamersquo3123 MTmapclistnfontencodingfamilyseriesshapesize3124 MTgletncMT1list1MTcurrsetnameundefined3125 3126 3127 MTgletncMT1setMTcurrsetnameempty3128 langdebugrangMTdinfo1declaring nameuseMTabbr1 set `MTcurrsetnamersquo3129 setkeysMT1set33130

MTdefinesetkey lang1rang = font axis lang2rang = feature3131 defMTdefinesetkey123132 definekeyMT2set1[]3133 MTgletncMT2list1MTcurrsetnameempty3134 MTmapclistn13135 KVspdefMTval13136 MTgethighlevel1

We do not add the expanded value to the list 3137 MTexptwongaddtomacro3138 csname MT2list1MTcurrsetnameexpandafterendcsname3139 MTval3140

but keep in mind that the list has to be expanded at the end of the preamble3141 expandaftergaddtomacroexpandafterMTfontsets3142 csname MT2list1MTcurrsetnameendcsname3143 langdebugrangMTdinfonl1-- 1 nameuseMT2list1MTcurrsetname3144 3145

MTgethighlevel Saying for instance lsquofamily=rmrsquo or lsquoshape=bfrsquo will expand to rmdefault respbfdefault

3146 defMTgethighlevel13147 expandafterMTtestastMTvalnilrelax

And lsquofamily = rsquo will become familydefault3148 MTifemptytempadeftempa1relax

Test whether the command is actually defined3149 MTifdefinednTFtempa default3150 edefMTvalexpandafternoexpandcsname tempa defaultendcsname3151 MTwarning`backslashchartempa defaultrsquo is not a defined commandMessageBreak3152 Ignoring `1 = temparsquo in font setMessageBreak`MTcurrsetnamersquo3153 letMTvalempty

In contrast to earlier versions these values will not be expanded immediately butat the end of the preamble

3154 3155

MTtestast It the last character is an asterisk execute the second argument otherwise the firstone

3156 defMTtestast12nil3157 deftempa13158 MTifempty23159

MTfontsets

MTfixfontset

Fully expand the font specification and fix catcodes for all font sets Also remove

IMPLEMENTATION Configuration 107

fontspecrsquos counters3160 letMTfontsetsempty3161 defMTfixfontset13162 MTifdefinedcT13163 xdef113164 ifMTfontspec3165 xdef1expandafterMTscrubfeatures1()relax3166 fi3167 globalonelevelsanitize13168 3169

MTdefinesetkeysize size requires special treatment3170 defMTdefinesetkeysize13171 definekeyMT1setsize[]3172 MTmapclistn13173 defMTval13174 expandafterMTgetrangeMTval--nil3175 ifxMTvalrelax else3176 MTexpcsMTxadd3177 MT1listsizeMTcurrsetname3178 MTlowerMTupperrelax3179 fi3180 3181 langdebugrangMTdinfonl1-- size nameuseMT1listsizeMTcurrsetname3182 3183

Font sizes may also be specified as ranges This has been requested by AndreasBuumlhmann who has also offered valuable help in implementing this Now it is forinstance possible to set up different lists for fonts with optical sizes (The MinionProproject does this for the OpenType version of Adobersquos Minion (Available from CTANat pkgminionpro))

MTgetrange

MTupper

MTlower

Ranges will be stored as triplets of langlower boundranglangupper boundranglanglist namerangFor simple sizes the upper boundary is minus1

3184 defMTgetrange1-2-3nil3185 MTifempty13186 MTifempty23187 letMTvalrelax3188 3189 defMTlower03190 defMTval23191 MTgetsize3192 edefMTupperMTval3193 3194 3195 defMTval13196 MTgetsize3197 ifxMTvalrelax else3198 edefMTlowerMTval3199 MTifempty23200 MTifempty33201 defMTupper-1

2048 pt is TEXrsquos maximum font size3202 defMTupper20483203 3204 defMTval23205 MTgetsize3206 ifxMTvalrelax else3207 MTifdimMTlowergtMTval3208 MTerror3209 Invalid size range (MTlowerspace gt MTval) in font set

IMPLEMENTATION Configuration 108

3210 `MTcurrsetnamersquoMessageBreak Swapping sizes3211 edefMTupperMTlower3212 edefMTlowerMTval3213 3214 edefMTupperMTval3215 3216 MTifdimMTlower=MTupper3217 defMTupper-13218 relax3219 fi3220 3221 fi3222 3223

MTgetsize Translate a size selection command and normalise it3224 defMTgetsize

A single star would mean sizedefault which doesnrsquot exist so we define it to benormalsize

3225 ifMTvalrelax3226 deftempanormalsize3227 else3228 MTletcntempaMTval3229 fi3230 ifxtemparelaxelse3231 MTgetsize3232 fi

Test whether we finally got a number or dimension so that we can strip the lsquoptrsquo(defaultunits and strippt are kernel macros)

3233 MTifdimenMTval3234 defaultunitstempdimaMTval ptrelaxnnil3235 edefMTvalstrippttempdima3236 3237 MTwarningCould not parse font size `MTvalrsquoMessageBreak3238 in font set `MTcurrsetnamersquo3239 letMTvalrelax3240 3241

MTgetsize

MTgetsize

The relsize solution of parsing setfontsize does not work with the AMSclasses among others I hope my hijacking doesnrsquot do any harm We redefinesetfontsize instead of setfontsize because some classes might define thesize selection commands by simply using fontsize (eg the a0poster class)

3242 defMTgetsize3243 begingroup3244 defsetfontsize1234nilendgroupdefMTval23245 tempanil3246

The svjour3 class defines the size commands using conditionals using e-TEXprimitives we close any leftovers here

3247 ^^Xifclassloadedsvjour33248 ^^X defMTgetsize3249 ^^X tempcnta=currentiflevel3250 ^^X MTgetsize3251 ^^X MTloop3252 ^^X ifnumnumexprcurrentiflevel-1gttempcnta3253 ^^X csname fiendcsname3254 ^^X MTrepeat3255 ^^X 3256 ^^X

IMPLEMENTATION Configuration 109

3257 letMTgetsizeMTgetsize3258 ^^X

MTdefinesetkeyfont

3259 defMTdefinesetkeyfont13260 definekeyMT1setfont[]3261 MTgletncMT1listfontMTcurrsetnameempty3262 MTmapclistn13263 defMTval13264 MTifstreqMTvaldefMTvalrelax3265 expandafterMTgetfontMTvalnil3266 MTexptwongaddtomacro3267 csname MT1listfontMTcurrsetnameexpandafterendcsname3268 MTval3269 3270 expandaftergaddtomacroexpandafterMTfontsets3271 csname MT1listfontMTcurrsetnameendcsname3272 langdebugrangMTdinfonl1-- font nameuseMT1listfontMTcurrsetname3273 3274

MTgetfont Translate any asterisks3275 defMTgetfont123456nil3276 MTgetfont1234503277 ifxMTvalrelaxdefMTval0fi3278 expandaftergaddtomacroexpandaftertempbexpandafterMTval3279 letMTvaltempb3280

MTgetfont Helper macro also used by MTgetfontandsize3281 defMTgetfont1234563282 lettempbempty3283 defMTtemp123453284 MTgetaxisencoding13285 MTgetaxisfamily 23286 MTgetaxisseries 33287 MTgetaxisshape 43288 ifnum6gtzedeftempbtempbfi3289 MTifempty53290 MTwarnaxisemptysizestringnormalsize3291 defMTval3292 3293 defMTval53294 3295 MTgetsize3296

MTgetaxis

3297 defMTgetaxis123298 defMTval23299 MTgethighlevel13300 MTifemptyMTval3301 MTwarnaxisempty1csname 1defaultendcsname3302 expandafterdefexpandafterMTvalexpandaftercsname 1defaultendcsname3303 relax3304 expandaftergaddtomacroexpandaftertempbexpandafterMTval3305

MTwarnaxisempty

3306 defMTwarnaxisempty123307 MTwarning1 axis is empty in font specificationMessageBreak3308 `MTtemprsquo Using `2rsquo instead3309

We can finally assemble all pieces to define DeclareMicrotypeSetrsquos keys They are

IMPLEMENTATION Configuration 110

also used for DisableLigatures3310 MTexponenMTmapclistnMTfeaturesnl3311 MTdefinesetkeyencoding13312 MTdefinesetkeyfamily 13313 MTdefinesetkeyseries 13314 MTdefinesetkeyshape 13315 MTdefinesetkeysize 13316 MTdefinesetkeyfont 13317

UseMicrotypeSet To use a particular set we simply redefine MTlangfeaturerangsetname If the optionalargument is empty set names for all features will be redefined

3318 defUseMicrotypeSet3319 MTbegincatcodes3320 MTUseMicrotypeSet3321

MTUseMicrotypeSet

3322 newcommandMTUseMicrotypeSet[2][]3323 MTifempty13324 MTmapclistcMTfeaturesMTuseset123325 3326 MTmapclistn13327 MTifempty1relax3328 MTisfeature1activation of set `2rsquo3329 MTexponenMTuseset3330 csname MTrbba1endcsname23331 3332 3333 3334 3335 MTendcatcodes3336

MTprsetname

MTexsetname

MTtrsetname

MTspsetname

MTknsetname

MTuseset

Only use sets that have been declared3337 defMTuseset123338 MTifdefinednTFMT1set23339 MTxdefnMT1setname23340 3341 MTifdefinednTFMT1setnamerelax3342 MTxdefnMT1setnamenameuseMTdefault1set3343 3344 MTerror3345 The nameuseMTabbr1 set `2rsquo is undeclaredMessageBreak3346 Using set `nameuseMT1setnamersquo instead3347 3348

DeclareMicrotypeSetDefault This command can be used in the main configuration file to declare the defaultfont set in case no set is specified in the package options

3349 defDeclareMicrotypeSetDefault3350 MTbegincatcodes3351 MTDeclareMicrotypeSetDefault3352

MTDeclareMicrotypeSetDefault

3353 newcommandMTDeclareMicrotypeSetDefault[2][]3354 MTifempty13355 MTmapclistcMTfeaturesMTsetdefaultset123356 3357 MTmapclistn13358 MTifempty1relax3359 MTisfeature1declaration of default set `2rsquo3360 MTexponenMTsetdefaultset

IMPLEMENTATION Configuration 111

3361 csname MTrbba1endcsname23362 3363 3364 3365 3366 MTendcatcodes3367

MTdefaultprset

MTdefaultexset

MTdefaulttrset

MTdefaultspset

MTdefaultknset

MTsetdefaultset

3368 defMTsetdefaultset123369 MTifdefinednTFMT1set23370 langdebugrangMTdinfo1declaring default nameuseMTabbr1 set `2rsquo3371 MTxdefnMTdefault1set23372 3373 MTerror3374 The nameuseMTabbr1 set `2rsquo is not declaredMessageBreak3375 Cannot make it the default set Using setMessageBreak `allrsquo instead3376 MTxdefnMTdefault1setall3377 3378

1432 Variants and aliases

DeclareMicrotypeVariants

MTvariants

Specify suffixes for variants (see fontnamevariantsmap) The starred versionappends to the list

3379 letMTvariantsempty3380 defDeclareMicrotypeVariants3381 MTbegincatcodes3382 ifstar3383 MTDeclareVariants3384 letMTvariantsemptyMTDeclareVariants3385

MTDeclareVariants

3386 defMTDeclareVariants13387 MTmapclistn13388 deftempa13389 onelevelsanitizetempa3390 xdefMTvariantsMTvariantstempa3391 3392 MTendcatcodes3393

DeclareMicrotypeAlias This can be used to set an alias name for a font so that the file and the settings forthe aliased font will be loaded

3394 defDeclareMicrotypeAlias3395 MTbegincatcodes3396 MTDeclareMicrotypeAlias3397

MTDeclareMicrotypeAlias

3398 newcommandMTDeclareMicrotypeAlias[2]3399 deftempb23400 onelevelsanitizetempb3401 MTifdefinednTMT1alias3402 MTwarningAlias font family `tempbrsquo will override3403 alias `nameuseMT1aliasrsquoMessageBreak3404 for font family `1rsquo3405 MTxdefnMT1aliastempb

If we encounter this command while a font is being set up we also set the aliasfor the current font so that if DeclareMicrotypeAlias has been issued inside a

IMPLEMENTATION Configuration 112

configuration file the configuration file for the alias font will be loaded too3406 MTifdefinedcTMTfamily3407 langdebugrangMTdinfo1Activating alias font `tempbrsquo for `MTfamilyrsquo3408 MTgletMTfamilyaliastempb3409 3410 MTendcatcodes3411

LoadMicrotypeFile May be used to load a configuration file manually3412 defLoadMicrotypeFile13413 edeftempazapspace1 empty3414 onelevelsanitizetempa3415 MTexponenMTinclisttempaMTfilelist3416 ifMTinlist3417 MTvinfo Configuration file mt-tempacfg already loaded3418 else3419 MTxaddMTfilelisttempa3420 MTbegincatcodes3421 InputIfFileExistsmt-tempacfg3422 edefMTcurrfilemt-tempacfg3423 MTvinfo Loading configuration file MTcurrfile3424 3425 MTwarningConfiguration file mt-tempacfgMessageBreak3426 does not exist3427 3428 MTendcatcodes3429 fi3430 3431 langpackagerang3432 langpackage|letterspacerang

1433 Disabling ligatures

DisableLigatures

MTDisableLigatures

MTnlsetname

MTnlligatures

This is really simple now we can re-use the set definitions of DeclareMicrotypeSetthere can only be one set which wersquoll call lsquono ligaturesrsquo

The optional argument may be used to disable selected ligatures only3433 langpdftex-def|luatex-defrang3434 langpdftex-defrangMTrequirespdftex53435 defDisableLigatures3436 MTbegincatcodes3437 MTDisableLigatures3438 3439 newcommandMTDisableLigatures[2][]3440 MTifempty1relaxgdefMTnlligatures13441 xdefMTactivefeaturesMTactivefeaturesnl3442 globalMTnoligaturestrue3443 MTdeclaresetsnlno ligatures23444 gdefMTnlsetnameno ligatures3445 MTendcatcodes3446 3447 langpdftex-defrang3448 langpdftex-def|luatex-defrang

If pdfTEX is too old we throw an error3449 langpdftex-def|xetex-defrang3450 renewcommandDisableLigatures[2][]3451 MTerrorDisabling ligatures of a font is only possibleMessageBreak3452 with pdftex version 130 or newerMessageBreak3453 Ignoring stringDisableLigatures3454 langpdftex-defrang Upgrade3455 langxetex-defrang Use3456 pdftex3457

IMPLEMENTATION Configuration 113

3458 langpdftex-defrang3459 langpdftex-def|xetex-defrang

1434 Interaction with babel

DeclareMicrotypeBabelHook Declare the context that should be loaded when a babel language is selected Thecommand will not check whether a previous declaration will be overwritten

3460 langpackagerang3461 defDeclareMicrotypeBabelHook123462 MTmapclistn13463 KVspdeftempa13464 MTgdefnMTbabeltempa23465 3466 3467 langpackagerang

1435 Fine tuning

The commands SetExpansion and SetProtrusion provide an interface for settingthe character protrusion resp expansion factors for a set of fonts

SetProtrusion This macro accepts three arguments [options] set of font attributes and list ofcharacter protrusion factors

A new macro called MTprclangnamerang will be defined to be lang3rang (ie the list ofcharacters not expanded)

3468 langpdftex-def|xetex-def|luatex-defrang3469 defSetProtrusion3470 MTbegincatcodes3471 MTSetProtrusion3472

MTSetProtrusion

MTprcname

MTextracontext

MTpermutelist

We want the catcodes to be correct even if this is called in the preamble3473 newcommandMTSetProtrusion[3][]3474 letMTextracontextempty

Parse the optional first argument We first have to know the name before we candeal with the extra options

3475 MTsetnamedkeysMTprc13476 langdebugrangMTdinfo1creating protrusion list `MTprcnamersquo3477 defMTpermutelistprc3478 setkeysMTcfg2

We have parsed the second argument and can now define macros for all permuta-tions of the font attributes to point to MTprclangnamerang

3479 MTpermute

which we can now define to be lang3rang Here as elsewhere we have to make thedefinitions global since they will occur inside a group

3480 MTgdefnMTprcMTprcname33481 MTendcatcodes3482 3483 langpdftex-def|xetex-def|luatex-defrang

SetExpansion SetExpansion only differs in that it allows some extra options (stretch shrinkstep auto)

3484 langpdftex-def|luatex-defrang3485 defSetExpansion3486 MTbegincatcodes3487 MTSetExpansion3488

IMPLEMENTATION Configuration 114

MTSetExpansion

MTexcname

MTextracontext

MTpermutelist

3489 newcommandMTSetExpansion[3][]3490 letMTextracontextempty3491 MTsetnamedkeysMTexc13492 MTifdefinednTMTexcMTexcname factor3493 ifnumcsname MTexcMTexcname factorendcsname gt m3494 MTwarningnlExpansion factor numbernameuseMTexcMTexcname factor3495 too large in listMessageBreak `MTexcnamersquo Setting it to the3496 maximum of 10003497 MTgletncMTexcMTexcname factorm3498 fi3499 3500 langdebugrangMTdinfo1creating expansion list `MTexcnamersquo3501 defMTpermutelistexc3502 setkeysMTcfg23503 MTpermute3504 MTgdefnMTexcMTexcname33505 MTendcatcodes3506

SetTracking

3507 defSetTracking3508 MTbegincatcodes3509 MTSetTracking3510

MTSetTracking Third argument may be empty3511 newcommandMTSetTracking[3][]3512 letMTextracontextempty3513 MTsetnamedkeysMTtrc13514 langdebugrangMTdinfo1creating tracking list `MTtrcnamersquo3515 defMTpermutelisttrc3516 setkeysMTcfg23517 MTpermute3518 KVspdeftempa33519 MTifemptytemparelax3520 MTifinttempa3521 MTxdefnMTtrcMTtrcnametempa3522 MTwarningValue `temparsquo is not a number inMessageBreak3523 tracking set `MTcurrsetnamersquo3524 MTendcatcodes3525 3526 langpdftex-def|luatex-defrang

SetExtraSpacing

3527 langpdftex-defrang3528 defSetExtraSpacing3529 MTbegincatcodes3530 MTSetExtraSpacing3531

MTSetExtraSpacing

MTspcname

MTextracontext

MTpermutelist

3532 newcommandMTSetExtraSpacing[3][]3533 letMTextracontextempty3534 MTsetnamedkeysMTspc13535 langdebugrangMTdinfo1creating spacing list `MTspcnamersquo3536 defMTpermutelistspc3537 setkeysMTcfg23538 MTpermute3539 MTgdefnMTspcMTspcname33540 MTendcatcodes3541

SetExtraKerning

IMPLEMENTATION Configuration 115

3542 defSetExtraKerning3543 MTbegincatcodes3544 MTSetExtraKerning3545

MTSetExtraKerning

MTkncname

MTextracontext

MTpermutelist

3546 newcommandMTSetExtraKerning[3][]3547 letMTextracontextempty3548 MTsetnamedkeysMTknc13549 langdebugrangMTdinfo1creating kerning list `MTkncnamersquo3550 defMTpermutelistknc3551 setkeysMTcfg23552 MTpermute3553 MTgdefnMTkncMTkncname33554 MTendcatcodes3555 3556 langpdftex-defrang

MTsetnamedkeys

MToptions

We first set the name (if specified) then remove it from the list and set theremaining keys

3557 langpackagerang3558 defMTsetnamedkeys123559 defx1name=23nil3560 setkeys1name=23561 gdefMToptions133562 MTremfromclistname=MToptions3563 3564 x2name=nil3565 expandtwoargssetkeys1MToptions3566

MTdefinecodekey Define the keys for the configuration lists (which are setting the codes in pdfTEXspeak)

3567 defMTdefinecodekey123568 definekeyMT21[]3569 tempcnta=ne3570 MTmapclistn13571 KVspdefMTval1

Here too we allow for something like lsquobfrsquo It will be expanded immediately3572 MTgethighlevel13573 MTedefnMTtemp1thetempcntaMTval3574 advancetempcnta ne3575 3576 3577

MTdefinecodekeyfamily Remove fontspecrsquos internal feature counter3578 defMTdefinecodekeyfamily13579 definekeyMT1family[]3580 tempcnta=ne3581 MTmapclistn13582 KVspdefMTval13583 MTgethighlevelfamily3584 ifMTfontspec3585 edefxedefnoexpandMTvalnoexpandMTscrubfeatureMTval()relaxx3586 fi3587 MTedefnMTtempfamilythetempcntaMTval3588 advancetempcnta ne3589 3590 3591

MTdefinecodekeysize MTtempsize must be in a csname so that it is at least relax not undefined

IMPLEMENTATION Configuration 116

3592 defMTdefinecodekeysize13593 definekeyMT1size[]3594 MTmapclistn13595 KVspdefMTval13596 expandafterMTgetrangeMTval--nil3597 ifxMTvalrelax else3598 MTexpcsMTxaddMTtempsize3599 MTlowerMTupperMTcurrsetname3600 fi3601 3602 3603

MTdefinecodekeyfont

3604 defMTdefinecodekeyfont13605 definekeyMT1font[]3606 MTmapclistn13607 KVspdefMTval13608 MTifstreqMTvaldefMTvalrelax3609 expandafterMTgetfontandsizeMTvalnil3610 ifMTfontspec3611 edeftempbexpandafterMTscrubfeaturestempb()relax3612 fi3613 MTxdefnMTMTpermutelist tempbMTextracontext3614 csname MTMTpermutelist nameendcsname3615 langdebugrangMTdinfonl1initialising use list for font tempb=MTval3616 langdebugrang ifxMTextracontextemptyelseMessageBreak3617 langdebugrang (context MTextracontext)fi3618 MTexpcsMTxaddb3619 MTMTpermutelist tempbMTextracontext sizes3620 MTvalmneMTcurrsetname3621 3622 3623

MTgetfontandsize Translate any asterisks and split off the size3624 defMTgetfontandsize123456nil3625 MTgetfont1234513626

3627 MTdefinecodekeyencodingcfg3628 MTdefinecodekeyfamily cfg3629 MTdefinecodekeyseries cfg3630 MTdefinecodekeyshape cfg3631 MTdefinecodekeysize cfg3632 MTdefinecodekeyfont cfg

MTdefineoptkey

3633 defMTdefineoptkey123634 definekeyMT1c2[]MTifempty1relax3635 MTxdefnMT1cMTcurrsetname 213636

MTlistnamecount The options in the optional first argument3637 newcountMTlistnamecount3638 MTmapclistcMTfeatures

Use file name and line number as the list name if the user didnrsquot bother to inventone ndash also check whether the name already exists (in case more than one unnamedlist is loaded in the same line for example AtBeginDocument)

3639 definekeyMT1cname[]3640 MTifempty13641 MTifdefinednTFMT1cMTcurrfiletheinputlineno3642 globaladvanceMTlistnamecountne3643 MTedefnMT1cnameMTcurrfiletheinputlineno

IMPLEMENTATION Configuration 117

3644 (numberMTlistnamecount)3645 3646 MTedefnMT1cnameMTcurrfiletheinputlineno3647 3648 3649 MTedefnMT1cname13650 MTifdefinednTMT1ccsname MT1cnameendcsname3651 MTwarningRedefining nameuseMTabbr1 list `nameuseMT1cnamersquo3652 3653 3654 MTletcnMTcurrsetnameMT1cname3655 3656 MTdefineoptkey1load3657 MTdefineoptkey1factor3658 MTdefineoptkey1preset3659 MTdefineoptkey1inputenc

Only one context is allowed This might change in the future3660 definekeyMT1ccontext[]MTifempty1relaxdefMTextracontext13661 3662 langpackagerang

Automatically enable font copying if we find a protrusion or expansion contextAfter the preamble check whether font copying is enabled For older pdfTEXversions disallow It also works with LuaTEX 030 or newer

3663 langpdftex-def|luatex-defrang3664 langpdftex-defrangMTrequirespdftex73665 definekeyMTexccontext[]3666 MTifempty1relax3667 MTgletMTcopyfontMTcopyfont3668 defMTextracontext13669 3670 3671 MTaddtosetup3672 definekeyMTexccontext[]3673 ifxMTcopyfontMTcopyfont3674 MTifempty1relaxdefMTextracontext13675 else3676 MTerrorMTMTspace isnrsquot set up for expansion contextsMessageBreak3677 Ignoring `contextrsquo keyonline3678 Either move the settings inside the preambleMessageBreak3679 or load the package with the `copyfontsrsquo option3680 fi3681 3682

Protrusion contexts might also work without copying the font so we donrsquot issuean error but only a warning The problem is that pdfTEX only allows one set ofprotrusion factors for a given font within one paragraph (those that are in effect atthe end of the paragraph will be in effect for the whole paragraph) When differentfonts are loaded ndash like in the example with the footnote markers ndash we donrsquot needto copy the fonts

3683 definekeyMTprccontext[]3684 MTifempty1relax3685 MTgletMTcopyfontMTcopyfont3686 defMTextracontext13687 3688 3689 MTaddtosetup3690 definekeyMTprccontext[]3691 MTifempty1relaxdefMTextracontext13692 ifxMTcopyfontMTcopyfontelse3693 MTwarningnlIf protrusion contexts donrsquot work as expected

IMPLEMENTATION Configuration 118

3694 MessageBreak load the package with the `copyfontsrsquo option3695 fi3696 3697 3698 langpdftex-def|luatex-defrang3699 langpdftex-defrang3700 3701 definekeyMTexccontext[]3702 MTerrorExpansion contexts only work with pdftex 1404MessageBreak3703 or later Ignoring `contextrsquo keyonline3704 Upgrade pdftex3705 3706 langpdftex-defrang3707 langpdftex-def|xetex-defrang3708 definekeyMTprccontext[]3709 MTerrorProtrusion contexts only work with pdftex3710 langpdftex-defrang 1404MessageBreak or later3711 langxetex-defrang MessageBreak or luatex3712 Ignoring `contextrsquo keyonline3713 langpdftex-defrang Upgrade pdftex3714 langxetex-defrang Use pdftex or luatex3715 3716 langpdftex-def|xetex-defrang3717 langpdftex-defrang

MTwarnnodim

3718 langpackagerang3719 defMTwarnnodim13720 MTwarning`temparsquo is not a dimensionMessageBreak3721 Ignoring it and setting values relative toMessageBreak 13722 3723 langpackagerang

Protrusion codes may be relative to character width or to any dimension3724 langpdftex-def|xetex-def|luatex-defrang3725 definekeyMTprcunit[character]3726 MTgletncMTprcMTcurrsetname unitempty3727 deftempa13728 MTifstreqtempacharacterrelax

Test whether itrsquos a dimension but do not translate it into its final form here sinceit may be font-specific

3729 MTifdimentempa3730 MTgletncMTprcMTcurrsetname unittempa3731 MTwarnnodimcharacter widths3732 3733 3734 langpdftex-def|xetex-def|luatex-defrang

Tracking may only be relative to a dimension3735 langpdftex-def|luatex-defrang3736 definekeyMTtrcunit[1em]3737 MTgletncMTtrcMTcurrsetname unitempty3738 deftempa13739 MTifdimentempa3740 MTgletncMTtrcMTcurrsetname unittempa3741 MTwarnnodim1em3742 MTgdefnMTtrcMTcurrsetname unit1em3743 3744 langpdftex-def|luatex-defrang

Spacing and kerning codes may additionally be relative to space dimensions3745 langpdftex-defrang3746 MTmapclistnspkn3747 definekeyMT1cunit[space]

IMPLEMENTATION Configuration 119

3748 MTgletncMT1cMTcurrsetname unitempty3749 deftempa13750 MTifstreqtempacharacterrelax3751 MTgletncMT1cMTcurrsetname unitmne3752 MTifstreqtempaspacerelax3753 MTifdimentempa3754 MTgletncMT1cMTcurrsetname unittempa3755 MTwarnnodimwidth of space3756 3757 3758 3759 3760 langpdftex-defrang

The first argument to SetExpansion accepts some more options3761 langpdftex-def|luatex-defrang3762 MTmapclistnstretchshrinkstep3763 definekeyMTexc1[]3764 MTifempty1relax3765 MTifint1

A space terminates the number3766 MTgdefnMTexcMTcurrsetname 11 3767 3768 MTwarning3769 Value `1rsquo for option `1rsquo is not a numberMessageBreak3770 Ignoring it3771 3772 3773 3774 3775 definekeyMTexcauto[true]3776 deftempa13777 csname iftempaendcsname

Donrsquot use autoexpand for pdfTEX version older than 1203778 langpdftex-defrang MTrequirespdftex43779 langluatex-defrang MTrequiresluatex3relax3780 MTgdefnMTexcMTcurrsetname autoautoexpand3781 langpdftex-defrang MTwarningpdftex too old for automatic font expansion3782 else3783 langpdftex-defrang MTrequirespdftex43784 langluatex-defrang3785 MTrequiresluatex33786 MTwarningNon-automatic font expansion doesnrsquot work withMessageBreak3787 luatex3788 langluatex-defrang3789 MTgletncMTexcMTcurrsetname autoempty3790 langpdftex-defrang relax3791 fi3792

Tracking Interword spacing and outer kerning The variant with space just in caseSetTracking is called inside an argument (eg to IfFileExists)

3793 MTdefineoptkeytrspacing3794 MTdefineoptkeytrouterspacing3795 MTdefineoptkeytrouterkerning

Which ligatures should be disabled3796 definekeyMTtrcnoligatures[]3797 MTxdefnMTtrcMTcurrsetname noligatures13798 definekeyMTtrcouter spacing[]setkeysMTtrcouterspacing=13799 definekeyMTtrcouter kerning[]setkeysMTtrcouterkerning=13800 definekeyMTtrcno ligatures[]setkeysMTtrcnoligatures=13801 langpdftex-def|luatex-defrang

IMPLEMENTATION Configuration 120

1436 Character inheritance

DeclareCharacterInheritance This macro may be used in the configuration files to declare characters that shouldinherit protrusion resp expansion values from other characters Thus there is noneed to define all accented characters (eg lsquoa rsquoa ^a ~a a ra kaua) which will make the configuration files look much nicer and easier tomaintain If a single character of an inheritance list should have a different valueone can simply override it

MTinhfeat The optional argument may be used to restrict the list to some featuresMTextrainputenc and to specify an input encoding

3802 langpackagerang3803 renewcommandDeclareCharacterInheritance[1][]3804 letMTextracontextempty3805 letMTextrainputencundefined3806 letMTinhfeatempty3807 setkeysMTinh13808 MTbegincatcodes3809 MTsetinhlist3810

MTsetinhlist No need to create an inheritance list for tracking3811 defMTsetinhlist123812 MTifemptyMTinhfeat3813 MTmapclistcMTfeatures3814 MTifstreq1trrelaxMTdeclarecharinh1123815 3816 3817 MTmapclistcMTinhfeat3818 KVspdeftempa13819 MTifemptytemparelax3820 edeftempacsname MTrbbatempaendcsname3821 MTifstreqtempatrrelax3822 MTexponenMTdeclarecharinhtempa123823 3824 3825 MTendcatcodes3826

The keys for the optional argument3827 MTmapclistcMTfeatureslong3828 definekeyMTinh1[]edefMTinhfeatMTinhfeat13829 definekeyMTinhinputencdefMTextrainputenc1

MTdeclarecharinh The lists cannot be given a name by the user3830 defMTdeclarecharinh1233831 MTedefnMT1inhname3832 MTcurrfiletheinputlineno (nameuseMTabbr1)3833 MTletcnMTcurrsetnameMT1inhname3834 MTifdefinedcTMTextrainputenc3835 MTxdefnMT1inhMTcurrsetname inputencMTextrainputenc3836 langdebugrangMTdinfo1creating inheritance list `nameuseMT1inhnamersquo3837 MTgdefnMT1inhcsname MT1inhnameendcsname33838 defMTpermutelist1inh3839 setkeysMTinh23840 MTpermute3841

Parse the second argument DeclareCharacterInheritance may also be set upfor various combinations We can reuse the key setup from the configuration lists(Set)

3842 MTdefinecodekeyencodinginh

IMPLEMENTATION Configuration 121

3843 MTdefinecodekeyfamily inh3844 MTdefinecodekeyseries inh3845 MTdefinecodekeyshape inh3846 MTdefinecodekeysize inh3847 MTdefinecodekeyfont inh

MTinhdo Now parse the third argument the inheritance lists We define the commandsMTinhlangnameranglangslotrang containing the inheriting characters They will also betranslated to slot numbers here to save some time The following will be ex-ecuted only once namely the first time this inheritance list is encountered (inMTsetlangfeaturerangcodes)

3848 defMTinhdo13849 ifxrelax1empty else3850 MTinhsplit 1==relax3851 expandafterMTinhdo3852 fi3853

MTinhsplit Only gather the inheriting characters here Their codes will actually be set inMTsetlangfeaturerangcodes

3854 langpackagerang3855 langpdftex-def|xetex-def|luatex-defrang3856 defMTinhsplit1=2=3relax3857 deftempa13858 ifxtempaempty else3859 MTgetslot3860 langpdftex-def|luatex-defrang ifnumMTchar gt mne3861 langxetex-defrang ifxMTcharemptyelse3862 letMTvalMTchar3863 MTmapclistn23864 deftempa13865 ifxtempaempty else3866 MTgetslot3867 langpdftex-def|luatex-defrang ifnumMTchar gt mne3868 langxetex-defrang ifxMTcharemptyelse3869 MTexpcsMTxaddMTinhMTlistname MTval MTchar3870 fi3871 fi3872 3873 langdebugrangMTdinfonl2children of 1 (MTval)3874 langdebugrang nameuseMTinhMTlistname MTval 3875 fi3876 fi3877 3878 langpdftex-def|xetex-def|luatex-defrang

1437 Permutation

MTpermute

MTpermute

MTpermute

MTpermute

MTpermute

Calling MTpermute will define commands for all permutations of the specified fontattributes of the form MTlanglist typeranglangencodingranglangfamilyranglangseriesranglangshaperanglang|rang tobe the expansion of MTlanglist typerangname ie the name of the currently defined listSize ranges are held in a separate macro called MTlanglist typeranglangfont axesrangsizeswhich in turn contains the respective langlist namerangs attached to the ranges So that

SetProtrusion encoding = U family = euroitceuroitcs E = 10050 SetProtrusion encoding = U family = euroitceuroitcs shape = it

IMPLEMENTATION Configuration 122

E = 100

would yield the following assignments3879 langpackagerang3880 MTgdefnMTprcUeuroitceuroitc3881 MTgdefnMTprcUeuroitcseuroitc3882 MTgdefnMTprcUeuroitciteuroitci3883 MTgdefnMTprcUeuroitcsiteuroitci3884 MTgdefnMTprceuroitcE=100503885 MTgdefnMTprceuroitciE=1003886 defMTpermute3887 letMTcntencodingne3888 MTpermute

Undefine commands for the next round3889 MTmaptlistnencodingfamilyseriesshapeMTpermutereset3890 MTgletMTtempsizeundefined3891 3892 defMTpermute3893 letMTcntfamilyne3894 MTpermute3895 MTincrementMTcntencoding3896 MTifdefinednTMTtempencodingMTcntencoding3897 MTpermute3898 3899 defMTpermute3900 letMTcntseriesne3901 MTpermute3902 MTincrementMTcntfamily3903 MTifdefinednTMTtempfamilyMTcntfamily3904 MTpermute3905 3906 defMTpermute3907 letMTcntshapene3908 MTpermute3909 MTincrementMTcntseries3910 MTifdefinednTMTtempseriesMTcntseries3911 MTpermute3912 3913 defMTpermute3914 MTpermute3915 MTincrementMTcntshape3916 MTifdefinednTMTtempshapeMTcntshape3917 MTpermute3918

MTpermute In order to save some memory we can ignore unused encodings (inside the docu-ment)

3919 defMTpermute3920 MTpermutedefineencoding3921 ifMTdocument3922 ifxMTtempencodingempty else3923 MTifdefinednTFTMTtempencodingrelax3924 expandafterexpandafterexpandaftergobble3925 fi3926 fi3927 MTpermute3928

MTpermute

3929 defMTpermute3930 MTpermutedefinefamily3931 MTpermutedefineseries3932 MTpermutedefineshape3933 edeftempaMTtempencoding

IMPLEMENTATION Configuration 123

3934 MTtempfamily3935 MTtempseries3936 MTtempshape3937 MTifdefinedcTMTtempsize

Some sanity checks an encoding must be specified (unless nothing else is)3938 MTifstreqtemparelax3939 ifxMTtempencodingempty3940 MTwarning3941 You have to specify an encoding forMessageBreak3942 nameuseMTabbrMTpermutelist list3943 `nameuseMTMTpermutelist namersquoMessageBreak3944 Ignoring it3945 else3946 MTifdefinedcTFMTtempsize

Add the list of ranges to the beginning of the current combination after checkingfor conflicts

3947 MTifdefinednTMTMTpermutelist tempaMTextracontext sizes3948 MTmaptlistcMTtempsizeMTcheckrlist3949 3950 MTexpcsMTxaddb3951 MTMTpermutelist tempaMTextracontext sizes3952 MTtempsize3953 langdebugrangMTdinfonl1initialising use list for font tempaMessageBreak3954 langdebugrang sizes csname MTMTpermutelist tempaMTextracontext3955 langdebugrang sizesendcsname3956

Only one list can apply to a given combination But we donrsquot warn if the overriddenlist is to be loaded by the current one

3957 MTifdefinednTMTMTpermutelist tempaMTextracontext3958 MTifstreqcsname MTMTpermutelist tempaMTextracontextendcsname3959 csname MTMTpermutelist csname MTMTpermutelist nameendcsname loadendcsname3960 relax3961 MTwarningnameuseMTabbrMTpermutelist list3962 `nameuseMTMTpermutelist namersquo willMessageBreak override3963 list `nameuseMTMTpermutelist tempaMTextracontextrsquo3964 for MessageBreak font `temparsquo3965 3966 3967 langdebugrangMTdinfonl1initialising use list for font tempa3968 langdebugrang ifxMTextracontextemptyelseMessageBreak3969 langdebugrang (context MTextracontext)fi3970 3971 MTxdefnMTMTpermutelist tempaMTextracontext3972 csname MTMTpermutelist nameendcsname3973 fi3974 3975

MTpermutedefine Define the commands3976 defMTpermutedefine13977 tempcnta=csname MTcnt1endcsnamerelax3978 MTifdefinednTFMTtemp1thetempcnta3979 MTedefnMTtemp1csname MTtemp1thetempcntaendcsname3980 MTletncMTtemp1empty3981

MTpermutereset Reset the commands3982 defMTpermutereset13983 tempcnta=ne3984 MTloop3985 MTletncMTtemp1thetempcntaundefined

IMPLEMENTATION Configuration 124

3986 advancetempcntane3987 MTifdefinednTFMTtemp1thetempcnta3988 iftrue3989 iffalse3990 MTrepeat3991

MTcheckrlist For every new range item in MTtempsize check whether it overlaps with rangesin the existing list

3992 defMTcheckrlist1expandafterMTcheckrlist 1

MTcheckrlist Define the current new range and 3993 defMTcheckrlist1233994 deftempb13995 deftempc23996 MTiffalse3997 MTexpcsMTmaptlistc3998 MTMTpermutelist tempaMTextracontext sizes3999 MTcheckrange4000

MTcheckrange recurse through the list of existing ranges4001 defMTcheckrange1expandafterMTcheckrange 1

MTcheckrange tempb and tempc are lower resp upper bound of the new range lang1rang and lang2rangthose of the existing range lang3rang is the list name

4002 defMTcheckrange1234003 MTifdim2=mne4004 MTifdimtempc=mne

bull Both items are simple sizes

4005 MTifdimtempb=1MTiftruerelax4006

bull Item in list is a simple size new item is a range

4007 MTifdimtempbgt1relax4008 MTifdimtempcgt14009 MTiftrue4010 edeftempb1 (with range tempbspace to tempc)4011 relax4012 4013 4014 4015 MTifdimtempc=mne

bull Item in list is a range new item is a simple size

4016 MTifdimtempblt24017 MTifdimtempblt1relaxMTiftrue4018 relax4019

bull Both items are ranges

4020 MTifdimtempblt24021 MTifdimtempcgt14022 MTiftrue4023 edeftempb1 to 2 (with range tempbspace to tempc)4024 relax4025 relax4026 4027 4028 ifMTif

IMPLEMENTATION Package options 125

4029 MTifstreq34030 csname MTMTpermutelist csname MTMTpermutelist nameendcsname loadendcsname4031 relax4032 MTwarningnameuseMTabbrMTpermutelist list4033 `nameuseMTMTpermutelist namersquo will overrideMessageBreak4034 list `3rsquo for font tempaMessageBreak size tempb4035

If wersquove already found a conflict with this item we can skip the rest of the list

4036 expandafterMTtlistbreak4037 fi4038

144 Package options1441 Declaring the options

ifMToptexpansion

ifMToptauto

ifMToptDVI

Keep track of whether the user explicitly set these options4039 newififMToptexpansion4040 newififMToptauto4041 newififMToptDVI

MToptwarnadmissible Some warnings4042 defMToptwarnadmissible124043 MTwarningnl`1rsquo is not an admissible value for optionMessageBreak4044 `2rsquo Assuming `falsersquo4045

MToptwarnnan

4046 langpackagerang4047 langpackage|letterspacerang4048 langplainrangMTrequireslatex14049 defMToptwarnnan124050 MTwarningnlValue `1rsquo for option `2rsquo is not aMessageBreak number4051 Using default value of numbernameuseMT2default4052 4053 langplainrangrelax4054 langpackage|letterspacerang4055 langpackagerang

MToptdefset

4056 defMToptdefset14057 MTifdefinednTFMTtempb setMTval4058 MTxdefnMTtempb setnameMTval4059 4060 MTxdefnMTtempb setnamenameuseMTdefaulttempb set4061 MTwarningnlThe 1 set `MTvalrsquo is undeclaredMessageBreak4062 Using set `nameuseMTtempb setnamersquo instead4063 4064

expansion and protrusion may be true false compatibility nocompatibilityandor a langset namerang

4065 MTmapclistnprotrusionexpansion4066 definekeyMT1[true]4067 csname MTopt1trueendcsname4068 MTmapclistn14069 KVspdefMTval14070 MTifemptyMTvalrelax4071 csname MT1trueendcsname4072 edeftempbcsname MTrbba1endcsname4073 MTifstreqMTvaltruerelax

IMPLEMENTATION Package options 126

4074 4075 MTifstreqMTvalfalse4076 csname MT1falseendcsname4077 4078 MTifstreqMTvalcompatibility4079 MTletncMTtempb levelne4080 4081 MTifstreqMTvalnocompatibility4082 MTletncMTtempb leveltw4083

If everything failed it should be a set name4084 MToptdefset14085 4086 4087 4088 4089 4090 4091 4092

activate is a shortcut for protrusion and expansion4093 definekeyMTactivate[true]4094 setkeysMTprotrusion=14095 setkeysMTexpansion=14096

spacing kerning and tracking do not have a compatibility level4097 MTmapclistnspacingkerningtracking4098 definekeyMT1[true]4099 MTmapclistn14100 KVspdefMTval14101 MTifemptyMTvalrelax4102 csname MT1trueendcsname4103 MTifstreqMTvaltruerelax4104 4105 MTifstreqMTvalfalse4106 csname MT1falseendcsname4107 4108 edeftempbcsname MTrbba1endcsname4109 MToptdefset14110 4111 4112 4113 4114 4115

MTdefboolopt The truefalse options draft final (may be inherited from the class options)auto selected babel DVIoutput defersetup copyfonts

4116 defMTdefboolopt124117 definekeyMT1[true]4118 deftempa14119 MTifstreqtempatruerelax4120 MTifstreqtempafalserelax4121 MToptwarnadmissible114122 deftempafalse4123 4124 4125 24126 4127

Boolean options that only set the switch

IMPLEMENTATION Package options 127

4128 MTmapclistndraftselectedbabel4129 MTdefboolopt1csname MT1tempaendcsname4130 MTdefbooloptautocsname MTautotempaendcsname MToptautotrue

The DVIoutput option will change pdfoutput immediately to minimise the risk ofconfusing other packages

4131 langpackagerang4132 langpdftex-def|luatex-def|xetex-defrang4133 langluatex-defrangMTrequiresluatex4letpdfoutputoutputmoderelax4134 MTdefbooloptDVIoutput4135 csname iftempaendcsname4136 langpdftex-def|luatex-defrang4137 ifnumpdfoutputgtz MToptDVItrue fi4138 pdfoutputz4139 else4140 ifnumpdfoutputltne MToptDVItrue fi4141 pdfoutputne4142 langpdftex-def|luatex-defrang4143 langxetex-defrang MTwarningnlIgnoring `DVIoutputrsquo option4144 fi4145 4146 langpdftex-def|luatex-def|xetex-defrang

Setting the defersetup option to false will restore the old behaviour where thesetup took place at the time when the package was loaded This is undocumentedsince I would like to learn about the cases where this is necessary

The only problem with the new deferred setup I can think of is when a boxis being constructed inside the preamble and this box contains a font that is notloaded before the box is being used

4147 langpackagerang4148 MTdefbooloptdefersetup4149 csname iftempaendcsname else4150 AtEndOfPackage4151 MTsetup4152 letMTsetupempty4153 letMTaddtosetupfirstofone4154 4155 fi4156 4157 langpackagerang

copyfonts will copy all fonts before setting them up This allows protrusion andexpansion with different parameters This options is also undocumented in the hopethat we can always find out automatically whether itrsquos required It also works withLuaTEX 030 or newer

4158 langpdftex-def|luatex-defrang4159 langpdftex-defrangMTrequirespdftex74160 MTdefbooloptcopyfonts4161 csname iftempaendcsname4162 MTgletMTcopyfontMTcopyfont4163 else4164 MTgletMTcopyfontrelax4165 fi4166 4167 langpdftex-defrang4168 langpdftex-def|luatex-defrang4169 langpdftex-def|xetex-defrang4170 MTdefbooloptcopyfonts4171 csname iftempaendcsname4172 MTerror4173 langpdftex-defrang The pdftex version you are using is too oldMessageBreak4174 langpdftex-defrang to use the `copyfontsrsquo optionUpgrade pdftex

IMPLEMENTATION Package options 128

4175 langxetex-defrang The `copyfontsrsquo option does not work with xetex4176 langxetex-defrang Use pdftex or luatex instead4177 fi4178 4179 langpdftex-defrang4180 langpdftex-def|xetex-defrang

final is the opposite to draft4181 langpackagerang4182 MTdefbooloptfinal4183 csname iftempaendcsname4184 MTdraftfalse4185 else4186 MTdrafttrue4187 fi4188

For verbose output we redefine MTvinfo4189 definekeyMTverbose[true]4190 letMTvinfoMTinfonl4191 deftempa14192 MTifstreqtempatruerelax

Take problems seriously4193 MTifstreqtempaerrors4194 letMTwarning MTwarnerr4195 letMTwarningnlMTwarnerr4196 4197 letMTvinfogobble

Cast warnings to the winds4198 MTifstreqtempasilent4199 letMTwarning MTinfo4200 letMTwarningnlMTinfonl4201 4202 MTifstreqtempafalserelaxMToptwarnadmissible1verbose4203 4204 4205 4206 4207 langpackagerang

Options with numerical keys factor stretch shrink step letterspace4208 langpackage|letterspacerang4209 langplainrangMTrequireslatex14210 MTmapclistn4211 langpackagerang stretchshrinkstep4212 letterspace4213 definekeyMT1[csname MT1defaultendcsname]4214 deftempa1

No nonsense in MTfactor et al A space terminates the number4215 MTifinttempa4216 MTedefnMT1tempa4217 MToptwarnnan114218 4219 4220 langplainrangrelax4221 langpackage|letterspacerang

factor will define the protrusion factor only4222 langpackagerang4223 definekeyMTfactor[MTfactordefault]4224 deftempa1 4225 MTifinttempa

IMPLEMENTATION Package options 129

4226 edefMTprfactortempa4227 MToptwarnnan1factor4228

Unit for protrusion codes4229 definekeyMTunit[character]4230 deftempa14231 MTifstreqtempacharacterrelax4232 MTifdimentempa4233 letMTprunittempa4234 MTwarningnl`temparsquo is not a dimensionMessageBreak4235 Ignoring it and setting values relative toMessageBreak4236 character widths4237 4238

1442 Loading the definition file

MTendinput Abort if no capable engine found4239 letMTendinputrelax

4240 ifxMTenginerelax4241 MTwarningnlYou donrsquot seem to be using pdftex luatex or xetexMessageBreak4242 `MTMTrsquo only works with these enginesMessageBreak4243 I will quit now4244 MTclearoptions4245 else

Otherwise load the engine-specific code (as strewn across this file)4246 inputmicrotype-MTengine texdef4247 fi4248 MTendinput

1443 Reading the configuration file

The package should just work if called without any options Therefore expansionwill be switched off by default if output is DVI since it isnrsquot likely that expandedfonts are available (This grows more important as modern TEX systems haveswitched to the pdfTEX engine even for DVI output so that the user might not evenbe aware of the fact that shersquos running pdfTEX)

4249 MTprotrusiontrue4250 langpackagerang4251 langpdftex-def|luatex-defrang4252 ifnumpdfoutputltne else

Also we only enable expansion by default if pdfTEX can expand the fonts automat-ically

4253 langpdftex-defrang MTrequirespdftex44254 MTexpansiontrue4255 langpdftex-defrang MTautotrue4256 langpdftex-defrang relax4257 fi4258 langluatex-defrangMTautotrue4259 langpdftex-def|luatex-defrang

The main configuration file will be loaded before processing the package optionsMTconfigfile

MTgetconfig

However the config option must of course be evaluated beforehand We also haveto define a no-op for the regular option processing later

4260 langpackagerang4261 definekeyMTconfig[]relax4262 defMTgetconfig1config=23nil

IMPLEMENTATION Package options 130

4263 MTifempty24264 defMTconfigfileMTMTcfg4265 defMTconfigfile2cfg4266 4267 expandafterexpandafterexpandafterMTgetconfig4268 csname optcurrnamecurrextendcsnameconfig=nil

Load the file4269 IfFileExistsMTconfigfile4270 MTinfonlLoading configuration file MTconfigfile4271 MTbegincatcodes4272 letMTbegincatcodesrelax4273 letMTendcatcodesrelax4274 letMTcurrfileMTconfigfile4275 inputMTconfigfile4276 endgroup4277 MTwarningnl4278 Could not find configuration file `MTconfigfilersquoMessageBreak4279 This will almost certainly cause undesired resultsMessageBreak4280 Please fix your installation4281

MTcheckactiveset We have to make sure that font sets are active If the user didnrsquot activate any weuse those sets declared by DeclareMicrotypeSetDefault (this is done at the endof the preamble)

4282 defMTcheckactiveset14283 MTifdefinednTFMT1setname4284 MTinfonlUsing nameuseMTabbr1 set `nameuseMT1setnamersquo4285 4286 MTifdefinednTFMTdefault1set4287 MTgletnnMT1setnameMTdefault1set4288 MTinfonlUsing default nameuseMTabbr1 set `nameuseMT1setnamersquo4289

If no default font set has been declared in the main configuration file we use the(empty non-existent) set lsquorsquo and issue a warning

4290 MTgdefnMT1setname4291 MTwarningnlNo nameuseMTabbr1 set chosen no default set declared4292 MessageBreak Using empty set4293 4294 4295

1444 Hook for other packages

MicrotypeHook This hook may be used by font package authors eg to declare alias fonts If itis defined it will be executed here ie after the main configuration file has beenloaded and before the package options are evaluated

This hook was needed in versions prior to 19a to overcome the situation that(1) the microtype package should be loaded after all font defaults have been setup (hence using ifpackageloaded in the font package was not viable) and(2) checking AtBeginDocument could be too late since fonts might already havebeen loaded and consequently set up in the preamble With the new deferredsetup one could live without this command however it remains here since itrsquossimpler than testing whether the package 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 packages arenrsquot overwritten Example

IMPLEMENTATION Package options 131

defMinionProMTHookDeclareMicrotypeAliasMinionPro-LFMinionProifpackageloadedmicrotype MinionProMTHook ifundefinedMicrotypeHook letMicrotypeHookMinionProMTHook gaddtomacroMicrotypeHookMinionProMTHook

MicroTypeHook with a capital T (which only existed in version 17) is providedfor compatibility reasons At some point in the future it will no longer be availablehence it should not be used

4296 MTifdefinedcTMicroTypeHookMTwarning4297 Command stringMicroTypeHookspace is deprecatedMessageBreak4298 Use stringMicrotypeHookspace insteadMicroTypeHook4299 MTifdefinedcTMicrotypeHookMicrotypeHook

1445 Changing options later

microtypesetup

MTdefineoptionX

Inside the preamble microtypesetup accepts the same options as the package (un-less defersetup=false) In the document body it accepts the options protrusionexpansion activate tracking spacing and kerning Specifying font sets is notallowed

4300 defmicrotypesetupsetkeysMT4301 MTaddtosetupdefmicrotypesetup1setkeysMTX1selectfont4302 langpackagerang4303 langpdftex-def|luatex-def|xetex-defrang4304 defMTdefineoptionX124305 definekeyMTX1[true]4306 edeftempbcsname MTrbba1endcsname4307 MTmapclistn14308 KVspdefMTval14309 MTifemptyMTvalrelax4310 tempcnta=mne4311 MTifstreqMTvaltrue

Enabling micro-typography in the middle of the document is not allowed if it hasbeen disabled in the package options since fonts might already have been loadedand hence wouldnrsquot be set up

4312 MTchecksetup14313 tempcnta=csname MTtempb levelendcsname4314 MTvinfoEnabling 14315 (level numbercsname MTtempb levelendcsname)online4316 4317 4318 MTifstreqMTvalfalse4319 tempcnta=z4320 MTvinfoDisabling 1online4321 4322 MTifstreqMTvalcompatibility4323 MTchecksetup14324 tempcnta=ne4325 MTletncMTtempb levelne4326 MTvinfoSetting 1 to level 1online4327 4328 4329 MTifstreqMTvalnocompatibility4330 MTchecksetup14331 tempcnta=tw4332 MTletncMTtempb leveltw4333 MTvinfoSetting 1 to level 2online4334 4335 MTerrorValue `MTvalrsquo for key `1rsquo not recognised

IMPLEMENTATION Package options 132

4336 Use any of `truersquo `falsersquo `compatibilityrsquo or4337 `nocompatibilityrsquo4338 4339 4340 4341 4342 ifnumtempcntagtmne4343 2tempcntarelax4344 fi4345 4346 4347 4348

MTchecksetup Test whether the feature wasnrsquot disabled in the package options4349 defMTchecksetup14350 csname ifMT1endcsname4351 expandafterfirstofone4352 else4353 MTerrorYou cannot enable 1 if it was disabledMessageBreak4354 in the package optionsLoad microtype with 1 enabled4355 expandaftergobble4356 fi4357

4358 MTdefineoptionXprotrusionMTprotrudechars4359 langpdftex-def|luatex-def|xetex-defrang4360 langpdftex-def|luatex-defrang4361 MTdefineoptionXexpansionMTadjustspacing

MTprotrudechars

MTadjustspacing 4362 langluatex-defrang4363 MTrequiresluatex44364 letpdfprotrudecharsprotrudechars4365 letpdfadjustspacingadjustspacing4366 relax4367 langluatex-defrang4368 letMTprotrudecharspdfprotrudechars4369 letMTadjustspacingpdfadjustspacing4370 langpdftex-def|luatex-defrang4371 langxetex-defrang4372 letMTprotrudecharsXeTeXprotrudechars4373 definekeyMTXexpansion[true]MTwarningIgnoring expansion setup4374 langxetex-defrang

MTdefineoptionX The same for tracking spacing and kerning which do not have a compatibilitylevel

4375 langpdftex-def|luatex-defrang4376 langpdftex-defrangMTrequirespdftex64377 langluatex-defrangMTrequiresluatex34378 defMTdefineoptionX124379 definekeyMTX1[true]4380 MTmapclistn14381 KVspdefMTval14382 MTifemptyMTvalrelax4383 tempcnta=mne4384 MTifstreqMTvaltrue4385 MTchecksetup14386 tempcnta=ne4387 MTvinfoEnabling 1online4388 4389 4390 MTifstreqMTvalfalse4391 tempcnta=z4392 MTvinfoDisabling 1online

IMPLEMENTATION Package options 133

4393 MTerrorValue `MTvalrsquo for key `1rsquo not recognised4394 Use either `truersquo or `falsersquo4395 4396 4397 ifnumtempcntagtmne4398 2relax4399 fi4400 4401 4402 4403

We cannot simply let MTtracking relax since this may select the already letter-spaced font instance

4404 MTdefineoptionXtrackingifnumtempcnta=z letMTtrackingMTsettrzero4405 else letMTtrackingMTtracking fi4406 langpdftex-defrang MTdefineoptionXspacingpdfadjustinterwordgluetempcnta4407 langpdftex-defrang MTdefineoptionXkerningpdfprependkerntempcnta4408 langpdftex-defrang pdfappendkerntempcnta4409 4410 langpdftex-def|luatex-defrang4411 langpdftex-def|luatex-def|xetex-defrang

Disable for older pdfTEX versions and for XETEX and LuaTEX4412 definekeyMTXtracking[true]MTwarningIgnoring tracking setup4413 langluatex-defrang4414 definekeyMTXkerning[true]MTwarningIgnoring kerning setup4415 definekeyMTXspacing[true]MTwarningIgnoring spacing setup4416 langpdftex-defrang4417 definekeyMTXactivate[true]4418 setkeysMTXprotrusion=14419 langpdftex-def|luatex-defrang setkeysMTXexpansion=14420 4421 langpdftex-def|luatex-def|xetex-defrang

MTsavedsetupfont Disable everything ndash may be used as a temporary work-around in case setting upfonts doesnrsquot work under certain circumstances but only until that specific problemis fixed This is undocumented as it completely deprives us of the possibility to act ndashwersquore blind and paralysed

4422 langpackagerang4423 letMTsavedsetupfontMTsetupfont

4424 definekeyMTXdisable[]4425 MTinfoInactivate `MTMTrsquo package4426 letMTsetupfontrelax4427 4428 definekeyMTXenable[]4429 MTinfoReactivate `MTMTrsquo package4430 letMTsetupfontMTsavedsetupfont4431 4432 langpackagerang

1446 Processing the options

MTProcessOptionsWithKV Parse options4433 langpackage|letterspacerang4434 langplainrangMTrequireslatex14435 defMTProcessOptionsWithKV14436 lettempcrelax4437 letMTtempempty4438 langplainrang MTrequireslatex24439 MTmapclistcclassoptionslist4440 defCurrentOption1

IMPLEMENTATION Package options 134

4441 MTifdefinednTKV1expandafterMTgetkeyCurrentOption=nil4442 edefMTtempMTtempCurrentOption4443 expandtwoargsremoveelementCurrentOption4444 unusedoptionlistunusedoptionlist4445 4446 4447 edefMTtempnoexpandsetkeys14448 MTtempptionlistcurrnamecurrext

eplain can handle package options4449 langplainrang4450 edefMTtempnoexpandsetkeys14451 csname usepkgoptionsusepkgpkgendcsname4452 langplainrang4453 MTtemp4454 MTclearoptions4455

MTgetkey For key=val in class options4456 defMTgetkey1=2nil1

4457 MTProcessOptionsWithKVMT4458 langplainrangrelax4459 langpackage|letterspacerang4460 langpackagerang

Now we can take the appropriate actions We also tell the log file which optionsthe user has chosen (in case itrsquos interested)

4461 MTaddtosetup4462 ifMTdraft

We disable most of what wersquove just defined in the 4462 lines above if we arerunning in draft mode

4463 MTwarningnl`draftrsquo option activeMessageBreak4464 Disabling all micro-typographic extensionsMessageBreak4465 This might lead to different line and page breaks4466 letMTsetupfontrelax4467 renewcommandLoadMicrotypeFile[1]4468 renewcommandmicrotypesetup[1]4469 renewcommandmicrotypecontext[1]4470 renewcommandlsstyle4471 else4472 MTsetupPDF4473 MTsetupcopies

Fix the font sets4474 MTmaptlistcMTfontsetsMTfixfontset4475 MTsetupprotrusion4476 MTsetupexpansion4477 MTsetuptracking4478 MTsetupwarntracking4479 MTsetupspacing4480 MTsetupkerning4481 MTsetupnoligatures4482 4483 langpackagerang

MTsetupPDF pdfTEX can create DVI output too However both the DVI viewer and dvips needto find actual fonts Therefore expansion will only work if the fonts for differentdegrees of expansion are readily available

Some packages depend on the value of pdfoutput and will get confused if it ischanged after they have been loaded These packages are among others colorgraphics hyperref crop contour pstricks and as a matter of course ifpdf

IMPLEMENTATION Package options 135

Instead of testing for each package (thatrsquos not our job) we only say that it wasmicrotype that changed it This must be sufficient

4484 langpdftex-def|luatex-defrang4485 defMTsetupPDF4486 MTinfonlGenerating ifnumpdfoutputltne DVI else PDF fi output4487 ifMToptDVIspace (changed by MTMT)fi4488

MTsetupcopies Working on font copies4489 defMTsetupcopies4490 ifxMTcopyfontrelaxelse MTinfonlUsing font copies for contextsfi4491 4492 langpdftex-def|luatex-defrang4493 langxetex-defrang4494 letMTsetupPDFrelax4495 letMTsetupcopiesrelax4496 langxetex-defrang

MTsetupprotrusion Protrusion4497 langpdftex-def|xetex-def|luatex-defrang4498 defMTsetupprotrusion4499 ifMTprotrusion4500 edefMTactivefeaturesMTactivefeaturespr4501 MTprotrudecharsMTprlevel4502 MTinfonlCharacter protrusion enabled (level numberMTprlevel)4503 ifnumMTprfactor=MTfactordefault elseMessageBreak4504 factor numberMTprfactorfi4505 ifxMTprunitempty elseMessageBreak unit MTprunitfi4506 MTcheckactivesetpr4507 else4508 letMTprotrusionrelax4509 MTinfonlNo character protrusion4510 fi4511 4512 langpdftex-def|xetex-def|luatex-defrang

MTsetupexpansion For DVI output the user must have explicitly passed the expansion option tothe package Under LuaTEX expansion works quite differently the glyphs willbe positioned as if they were transformed without actually being transformedSince this could still be considered a viable option we donrsquot disable the featurecompletely but issue a warning

4513 langpdftex-def|luatex-defrang4514 defMTsetupexpansion4515 ifnumpdfoutputltne4516 ifMToptexpansion4517 langluatex-defrang4518 ifMTexpansion4519 MTrequiresluatex34520 MTwarningnlFont expansion doesnrsquot work properly with luatex inMessageBreak4521 DVI mode the glyphs wonrsquot be actually transformedMessageBreak4522 but will only be shifted You might want to useMessageBreak4523 pdflatex instead Irsquoll continue anyway 4524 MTexpansionfalse4525 relax4526 fi4527 langluatex-defrang4528 else4529 MTexpansionfalse4530 fi4531 fi4532 ifMTexpansion

Set up the values for font expansion if stretch has not been specified we take the

IMPLEMENTATION Package options 136

default value of 204533 ifnumMTstretch=mne4534 letMTstretchMTstretchdefault4535 fi

If shrink has not been specified it will inherit the value from stretch4536 ifnumMTshrink=mne4537 letMTshrinkMTstretch4538 fi

If step has not been specified we will just set it to 1 for recent pdfTEX versions Mytests did not show much difference neither in compilation time (within the marginof error) nor in file size (less than 1 difference for microtypepdf with step=1compared to step=5) With older versions we set it to min(stretchshrink)5rounded off minimum value 1

4539 ifnumMTstep=mne4540 langpdftex-defrang MTrequirespdftex64541 defMTstep1 4542 langpdftex-defrang4543 4544 ifnumMTstretchgtMTshrink4545 ifnumMTshrink=z4546 tempcnta=MTstretch4547 else4548 tempcnta=MTshrink4549 fi4550 else4551 ifnumMTstretch=z4552 tempcnta=MTshrink4553 else4554 tempcnta=MTstretch4555 fi4556 fi4557 dividetempcnta 5relax4558 ifnumtempcnta=z tempcnta=ne fi4559 edefMTstepnumbertempcntaspace4560 4561 langpdftex-defrang4562 fi4563 ifnumMTstep=z4564 MTwarningnlThe expansion step cannot be set to zeroMessageBreak4565 Setting it to one4566 defMTstep1 4567 fi

MTauto Automatic expansion of the font This new feature of pdfTEX 120 makes thehz programme really usable It must be either lsquoautoexpandrsquo or empty (or lsquo1000rsquo forolder versions of pdfTEX) With LuaTEX we just leave it empty as therersquos actuallyno difference ndash non-automatic font expansion doesnrsquot work anymore In LuaTEX106 the lsquoautoexpandrsquo option seems to have been removed altogether and wouldtrigger a warning

4568 letMTautoempty4569 ifMTauto

We turn off automatic expansion if output mode is DVI4570 langpdftex-defrang4571 MTrequirespdftex44572 ifnumpdfoutputltne4573 ifMToptauto4574 MTerror4575 Automatic font expansion only works for PDF outputMessageBreak4576 However you are creating a DVI file

IMPLEMENTATION Package options 137

4577 If you have created expanded fonts instances remove `autorsquo from4578 MessageBreak the package options Otherwise you have to switch4579 off expansionMessageBreak completely4580 fi4581 MTautofalse4582 else4583 defMTautoautoexpand4584 fi

Also if pdfTEX is too old4585 4586 MTerror4587 The pdftex version you are using is too old forMessageBreak4588 automatic font expansion4589 If you have created expanded fonts instances remove `autorsquo fromMessageBreak4590 the package options Otherwise you have to switch off expansionMessageBreak4591 completely or upgrade pdftex to version 120 or newer4592 MTautofalse4593 defMTauto1000 4594 4595 langpdftex-defrang4596 langluatex-defrang MTrequiresluatex3relaxdefMTautoautoexpand4597 else4598 langpdftex-defrang

No automatic expansion4599 MTrequirespdftex4relax4600 defMTauto1000 4601 4602 langpdftex-defrang4603 langluatex-defrang4604 MTrequiresluatex34605 ifMToptauto4606 MTerrorNon-automatic font expansion does not work withMessageBreak4607 luatexRemove `auto=falsersquo from the package options or use pdftex4608 MTautotrue4609 fi4610 relax4611 langluatex-defrang4612 fi

Choose the appropriate macro for selected expansion4613 ifMTselected4614 letMTsetexcodesMTsetexcodess4615 else4616 letMTsetexcodesMTsetexcodesn4617 fi

Filter out stretch=0shrink=0 since it would result in a pdfTEX error4618 ifnumMTstretch=z4619 ifnumMTshrink=z4620 MTwarningnl4621 Both the stretch and shrink limit are set to zeroMessageBreak4622 Disabling font expansion4623 MTexpansionfalse4624 fi4625 fi4626 fi4627 ifMTexpansion4628 edefMTactivefeaturesMTactivefeaturesex4629 MTadjustspacingMTexlevel4630 MTinfonlifMTauto Aelse Non-afi utomatic font expansion enabled4631 (level numberMTexlevel)MessageBreak4632 stretch numberMTstretch shrink numberMTshrink4633 step numberMTstep ifMTselectedelse non-fi selected

IMPLEMENTATION Package options 138

MTcheckstep Check whether stretch and shrink are multiples of step4634 defMTcheckstep14635 tempcnta=csname MT1endcsname4636 dividetempcnta MTstep4637 multiplytempcnta MTstep4638 ifnumtempcnta=csname MT1endcsnameelse4639 MTwarningnlThe 1 amount is not a multiple of stepMessageBreak4640 The effective maximum 1 is thetempcntaspace4641 (step numberMTstep)4642 fi4643 4644 MTcheckstepstretch4645 MTcheckstepshrink4646 MTcheckactivesetex

showhyphens Inside showhyphens font expansion should be disabled (Since 20170110 theLATEX format contains a different version for XETEX but since expansion doesnrsquotwork with XETEX we donrsquot have to bother) Since 20191001 the command isrobust

4647 MTifdefinednTFshowhyphens 4648 defMTtemp124649 expandafterCheckCommandcsname showhyphens endcsname[1]14650 DeclareRobustCommandshowhyphens[1]24651 4652 defMTtemp124653 CheckCommandshowhyphens[1]14654 gdefshowhyphens124655 4656 MTtemp4657 setbox0vboxcolorbegingroup4658 everyparparfillskipzskip4659 hsizemaxdimennormalfontpretolerancemnetolerancemne4660 hbadnesszshowboxdepthz 1colorendgroup4661 setbox0vboxcolorbegingrouppdfadjustspacingz4662 everyparparfillskipzskip4663 hsizemaxdimennormalfontpretolerancemnetolerancemne4664 hbadnesszshowboxdepthz 1colorendgroup

4665 else4666 letMTexpansionrelax4667 MTinfonlNo font expansion4668 fi4669 4670 langpdftex-def|luatex-defrang4671 langxetex-defrang4672 defMTsetupexpansion4673 ifMTexpansion4674 ifMToptexpansion4675 MTerrorFont expansion does not work with xetex4676 Use pdftex or luatex instead4677 fi4678 fi4679 4680 langxetex-defrang

MTsetuptracking Tracking spacing and kerning4681 langpdftex-def|luatex-defrang4682 langpdftex-defrangMTrequirespdftex64683 langluatex-defrangMTrequiresluatex34684 defMTsetuptracking4685 ifMTtracking4686 edefMTactivefeaturesMTactivefeaturestr4687 MTinfonlTracking enabled4688 MTcheckactivesettr

IMPLEMENTATION Package options 139

Enable protrusion for compensation at the line edges4689 ifMTprotrusionelseMTprotrudecharsnefi4690 else4691 letMTtrackingrelax4692 MTinfonlNo adjustment of tracking4693 fi4694 4695 langpdftex-def|luatex-defrang

MTsetupspacing

4696 langpdftex-defrang4697 defMTsetupspacing4698 ifMTspacing4699 edefMTactivefeaturesMTactivefeaturessp4700 pdfadjustinterwordgluene4701 MTinfonlAdjustment of interword spacing enabled

The ragged2e package sets interword spaces to a fixed value without glue microtypersquosmodifications can therefore have undesired effects Therefore we issue a warning

4702 MTwithpackageTragged2e4703 MTwarningnlYou are using the `ragged2ersquo packageMessageBreak4704 Adjustment of interword spacing may lead toMessageBreak4705 undesired results when used with `ragged2ersquoMessageBreak4706 In this case disable the `spacingrsquo option4707 4708 MTcheckactivesetsp4709 else4710 letMTspacingrelax4711 MTinfonlNo adjustment of interword spacing4712 fi4713

MTsetupspacingcheck Warning if nonfrenchspacing is active since space factors will be ignoredwith pdfadjustinterwordglue gt0 Why 1500 Because some packages redefinefrenchspacing16

4714 defMTsetupspacingcheck4715 ifMTspacing4716 ifMTbabel else4717 ifnumsfcode` gt 15004718 MTifstreqMTspcontextnonfrenchrelax4719 MTwarningnl4720 stringnonfrenchspacingspace is active Adjustment ofMessageBreak4721 interword spacing will disable it You might wantMessageBreak4722 to add `backslashcharMTMT contextspacing=nonfrenchrsquoMessageBreak4723 to your preamble4724 4725 fi4726 fi4727 fi4728

MTsetupkerning

4729 defMTsetupkerning4730 ifMTkerning4731 edefMTactivefeaturesMTactivefeatureskn4732 pdfprependkernne4733 pdfappendkernne4734 MTinfonlAdjustment of character kerning enabled4735 MTcheckactivesetkn4736 else4737 letMTkerningrelax

16 Cf the ctt thread lsquofrenchspacing with AMS packages and babelrsquo started by Philipp Lehman on16 August 2005 MID ddtbaj$rob$1onlinede

IMPLEMENTATION Package options 140

4738 MTinfonlNo adjustment of character kerning4739 fi4740 4741 langpdftex-defrang

MTerrordoesntwork If pdfTEX is too old we disable tracking spacing and kerning and throw an errormessage We also switch the features off for LuaTEX and XETEX

4742 langpdftex-def|luatex-defrang4743 langluatex-defrang4744 defMTsetuptracking4745 ifMTtracking4746 MTerrorThe tracking feature only works with luatex 062MessageBreak4747 or newer Switching it offUpgrade luatex4748 MTtrackingfalse4749 MTletncMTtrackingrelax4750 else4751 MTinfonlNo adjustment of tracking (luatex too old)4752 fi4753 4754 4755 langluatex-defrang4756 langpdftex-def|xetex-def|luatex-defrang4757 defMTerrordoesntwork14758 csname ifMT1endcsname4759 MTerrorThe 1 feature only works with pdftex 140MessageBreak4760 or newer Switching it off4761 langpdftex-defrang Upgrade pdftex4762 langluatex-def|xetex-defrang Use pdftex instead4763 csname MT1falseendcsname4764 MTletncMT1relax4765 else4766 MTinfonlNo adjustment of 14767 langpdftex-defrang space(pdftex too old)4768 4769 fi4770 4771 langpdftex-def|xetex-defrang defMTsetuptrackingMTerrordoesntworktracking4772 defMTsetupkerning MTerrordoesntworkkerning4773 defMTsetupspacing MTerrordoesntworkspacing4774 langpdftex-defrang4775 langpdftex-def|xetex-def|luatex-defrang

MTsetupwarntracking

4776 langletterspacerangMTaddtosetup4777 langpdftex-def|luatex-defrangdefMTsetupwarntracking

MTwarntrackingDVI With pdfTEX we issue a warning when letterspacing in DVI mode since it willprobably not work We also switch on protrusion if it isnrsquot already to compensatefor the letterspacing kerns

4778 langpdftex-def|luatex-def|letterspacerang4779 4780 langpdftex-def|letterspacerang4781 ifnumpdfoutputltne4782 defMTwarntrackingDVI4783 langletterspacerang MTpdforlua4784 MTwarningnl4785 You are using trackingletterspacing in DVI modeMessageBreak4786 This will probably not work unless the post-MessageBreak4787 processing program (dvips dvipdfm(x) ) isMessageBreak4788 able to create the virtual fonts on the fly4789 langletterspacerang relax4790 MTgletMTwarntrackingDVIrelax4791 4792 else

IMPLEMENTATION Package options 141

4793 langpdftex-def|letterspacerang4794 defMTwarntrackingDVI4795 ifnumpdfprotrudecharsltne globalpdfprotrudecharsne fi4796 MTgletMTwarntrackingDVIrelax4797 4798 langpdftex-def|letterspacerang fi

4799 ifnumMTletterspace=mne4800 letMTletterspaceMTletterspacedefault4801 else4802 MTlstoolargeMTletterspace4803 fi4804 4805 langpdftex-def|luatex-def|letterspacerang4806 langxetex-defrangletMTsetupwarntrackingrelax

MTsetupnoligatures DisableLigatures is only admissible in the preamble therefore we can nowdisable the corresponding macro if it was never called

4807 langpdftex-def|luatex-defrang4808 defMTsetupnoligatures4809 langpdftex-defrang MTrequirespdftex54810 ifMTnoligatures else4811 letMTnoligaturesrelax4812 fi4813 langpdftex-defrang relax4814 4815 langpdftex-def|luatex-defrang4816 langxetex-defrangletMTsetupnoligaturesrelax

Remove the leading comma in MTactivefeatures and set the document switchto true

4817 langpackagerang4818 MTaddtosetup4819 ifxMTactivefeaturesempty else4820 edefMTactivefeaturesexpandaftergobbleMTactivefeatures4821 fi4822 MTdocumenttrue4823

MTsetbabelcontext Interaction with babel4824 defMTsetbabelcontext14825 MTifdefinednTFMTbabel14826 MTvinfo Changing to language context `1rsquoMessageBreakonline4827 expandafterMTexponenexpandaftermicrotypecontext4828 csname MTbabel1endcsname4829 4830 microtypecontextprotrusion=expansion=spacing=kerning=4831 4832

MTshorthandoff Active characters can only be switched off if babel isnrsquot loaded after microtype4833 ifpackageloadedbabel4834 defMTshorthandoff124835 MTinfonlSwitching off 1 babelrsquos active characters (2)4836 shorthandoff24837 4838 defMTshorthandoff124839 MTerrorYou must load `babelrsquo before `MTMTrsquo4840 Otherwise `MTMTrsquo cannot switch off 1 babelrsquosMessageBreak4841 active characters4842

We patch the language switching commands to enable language-dependent setup4843 MTaddtosetup4844 ifMTbabel

IMPLEMENTATION Package options 142

4845 ifpackageloadedbabel4846 MTinfonlRedefining babelrsquos language switching commands4847 letMTorigselectlanguageselectlanguage4848 defselectlanguage14849 MTorigselectlanguage14850 MTsetbabelcontext14851 4852 letMTorigforeignlanguageforeignlanguage4853 defforeignlanguage14854 MTorigforeignlanguage14855 MTsetbabelcontext14856 4857 ifMTkerning

Disable French babelrsquos active characters4858 MTiffalse4859 MTwithbabelandTfrench MTiftrue4860 MTwithbabelandTfrenchb MTiftrue4861 MTwithbabelandTfrancaisMTiftrue4862 MTwithbabelandTcanadienMTiftrue4863 MTwithbabelandTacadian MTiftrue4864 ifMTifMTshorthandoffFrenchfi

Disable Turkish babelrsquos active characters4865 MTiffalse4866 MTwithbabelandTturkish MTiftrue4867 ifMTifMTshorthandoffTurkish=fi4868 fi

In case babel was loaded before microtype4869 MTsetbabelcontextlanguagename4870 4871 MTwarningnlYou did not load the babel packageMessageBreak4872 The `babelrsquo option wonrsquot have any effect4873 4874 fi4875

Now we close the fi from ifMTdraft4876 MTaddtosetupfi

Set up the current font most likely the normal font This has to come after all ofthe setup (including anything from the preamble) has been dealt with

4877 selectfont

MTcurrfile This is the current file (hopefully with the correct extension)4878 edefMTcurrfilejobnametex4879 langpackagerang

Finally execute the setup macro at the end of the preamble and empty it (thecombine class calls it repeatedly)

4880 langpackage|letterspacerang4881 langplainrangMTrequireslatex14882 AtBeginDocumentMTsetup MTgletMTsetupempty4883 langplainrangrelax4884 langpackage|letterspacerang

Must come at the very very end4885 langpackagerangMTifdefinedcTMTsetupspacingcheck4886 langpackagerang AtBeginDocumentMTsetupspacingcheck

Restore catcodes4887 langpackage|letterspacerangMTrestorecatcodes

That was that

CONFIGURATION FILES 143

15 Configuration filesLetrsquos now write the font configuration files

4888 langconfigrang4889

151 Font setsWe first declare some sets in the main configuration file

4890 langm-trang4891 -----------------------------------------------------------------------4892 FONT SETS48934894 DeclareMicrotypeSetall4895 4896

4897 DeclareMicrotypeSetallmath4898 encoding = OT1T1T2ALY1OT4QXT5EU1EU2TUTS1OMLOMSU 48994900 DeclareMicrotypeSetalltext4901 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU 4902

4903 DeclareMicrotypeSetallmath-nott4904 encoding = OT1T1T2ALY1OT4QXT5EU1EU2TUTS1OMLOMSU4905 family = rmsf4906 49074908 DeclareMicrotypeSetalltext-nott4909 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU4910 family = rmsf4911 4912

4913 DeclareMicrotypeSetbasicmath4914 encoding = OT1T1T2ALY1OT4QXT5EU1EU2TUOMLOMS4915 family = rmsf4916 series = md4917 size = normalsizefootnotesizesmalllarge4918 49194920 DeclareMicrotypeSetbasictext4921 encoding = OT1T1T2ALY1OT4QXT5EU1EU2TU4922 family = rmsf4923 series = md4924 size = normalsizefootnotesizesmalllarge4925 4926

4927 DeclareMicrotypeSetsmallcaps4928 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU4929 shape = scsiscit4930 4931

4932 DeclareMicrotypeSetfootnotesize4933 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU4934 size = -small4935 49364937 DeclareMicrotypeSetscriptsize4938 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU

CONFIGURATION FILES Font variants and aliases 144

4939 size = -footnotesize4940 49414942 DeclareMicrotypeSetnormalfont4943 font = 4944

The default sets4945 -----------------------------------------------------------------------4946 DEFAULT SETS49474948 DeclareMicrotypeSetDefault[protrusion]alltext4949 DeclareMicrotypeSetDefault[expansion] alltext-nott4950 DeclareMicrotypeSetDefault[spacing] alltext-nott4951 DeclareMicrotypeSetDefault[kerning] alltext4952 DeclareMicrotypeSetDefault[tracking] smallcaps4953

152 Font variants and aliasesThese are the variants I happen to be using (expert encoding oldstyle numeralsswashes alternative display inferior and superior numerals) Additionally weadd the now common variants for Lining Tabular Oldstyle and Tabular Oldstylenumbers

4954 -----------------------------------------------------------------------4955 FONT VARIANTS AND ALIASES49564957 DeclareMicrotypeVariantsxjwad01-LF-TLF-OsF-TOsF

Other candidates 2 (proportional digits) e (engraved) f (Fraktur) g (small text)h (shadow) l (outline) n (informal) p (ornaments) r (roman) s (sans serif)t (typewriter) Irsquove omitted them since they seem hardly be used andor they areactually more than just a variant ie they shouldnrsquot share a file

Fonts that are lsquothe samersquo The fontspec package will set lmr as the default fontwhose declarations for EU1EU2TU encoding are in mt-LatinModernRomancfgSince 20161203 the default encoding with XETEX and LuaTEX in the LATEX formatis TU even if fontspec is not loaded

49584959 MTiffalse4960 ifxUnicodeEncodingNameundefinedelse4961 MTifstreqencodingdefaultUnicodeEncodingNameMTiftruerelax4962 fi4963 ifMTfontspecMTiftruefi4964 ifMTif4965 -- ComputerLatin Modern Roman4966 DeclareMicrotypeAliaslmrLatin Modern Roman4967 else4968 DeclareMicrotypeAliaslmrcmr lmodern4969 fi

The Latin Modern fonts the virtual fonts from the ae and zefonts and the eco andhfoldsty packages (oldstyle numerals) as well as mlmodern all inherit the (basic)settings from Computer Modern Roman Some of them are in part overwritten laterWe mustnrsquot forget the Latin Modern math fonts

4970 DeclareMicrotypeAliaslmsycmsy 4971 DeclareMicrotypeAliaslmm cmm 4972 DeclareMicrotypeAliasaer cmr ae4973 DeclareMicrotypeAliaszer cmr zefonts

CONFIGURATION FILES Font variants and aliases 145

4974 DeclareMicrotypeAliascmorcmr eco4975 DeclareMicrotypeAliashforcmr hfoldsty4976 DeclareMicrotypeAliasmlmrcmr mlmodern4977 DeclareMicrotypeAliasmlmsycmsy 4978 DeclareMicrotypeAliasmlmm cmm

Another new Computer Modern extension The newcomputermodern package loadsit by file name

4979 DeclareMicrotypeAliasNew Computer ModernLatin Modern Roman4980 DeclareMicrotypeAliasNewCM10-Bookotf Latin Modern Roman4981 DeclareMicrotypeAliasNewCM10-RegularotfLatin Modern Roman

The packages pxfonts and txfonts fonts inherit Palatino and Times settings re-spectively also the TEX Gyre fonts Pagella and Termes (formerly qfonts)

4982 -- Palatino4983 DeclareMicrotypeAliaspxr ppl pxfonts4984 DeclareMicrotypeAliasqpl ppl TeX Gyre Pagella (formerly qfontsQuasiPalatino)

The lsquoFPL Neursquo fonts a lsquore-implementationrsquo of Palatino4985 DeclareMicrotypeAliasfp9xpplx FPL Neu4986 DeclareMicrotypeAliasfp9jpplj

The newpx package a replacement for pxfonts4987 DeclareMicrotypeAliaszpllfpplx newpxtext4988 DeclareMicrotypeAliaszplosfpplj 4989 DeclareMicrotypeAliaszpltlfpplx 4990 DeclareMicrotypeAliaszpltosfpplj

The domitian package4991 DeclareMicrotypeAliasDomitian-TLF pplx domitian4992 DeclareMicrotypeAliasDomitian-TOsFpplj

The OpenType versions4993 DeclareMicrotypeAliasPalatino LinotypePalatino4994 DeclareMicrotypeAliasPalatino LT Std Palatino4995 DeclareMicrotypeAliasTeX Gyre Pagella Palatino4996 DeclareMicrotypeAliasDomitian Palatino4997 DeclareMicrotypeAliasAsana Math Palatino4998 -- Times New Roman4999 DeclareMicrotypeAliastxrptm txfonts

The newtx package a replacement for txfonts5000 DeclareMicrotypeAliasntxlfptmx newtxtext5001 DeclareMicrotypeAliasntxosfptmj 5002 DeclareMicrotypeAliasntxtlfptmx 5003 DeclareMicrotypeAliasntxtosfptmj

The tempora package5004 DeclareMicrotypeAliasTempora-TLF ptmx tempora5005 DeclareMicrotypeAliasTempora-TOsFptmj 5006 DeclareMicrotypeAliasqtmptm TeX Gyre Termes (formerly qfontsQuasiTimes)

The step package5007 DeclareMicrotypeAliasSTEP-TLF ptmx step5008 DeclareMicrotypeAliasSTEP-TOsFptmj

The stix and stix2 packages (the latter has departed a bit from being a Timesclone but still seems close enough)

5009 DeclareMicrotypeAliasstix ptm stix5010 DeclareMicrotypeAliasstix2ptm stix2

More Times variants to be checked pns mns (TimesNewRomanPS) mnt (Times-NewRomanMT TimesNRSevenMT) mtm (TimesSmallTextMT) pte (TimesEuropa)ptt (TimesTen) TimesEighteen TimesModernEF

CONFIGURATION FILES Interaction with babel 146

MicroPressrsquos Charter version (chmath)5011 -- Charter5012 DeclareMicrotypeAliaschrbch CH Math

The XCharter package extends the Charter fonts5013 DeclareMicrotypeAliasXCharter-TLF bch XCharter5014 DeclareMicrotypeAliasXCharter-TOsFbch

The mathdesign package provides math fonts matching Bitstream Charter and URWGaramond

5015 DeclareMicrotypeAliasmdbchbch mathdesignCharter5016 -- Garamond5017 DeclareMicrotypeAliasmdugmugm mathdesignURW Garamond

The garamondx package an extension of URW Garamond providing small caps andoldstyle figures

5018 DeclareMicrotypeAliaszgmxugm garamondx5019 DeclareMicrotypeAliaszgmjugm 5020 DeclareMicrotypeAliaszgmIugm 5021 DeclareMicrotypeAliaszgmqugm

Because a configuration file for Adobe Garamond wouldnrsquot be permitted for TEX Livedistribution we use EB Garamond as the base font

5022 DeclareMicrotypeAliaspad EBGaramond-LF Adobe Garamond5023 DeclareMicrotypeAliaspadxEBGaramond-TLF 5024 DeclareMicrotypeAliaspadjEBGaramond-TOsF 5025 --

URW Letter Gothic is similar enough to Bitstream Letter Gothic to share the config-uration

5026 DeclareMicrotypeAliasulgblg URW LetterGothic -gt Bitstream LetterGothic12Pitch

The eulervm package virtually extends the Euler fonts5027 DeclareMicrotypeAliaszeureur Euler VM5028 DeclareMicrotypeAliaszeuseus

Euro symbol fonts to save some files5029 DeclareMicrotypeAliaszpeus zpeu Adobe Euro sans -gt serif5030 DeclareMicrotypeAliaseurosanszpeu Adobe Euro sans -gt serif5031

153 Interaction with babel

Contexts that are to be set when switching to a language5032 -----------------------------------------------------------------------5033 INTERACTION WITH THE `babelrsquo PACKAGE50345035 DeclareMicrotypeBabelHook5036 englishUKenglishbritishUSenglishamerican5037 kerning= spacing=nonfrench50385039 DeclareMicrotypeBabelHook5040 frenchfrancaisacadiancanadien5041 kerning=french spacing=50425043 DeclareMicrotypeBabelHook5044 turkish5045 kerning=turkish spacing=5046

CONFIGURATION FILES Note on admissible characters 147

154 Note on admissible charactersAll printable ASCII characters are allowed in the settings with the followingexceptions (on the left hand side the replacements on the right)

textbackslash textbraceleft textbraceright^ textasciicircum

Comma and equal sign must be guarded with braces (lsquorsquo lsquo=rsquo) to keep keyvalhappy

Character commands are allowed as far as they have been defined in the properLATEX way that is when they have been assigned a slot in the font encoding withDeclareTextSymbol or DeclareTextComposite Characters defined via chardefare also possible

Ligatures and mathchardefrsquoed symbols have to be specified numerically Ofcourse numerical identification is possible in any other case too

8-bit characters are also admissible provided they have been declared in theinput encoding file They should however only be used in private configurationfiles where the proper input encoding is guaranteed or else in combination withthe lsquoinputencrsquo key

With XETEX or LuaTEX in contrast it is advisable to use the proper Unicodecharacters or the font-specific glyph names prefixed with lsquorsquo (cf section 16)

155 Character inheritanceFirst the lists of inheriting characters We only declare those characters that are thesame on both sides ie not Πfor O

5047 langm-trang5048 langm-t|zpeu|mvsrang5049 -----------------------------------------------------------------------5050 CHARACTER INHERITANCE50515052 langm-t|zpeu|mvsrang5053 langm-trang

1551 OT1

Glyphs that should possibly inherit settings on one side only 012 (lsquofirsquo ligature)013 (lsquoflrsquo) 014 (lsquoffirsquo) 015 (lsquofflrsquo) AElig aelig Œ œ

5054 DeclareCharacterInheritance5055 encoding = OT1 5056 f = 011 ff5057 i = i5058 j = j5059 O = O5060 o = o5061 5062

CONFIGURATION FILES Character inheritance 148

1552 T1

Candidates here 028 (lsquofirsquo) 029 (lsquoflrsquo) 030 (lsquoffirsquo) 031 (lsquofflrsquo) 156 (lsquoIJrsquo ligature sinceLATEX 20051201 accessible as IJ) 188 (lsquoijrsquo ij) AElig aelig Œ œ

5063 DeclareCharacterInheritance5064 encoding = T1 5065 A = `ArsquoA^A~AAr Ak Au A5066 a = `arsquoa^a~aar ak au a5067 C = rsquoCc Cv C5068 c = rsquocc cv c5069 D = v DDH5070 d = v ddj5071 E = `ErsquoE^EEk Ev E5072 e = `ersquoe^eek ev e5073 f = 027 ff5074 G = u G5075 g = u g5076 I = `IrsquoI^III5077 i = `irsquoi^iii5078 j = j5079 L = LrsquoLv L5080 l = lrsquolv l5081 N = rsquoN~Nv N5082 n = rsquon~nv n5083 O = O`OrsquoO^O~OOH O5084 o = o`orsquoo^o~ooH o5085 R = rsquoRv R5086 r = rsquorv r5087 S = rsquoSc Sv SSS5088 s = rsquosc sv s5089 T = c Tv T5090 t = c tv t5091 U = `UrsquoU^UUH Ur U5092 u = `ursquou^uuH ur u5093 Y = rsquoYY5094 y = rsquoyy5095 Z = rsquoZZv Z5096 z = rsquozzv z

The lsquosoft hyphenrsquo often has reduced right side bearing so that it may already beprotruded hence no inheritance

5097 - = 1275098 5099

1553 LY1

More characters 008 (lsquoflrsquo) 012 (lsquofirsquo) 014 (lsquoffirsquo) 015 (lsquofflrsquo) AElig aelig Œ œ5100 DeclareCharacterInheritance5101 encoding = LY1 5102 A = `ArsquoA^A~AAr A5103 a = `arsquoa^a~aar a5104 C = c C5105 c = c c5106 D = DH5107 E = `ErsquoE^EE5108 e = `ersquoe^ee5109 f = 011 ff5110 I = `IrsquoI^II5111 i = `irsquoi^iii5112 L = L5113 l = l5114 N = ~N

CONFIGURATION FILES Character inheritance 149

5115 n = ~n5116 O = `OrsquoO^O~OOO5117 o = `orsquoo^o~ooo5118 S = v S5119 s = v s5120 U = `UrsquoU^UU5121 u = `ursquou^uu5122 Y = rsquoYY5123 y = rsquoyy5124 Z = v Z5125 z = v z5126 5127

1554 OT4

The Polish OT1 extension More interesting characters here 009 (lsquofkrsquo) 012 (lsquofirsquo)013 (lsquoflrsquo) 014 (lsquoffirsquo) 015 (lsquofflrsquo) AElig aelig Œ œ

5128 DeclareCharacterInheritance5129 encoding = OT4 5130 A = k A5131 a = k a5132 C = rsquoC5133 c = rsquoc5134 E = k E5135 e = k e5136 f = 011 ff5137 i = i5138 j = j5139 L = L5140 l = l5141 N = rsquoN5142 n = rsquon5143 O = OrsquoO5144 o = orsquoo5145 S = rsquoS5146 s = rsquos5147 Z = rsquoZZ5148 z = rsquozz5149 textquotedblleft = FF5150 5151

1555 QX

The Central European QX encoding17 Ligatures 009 (lsquofkrsquo) 012 (lsquofirsquo) 013 (lsquoflrsquo)014 (lsquoffirsquo) 015 (lsquofflrsquo) AElig aelig Œ œ

5152 DeclareCharacterInheritance5153 encoding = QX 5154 A = `ArsquoA^A~AAk AAA5155 a = `arsquoa^a~aak aaa5156 C = rsquoCc C5157 c = rsquocc c5158 D = DH5159 E = `ErsquoE^EEk E5160 e = `ersquoe^eek e5161 f = 011 ff5162 I = `IrsquoI^IIk I5163 i = `irsquoi^iik ii5164 j = j

17 Contributed by Maciej Eder

CONFIGURATION FILES Character inheritance 150

5165 L = L5166 l = l5167 N = rsquoN~N5168 n = rsquon~n5169 O = O`OrsquoO^O~OO5170 o = o`orsquoo^o~oo

The Romanian textcommabelow accents are actually replacements for the cvariants which had previously (and erroneously18) been included in QX encodingThey are still kept for backwards compatibility

5171 S = rsquoSc Stextcommabelow Sv S5172 s = rsquosc stextcommabelow sv s5173 T = c Ttextcommabelow T5174 t = c ttextcommabelow t5175 U = `UrsquoU^UUk U5176 u = `ursquou^uuk u5177 Y = rsquoYY5178 y = rsquoyy5179 Z = rsquoZZv Z5180 z = rsquozzv z5181 = textellipsis5182 5183

1556 T5

The Vietnamese encoding T5 It is so crowded with accented and double-accentedcharacters that there is no room for any ligatures

5184 DeclareCharacterInheritance5185 encoding = T5 5186 A = `ArsquoA~Ah Ad A^Au A5187 `AcircumflexrsquoAcircumflex~AcircumflexhAcircumflexdAcircumflex5188 `AbreversquoAbreve~AbrevehAbrevedAbreve5189 a = `arsquoa~ah ad a^au a5190 `acircumflexrsquoacircumflex~acircumflexhacircumflexdacircumflex5191 `abreversquoabreve~abrevehabrevedabreve5192 D = DJ5193 d = dj5194 E = `ErsquoE~Eh Ed E^E5195 `EcircumflexrsquoEcircumflex~EcircumflexhEcircumflexdEcircumflex5196 e = `ersquoe~eh ed e^e5197 `ecircumflexrsquoecircumflex~ecircumflexhecircumflexdecircumflex5198 I = `IrsquoI~Ih Id I5199 i = `irsquoi~ih id ii5200 O = `OrsquoO~Oh Od O^Ohorn O5201 `OcircumflexrsquoOcircumflex~OcircumflexhOcircumflexdOcircumflex5202 `OhornrsquoOhorn~OhornhOhorndOhorn5203 o = `orsquoo~oh od o^ohorn o5204 `ocircumflexrsquoocircumflex~ocircumflexhocircumflexdocircumflex5205 `ohornrsquoohorn~ohornhohorndohorn5206 U = `UrsquoU~Uh Ud Uhorn U5207 `UhornrsquoUhorn~UhornhUhorndUhorn5208 u = `ursquou~uh ud uhorn u5209 `uhornrsquouhorn~uhornhuhornduhorn5210 Y = `YrsquoY~Yh Yd Y5211 y = `yrsquoy~yh yd y5212 5213

18 Cf httptugorgpipermailtex-live2008-August017204html

CONFIGURATION FILES Character inheritance 151

1557 EU1 EU2 TU

The EU1 ( XETEX) EU2 (LuaTEX) and since fontspec version 25 TU encodingsare not well-defined in the sense that they donrsquot contain a fixed number of glyphsall of which must be present OpenType fonts may contain thousands of glyphsbut we only define those that should be present in every font (basically T1) Thisinheritance list should be overridden by font-specific ones

5214 DeclareCharacterInheritance5215 encoding = TUEU1EU2 5216 A = `ArsquoA^A~AAr Ak Au A5217 a = `arsquoa^a~aar ak au a5218 C = rsquoCc Cv C5219 c = rsquocc cv c5220 D = v DDH5221 d = v ddj5222 E = `ErsquoE^EEk Ev E5223 e = `ersquoe^eek ev e5224 f = f_f sometimes f_f sometimes ff5225 G = u G5226 g = u g5227 I = `IrsquoI^III5228 i = `irsquoi^iii5229 j = j5230 L = LrsquoLv L5231 l = lrsquolv l5232 N = rsquoN~Nv N5233 n = rsquon~nv n5234 O = O`OrsquoO^O~OOH O5235 o = o`orsquoo^o~ooH o5236 R = rsquoRv R5237 r = rsquorv r5238 S = rsquoSc Sv S SS5239 s = rsquosc sv s5240 T = c Tv T5241 t = c tv t5242 U = `UrsquoU^UUH Ur U5243 u = `ursquou^uuH ur u5244 Y = rsquoYY5245 y = rsquoyy5246 Z = rsquoZZv Z5247 z = rsquozzv z5248 52495250 langm-trang

1558 Euro symbols

Make Euro symbols settings simpler5251 langzpeurang5252 DeclareCharacterInheritance5253 encoding = U5254 family = zpeuzpeuseurosans 5255 E = 128 52565257 langzpeurang5258 langmvsrang

Since 20060511 (that is one week after Irsquove added these settings after thepackage had been dormant for six years) marvosymrsquos encoding is (correctly) Uinstead of OT1

5259 DeclareCharacterInheritance5260 encoding = OT1U

CONFIGURATION FILES Tracking 152

5261 family = mvs 5262 164 = 099100101 EURhvEURcrEURtm52635264 langmvsrang

156 TrackingBy default we only disable the lsquofrsquo ligatures for those fonts that have any Thusligatures and especially kerning for all other characters will be retained

5265 langm-trang5266 -----------------------------------------------------------------------5267 TRACKINGLETTERSPACING52685269 SetTracking5270 [ name = default5271 no ligatures = f ]5272 encoding = OT1T1T2ALY1OT4QXEU2TU 5273 5274

157 Font expansionThese are Hagraven Thecirc Thagravenhrsquos original expansion settings They are used for all fonts(until somebody shows mercy and creates font-specific settings)

5275 -----------------------------------------------------------------------5276 EXPANSION52775278 SetExpansion5279 [ name = default ]5280 encoding = OT1OT4QXT1LY1 5281 5282 A = 500 a = 7005283 AE = 500 ae = 7005284 B = 700 b = 7005285 C = 700 c = 7005286 D = 500 d = 7005287 E = 700 e = 7005288 F = 7005289 G = 500 g = 7005290 H = 700 h = 7005291 K = 700 k = 7005292 M = 700 m = 7005293 N = 700 n = 7005294 O = 500 o = 7005295 OE = 500 oe = 7005296 P = 700 p = 7005297 Q = 500 q = 7005298 R = 7005299 S = 700 s = 7005300 U = 700 u = 7005301 W = 700 w = 7005302 Z = 700 z = 7005303 2 = 7005304 3 = 7005305 6 = 7005306 8 = 7005307 9 = 7005308 5309

CONFIGURATION FILES Font expansion 153

Settings for Cyrillic T2A encoding19

5310 SetExpansion5311 [ name = T2A ]5312 encoding = T2A 5313 5314 A = 500 a = 7005315 B = 700 b = 7005316 C = 700 c = 7005317 D = 500 d = 7005318 E = 700 e = 7005319 F = 7005320 G = 500 g = 7005321 H = 700 h = 7005322 K = 700 k = 7005323 M = 700 m = 7005324 N = 700 n = 7005325 O = 500 o = 7005326 P = 700 p = 7005327 Q = 500 q = 7005328 R = 7005329 S = 700 s = 7005330 U = 700 u = 7005331 W = 700 w = 7005332 Z = 700 z = 7005333 2 = 7005334 3 = 7005335 6 = 7005336 8 = 7005337 9 = 7005338 CYRA = 500 cyra = 7005339 CYRB = 700 cyrb = 7005340 CYRV = 700 cyrv = 7005341 CYRG = 700 cyrg = 7005342 CYRD = 700 cyrd = 7005343 CYRE = 700 cyre = 7005344 CYRZH = 700 cyrzh = 7005345 CYRZ = 700 cyrz = 7005346 CYRI = 700 cyri = 7005347 CYRISHRT = 700 cyrishrt = 7005348 CYRK = 700 cyrk = 7005349 CYRL = 700 cyrl = 7005350 CYRM = 700 cyrm = 7005351 CYRN = 700 cyrn = 7005352 CYRO = 500 cyro = 7005353 CYRP = 700 cyrp = 7005354 CYRR = 700 cyrr = 7005355 CYRS = 700 cyrs = 7005356 CYRT = 700 cyrt = 7005357 CYRU = 700 cyru = 7005358 CYRF = 700 cyrf = 7005359 CYRH = 700 cyrh = 7005360 CYRC = 700 cyrc = 7005361 CYRCH = 700 cyrch = 7005362 CYRSH = 700 cyrsh = 7005363 CYRSHCH = 700 cyrshch = 7005364 CYRHRDSN = 700 cyrhrdsn = 7005365 CYRERY = 700 cyrery = 7005366 CYRSFTSN = 700 cyrsftsn = 7005367 CYREREV = 700 cyrerev = 7005368 CYRYU = 700 cyryu = 7005369 CYRYA = 700 cyrya = 7005370 5371

19 Contributed by Karl Karlsson

CONFIGURATION FILES Character protrusion 154

T5 encoding does not contain AE ae OE and oe5372 SetExpansion5373 [ name = T5 ]5374 encoding = T5 5375 5376 A = 500 a = 7005377 B = 700 b = 7005378 C = 700 c = 7005379 D = 500 d = 7005380 E = 700 e = 7005381 F = 7005382 G = 500 g = 7005383 H = 700 h = 7005384 K = 700 k = 7005385 M = 700 m = 7005386 N = 700 n = 7005387 O = 500 o = 7005388 P = 700 p = 7005389 Q = 500 q = 7005390 R = 7005391 S = 700 s = 7005392 U = 700 u = 7005393 W = 700 w = 7005394 Z = 700 z = 7005395 2 = 7005396 3 = 7005397 6 = 7005398 8 = 7005399 9 = 7005400 54015402 langm-trang

158 Character protrusion5403 -----------------------------------------------------------------------5404 PROTRUSION5405

For future historians Hagraven Thecirc Thagravenhrsquos original settings (from protcodetex con-verted to microtype notation)

SetProtrusion [ name = thanh ] encoding = OT1 A = 5050 F = 50 J = 50 K = 50 L = 50 T = 5050 V = 5050 W = 5050 X = 5050 Y = 5050 k = 50 r = 50 t = 50 v = 5050 w = 5050 x = 5050 y = 5050 = 700 = 700

CONFIGURATION FILES Character protrusion 155

= 500 = 500 = 200 = 200 ( = 50 ) = 50 - = 700 textendash = 300 textemdash = 200 textquoteleft = 700 textquoteright = 700 textquotedblleft = 500 textquotedblright = 500

1581 Normal

The default settings always use the most moderate value5406 langcfg-trang5407 SetProtrusion5408 langm-trang [ name = default ]

We also create configuration files for the fonts

bull Bitstream Charter (NFSS code bch)

5409 langbchrang [ name = bch-default ]

bull Bitstream Letter Gothic (blg)

5410 langblgrang [ name = blg-default ]

bull Computer Modern Roman (cmr)

5411 langcmrrang [ name = cmr-default ]

bull EB Garamond

5412 langebgrang [ name = EBGaramond-default ]

bull Minion20 (pmnx pmnj)

5413 langpmnrang [ name = pmnj-default ]

bull Palatino (ppl pplx pplj)

5414 langpplrang [ name = ppl-default ]

bull Times (ptm ptmx ptmj)

5415 langptmrang [ name = ptm-default ]

bull URW Garamond (ugm)5416 langugmrang [ name = ugm-default ]5417 langm-t|cmr|pmnrang 5418 langbch|blg|ebg|ugmrang encoding = OT15419 langppl|ptmrang encoding = OT1OT45420 langbchrang family = bch 5421 langblgrang family = blg 5422 langebgrang family = EBGaramond-LFEBGaramond-OsFEBGaramond-TLFEBGaramond-TOsF 5423 langpplrang family = pplpplxpplj 5424 langptmrang family = ptmptmxptmj 5425 langugmrang family = ugm 5426 5427 langm-t|bch|blg|cmr|ebg|pmn|ppl|ptmrang A = 50505428 langugmrang A = 501005429 langebg|ptmrang AE = 50 5430 langugmrang AE = 150505431 langugmrang B = 505432 langbch|ebg|pmn|ugmrang C = 50

20 Contributed by Harald Harders and Karl Karlsson

CONFIGURATION FILES Character protrusion 156

5433 langbch|ebg|pmnrang D = 505434 langugmrang D = 705435 langugmrang E = 505436 langm-t|bch|cmr|ebg|pmn|ptmrang F = 505437 langugmrang F = 705438 langbch|ebg|pmnrang G = 50 5439 langugmrang G = 50505440 langblgrang I = 1501505441 langm-t|cmr|ebg|pmn|ppl|ptm|ugmrang J = 50 5442 langbch|blgrang J = 100 5443 langblgrang K = 505444 langblgrang K = 50 5445 langm-t|bch|cmr|ebg|pmn|pplrang L = 505446 langblgrang L = 1505447 langptmrang L = 805448 langugmrang L = 1205449 langbch|ebg|pmn|ugmrang O = 50505450 langebgrang OE = 50 5451 langugmrang OE = 50505452 langblgrang P = 1005453 langugmrang P = 505454 langbch|ebg|pmnrang Q = 50705455 langugmrang Q = 50505456 langbchrang R = 505457 langugmrang R = 705458 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang T = 50505459 langblgrang T = 1001005460 langugmrang T = 70705461 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang V = 50505462 langblg|ugmrang V = 70705463 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang W = 50505464 langugmrang W = 70705465 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang X = 50505466 langugmrang X = 50705467 langm-t|bch|cmr|ebg|pmn|pplrang Y = 50505468 langblg|ptm|ugmrang Y = 80805469 langugmrang Z = 50505470 langblgrang f = 1501005471 langblgrang i = 1501505472 langblgrang j = 1001005473 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang k = 505474 langugmrang k = 705475 langblgrang l = 1501505476 langpmnrang l = -505477 langebg|pplrang p = 50505478 langugmrang p = 505479 langebg|pplrang q = 50 5480 langblgrang r = 505481 langblgrang r = 100 805482 langcmr|ebg|pmnrang t = 705483 langbchrang t = 505484 langblgrang t = 150 805485 langugmrang t = 1005486 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang v = 50505487 langblgrang v = 1001005488 langugmrang v = 50705489 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang w = 50505490 langugmrang w = 50705491 langblgrang x = 50505492 langblgrang x = 1001005493 langm-t|bch|ebg|pmnrang y = 505494 langblgrang y = 501005495 langcmr|ppl|ptmrang y = 50705496 langugmrang y = 70

5497 langcmrrang 0 = 50

CONFIGURATION FILES Character protrusion 157

5498 langm-trang 1 = 50505499 langbch|blg|ebg|ptm|ugmrang 1 = 1501505500 langcmrrang 1 = 1002005501 langpmnrang 1 = 505502 langpplrang 1 = 1001005503 langbch|cmr|ebg|ugmrang 2 = 50505504 langblgrang 2 = 1005505 langbch|pmnrang 3 = 50 5506 langcmr|ebg|ugmrang 3 = 50505507 langblgrang 3 = 100 5508 langm-t|ebgrang 4 = 50505509 langbchrang 4 = 100505510 langblgrang 4 = 100 5511 langcmr|ugmrang 4 = 70705512 langpmnrang 4 = 50 5513 langptmrang 4 = 70 5514 langcmrrang 5 = 505515 langebgrang 5 = 50505516 langbchrang 6 = 50 5517 langcmrrang 6 = 505518 langebgrang 6 = 50505519 langm-trang 7 = 50505520 langbch|ebg|pmn|ugmrang 7 = 50805521 langblgrang 7 = 1001005522 langcmr|ptmrang 7 = 501005523 langpplrang 7 = 505524 langcmrrang 8 = 505525 langbch|ebgrang 9 = 50505526 langcmrrang 9 = 505527 langm-t|cmr|ebg|pmn|ppl|ptm|ugmrang = 7005528 langbchrang = 6005529 langblgrang = 4005005530 langblgrang = 5005531 langblgrang = 3004005532 langm-t|cmr|ebg|pmn|ppl|ptm|ugmrang = 5005533 langbchrang = 4005534 langblgrang = 3004005535 langm-t|bch|ebg|pmn|ptmrang = 3005536 langblgrang = 2003005537 langcmr|pplrang = 5005538 langugmrang = 4005539 langblgrang = 1005540 langblgrang = 2002005541 langm-t|ebg|pmn|ptmrang = 1005542 langbch|cmr|ppl|ugmrang = 2005543 langblgrang = 1501505544 langpmnrang = 3003005545 langm-t|bch|cmr|ebg|pmn|pplrang = 50505546 langptmrang = 1001005547 langm-t|bch|blg|cmr|ebg|pmn|ppl|ptmrang ~ = 2002505548 langugmrang ~ = 3003505549 langebg|ppl|ptmrang amp = 501005550 langugmrang amp = 1005551 langm-t|cmr|ebg|pmnrang = 50505552 langbchrang = 505553 langppl|ptmrang = 1001005554 langugmrang = 501005555 langblgrang = 1001005556 langm-t|ppl|ptm|ugmrang = 2002005557 langbch|pmnrang = 2003005558 langblgrang = 1502005559 langcmr|ebgrang = 3003005560 langm-t|cmr|ppl|ptmrang + = 2502505561 langbchrang + = 1502505562 langebgrang + = 300300

CONFIGURATION FILES Character protrusion 158

5563 langblg|pmnrang + = 1502005564 langugmrang + = 2503005565 langblg|ugmrang == 2002005566 langm-t|ebg|pmn|ptmrang ( = 100 ) = 2005567 langbch|ugmrang ( = 200 ) = 2005568 langcmr|blgrang ( = 300 ) = 3005569 langpplrang ( = 100 ) = 3005570 langbch|pmnrang [ = 100 ] = 1005571 langblgrang [ = 300100 ] = 300

5572 langm-t|ebg|pmn|ptmrang = 1002005573 langbchrang = 2005574 langblgrang = 3003005575 langcmr|pplrang = 2003005576 langugmrang = 1003005577 langm-t|ptmrang - = 5005005578 langbch|cmr|pplrang - = 4005005579 langblgrang - = 3004005580 langebgrang - = 3005005581 langpmnrang - = 2004005582 langugmrang - = 5006005583 langblgrang lt = 200100 gt = 1002005584 langblgrang _ = 1502505585 langblgrang | = 2502505586 langm-t|pmnrang textendash = 200200 textemdash = 1501505587 langbchrang textendash = 200300 textemdash = 1502505588 langcmrrang textendash = 400300 textemdash = 3002005589 langebg|ppl|ptmrang textendash = 300300 textemdash = 2002005590 langugmrang textendash = 250300 textemdash = 250250

Why settings for left and right quotes Because in some languages they might beused like that (see the csquotes package for examples)

5591 langm-t|bch|pmnrang textquoteleft = 300400 textquoteright = 3004005592 langblgrang textquoteleft = 400600 textquoteright = 4006005593 langcmrrang textquoteleft = 500700 textquoteright = 5006005594 langebg|pplrang textquoteleft = 500700 textquoteright = 5007005595 langptmrang textquoteleft = 500500 textquoteright = 3005005596 langugmrang textquoteleft = 300600 textquoteright = 3006005597 langm-t|bch|pmnrang textquotedblleft = 300300 textquotedblright = 3003005598 langblgrang textquotedblright = 3004005599 langcmrrang textquotedblleft = 500300 textquotedblright = 2006005600 langebg|ppl|ptmrang textquotedblleft = 300400 textquotedblright = 3004005601 langugmrang textquotedblleft = 400400 textquotedblright = 4004005602 5603

Greek uppercase letters are in OT1 encoding only5604 langm-t|cmr|pmnrang5605 SetProtrusion5606 langm-trang [ name = OT1-default5607 langcmrrang [ name = cmr-OT15608 langpmnrang [ name = pmnj-OT15609 langm-trang load = default ]5610 langcmrrang load = cmr-default ]5611 langpmnrang load = pmnj-default ]5612 langm-trang encoding = OT1 5613 langcmrrang encoding = OT1OT45614 langpmnrang encoding = OT15615 langcmrrang family = cmr 5616 langpmnrang family = pmnj 5617 5618 langm-t|cmrrang AE = 50 5619 langpmnrang OE = 50 5620 langcmrrang5621 00 = 150 Gamma

CONFIGURATION FILES Character protrusion 159

5622 01 = 100100 Delta5623 02 = 50 50 Theta5624 03 = 100100 Lambda5625 06 = 50 50 Sigma5626 07 = 100100 Upsilon5627 08 = 50 50 Phi5628 09 = 50 50 Psi

Remaining slots can be found in the source file5629 langcmrrang5630 56315632 langm-t|cmr|pmnrang

T1 and LY1 encodings contain some more characters The default list will be loadedfirst For XETEX (EU1) and LuaTEX (EU2) we simply use the T1 list as default (fornow)

5633 SetProtrusion5634 langm-trang [ name = T1-default5635 langbchrang [ name = bch-T15636 langblgrang [ name = blg-T15637 langcmrrang [ name = cmr-T15638 langebgrang [ name = EBGaramond-T15639 langpmnrang [ name = pmnj-T15640 langpplrang [ name = ppl-T15641 langptmrang [ name = ptm-T15642 langugmrang [ name = ugm-T15643 langm-trang load = default ]5644 langbchrang load = bch-default ]5645 langblgrang load = blg-default ]5646 langcmrrang load = cmr-default ]5647 langebgrang load = EBGaramond-default ]5648 langpmnrang load = pmnj-default ]5649 langpplrang load = ppl-default ]5650 langptmrang load = ptm-default ]5651 langugmrang load = ugm-default ]5652 langm-trang encoding = T1LY1EU1EU2TU 5653 langbch|cmr|ebg|pmn|pplrang encoding = T1LY15654 langblg|ptm|ugmrang encoding = T15655 langbchrang family = bch 5656 langblgrang family = blg 5657 langcmrrang family = cmr 5658 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF 5659 langpmnrang family = pmnj 5660 langpplrang family = pplpplxpplj 5661 langptmrang family = ptmptmxptmj 5662 langugmrang family = ugm 5663 5664 langm-t|cmrrang AE = 50 5665 langbch|pmnrang OE = 50 5666 langpmnrang TH = 505667 langblgrang v L = 2505668 langblgrang v d = 2505669 langblgrang v l = 2505670 langblgrang v t = 2505671 langblgrang 127 = 3004005672 langblgrang 156 = 100 IJ5673 langblgrang 188 = 80 80 ij5674 langm-t|bch|ebg|pmn|ppl|ptmrang _ = 1001005675 langcmrrang _ = 2002005676 langugmrang _ = 1002005677 langm-t|ebg|pmn|ptmrang textbackslash = 1002005678 langbchrang textbackslash = 1502005679 langblgrang textbackslash = 2503005680 langcmr|pplrang textbackslash = 200300

CONFIGURATION FILES Character protrusion 160

5681 langugmrang textbackslash = 1003005682 langugmrang textbar = 2002005683 langblgrang textendash = 300300 textemdash = 1501505684 langblgrang textquotedbl = 300400 textquotedblleft = 3004005685 langcmrrang textquotedbl = 300300 textquotedblleft = 200600

The EC fonts do something weird they insert an implicit kern between quote andboundary character Therefore we must override the settings from OT1

5686 langm-t|cmr|ebg|ppl|ptm|ugmrang quotesinglbase = 400400 quotedblbase = 4004005687 langblgrang quotesinglbase = 400400 quotedblbase = 3004005688 langbch|pmnrang quotesinglbase = 400400 quotedblbase = 3003005689 langm-t|bch|pmnrang guilsinglleft = 400300 guilsinglright = 3004005690 langblgrang guilsinglleft = 300500 guilsinglright = 3005005691 langcmr|ebg|ppl|ptmrang guilsinglleft = 400400 guilsinglright = 3005005692 langugmrang guilsinglleft = 400400 guilsinglright = 3006005693 langm-trang guillemotleft = 200200 guillemotright = 2002005694 langcmrrang guillemotleft = 300200 guillemotright = 1004005695 langbch|pmnrang guillemotleft = 200200 guillemotright = 1503005696 langblg|ebg|ppl|ptmrang guillemotleft = 300300 guillemotright = 2004005697 langugmrang guillemotleft = 300400 guillemotright = 3004005698 langm-t|bch|cmr|ebg|pmn|ppl|ugmrang textexclamdown = 100 textquestiondown = 100 5699 langblgrang textexclamdown = 200 textquestiondown = 100 5700 langptmrang textexclamdown = 200 textquestiondown = 200 5701 langm-t|cmr|ebg|ppl|ptm|ugmrang textbraceleft = 400200 textbraceright = 2004005702 langbch|blg|pmnrang textbraceleft = 200 textbraceright = 3005703 langm-t|bch|cmr|ebg|ppl|ptm|ugmrang textless = 200100 textgreater = 1002005704 langpmnrang textless = 100 textgreater = 1005705 langpmnrang textvisiblespace = 100100 not in LY1

5706 5707

The lmodern fonts used to restore the original settings from OT1 fonts Now theyrequire even other settings though

5708 langcmrrang5709 SetProtrusion5710 [ name = lmr-T15711 load = cmr-T1 ]5712 encoding = T1LY15713 family = lmr 5714 5715 textquotedblleft = 300400 textquotedblright = 3004005716 57175718 langcmrrang

Settings for the T2A encoding (generic Computer Modern Roman and Minion)21

5719 langm-t|cmr|pmnrang5720 SetProtrusion5721 langm-trang [ name = T2A-default5722 langcmrrang [ name = cmr-T2A5723 langpmnrang [ name = pmnj-T2A5724 langm-trang load = default ]5725 langcmrrang load = cmr-default ]5726 langpmnrang load = pmnj-default ]5727 encoding = T2A5728 langm-trang 5729 langcmrrang family = cmr 5730 langpmnrang family = pmnj 5731 5732 CYRA = 50505733 CYRG = 505734 CYRK = 50

21 Contributed by Karl Karlsson

CONFIGURATION FILES Character protrusion 161

5735 CYRT = 50505736 CYRH = 50505737 CYRU = 50505738 langpmnrang CYRS = 50 5739 langpmnrang CYRO = 50505740 cyrk = 505741 cyrg = 505742 cyrh = 50505743 langm-t|pmnrang cyru = 50505744 langcmrrang cyru = 50705745 langm-trang _ = 1001005746 langcmrrang _ = 2002005747 langm-trang textbackslash = 100200 quotedblbase = 4004005748 langcmrrang textbackslash = 200300 quotedblbase = 4004005749 langpmnrang textbackslash = 100200 quotedblbase = 3003005750 langcmrrang textquotedbl = 300300 textquotedblleft = 2006005751 langm-trang guillemotleft = 200200 guillemotright = 2002005752 langcmrrang guillemotleft = 300200 guillemotright = 1004005753 langpmnrang guillemotleft = 200200 guillemotright = 1503005754 langm-t|cmrrang textbraceleft = 400200 textbraceright = 2004005755 langpmnrang textbraceleft = 200 textbraceright = 3005756 langm-t|cmrrang textless = 200100 textgreater = 1002005757 langpmnrang textless = 100 textgreater = 1005758 57595760 langm-t|cmr|pmnrang

Settings for the QX encoding (generic and Times)22 It also includes some glyphsotherwise in TS1

5761 langm-t|ptmrang5762 SetProtrusion5763 langm-trang [ name = QX-default5764 langptmrang [ name = ptm-QX5765 langm-trang load = default ]5766 langptmrang load = ptm-default ]5767 langm-trang encoding = QX 5768 langptmrang encoding = QX5769 langptmrang family = ptmptmxptmj 5770 5771 AE = 50 5772 langptmrang = 2002005773 = = 1001005774 textunderscore = 1001005775 textbackslash = 1002005776 quotedblbase = 4004005777 langm-trang guillemotleft = 200200 guillemotright = 2002005778 langptmrang guillemotleft = 300300 guillemotright = 2004005779 textexclamdown = 100 textquestiondown = 100 5780 langm-trang textbraceleft = 400200 textbraceright = 2004005781 langptmrang textbraceleft = 200200 textbraceright = 2003005782 textless = 200100 textgreater = 1002005783 textminus = 200200 textdegree = 3003005784 langm-trang copyright = 100100 textregistered = 1001005785 langptmrang copyright = 100150 textregistered = 1001505786 langptmrang textxgeq = 100 textxleq = 100 5787 langptmrang textalpha = 50 textDelta = 70 705788 langptmrang textpi = 50 80 textSigma = 705789 langptmrang textmu = 80 texteuro = 50 505790 langptmrang textellipsis = 150200 textasciitilde = 80 805791 langptmrang textapprox = 50 50 textinfty = 1001005792 langptmrang textdagger = 150150 textdaggerdbl = 1001005793 langptmrang textdiv = 50150 textsection = 80 805794 langptmrang texttimes = 100150 textpm = 50 80

22 Contributed by Maciej Eder

CONFIGURATION FILES Character protrusion 162

5795 langptmrang textbullet = 150150 textperiodcentered = 3003005796 langptmrang textquotesingle = 500500 textquotedbl = 3003005797 langptmrang textperthousand = 505798 57995800 langm-t|ptmrang

T5 is based on OT1 it shares some but not all extra characters of T1 All accentedcharacters are already taken care of by the inheritance list

5801 langcmr|bchrang5802 SetProtrusion5803 langcmrrang [ name = cmr-T55804 langcmrrang load = cmr-default ]5805 langbchrang [ name = bch-T55806 langbchrang load = bch-default ]5807 encoding = T55808 langcmrrang family = cmr 5809 langbchrang family = bch 5810 5811 langbchrang _ = 1001005812 langbchrang textbackslash = 1502005813 langcmrrang textbackslash = 2003005814 langcmrrang textquotedblleft = 2006005815 langcmrrang textquotedbl = 3003005816 langbchrang quotesinglbase = 400400 quotedblbase = 3003005817 langcmrrang quotesinglbase = 400400 quotedblbase = 4004005818 langbchrang guilsinglleft = 400300 guilsinglright = 3004005819 langcmrrang guilsinglleft = 400400 guilsinglright = 3005005820 langbchrang guillemotleft = 200200 guillemotright = 1503005821 langcmrrang guillemotleft = 300200 guillemotright = 1004005822 langbchrang textbraceleft = 200 textbraceright = 3005823 langcmrrang textbraceleft = 400200 textbraceright = 2004005824 textless = 200100 textgreater = 1002005825 58265827 langcmr|bchrang

Minion with lining numbers5828 langpmnrang5829 SetProtrusion5830 [ name = pmnx-OT15831 load = pmnj-default ]5832 encoding = OT15833 family = pmnx 5834 5835 1 = 2301805836 58375838 SetProtrusion5839 [ name = pmnx-T15840 load = pmnj-T1 ]5841 encoding = T1LY15842 family = pmnx 5843 5844 1 = 2301805845 58465847 SetProtrusion5848 [ name = pmnx-T2A5849 load = pmnj-T2A ]5850 encoding = T2A5851 family = pmnx 5852 5853 1 = 2301805854

CONFIGURATION FILES Character protrusion 163

58555856 langpmnrang

Times is the default font for LY1 therefore we provide settings for the additionalcharacters in this encoding too

5857 langptmrang5858 SetProtrusion5859 [ name = ptm-LY15860 load = ptm-T1 ]5861 encoding = LY15862 family = ptmptmxptmj 5863 5864 _ = 1001005865 texttrademark = 1001005866 textregistered = 1001005867 textcopyright = 1001005868 textdegree = 3003005869 textminus = 2002005870 textellipsis = 1502005871 texteuro = 5872 textcent = 1001005873 textquotesingle = 5005005874 textflorin = 50 705875 textdagger = 1501505876 textdaggerdbl = 1001005877 textperthousand = 505878 textbullet = 1501505879 textonesuperior = 1001005880 texttwosuperior = 50 505881 textthreesuperior = 50 505882 textperiodcentered = 3003005883 textplusminus = 50 805884 textmultiply = 1001005885 textdivide = 50150

Remaining slots in the source file5886 58875888 langptmrang

1582 Italics

To find default settings for italic is difficult since the character shapes and theirbehaviour at the beginning or end of line may be wildly different for differentfonts In the generic settings we therefore omit the letters and only set up thepunctuation characters

The italic glyphs of Computer Modern Roman feature a lot of side bearingtherefore almost all of them have to protrude23

5889 SetProtrusion5890 langm-trang [ name = OT1-it ]5891 langbchrang [ name = bch-it ]5892 langblgrang [ name = blg-it5893 langblgrang load = blg-default ]5894 langcmrrang [ name = cmr-it ]5895 langebgrang [ name = EBGaramond-it ]5896 langpmnrang [ name = pmnj-it ]5897 langpplrang [ name = ppl-it ]5898 langptmrang [ name = ptm-it ]5899 langugmrang [ name = ugm-it ]5900 langm-t|bch|blg|ebg|ugmrang encoding = OT1

23 Settings contributed by Hendrik Vogt

CONFIGURATION FILES Character protrusion 164

5901 langppl|ptmrang encoding = OT1OT45902 langbchrang family = bch5903 langblgrang family = blg5904 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF5905 langpplrang family = pplpplxpplj5906 langptmrang family = ptmptmxptmj5907 langugmrang family = ugm5908 langm-t|bch|ebg|ppl|ptmrang shape = itsl 5909 langblg|ugmrang shape = it 5910 langcmr|pmnrang 5911 5912 langcmrrang A = 1001005913 langptmrang A = 100505914 langebg|pmnrang A = 50 5915 langugmrang A = 1505916 langpplrang A = 50505917 langptmrang AE = 100 5918 langebg|pplrang AE = 50 5919 langcmrrang B = 83-405920 langebg|ppl|ptmrang B = 50 5921 langpmnrang B = 20-505922 langbch|ppl|ptm|ugmrang C = 50 5923 langcmrrang C = 165-755924 langebgrang C = 100 5925 langpmnrang C = 50-505926 langcmrrang D = 75 -285927 langebg|ppl|ptmrang D = 50505928 langpmnrang D = 20 5929 langcmrrang E = 80-555930 langebg|ppl|ptmrang E = 50 5931 langpmnrang E = 20-505932 langcmrrang F = 85-805933 langebg|ptmrang F = 100 5934 langpmnrang F = 10 5935 langpplrang F = 50 5936 langbch|ppl|ptm|ugmrang G = 50 5937 langcmrrang G = 153-155938 langebgrang G = 100 5939 langpmnrang G = 50-505940 langcmrrang H = 73-605941 langebg|ppl|ptmrang H = 50 5942 langcmrrang I = 140-1205943 langebg|ptmrang I = 50 5944 langpmnrang I = 20-505945 langcmrrang J = 135-805946 langebgrang J = 50 5947 langpmnrang J = 20 5948 langptmrang J = 100 5949 langcmrrang K = 70-305950 langebg|ppl|ptmrang K = 50 5951 langpmnrang K = 20 5952 langcmrrang L = 87 405953 langebg|ppl|ptmrang L = 50 5954 langpmnrang L = 20505955 langugmrang L = 1005956 langcmrrang M = 67-455957 langpmnrang M = -305958 langptmrang M = 50 5959 langcmrrang N = 75-555960 langpmnrang N = -305961 langptmrang N = 50 5962 langbch|pmn|ppl|ptmrang O = 50 5963 langcmrrang O = 150-305964 langebgrang O = 100 5965 langugmrang O = 7050

CONFIGURATION FILES Character protrusion 165

5966 langppl|ptmrang OE = 50 5967 langebgrang OE = 100 5968 langcmrrang P = 82-505969 langebg|ppl|ptmrang P = 50 5970 langpmnrang P = 20-505971 langbch|pmn|ppl|ptmrang Q = 50 5972 langcmrrang Q = 150-305973 langebgrang Q = 100 5974 langugmrang Q = 70505975 langcmrrang R = 75 155976 langebg|ppl|ptmrang R = 50 5977 langpmnrang R = 20 5978 langbch|ebg|ppl|ptmrang S = 50 5979 langcmrrang S = 90-655980 langpmnrang S = 20-305981 langbch|ebg|ppl|ptmrang $ = 50 5982 langcmrrang $ = 100-205983 langpmnrang $ = 20-305984 langbch|pmn|ugmrang T = 70 5985 langcmrrang T = 220-855986 langebg|ppl|ptmrang T = 100 5987 langcmrrang U = 230-555988 langebg|ppl|ptmrang U = 50 5989 langpmnrang U = 50-505990 langcmrrang V = 260-605991 langebg|pmn|ugmrang V = 100 5992 langppl|ptmrang V = 100505993 langcmrrang W = 185-555994 langebg|pmn|ugmrang W = 100 5995 langpplrang W = 50 5996 langptmrang W = 100505997 langcmrrang X = 70-305998 langppl|ptmrang X = 50 5999 langcmrrang Y = 250-606000 langpmnrang Y = 50 6001 langpplrang Y = 100506002 langptmrang Y = 100 6003 langcmrrang Z = 90-606004 langpmnrang Z = -506005 langcmrrang a = 150-106006 langcmrrang b = 170 6007 langcmrrang c = 173-106008 langcmrrang d = 150-556009 langpmnrang d = -506010 langcmrrang e = 180 6011 langcmrrang f = -2506012 langebg|pmnrang f = -1006013 langcmrrang g = 150-106014 langcmrrang h = 100 6015 langcmrrang i = 210 6016 langpmnrang i = -306017 langcmrrang j = -406018 langpmnrang j = -306019 langcmrrang k = 110-506020 langcmrrang l = 240-1106021 langpmnrang l = -1006022 langcmrrang m = 80 6023 langcmrrang n = 115 6024 langbchrang o = 50506025 langcmrrang o = 155 6026 langbchrang p = 506027 langpmnrang p = -50 6028 langbchrang q = 50 6029 langcmrrang q = 170-406030 langcmrrang r = 155-40

CONFIGURATION FILES Character protrusion 166

6031 langpmnrang r = 506032 langcmrrang s = 130 6033 langbchrang t = 506034 langcmrrang t = 230-106035 langcmrrang u = 120 6036 langcmrrang v = 140-256037 langpmn|ugmrang v = 50 6038 langbchrang w = 506039 langcmrrang w = 98-206040 langpmn|ugmrang w = 50 6041 langcmrrang x = 65-406042 langbchrang y = 506043 langcmrrang y = 130-206044 langcmrrang z = 110-806045 langcmrrang 0 = 170-856046 langbch|ptmrang 1 = 1501006047 langcmrrang 1 = 2301106048 langebgrang 1 = 150 6049 langpmnrang 1 = 50 6050 langpplrang 1 = 100 6051 langugmrang 1 = 1501506052 langcmrrang 2 = 130-706053 langebg|ppl|ptmrang 2 = 50 6054 langpmnrang 2 = -50 6055 langbchrang 3 = 50 6056 langcmrrang 3 = 140-706057 langpmnrang 3 = -100 6058 langptmrang 3 = 100506059 langbchrang 4 = 100 6060 langcmrrang 4 = 130806061 langebgrang 4 = 150 6062 langppl|ptmrang 4 = 50 6063 langcmrrang 5 = 160 6064 langptmrang 5 = 50 6065 langbchrang 6 = 50 6066 langcmrrang 6 = 175-306067 langbch|ebg|ptmrang 7 = 100 6068 langcmrrang 7 = 250-1506069 langpmnrang 7 = 20 6070 langpplrang 7 = 50 6071 langcmrrang 8 = 130-406072 langcmrrang 9 = 155-806073 langm-t|cmr|ebg|pmn|pplrang = 5006074 langblgrang = 4006006075 langbch|ptm|ugmrang = 7006076 langblgrang = 3005006077 langm-t|ebg|pmn|pplrang = 5006078 langcmrrang = 4506079 langbch|ugmrang = 6006080 langptmrang = 7006081 langm-t|cmr|ebg|pplrang = 3006082 langbch|ugmrang = 4006083 langpmnrang = 2006084 langptmrang = 5006085 langm-t|cmr|ebg|pplrang = 3006086 langbch|ugmrang = 4006087 langpmnrang = 2006088 langptmrang = 5006089 langptmrang = 1006090 langbchrang = 2006091 langptmrang = 1006092 langpplrang = 3006093 langpmnrang = 4002006094 langm-t|ebg|pmn|ppl|ptmrang amp = 50506095 langbchrang amp = 80

CONFIGURATION FILES Character protrusion 167

6096 langcmrrang amp = 130306097 langugmrang amp = 501006098 langm-t|ebg|pmnrang = 100 6099 langcmrrang = 180506100 langbchrang = 50506101 langppl|ptmrang = 1001006102 langugmrang = 100506103 langm-t|pmn|pplrang = 2002006104 langbchrang = 3002006105 langcmrrang = 380206106 langebgrang = 5001006107 langptm|ugmrang = 4002006108 langm-t|pmn|pplrang + = 1502006109 langcmrrang + = 1802006110 langbch|ugmrang + = 2502506111 langebg|ptmrang + = 2502006112 langm-t|ebg|pmn|pplrang = 50506113 langbchrang = 80506114 langcmrrang = 180106115 langptmrang = 1501506116 langm-t|bch|ugmrang ~ = 1501506117 langcmr|ebg|pmn|ppl|ptmrang ~ = 2001506118 langugmrang == 2002006119 langm-t|bch|ebg|pmn|ppl|ptm|ugmrang ( = 200 ) = 2006120 langcmrrang ( = 300 ) = 706121 langm-t|ebg|ppl|ptm|ugmrang = 1002006122 langcmrrang = 1001006123 langbchrang = 1506124 langpmnrang = 1001506125 langm-trang - = 3003006126 langbch|ebgrang - = 3004006127 langpmnrang - = 2003006128 langcmrrang - = 5003006129 langpplrang - = 3005006130 langptmrang - = 5005006131 langugmrang - = 4007006132 langblgrang _ = 03006133 langm-t|pmnrang textendash = 200200 textemdash = 1501506134 langbchrang textendash = 200300 textemdash = 1502006135 langcmrrang textendash = 500300 textemdash = 4001706136 langebg|ppl|ptm|ugmrang textendash = 300300 textemdash = 2002006137 langm-t|bch|pmn|ugmrang textquoteleft = 400200 textquoteright = 4002006138 langblgrang textquoteleft = 400400 textquoteright = 4004006139 langcmrrang textquoteleft = 800200 textquoteright = 800-206140 langebgrang textquoteleft = 800200 textquoteright = 8002006141 langpplrang textquoteleft = 700400 textquoteright = 7004006142 langptmrang textquoteleft = 800500 textquoteright = 8005006143 langm-t|bch|pmnrang textquotedblleft = 400200 textquotedblright = 4002006144 langblgrang textquotedblright = 3003006145 langcmrrang textquotedblleft = 540100 textquotedblright = 5001006146 langebgrang textquotedblleft = 700200 textquotedblright = 7002006147 langpplrang textquotedblleft = 500300 textquotedblright = 5003006148 langptmrang textquotedblleft = 700400 textquotedblright = 7004006149 langugmrang textquotedblleft = 600200 textquotedblright = 6002006150 61516152 langcmr|pmnrang6153 SetProtrusion6154 langcmrrang [ name = cmr-it-OT16155 langpmnrang [ name = pmnj-it-OT16156 langcmrrang load = cmr-it ]6157 langpmnrang load = pmnj-it ]6158 langcmrrang encoding = OT1OT46159 langpmnrang encoding = OT16160 langcmrrang family = cmr

CONFIGURATION FILES Character protrusion 168

6161 langpmnrang family = pmnj6162 langcmrrang shape = it 6163 langpmnrang shape = itsl 6164 6165 langcmrrang AE = 100 6166 langpmnrang AE = -506167 langcmrrang OE = 100 6168 langpmnrang OE = 50 6169 langcmrrang6170 00 = 200150 Gamma6171 01 = 150100 Delta6172 02 = 150 50 Theta6173 03 = 150 50 Lambda6174 04 = 100100 Xi6175 05 = 100100 Pi6176 06 = 100 50 Sigma6177 07 = 200150 Upsilon6178 08 = 150 50 Phi6179 09 = 150100 Psi6180 0A = 50 50 Omega6181 langcmrrang6182 61836184 langcmr|pmnrang6185 SetProtrusion6186 langm-trang [ name = T1-it-default6187 langbchrang [ name = bch-it-T16188 langblgrang [ name = blg-it-T16189 langcmrrang [ name = cmr-it-T16190 langebgrang [ name = EBGaramond-it-T16191 langpmnrang [ name = pmnj-it-T16192 langpplrang [ name = ppl-it-T16193 langptmrang [ name = ptm-it-T16194 langugmrang [ name = ugm-it-T16195 langm-trang load = OT1-it ]6196 langbchrang load = bch-it ]6197 langblgrang load = blg-T1 ]6198 langcmrrang load = cmr-it ]6199 langpmnrang load = pmnj-it ]6200 langebgrang load = EBGaramond-it ]6201 langpplrang load = ppl-it ]6202 langptmrang load = ptm-it ]6203 langugmrang load = ugm-it ]6204 langm-t|bch|cmr|ebg|pmn|pplrang encoding = T1LY16205 langblg|ptm|ugmrang encoding = T16206 langbchrang family = bch6207 langblgrang family = blg6208 langcmrrang family = cmr6209 langpmnrang family = pmnj6210 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF6211 langpplrang family = pplpplxpplj6212 langptmrang family = ptmptmxptmj6213 langugmrang family = ugm6214 langm-t|bch|ebg|pmn|ppl|ptmrang shape = itsl 6215 langblg|cmr|ugmrang shape = it 6216 6217 langm-t|bch|pmnrang _ = 1006218 langblgrang _ = 03006219 langcmr|ugmrang _ = 1002006220 langebg|ppl|ptmrang _ = 1001006221 langblgrang = 4006006222 langblgrang = 3005006223 langcmrrang AE = 100 6224 langpmnrang AE = -506225 langbch|pmnrang OE = 50

CONFIGURATION FILES Character protrusion 169

6226 langcmrrang OE = 100 6227 langpmnrang 031 = -100 ffl6228 langcmr|ptmrang 156 = 100 IJ6229 langebgrang 156 = 50 IJ6230 langpmnrang 156 = 20 IJ6231 langpmnrang 188 = -30 ij6232 langpmnrang v t = 1006233 langm-t|ebg|ppl|ptmrang textbackslash = 1002006234 langcmr|ugmrang textbackslash = 3003006235 langbchrang textbackslash = 1501506236 langpmnrang textbackslash = 1001506237 langugmrang textbar = 2002006238 langcmrrang textquotedblleft = 5003006239 langblgrang textquoteleft = 400400 textquoteright = 4004006240 langblgrang textquotedbl = 300300 textquotedblleft = 3003006241 langblgrang textquotedblright = 300300 quotedblbase = 2006006242 langm-t|ptmrang quotesinglbase = 300700 quotedblbase = 4005006243 langcmrrang quotesinglbase = 300700 quotedblbase = 2006006244 langbch|pmnrang quotesinglbase = 200500 quotedblbase = 1505006245 langebg|pplrang quotesinglbase = 500500 quotedblbase = 4004006246 langugmrang quotesinglbase = 300700 quotedblbase = 3005006247 langm-t|ppl|ptmrang guilsinglleft = 400400 guilsinglright = 3005006248 langbch|pmnrang guilsinglleft = 300400 guilsinglright = 2005006249 langcmrrang guilsinglleft = 500300 guilsinglright = 4004006250 langebgrang guilsinglleft = 500400 guilsinglright = 3005006251 langugmrang guilsinglleft = 400400 guilsinglright = 3006006252 langm-t|pplrang guillemotleft = 300300 guillemotright = 3003006253 langbch|pmnrang guillemotleft = 200300 guillemotright = 1504006254 langcmrrang guillemotleft = 400100 guillemotright = 2003006255 langebgrang guillemotleft = 300300 guillemotright = 2004006256 langptmrang guillemotleft = 300400 guillemotright = 2004006257 langugmrang guillemotleft = 300400 guillemotright = 3004006258 langm-t|ebg|ppl|ugmrang textexclamdown = 100 textquestiondown = 200 6259 langcmr|ptmrang textexclamdown = 200 textquestiondown = 200 6260 langpmnrang textexclamdown = -50 textquestiondown = -50 6261 langm-t|ppl|ugmrang textbraceleft = 200100 textbraceright = 2002006262 langbch|pmnrang textbraceleft = 200 textbraceright = 2006263 langcmr|ebg|ptmrang textbraceleft = 400100 textbraceright = 2002006264 langbch|pmnrang textless = 100 textgreater = 1006265 langcmr|ebg|ppl|ptmrang textless = 300100 textgreater = 2001006266 langpmnrang textvisiblespace = 1001006267 62686269 langm-t|cmr|pmnrang6270 SetProtrusion6271 langm-trang [ name = T2A-it-default6272 langcmrrang [ name = cmr-it-T2A6273 langpmnrang [ name = pmnj-it-T2A6274 langm-trang load = OT1-it ]6275 langcmrrang load = cmr-it ]6276 langpmnrang load = pmnj-it ]6277 encoding = T2A6278 langcmrrang family = cmr6279 langpmnrang family = pmnj6280 langm-t|pmnrang shape = itsl 6281 langcmrrang shape = it 6282 6283 langcmrrang CYRA = 100506284 langpmnrang CYRA = 50 6285 langcmrrang CYRB = 50 6286 langcmrrang CYRV = 50 6287 langpmnrang CYRV = 20-506288 langcmrrang CYRG = 100 6289 langpmnrang CYRG = 10 6290 langcmrrang CYRD = 50

CONFIGURATION FILES Character protrusion 170

6291 langcmrrang CYRE = 50 6292 langpmnrang CYRE = 20-506293 langcmrrang CYRZH = 50 6294 langcmrrang CYRZ = 50 6295 langpmnrang CYRZ = 20-506296 langcmrrang CYRI = 50 6297 langpmnrang CYRI = -306298 langcmrrang CYRISHRT = 50 6299 langcmrrang CYRK = 50 6300 langpmnrang CYRK = 20 6301 langcmrrang CYRL = 50 6302 langcmrrang CYRM = 50 6303 langpmnrang CYRM = -306304 langcmrrang CYRN = 50 6305 langcmrrang CYRO = 100 6306 langpmnrang CYRO = 50 6307 langcmrrang CYRP = 50 6308 langcmrrang CYRR = 50 6309 langpmnrang CYRR = 20-506310 langcmrrang CYRS = 100 6311 langpmnrang CYRS = 50 6312 langcmrrang CYRT = 100 6313 langpmnrang CYRT = 70 6314 langcmrrang CYRU = 100 6315 langpmnrang CYRU = 50 6316 langcmrrang CYRF = 100 6317 langcmrrang CYRH = 50 6318 langcmrrang CYRC = 50 6319 langcmrrang CYRCH = 100 6320 langcmrrang CYRSH = 50 6321 langcmrrang CYRSHCH = 50 6322 langcmrrang CYRHRDSN = 100 6323 langcmrrang CYRERY = 50 6324 langcmrrang CYRSFTSN = 50 6325 langcmrrang CYREREV = 50 6326 langcmrrang CYRYU = 50 6327 langcmrrang CYRYA = 50 6328 langpmnrang CYRYA = 206329 langpmnrang cyrr = -50 6330 langm-t|pmnrang _ = 1006331 langcmrrang _ = 1002006332 langpmnrang 031 = -100 ffl6333 langpmnrang v t = 1006334 langm-trang textbackslash = 100200 quotedblbase = 4005006335 langcmrrang textbackslash = 300300 quotedblbase = 2006006336 langpmnrang textbackslash = 100150 quotedblbase = 1505006337 langm-trang guillemotleft = 300300 guillemotright = 3003006338 langcmrrang guillemotleft = 400100 guillemotright = 2003006339 langpmnrang guillemotleft = 200300 guillemotright = 1504006340 langm-trang textbraceleft = 200100 textbraceright = 2002006341 langcmrrang textbraceleft = 400100 textbraceright = 2002006342 langpmnrang textbraceleft = 200 textbraceright = 2006343 langcmrrang textquotedblleft = 5003006344 langcmrrang textless = 300100 textgreater = 2001006345 langpmnrang textless = 100 textgreater = 1006346 63476348 langm-t|cmr|pmnrang6349 langm-t|ptmrang6350 SetProtrusion6351 langm-trang [ name = QX-it-default6352 langptmrang [ name = ptm-it-QX6353 langm-trang load = OT1-it ]6354 langptmrang load = ptm-it ]6355 encoding = QX

CONFIGURATION FILES Character protrusion 171

6356 langptmrang family = ptmptmxptmj6357 shape = itsl 6358 6359 langptmrang 009 = 50 fk6360 = = 1001006361 langm-trang textunderscore = 1001006362 langptmrang textunderscore = 1001506363 textbackslash = 1002006364 quotedblbase = 3004006365 langm-trang guillemotleft = 300300 guillemotright = 3003006366 langptmrang guillemotleft = 200400 guillemotright = 2004006367 textexclamdown = 200 textquestiondown = 200 6368 textbraceleft = 200100 textbraceright = 2002006369 textless = 100100 textgreater = 1001006370 textminus = 200200 textdegree = 3001506371 langm-trang copyright = 100100 textregistered = 1001006372 langptmrang textregistered = 100150 copyright = 1001506373 langptmrang textDelta = 70 textdelta = 506374 langptmrang textpi = 50 80 textmu = 806375 langptmrang texteuro = 200 textellipsis = 1002006376 langptmrang textquoteleft = 500400 textquoteright = 5004006377 langptmrang textquotedblleft = 500300 textquotedblright = 4004006378 langptmrang textapprox = 50 50 textinfty = 1001006379 langptmrang textdagger = 150150 textdaggerdbl = 1001006380 langptmrang textdiv = 150150 textasciitilde = 80 806381 langptmrang texttimes = 100150 textpm = 50 806382 langptmrang textbullet = 300100 textperiodcentered = 3003006383 langptmrang textquotesingle = 500500 textquotedbl = 3003006384 langptmrang textperthousand = 506385 63866387 langm-t|ptmrang6388 langcmr|bchrang6389 SetProtrusion6390 langcmrrang [ name = cmr-it-T56391 langcmrrang load = cmr-it ]6392 langbchrang [ name = bch-it-T56393 langbchrang load = bch-it ]6394 encoding = T56395 langbchrang family = bch6396 langcmrrang family = cmr6397 shape = it 6398 6399 langbchrang _ = 1006400 langcmrrang _ = 1002006401 langbchrang textbackslash = 1501506402 langcmrrang textbackslash = 3003006403 langbchrang quotesinglbase = 200500 quotedblbase = 1505006404 langcmrrang quotesinglbase = 300700 quotedblbase = 2006006405 langbchrang guilsinglleft = 300400 guilsinglright = 2005006406 langcmrrang guilsinglleft = 500300 guilsinglright = 4004006407 langbchrang guillemotleft = 200300 guillemotright = 1504006408 langcmrrang guillemotleft = 400100 guillemotright = 2003006409 langbchrang textbraceleft = 200 textbraceright = 2006410 langcmrrang textbraceleft = 400100 textbraceright = 2002006411 langbchrang textless = 100 textgreater = 1006412 langcmrrang textless = 300100 textgreater = 2001006413 64146415 langcmr|bchrang

Slanted is very similar to italic6416 langcmrrang6417 SetProtrusion6418 [ name = cmr-sl

CONFIGURATION FILES Character protrusion 172

6419 load = cmr-it-OT1 ]6420 encoding = OT1OT46421 family = cmr6422 shape = sl 6423 6424 L = 506425 f = -506426 - = 300 6427 textendash = 400 textemdash = 300 6428 64296430 SetProtrusion6431 [ name = cmr-sl-T16432 load = cmr-it-T1 ]6433 encoding = T1LY16434 family = cmr6435 shape = sl 6436 6437 L = 506438 f = -506439 - = 300 6440 textendash = 400 textemdash = 300 6441 64426443 SetProtrusion6444 [ name = cmr-sl-T2A6445 load = cmr-it-T2A ]6446 encoding = T2A6447 family = cmr6448 shape = sl 6449 6450 L = 506451 f = -506452 - = 300 6453 textendash = 400 textemdash = 300 6454 64556456 SetProtrusion6457 [ name = cmr-sl-T56458 load = cmr-it-T5 ]6459 encoding = T56460 family = cmr6461 shape = sl 6462 6463 L = 506464 f = -506465 - = 300 6466 textendash = 400 textemdash = 300 6467 64686469 SetProtrusion6470 [ name = lmr-it-T16471 load = cmr-it-T1 ]6472 encoding = T1LY16473 family = lmr6474 shape = itsl 6475 6476 textquotedblleft = 200 textquotedblright = 2006477 quotesinglbase = 400 quotedblbase = 5006478 6479

Oldstyle numerals are slightly different6480 SetProtrusion6481 [ name = cmr(oldstyle)-it

CONFIGURATION FILES Character protrusion 173

6482 load = cmr-it-T1 ]6483 encoding = T16484 family = hforcmor6485 shape = itsl 6486 6487 1 = 250 506488 2 = 150-1006489 3 = 100-506490 4 = 1501506491 6 = 200 6492 7 = 200 506493 8 = 150-506494 9 = 100 506495 64966497 langcmrrang6498 langpmnrang6499 SetProtrusion6500 [ name = pmnx-it6501 load = pmnj-it ]6502 encoding = OT16503 family = pmnx6504 shape = itsl 6505 6506 1 = 1001506507 65086509 SetProtrusion6510 [ name = pmnx-it-T16511 load = pmnj-it-T1 ]6512 encoding = T1LY16513 family = pmnx6514 shape = itsl 6515 6516 1 = 1001506517 65186519 SetProtrusion6520 [ name = pmnx-it-T2A6521 load = pmnj-it-T2A ]6522 encoding = T2A6523 family = pmnx6524 shape = itsl 6525 6526 1 = 1001506527 65286529 langpmnrang6530 langptmrang6531 SetProtrusion6532 [ name = ptm-it-LY16533 load = ptm-it-T1 ]6534 encoding = LY16535 family = ptmptmxptmj6536 shape = itsl 6537 6538 _ = 1001006539 texttrademark = 1001006540 textregistered = 1001006541 textcopyright = 1001006542 textdegree = 3001006543 textminus = 2002006544 textellipsis = 1002006545 texteuro = 6546 textcent = 100100

CONFIGURATION FILES Character protrusion 174

6547 textquotesingle = 500 6548 textflorin = 100 706549 textdagger = 1501506550 textdaggerdbl = 1001006551 textbullet = 1501506552 textonesuperior = 1501006553 texttwosuperior = 150 506554 textthreesuperior = 150 506555 textparagraph = 100 6556 textperiodcentered = 5003006557 textonequarter = 50 6558 textonehalf = 50 6559 textplusminus = 1001006560 textmultiply = 1501506561 textdivide = 1501506562 65636564 langptmrang

1583 Small caps

Small caps should inherit the values from their big brothers Since values arerelative to character width we donrsquot need to adjust them any further (but we haveto reset some characters)

6565 lang(blg|ugm)rang6566 SetProtrusion6567 langm-trang [ name = OT1-sc6568 langbchrang [ name = bch-sc6569 langcmrrang [ name = cmr-sc-OT16570 langebgrang [ name = EBGaramond-sc6571 langpmnrang [ name = pmnj-sc6572 langpplrang [ name = ppl-sc6573 langptmrang [ name = ptm-sc6574 langm-trang load = default ]6575 langbchrang load = bch-default ]6576 langcmrrang load = cmr-OT1 ]6577 langebgrang load = EBGaramond-default ]6578 langpmnrang load = pmnj-default ]6579 langpplrang load = ppl-default ]6580 langptmrang load = ptm-default ]6581 langm-t|bch|ebg|pmnrang encoding = OT16582 langcmr|ppl|ptmrang encoding = OT1OT46583 langbchrang family = bch6584 langcmrrang family = cmr6585 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF6586 langpmnrang family = pmnj6587 langpplrang family = pplpplxpplj6588 langptmrang family = ptmptmxptmj6589 shape = sc 6590 6591 a = 50506592 langcmr|ebg|ppl|ptmrang ae = 50 6593 langbch|pmnrang c = 50 6594 langbch|ebg|pmnrang d = 506595 langm-t|bch|cmr|ebg|pmn|ptmrang f = 506596 langbch|ebg|pmnrang g = 50 6597 langm-t|cmr|ebg|pmn|ppl|ptmrang j = 50 6598 langbchrang j = 100 6599 langm-t|bch|cmr|ebg|pmn|pplrang l = 506600 langptmrang l = 806601 langm-t|bch|cmr|ebg|pmn|pplrang 013 = 50 fl6602 langptmrang 013 = 80 fl6603 langbch|ebg|pmnrang o = 5050

CONFIGURATION FILES Character protrusion 175

6604 langebg|pmnrang oe = 50 6605 langpplrang p = 0 06606 langbch|ebg|pmnrang q = 50706607 langpplrang q = 0 6608 langm-t|cmr|ebg|pmn|ppl|ptmrang r = 06609 t = 50506610 langm-t|bch|cmr|ebg|pmn|pplrang y = 50506611 langptmrang y = 80806612 66136614 SetProtrusion6615 langm-trang [ name = T1-sc6616 langbchrang [ name = bch-sc-T16617 langcmrrang [ name = cmr-sc-T16618 langebgrang [ name = EBGaramond-sc-T16619 langpmnrang [ name = pmnj-sc-T16620 langpplrang [ name = ppl-sc-T16621 langptmrang [ name = ptm-sc-T16622 langm-trang load = T1-default ]6623 langbchrang load = bch-T1 ]6624 langcmrrang load = cmr-T1 ]6625 langebgrang load = EBGaramond-T1 ]6626 langpmnrang load = pmnj-T1 ]6627 langpplrang load = ppl-T1 ]6628 langptmrang load = ptm-T1 ]6629 encoding = T1LY16630 langbchrang family = bch6631 langcmrrang family = cmr6632 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF6633 langpmnrang family = pmnj6634 langpplrang family = pplpplxpplj6635 langptmrang family = ptmptmxptmj6636 shape = sc 6637 6638 a = 50506639 langcmr|ebg|ppl|ptmrang ae = 50 6640 langbch|pmnrang c = 50 6641 langbch|ebg|pmnrang d = 506642 langm-t|bch|cmr|ebg|pmn|ptmrang f = 506643 langbch|ebg|pmnrang g = 50 6644 langm-t|cmr|ebg|pmn|ppl|ptmrang j = 50 6645 langbchrang j = 100 6646 langm-t|bch|cmr|ebg|pmn|pplrang l = 506647 langptmrang l = 806648 langm-t|bch|cmr|ebg|pmn|pplrang 029 = 50 fl6649 langptmrang 029 = 80 fl6650 langbch|ebg|pmnrang o = 50506651 langbch|ebg|pmnrang oe = 50 6652 langpplrang p = 0 06653 langbch|ebg|pmnrang q = 50706654 langpplrang q = 0 6655 langm-t|cmr|ebg|pmn|ppl|ptmrang r = 06656 t = 50506657 langm-t|bch|cmr|ebg|pmn|pplrang y = 50506658 langptmrang y = 80806659 66606661 lang(blg|ugm)rang6662 langm-t|cmrrang6663 SetProtrusion6664 langm-trang [ name = T2A-sc6665 langcmrrang [ name = cmr-sc-T2A6666 langm-trang load = T2A-default ]6667 langcmrrang load = cmr-T2A ]6668 encoding = T2A

CONFIGURATION FILES Character protrusion 176

6669 langcmrrang family = cmr6670 shape = sc 6671 6672 cyra = 50506673 cyrg = 506674 cyrt = 50506675 cyry = 506676 66776678 langm-t|cmrrang6679 langm-trang6680 SetProtrusion6681 [ name = QX-sc6682 load = QX-default ]6683 encoding = QX6684 shape = sc 6685 6686 a = 50506687 f = 506688 j = 50 6689 l = 506690 013 = 50 fl6691 r = 06692 t = 50506693 y = 50506694 66956696 langm-trang6697 langcmr|bchrang6698 SetProtrusion6699 langbchrang [ name = bch-sc-T56700 langbchrang load = bch-T5 ]6701 langcmrrang [ name = cmr-sc-T56702 langcmrrang load = cmr-T5 ]6703 encoding = T56704 langbchrang family = bch6705 langcmrrang family = cmr6706 shape = sc 6707 6708 a = 50506709 langbchrang c = 50 6710 langbchrang d = 506711 f = 506712 langbchrang g = 50 6713 langbchrang j = 100 6714 langcmrrang j = 50 6715 l = 506716 langbchrang o = 50506717 langbchrang q = 0 6718 langcmrrang r = 06719 t = 50506720 y = 50506721 67226723 langcmr|bchrang6724 langpmnrang6725 SetProtrusion6726 [ name = pmnx-sc6727 load = pmnj-sc ]6728 encoding = OT16729 family = pmnx6730 shape = sc 6731 6732 1 = 2301806733

CONFIGURATION FILES Character protrusion 177

67346735 SetProtrusion6736 [ name = pmnx-sc-T16737 load = pmnj-sc-T1 ]6738 encoding = T1LY16739 family = pmnx6740 shape = sc 6741 6742 1 = 2301806743 6744

1584 Italic small caps

Minion provides real small caps in italics The slantsc package calls them scitPhilipp Lehmanrsquos fontinstallationguide suggests si

6745 SetProtrusion6746 [ name = pmnj-scit6747 load = pmnj-it ]6748 encoding = OT16749 family = pmnj6750 shape = scitsi 6751 6752 a = 50 6753 ae = -506754 b = 20-506755 c = 50-506756 d = 20 06757 e = 20-506758 f = 10 06759 012 = 10-50 fi6760 013 = 10-50 fl6761 014 = 10-50 ffi6762 015 = 10-50 ffl6763 g = 50-506764 i = 20-506765 j = 20 06766 k = 20 6767 l = 20506768 m = -306769 n = -306770 o = 50 6771 oe = 50-506772 p = 20-506773 q = 50 6774 r = 20 06775 s = 20-306776 t = 70 6777 u = 50-506778 v = 100 6779 w = 100 6780 y = 50 6781 z = -506782 67836784 SetProtrusion6785 [ name = pmnj-scit-T16786 load = pmnj-it-T1 ]6787 encoding = T1LY16788 family = pmnj6789 shape = scitsi 6790 6791 a = 50 6792 ae = -50

CONFIGURATION FILES Character protrusion 178

6793 b = 20-506794 c = 50-506795 d = 20 06796 e = 20-506797 f = 10 06798 028 = 10-50 fi6799 029 = 10-50 fl6800 030 = 10-50 ffi6801 031 = 10-50 ffl6802 g = 50-506803 i = 20-506804 188 = 20 0 ij6805 j = 20 06806 k = 20 6807 l = 20506808 m = -306809 n = -306810 o = 50 6811 oe = 50-506812 p = 20-506813 q = 50 6814 r = 20 06815 s = 20-306816 t = 70 6817 u = 50-506818 v = 100 6819 w = 100 6820 y = 50 6821 z = -506822 68236824 SetProtrusion6825 [ name = pmnx-scit6826 load = pmnj-scit ]6827 encoding = OT16828 family = pmnx6829 shape = scitsi 6830 6831 1 = 1001506832 68336834 SetProtrusion6835 [ name = pmnx-scit-T16836 load = pmnj-scit-T1 ]6837 encoding = T1LY16838 family = pmnx6839 shape = scitsi 6840 6841 1 = 1001506842 68436844 langpmnrang

1585 Text companion

Finally the TS1 encoding Still quite incomplete for Times and especially PalatinoAnybody

6845 SetProtrusion6846 langm-trang [ name = textcomp ]6847 langbchrang [ name = bch-textcomp ]6848 langblgrang [ name = blg-textcomp ]6849 langcmrrang [ name = cmr-textcomp ]6850 langebgrang [ name = EBGaramond-textcomp ]6851 langpmnrang [ name = pmn-textcomp ]

CONFIGURATION FILES Character protrusion 179

6852 langpplrang [ name = ppl-textcomp ]6853 langptmrang [ name = ptm-textcomp ]6854 langugmrang [ name = ugm-textcomp ]6855 langm-trang encoding = TS1 6856 langm-trang encoding = TS16857 langbchrang family = bch 6858 langblgrang family = blg 6859 langcmrrang family = cmr 6860 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF 6861 langpmnrang family = pmnxpmnj 6862 langpplrang family = pplpplxpplj 6863 langptmrang family = ptmptmxptmj 6864 langugmrang family = ugm 6865 6866 langblgrang textquotestraightbase = 4005006867 langcmrrang textquotestraightbase = 3003006868 langebg|pmnrang textquotestraightbase = 4004006869 langblgrang textquotestraightdblbase = 3004006870 langcmr|pmnrang textquotestraightdblbase = 3003006871 langebgrang textquotestraightdblbase = 4004006872 langbch|cmr|ebg|pmn|ugmrang texttwelveudash = 2002006873 langbch|cmr|ebg|pmnrang textthreequartersemdash = 1501506874 langugmrang textthreequartersemdash = 2002006875 langblgrang textquotesingle = 5006006876 langcmr|pmnrang textquotesingle = 3004006877 langebgrang textquotesingle = 4005006878 langptmrang textquotesingle = 5005006879 langugmrang textquotesingle = 3005006880 langbch|cmr|pmnrang textasteriskcentered = 2003006881 langblgrang textasteriskcentered = 1502006882 langebgrang textasteriskcentered = 3003006883 langugmrang textasteriskcentered = 1002006884 langpmnrang textfractionsolidus = -200-2006885 langcmrrang textoneoldstyle = 1001006886 langpmnrang textoneoldstyle = 506887 langcmrrang textthreeoldstyle = 506888 langebg|pmnrang textthreeoldstyle = 50 6889 langcmrrang textfouroldstyle = 50 506890 langebg|pmnrang textfouroldstyle = 50 6891 langcmr|ebg|pmnrang textsevenoldstyle = 50 806892 langcmrrang textlangle = 400 6893 langcmrrang textrangle = 4006894 langm-t|bch|pmn|ptmrang textminus = 2002006895 langcmr|ebg|pplrang textminus = 3003006896 langblg|ugmrang textminus = 2503006897 langbch|ebg|pmnrang textlbrackdbl = 100 6898 langblgrang textlbrackdbl = 200 6899 langbch|ebg|pmnrang textrbrackdbl = 1006900 langblgrang textrbrackdbl = 2006901 langpmnrang textasciigrave = 2005006902 langbch|blg|cmr|ebg|pmnrang texttildelow = 2002506903 langpmnrang textasciibreve = 3004006904 langpmnrang textasciicaron = 3004006905 langpmnrang textacutedbl = 2003006906 langpmnrang textgravedbl = 1503006907 langbch|pmn|ugmrang textdagger = 80 806908 langblgrang textdagger = 2002006909 langcmr|ebgrang textdagger = 1001006910 langptmrang textdagger = 1501506911 langblgrang textdaggerdbl = 1501506912 langcmr|ebg|pmnrang textdaggerdbl = 80 806913 langptmrang textdaggerdbl = 1001006914 langbchrang textbardbl = 1001006915 langblg|ugmrang textbardbl = 1501506916 langbchrang textbullet = 200200

CONFIGURATION FILES Character protrusion 180

6917 langblgrang textbullet = 4005006918 langcmr|ebg|pmnrang textbullet = 1006919 langptmrang textbullet = 1501506920 langugmrang textbullet = 501006921 langbch|cmr|pmnrang textcelsius = 50 6922 langebgrang textcelsius = 80 6923 langbchrang textflorin = 50 506924 langblgrang textflorin = 1001006925 langebg|ugmrang textflorin = 1006926 langpmnrang textflorin = 501006927 langptmrang textflorin = 50 706928 langcmrrang textcolonmonetary = 506929 langebg|pmnrang textcolonmonetary = 50 6930 langpmnrang textinterrobang = 1006931 langpmnrang textinterrobangdown = 100 6932 langm-t|ebg|ptmrang texttrademark = 1001006933 langbchrang texttrademark = 1501506934 langblg|cmr|pplrang texttrademark = 2002006935 langpmnrang texttrademark = 50 506936 langugmrang texttrademark = 1001506937 langbch|ugmrang textcent = 50 6938 langptmrang textcent = 1001006939 langbchrang textsterling = 50 6940 langugmrang textsterling = 506941 langbchrang textbrokenbar = 2002006942 langblgrang textbrokenbar = 2502506943 langugmrang textbrokenbar = 2003006944 langpmnrang textasciidieresis = 3004006945 langm-t|bch|cmr|ebg|ptm|ugmrang textcopyright = 1001006946 langpmnrang textcopyright = 1001506947 langpplrang textcopyright = 2002006948 langbch|cmr|ugmrang textordfeminine = 1002006949 langebg|pmnrang textordfeminine = 2002006950 langbch|cmr|ebg|pmn|ugmrang textlnot = 200 6951 langblgrang textlnot = 2001006952 langm-t|bch|cmr|ebg|ptm|ugmrang textregistered = 1001006953 langpmnrang textregistered = 501506954 langpplrang textregistered = 2002006955 langpmnrang textasciimacron = 1502006956 langm-t|ppl|ptmrang textdegree = 3003006957 langbchrang textdegree = 1502006958 langblg|ugmrang textdegree = 2002006959 langcmr|ebgrang textdegree = 4004006960 langpmnrang textdegree = 1504006961 langbch|cmr|ebg|pmn|ugmrang textpm = 1502006962 langblgrang textpm = 1001006963 langptmrang textpm = 50 806964 langbch|blg|ugmrang texttwosuperior = 1002006965 langcmrrang texttwosuperior = 501006966 langebg|pmnrang texttwosuperior = 2002006967 langptmrang texttwosuperior = 50 506968 langbch|blg|ugmrang textthreesuperior = 1002006969 langcmrrang textthreesuperior = 501006970 langebg|pmnrang textthreesuperior = 2002006971 langptmrang textthreesuperior = 50 506972 langpmnrang textasciiacute = 3004006973 langbch|ugmrang textmu = 1006974 langbch|ebg|pmnrang textparagraph = 1006975 langbch|cmr|ebg|pmnrang textperiodcentered = 3004006976 langblgrang textperiodcentered = 4005006977 langptmrang textperiodcentered = 3003006978 langugmrang textperiodcentered = 2005006979 langbch|blg|ugmrang textonesuperior = 2003006980 langcmr|ebg|pmnrang textonesuperior = 2002006981 langptmrang textonesuperior = 100100

CONFIGURATION FILES Character protrusion 181

6982 langbch|ebg|pmn|ugmrang textordmasculine = 2002006983 langblg|cmrrang textordmasculine = 1002006984 langbch|cmr|pmnrang texteuro = 100 6985 langebgrang texteuro = 501006986 langbchrang texttimes = 2002006987 langblg|ptmrang texttimes = 1001006988 langcmrrang texttimes = 1502506989 langebgrang texttimes = 1001506990 langpmnrang texttimes = 701006991 langugmrang texttimes = 2003006992 langbch|ebg|pmnrang textdiv = 1502006993 langblgrang textdiv = 1001006994 langcmrrang textdiv = 1502506995 langptmrang textdiv = 501006996 langugmrang textdiv = 2003006997 langptmrang textperthousand = 506998 langugmrang textsection = 1006999 langugmrang textonehalf = 501007000 langugmrang textonequarter = 501007001 langugmrang textthreequarters = 501007002 langugmrang textsurd = 100

Remaining slots in the source file7003 70047005 langcmr|ebg|pmn|ugmrang7006 SetProtrusion7007 langcmrrang [ name = cmr-textcomp-it ]7008 langebgrang [ name = EBGaramond-textcomp-it ]7009 langpmnrang [ name = pmn-textcomp-it ]7010 langugmrang [ name = ugm-textcomp-it ]7011 encoding = TS17012 langcmrrang family = cmr7013 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF7014 langpmnrang family = pmnxpmnj7015 langugmrang family = ugm7016 langugmrang shape = itsl 7017 langugmrang shape = it 7018 7019 langcmrrang textquotestraightbase = 3006007020 langebg|pmnrang textquotestraightbase = 4004007021 langcmrrang textquotestraightdblbase = 3006007022 langebgrang textquotestraightdblbase = 3004007023 langpmnrang textquotestraightdblbase = 3003007024 texttwelveudash = 2002007025 langcmr|ebg|pmnrang textthreequartersemdash = 1501507026 langugmrang textthreequartersemdash = 2002007027 langcmrrang textquotesingle = 6003007028 langebgrang textquotesingle = 8001007029 langpmnrang textquotesingle = 3002007030 langugmrang textquotesingle = 5005007031 langcmrrang textasteriskcentered = 3002007032 langebgrang textasteriskcentered = 5001007033 langpmnrang textasteriskcentered = 2003007034 langugmrang textasteriskcentered = 3001507035 langpmnrang textfractionsolidus = -200-2007036 langcmrrang textoneoldstyle = 100 507037 langebgrang textoneoldstyle = 100 7038 langpmnrang textoneoldstyle = 50 7039 langebgrang texttwooldstyle = 50 7040 langpmnrang texttwooldstyle = -50 7041 langcmrrang textthreeoldstyle = 100 507042 langpmnrang textthreeoldstyle = -100 7043 langcmrrang textfouroldstyle = 50 507044 langebgrang textfouroldstyle = 50100

CONFIGURATION FILES Character protrusion 182

7045 langcmrrang textsevenoldstyle = 50 807046 langebgrang textsevenoldstyle = 50 7047 langpmnrang textsevenoldstyle = 20 7048 langcmrrang textlangle = 400 7049 langcmrrang textrangle = 4007050 langcmr|ebgrang textminus = 3003007051 langpmnrang textminus = 2002007052 langugmrang textminus = 2503007053 langebg|pmnrang textlbrackdbl = 100 7054 langebg|pmnrang textrbrackdbl = 1007055 langpmnrang textasciigrave = 3003007056 langcmr|ebg|pmnrang texttildelow = 2002507057 langpmnrang textasciibreve = 3003007058 langpmnrang textasciicaron = 3003007059 langpmnrang textacutedbl = 2003007060 langpmnrang textgravedbl = 1503007061 langcmrrang textdagger = 1001007062 langebgrang textdagger = 2001007063 langpmnrang textdagger = 80 507064 langugmrang textdagger = 80 807065 langcmr|ebgrang textdaggerdbl = 80 807066 langpmnrang textdaggerdbl = 80 507067 langugmrang textbardbl = 1501507068 langcmrrang textbullet = 2001007069 langebgrang textbullet = 300 7070 langpmnrang textbullet = 30 707071 langugmrang textbullet = 501007072 langcmrrang textcelsius = 100 7073 langebgrang textcelsius = 200 7074 langpmnrang textcelsius = 50-507075 langebgrang textflorin = 100 7076 langpmnrang textflorin = 501007077 langugmrang textflorin = 1007078 langcmrrang textcolonmonetary = 150 7079 langebgrang textcolonmonetary = 100 7080 langpmnrang textcolonmonetary = 50-507081 langcmr|ebgrang texttrademark = 200 7082 langpmnrang texttrademark = 501007083 langugmrang texttrademark = 150 507084 langugmrang textcent = 50 7085 langugmrang textsterling = 507086 langugmrang textbrokenbar = 2003007087 langpmnrang textasciidieresis = 3002007088 langcmrrang textcopyright = 100 7089 langebgrang textcopyright = 2001007090 langpmnrang textcopyright = 1001507091 langugmrang textcopyright = 300 7092 langcmrrang textordfeminine = 1001007093 langpmnrang textordfeminine = 2002007094 langugmrang textordfeminine = 1002007095 langcmr|ebgrang textlnot = 300 7096 langpmn|ugmrang textlnot = 200 7097 langcmrrang textregistered = 100 7098 langebgrang textregistered = 2001007099 langpmnrang textregistered = 501507100 langugmrang textregistered = 300 7101 langpmnrang textasciimacron = 1502007102 langcmr|ebgrang textdegree = 5001007103 langpmnrang textdegree = 1501507104 langugmrang textdegree = 3002007105 langcmrrang textpm = 1501007106 langebgrang textpm = 2001507107 langpmn|ugmrang textpm = 1502007108 langcmrrang textonesuperior = 400 7109 langebgrang textonesuperior = 300100

CONFIGURATION FILES Character protrusion 183

7110 langpmnrang textonesuperior = 2001007111 langugmrang textonesuperior = 3003007112 langcmrrang texttwosuperior = 400 7113 langebgrang texttwosuperior = 300 7114 langpmnrang texttwosuperior = 2001007115 langugmrang texttwosuperior = 3002007116 langcmrrang textthreesuperior = 400 7117 langebgrang textthreesuperior = 300 7118 langpmnrang textthreesuperior = 2001007119 langugmrang textthreesuperior = 3002007120 langugmrang textmu = 1007121 langpmnrang textasciiacute = 3002007122 langcmrrang textparagraph = 200 7123 langpmnrang textparagraph = 1007124 langcmrrang textperiodcentered = 5005007125 langebg|pmn|ugmrang textperiodcentered = 3004007126 langcmrrang textordmasculine = 1001007127 langpmnrang textordmasculine = 2002007128 langugmrang textordmasculine = 3002007129 langcmrrang texteuro = 200 7130 langebgrang texteuro = 100 7131 langpmnrang texteuro = 100-507132 langcmrrang texttimes = 2002007133 langebgrang texttimes = 2001007134 langpmnrang texttimes = 701007135 langugmrang texttimes = 2003007136 langcmr|ebgrang textdiv = 2002007137 langpmnrang textdiv = 1502007138 langugmrang textdiv = 2003007139 langugmrang textsection = 2007140 langugmrang textonehalf = 501007141 langugmrang textonequarter = 501007142 langugmrang textthreequarters = 501007143 langugmrang textsurd = 1007144 71457146 langcmr|ebg|pmn|ugmrang

1586 Computer Modern math

Now to the math symbols for Computer Modern Roman Definitions have beenextracted from fontmathltx I did not spend too much time fiddling with thesesettings so they can surely be improved

The math font lsquooperatorsrsquo (also used for the mathrm and mathbf alphabets) isOT1cmr which wersquove already set up above Itrsquos declared as

DeclareSymbolFontoperators OT1cmrm nSetSymbolFontoperatorsboldOT1cmrbxn

mathit (OT1cmrmit) is also already set upThere are (for the moment) no settings for mathsf and mathttMath font lsquolettersrsquo (also used as mathnormal) is declared as

DeclareSymbolFontletters OMLcmmmitSetSymbolFontletters boldOMLcmmbit

7147 langcmrrang7148 SetProtrusion7149 [ name = cmr-math-letters ]7150 encoding = OML7151 family = cmm7152 series = mb7153 shape = it

CONFIGURATION FILES Character protrusion 184

7154 7155 A = 100 50 mathnormal7156 B = 50 7157 C = 50 7158 D = 50 507159 E = 50 7160 F = 100 507161 G = 50 507162 H = 50 507163 I = 50 507164 J = 150 507165 K = 501007166 L = 50 507167 M = 50 7168 N = 50 7169 O = 50 7170 P = 50 7171 Q = 50 507172 R = 50 7173 S = 50 7174 T = 501007175 U = 50 507176 V = 1001007177 W = 501007178 X = 501007179 Y = 1001007180 f = 1001007181 h = 1007182 i = 507183 j = 507184 k = 507185 r = 507186 v = 507187 w = 507188 x = 507189 0B = 50100 alpha7190 0C = 50 50 beta7191 0D = 200150 gamma7192 0E = 50 50 delta7193 0F = 50 50 epsilon7194 10 = 50150 zeta7195 12 = 50 theta7196 13 = 100 iota7197 14 = 100 kappa7198 15 = 100 50 lambda7199 16 = 50 mu7200 17 = 50 nu7201 18 = 50 xi7202 19 = 50100 pi7203 1A = 50 50 rho7204 1B = 150 sigma7205 1C = 50150 tau7206 1D = 50 50 upsilon7207 1F = 50100 chi7208 20 = 50 50 psi7209 21 = 50 omega7210 22 = 50 varepsilon7211 23 = 50 vartheta7212 24 = 50 varpi7213 25 = 100 varrho7214 26 = 100100 varsigma7215 27 = 50 50 varphi7216 28 = 100100 leftharpoonup7217 29 = 100100 leftharpoondown7218 2A = 100100 rightharpoonup

CONFIGURATION FILES Character protrusion 185

7219 2B = 100100 rightharpoondown7220 2C = 300200 lhook7221 2D = 200300 rhook7222 2E = 100 triangleright7223 2F = 100 triangleleft7224 3A = 500 ldotp7225 3B = 500 7226 3C = 200100 lt7227 3D = 300400 7228 3E = 100200 gt7229 3F = 200200 star7230 5B = 100 flat7231 5E = 200200 smile7232 5F = 200200 frown7233 7C = 100 jmath7234 7D = 100 wp

Remaining slots in the source file7235 7236

Math font lsquosymbolsrsquo (also used for the mathcal alphabet) is declared as

DeclareSymbolFontsymbols OMScmsymnSetSymbolFontsymbols boldOMScmsybn

7237 SetProtrusion7238 [ name = cmr-math-symbols ]7239 encoding = OMS7240 family = cmsy7241 series = mb7242 shape = n 7243 7244 A = 150 50 mathcal7245 C = 1007246 D = 507247 F = 501507248 I = 1007249 J = 1001507250 K = 1007251 L = 100 7252 M = 50 507253 N = 501007254 P = 507255 Q = 50 7256 R = 507257 T = 501507258 V = 50 507259 W = 507260 X = 1001007261 Y = 100 7262 Z = 1001507263 00 = 300300 -7264 01 = 700 cdot cdotp7265 02 = 150250 times7266 03 = 150250 ast7267 04 = 200300 div7268 05 = 150250 diamond7269 06 = 200200 pm7270 07 = 200200 mp7271 08 = 100100 oplus7272 09 = 100100 ominus7273 0A = 100100 otimes7274 0B = 100100 oslash7275 0C = 100100 odot7276 0D = 100100 bigcirc

CONFIGURATION FILES Character protrusion 186

7277 0E = 100100 circ7278 0F = 100100 bullet7279 10 = 100100 asymp7280 11 = 100100 equiv7281 12 = 200100 subseteq7282 13 = 100200 supseteq7283 14 = 200100 leq7284 15 = 100200 geq7285 16 = 200100 preceq7286 17 = 100200 succeq7287 18 = 200200 sim7288 19 = 150150 approx7289 1A = 200100 subset7290 1B = 100200 supset7291 1C = 200100 ll7292 1D = 100200 gg7293 1E = 300100 prec7294 1F = 100300 succ7295 20 = 100200 leftarrow7296 21 = 200100 rightarrow7297 22 = 100100 uparrow7298 23 = 100100 downarrow7299 24 = 100100 leftrightarrow7300 25 = 100100 nearrow7301 26 = 100100 searrow7302 27 = 100100 simeq7303 28 = 100100 Leftarrow7304 29 = 100100 Rightarrow7305 2A = 100100 Uparrow7306 2B = 100100 Downarrow7307 2C = 100100 Leftrightarrow7308 2D = 100100 nwarrow7309 2E = 100100 swarrow7310 2F = 100 propto7311 30 = 400 prime7312 31 = 100100 infty7313 32 = 150100 in7314 33 = 100150 ni7315 34 = 100100 triangle bigtriangleup7316 35 = 100100 bigtriangledown7317 38 = 100 forall7318 39 = 100 exists7319 3A = 200 neg7320 3E = 200200 top7321 3F = 200200 bot perp7322 5E = 100200 wedge7323 5F = 100200 vee7324 60 = 300 vdash7325 61 = 300 dashv7326 62 = 100100 lfloor7327 63 = 100100 rfloor7328 64 = 100100 lceil7329 65 = 100100 rceil7330 66 = 150 lbrace7331 67 = 150 rbrace7332 68 = 400 langle7333 69 = 400 rangle7334 6C = 100100 updownarrow7335 6D = 100100 Updownarrow7336 6E = 100300 backslash setminus7337 72 = 100100 nabla7338 79 = 200200 dagger7339 7A = 100100 ddagger7340 7B = 100 mathparagraph7341 7C = 100100 clubsuit

CONFIGURATION FILES Character protrusion 187

7342 7D = 100100 diamondsuit7343 7E = 100100 heartsuit7344 7F = 100100 spadesuit

Remaining slots in the source file7345 7346

We donrsquot bother about lsquolargesymbolsrsquo since it will only be used in display mathwhere protrusion doesnrsquot work anyway Itrsquos declared as

DeclareSymbolFontlargesymbolsOMXcmexmn

7347 langcmrrang7348 langcfg-trang

1587 AMS symbols

Settings for the AMS math fonts (amssymb)7349 langcfg-urang

Symbol font lsquoarsquo7350 langmsarang7351 SetProtrusion7352 [ name = AMS-a ]7353 encoding = U7354 family = msa 7355 7356 05 = 150250 centerdot7357 06 = 100100 lozenge7358 07 = 50 50 blacklozenge7359 08 = 50 50 circlearrowright7360 09 = 50 50 circlearrowleft7361 0A = 100100 rightleftharpoons7362 0B = 100100 leftrightharpoons7363 0D = -50200 Vdash7364 0E = -50200 Vvdash7365 0F = -70150 vDash7366 10 = 100150 twoheadrightarrow7367 11 = 100150 twoheadleftarrow7368 12 = 50100 leftleftarrows7369 13 = 50 80 rightrightarrows7370 14 = 120120 upuparrows7371 15 = 120120 downdownarrows7372 16 = 200200 upharpoonright7373 17 = 200200 downharpoonright7374 18 = 200200 upharpoonleft7375 19 = 200200 downharpoonleft7376 1A = 80100 rightarrowtail7377 1B = 80100 leftarrowtail7378 1C = 50 50 leftrightarrows7379 1D = 50 50 rightleftarrows7380 1E = 250 Lsh7381 1F = 250 Rsh7382 20 = 100100 rightsquigarrow7383 21 = 100100 leftrightsquigarrow7384 22 = 100 50 looparrowleft7385 23 = 50100 looparrowright7386 24 = 50 80 circeq7387 25 = 100 succsim7388 26 = 100 gtrsim7389 27 = 100 gtrapprox7390 28 = 150 50 multimap7391 2B = 100150 doteqdot

CONFIGURATION FILES Character protrusion 188

7392 2C = 100150 triangleq7393 2D = 100 50 precsim7394 2E = 100 50 lesssim7395 2F = 50 50 lessapprox7396 30 = 100 50 eqslantless7397 31 = 50 50 eqslantgtr7398 32 = 100 50 curlyeqprec7399 33 = 50100 curlyeqsucc7400 34 = 100 50 preccurlyeq7401 36 = 50 leqslant7402 38 = 50 backprime7403 39 = 250250 dabar the dash bar in dash(leftright)arrow7404 3C = 50100 succcurlyeq7405 3E = 50 geqslant7406 40 = 50 sqsubset7407 41 = 50 sqsupset7408 42 = 150 vartriangleright rhd7409 43 = 150 vartriangleleft lhd7410 44 = 100 trianglerighteq unrhd7411 45 = 100 trianglelefteq unlhd7412 46 = 100100 bigstar7413 48 = 50 50 blacktriangledown7414 49 = 100 blacktriangleright7415 4A = 100 blacktriangleleft7416 4B = 150 dashrightarrow (the arrow)7417 4C = 150 dashleftarrow7418 4D = 50 50 vartriangle7419 4E = 50 50 blacktriangle7420 4F = 50 50 triangledown7421 50 = 50 50 eqcirc7422 56 = 150 Rrightarrow7423 57 = 150 Lleftarrow7424 58 = 100300 checkmark7425 5C = 50 50 angle7426 5D = 50 50 measuredangle7427 5E = 50 50 sphericalangle7428 5F = 50 varpropto7429 60 = 100100 smallsmile7430 61 = 100100 smallfrown7431 62 = 50 Subset7432 63 = 50 Supset7433 66 = 150150 curlywedge7434 67 = 150150 curlyvee7435 68 = 50150 leftthreetimes7436 69 = 100 50 rightthreetimes7437 6C = 50 50 bumpeq7438 6D = 50 50 Bumpeq7439 6E = 100 lll7440 6F = 100 ggg7441 70 = 50100 ulcorner7442 71 = 100 50 urcorner7443 75 = 150200 dotplus7444 76 = 50100 backsim7445 78 = 50100 llcorner7446 79 = 100 50 lrcorner7447 7C = 100100 intercal7448 7D = 50 50 circledcirc7449 7E = 50 50 circledast7450 7F = 50 50 circleddash

Remaining slots in the source file7451 74527453 langmsarang

CONFIGURATION FILES Character protrusion 189

Symbol font lsquobrsquo7454 langmsbrang7455 SetProtrusion7456 [ name = AMS-b ]7457 encoding = U7458 family = msb 7459 7460 A = 50 50 mathbb7461 C = 50 507462 G = 507463 L = 507464 P = 507465 R = 507466 T = 507467 V = 50 507468 X = 50 507469 Y = 50 507470 00 = 50 50 lvertneqq7471 01 = 50 50 gvertneqq7472 02 = 50 50 nleq7473 03 = 50 50 ngeq7474 04 = 100 50 nless7475 05 = 50150 ngtr7476 06 = 100 50 nprec7477 07 = 50150 nsucc7478 08 = 50 50 lneqq7479 09 = 50 50 gneqq7480 0A = 100100 nleqslant7481 0B = 100100 ngeqslant7482 0C = 100 50 lneq7483 0D = 50100 gneq7484 0E = 100 50 npreceq7485 0F = 50100 nsucceq7486 10 = 50 precnsim7487 11 = 50 50 succnsim7488 12 = 50 50 lnsim7489 13 = 50 50 gnsim7490 14 = 50 50 nleqq7491 15 = 50 50 ngeqq7492 16 = 50 50 precneqq7493 17 = 50 50 succneqq7494 18 = 50 50 precnapprox7495 19 = 50 50 succnapprox7496 1A = 50 50 lnapprox7497 1B = 50 50 gnapprox7498 1C = 150200 nsim7499 1D = 50 50 ncong7500 1E = 100150 diagup7501 1F = 100150 diagdown7502 20 = 100 50 varsubsetneq7503 21 = 50100 varsupsetneq7504 22 = 100 50 nsubseteqq7505 23 = 50100 nsupseteqq7506 24 = 100 50 subsetneqq7507 25 = 50100 supsetneqq7508 26 = 100 50 varsubsetneqq7509 27 = 50100 varsupsetneqq7510 28 = 100 50 subsetneq7511 29 = 50100 supsetneq7512 2A = 100 50 nsubseteq7513 2B = 50100 nsupseteq7514 2C = 50100 nparallel7515 2D = 100150 nmid7516 2E = 150150 nshortmid7517 2F = 100100 nshortparallel

CONFIGURATION FILES Character protrusion 190

7518 30 = 150 nvdash7519 31 = 150 nVdash7520 32 = 100 nvDash7521 33 = 100 nVDash7522 34 = 100 ntrianglerighteq7523 35 = 100 ntrianglelefteq7524 36 = 100 ntriangleleft7525 37 = 100 ntriangleright7526 38 = 100200 nleftarrow7527 39 = 100200 nrightarrow7528 3A = 100100 nLeftarrow7529 3B = 50100 nRightarrow7530 3C = 100100 nLeftrightarrow7531 3D = 100200 nleftrightarrow7532 3E = 50 50 divideontimes7533 3F = 50 50 varnothing7534 60 = 200 Finv7535 61 = 50 Game7536 68 = 100100 eqsim7537 69 = 50 beth7538 6A = 50 gimel7539 6B = 150 daleth7540 6C = 200 lessdot7541 6D = 200 gtrdot7542 6E = 100200 ltimes7543 6F = 150100 rtimes7544 70 = 50100 shortmid7545 71 = 50 50 shortparallel7546 72 = 200300 smallsetminus7547 73 = 100200 thicksim7548 74 = 50100 thickapprox7549 75 = 50 50 approxeq7550 76 = 50100 succapprox7551 77 = 50 50 precapprox7552 78 = 100100 curvearrowleft7553 79 = 50150 curvearrowright7554 7A = 50200 digamma7555 7B = 100 50 varkappa7556 7F = 200 backepsilon

Remaining slots in the source file7557 75587559 langmsbrang

1588 Euler

Euler Roman font (package euler)7560 langeurrang7561 SetProtrusion7562 [ name = euler ]7563 encoding = U7564 family = eur 7565 7566 01 = 1001007567 03 = 1001507568 06 = 1007569 07 = 1001507570 08 = 1001007571 0A = 1001007572 0B = 507573 0C = 1007574 0D = 1001007575 0E = 100

CONFIGURATION FILES Character protrusion 191

7576 0F = 1001007577 10 = 1001007578 13 = 1007579 14 = 1007580 15 = 507581 16 = 507582 17 = 501007583 18 = 501007584 1A = 507585 1B = 507586 1C = 501007587 1D = 501007588 1E = 501007589 1F = 501007590 20 = 507591 21 = 507592 22 = 501007593 24 = 507594 27 = 501007595 1 = 1001007596 7 = 501007597 3A = 3005007598 3B = 2004007599 3C = 2001007600 3D = 2002007601 3E = 1002007602 A = 1007603 D = 507604 J = 50 7605 K = 507606 L = 507607 Q = 507608 T = 50 7609 X = 50 507610 Y = 50 7611 h = 507612 k = 507613 7614

Extended by the eulervm package7615 SetProtrusion7616 [ name = euler-vm7617 load = euler ]7618 encoding = U7619 family = zeur 7620 7621 28 = 1002007622 29 = 1002007623 2A = 1001507624 2B = 1001507625 2C = 2003007626 2D = 2003007627 2E = 1007628 2F = 100 7629 3F = 1501507630 5B = 1007631 5E = 1001007632 5F = 1001007633 80 = 507634 81 = 2002507635 82 = 1002007636 76377638 langeurrang

CONFIGURATION FILES Character protrusion 192

Euler Script font (eucal)7639 langeusrang7640 SetProtrusion7641 [ name = euscript ]7642 encoding = U7643 family = eus 7644 7645 A = 1001007646 B = 501007647 C = 50 507648 D = 501007649 E = 501007650 F = 50 7651 G = 50 7652 H = 1007653 K = 507654 L = 1507655 M = 507656 N = 507657 O = 50 507658 P = 50 507659 T = 1007660 U = 507661 V = 50 507662 W = 50 507663 X = 50 507664 Y = 50 7665 Z = 501007666 00 = 2502507667 18 = 2002007668 3A = 2001507669 40 = 1007670 5E = 1001007671 5F = 1001007672 66 = 50 7673 67 = 507674 6E = 2002007675 76767677 SetProtrusion7678 [ name = euscript-vm7679 load = euscript ]7680 encoding = U7681 family = zeus 7682 7683 01 = 6006007684 02 = 2002007685 03 = 2002007686 04 = 2002007687 05 = 1501507688 06 = 2002007689 07 = 2002007690 08 = 1001007691 09 = 1001007692 0A = 1001007693 0B = 1001007694 0C = 1001007695 0D = 1001007696 0E = 1501507697 0F = 1001007698 10 = 1501507699 11 = 1001007700 12 = 1501007701 13 = 1001507702 14 = 150100

CONFIGURATION FILES Character protrusion 193

7703 15 = 1001507704 16 = 2001007705 17 = 1002007706 19 = 1501507707 1A = 1501007708 1B = 1001507709 1C = 1001007710 1D = 1001007711 1E = 2501007712 1F = 1002507713 20 = 1502007714 21 = 1502007715 22 = 1501507716 23 = 1501507717 24 = 1002007718 25 = 1501507719 26 = 1501507720 27 = 1001007721 28 = 1001007722 29 = 1001507723 2A = 1001007724 2B = 1001007725 2C = 1001007726 2D = 1501507727 2E = 1501507728 2F = 1001007729 30 = 1001007730 31 = 1001007731 32 = 1001007732 33 = 1001007733 34 = 1001007734 35 = 1001007735 3E = 1501507736 3F = 1501507737 60 = 2007738 61 = 200 7739 62 = 1001007740 63 = 1001007741 64 = 1001007742 65 = 1001007743 68 = 300 7744 69 = 3007745 6C = 1001007746 6D = 1001007747 6F = 1001007748 72 = 1001007749 73 = 2001007750 76 = 1007751 77 = 100 7752 78 = 50 507753 79 = 1001007754 7A = 1001007755 7D = 1501507756 7E = 1001007757 A8 = 1001007758 A9 = 1001007759 AB = 2002007760 BA = 2007761 BB = 2007762 BD = 2002007763 DE = 2002007764 77657766 langeusrang

CONFIGURATION FILES Character protrusion 194

Euler Fraktur font (eufrak)7767 langeufrang7768 SetProtrusion7769 [ name = mathfrak ]7770 encoding = U7771 family = euf 7772 7773 A = 507774 B = 507775 C = 50 507776 D = 807777 E = 50 7778 G = 507779 L = 807780 O = 507781 T = 807782 X = 80 507783 Z = 80 507784 b = 507785 c = 507786 k = 507787 p = 507788 q = 50 7789 v = 507790 w = 507791 x = 507792 1 = 1001007793 2 = 80 807794 3 = 80 507795 4 = 80 507796 7 = 50 507797 12 = 5005007798 13 = 5005007799 = 2007800 rsquo = 2003007801 ( = 200 7802 ) = 2007803 = 2002007804 + = 2002507805 - = 2002007806 = 3003007807 = 4004007808 = = 2002007809 = 2007810 = 2007811 ] = 2007812 78137814 langeufrang7815 langcfg-urang

1589 Euro symbols

Settings for various Euro symbols (Adobe Euro fonts (packages eurosans europs)ITC Euro fonts (package euroitc) and marvosym24) The euroitc settings are hiddenin the package itself (1437) for lsquofree softwarersquo compliance reasons (Not quitesure whether this is what Karl really had in mind )

7816 langcfg-erang7817 SetProtrusion7818 langzpeurang encoding = U7819 langmvsrang encoding = OT1U

24 Of course there are many more symbols in this font Feel free to contribute protrusion settings

CONFIGURATION FILES Interword spacing 195

Figure 1

Example of interwordspacing (from M SiemoneitTypographisches GestaltenFrankfurtM 1989) Thenumbers indicate thepreference for shrinking theinterword space

7820 langzpeurang family = zpeu 7821 langmvsrang family = mvs 7822 7823 langzpeurang E = 50 7824 langmvsrang 164 = 5050 EUR7825 langmvsrang 068 = 50-100 EURdig7826 78277828 langzpeurang7829 SetProtrusion7830 encoding = U7831 family = zpeu7832 shape = it 7833 7834 E = 100-507835 78367837 SetProtrusion7838 encoding = U7839 family = zpeuseurosans 7840 7841 E = 100507842 78437844 SetProtrusion7845 encoding = U7846 family = zpeuseurosans7847 shape = it 7848 7849 E = 200 7850 78517852 langzpeurang7853 langcfg-erang

159 Interword spacingDefault unit is space

7854 langm-t|cmrrang7855 -----------------------------------------------------------------------7856 INTERWORD SPACING78577858 langm-t|cmrrang7859 langm-trang7860 SetExtraSpacing7861 [ name = default ]7862 encoding = OT1T1LY1OT4QXT5 7863

These settings are only a first approximation The following reasoning is from amail from Ulrich Dirr who also provided the sample in figure 1 I do not claim tohave coped with the task

CONFIGURATION FILES Interword spacing 196

lsquoThe idea is ndash analog to the tables for expansion and protrusion ndash to havetables for optical reductionexpansion of spaces in dependence of the actualcharacter so that the distance between words is optically equal

When reducing distances the (weighting) order is

bull after commas7864 = -500500

bull in front of capitals which have optical more room on their left side eg lsquoArsquolsquoJrsquo lsquoTrsquo lsquoVrsquo lsquoWrsquo and lsquoYrsquo [this is not yet possible ndash RS]

bull in front of capitals which have circleoval shapes on their left side eg lsquoCrsquolsquoGrsquo lsquoOrsquo and lsquoQrsquo [ditto ndash RS]

bull after lsquorrsquo (because of the bigger optical room on the righthand side)7865 r = -300300

bull [before or] after lowercase characters with ascenders7866 b = -2002007867 d = -2002007868 f = -2002007869 h = -2002007870 k = -2002007871 l = -2002007872 t = -200200

bull [before or] after lowercase characters with x-height plus descender withadditional optical space eg lsquovrsquo or lsquowrsquo

7873 c = -1001007874 p = -1001007875 v = -1001007876 w = -1001007877 z = -1001007878 x = -1001007879 y = -100100

bull [before or] after lowercase characters with x-height plus descender withoutadditional optical space

7880 i = 50 -507881 m = 50 -507882 n = 50 -507883 u = 50 -50

bull after colon and semicolon7884 = 200-2007885 = 200-200

bull after punctuation which ends a sentence eg period exclamation markquestion mark

7886 = 250-2507887 = 250-2507888 = 250-250

The order has to be reversed when enlarging is neededrsquo

7889 78907891 langm-trang

Questions are

CONFIGURATION FILES Interword spacing 197

bull Is the result really better

bull Is it overdone (Try with a factor lt 1000)

bull Should the first parameter also be used (Probably)

bull What about quotation marks parentheses etc

Furthermore there seems to be a pdfTEX bug with spacing in combination witha non-zero spaceskip (reported by Axel Berger)

parfillskip0ptrightskip0pt plus 1emspaceskipfontdimen2font test testparpdfadjustinterwordglue2stbscodefont`t=-50 test testbye

Some more characters in T2A25

7892 langcmrrang7893 SetExtraSpacing7894 [ name = T2A7895 load = default ]7896 encoding = T2A7897 family = cmr 7898 7899 cyrg = -3003007900 cyrb = -2002007901 cyrk = -2002007902 cyrs = -1001007903 cyrr = -1001007904 cyrh = -1001007905 cyru = -1001007906 cyrt = 50 -507907 cyrp = 50 -507908 cyri = 50 -507909 cyrishrt = 50 -507910 7911

1591 Nonfrenchspacing

The following settings simulate nonfrenchspacing (since space factors will beignored when spacing adjustment is in effect) They may be used for Englishcontexts

From the TEXbook

lsquoIf the space factor f is different from 1000 the interword glue is computedas follows Take the normal space glue for the current font and add theextra space if f ge 2000 [ ] Then the stretch component is multiplied byf 1000 while the shrink component is multiplied by 1000 f rsquo

The lsquoextra spacersquo (fontdimen7) for Computer Modern Roman is a third offontdimen2 ie 333

7912 SetExtraSpacing7913 [ name = nonfrench-cmr7914 load = default7915 context = nonfrench ]7916 encoding = OT1T1LY1OT4QXT5

25 Contributed by Karl Karlsson

CONFIGURATION FILES Additional kerning 198

7917 family = cmr 7918

latexltx has

defnonfrenchspacing sfcode` 3000 sfcode` 3000 sfcode` 3000

7919 = 3332000-6677920 = 3332000-6677921 = 3332000-667

sfcode` 2000

7922 = 3331000-500

sfcode` 1500

7923 = 500-333

sfcode` 1250

7924 = 250-200

7925 79267927 langcmrrang

fontinst however which is also used to create the psnfss font metrics setsfontdimen7 to 240 by default Therefore the fallback settings use this value forthe first component

7928 langm-trang7929 SetExtraSpacing7930 [ name = nonfrench-default7931 load = default7932 context = nonfrench ]7933 encoding = OT1T1LY1OT4QXT5 7934 7935 = 2402000-6677936 = 2402000-6677937 = 2402000-6677938 = 2401000-5007939 = 500-3337940 = 250-2007941 7942

Empty settings to prevent spurious warnings7943 SetExtraSpacing7944 [ name = empty ]7945 encoding = TS1 7946 7947

1510 Additional kerningDefault unit is 1em

7948 -----------------------------------------------------------------------7949 ADDITIONAL KERNING7950

CONFIGURATION FILES Additional kerning 199

A dummy list to be loaded when no context is active7951 SetExtraKerning7952 [ name = empty ]7953 encoding = OT1T1T2ALY1OT4QXT5TS1 7954 7955

15101 French

The ratio of fontdimen2 to fontdimen6 varies for different fonts so that eitherthe kerning of the colon (which should be a space ie fontdimen 2) or that of theother punctuation characters (TEXrsquos thinspace ie one sixth of fontdimen6)may be inaccurate depending on which unit we choose (space or 1em) For Timesfor example a thin space would be 665 I donrsquot know whether French typographyreally wants a thin space or rather (as it happens to turn out with CMR) half aspace (Wikipedia26 claims it should be a quarter of an em which seems too muchto me then again it also says that this was a thin space in French typography)

7956 SetExtraKerning7957 [ name = french-default7958 context = french7959 unit = space ]7960 encoding = OT1T1LY1 7961 7962 = 1000 = fontdimen27963 = 500 ~ thinspace7964 = 500 7965 = 500 7966 7967

These settings have the disadvantage that a word following a left guillemet willnot be hyphenated This might be fixed in pdfTEX

7968 SetExtraKerning7969 [ name = french-guillemets7970 context = french-guillemets7971 load = french-default7972 unit = space ]7973 encoding = T1LY1 7974 7975 guillemotleft = 800 = 08fontdimen27976 guillemotright = 800 7977 79787979 SetExtraKerning7980 [ name = french-guillemets-OT17981 context = french-guillemets7982 load = french-default7983 unit = space ]7984 encoding = OT1 7985 7986

15102 Turkish7987 SetExtraKerning7988 [ name = turkish7989 context = turkish ]7990 encoding = OT1T1LY1

26 httpfrwikipediaorgwikiEspace_typographique 5 July 2007

CONFIGURATION FILES Additional kerning 200

7991 7992 = 167 = thinspace7993 = 167 7994 = = 167 7995 79967997 langm-trang7998 langconfigrang

OPENTYPE CONFIGURATION FILES 201

16 OpenType configuration filesThese are the configuration files for the following OpenType fonts27

bull Latin Modern Roman

bull Charis SIL28

bull Palatino29

The settings are typeset in the respective font

161 Character inheritanceOpenType fonts may differ considerably in how complete their arsenal of glyphs isTherefore each font family should have their own inheritance settings

79998000 -----------------------------------------------------------------------8001 INHERITANCE80028003 for xetex (EU1) and luatex (EU2) resp both (TU)8004 langLatinModernRomanrang8005 DeclareCharacterInheritance8006 encoding = EU1EU2TU8007 family = Latin Modern Roman

8008 A = AgraveAacuteAcircAtildeAumlAringĀĂĄǺȀẠẢẤẦẨẪẬẮẰẲẶ8009 Α Greek8010 AElig = Ǽ8011 B = ฿8012 Β Greek8013 C = CcedilĆĈĊČ8014 D = ETHĎĐḌḎ8015 E = EgraveEacuteEcircEumlĒĔĖĘĚȄẸẺẼỀẾỄỂỆ8016 Ε Greek8017 G = ĜĞĠĢǦǴ8018 H = ĤĦḤḦḪ8019 Η Greek8020 I = IgraveIacuteIcircIumlĨĪĬĮİȈỈỊ8021 Ι Greek8022 J = Ĵ8023 K = Ķ8024 Κ Greek8025 L = ĹĻŁḶ ĽĿḸ8026 M = Μ Greek8027 N = NtildeŃŅŇṄṆ8028 Ν Greek8029 O = OgraveOacuteOcircOtildeOumlOslashŌŎŐỌƠǪǾȌỎỐỒỔỖỘỚỜỠỞỢ8030 Ο Greek8031 P = Ρ Greek8032 R = ŔŖŘȐṚṘṜ8033 S = ŚŜŞŠȘṢ8034 T = ŢŤȚṬṮ8035 Τ Greek8036 U = UgraveUacuteUcircUumlŨŪŬŮŰŲƯȔỤỦỨỪỬỮỰ8037 W = ŴẀẂẄ8038 X = Χ Greek8039 Y = YacuteŶŸỴỶỸ

27 This is file microtype-utfdtx28 Available at httpsoftwaresilorgcharis29 These settings have been contributed by Loren B Davis

OPENTYPE CONFIGURATION FILES Character inheritance 202

8040 Z = ŹŻŽẒ8041 Ζ Greek8042 a = agraveaacuteacircatildeaumlaringāăąǻȁạảấầẩẫậắằẳẵ8043 aelig = ǽ8044 c = ccedilćĉċč8045 d = đḍḏ8046 e = egraveeacuteecirceumlēĕėęěȅẹẻẽếềểễệ8047 f = ff Unicode 64256 glyph name in Latin Modern f_f in New Computer Modern ff8048 g = ĝğġģǧǵ8049 h = ĥħḥḧḫ8050 i = igraveiacuteicirciumlĩīĭįıȉỉị8051 j = ĵ8052 k = ķ8053 l = ĺļłḷḹ ľlmiddot8054 n = ntildeńņňṅṇ8055 o = ograveoacuteocircotildeoumloslashōŏőọơǫǿȍỏốồổỗộớờỡởợ8056 r = ŕŗřȑṛṙṝ8057 s = śŝşšșṣ8058 t = ţțṭṯẗ ť8059 u = ugraveuacuteucircuumlũūŭůűųưȕụủứừửữự8060 w = ŵẁẃẅ8061 y = yacuteŷyumlỳỵỷỹ8062 z = źżžẓ8063

8064 langLatinModernRomanrang8065 langCharisSILrang8066 DeclareCharacterInheritance8067 encoding = EU1EU2TU8068 family = Charis SIL

8069 A = AgraveAacuteAcircAtildeAumlAringĀĂĄǍǞǠȦǺȀȂḀẠẢẤẦẨẪẬẮẰẲẴẶꜲ

8070 АӐӒ Cyrillic8071 AElig = Ǣ8072 ǼӔ Cyrillic8073 B = ḂḄḆ8074 В Cyr8075 C = CcedilĆĈḈĊČ8076 СҪ Cyr8077 D = ĎḊḌḎḐḒĐ

8078 E = EgraveEacuteEcircEumlĒĔĖĘĚȄȨȆḔḖḘḚḜẸẺẼẾỀỂỄỆ8079 ЕЀЁӖ Cyr8080 F = Ḟ8081 G = ĜĞĠĢǦǴḠԌ8082 H = ĤȞḢḤḦḨḪ8083 НҢҤӇӉ Cyr8084 I = IgraveIacuteIcircȈIumlĮĨỊĪİǏỈȊĬḬIuml8085 ІЇӀӏ Cyr8086 J = Ĵ8087 Ј Cyr8088 K = ĶǨḰḲḴ

8089 КЌҚҜҞҠӃԞ Cyr8090 L = ĹĻĽḶḸḺḼ Lmiddot

8091 M = ḾṀṂ8092 МӍ Cyr8093 N = NtildeŃŅŇǸṄṆṈṊ

8094 ИЙЍҊӢӤ Cyr

8095 O = OgraveOacuteOcircOtildeOumlŌŎŐǑǪǬȌȎȪȬȮȰṌṎṐṒỌỎỐỒỔỖỘỚỜỞỠƠ8096 ОѲӦӨӪ Cyr8097 Θ Greek8098 P = ṔṖ8099 РҎ Cyr8100 Q = Ԛ Cyr8101 R = ŔŖŘȐȒṘṚṜṞ

8102 S = ŚŜŞŠȘṠṢṤṦṨ

OPENTYPE CONFIGURATION FILES Character inheritance 203

8103 Ѕ Cyr8104 T = ŢŤȚṪṬṮṰ8105 ТҬ Cyr

8106 U = UgraveUacuteUcircUumlŨŪŬŮŰŲǓǕǗǙǛȔȖṲṴṶṸṺỤỦỨỪỬỮỰ8107 V = ṼṾ8108 W = ŴẀẂẄẆẈ8109 Ԝ Cyr8110 X = ẊẌ8111 ХҲӼӾ Cyr8112 Y = YacuteŶŸȲẎỲỴỶỸ8113 ҮҰ Cyr8114 Z = ŹŻŽẐẒẔ

8115 a = agraveaacuteacircatildeaumlaringāăąǎǟǡȧǻȁȃḁạảầấẩẫậắằẳẵặ aʾ8116 аӑӓ Cyr8117 aelig = ǽ8118 ӕ Cyr8119 b = ḃḅḇ8120 c = ccedilćĉċčḉ8121 сҫ Cyr8122 d = ďḋḍḏḑḓ

8123 e = egraveeacuteecirceumlēĕėęěȅȩȇḕḗḙḛḝẹẻẽềếểễệ8124 еѐёӗ Cyr8125 f = ḟff f_f8126 g = ĝğġģǧǵḡ8127 h = ĥȟḣḥḧḩḫẖ8128 Һһ Cyr8129 i = ıigraveiacuteicircȉǐiumlįīịĩḭḯỉȋĭ8130 ії Cyr8131 j = ĵǰ8132 ј Cyr8133 k = ķǩḱḳḵ

8134 l = ĺļḻḷḹḽ ľlmiddot8135 m = ḿṁṃ8136 n = ntildeńņňǹṅṇṉṋ ʼn

8137 o = ograveoacuteocircotildeoumlōŏőǒǫǭȍȏȫȭȯȱṍṏṑṓọỏồốổỗộớờởỡợ8138 оѳӧөӫ Cyr8139 p = ṕṗ8140 рҏ Cyr8141 q = ԛ Cyr8142 r = ŕŗřȑȓṙṛṝṟ8143 s = śŝşšșṡṣṥṧṩ8144 ѕ Cyr8145 t = ţțṫṭṯṱẗ ť

8146 u = ugraveuacuteucircuumlũūŭůűųǔǖǘǚǜȕȗṳṵṷṹṻụủứừửữự8147 v = ṽṿ8148 w = ŵẁẃẅẇẉẘ8149 ԝ Cyr8150 x = ẋẍ8151 хҳ Cyr8152 y = yacuteyumlŷȳẏẙỳỵỷỹ8153 уўӯӱӳ Cyr8154 z = źżžẑẓẕ8155 Cyrillic8156 Г = ЃҐҒӶӺ8157 Ж = ҖӜӁ8158 З = ӞҘ8159 Л = Ӆ8160 П = Ԥ8161 У = ЎӮӰӲ8162 Ч = ҶҸӋӴ8163 Ы = Ӹ8164 Ә = Ӛ8165 Ҽ = Ҿ8166 г = ѓґғӷӻ

OPENTYPE CONFIGURATION FILES Character inheritance 204

8167 ж = җӂӝ8168 з = ҙӟ8169 и = йѝҋӣӥ8170 к = ќқҝҟҡӄԟ8171 л = ӆ8172 м = ӎ8173 н = ңҥӈӊ8174 п = ԥ8175 т = ҭ8176 х = ӽӿ8177 ч = ҷҹӌӵ8178 ш = щ8179 ы = ӹ8180 э = ӭ8181 ҽ = ҿ8182 ә = ӛ8183 ү = ұ8184 Г = Γ Greek8185 П = Π Greek8186 81878188 missing tipa math symbols

8189 langCharisSILrang8190 langPalatinorang8191 DeclareCharacterInheritance8192 encoding = EU1EU2TU8193 family = Palatino

Unfortunately I donrsquot have a Palatino variant containing all of the following glyphsThe settings are typeset in TEX Gyre Pagella missing glyphs printed in red aretaken from Charis SIL glyphs missing even in Charis SIL appear as lsquorsquo To see thereal settings consult mt-Palatinocfg

8194 A = AgraveAacuteAcircAtildeAumlĀĂĄǍǞǠȦǺȀȂḀẠẢẤẦẨẪẬẮẰẲẴẶꜲ8195 B = ḂḄḆ8196 C = CcedilĆĈḈĊČ8197 D = ĎḊḌḎḐḒ8198 E = EgraveEacuteEcircEumlĒĔĖĘĚȄȨȆḔḖḘḚḜẸẺẼẾỀỂỄỆ8199 F = Ḟ8200 G = ĜĞĠĢǦǴḠ8201 H = ĤȞḢḤḦḨḪ8202 I = IgraveIacuteIcircȈIumlĮĨỊĪİǏỈȊĬḬIuml8203 J = Ĵ8204 K = ĶǨḰḲḴ8205 L = ĹĻĽḶḸḺḼỺĿŁ Lmiddot8206 M = ḾṀṂ8207 N = NtildeŃŅŇǸṄṆṈṊ8208 O = OgraveOacuteOcircOtildeOumlŌŎŐǑǪǬȌȎȪȬȮȰṌṎṐṒỌỎỐỒỔỖỘỚỜỞỠƠ8209 P = ṔṖ8210 R = ŔŖŘȐȒṘṚṜṞ8211 S = ŚŜŞŠȘṠṢṤṦṨ8212 T = ŢŤȚṪṬṮṰ8213 U = UgraveUacuteUcircUumlŨŪŬŮŰŲǓǕǗǙǛȔȖṲṴṶṸṺỤỦỨỪỬỮỰ8214 V = ṼṾ8215 W = ŴẀẂẄẆẈ8216 X = ẊẌ8217 Y = YacuteŶŸȲẎỲỴỶỸ8218 Z = ŹŻŽẐẒẔ8219 a = agraveaacuteacircatildeaumlaringāăąǎǟǡȧǻȁȃḁạảầấẩẫậắằẳẵặ aʾ8220 b = ḃḅḇ8221 c = ccedilćĉċčḉ8222 d = ďḋḍḏḑḓ8223 e = egraveeacuteecirceumlēĕėęěȅȩȇḕḗḙḛḝẹẻẽềếểễệ

OPENTYPE CONFIGURATION FILES Character inheritance 205

8224 f = ḟff8225 g = ĝğġģǧǵḡ8226 h = ĥȟḣḥḧḩḫẖ8227 i = ıigraveiacuteicircȉǐiumlįīịĩḭḯỉȋĭ8228 j = ĵǰ8229 k = ķǩḱḳḵ8230 l = ĺļḻḷḹḽ ľlmiddot8231 m = ḿṁṃ8232 n = ntildeńņňǹṅṇṉṋ ʼn8233 o = ograveoacuteocircotildeoumlōŏőǒǫǭȍȏȫȭȯȱṍṏṑṓọỏồốổỗộớờởỡợ8234 p = ṕṗ8235 r = ŕŗřȑȓṙṛṝṟ8236 s = śŝşšșṡṣṥṧṩ8237 t = ţțṫṭṯṱẗ ť8238 u = ugraveuacuteucircuumlũūŭůűųǔǖǘǚǜȕȗṳṵṷṹṻụủứừửữự8239 v = ṽṿ8240 w = ŵẁẃẅẇẉẘ8241 x = ẋẍ8242 y = yacuteyumlŷȳẏẙỳỵỷỹ8243 z = źżžẑẓẕ8244

8245 langPalatinorang

Less characters in the Lato font 8246 langLatorang8247 DeclareCharacterInheritance8248 encoding = TUEU1EU28249 family = Lato

8250 A = AgraveAacuteAcircAtildeAumlAringĄ

8251 a = agraveaacuteacircatildeaumlaringą

8252 C = ĆCcedil

8253 c = ćccedil

8254 D= ETH

8255 E = EgraveEacuteEcircEumlĘ

8256 e = egraveeacuteecirceumlę

8257 I = IgraveIacuteIcircIuml

8258 i = igraveiacuteicirciumlı

8259 L = Ł

8260 l = ł

8261 N= ŃNtilde

8262 n = ńntilde

8263 O= OslashOgraveOacuteOcircOtildeOuml

8264 o = oslashograveoacuteocircotildeouml

8265 S = ŚŠ

8266 s = śš

8267 U= UgraveUacuteUcircUuml

8268 u = ugraveuacuteucircuuml

8269 Y = YacuteŸ

8270 y = yacuteyuml

8271 Z = ŹŻŽ

8272 z = źżž

8273

8274 langLatorang

and even less in the self-professedly awesone Font Awesome font8275 langFontAwesomerang8276 DeclareCharacterInheritance8277 encoding = TUEU1EU28278 family = FontAwesome 8279 8280 langFontAwesomerang

OPENTYPE CONFIGURATION FILES Character protrusion 206

162 Character protrusion82818282 -----------------------------------------------------------------------8283 PROTRUSION82848285 langLatinModernRomanrang8286 SetProtrusion8287 [ name = LMR-default ]8288 encoding = EU1EU2TU8289 family = Latin Modern Roman 8290

8291 A = 50508292 AElig = 50 8293 F = 508294 J = 50 8295 K = 508296 L = 508297 T = 50508298 V = 50508299 W = 50508300 X = 50508301 Y = 50508302 k = 508303 r = 508304 t = 708305 v = 50508306 w = 50508307 x = 50508308 y = 50708309 0 = 508310 1 = 1002008311 2 = 50508312 3 = 50508313 4 = 70708314 5 = 508315 6 = 508316 7 = 501008317 8 = 508318 9 = 508319 = 7008320 = 5008321 = 5008322 = 5008323 = 1008324 = 2008325 = 50508326 ~ = 2002508327 = 50508328 = 3003008329 + = 2502508330 - = 400500 hyphen8331 ndash = 400300 endash8332 mdash = 300200 emdash8333 _ = 200200 underscore8334 = 2003008335 backslash = 2003008336 = 300400 quotesingle8337 lsquo = 500700 rsquo = 5006008338 ldquo = 500300 rdquo = 2006008339 sbquo = 400400 bdquo = 4004008340 lsaquo = 400400 rsaquo = 3005008341 laquo = 300200 raquo = 1004008342 iexcl = 100 iquest = 100 8343 ( = 300 ) = 300

OPENTYPE CONFIGURATION FILES Character protrusion 207

8344 lt = 200100 gt = 1002008345 braceleft = 400200 braceright = 2004008346 angleleft = 400 angleright = 4008347 dagger = 1001008348 Dagger = 80 808349 bull = 2002008350 middot = 400450 periodcentered8351 = 80 508352 ₡ = 508353 deg = 4004008354 trade = 1002008355 copy = 1001008356 reg = 1001008357 ordf = 1002008358 ordm = 1002008359 sup1 = 2002508360 sup2 = 501008361 sup3 = 501008362 not = 200 8363 minus = 3003008364 plusmn = 1502008365 times = 1502508366 divide = 1502508367 euro = 100 8368 oneoldstyle = 1001008369 twooldstyle = 50 508370 threeoldstyle = 30 808371 fouroldstyle = 50 508372 sevenoldstyle = 50 808373 Γ = 180 Gamma8374 Δ = 100100 Delta8375 Θ = 50 50 Theta8376 Λ = 100100 Lambda8377 Ξ = Xi8378 Π = Pi8379 Σ = 50 50 Sigma8380 Υ = 100100 Upsilon8381 Φ = 50 50 Phi8382 Ψ = 50 50 Psi8383 Ω = Omega

8384 83858386 SetProtrusion8387 [ name = LMR-it ]8388 encoding = EU1EU2TU8389 family = Latin Modern Roman8390 shape = itsl 8391

8392 A = 1251008393 AElig = 125-558394 B = 90-408395 C = 145-758396 D = 75 -288397 E = 80-558398 F = 85-808399 G = 153-158400 H = 73-608401 I = 140-1208402 IJ = 140-808403 J = 135-808404 K = 70-308405 L = 87 408406 M = 67-458407 N = 75-558408 O = 150-30

OPENTYPE CONFIGURATION FILES Character protrusion 208

8409 Π= 150-558410 P = 82-508411 Q = 150-308412 R = 75 158413 S = 90-658414 $ = 100-208415 T = 220-858416 U = 230-558417 V = 260-608418 W = 185-558419 X = 70-308420 Y = 250-608421 Z = 90-608422 a = 150-108423 b = 170 8424 c = 173-108425 d = 150-558426 e = 180 8427 f = -2508428 g = 150-108429 h = 100 8430 i = 210 8431 ij = 210-408432 j = -408433 k = 110-508434 l = 240-1108435 m = 80 8436 n = 115 8437 o = 155 8438 q = 170-408439 r = 155-408440 s = 130 8441 t = 230-108442 u = 120 8443 v = 140-258444 w = 98-208445 x = 65-408446 y = 130-208447 z = 110-808448 0 = 170-858449 1 = 2301108450 2 = 130-708451 3 = 140-708452 4 = 130808453 5 = 160 8454 6 = 175-308455 7 = 250-1508456 8 = 130-408457 9 = 155-808458 = 5008459 = 4508460 = 3008461 = 3008462 amp = 130308463 = 180508464 = 380208465 + = 1802008466 = 180108467 ~ = 2001508468 ( = 300 ) = 708469 = 1001008470 - = 500300 hyphen8471 ndash = 500300 endash8472 mdash = 400170 emdash8473 _ = 100200 underscore

OPENTYPE CONFIGURATION FILES Character protrusion 209

8474 = 300400 quotesingle8475 = 5003008476 lsquo = 800200 rsquo = 800-208477 ldquo = 540100 rdquo = 5001008478 sbquo = 300700 bdquo = 2006008479 lsaquo = 500300 rsaquo = 4004008480 laquo = 400100 raquo = 2003008481 iexcl = 200 iquest = 200 8482 lt = 300100 gt = 2001008483 backslash = 3003008484 braceleft = 400100 braceright = 2002008485 dagger = 200 808486 Dagger = 120 808487 bull = 2201008488 middot = 550300 periodcentered8489 = 170 8490 ₡ = 100 508491 para = 200 8492 deg = 5003008493 trade = 200 708494 copy = 50 708495 reg = 50 708496 ordf = 1401008497 ordm = 1401008498 sup1 = 4001508499 sup2 = 250 808500 sup3 = 250 808501 not = 250 808502 minus = 3002008503 plusmn = 1501708504 times = 2002008505 divide = 2002008506 euro = 150 8507 oneoldstyle = 1001008508 twooldstyle = 100 808509 threeoldstyle = 80 508510 fouroldstyle = 80 808511 fiveoldstyle = 50 8512 sixoldstyle = 50 8513 sevenoldstyle = 80 808514 eightoldstyle = 50 8515 Γ = 100120 Gamma8516 Δ = 120100 Delta8517 Θ = 120 50 Theta8518 Λ = 130100 Lambda8519 Ξ = 100 Xi8520 Π = 100 Pi8521 Σ = 100 50 Sigma8522 Υ = 180100 Upsilon8523 Φ = 130 70 Phi8524 Ψ = 130 50 Psi8525 Ω = 50 Omega

8526 8527 langLatinModernRomanrang8528 langCharisSILrang8529 SetProtrusion8530 [ name = Charis-default ]8531 encoding = EU1EU2TU8532 family = Charis SIL 8533

8534 A = 50508535 AElig = 50508536 C = 50 8537 D = 508538 F = 50

OPENTYPE CONFIGURATION FILES Character protrusion 210

8539 G = 50 8540 J = 100 8541 K = 508542 L = 508543 Ŀ = 1008544 O = 50508545 Œ= 50 8546 P = 508547 Q = 50708548 R = 508549 ẞ = 40 capital sharp s8550 T = 50508551 V = 50508552 W = 50508553 X = 50508554 Y = 50508555 k = 508556 ŀ = 1508557 r = 508558 t = 508559 v = 50508560 w = 50508561 x = 50508562 y = 508563 1 = 1501508564 2 = 50508565 3 = 50 8566 4 = 100508567 6 = 50 8568 7 = 50808569 9 = 50508570 = 6008571 = 5008572 = 4008573 = 3008574 = 1008575 = 2008576 = 50508577 ~ = 2002508578 = 508579 = 3003008580 += 2002508581 = 2008582 backslash = 1502008583 | = 2002008584 - = 400500 hyphen8585 ndash = 200300 endash8586 mdash= 150250 emdash8587 ―= 200200 Horizontal Bar = texttwelveudash8588 ‒ = 150150 Figure Dash = textthreequartersemdash8589 _ = 1001008590 = = 1001008591 lsquo = 300400 rsquo = 3004008592 ldquo = 300300 rdquo = 3003008593 sbquo = 400400 bdquo = 3003008594 lsaquo = 400300 rsaquo = 3004008595 laquo = 200200 raquo = 1503008596 iexcl = 100 iquest = 100 8597 ( = 200 ) = 2008598 lt= 200150 gt = 1002008599 [ = 100 ] = 1008600 braceleft = 200 braceright = 3008601 dagger = 80 808602 Dagger = 1001008603 bull = 200200

OPENTYPE CONFIGURATION FILES Character protrusion 211

8604 deg = 1502008605 trade = 1501508606 cent = 50 8607 pound = 50 8608 brvbar = 2002008609 copy = 1001008610 reg = 1001008611 ordf = 1002008612 ordm = 2002008613 not = 200 508614 micro = 1008615 para = 1008616 middot = 3004008617 sup1 = 2003008618 sup2 = 1002008619 sup3 = 1002008620 euro = 100 8621 plusmn= 1502008622 times= 2002008623 divide= 2502508624 minus = 2002008625 minus= 2002008626 Cyrillic8627 Б = 508628 Г = 1308629 Ж = 50508630 З = 30508631 Л = 50 8632 У = 50508633 Ф = 50508634 Ч = 100 8635 Ъ = 508636 Ь = 508637 Э = 50508638 Ю= 408639 Я = 50 8640 Ѵ = 50508641 Ҽ = 50 8642 Ђ = 501008643 Є = 50 8644 Љ = 50508645 Њ = 508646 Ћ = 50508647 Ԅ = 1001008648 Ԇ = 50508649 Ѣ = 508650 Ҍ = 508651 Ԉ= 50808652 Ԋ= 808653 Ԏ = 50508654 Ԓ = 50 8655 Ԕ= 50408656 Ԗ = 508657 Ԙ = 50 8658 Ԡ= 508659 Ԣ= 508660 Ԃ = 1008661 б = 50508662 г = 708663 к = 508664 л = 50 8665 т = 50508666 ф = 50508667 ч = 50 8668 ъ = 50

OPENTYPE CONFIGURATION FILES Character protrusion 212

8669 ь = 508670 э = 508671 я = 50 8672 љ = 50 8673 њ = 508674 ѣ = 508675 ѵ = 50508676 ҽ = 50 8677 ҍ = 508678 ү = 50508679 ҕ = 508680 ҧ = 508681 ԃ = 1008682 ԅ = 1001008683 ԇ = 50508684 ԉ = 50708685 ԋ = 708686 ԙ = 50308687 ԡ = 508688 ԣ = 508689 Д П Ц Ш Щ Ы Ҕ Ҧ Ҩ Ә Ҵ Џ Ӭ Ӡ Ԑ Ԁ8690 в д ж з и м н п ц ш ы ю ђ є ћ џ ә ԑ ҩ ҵ ӡ ԁ ԍ ԏ ԓ ԕ ԗ8691 Greek8692 Δ = 50508693 Ψ = 50508694 γ = 70708695 λ = 40708696 π = 40508697 ρ = 508698 σ = 508699 χ = 5050

8700 87018702 SetProtrusion8703 [ name = Charis-it ]8704 encoding = EU1EU2TU8705 family = Charis SIL8706 shape = itsl 8707

8708 C = 50 8709 G = 50 8710 J = 50 8711 L = 50508712 O = 50 8713 Œ= 50 8714 Q = 50 8715 S = 50 8716 $ = 50 8717 T = 70 8718 o = 50508719 p = 508720 q = 50 8721 t = 508722 w = 508723 y = 508724 1 = 1501008725 3 = 50 8726 4 = 100 8727 6 = 50 8728 7 = 100 8729 = 7008730 = 6008731 = 4008732 = 4008733 = 150

OPENTYPE CONFIGURATION FILES Character protrusion 213

8734 amp = 808735 = 50508736 = 3002008737 += 2502508738 = 80508739 ~ = 1501508740 = 1508741 backslash = 1501508742 - = 300400 hyphen8743 ndash = 200300 endash8744 mdash= 150200 emdash8745 _ = 1008746 = = 2002008747 plusmn= 1502008748 times= 2502508749 divide= 2502508750 deg = 1502008751 middot = 3004008752 lsquo = 400200 rsquo = 4002008753 ldquo = 300200 rdquo = 4002008754 sbquo = 200500 bdquo = 1505008755 lsaquo = 300400 rsaquo = 2005008756 laquo = 200300 raquo = 1504008757 ( = 200 ) = 2008758 lt= 200200 gt = 2002008759 braceleft = 300 braceright = 2008760 Cyrillic8761 Ж = 50308762 Л = 50 8763 У = 50308764 Ф = 50 8765 Ч = 100 8766 Ъ = 508767 Ь = 508768 Э = 50508769 Я = 50 8770 Ѵ = 50508771 Љ = 50508772 Ԅ = 1401008773 Ԇ = 70508774 Ԉ= 50808775 Ԋ= 808776 Ԏ = 50508777 г = 50508778 д = 50308779 м = 50 8780 ф = 50 8781 ч = 50 8782 ъ = 508783 ь = 508784 э = 508785 я = 50 8786 љ = 50508787 њ = 508788 ѵ = 50508789 ҍ = 508790 ԅ = 1401008791 ԇ = 70508792 ԉ = 50708793 ԋ = 708794 Greek8795 Γ = 1308796 Δ = 50508797 Ψ = 50508798 γ = 7070

OPENTYPE CONFIGURATION FILES Character protrusion 214

8799 λ = 40708800 π = 40508801 ρ = 508802 σ = 508803 χ = 5050

8804

The small caps glyph names in Charis SIL have changed with version 50 of thefont We try to get the names right both with LuaTEX (where we can simply querythe font version) and with XETEX (where we check for glyph name)

88058806 quick and dirty -- maybe wersquoll promote this to a8807 regular key some time8808 definekeyMTprccommandcsname 1endcsname88098810 glyph names have changed with version 50 of Charis SIL8811 before aSC bSC 8812 after asc bsc 8813 ifxMTluaundefined8814 gdefMTgetCHARISSC8815 test whether glyph asc exists8816 ifnumnumexprXeTeXglyphindex ascrelax gt 08817 gdefMTCHARISSCsc8818 else8819 gdefMTCHARISSCSC8820 fi8821 8822 else8823 gdefMTgetCHARISSC8824 gdefMTCHARISSCMTlua8825 check font version8826 -- why doesnrsquot this work8827 f = fontgetfont(fontcurrent())8828 i = fontloaderinfo(ffilename)8829 if (tonumber(iversion) lt 5) then8830 if (tonumber(fontloaderinfo(fontgetfont(fontcurrent())filename)version) lt 5) then8831 texprint(SC)8832 else8833 texprint(sc)8834 end8835 8836 8837 fi88388839 SetProtrusion8840 [ name = Charis-sc8841 load = Charis-default8842 command = MTgetCHARISSC ]8843 encoding = EU1EU2TU8844 family = Charis SIL8845 shape = sc 8846

8847 ᴀ = 100100 etc doesnt work with textsc8848 aMTCHARISSC = 1001008849 cMTCHARISSC = 50 8850 dMTCHARISSC = 508851 fMTCHARISSC = 508852 gMTCHARISSC = 50 8853 jMTCHARISSC = 100 8854 kMTCHARISSC = 508855 lMTCHARISSC = 508856 f_lMTCHARISSC = 508857 oMTCHARISSC = 50508858 oeMTCHARISSC = 50

OPENTYPE CONFIGURATION FILES Character protrusion 215

8859 qMTCHARISSC = 50708860 rMTCHARISSC = 508861 tMTCHARISSC = 501008862 vMTCHARISSC = 50508863 wMTCHARISSC = 50508864 xMTCHARISSC = 50508865 yMTCHARISSC = 5050

8866 8867 langCharisSILrang8868 langPalatinorang8869 SetProtrusion8870 [ name = palatino-default ]8871 encoding = EU1EU2TU8872 family = Palatino 8873

8874 A = 50508875 D = 508876 J = 50 8877 K = 508878 L = 508879 O = 25 8880 T = 50508881 V = 50508882 W = 50508883 X = 50508884 Y = 50508885 b = 258886 d = 25308887 f = 508888 g = 1008889 k = 508890 p = 508891 q = 50 8892 r = 508893 t = 50 = 50 = 508894 v = 75508895 w = 50508896 x = 50508897 y = 50708898 1 = 100508899 2 = 25508900 4 = 50 8901 6 = 50 8902 9 = 25 8903 AElig = 100 8904 Π= 25 8905 = 700 = 350 hellip = 1508906 = 5008907 = 5008908 = 5008909 = 100 = 1008910 = 200 = 2008911 = 50508912 ~ = 2002508913 amp = 501008914 = 1001008915 = 2002008916 + = 2502508917 ( = 100 ) = 3008918 = 2003008919 - = 4005008920 textendash = 300300 textemdash = 2002008921 textquoteleft = 500700 textquoteright = 5007008922 textquotedblleft = 300400 textquotedblright = 3004008923 textbackslash = 200300

OPENTYPE CONFIGURATION FILES Character protrusion 216

8924 quotesinglbase = 400400 quotedblbase = 4004008925 guilsinglleft = 400400 guilsinglright = 3005008926 guillemotleft = 300300 guillemotright = 2004008927 textexclamdown = 100 textquestiondown = 100 8928 textbraceleft = 400200 textbraceright = 2004008929 textless = 200100 textgreater = 1002008930 le = 200100 ge = 1002008931 textminus = 3003008932 texttrademark = 2002008933 textcopyright = 2002008934 textregistered = 2002008935 textdegree = 3003008936 brvbar = 450500 not = 2501508937 = 1502508938 middot = 850 7008939 para = 10008940 times = 150 3008941 ordf = 300300 ordm = 3003008942 ⁰ = 2004008943 sup1 = 400350 sup2 = 200300 sup3 = 2504008944 ⁴ = 250350 ⁵ = 200300 ⁶ = 2504008945 ⁷ = 200450 ⁸ = 250400 ⁹ = 2003508946 ₀ = 2004008947 ₁ = 400250 ₂ = 200300 ₃ = 2504008948 ₄ = 250350 ₅ = 200300 ₆ = 2504008949 ₇ = 200450 ₈ = 250400 ₉ = 2003508950 plusmn = 150100 divide = 3003008951 thorn = 258952 ₊ = 300450 ₋ = 3004508953 ⁺ = 300450 ⁻ = 3004508954 dagger = 200250 Dagger = 2002508955 π = 50 8956 ſ = 508957 = 1001508958 textservicemark = 1002008959 ‐ = 400500 ‑ = 400500 ‒ = 2003008960 ndash = 205305 mdash = 200300 ― = 501508961 bull = 1252008962 asc = 50508963 89648965 SetProtrusion8966 [ name = palatino-it ]8967 encoding = EU1EU2TU8968 family = Palatino8969 shape = itsl 8970

8971 A = 50508972 AElig = 50 8973 B = 50 8974 C = 50 8975 D = 50508976 E = 50 8977 F = 50 8978 G = 50 8979 H = 50 8980 K = 50 8981 L = 50 8982 O = 50 8983 Π= 50 8984 P = 50 8985 Q = 50 8986 R = 50 8987 S = 50 8988 $ = 50

OPENTYPE CONFIGURATION FILES Character protrusion 217

8989 T = 100 8990 U = 50 8991 V = 100508992 W = 50 8993 X = 50 8994 Y = 100508995 b = 508996 c = 25 8997 g = 75 8998 i = 25 8999 m = 509000 n = 509001 p = 259002 q = 25 9003 x = 509004 1 = 100 9005 2 = 50 9006 4 = 50 9007 7 = 50 9008 = 500 = 350 hellip = 2009009 = 5009010 = 3009011 = 3009012 = 300 = 3009013 amp = 50509014 = 1001009015 = 2002009016 + = 1502009017 = 50509018 ~ = 2001509019 ( = 200 ) = 2009020 = 1002009021 - = 3005009022 textendash = 300300 textemdash = 2002009023 textquoteleft = 700400 textquoteright = 7004009024 textquotedblleft = 500300 textquotedblright = 5003009025 _ = 1001009026 textbackslash = 1002009027 quotesinglbase = 500500 quotedblbase = 4004009028 guilsinglleft = 400400 guilsinglright = 3005009029 guillemotleft = 300300 guillemotright = 3003009030 textexclamdown = 100 textquestiondown = 200 9031 textbraceleft = 200100 textbraceright = 2002009032 textless = 300100 textgreater = 2001009033 le = 200100 ge = 1002009034 brvbar = 450500 not = 2501509035 middot = 850 7009036 para = 10009037 times = 150 3009038 ordf = 300250 deg = 300300 ordm = 3002509039 ⁰ = 3002009040 sup1 = 300150 sup2 = 350200 sup3 = 2501509041 ⁴ = 350100 ⁵ = 300 50 ⁶ = 4001009042 ⁷ = 400 50 ⁸ = 250 50 ⁹ = 300 509043 ₀ = 3003009044 ₁ = 300350 ₂ = 300150 ₃ = 2502509045 ₄ = 400200 ₅ = 300100 ₆ = 4502009046 ₇ = 450150 ₈ = 400250 ₉ = 4002009047 plusmn = 150100 divide = 3003009048 thorn = 50 9049 dagger = 250200 Dagger = 2502009050 ₊ = 300450 ₋ = 3004509051 ⁺ = 300450 ⁻ = 3004509052 ‐ = 300500 ‑ = 300500 ‒ = 1003009053 ndash = 125305 mdash = 200300 ― = 125150

OPENTYPE CONFIGURATION FILES Character protrusion 218

9054 bull = 125200

9055 90569057 SetProtrusion9058 [ name = palatino-sc9059 load = palatino-default ]9060 encoding = EU1EU2TU9061 family = Palatino9062 shape = sc 9063

9064 a = 50509065 aelig = 50 9066 b = 0 09067 d = 0 09068 f = 0 09069 g = 0 09070 j = 50 9071 l = 509072 o = 0 09073 p = 0 09074 q = 0 9075 r = 09076 t = 50509077 y = 50509078 fl = 0509079 ffl = 0509080 = 0509081 = 050

9082 9083 langPalatinorang9084 langLatorang No settings yet9085 langFontAwesomerang9086 SetProtrusion9087 [ name = empty ]9088 encoding = TUEU1EU29089 family = FontAwesome 9090 9091 langFontAwesomerang9092

AUXILIARY FILE FOR MICRO FINE TUNING 219

17 Auxiliary file for micro fine tuningThis file can be used to test protrusion and expansion settings

9093 langtestrang9094 documentclassarticle90959096 Here you can specify the font you want to test using9097 the commands fontfamily fontseries and fontshape9098 Make sure to end all lines with a comment character9099 newcommandTestFont9100 fontfamilyppl9101 fontseriesb9102 fontshapeit sc sl9103 91049105 usepackageifthen9106 usepackage[T1]fontenc9107 usepackage[latin1]inputenc9108 usepackage[verboseexpansion=alltextstretch=50]microtype91099110 pagestyleempty9111 setlengthparindent0pt9112 newcommandcrulefillcleadershbox$mkern-2musmash-mkern-2mu$hfill9113 newcommandtestprotrusion[2][]9114 ifthenelseequal1r29115 lorem ipsum dolor sit amet9116 ifthenelseequal1rcrulefillleftarrowfill 29117 ifthenelseequal1lcrulefillrightarrowfill9118 you know the rest9119 ifthenelseequal1l29120 linebreak9121 fontencodingencodingdefault9122 fontseriesseriesdefault9123 fontshapeshapedefault9124 selectfont9125 Here is the beginning of a line dotfill and here is its endlinebreak9126 9127 newcommandshowTestFontexpandafterstripprefixmeaningTestFont9128 defstripprefix1gt9129 newcountcharcount9130 begindocument91319132 microtypesetupexpansion=false91339134 centering The font in this document is called by9135 textttshowTestFontparbigskip91369137 TestFontselectfont9138 This line intentionally left emptylinebreak9139 A -- Z9140 charcount=659141 loop9142 testprotrusioncharcharcount9143 advancecharcount 19144 ifnumcharcount lt 91 repeat9145 a -- z9146 charcount=979147 loop9148 testprotrusioncharcharcount9149 advancecharcount 19150 ifnumcharcount lt 123 repeat9151 0 -- 99152 charcount=489153 loop

AUXILIARY FILE FOR MICRO FINE TUNING 220

9154 testprotrusioncharcharcount9155 advancecharcount 19156 ifnumcharcount lt 58 repeat9157 9158 testprotrusion[r]9159 testprotrusion[r]9160 testprotrusion[r]9161 testprotrusion[r]9162 testprotrusion[r]9163 testprotrusion[r]9164 testprotrusion[l]textexclamdown9165 testprotrusion[l]textquestiondown9166 testprotrusion[r])9167 testprotrusion[l](9168 testprotrusion9169 testprotrusionchar`9170 testprotrusion-9171 testprotrusiontextendash9172 testprotrusiontextemdash9173 testprotrusiontextquoteleft9174 testprotrusiontextquoteright9175 testprotrusiontextquotedblleft9176 testprotrusiontextquotedblright9177 testprotrusionquotesinglbase9178 testprotrusionquotedblbase9179 testprotrusionguilsinglleft9180 testprotrusionguilsinglright9181 testprotrusionguillemotleft9182 testprotrusionguillemotright91839184 newpage9185 The following displays the current font stretched by 59186 normal and shrunk by 591879188 bigskip9189 newlengthMTln9190 newcommandteststring9191 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567899192 settowidthMTlnteststring9193 microtypesetupexpansion=true91949195 parbox105MTlnteststringlinebreak9196 teststringparbigskip9197 parbox095MTlnteststring91989199 enddocument9200 langtestrang

Needless to say that things may always be improved For suggestions mail towmlgmxnet

THE TITLE LOGO 221

A The title logoThis is microtype-logodtx You may treat this file in three different ways

bull compile it by itself

bull input it in the body of a dtx file

bull input it in the preamble it then provides the command printlogo which will do just that

The first two cases require the style file microtype-docsty which can be generated from microtypeins with

makefilemicrotype-docstydocsty

9201 langlogorangHerersquos how the logo on the title page was created30 It has nothing to do with microtype actually but uses fontinstIt is based on an experiment I posted to the decomptexttex newsgroup31 It will show

bull the character

bull the TEX box

bull the bounding box

bull kerns

A1 MacrosTo run this file TEX needs to find the afm file (either in the TEXINPUTS path or in the current working directory)

First input fontinst

9202 input fontinststy

bboxsty is an addition to fontinst which makes dimensions of the bounding boxes available (and was writtenby Hagraven Thecirc Thagravenh by the way) These dimensions are specified in the afm file but not used by TEX which is whyfontinst will discard them otherwise

9203 input bboxsty

tempdim Allocate some dimen registers

9204 newdimentempdim

fboxrulei Frame width of the box as TEX sees it

9205 newdimenfboxrulei9206 fboxrulei=01pt

fboxruleii Frame width of the bounding box

9207 newdimenfboxruleii9208 fboxruleii=01pt

kernboxheight Height of the box indicating the kern

9209 newdimenkernboxheight9210 kernboxheight=5pt

scaletoem An auxiliary macro Return a dimension relative to the em-width of the font Requires e-TEX

9211 setcommandscaletoem1dimexpr 1 spfontdimen6font1000relax

showlogo A fontinst incantation whose sole purpose is to produce the logo Its argument is a string (letters only)

9212 fontinstcc9213 defshowlogo1

Some fonts do not specify the fontdimen6 (width of an em) in the afm file In this case use the font size which iscorrect in most cases

9214 ifdimfontdimen6font = 0pt9215 typeout~Warning~no~fontdimen~6~specified~^^J9216 ~setting~it~to~pdffontsizefont ifnumpdftexversion lt 130 ptfi~9217 fontdimen6font=pdffontsizefont ifnumpdftexversion lt 130 ptfirelax9218 fi9219 installfonts9220 input_metricslogofontmetricsprintbbs1relax

30 Note that the logo module will not be created when installing microtype Instead the source file microtype-logodtx isincluded as an attachment in the PDF file If your PDF reader supports this you can to extract it alternativelyyou may use the pdftk tool

31 Message ID 42aa3687$0$24366$9b4e6d93newsread2arcor-onlinenet

ProvidesFilemicrotype-logodtx[20090608] ^^A dont count the backslashes in this documentmakeatletterletorigstepchecksumstepchecksumletstepchecksumrelaxmakeatother sectionThe title logo labelsectitle-logo^^Aiffalse meta-comment ^^A ======================================================================== This is filemicrotype-logodtx You may treat this file in three different waysbeginitemize item compile it by itself item verb|input| it in the body of a filedtx file item verb|input| it in the preamble it then provides the command verb|printlogo| which will do just thatenditemize The first two cases require the style file filemicrotype-docsty which can be generated from filemicrotypeins withbeginverbatimmakefilemicrotype-docstydocstyendverbatim ^^A ========================================================================^^Afi beginmacrocodeltlogogt endmacrocode Heres how the logo on the title page was createdfootnote Note that the |logo| module will not be created when installing microtype Instead the source file filemicrotype-logodtx is included as an attachment in the acronymPDF file If your acronymPDF reader supports this you can textattachfile [color=002 004 048mimetype=textplain]microtype-logodtx click here to extract it alternatively you may use the |pdftk| tool It has nothing to do with microtype actually but uses pkgfontinst It is based on an experiment I posted to the urldecomptexttex newsgroupfootnote Message ID nolinkurl42aa3687$0$24366$9b4e6d93newsread2arcor-onlinenet It will showbeginitemize item the character item the TeX box item the bounding box item kernsenditemize subsectionMacros To run this file TeX needs to find the fileafm file (either in the |TEXINPUTS| path or in the current working directory) First input pkgfontinst beginmacrocodeinput fontinststy endmacrocode filebboxsty is an addition to pkgfontinst which makes dimensions of the bounding boxes available (and was written by thanh by the way) These dimensions are specified in the fileafm file but not used by TeX which is why pkgfontinst will discard them otherwise beginmacrocodeinput bboxsty endmacrocodebeginmacrotempdim Allocate some dimen registers beginmacrocodenewdimentempdim endmacrocodeendmacrobeginmacrofboxrulei Frame width of the box as TeX sees it beginmacrocodenewdimenfboxruleifboxrulei=01pt endmacrocodeendmacrobeginmacrofboxruleii Frame width of the bounding box beginmacrocodenewdimenfboxruleiifboxruleii=01pt endmacrocodeendmacrobeginmacrokernboxheight Height of the box indicating the kern beginmacrocodenewdimenkernboxheightkernboxheight=5pt endmacrocodeendmacrobeginmacroscaletoem An auxiliary macro Return a dimension relative to the |em|-width of the font Requires etex beginmacrocodesetcommandscaletoem1dimexpr 1 spfontdimen6font1000relax endmacrocodeendmacrobeginmacroshowlogo A pkgfontinst incantation whose sole purpose is to produce the logo Its argument is a string (letters only) beginmacrocodefontinstccdefshowlogo1 endmacrocode Some fonts do not specify the fontdim6 (width of an |em|) in the |afm| file In this case use the font size which is correct in most cases beginmacrocode ifdimfontdimen6font = 0pt typeout~Warning~no~fontdimen~6~specified~^^J ~setting~it~to~pdffontsizefont ifnumpdftexversion lt 130 ptfi~ fontdimen6font=pdffontsizefont ifnumpdftexversion lt 130 ptfirelax fi installfonts input_metricslogofontmetricsprintbbs1relax endinstallfontsnormalcc endmacrocodeendmacro Layers beginmacrocodemakeatletterdefmtllayer12pdfliteralOC1 BDC2pdfliteralEMCifxmtobjectsundefinedletmtobjectsemptyfiifxmtorder undefinedletmtorder emptyfixdefmtordermtorder[(Logo)letmtlresourcesemptydefmtlregister1 immediatepdfobjltlt TypeOCG Name(1) gtgt expandafterxdefcsname mtl1endcsnamethepdflastobjspace 0 R xdefmtobjectsmtobjectscsname mtl1endcsname xdefmtordermtordercsname mtl1endcsname xdefmtlresourcesmtlresources1 csname mtl1endcsnamemtlregistercanvasmtlregistercharactersmtlregisterbounding-boxesmtlregisterTeX-boxesxdefmtordermtorder]globalletmtlobjectsmtobjectsdeftogglelayer12 pdfstartlink width wdlogobox height htlogobox depth dplogobox userSubtypeLink BS ltlt TypeBorderW 0 gtgt HO A ltlt SSetOCGState State[Toggle csname mtl1endcsname] gtgt 2pdfendlink endmacrocodebeginmacroprintbbs Preparation beginmacrocodesetcommandprintbbs1 setbox0hbox1 leavevmode kern-fboxrulei endmacrocode The canvas in the natural width of the text minus protrusion in color |bgcolor| beginmacrocode mtllayercanvas getboundarychars1relax tempdim=dimexprwd0 - (scaletoemlpcodefontfirstchar+ scaletoemrpcodefontlastchar)relax kerndimexprscaletoemlpcodefontfirstcharrelax lowerdimexprdp0+005em relax vboxcolorbgcolor hrule width tempdim height dimexprdp0+ht0+015emrelax kern-tempdim endmacrocode The baseline in color |blcolor| beginmacrocode vboxcolorblcolor hrule width tempdim height fboxrulei kern-dimexprwd0 -scaletoemrpcodefontlastcharrelax endmacrocode The string beginmacrocode printbbss 1relaxrelax endmacrocodeendmacrobeginmacrogetboundarychars Get first~dots beginmacrocodedefgetboundarychars12relax deffirstchar`1 getlastchar12relax endmacrocodeendmacrobeginmacrogetlastchar dots~and last character beginmacrocodedefgetlastchar12 ifxrelax2relax deflastchar`1 else expandaftergetlastchar fi 2 endmacrocodeendmacrobeginmacroprintbbss Loop over all characters of the string beginmacrocodedefprintbbss123relax ifxrelax1relax else ifxrelax2relax printbb1 else printbb12 fi expandafterprintbbss fi 23relax endmacrocodeendmacrobeginmacroprintbb Record the kern between the current and the following character then print the character cmdkerning is a pkgfontinst command beginmacrocodesetcommandprintbb12 setbox0hboxkerning12xdefthekernnumberresult showboxes1 endmacrocode This could be another application beginmacrocode quad w thescaletoemwidth1 bb thescaletoembbleft1 thescaletoembbright1 thescaletoemnumbernumexprwidth1-bbright1relax h height1bbtop1 bbbottom1depth1par endmacrocodeendmacrobeginmacroshowboxes Print the boxes for char meta1 This wont work if meta1 isnt also the PostScript name of the glyph (eg `comma =llap `) beginmacrocodesetcommandshowboxes1 leavevmode colortexcolor endmacrocode We have to record the width of the glyph beginmacrocode setbox0hboxcolortextcolor1 globaltempdim=wd0relax kern-fboxrulei endmacrocodebeginenumerateitem textitThe TeX box Print a frame in color |texcolor| This frame shows the glyph as TeX sees it beginmacrocode mtllayerTeX-boxes hbox lowerdimexpr dp0 + fboxruleirelax hbox vbox hrule heightfboxrulei hbox vrule widthfboxrulei height dimexprht0 + 2fboxruleirelax phantomunhcopy0 vrule widthfboxrulei hrule heightfboxrulei endmacrocodeitem textitThe character Now we step back and print the actual glyph We hold it back until now so that it will be printed emphon top of its box beginmacrocode kern-wd0 mtllayercharactershboxbox0 endmacrocode Step back by the amount that the characters bounding box differs from the TeX box on the left side beginmacrocode kerndimexprscaletoembbleft1-tempdim-fboxruleiirelax endmacrocodeitem textitThe bounding box will be printed in color |bbcolor| beginmacrocode mtllayerbounding-boxes colorbbcolor hbox lowerdimexpr-scaletoembbbottom1+fboxruleiirelax hbox vbox hrule heightfboxruleii hbox to dimexprscaletoemnumexpr bbright1-bbleft1relax+2fboxruleiirelax vrule height dimexprscaletoemnumexpr bbtop1-bbbottom1relax widthfboxruleii hfill vrule widthfboxruleii hrule heightfboxruleii kern-dimexprfboxruleii+fboxruleirelax endmacrocodeitem textitThe kern We also print a small box in color |kerncolor| indicating the kerning between the current and the next character filled for negative kerns empty for positive kerns beginmacrocode kernscaletoemnumexprwidth1-bbright1relax mtllayerTeX-boxes ifnumthekernlt0 colorkerncolor kernscaletoemthekern lowerkernboxheighthboxvrule width -dimexprscaletoemthekernrelax height kernboxheight kernscaletoemthekern else colortexcolor ifnumthekern=0 else lowerkernboxheight hbox vbox hrule heightfboxrulei hbox vrule height kernboxheight widthfboxrulei kerndimexprscaletoemthekern-2fboxruleirelax vrule widthfboxrulei hrule heightfboxrulei fi fi kern-fboxrulei endmacrocodeendenumerateendmacro beginmacrocodenewboxlogoboxdefprintlogo setboxlogobox=hboxvbox MakePercentComment endmacrocode This is the Kepler MM font used in the logo beginmacrocode deflogofontpkpri9e10 transformfontlogofontreencodefont8rfromafmpkpmmri8a10 fontthelogofont=logofontspace at 82pt endmacrocode This would load the italic Palatino font instead beginmacrocodedeflogofontpplritransformfontlogofont8rreencodefont8rfromafmlogofont8aedeflogofontlogofont8rfontthelogofont=logofontspace at 78pt endmacrocode Load the font beginmacrocode thelogofont endmacrocode Protrusion values (overdone for didactic reasons) beginmacrocode lpcodefont`M=96 rpcodefont`e=46 endmacrocode Now we can generate the logo beginmacrocode pdfliteral directSXS gs showlogoMicrotype rlapnormalfontnormalsizeraisebox55ptfootnotemark[1] kern5pt[3baselineskip] longdefmakefntext1 leftskip 0pt parindent 0pt everyparparindent 0pt leavevmodehbox to 15ptthefnmarkhss1 footnotetext[1]This graphic display on a togglelayercanvascanvas the togglelayercharacterscharacters their togglelayerbounding-boxesbounding boxes and togglelayerTeX-boxesTeX boxes edeflogodimenswidth thewdlogobox height thehtlogobox depth thedplogobox immediatepdfobjltltTypeExtGState CA 06 ca 06 BMNormal gtgt immediatepdfxform attr Group ltltTypeGroup STransparency I true CSDeviceRGB gtgt resources Properties ltltmtlresourcesgtgt ExtGState ltlt SXS thepdflastobjspace 0 R gtgt logobox vskip-25baselineskip leavevmode togglelayercharacters pdfrefxformpdflastxform pdfannotlogodimens SubtypeWidget FTBtn T(Logo) F 4 why did I say this AP ltlt N thepdflastxformspace 0 R gtgt AA ltlt E ltlt SSetOCGState State[Toggle mtlcharacters] gtgt X ltlt SSetOCGState State[Toggle mtlcharacters] gtgt D ltlt SSetOCGState State[Toggle csname mtlbounding-boxesendcsname] gtgt U ltlt SSetOCGState State[Toggle csname mtlTeX-boxesendcsname] gtgt gtgt vspace3baselineskip endmacrocode Our font beginmacrocodepdfmapline+pkpmmri8r10 KeplMM-It_385_575_10_ TeXBase1Encoding ReEncodeFont lt8renc ltpkpmmri8a10pfb endmacrocode Define colours (|thered| and |thegreen| are copied from filemicrotypedtx) beginmacrocodedefmtdefinecolors definecolortheredrgb065004007 definecolorthegreenrgb006044008 colorlettexcolorthegreen50 TeX boxes colorletkerncolortexcolor negative kerns colorletbbcolorthered50 bounding box colorletbgcolorblack8 canvas colorletblcolorblack50 baseline colorlettextcolorblack40 text endmacrocode Use with filemicrotypedtx beginmacrocodeifxdocumentclasstwoclasseserror usepackage[xcdraw]xcolor mtdefinecolorselse endmacrocodesubsectionDocument Now we can start the document beginmacrocodedocumentclass[10pta4paper]ltxdocprovidecommandMakePercentCommentrelaxexpandafterdefcsname vermicrotypedtxendcsname29999999 endmacrocode Re-use the preamble from filemicrotypedtx beginmacrocodeusepackagemicrotype-docusepackageattachfilemakeatletterpdfcatalogOCProperties ltlt OCGs [mtobjects] D ltlt Order [mtorder] gtgt gtgtmakeatotherbegindocument endmacrocode You are currently reading this beginmacrocodeDocInputmicrotype-logodtxnewpage And here it isvfillbegincenter printlogo nullendcentervfillexpandafterenddocumentfi endmacrocode Thats it^^A resume counting backslashesmakeatletterletstepchecksumorigstepchecksum^^Amakeatother beginmacrocodeltlogogt endmacrocodeendinput

THE TITLE LOGO Macros 222

9221 endinstallfonts9222 9223 normalcc

Layers

9224 makeatletter9225 defmtllayer12pdfliteralOC1 BDC2pdfliteralEMC9226 ifxmtobjectsundefinedletmtobjectsemptyfi9227 ifxmtorder undefinedletmtorder emptyfi9228 xdefmtordermtorder[(Logo)9229 letmtlresourcesempty9230 defmtlregister19231 immediatepdfobjltlt TypeOCG Name(1) gtgt9232 expandafterxdefcsname mtl1endcsnamethepdflastobjspace 0 R 9233 xdefmtobjectsmtobjectscsname mtl1endcsname9234 xdefmtordermtordercsname mtl1endcsname9235 xdefmtlresourcesmtlresources1 csname mtl1endcsname9236 mtlregistercanvas9237 mtlregistercharacters9238 mtlregisterbounding-boxes9239 mtlregisterTeX-boxes9240 xdefmtordermtorder]9241 globalletmtlobjectsmtobjects9242 deftogglelayer129243 pdfstartlink width wdlogobox height htlogobox depth dplogobox9244 userSubtypeLink9245 BS ltlt TypeBorderW 0 gtgt HO9246 A ltlt SSetOCGState9247 State[Toggle csname mtl1endcsname] gtgt9248 2pdfendlink9249

printbbs Preparation

9250 setcommandprintbbs19251 setbox0hbox19252 leavevmode9253 kern-fboxrulei

The canvas in the natural width of the text minus protrusion in color bgcolor

9254 mtllayercanvas9255 getboundarychars1relax9256 tempdim=dimexprwd0 - (scaletoemlpcodefontfirstchar+9257 scaletoemrpcodefontlastchar)relax9258 kerndimexprscaletoemlpcodefontfirstcharrelax9259 lowerdimexprdp0+005em relax vboxcolorbgcolor9260 hrule width tempdim9261 height dimexprdp0+ht0+015emrelax9262 kern-tempdim

The baseline in color blcolor

9263 vboxcolorblcolor9264 hrule width tempdim9265 height fboxrulei9266 9267 kern-dimexprwd0 -scaletoemrpcodefontlastcharrelax

The string

9268 printbbss 1relaxrelax9269

getboundarychars Get first

9270 defgetboundarychars12relax9271 deffirstchar`19272 getlastchar12relax9273

getlastchar and last character

9274 defgetlastchar12

THE TITLE LOGO Macros 223

9275 ifxrelax2relax9276 deflastchar`19277 else9278 expandaftergetlastchar9279 fi 29280

printbbss Loop over all characters of the string

9281 defprintbbss123relax9282 ifxrelax1relax9283 else9284 ifxrelax2relax9285 printbb19286 else9287 printbb129288 fi9289 expandafterprintbbss9290 fi 23relax9291

printbb Record the kern between the current and the following character then print the character kerning is a fontinstcommand

9292 setcommandprintbb129293 setbox0hboxkerning12xdefthekernnumberresult9294 showboxes1

This could be another application

9295 quad9296 w thescaletoemwidth19297 bb thescaletoembbleft19298 thescaletoembbright19299 thescaletoemnumbernumexprwidth1-bbright1relax9300 h height1bbtop1 bbbottom1depth1par9301

showboxes Print the boxes for char lang1rang This wonrsquot work if lang1rang isnrsquot also the PostScript name of the glyph (eg lsquocommarsquo = lsquorsquo)

9302 setcommandshowboxes19303 leavevmode9304 colortexcolor

We have to record the width of the glyph

9305 setbox0hboxcolortextcolor19306 globaltempdim=wd0relax9307 kern-fboxrulei

1 The TEX box Print a frame in color texcolor This frame shows the glyph as TEX sees it

9308 mtllayerTeX-boxes9309 hbox9310 lowerdimexpr dp0 + fboxruleirelax9311 hbox9312 vbox9313 hrule heightfboxrulei9314 hbox9315 vrule widthfboxrulei height dimexprht0 + 2fboxruleirelax9316 phantomunhcopy09317 vrule widthfboxrulei9318 9319 hrule heightfboxrulei9320

2 The character Now we step back and print the actual glyph We hold it back until now so that it will be printedon top of its box

9321 kern-wd09322 mtllayercharactershboxbox0

Step back by the amount that the characterrsquos bounding box differs from the TEX box on the left side

9323 kerndimexprscaletoembbleft1-tempdim-fboxruleiirelax

THE TITLE LOGO Macros 224

3 The bounding box will be printed in color bbcolor

9324 mtllayerbounding-boxes9325 colorbbcolor9326 hbox9327 lowerdimexpr-scaletoembbbottom1+fboxruleiirelax9328 hbox9329 vbox9330 hrule heightfboxruleii9331 hbox to dimexprscaletoemnumexpr9332 bbright1-bbleft1relax+2fboxruleiirelax9333 vrule height dimexprscaletoemnumexpr9334 bbtop1-bbbottom1relax9335 widthfboxruleii9336 hfill9337 vrule widthfboxruleii9338 hrule heightfboxruleii9339 9340 kern-dimexprfboxruleii+fboxruleirelax9341

4 The kern We also print a small box in color kerncolor indicating the kerning between the current and the nextcharacter filled for negative kerns empty for positive kerns

9342 kernscaletoemnumexprwidth1-bbright1relax9343 mtllayerTeX-boxes9344 ifnumthekernlt09345 colorkerncolor9346 kernscaletoemthekern9347 lowerkernboxheighthboxvrule width -dimexprscaletoemthekernrelax9348 height kernboxheight9349 kernscaletoemthekern9350 else9351 colortexcolor9352 ifnumthekern=0 else9353 lowerkernboxheight9354 hbox9355 vbox9356 hrule heightfboxrulei9357 hbox9358 vrule height kernboxheight widthfboxrulei9359 kerndimexprscaletoemthekern-2fboxruleirelax9360 vrule widthfboxrulei9361 9362 hrule heightfboxrulei9363 fi9364 fi9365 9366 9367 kern-fboxrulei9368

9369 newboxlogobox9370 defprintlogo9371 setboxlogobox=hboxvbox9372 MakePercentComment

This is the Kepler MM font used in the logo

9373 deflogofontpkpri9e109374 transformfontlogofontreencodefont8rfromafmpkpmmri8a109375 fontthelogofont=logofontspace at 82pt

This would load the italic Palatino font instead

9376 deflogofontpplri9377 transformfontlogofont8rreencodefont8rfromafmlogofont8a9378 edeflogofontlogofont8r9379 fontthelogofont=logofontspace at 78pt

Load the font

THE TITLE LOGO Macros 225

9380 thelogofont

Protrusion values (overdone for didactic reasons)

9381 lpcodefont`M=969382 rpcodefont`e=46

Now we can generate the logo

9383 pdfliteral directSXS gs9384 showlogoMicrotype9385 rlapnormalfontnormalsizeraisebox55ptfootnotemark[1]9386 kern5pt[3baselineskip]9387 longdefmakefntext19388 leftskip 0pt9389 parindent 0pt9390 everyparparindent 0pt9391 leavevmodehbox to 15ptthefnmarkhss19392 footnotetext[1]This graphic display on a9393 togglelayercanvascanvas the togglelayercharacterscharacters9394 their togglelayerbounding-boxesbounding boxes9395 and togglelayerTeX-boxesTeX boxes9396 9397 edeflogodimenswidth thewdlogobox height thehtlogobox depth thedplogobox9398 immediatepdfobjltltTypeExtGState CA 06 ca 06 BMNormal gtgt9399 immediatepdfxform9400 attr Group ltltTypeGroup STransparency I true CSDeviceRGB gtgt9401 resources Properties ltltmtlresourcesgtgt9402 ExtGState ltlt SXS thepdflastobjspace 0 R gtgt 9403 logobox9404 vskip-25baselineskip9405 leavevmode9406 togglelayercharacters9407 pdfrefxformpdflastxform9408 9409 pdfannotlogodimens9410 SubtypeWidget FTBtn T(Logo)9411 F 4 why did I say this9412 AP ltlt N thepdflastxformspace 0 R gtgt9413 AA ltlt E ltlt SSetOCGState State[Toggle mtlcharacters] gtgt9414 X ltlt SSetOCGState State[Toggle mtlcharacters] gtgt9415 D ltlt SSetOCGState State[Toggle csname mtlbounding-boxesendcsname] gtgt9416 U ltlt SSetOCGState State[Toggle csname mtlTeX-boxesendcsname] gtgt9417 gtgt 9418 vspace3baselineskip9419

Our font

9420 pdfmapline+pkpmmri8r10 KeplMM-It_385_575_10_ TeXBase1Encoding ReEncodeFont lt8renc ltpkpmmri8a10pfb

Define colours (thered and thegreen are copied from microtypedtx)

9421 defmtdefinecolors9422 definecolortheredrgb0650040079423 definecolorthegreenrgb0060440089424 colorlettexcolorthegreen50 TeX boxes9425 colorletkerncolortexcolor negative kerns9426 colorletbbcolorthered50 bounding box9427 colorletbgcolorblack8 canvas9428 colorletblcolorblack50 baseline9429 colorlettextcolorblack40 text9430

Use with microtypedtx

9431 ifxdocumentclasstwoclasseserror9432 usepackage[xcdraw]xcolor9433 mtdefinecolors9434 else

THE LETTERSPACING ILLUSTRATION Document 226

A2 DocumentNow we can start the document

9435 documentclass[10pta4paper]ltxdoc9436 providecommandMakePercentCommentrelax9437 expandafterdefcsname vermicrotypedtxendcsname29999999

Re-use the preamble from microtypedtx

9438 usepackagemicrotype-doc9439 usepackageattachfile9440 makeatletter9441 pdfcatalogOCProperties ltlt OCGs [mtobjects] D ltlt Order [mtorder] gtgt gtgt9442 makeatother9443 begindocument

You are currently reading this

9444 DocInputmicrotype-logodtx9445 newpage9446 And here it is9447 vfill9448 begincenter9449 printlogo null9450 endcenter9451 vfill9452 expandafterenddocument9453 fi

Thatrsquos it

9454 langlogorang

B The letterspacing illustrationThis is microtype-lssampledtx You may treat this file in three different ways

bull compile it by itself

bull input it in the body of a dtx file

bull input it in the preamble it then provides the commands

ndash lssample prints the letterspacing illustration

ndash anchorarrow anchors an arrow for layer lang1rangndash showarrow toggles layer lang1rang or lang2rang and prints lang2rang

The first two cases require the style file microtype-docsty which can be generated from microtypeins with

makefilemicrotype-docstydocsty

9455 ifxlssampleundefined9456 langlssamplerang

Upon popular request herersquos how Irsquove created the letterspacing illustration32

B1 MacrosRule width and image height and depth

9457 makeatletter9458 newdimenlsamount9459 newdimenlsrule9460 lsrule=02pt9461 deflsheight8pt9462 deflsdepth12pt

32 Note that the lssample module will not be created when installing microtype Instead the source filemicrotype-lssampledtx is included as an attachment in the PDF file If your PDF reader supports this you can

to extract it alternatively you may use the pdftk tool

ProvidesFilemicrotype-lssampledtx[20090608] ^^A dont count the backslashes in this documentmakeatletterletorigstepchecksumstepchecksumletstepchecksumrelaxmakeatother sectionThe letterspacing illustration labelsecletterspace-ill^^Aiffalse meta-comment ^^A ======================================================================== This is filemicrotype-lssampledtx You may treat this file in three different waysbeginitemize item compile it by itself item verb|input| it in the body of a filedtx file item verb|input| it in the preamble it then provides the commands beginitemize item verb|lssample| prints the letterspacing illustration item verb|anchorarrow| anchors an arrow for layer meta1 item verb|showarrow| toggles layer meta1 or meta2 and prints meta2 enditemizeenditemize The first two cases require the style file filemicrotype-docsty which can be generated from filemicrotypeins withbeginverbatimmakefilemicrotype-docstydocstyendverbatim ^^A ========================================================================^^Afi beginmacrocodeifxlssampleundefinedltlssamplegt endmacrocode Upon popular request heres how Ive created the letterspacing illustrationfootnote Note that the |lssample| module will not be created when installing microtype Instead the source file filemicrotype-lssampledtx is included as an attachment in the acronymPDF file If your acronymPDF reader supports this you can textattachfile [color=002 004 048mimetype=textplain]microtype-lssampledtx click here to extract it alternatively you may use the |pdftk| tool subsectionMacros Rule width and image height and depth beginmacrocodemakeatletternewdimenlsamountnewdimenlsrulelsrule=02ptdeflsheight8ptdeflsdepth12pt endmacrocode Our font (Adobe Caslon) beginmacrocodedeflsfontfontfamilypacaselectfont endmacrocode Loop over all letters in meta2 letterspacing them by meta1 beginmacrocodedefdols12lsamount=1relax dolss2enddolsdefdolss12enddols ifxempty2emptydividelsamount 2fi ls1 ifxempty2emptyelse dolss2enddols fi endmacrocode One pkgtikz picture for each letter beginmacrocodedefls1 begintikzpicture[remember pictureline width=lsrule] tikzstyleevery node=[inner sep=0pt] endmacrocode The bounding box beginmacrocode mtslayerstuff node[draw=thegrey fill=theshade outer sep=lsrule anchor=base font=lsfont]phantom1 endmacrocode The letter beginmacrocode node[anchor=basefont=lsfont](1)1 endmacrocode Two auxiliary coordinates beginmacrocode path (1south west) ++(+5lsrule-5lsrule) coordinate (1L) path (1base east) ++(-5lsrule-lsdepth) coordinate (1R) mtslayerstuff endmacrocode Now draw the normal character width beginmacrocode draw[color=thered75 fill=thered30 outer sep=lsrule] (1L) rectangle (1R) ifdimlsamountgt0pt path (1base east) ++(+5lsamount-6pt) coordinate (1_ls) path (1R) ++(lsamount+lsrule+lsdepth) coordinate (1E) endmacrocode and the letter space beginmacrocode draw[color=thered fill=thered50 outer sep=lsrule] (1R) ++(+lsrule+0pt) rectangle (1E) fi endtikzpicture ignorespaces endmacrocode Draw the interword space beginmacrocodedeflssp1234 begintikzpicture[remember pictureline width=lsruleinner sep=0pt] mtslayerstuff tikzstyleevery draw=[anchor=bottom] coordinate(1space) at (22lsdepth2) coordinate(1stretch) at (2+32+0pt) coordinate(1shrink) at (2-42+0pt) draw[color=thegreenfill=thegreen50use as bounding box] (00) rectangle ++(+2+lsdepth) draw[color=thegreenfill=thegreen30] (+2-lsrule) rectangle ++(+3-4pt+lsrule) draw[color=thegreenfill=thegreen50] (+2-lsrule) rectangle ++(-4-4pt+lsrule) draw[-gtline width=03ptshorten lt=05lsrulecolor=thegreen50] (+2-2pt-5lsrule) -- ++(+3+0pt) draw[-gtline width=03ptshorten lt=05lsrulecolor=thegreen30] (+2-2pt-5lsrule) -- ++(-4+0pt) endtikzpicture ignorespaces endmacrocode Layers beginmacrocodedefmtslayer12pdfliteral pageOC1 BDC2pdfliteral pageEMCdefmtsxlayer12pdfliteral pageOCstuff BDC OC1 BDC2pdfliteral pageEMC EMCifxmtobjectsundefinedletmtobjectsemptyfiifxmtorder undefinedletmtorder emptyfixdefmtordermtorder[(Sheep)letmtsresourcesemptydefmtsregister1 immediatepdfobjltlt TypeOCG Name(1) gtgt expandafterxdefcsname mts1endcsnamethepdflastobjspace 0 R xdefmtobjectsmtobjectscsname mts1endcsname xdefmtordermtordercsname mts1endcsname xdefmtsresourcesmtsresources1 csname mts1endcsnamemtsregisterstuffmtsregistertrackingmtsregisterispacemtsregisterospacemtsregisteristretchmtsregisterishrinkmtsregisterostretchmtsregisteroshrinkmtsregisterokernmtsregisterligaturemtsregister_compatibilityxdefmtordermtorder] endmacrocode Anchor point for the arrow in the code beginmacrocodenewcommandanchorarrow[1] tikz[remember pictureoverlay]node(1_c) endmacrocode Add an arrow from code to image beginmacrocodenewcommandaddarrow[5][left] tikz[remember pictureoverlaybend angle=14looseness=075gt=latex] mtsxlayer3draw[-gtthickcolor=the2](4) to[bend 1] (5) endmacrocode Toggle layer beginmacrocodedeftogglelayer123 pdfstartlink userSubtypeLink BS ltlt TypeBorderW 0 gtgt HO BS ltlt TypeBorderW 1 SD D[4 1] gtgt C[07 07 07] HO Contents(Click to Toggle) A ltlt SSetOCGState State[Toggle csname mts1endcsname] gtgt rlap2 fboxsep=0pt fboxrule=0pt mtsxlayerstuff rlapfcolorboxwhitewhitevphantomkgcolorthe32 mtsxlayer1 fcolorboxwhitethe350vphantomkgcolorwhite2 pdfendlinknewcommandshowarrow[2][] ifxrelax1relaxdeftempa2elsedeftempa1fi togglelayertempaitshape 2 endmacrocode The environment for our illustration beginmacrocodedeflssample1 parskip 4pt parindent 0pt par vskip4pt leftskip 15pt mtpseudomargcolortheblueClick on the image to show the kerns and spacings involved Click on emphasised words in the text below to reveal the relation of image and codestrut mtlayer_compatibility mtplacerlaphskip-marginparwidth colorwhite vrule widthdimexprhsize+marginparwidthrelax heightmtunvdimen mtpseudomargcolorthered If you had a acronymPDF viewer that understands acronymPDFsmaller15 you could hide the arrows selectively vskip-mtunvdimen vskip-4pt setlengthfboxsep4pt leavevmode pdfstartlink userSubtypeLink BS ltlt TypeBorderW 0 gtgt HO A ltlt SSetOCGState State[Toggle mtsstuff] gtgt fcolorboxtheframetheshade fontsize3438selectfont 1 pdfendlink parmedskip edefxpdfpageresourcesProperties ltltmtsresourcesgtgtx endmacrocode Now define the illustration to be used in the document beginmacrocodedeflssample lssample dols0ptStop lsspo045em025em015em dols016emstealinghskip-dimexpr 008em+lsrulerelax lsspi1382pt465pt208pt dols016emsheep dols0pt endmacrocode Dont forget to add the arrows beginmacrocode vspace-baselineskip addarrowred trackinglsamount_ceasta_ls addarrowred okern okernend_ceastp_ls addarrowgreen ospace ospace_ceast ospace addarrowgreen ispace ispace_ccenterispace addarrowgreen75 istretchistretch_ceastistretchnorth addarrowgreen75 ishrink ishrink_cwest ishrinknorth addarrowgreen75 ostretchostretch_ceastostretchnorth addarrowgreen75 oshrink oshrink_ceast oshrinknorth addarrow[right]greyligaturenolig_ceast stcenterfi endmacrocode This is for use with filemicrotypedtx beginmacrocodeifxdocumentclasstwoclasseserror usepackagetikzelse endmacrocodesubsectionDocument beginmacrocodedocumentclass[10pta4paper]ltxdocexpandafterdefcsname vermicrotypedtxendcsname29999999 endmacrocode Re-use the preamble from filemicrotypedtx beginmacrocodeusepackagemicrotype-docusepackageattachfileusepackagetikzmakeatletterpdfcatalogOCProperties ltlt OCGs [mtobjects] D ltlt Order [mtorder] BaseStateOFF gtgt gtgt makeatotherbegindocument endmacrocode You are currently reading this beginmacrocodeDocInputmicrotype-lssampledtx endmacrocode Now show what we are able to do beginmacrocodenoindent Since a picture is worth a thousand words probably even more if in our case it depicts a couple of letterspaced words lets bring one to sum up these somewhat confusing options Suppose you had the following settings (which I would in no way recommend they are only for illustrative purposes)beginverbatimSetTracking [ no ligatures = anchorarrownoligf spacing = 60anchorarrowispace0 -1anchorarrowistretch00 anchorarrowishrink outer spacing = 4anchorarrowospace50 2anchorarrowostretch501anchorarrowoshrink50 outer kerning = anchorarrowokernbegin anchorarrowokernend ] encoding = 1anchorarrowlsamount60 endverbatim and then writebeginverbatimStop textlsstealing sheependverbatim this is the (typographically dubious) outcome lssamplenoindent While the word `Stop is not letterspaced the space between the letters in the other two words is expanded by the showarrow[tracking]tracking~amountred of 1601000em=allowbreak016em The showarrow[ispace]inner~spacegreen within the letterspaced text is increased by 60 while its showarrow[istretch]stretchgreen amount is decreased by 10 and the showarrow[ishrink]shrinkgreen amount is left untouched The showarrow[ospace]outer~spacegreen (of 045em) immediately before the piece of text may showarrow[ostretch]stretchgreen by 025em and showarrow[oshrink]shrinkgreen by 015em Note that there is no outer space after the text since the exclamation mark immediately follows instead the default showarrow[okern]outer~kernred of half the letterspace amount (008em) is added Furthermore one showarrowligaturegrey wasnt broken up because we neglected to specify the `|s| in the |no ligatures| keyexpandafterenddocumentfi endmacrocode^^A resume counting backslashesmakeatletterletstepchecksumorigstepchecksum^^Amakeatother beginmacrocodeltlssamplegt endmacrocodenewpageendinput

THE LETTERSPACING ILLUSTRATION Macros 227

Our font (Adobe Caslon)

9463 deflsfontfontfamilypacaselectfont

Loop over all letters in lang2rang letterspacing them by lang1rang9464 defdols12lsamount=1relax dolss2enddols9465 defdolss12enddols9466 ifxempty2emptydividelsamount 2fi9467 ls19468 ifxempty2emptyelse dolss2enddols fi9469

One tikz picture for each letter

9470 defls19471 begintikzpicture[remember pictureline width=lsrule]9472 tikzstyleevery node=[inner sep=0pt]

The bounding box

9473 mtslayerstuff9474 node[draw=thegrey9475 fill=theshade9476 outer sep=lsrule9477 anchor=base9478 font=lsfont]phantom19479

The letter

9480 node[anchor=basefont=lsfont](1)1

Two auxiliary coordinates

9481 path (1south west) ++(+5lsrule-5lsrule) coordinate (1L)9482 path (1base east) ++(-5lsrule-lsdepth) coordinate (1R)9483 mtslayerstuff

Now draw the normal character width

9484 draw[color=thered759485 fill=thered309486 outer sep=lsrule]9487 (1L) rectangle (1R)9488 ifdimlsamountgt0pt9489 path (1base east) ++(+5lsamount-6pt) coordinate (1_ls)9490 path (1R) ++(lsamount+lsrule+lsdepth) coordinate (1E)

and the letter space

9491 draw[color=thered9492 fill=thered509493 outer sep=lsrule]9494 (1R) ++(+lsrule+0pt) rectangle (1E)9495 fi9496 9497 endtikzpicture9498 ignorespaces9499

Draw the interword space

9500 deflssp12349501 begintikzpicture[remember pictureline width=lsruleinner sep=0pt]9502 mtslayerstuff9503 tikzstyleevery draw=[anchor=bottom]9504 coordinate(1space) at (22lsdepth2)9505 coordinate(1stretch) at (2+32+0pt)9506 coordinate(1shrink) at (2-42+0pt)9507 draw[color=thegreenfill=thegreen50use as bounding box]9508 (00) rectangle ++(+2+lsdepth)9509 draw[color=thegreenfill=thegreen30]9510 (+2-lsrule) rectangle ++(+3-4pt+lsrule)9511 draw[color=thegreenfill=thegreen50]9512 (+2-lsrule) rectangle ++(-4-4pt+lsrule)9513 draw[-gtline width=03ptshorten lt=05lsrulecolor=thegreen50]

THE LETTERSPACING ILLUSTRATION Macros 228

9514 (+2-2pt-5lsrule) -- ++(+3+0pt)9515 draw[-gtline width=03ptshorten lt=05lsrulecolor=thegreen30]9516 (+2-2pt-5lsrule) -- ++(-4+0pt)9517 9518 endtikzpicture9519 ignorespaces9520

Layers

9521 defmtslayer12pdfliteral pageOC1 BDC2pdfliteral pageEMC9522 defmtsxlayer12pdfliteral pageOCstuff BDC OC1 BDC2pdfliteral pageEMC EMC9523 ifxmtobjectsundefinedletmtobjectsemptyfi9524 ifxmtorder undefinedletmtorder emptyfi9525 xdefmtordermtorder[(Sheep)9526 letmtsresourcesempty9527 defmtsregister19528 immediatepdfobjltlt TypeOCG Name(1) gtgt9529 expandafterxdefcsname mts1endcsnamethepdflastobjspace 0 R 9530 xdefmtobjectsmtobjectscsname mts1endcsname9531 xdefmtordermtordercsname mts1endcsname9532 xdefmtsresourcesmtsresources1 csname mts1endcsname9533 mtsregisterstuff9534 mtsregistertracking9535 mtsregisterispace9536 mtsregisterospace9537 mtsregisteristretch9538 mtsregisterishrink9539 mtsregisterostretch9540 mtsregisteroshrink9541 mtsregisterokern9542 mtsregisterligature9543 mtsregister_compatibility9544 xdefmtordermtorder]

Anchor point for the arrow in the code

9545 newcommandanchorarrow[1]9546 tikz[remember pictureoverlay]node(1_c)

Add an arrow from code to image

9547 newcommandaddarrow[5][left]9548 tikz[remember pictureoverlaybend angle=14looseness=075gt=latex]9549 mtsxlayer3draw[-gtthickcolor=the2](4) to[bend 1] (5)9550

Toggle layer

9551 deftogglelayer1239552 pdfstartlink9553 userSubtypeLink9554 BS ltlt TypeBorderW 0 gtgt HO9555 BS ltlt TypeBorderW 1 SD D[4 1] gtgt9556 C[07 07 07] HO9557 Contents(Click to Toggle)9558 A ltlt SSetOCGState9559 State[Toggle csname mts1endcsname] gtgt 9560 rlap29561 fboxsep=0pt fboxrule=0pt9562 mtsxlayerstuff9563 rlapfcolorboxwhitewhitevphantomkgcolorthe329564 mtsxlayer19565 fcolorboxwhitethe350vphantomkgcolorwhite29566 9567 pdfendlink9568 9569 newcommandshowarrow[2][]9570 ifxrelax1relaxdeftempa2elsedeftempa1fi9571 togglelayertempaitshape 2

THE LETTERSPACING ILLUSTRATION Document 229

The environment for our illustration

9572 deflssample19573 parskip 4pt parindent 0pt9574 par9575 vskip4pt9576 leftskip 15pt9577 mtpseudomargcolortheblueClick on the image to show the kerns9578 and spacings involved Click on emphasised words in the text below9579 to reveal the relation of image and codestrut9580 mtlayer_compatibility9581 mtplacerlaphskip-marginparwidth colorwhite9582 vrule widthdimexprhsize+marginparwidthrelax heightmtunvdimen9583 mtpseudomargcolorthered9584 If you had a acronymPDF viewer that understands9585 acronymPDFsmaller15 you could hide the arrows selectively9586 vskip-mtunvdimen9587 vskip-4pt9588 setlengthfboxsep4pt9589 leavevmode9590 pdfstartlink9591 userSubtypeLink9592 BS ltlt TypeBorderW 0 gtgt HO9593 A ltlt SSetOCGState9594 State[Toggle mtsstuff] gtgt 9595 fcolorboxtheframetheshade9596 fontsize3438selectfont 19597 pdfendlink9598 parmedskip9599 9600 edefxpdfpageresourcesProperties ltltmtsresourcesgtgtx9601

Now define the illustration to be used in the document

9602 deflssample9603 lssample9604 dols0ptStop9605 lsspo045em025em015em9606 dols016emstealinghskip-dimexpr 008em+lsrulerelax9607 lsspi1382pt465pt208pt9608 dols016emsheep9609 dols0pt9610

Donrsquot forget to add the arrows

9611 vspace-baselineskip9612 addarrowred trackinglsamount_ceasta_ls9613 addarrowred okern okernend_ceastp_ls9614 addarrowgreen ospace ospace_ceast ospace9615 addarrowgreen ispace ispace_ccenterispace9616 addarrowgreen75 istretchistretch_ceastistretchnorth9617 addarrowgreen75 ishrink ishrink_cwest ishrinknorth9618 addarrowgreen75 ostretchostretch_ceastostretchnorth9619 addarrowgreen75 oshrink oshrink_ceast oshrinknorth9620 addarrow[right]greyligaturenolig_ceast stcenter9621 9622 fi

This is for use with microtypedtx

9623 ifxdocumentclasstwoclasseserror9624 usepackagetikz9625 else

B2 Document9626 documentclass[10pta4paper]ltxdoc9627 expandafterdefcsname vermicrotypedtxendcsname29999999

THE LETTERSPACING ILLUSTRATION Document 230

Re-use the preamble from microtypedtx9628 usepackagemicrotype-doc9629 usepackageattachfile9630 usepackagetikz9631 makeatletter9632 pdfcatalogOCProperties ltlt OCGs [mtobjects]9633 D ltlt Order [mtorder] BaseStateOFF gtgt gtgt 9634 makeatother9635 begindocument

You are currently reading this9636 DocInputmicrotype-lssampledtx

Now show what we are able to do9637 noindent9638 Since a picture is worth a thousand words probably even more if in our9639 case it depicts a couple of letterspaced words letrsquos bring one to sum up9640 these somewhat confusing options Suppose you had the following settings9641 (which I would in no way recommend they are only for illustrative purposes)9642 beginverbatim9643 SetTracking9644 [ no ligatures = anchorarrownoligf9645 spacing = 60anchorarrowispace09646 -1anchorarrowistretch00 anchorarrowishrink9647 outer spacing = 4anchorarrowospace509648 2anchorarrowostretch501anchorarrowoshrink509649 outer kerning = anchorarrowokernbegin9650 anchorarrowokernend ]9651 encoding = 9652 1anchorarrowlsamount60 9653 endverbatim9654 and then write9655 beginverbatim9656 Stop textlsstealing sheep9657 endverbatim9658 this is the (typographically dubious) outcome96599660 lssample96619662 noindent9663 While the word `Stoprsquo is not letterspaced the space between the letters in9664 the other two words is expanded by the showarrow[tracking]tracking~amountred9665 of 1601000em=allowbreak016em9666 The showarrow[ispace]inner~spacegreen within the letterspaced text is9667 increased by 60 while its showarrow[istretch]stretchgreen amount is9668 decreased by 10 and the showarrow[ishrink]shrinkgreen amount is left9669 untouched9670 The showarrow[ospace]outer~spacegreen (of 045em) immediately before the9671 piece of text may showarrow[ostretch]stretchgreen by 025em and9672 showarrow[oshrink]shrinkgreen by 015em9673 Note that there is no outer space after the text since the exclamation mark9674 immediately follows instead the default showarrow[okern]outer~kernred9675 of half the letterspace amount (008em) is added9676 Furthermore one showarrowligaturegrey wasnrsquot broken up because we9677 neglected to specify the `|s|rsquo in the |no ligatures| key96789679 expandafterenddocument9680 fi

9681 langlssamplerang

CHANGE HISTORY 231

C Change history

20040911 Version 10

General Initial version 1

20040921 Version 11

General configuration file names in lowercase (sug-gested by Harald Harders) 87

remove 8-bit characters from the configuration files(suggested by Harald Harders) 147

Protrusion add factors for some more characters 154settings for Adobe Minion (contributed by Harald

Harders) 155DeclareCharacterInheritance new command pos-

sibility to specify character inheritance 120MTdeclaresets remove spaces around set name 106MTfindfile fix also check whether the file for

the base font family has already been loaded 87MTgetbasefamily only remove suffixes lsquoxrsquo or lsquojrsquo 88MTgetlistname donrsquot check for empty attributes

list 89MTifempty fix use category code 12 for the percent

character (reported by Tom Kink) 45MTisnumber numbers may also be specified in

hexadecimal or octal (suggested by HaraldHarders) 94

MTpdftexno fix version check (reported by HaraldHarders) 40

MTpermute donrsquot use sets for empty encoding 121MTsetupexpansion issue an error instead of a

warning when pdfTEX version is too old forautoexpand 137

MTsplitcodes fix allow zero and negative values 63MTuseset remove spaces around set name 110

20041003 Version 12

Font aliases declare cmor as an alias of cmr 144Font sets new allmath and basicmath 143Protrusion add settings for Computer Modern Roman

and Adobe Garamond in TS1 encoding 178add settings for Computer Modern Roman math

symbols 183MTfamilyalias define alias font name as an altern-

ative not as a replacement 60MTgetbasefamily also remove lsquowrsquo (swash capit-

als) 88MTgethighlevel check whether defaults have

changed 106

MTgetinhlist fix set inheritance list globallyto empty 91

MTgetlistname alternatively check for alias fontname 89

MTgetsize additional magic to catch some errors 108MTgetsize hijack setfontsize instead of

setfontsize 108MTloop fix new macro used instead of loop 49MTmaybedo also check for alias font name 60MTpermute more sanity checks for

SetProtrusion and SetExpansion 123MTsetupfont also search for alias font file 57

fix call encupdate if necessary 57

20041027 Version 13

General fix specifying load option does no longerrequire to give a name too 116

Font aliases declare aer zer and hfor as aliases ofcmr 144

MTfixcatcode check some category codes (com-patibility with german) 35

MTloadlist check whether list exists 87

20041112 Version 14

General check for pdfcprot 54donrsquot use scratch registers in global definitions 91use pickupfont instead of definenewfont as

the hook for MTsetupfont 100use one instead of five counters 50

Protrusion tweak quote characters for cmr variants

(OT1 T1 lmr) 160microtypesetup fix set the correct levels and re-

member them warning when enabling an optiondisabled in package options 131

SetExpansion fix specifying extra options does nolonger require to give a name too 113

20041117 Version 14a

General new option final 128MTcfgcatcodes fix reset some more catcodes

when reading files (reported by Michael Hoppe) 88

CHANGE HISTORY 232

20041126 Version 14b

General fix set catcodes before reading global con-figuration file (reported by Christoph Bier) 130

optimisation use less expandafters and csnames 44Protrusion harmonise dashes in upshape and italic

(cmr pad ppl) 154slanted like italics 163

MTchecklistfamily fix donrsquot try alias familyname if encoding failed 61

MTgetbasefamily fix failed for font names of the

form abczz (reported by Georg Verweyen) 88MTgetslot donrsquot define MTchar globally (save

stack problem) 91MTifdimen donrsquot set MTcount globally (save stack

problem) 46MTsetupPDF new message if pdfoutput is

changed 134MTuseset donrsquot use undeclared font sets 110

20041215 Version 15

General defaults step 4 (suggested by Hagraven ThecircThagravenh) 128

new option selected by default false (suggestedby Hagraven Thecirc Thagravenh) 126

Documentation add lsquoShort historyrsquo 30Inheritance remove ss from T1 list add DJ 148Protrusion settings for Bitstream Charter 155DeclareMicrotypeAlias remove spaces around ar-

guments 111MTcfgcatcodes reset catcode of lsquo=rsquo (compatibility

with Turkish babel) 88MTfixcatcode reset catcode of lsquoˆrsquo (compatibility

with chemsym) 35

MTgethighlevel donrsquot test defaults if called afterbegin document 106

MTscalefactor warning for factors outside limits 66MTscaletoem donrsquot use lpcode and rpcode for

the calculation 64MTsetexcodes allow non-selected font expan-

sion 70MTsetprcodes adjust protrusion factors before

setting the inheriting characters 62MTsetupexpansion defaults calculate step as

min(stretchshrink)5 136defaults turn off expansion for DVI output 135disable automatic expansion for DVI output 136

20050124 Version 16

General defaults turn off expansion for old pdfTEXversions 129

load a font if none is selected 56new option factor by default 1000 128restructure dtx file 143test whether pickupfont has changed 102test whether numeric options receive a number 128use e-TEXrsquos ifcsname and ifdefined if defined 44

Protrusion add italic uppercase Greek letters 163improve settings for numbers (pointed out by Peter

Muthesius) 156

tune CMR math letters (OML encoding) 183MTgetcharwd use e-TEXrsquos fontcharwd if available 65MTgetinhlist correct message if selected is

false 91MTsetexcodes introduce factor option 70MTsetprcodes introduce factor option 62MTsetupexpansion disable automatic expansion

for old pdfTEX versions 137MTuseset retain current set if new set is un-

declared 110MTvinfo new macro instead of ifMTverbose 36

20050202 Version 16a

Documentation add table of fonts with tailored pro-trusion settings 21

MTgetslot completely redone hopefully morerobust (compatible with frenchpro problem

reported by Bernard Gaulle) 91MTpdftexno new macro 39MTresetefcodes only reset efcodes for older

pdfTEX versions 70

20050323 Version 17

General allow specification of size ranges (suggestedby Andreas Buumlhmann) 107

disallow automatic expansion if pdfTEX too old 119fix remove space after autoexpand 119new value for verbose option errors 128shorter command names 51warning when running in draft mode 134

Documentation add hint about compatibility 26remove table of match order (now table 4 on

page 89) 12Protrusion fix remove from OT1 add

textbackslash to T1 encoding 158LoadMicrotypeFile new command (suggested by

Andreas Buumlhmann) 112MicrotypeHook new command for font package

authors 130microtypesetup fix warning also when setting to

(no)compatibility 131MTbegincatcodes also use inside configuration

commands 88MTcfgcatcodes reset catcode of lsquorsquo (compatibility

with french packages) 88

CHANGE HISTORY 233

MTDeclareMicrotypeAlias may also be used insideconfiguration files 112

MTgetlistname use tfor (Andreas Buumlhmannrsquosidea) 89

MTgetslot remove backslash hack 91test for chardefed commands 92test whether langencodingranglangrang is defined 92

MTiflistexists donrsquot define MT1cnameglobally here and elsewhere 90

MTifdimen comparison with 1 to allow size smallerthan 1 (suggested by Andreas Buumlhmann) 46

MTincrement use e-TEXrsquos numexpr if available 50MTiscomposite new macro construct command

for composite character no uncontrolled expan-sion 97

MTscale new macro use e-TEXrsquos numexpr if avail-able 51

MTsetexcodes two versions of this macro 70MTsplitname donrsquot define MTencoding ampc

globally 60MTtestast make it simpler 106MTtryorder always check for size too (suggested

by Andreas Buumlhmann) 89fix also check for langseriesranglangshaperang (reported by

Andreas Buumlhmann) 89MTwarncodetoolarge new macro type out max-

imum protrusion factor 66MTwarnerr new macro for verbose=errors 36showhyphens modify showhyphens 138

20050623 Version 18

General SetProtrusion new key unit 118if font substitution has occurred set up the substi-

tute font not the selected one 100new option config to load a different main config-

uration file 129new option unit by default character 129

Documentation add example for factor option 13add example of how to get rid of a widow (sugges-

ted by Adam Kucharczyk) 15add hint about error messages 27

Font aliases declare pxr and txr as aliases of pplresp ptm 145

Font sets add U encoding to allmath 143Inheritance remove DJ from T1 list (itrsquos the same as

DH) 148Protrusion add LY1 characters for Times 163

settings for AMS math fonts 187verified settings for slanted Computer Modern Ro-

man 171addaccent fix disable micro-typographic setup in-

side addaccent (reported by Stephan Hennig) 102DeclareMicrotypeAlias warning when overriding

an alias font 111DeclareMicrotypeSetDefault new command set

default font set 110MTcfgcatcodes reset catcodes of the remaining

ASCII characters 88MTcheckrlist made recursive 124MTcurrlistname new macro current list type

and name 98MTdeclaresets warning when redefining a set 106MTdefinesetkey use comma lists instead of

token lists 106

MTfindfile no longer wrap names in commands 87MTfixfontdimensix new macro test whether

fontdimen6 is defined 59MTgetcharwd warning for missing (resp zero-

width) characters 65MTgetlistname made recursive 89MTgetslot fix expand active characters 91

test whether langencodingranglangrang is defined made morerobust 92

MTgetunit new macro get unit for codes 67MTinrlist made recursive 49MTisactive new macro translate inputenc-

defined characters 95MTisletter warning for non-ASCII characters 94MTledmacsetup character protrusion with ledmac 53MTmapclistn new macro used instead of for 48MTmaptlistn new macro used instead of tfor 48MToldcmd renamed commands from

MicroType to Microtype 36MTpdftexno case 5 pdfTEX 130 40MTpermute add ranges to the beginning of

the lists 123MTscale fix remove spaces in e-TEX variant (repor-

ted by Mark Rossi) 51MTsetupfonthook restore and when

hyperref is loaded 54restore csquotesrsquos active characters 54restore percent character if Spanish babel is loaded 54

MTsplitcodes get character width once only 63MTuseset fix remove braces in first line 110MTxadd simplified 47

20051028 Version 19

General DeclareMicrotypeSet new key font 109SetProtrusion value lsquorelativersquo renamed to

lsquocharacterrsquo for key unit 118allow context-specific font setup 100compatibility with TEX Live hack (reported by Her-

bert Voszlig) 39disable microtype setup inside hyperrefrsquospdfstringdef (reported by Hagraven Thecirc Thagravenh) 55

fix use true as the default value 125option unit rename value relative to character 129

Documentation add hint about verbatim environ-ment 25

add remark about Type 1 fonts required for auto-matic font expansion 8

Font aliases declare qpl and qtm (qfonts TEX Gyre)as aliases of ppl resp ptm 145

Font sets add OT4 encoding to text sets 143add T5 encoding to text sets 143

Inheritance add list for OT4 149add list for T5 (requested by Hagraven Thecirc Thagravenh) 150

CHANGE HISTORY 234

Protrusion fix remove uppercase Greek letters fromT1 encoded CMR 158

settings for OT4 encoding (Computer Modern Ro-man Palatino Times) 154

settings for T5 encoded Computer Modern Roman 154DisableLigatures new command disable ligatures

(requires pdfTEX 130) 112microtypecontext new command change setup

context in the document 103MTchecklistfamily fix add two missing

expandafters 61MTdetokenizec fix the e-TEX version 45MTexptwon new macros less expandafters 44

MTgetopt new key lsquopresetrsquo to set all characters tothe specified value before loading the lists 67

MTisactive redone use setdisplayprotect 95MTisletter using catcode should be more effi-

cient than inspecting the meaning 94MTmaybedo redone 60MTremfromclist new macro remove an item

from a comma list 48MTscalefactor generalised 66MTsetupexpansion disable expansion if both step

and shrink are zero 137warning if user requested zero step 136

MTtoks use instead of toks 42SetProtrusion (et al) new key font 113

20051205 Version 19a

General lsquolangfile nameranglangline numberrangrsquo as default listname 116

new option defersetup by default true 127remove superfluous test whether pickupfont has

changed 102Documentation add explanation for error message

in DVI mode 27add explanation for error message with non-Type 1

fonts 28Font aliases declare mdbch (mathdesign) as an alias

of bch 146Protrusion fix remove lsquo_ rsquo from OT1 encoding 159

settings for T5 encoded Charter 154microtypesetup inside the preamble accepts all

package options 131MTcheckfontcx optimise context-sensitive setup 102MTdefinesetkey donrsquot expand variables imme-

diately (requested by Georg Verweyen) 106MTgethighlevel no longer check whether defaults

have changed 106MTifdefinedcT new macros true case only 45MTifint use pdfmatch if available 45MTifstreq use pdfstrcmp if available 47MTinclist fix 48MTinfomissingchar info instead of warning

(after Michael Hoppe reported that the lsquoflrsquo ligatureis missing in Palatino SC) 65

MTisfeature new macro check for pdfTEX fea-ture 51

MTmapclistn following LATEX3 48MTpermute donrsquot define permutations for

unused encodings 122MTremfromclist fix 48MTsetup defer setup until the end of the preamble 52

20060120 Version 19b

General compatibility with listings sanitise morecatcodes (reported by Holger Uhr) 55

compatibility with the extendedchar option of thelistings package 56

Documentation activate expansion in the distributedPDF 1

add samples of micro-typographic features 4MTfeatures use throughout the package to adjust

to beta-ness 51MTifdimen use pdfmatch if available 46MTwarncodetoolarge fix calculation with

present factor 66

20060202 Version 19c

Documentation add example of how to increase pro-trusion of footnote markers (suggested by GeorgVerweyen) 22

Protrusion settings for URW Garamond 155

MTdefinecodekeyfont fix context was ignored 116MTdefinecodekeysize fix embrace

MTtempsize in csname (bug introduced inv19b) 115

20060505 Version 19d

Font sets md instead of m series in basic sets 143add QX encoding to text sets 143

Inheritance add list for QX encoding (contributed byMaciej Eder) 149

Protrusion settings for QX encoding (contributed byMaciej Eder) 161

settings for Euro symbols (Adobe ITC marvosym) 194tweak AMS settings 187

DeclareCharacterInheritance fix empty context 120MTdetokenizen new macro use detokenize if

available 45MTgetexopt fix evaluate preset 71MTgetfontdimen warning for zero fontdimen 65MTgetopt optimise donrsquot reset when preset op-

tion is set 67set list name before presetting 67

CHANGE HISTORY 235

MTisactive support for Unicode (inputencutf8) 95MTsetupfonthook restore and when tex4ht

is loaded (reported by Peter Dyballa) 54SetProtrusion (et al) optimise unify keys for

mandatory argument 113

(et al) split keys of optional and mandatory argu-ment 113

20060728 Version 19e

General fix default value for activate true 126Documentation add hint about unknown encodings 26

include LPPL 249Font aliases declare zeur and zeus (eulervm) as

aliases of eur resp eus (euler) 146Inheritance adapt to marvosymrsquos changed encoding 151Protrusion complete settings for Euler Fraktur and

Script fonts 194fix forgotten comma in mt-mvscfg adapt tomarvosymrsquos changed encoding 194

settings for Euler Roman font 190DeclareCharacterInheritance new key lsquoinputencrsquo

to set the input encoding 120MTremfromclist model after removeelement 48MTsetup empty MTsetup after use (compatibil-

ity with the combine class) 52pickupfont no tracing with trace package 101SetExpansion new key inputenc 113SetProtrusion (et al) new key inputenc 113

20060909 Version 19f

Protrusion fix euler-vm did not load euler settings 191MTcurrlistname fix MessageBreak must not be

expanded 98MTgdefn new macros global variants 44MTgetinhlist fix input encoding must be set

after the inheritance list has been parsed 91MTglet new macro 44

MTresetcontext only reset context if it has actu-ally been changed 104

MTsetinhlist fix forgotten comma in the fea-tures list 120

MTsetnamedkeys new macro set name first sim-plify parsing of optional argument 115

SetProtrusion (et al) set catcodes before parsingoptional argument 113

20070114 Version 20

General compatibility with listings set catcode ofbackslash to zero (reported by Steven Bath) 56

compatibility with soul register textls andlsstyle 56

new option babel by default false (language-dependent setup suggested by Ulrich Dirr) 126

new option letterspace by default 100 128new package letterspace a stripped-down ver-

sion containing the letterspacing commandsonly 1

option lsquobabelrsquo fix switch off French babelrsquos short-hands properly (reported by Daniel Flipo) 142

option lsquobabelrsquo switch off Turkish babelrsquos short-hands 142

option lsquounitrsquo SetProtrusion deprecate valuelsquorelativersquo completely 118

Documentation add hint about how to increasefont_max and font_mem_size 28

add hint about warning when tracking and expan-sion is applied to a font 28

add remark about lsquodraftrsquo option disablingmicrotype (noted by Michalis Miatidis) 9

qualify hint about web documents with regard toolder pdfTEX versions 25

qualify hints about expansion error messages withregard to older pdfTEX versions 27

Font sets new footnotesize and scriptsize 143

new smallcaps 143DeclareMicrotypeBabelHook new command inter-

action with babel 113lsstyle fix font switches donrsquot pose a problem

anymore 79fix letterspacing commands may be nested 79new command letterspacing 79totally redone using the new letterspacefont 79

MTdeclaresets fix empty size list when redefin-ing set 106

MTissymbol made even more robust 96MTloadinputenc sanitise catcodes before loading

input encoding (problem with listings) 68MTpdftexno case 6 pdfTEX 140 40MTsetupnoligatures maybe disable

MTnoligatures after the preamble 141MTsplitname adjust to possible letterspacing 60SetExtraKerning new command additional kern-

ing 114SetExtraSpacing new command adjustment of

interword spacing 114SetTracking new command tracking 114textls new command letterspacing 84

starred version remove spaces around text 84tracingmicrotypeinpdf new debug method mark

all fonts with PDF annotations 37

CHANGE HISTORY 236

20070121 Version 21

General compatibility with pinyin disablemicrotype in pymacron (reported by Sven Nau-mann) 56

fix letterspace package forgot to load keyval 42lslig new command protect ligatures in letter-

spaced text 79

MTgetlsbasefont redone use pdfmatch tomake it bullet-proof 79

MTorigpickupfont compatibility with CJK alsocheck for its definition 100

textls fix use hmodebgroup 84

20070714 Version 22

General disable microtype if wordcount is loaded(reported by Ross Hetherington) 52

new option copyfonts 127simplify key declarations 116use catcode trickery for e-TEX test 38

Documentation add hint about error message withpdfTEX 140 27

add hint about extra TOC leader dot (first dis-covered by Morten Hoslashgholm) 25

add overview 5logo transparency and amusement 1

Font aliases declare chr (chmath) as an alias of bch(reported by Geoff Vallis) 146

declare fp9x fp9j (FPL Neu) as aliases of ppl[xj] 145Font sets default set for tracking smallcaps 144Inheritance remove lsquo-rsquorarr lsquo127rsquo 148Protrusion settings for Bitstream Letter Gothic 155Spacing add sample 195Tracking add ligatures that are to be disabled 152DeclareMicrotypeVariants new command 111DisableLigatures new optional argument disable

selected ligatures only 112lslig always defined 79MTchecklistfont fix construct font name from

characteristics 62MTcopyfont optionally work on copies of fonts 58MTgetbasefamily redone working on font names

and suffixes of arbitrary length 88MTgetcharwd subtract letterspacing amount from

width 65MTgetlsbasefont fix again remember base font

in a macro 79MTifdimen employ LuaTEX features if available 46MTifint employ LuaTEX features if available 45MTifstreq employ LuaTEX features if available 47

fix e-TEX version shouldnrsquot use x and y (foundby Wiebke Petersen) 47

MTiscomposite more robust expand exactly once 97MTissymbol expand once more (for frenchpro) 96MTlsfont use fontname not MTfont 75MTlua (basic) support for LuaTEX 41MTpdftexno case 7 pdfTEX 1404 40MTpresetauxspace generalised 69MTsetallpr (et al) allow empty values 63MTsetinputenc only load inputenc files if neces-

sary 68MTsettrcodes disable ligatures in letterspaced

fonts manually (due to change in pdfTEX 1404) 76possibility to customise interword spacing 76

MTsetupexpansion warning if stretch or shrinkarenrsquot multiples of step 137

MTsetupfont donrsquot call encupdate anymore 57only add features that are available with the re-

spective pdfTEX 57MTsetupfonthook restore percent character if

Galician babel is loaded 54MTtheprcodetr adjust protrusion of letter-

spaced fonts 63MTtracking remember fonts that shouldnrsquot be let-

terspaced 75MTtracking fix tracking couldnrsquot be re-enabled 75MTwarntrackingDVI warning when letterspacing

in DVI mode 140MTwithbabelandT also inspect class options 52pickupfont letterspace setup inside group 101SetTracking new key lsquono ligaturesrsquo to disable

ligatures of letterspaced fonts 114new keys lsquospacingrsquo and lsquoouter spacingrsquo to adjust

interword spacing (suggested by Steven E Har-ris) 114

third argument may be empty 114textmicrotypecontext new command wrapper

around microtypecontext 104

20071223 Version 23

General disable microtypecontext in hyperrefrsquospdfstringdef 55

fix really switch off Turkish shorthands 142new value for verbose option silent (suggested

by Karl Berry) 128turned some warnings into errors 128

Documentation add kerning sample 18add letterspacing illustration 17

dosubstcorrection remember substitute font forall times (reported by Stephan Hennig) 102

lslig redone extract outer kerns from currentletterspacing amount 79

microtypecontext made robust (reported byStephan Hennig) 103

MTbegincatcodes fix donrsquot disable KVspdef 88MTdefinesetkeyfont font single asterisk

means normal font 109MTinclist donrsquot use x (reported by Peter Meier) 48MTisactive support for extended Unicode

(inputencutf8x resp ucs) ndash experimental 95MTnoligatures fix set evaluation didnrsquot work (bug

introduced in v22) 85MTplain letterspace support for eplainminiltx 38MTsetcurros adjusting spaces made more reli-

able 77

CHANGE HISTORY 237

MTsettrcodes also adjust tracking if protrusion isnot enabled and even for letterspace (reportedby Stephan Hennig) 76

possibility to customise outer kerning (suggestedby Stephan Hennig) 76

MTSetTracking sanity check for value 114MTsetuptracking enable protrusion when track-

ing is enabled 139MTtrouterl only change pre outer space if it

contains shrink 81

20080229 Version 23a

General fix test for soul under plain TEX 56Documentation add hint about babel having to be

loaded first 27add table of available and enabled features 7mention soulutf8 30

Protrusion adjust LMR quotation marks again 160MTerrordoesntwork error messages if pdfTEX is

too old for extensions 140MTfixcatcode fix catcodes earlier and also for the

letterspace package 35MTgetkey fix key=val in class options list 134MTsetcodes generalised 63MTsetupfonthook restore percent character if

Mexican babel is loaded 54

20080604 Version 23b

MTexpgcs new macro reduce save stack size 44MTfontcopy enable font copies also with protru-

sion contexts (reported by Nathan Rosenblum) 58MTgetsize grouping 108MTnoligatures fix warning messages for un-

known slots 86MTorigpickupfont compatibility with CJKutf8

also check for its definition 100MTrequireslatex new macro 38MTsettrcodes fix protrusion adjustment only

for new fonts (reported by Wolfram Schaalo) 76MTtrouterl fix only in horizontal mode 81

make spaceskip-aware (ragged2e) 81MTtrouterr additional test for horizontal mode 82

20081111 Version 23c

General LuaTEX supported by default 40Documentation add hint about spacing being exper-

imental 26add hint about partial incompatibility with CJK 27

Inheritance add textcommabelow[STst] to QX en-

coding (reported by Vasile Gaburici) 150MTdetokenizec fix remove last space only (repor-

ted by Ulrich Dirr) 45MTtrouterr additional test for horizontal mode

(reported by Sveinung Heggen) 82

20090327 Version 23d

General fix pinyin compatibility check (reported bySilas S Brown) 56

move setup to the very end (for Colin Rourke) 142ifMTinannot use pdftexcmds for debugging 37lsstyle disable for LuaTEX 79

make invalid in math mode 79microtypesetup select font after setup 131MTcheckactiveset warning for missing default

sets 130MTlua update for LuaTEX 036 41MTsettrcodes allow zero tracking 75MTsettrzero fix allow switching off tracking

(reported by Ulrich Dirr) 80MTsetupexpansion default step 1 for pdfTEX

versions ge 140 136MTtrouterr donrsquot use x (reported by Ulrich

Dirr) 82fix donrsquot adjust in math mode (reported by Chris-

toph Bier) 82fix donrsquot adjust inside discretionary (reported by

Maverick Woo) 82MTtrsetokern allow empty value for outer

kerning 84textls make math mode aware 84

20091109 Version 23e

Documentation suggest to patch verbatim insteadof verbatim 26

Expansion settings for T2A encoding (contributed byKarl Karlsson) 153

Font sets sc instead of sc in smallcaps set 143add T2A encoding 143

Protrusion settings for T2A encoding (contributed byKarl Karlsson) 160

Spacing settings for T2A encoding (contributed by

Karl Karlsson) 197MTfixfontdimensix fix gobbling settings with

tracking failed (reported by Leo) 59MTsetup make space-unaware (requested by Mar-

cin Borkowski) 52MTtikzsetup compatibility with tikz (first repor-

ted by Christian Stark) 54MTtrouterr fix set current kerning and spacing

again (found by Lars Roumlnnbaumlck) 82

CHANGE HISTORY 238

20100110 Version 24

General new file microtypelua containing the luafunctions (contributed by Eacutelie Roux) 43

Protrusion settings for T2A encoded Minion (contrib-uted by Karl Karlsson) 160

20130313 Version 25

General allow contexts for LuaTEX 117disable lsquoDVIoutputrsquo option for XETEX 127fix check whether lsquolangfileranglanglinerangrsquo list name already

exists (reported by Till A Heilmann) 116letterspacing with LuaTEX 062 75new files microtype-pdftexdefmicrotype-xetexdef microtype-luatexdefcontaining engine-specific definitions 38

protrusion with XETEX 40restore space inside listings (reported by Rolf

Dieterich) 56Documentation add hint about LuaTEX compatibility 27

add hint about spacing and ragged2e 26add hint about dtx source code 28include microtype-logodtx andmicrotype-lssampledtx 221

Font aliases declare lmsy and lmm as aliases of cmsyresp cmm (reported by Jonas Hogstrom) 144

declare zgmx etc (garamondx) as aliases of ugm 146declare Latin Modern Roman (OpenType version)

as alias of lmr when fontspec is loaded 144declare TeX Gyre Pagella Asana Math Palatino LT

Std and Palatino as aliases of Palatino Linotype(OpenType version) 145

Font sets add EU1 and EU2 encodings 143Inheritance add rudimentary list for EU1 and EU2 151Protrusion add default lists for EU1 and EU2 159

improvements to Computer Modern Roman italics(contributed by Hendrik Vogt) 163

Tracking add EU2 encoding to default list 152DeclareCharacterInheritance allow more than

one encoding 120DeclareMicrotypeAlias ignore spaces 111ifMTnofamily info if settings are not family-specific

(suggested by Hagraven Thecirc Thagravenh) 62LoadMicrotypeFile remove all spaces in font name 112lsstyle fix ensure to set up math fonts (reported

by RazorXsr) 79

MTdefinecodekeyfamily compatibility withfontspec remove its internal counter (repor-ted by Till A Heilmann) 115

MTdefinecodekeyfont scrub fontspec featurecount (found by Meho R) 116

MTdofont adapt for LuaTEX 50adapt for XETEX 50

MTgetslot adapt for LuaTEX (requested by GeorgDuffner) 92

adapt for XETEX 92MTifouternext fix conflict with amsmath (repor-

ted by Scott Pakin) 82MTinfomissingchar fix error message for XETEX

(reported by Juan Acevedo) 65MTischarx compatibility with xunicode 97MTledmacsetup fix to work with XETEX (reported

by Maiumleul Rouquette) 53MTlssetls allow formulas in optional argument

to textls (fix by Heiko Oberdiek) 84MTmicrotypecontext fix ensure to set up math

fonts (reported by RazorXsr) 104MTregistersubstfont only register substituted

font if it isnrsquot registered already (reported byGeorge Gratzer and Josep Maria Font) 102

MTregistersubstfontcx only register if it isnrsquotregistered already 103

MTscrubfeatures compatibility with fontspecremove its internal counter 60

MTsetallpr fix remove space (found byMeho R) 63

MTsetprcodes make info about generic set-tings encoding-specific (reported by SebastianSchubert) 62

MTsetupspacing warning with ragged2e (reportedby Steffen Hoffmann) 139

MTsetupfont select font with fontspec (found byGeorg Duffner) 57

MTsetupfonthook restore and whenmathastext is loaded (found by Seamus Bradley) 54

20130523 Version 25a

General use luatexbase instead of luatextra (con-tributed by Eacutelie Roux) 43

Documentation add notes on typesetting the docu-mentation 28

include OpenType configuration files 201MTafteraftergroup fix get outer kerning and

spacing of nested letterspacing right 78MTgetslot adapt to luaotfload v22 (contrib-

uted by Eacutelie Roux) 93MTledunhboxline simplified 53MTledmacsetup support for eledmac 53MTlsouterk add marker for tightly nested letter-

spacing 85MTsettrcodes fix load font for fontspec 77MTxspace fix outer spacing problem with xspace

(reported by Dave) 83

20160501 Version 26

General load luaotfload with LuaTEX 43redefine MTsetupfonthook globally for problem

with tikzposter (reported by Sam Mason) 55

Documentation add hint about partial incompatibil-ity with xeCJK and luatexja 27

missing characters printed with Charis SIL 201

CHANGE HISTORY 239

suggest to use etoolbox to patch verbatim 26Font sets add TU encoding (notified by Will

Robertson) 143add si and scit to smallcaps set (reported by uli) 143new allmath-nott and alltext-nott (suggested

by Karl Berry) 143Inheritance add TU encoding 151Protrusion add TU encoding to lists 159Tracking add TU encoding to default list 152DeclareMicrotypeSet ignore spaces 105DeclareMicrotypeSetDefault ignore spaces 110DeclareMicrotypeVariants ignore spaces 111lsstyle fix ensure to set up math fonts (reported

by kleenstar) 79microtypecontext allow activate shortcut (repor-

ted by Karl Berry) 103MTdeclaresets fix undefine lists for redefining 106MTdofont speed up for LuaTEX 50MTengine fix test with LuaTEX 085 39MTgetslot fix could fail with XETEX (reported

by Christopher Schramm) 92

MTisxchar update for fontspecrsquos TU encoding 97MTledmacsetup support for reledmac 53MTluatexno update for LuaTEX 085 (renamed

primitives) 41MTnoligatures use luaotfload function to keep

inhibit ligatures 86MTorigpickupfont (in)compatibility with

luatexja disable unknown slots warnings (re-ported by Max) 100

(in)compatibility with xeCJK disable unknownslots warnings (reported by HcN) 100

compatibility with xeCJK pretend that CJK wasnrsquotloaded 100

MTsettrcodes use luaotfloadrsquos kernfactor fea-ture if available 76

MTxspace fix outer spacing problem with (notonly) algorithm (reported by Henning and Ron-nie Marksch) 83

UseMicrotypeSet ignore spaces 110

20160514 Version 26a

General fixes for letterspace package with LuaTEX 49MTdofont fix lua function (reported by Herbert

Voszlig) 50MTlsfontspecfont fix for value of plusmn1000 78

20170707 Version 27

General drop luatexbase with recent LATEX 43warning with minimal class 52

Documentation mention that additional kerning doesnot work in math mode (discovered by lsquoDanielrsquo) 18

Font aliases declare aliases for newpx 145declare aliases for newtx 145declare aliases for tempora 145declare aliases for XCharter 146declare Latin Modern Roman as alias of lmr with

new LATEX format (reported by Ulrike Fischer) 144Protrusion automatically choose correct names for

Charis SIL small caps (reported by lsquoltcomdatarsquo) 214lsstyle fix prevent infinite loop with psnfss and

exscale packages (reported by user11126 solu-tion by Ulrike Fischer) 79

MTcheckrange donrsquot warn for override if conflict-ing list is loaded 124

MTiscomposite compatibility with LATEX20170101 (DeclareUnicodeComposite) (re-ported by Ulrike Fischer and lsquojcrrsquo) 98

MTlsfontspecfont fix for lsquofilelangfontrangrsquo spec (re-ported by Reinhard Kotucha) 78

MTpermute donrsquot warn for override if con-flicting list is loaded 123

MTresetefcodes only reset efcodes for olderLuaTEX versions 70

MTsetupexpansion donrsquot disable automatic expan-sion for DVI output with LuaTEX 136

MTtikzsetup compatibility with tikz (again) 54MTwarntrackingDVI donrsquot warn for letterspacing

in DVI mode with LuaTEX 140

20180114 Version 27a

General disallow non-automatic expansion withLuaTEX 119

MTauto remove lsquoautoexpandrsquo for LuaTEX 106 (re-ported by Ulrike Fischer) 136

with LuaTEX non-automatic font expansion is nolonger possible (as confirmed by Hans Hagen) 136

MTgethighlevel test whether default isdefined 106

MTgetslot expand active characters earlier 91MTinfonotracking defer lsquoNo trackingrsquo message 61MTisactive compatibility with newunicodechar

(reported by Nils Anders Danielsson) 95

20190228 Version 27b

General update lua function microtypeinfo afterchanges in luaotfload (reported by Moritz Wem-heuer and Ulrike Fischer) 43

Documentation update hint about non-7-bit charac-ters (notified by Frank Mittelbach) 26

Inheritance add textquotedblleft ligature to OT4

(reported by Franz Wexler) 149MTinfomissingchar fix message for glyphs spe-

cified as names in XETEX (reported by Paolo Ney) 65MTsetupfont always select current font with XETEX

and LuaTEX (reported by Paolo Ney solution byUlrike Fischer) 57

CHANGE HISTORY 240

20191010 Version 27c

General turn warning into info when overwriting thekeepligature function (reported by Andy N) 86

MTisactive compatibility with LATEX 20191001 95

MTissymbol take care of removetlig 96showhyphens compatibility with LATEX 20191001

(reported by Phelype Oleinik and Falk Hanisch) 138

20191118 Version 27d

MTcopyfont in LuaTEX donrsquot use the copyfontprimitive but load the font anew (reported byPaolo Polesana and Oliver Kopp) 58

MTregistersubstfont remove substitute font

from list (reported by Markus Kohm) 102

MTregistersubstfontcx remove substitute fontfrom lists 103

20201207 Version 28

General letterspace works with e-TEX only 38compatibility with soul patch for font change

(reported by Md Ayquassar) 56fix for luatexbase 43

Documentation declare DVIoutput option deprec-ated 9

squash fake news about automatic font expansionwith dvilualatex 8

Font aliases declare aliases for step and domitian(notified by Daniel Benjamin Miller) 145

declare aliases for stix and stix2 fonts 145declare New Computer Modern as an alias of Latin

Modern Roman 145Font sets default set for expansion alltext-nott 144

default set for spacing alltext-nott 144

lsstyle fix enforce math setup again 79microtypecontext fix activate shortcut 103

ignore spaces 103MTdofont fix for XETEX 50

simplify lua function 50MTfixfontdimensix try to fix zero fontdimen6 59MTifluaotffont use lua function 49MTifstreq use XETEXrsquos stringcmp 47MTsetupexpansion warning when expanding in

DVI mode with LuaTEX (reported by Daniel Ben-jamin Miller) 135

MTtrsetspace simplified 81MTtrunit fix allow unit regardless whether

letterspacing is set 78textmicrotypecontext ignore spaces 104

20210222 Version 28a

General rename mt-padcfg to mt-EBGaramondcfg(requested by Karl Berry) 143

rename mt-PalatinoLinotypecfg tomt-Palatinocfg (requested by Karl Berry) 201

Documentation reorganise table 1 for clarification(suggested by Daniel Benjamin Miller) 7

Font aliases add -LF -TLF -OsF and -TOsF as vari-ants 144

declare mlmodern fonts as aliases of Latin Modern(reported by Daniel Benjamin Miller) 144

reference New Computer Modern also by file name(reported by Canageek) 145

Inheritance specify lsquoffrsquo ligature as Unicode instead ofglyph name 201

Protrusion hide euroitc settings (requested by KarlBerry) 194

Spacing add dummy settings (reported byDORpapst) 198

DeclareCharacterInheritance skip settings fortracking 120

MTgetsize compatibility with svjour3 (repor-ted by Ekkehart Schlicht (no relation)) 108

MTglet use LuaTEXrsquos glet if available 44

20210225 Version 28b

Inheritance dummy settings for the Font Awesomefont (mt-FontAwesomecfg) 205

settings for the Lato font (mt-Latocfg) (reportedby dsedivec) 205

20210314 Version 28c

ifMTfontspec add to hook for fontspec 54MTisoptchar fix for optionally defined glyphs

(reported by Frank Mittelbach) 96

MTremovetlig fix for text commands containingconditionals (reported by Frank Mittelbach) 97

INDEX 241

D IndexNumbers in upright shape refer to the page where the corresponding entry is described (bold face) resp occursNumbers in italics refer to the code line where the corresponding entry is defined (underlined) resp used

Options DVIoutput 9activate 6auto 7babel 9config 9draft 9expansion 6factor 7final 9kerning 6

letterspace 8protrusion 6selected 8shrink 8spacing 6step 8stretch 8tracking 6unit 7verbose 9

Commands DeclareCharacterInheritance 20DeclareMicrotypeAlias 21DeclareMicrotypeBabelHook 23DeclareMicrotypeSet 10DeclareMicrotypeSet 10DeclareMicrotypeSetDefault 12DeclareMicrotypeVariants 20DeclareMicrotypeVariants 20DisableLigatures 24LoadMicrotypeFile 22SetExpansion 14SetExtraKerning 18

SetExtraSpacing 19SetProtrusion 13SetTracking 15UseMicrotypeSet 12lslig 24lsstyle 23microtypecontext 22microtypesetup 9textls 24textls 23textmicrotypecontext 22

A a0poster (package) 108activate (option) 6 126 235addaccent 2961adjustspacing 196 4365ae (package) 21 144

algorithm (package) 239amsmath (package) 238amssymb (package) 187article (package) 22auto (option) 7 8 126

B babel (option) 9 23 27 32 126 235babel (package) 2 3 5 17 23 24 27

54 88 113 141 142 146 232 233 235ndash237

C chemsym (package) 232chmath (package) 21 146 236CJK (package) 27 56 100 236 237 239CJKutf8 (package) 100 237cm-super (package) 8color (package) 134combine (package) 142 235

config (option) 9 20 32 129 233contour (package) 134copyfonts (option) 58 126 127 236crop (package) 134csquotes (package) 29 54 158 233currfontshape 2905 2907 2909 2916 2959

D DeclareCharacterInheritance 20 41 3802DeclareMicrotypeAlias 21 43 71 3394DeclareMicrotypeBabelHook 23 45 64 3460DeclareMicrotypeSet 10 32 57 59 72 3093DeclareMicrotypeSet 10 3093DeclareMicrotypeSetDefault 12 34 61 3349DeclareMicrotypeVariants 20 42 58 63 3379DeclareMicrotypeVariants 20defersetup (option) 54 126 127 131 234

definenewfont 2898 2906 2910 2920DisableLigatures 24 40 62 3433dosubstcorrection 2958docstrip (package) 34domitian (package) 21 145 240draft (option) 9 126 128 235dsfont (package) 59DVIoutput (option) 9 126 127 238 240

E eco (package) 21 144efcode 1557 1583 1584 1625 1627eledmac (package) 53 238eplain (package) 24 31 34 38 52 134 236e-TEX (engine) 33 38 40 45

50 51 64 65 82 108 221 232ndash234 236 240etoolbox (package) 26 239eucal (package) 192eufrak (package) 194

euler (package) 98 190 235eulervm (package) 21 146 191 235euroitc (package) 194 240europs (package) 194eurosans (package) 194expandglyphsinfont 1539expansion (option) 6 11 125 126 135exscale (package) 239

INDEX 242

F ffamily 2912 2913fsize 1931 2905 2907 2909 2916 2959factor (option) 7 13 33 128 232fancyvrb (package) 26final (option) 9 33 126 128 231fix-cm (package) 59font 972 1048 1833 1981fontname 111 1020 1022 1024 1026

1027 1037 1038 1823 1831 1835 18391877 1883 1888 1891 1966 1981 19931995 2000 2002 2005 2008 2011 20462097 2234 2236 2898 2906 2915 29202940 2942 2944 2960 2974 2976 2996 3001

fontcharwd 1285 1289 1295fontdimen 1052 1053

1057 1058 1061 1320 1325 1425 14281852 1853 1883 1993 2039 2040 20472048 2055 2057 2063 2078 2097 2247 2250

fontinst (package) 198 221 223fontinstallationguide (package) 177fontname 1831 1835fontspec (package) 6 25 27 30

31 43 60 78 97 107 115 144 151 238ndash240fourier (package) 59french (package) 232frenchpro (package) 96 232 236

G garamondx (package) 21 146 238german (package) 35 231glbcurrsize 1969 3035

glbsettings 1970graphics (package) 134

H hfoldsty (package) 21 144 hyperref (package) 54 55 100 134 233 236

I IEEEtran (package) 100iffontchar

731 1331 2755 2765 2767 2834 2846 2847ifMTauto 304 4569 4630ifMTbabel 304 4716 4844ifMTdo 1087 1154 1791 2281ifMTdocument 345 3921ifMTdraft 304 4462ifMTexpansion 304 4518 4532 4627 4673ifMTfontspec 850 1067 3164 3584 3610ifMTif 303

869 876 899 931 2992 4028 4864 4867ifMTinannot 99ifMTinlist 624 669 777 807 992 1121

1138 1147 1165 1183 1789 2385 23962445 2494 2975 2986 2998 3063 3075 3416

ifMTkerning 304 4730 4857

ifMTnofamily 1193 1200ifMTnoligatures 304 4810ifMTnonselected 1519 2507 2515ifMTnorest 2576 2593 2606 2620 2681ifMToptauto 4039 4573 4605ifMToptDVI 4039 4487ifMToptexpansion 4039 4516 4674ifMTprotrusion 304 814 837 4499 4689ifMTselected 304 4613 4633ifMTspacing 304 4698 4715ifMTtracking 304 4685 4745ifMTxunicode 850 2781 2838ifpdf (package) 100 134iftracingmicrotypeinpdfall 105ignoreligaturesinfont 2285inputenc (package)

14 27 32 56 68 91 95 98 233 235 236

J jurabib (package) 100

K kerning (option) 6 11 31 126keyval (package) 42 63 147 236knaccode 1740 1741 1751 1754 1760

knbccode 1733 1734 1750 1753 1759knbscode 1655 1656 1679 1683 1689

L ledmac (package) 29 32 53 100 233ledpar (package) 29leftmarginkern 820letterspace (option) 8 17 24 32 45 75 128 235letterspace (package) 1 24 31 32

34 36 38 54 76 77 79 235ndash237 239 240letterspacefont 1839lineno (package) 53listings (package) 26 55 56 68 88 234 235 238lmodern (package) 8 160LoadMicrotypeFile 22 44 74 3412 4467lpcode 1222 1258 1259 1463 1466 1866

lslig 24 54 1986 1989lsstyle 23 51 922 946

1967 2173 2179 2184 2187 2197 2201 4470luaotfload (package)

27 30 43 50 70 76 86 93 238 239LuaTEX (engine) 1 4 6ndash9 12ndash16 20

23ndash25 27 29ndash31 34 37ndash41 43ndash45 50 5357 58 70 75ndash77 83 85 86 92 117 127133 135 136 140 144 147 151 159 236ndash240

luatexbase (package) 43 238ndash240luatexja (package) 27 100 238 239luatextra (package) 238

M marvosym (package) 21 32 34 151 194 234 235mathastext (package) 54 238mathdesign (package) 21 146 234memoir (package) 23 100MicrotypeHook 130 4296microtypecontext

22 47 920 3024 3043 4469 4827 4830microtypecontext (environment) 22microtypesetup 9 46 4300 4468MiKTEX (distribution) 28miniltx (package) 24 31 34 38 52 236minimal (package) 52 56 239

MinionPro (package) 107mlmodern (package) 21 144 240MTfont 406 995 1018 1057 1059 1321

1335 1803ndash1805 1807 1810 2448 2520 2945MTabbrex 753MTabbrexc 753MTabbrexinh 753MTabbrkn 753MTabbrknc 753MTabbrkninh 753MTabbrnl 753MTabbrpr 753

INDEX 243

MTabbrprc 753MTabbrprinh 753MTabbrsp 753MTabbrspc 753MTabbrspinh 753MTabbrtr 753MTabbrtrc 753MTactivefeatures

1029 2980 2983 2995 3008 3052 30623441 4500 4628 4686 4699 4731 4819 4820

MTaddtoannot 99MTaddtosetup 798

799 880 1438 2889 3025 3026 36713689 4153 4301 4461 4776 4818 4843 4876

MTadjustspacing 4361 4362 4629MTafteraftergroup 1895 1903 1912MTauto 1529 4568 4583 4593 4596 4600MTauto 1529 1552 1597MTautofalse 306 4581 4592MTautotrue 306 4255 4258 4608MTbabelfalse 313MTbabeltrue 313MTbegincatcodes

2386 2387 2427 3024 3028 30413094 3319 3350 3381 3395 3420 34363470 3486 3508 3529 3543 3808 4271 4272

MTcat 1434 2880 2882MTcfgcatcodes 933 1456 2412 2429MTchar 1247 1248 1258 1259

1264 1265 1268 1270 1285 1286 12891463ndash1467 1583 1584 1586 1587 1625ndash1627 1655 1656 1662 1663 1669 16701673 1674 1679ndash1684 1733 1734 17401741 1744 1745 1750ndash1754 2293 22942296 2549 2565 2573 2575 2585 25872595 2596 2601 2605 2606 2611 26132619 2621 2624 2628 2632 2636 27522755 2757 2759 2761 2825 2829 28342836 2839 2841 2847 3860ndash3862 3867ndash3869

MTchar 1291 1292 1295 13301331 2549 2556 2560 2565 2614 26852687 2693 2694 2696 2709 2710 27132714 2717 2718 2722 2724 2758 27602788 2791 2795 2801 2808 2810 2837 2854

MTcharstring 2562 2757 2773 2800MTcharxstring 2803 2841MTcheckactiveset

4282 4506 4646 4688 4708 4735MTcheckfont 991 2971 3054MTcheckfontcx 2981 3054MTcheckrange 3999 4001MTcheckrange 4001 4002MTcheckrlist 3948 3992MTcheckrlist 3992 3993MTcheckstep 4634MTchecklist 1095 1114 2278MTchecklistfamily 1132MTchecklistfont 1176MTchecklistsize 1160MTchecksetup 4312 4323 4330 4349 4385MTclearoptions 163 296 788 4244 4454MTclistbreak 596 1127 1155 1171 1185MTclistfunction 596MTcntencoding 3887 3895 3896MTcntfamily 3893 3902 3903

MTcntseries 3900 3909 3910MTcntshape 3907 3915 3916MTconfigfile 4260 4269 4270 4274 4275 4278MTcontext 2470 2482 2501 2528MTcopyfont 978

1014 3667 3673 3685 3692 4162 4164 4490MTcopyfont 1014 3667 3673 3685 3692 4162MTcount 512 513

737 1277 1285 1287 1289 1293 12951298 1304 1309 1310 1314 1325 1357 1419

MTcurrfile 2390 2391 2400 24013422 3423 3641 3643 3646 3832 4274 4878

MTcurrlistname 1323 1360 1450 15932290 2371 2539 2849 2857 2862 2870 2876

MTcurrls 1874 1990 1993MTcurrsetname 3118 3120ndash

3122 3124 3127 3128 3133 3138 31423143 3152 3177 3181 3210 3238 32613267 3271 3272 3523 3599 3620 36353654 3726 3730 3737 3740 3742 37483751 3754 3766 3780 3789 3797 3833 3835

MTdeclarecharinh 3814 3822 3830MTdeclaresets 3101 3106 3119 3443MTDeclareMicrotypeAlias 3396 3398MTDeclareMicrotypeSetDefault 3351 3353MTDeclareSet 3097 3099 3115MTDeclareSetAndUseIt 3096 3114MTDeclareVariants 3383 3384 3386MTdefboolopt 4116

4129 4130 4134 4148 4160 4170 4182MTdefn 393 3089 3090MTdefaultexset 3368MTdefaultknset 3368MTdefaultprset 3368MTdefaultspset 3368MTdefaulttrset 3368MTdefinecodekey

3567 3627 3629 3630 3842 3844 3845MTdefinecodekeyfamily 3578 3628 3843MTdefinecodekeyfont 3604 3632 3847MTdefinecodekeysize 3592 3631 3846MTdefineoptkey 3633 3656ndash3659 3793ndash3795MTdefineoptionX 4300 4358 4361MTdefineoptionX 4375 4404 4406 4407MTdefinesetkey 3131 3311ndash3314MTdefinesetkeyfont 3259 3316MTdefinesetkeysize 3170 3315MTdetokenizec 436 2557 2753 2769MTdetokenizen 436 2831MTdimensix

1050 1278 1314 1357 2072 2074 2243MTdinfo 87MTdinfolist

1112 1122 1125 1130 1139 1142 11481150 1158 1166 1169 1174 1184 1187 1191

MTdinfonl 87MTDisableLigatures 3433MTdofont 704 1224 1557 1692 1761 1866MTdocumentfalse 345MTdocumenttrue 345 4822MTdofalse 1087 1099 1126 1143 1170 1188MTdofontfunction 708 719MTdotrue 1087 1090 1123 1140 1149 1167 2273MTdraftfalse 309 4184MTdrafttrue 309 4186

INDEX 244

MTedefn 395 2506 2532 30793573 3587 3643 3646 3649 3831 3979 4216

MTencoding 1064 1180 1201 1203 1206 24652477 2557 2753 2769 2830 2861 2868 2876

MTendcatcodes 2388 2431 3025 30323042 3112 3335 3366 3392 3410 34283445 3481 3505 3524 3540 3554 3825 4273

MTendinput 167 4239 4248MTengine 175

277 281 287 293 2174 2178 4240 4246MTenginetooold 175 278MTerror 76 780 883

2174 2185 2363 2376 3208 3344 33733451 3676 3702 3709 4172 4335 43534393 4574 4586 4606 4675 4746 4759 4839

MTerrordoesntwork 4742MTexcname 1511

1513 1599 1600 1611 1617 1618 1630 3489MTexcontext 1018 3046 3088MTexdoccontexts 3088MTexfactor 314 1530 1603MTexfactor 1530 1559 1564 1573 1574 1597MTexinhname 1585ndash1587MTexlevel 314 4629 4631MTexmax 326 1576 1577MTexmin 326 1579 1580MTexsetname 3337MTexsplitval 1571MTexpcs 390 393 396 399 404 1030

1032 1041 1164 1269 1344 1347 13771381 1391 1394 1397 1587 1674 17451915ndash1917 2493 2999 3009 3010 30143065 3076 3176 3598 3618 3869 3950 3997

MTexpgcs 390 394 398 400 405MTexponen 407 441 603 982

984 1042 1118 1181 1788 2395 29712974 2984 2996 3002 3020 3062 30733088 3106 3310 3329 3360 3415 3822 4827

MTexptwoc 409 427 432 442 638 981 10221024 1026 1027 1036 1834 1966 20022005 2008 2554 2561 2756 2824 2839 2840

MTexptwon 411 1136 1145 3137 3266MTexpandfont 1515 1533 1537MTexpansion 998 1502 4666MTexpansionfalse 305 4524 4529 4623MTexpansiontrue 305 4254MTextracontext 3088 3473 3489 3512

3532 3546 3613 3616 3617 3619 36603668 3674 3686 3691 3804 3947 39513954 3957 3958 3963 3968 3969 3971 3998

MTextrainputenc 3802 3829 3834 3835MTfactordefault 338 4223 4503MTfamily 982 1064

1137 1180 1201 1203 1206 2466 3406 3407MTfamilyalias

983 984 1076 1144 1146 2476 2478 3408MTfeat 1087 1250 1339 1341 1343

1344 1346 1347 1353 1355 1358 1366ndash1370 1372 1374ndash1378 1381 1382 13871391 1394 1397 1400ndash1402 1411 14121417 1435 1809 1971 2361 2363 23662367 2371 2373 2376 2502 2504 25062510 2514 2518 2519 2522 2530 25322533 2535 2542 2546 2850 2851 2880 2882

MTfeatures 773 3088 3101 3310 3324 3355 3638 3813

MTfeatureslong 773 776 781 3059 3827MTfilelist 2382

2384 2392 2395 2397 2402 2405 3415 3419MTfindfile 982 984 2382MTfixcatcode 5MTfixfontset 3160 4474MTfixfontdimensix 1050 1075MTfont 406 731 733

975 981 1036 1043 1052ndash1055 10581061 1222 1223 1258 1259 1264 12651285 1286 1289 1292 1295 1320 13251331 1425 1428 1463 1464 1466 14671542 1546 1552 1557 1583 1584 16251627 1655 1656 1662 1663 1669 16701679ndash1681 1683 1684 1689ndash1691 17331734 1740 1741 1750 1751 1753 17541759 1760 1788 1792 1872 1873 22822572 2627 2884 2940ndash2942 2944 29592960 2971 2972 2977 2984 3002 3012 3021

MTfontcopy 1018 1026 1028 1036ndash1038 1048MTfontlist

2884 2971 2972 2974 2976 2977 3053MTfontorig 1020MTfontsets 3141 3160 3270 4474MTfontspecfalse 850MTfontspectrue 850 851 855 893MTgdefn 393 3464 3480 3504 3539

3553 3742 3766 3780 3837 3880ndash3885 4290MTgetaxis 3284ndash3287 3297MTgetbasefamily 2394 2432MTgetbasefamily 2438 2441MTgetcharunit 1249 1389 1415 1507MTgetcharwd 1283 1314 1392 1415MTgetconfig 4260MTgetexopt 1506 1524 1597MTgetexopt 1605ndash1607 1609 1616MTgetfont 3265 3275MTgetfont 3276 3281 3625MTgetfontandsize 3609 3624MTgetfontdimen 1318 1395MTgethighlevel 3136 3146 3299 3572 3583MTgetinhlist 1211 1509 1642 1720 2528MTgetlistname 2447 2504 2530MTgetlistname 2447MTgetlsbasefont 1827 1992 1999MTgetopt 1209 1364 1640 1718MTgetrange 3174 3184 3596MTgetsize 3191 3196 3205 3224 3295MTgetsize 3231 3242MTgetsize 3242MTgetslot 1246 2292 2549 3859 3866MTgetslot 2566 2570MTgetspaceunit

1389 1491 1653 1660 1667 1731 1738MTgettropt 1814 1934MTgettropt 1954ndash1957 1959MTgetunit 1397 1405 1943MTgetunit 1405MTgetkey 4441 4456MTglet 387 400 894 1022 1916 2002 2033

2179 2187 2938 3035 3054ndash3057 34083667 3685 3890 4162 4164 4790 4796 4882

INDEX 245

MTgletnc 399 1059 1206 1810 2046 2234 2542

2960 3053 3124 3127 3133 3261 34973726 3730 3737 3740 3748 3751 3754 3789

MTgletnn 404 3072 4287MTiffalse 303

865 872 895 912 2989 3996 4858 4865MTiflistexists

1199 1505 1523 1639 1717 1813 2501MTifluaotffont

687 707 1829 1864 1873 2295 2308MTifouternext

2113 2128 2132 2135 2140 2145ndash2148MTiftrue 303

866ndash868 873ndash875 896ndash898 925 929 9302982 4005 4009 4017 4022 4859ndash4863 4866

MTifdefinedcT 415 869 9011267 1303 1585 1672 1743 1858 19482740 3162 3406 3834 3937 4296 4299 4885

MTifdefinedcTF 415 815 1817 1842 1845 18561990 2069 2240 2287 2288 2505 2531 3946

MTifdefinednT 415 804 1115 1133 1161 1177 12681400 1436 1586 1611 1673 1744 19381946 1960 2484 2879 3121 3401 34923650 3896 3903 3910 3916 3947 3957 4441

MTifdefinednTF 415 10761093 1116 1134 1162 1178 1201 13661374 1599 1617 1804 1914 2276 23662472 2557 3149 3338 3341 3369 36413923 3978 3987 4057 4283 4286 4647 4825

MTifdim 535 658 659 663 664 3207 32164003ndash4005 4007 4008 4015ndash4017 4020 4021

MTifdimen 497 3233 3729 3739 3753 4232MTifempty 448 1222 1223 1256 1262

1480 1481 1652 1659 1666 1689ndash16911703ndash1705 1707ndash1709 1730 1737 17591760 1776 1777 2052 2053 2061 20772209 2232 2233 2245 3064 3100 31043148 3158 3185 3186 3199 3200 32893300 3323 3327 3354 3358 3440 35193634 3640 3660 3666 3674 3684 36913764 3812 3819 4070 4101 4263 4309 4382

MTifint 461 2716 3520 3765 4215 4225MTifstreq 544 1105 1442 1609 2362 2503

2518 2789 2792 2800 2809 3019 32643608 3728 3750 3752 3814 3821 39383958 4029 4073 4075 4078 4081 41034105 4119 4120 4192 4193 4198 42024231 4311 4318 4322 4329 4384 4390 4718

MTinclist 624776 805 1118 1136 1145 1181 17882384 2395 2971 2974 2984 2996 3062 3415

MTinrlist 652 1164 2493MTinrlist 652MTinrlist 652MTintlist 640 2444 3073MTintlist 640MTinannotfalse 100MTinannottrue 100MTincrement 737 3895 3902 3909 3915MTinfo 76 91 96 1057 4199 4425 4429MTinfomissingchar 1298 1328 2623

MTinfonl 76 92 93 97 816 12021329 4190 4200 4270 4284 4288 44864490 4502 4509 4630 4667 4687 46924701 4711 4734 4738 4751 4766 4835 4846

MTinfonotracking 996 1106 1110MTinfonotracking 1106 1110MTinhdo 2541 3848MTinhfeat 3802 3812 3817 3828MTinhsplit 3850 3854MTinlistfalse 624 628 641 653 2992MTinlisttrue 624 630 648 660 665 2992MTisactive 2554 2729MTischar 2561 2756 2773MTischarx 2782 2803 2840MTiscomposite 2559 2827MTisfeature 775 3105 3328 3359MTisletter 2555 2673 2761 2836MTisnumber 2699 2704 2824MTisoptchar 2755 2765MTissymbol 2558 2751MTistlig 2759 2817MTisunicomp 2834 2846MTisxchar 2793 2799MTiterate 674MTkerning 1002 1714 4737MTkerningfalse 311MTkerningtrue 311MTkncname 1722 1724 1767 3546MTkncontext 3047 3088MTkndoccontexts 3088MTknfactor 314MTknfactor 1366MTkninhname 1743ndash1745MTknmax 326MTknmin 326MTknsetname 3337MTknsplitval 1728MTknunit 320MTknunit 1374 1770MTledunhboxline 816MTledmacsetup 810 889ndash891MTletcn 401 404 405 1077 1215

1513 1600 1646 1724 1939 1947 23612373 2498 2502 2535 2940 3228 3654 3833

MTletnc 399 1402 2154 2514 2546 29873980 3985 4079 4082 4325 4332 4749 4764

MTletnn 404 1367 1372 1375 1387 1618 1621 1961

MTletterspace 341 1817 1947 1949 1951 4799 4800 4802

MTletterspace 1233 13031304 1817 1818 1821 1824 1832 18391844 1852 1865ndash1867 1874 1883 1927ndash1930 2074 2077 2195 2210ndash2213 2246 2249

MTletterspacedefault 341 4800MTlistname 2447

2495 2498 2505 2506 2508 2510 25312532 2534 2535 2539 2542 3869 3874

MTlistnamecount 3637 3642 3644MTloadinputenc 1443 1446 1455MTloadlist 1213 1511 1644 1722 2358MTloop 674 682 730 3251 3984MTlower 3178 3184 3599MTlsadjust 1881 2206MTlsadjust 2190 2214

INDEX 246

MTlsadjustempty 2192 2206MTlsadjustrelax 2193 2206MTlsbasefont 1999 2008 2011 2012MTlsfontspeccolon 1923MTlsfontspecfont 1834 1923MTlsouterk 1884

1889 1897 2090 2104 2151 2169 2254MTlssetls 2197 2200 2206MTlstoolarge 2213 2216 4802MTlsfont 1823

1833 1839 1852 1853 1862 1866 18671872 1966 1977 2022 2024 2039 20402047 2048 2055 2057 2063 2078 2247 2250

MTltxpickupfont 918 959 964 2955 2963MTlua 192 255 356

364 485 522 568 688 709 2296 2309 2577MTluacopyfont 1047MTluacopyfont 1027 1047MTluatexno 253 354MTmapclist 596MTmapclistc 596

1029 2291 2983 2995 3008 3052 30593101 3324 3355 3638 3813 3817 3827 4439

MTmapclistn 596 1092 2275 3088 3103 3123 3134

3172 3262 3310 3326 3357 3387 34623570 3581 3594 3606 3746 3762 38634065 4068 4097 4099 4128 4210 4307 4380

MTmaptlist 614MTmaptlistc 614 643 654 1032 1269

1587 1674 1745 2451 3014 3948 3997 4474MTmaptlistn 614 2423 2775 3889MTmaxchar 2673 2696MTmaxslot 2673 2722MTmaybedo 1087 1196 1503 1637 1715 1790MTmaybegobblewithtikz 856 1913 1970MTmayberemfromlist 3014 3018MTmicrotypecontext 3024MTminus 1832 1927ndash1930MTMT 2 76 79 82 84

86 91 92 94 95 292 787 884 886 36764242 4264 4425 4429 4487 4722 4839 4840

MTMTpickupfont 961 966 2955 2965MTnextlistname 2454 2463MTnextlistname 2473 2485 2491MTnlligatures 2282 3433MTnlsetname 2274 3433MTnofamilyfalse 1193 1198MTnofamilytrue 1193 2464MTnoligatures 1006 2270 4811MTnoligatures 2022 2024 2282 2285MTnoligaturesfalse 308MTnoligaturestrue 308 3442MTnonselectedfalse 1519 1534MTnonselectedtrue 1519 1522MTnorestfalse

2682 2689 2698 2719 2789 2801 2809MTnoresttrue 2552 2682 2707MToldcmd 66 71ndash74MToptautofalse 4040MToptautotrue 4040 4130MToptdefset 4056 4084 4109MToptDVIfalse 4041MToptDVItrue 4041 4137 4140MToptexpansionfalse 4039

MToptexpansiontrue 4039MToptions 3557MToptwarnadmissible 4042 4121 4202MToptwarnnan 4046 4217 4227MTorigaddaccent 2961MTorigforeignlanguage 4852 4854MTorigpickupfont 2890 2957MTorigpymacron 956 960 965MTorigselectlanguage 4847 4849MTouterkern 1883 1887 1889 1890 1894 1902

1993 1994 1996 2151 2152 2169 2227 2266MTouterspace 1877

1878 2037 2086 2088 2089 2102 21032120 2121 2136 2137 2141 2142 2167

MTpdfannot 99MTpdforlua 180 188 290 464 687 4783MTpdftexno 212 353MTpermute 3479 3503 3517 3538 3552 3840 3879MTpermute 3879MTpermute 3879MTpermute 3879MTpermute 3879MTpermute 3914 3919MTpermute 3927 3929MTpermutedefine 3920 3930ndash3932 3976MTpermutereset 3889 3982MTpermutelist 3473 3489

3515 3532 3546 3613 3614 3619 38383942 3943 3947 3951 3954 3957ndash39593961ndash3963 3971 3972 3998 4030 4032 4033

MTpickupfont 2955MTplain 125 146MTprcname 1213 1215 1471 3473MTprcontext 1018 3046 3088MTprdoccontexts 3088MTprfactor 314 4226 4503 4504MTprfactor 1366MTprinhname 1267 1268 1270MTprlevel 314 4501 4502MTprmax 326MTprmin 326MTprsetname 3337MTprsplitval 1254MTprunit 320 4233 4505MTprunit 1374 1474MTpresetaux 1476

1478 1480 1481 1484 1772 1774 1776 1777MTpresetauxfactor 1476 1484 1703ndash1705 1772MTpresetauxspace 1478 1484 1707ndash1709 1774MTpresetex 1612 1629MTpresetkn 1765MTpresetkn 1765MTpresetpr 1469MTpresetpr 1469MTpresetsp 1696MTpresetsp 1696MTProcessOptionsWithKV 4433 4457MTprotrudechars 4358 4362 4501 4689MTprotrusion 997 1195 4508MTprotrusionfalse 304MTprotrusiontrue 304 4249MTrbbaexpansion 768MTrbbakerning 768MTrbbaprotrusion 768MTrbbaspacing 768

INDEX 247

MTrbbatracking 768MTregisterfont 1010 2972 3055MTregisterfontcx 3007 3055MTregistersubstfont 2946 2973 3056MTregistersubstfontcx 2994 3056MTremfromclist 635 1042 2977 3002 3020 3562MTremfromlist 1032 1040MTremlastspace 436MTremovetlig 2820 2823MTrepeat 674 684 733 3254 3990MTrequireslatex 145 164 796

914 1965 2888 4048 4209 4434 4438 4881MTrequiresluatex 348 387 988 1055 1231

1538 1539 1561 1608 1784 2285 37793785 4133 4363 4377 4519 4596 4604 4683

MTrequirespdftex 348463 498 545 811 977 987 1001 10051016 1230 1275 1301 1560 1636 17141783 2019 2271 3434 3664 3778 37834159 4253 4376 4540 4571 4599 4682 4809

MTresa 558 560 626 633 636 638 642 647MTresb 559 560 636ndash638 646 647MTresetcontext 3034 3038 3044 3071MTresetcontext 3044 3071MTresetefcodes 1508 1532 1560 1613MTresetefcodes 1555 1565 1569MTresetkncodes 1719 1726 1756MTresetkncodes 1756MTresetprcodes 1210 1217 1226MTresetprcodes 1226MTresetspcodes 1641 1648 1686MTresetspcodes 1686MTrestorecatcodes 5 7 8 159 165 4887MTrestoreph 847 876 931MTsavedsetupfont 4422 4430MTscale 744 1278 1340 1354 1357 1574MTscalefactor 1280 1311 1338 1486 1631MTscaletoem 1257 1263 1275 1308 1492

1654 1661 1668 1732 1739 1950 2070 2241MTscrubfeature 1068 1080 3585MTscrubfeatures 1080 3165 3611MTselectedfalse 307MTselectedtrue 307MTseries 1064 1180 2467 2479MTsetallex 1555 1632MTsetallkn 1756 1778MTsetallpr 1219 1226 1482MTsetallsp 1686 1711MTsetbabelcontext 4824 4850 4855 4869MTsetcodes 1216 1237 1514 1647 1725 2374MTsetcurrls 1874MTsetcurrok 1894 1896 1902 1905 2125 2129MTsetcurros 1876 1904 2125 2129MTsetdefaultset 3355 3360 3368MTsetexcodes 1536 4614 4616MTsetexcodesn 1519 1536 4616MTsetexcodess 1504 4614MTsetexheirs 1587 1624MTsetinhlist 3809 3811MTsetinputenc 1212 1433 1510 1643 1721 2540MTsetinputenc 1436 1438MTsetkncodes 1716MTsetknheirs 1745 1749MTsetlistname 1214

1365 1512 1598 1645 1723 1936 2849

MTsetlsbasefont 2008MTsetlsfont 1871 1964 1977MTsetnamedkeys 3475 3491 3513 3534 3548 3557MTsetprcodes 1197MTsetprheirs 1271 1461MTsetspcodes 1638MTsetspheirs 1674 1678MTsettrcodes 1800 1972 1982MTsettrzero 1819 2008 4404MTSetExpansion 3487 3489MTSetExtraKerning 3544 3546MTSetExtraSpacing 3530 3532MTSetProtrusion 3471 3473MTSetTracking 3509 3511MTsetup 794 798 4151 4152 4882MTsetupcontexts 3033 3051MTsetupcopies 4473 4489MTsetupexpansion 4476 4513MTsetupkerning 4480 4729 4772MTsetupnoligatures 4481 4807MTsetupPDF 4472 4484 4494MTsetupprotrusion 4475 4497MTsetupspacing 4479 4696 4773MTsetupspacingcheck 4714 4885 4886MTsetuptracking 4477 4681 4744 4771MTsetupwarntracking 4478 4776MTsetupfont 973 2949 4423 4426 4430 4466MTsetupfonthook 864 894 900 905 931 938 976MTshape 1064 1180 2468 2480MTshorthandoff 4833 4864 4867MTshowpdfannot 106MTshrink 323 1527

4536 4537 4544 4545 4548 4552 4619 4632MTshrink 1527 1542 1546 1552 1597MTshrinkdefault 339MTsize 659 663 664 1056 1064 1180MTsizename 652 2495MTSOULdoword 949 950MTspcname 1644 1646 1698 3532MTspcontext 3047 3088 4718MTspdoccontexts 3088MTspfactor 314MTspfactor 1366MTspinhname 1672ndash1674MTspmax 326MTspmin 326MTspsetname 3337MTspsplitval 1650MTspunit 320MTspunit 1374 1701MTspacing 1002 1635 4710MTspacingfalse 310MTspacingtrue 310MTsplitcodes 1239 1243MTsplitname 981 1064MTstep 323 1528 4539

4541 4559 4563 4566 4633 4636 4637 4641MTstep 1528 1542 1546 1552 1597MTstretch 323 1526 4533

4534 4537 4544 4546 4551 4554 4618 4632MTstretch 1526 1542 1546 1552 1597MTstretchdefault 339 4534MTstripprefix 2782 2803 2839MTtemp 1221ndash1224 1688ndash1692 1758ndash1761

2042 2046 2049 2057 2060 2117 2120

INDEX 248

2126 2130 2133 2136 2141 2149 21512157 2231 2234 2251 3283 3308 44374442 4447 4448 4450 4453 4648 4652 4656

MTtempencoding 3922 3923 3933 3939MTtempfamily 3934MTtempseries 3935MTtempshape 3936MTtempsize 3890 3937 3946 3948 3952MTtestast 2068 2239 3147 3156MTtextmicrotypecontext 3041MTtextls 49 2192 2193 2195MTtextmicrotypecontext 3041MTtheprcode 1228 1258 1264 1868MTtheprcodetr 1228 1868MTtikzsetup 856 877 954MTtlistbreak 614 649 671 2456 4036MTtoks 302

1329 1360 1593 2553 2588 2615 26872694 2744 2795 2810 2819 2854 2866 2874

MTtrcname 19381939 1946 1947 1960 1961 3514 3521

MTtrcontext 3047 3088MTtrdoccontexts 3088MTtrfactor 1937MTtrfontlist 1786MTtrispace 1842 1843 1954MTtrligatures 1858 1957 2021 2024MTtrmax 326 2217ndash2219MTtrmin 326 2221ndash2223MTtrnoligatures 1858 2018MTtrokern 1856 1956MTtrospace 1845 1846 1954MTtroutericr 2130 2159MTtroutericr 2159MTtrouterl 1879 2082MTtrouternext 2110 2114 2161MTtrouterr 1906 2110 2126 2133 2159MTtrouterr 2111 2116MTtrsetokern 1857 2227MTtrsetokern 2232 2233 2238MTtrsetspace 1848 2038MTtrsetspace 2043ndash2045 2051MTtrsetspace 2054 2059 2062 2067MTtrsetname 3337MTtrunit 1938 2069 2240MTtracking 989 1786 1972 2951 4404 4405 4691MTtracking 1786 4405MTtrackingfalse 312 4748MTtrackingtrue 312MTtryorder 2451 2459MTundefinedchar 2734 2739 2750MTupper 3178 3184 3599MTuseset 3324 3329 3337MTUseMicrotypeSet 3320 3322MTval 3064ndash3066 3068 3074 3076

3079 3135 3139 3147 3150 3153 3173ndash3175 3187 3190 3192 3195 3197 3198

3204 3206 3207 3209 3212 3214 32253228 3233ndash3235 3237 3239 3244 3263ndash3265 3268 3277ndash3279 3291 3293 32983300 3302 3304 3571 3573 3582 35853587 3595ndash3597 3607ndash3609 3615 36203862 3869 3873 3874 4057 4058 40614069 4070 4073 4075 4078 4081 41004101 4103 4105 4308 4309 4311 43184322 4329 4335 4381 4382 4384 4390 4393

MTvariants 2444 3379 3390MTvinfo 76 93 995 1107 1111 1369

1378 1382 1417 1601 1619 1803 18212299 2310 2367 2391 2401 2404 25082510 2516 3045 3068 3417 3423 41904197 4314 4320 4326 4333 4387 4392 4826

MTwarnascii 2696 2853MTwarnaxisempty 3290 3301 3306MTwarncodetoolarge 1344 1347 1351MTwarnerr 76 4194 4195MTwarnextoolarge 1577 1580 1591MTwarnmaybeinputenc 2289 2867 2875 2878MTwarnnodim 3718 3731 3741 3755MTwarnnumbertoolarge 2723 2859MTwarnpresettowidth 1475 1495 1702 1771MTwarnrest 2594 2631 2864MTwarntrackingDVI 1822 4778MTwarnunknown 2584 2600 2610 2635 2872MTwarnunknownonce 2890 2891MTwarning 67 76 94 2218 2222 2302 2519

3122 3151 3237 3307 3402 3425 35223651 3720 3768 3781 3786 3940 39614032 4194 4199 4296 4373 4412 4414 4415

MTwarningnl 76 88 95 158 279 786 790 826838 907 1321 1358 1410 1450 14961592 1806 2030 2854 2860 2865 28732922 3494 3693 4043 4050 4061 41434195 4200 4234 4241 4277 4291 44634520 4564 4620 4639 4703 4719 4784 4871

MTwhilenum 680 704 710 934ndash936MTwithbabelandT

803 866ndash868 896ndash898 4859ndash4863 4866MTwithpackageT 800 851 853

870 873ndash875 877 882 889ndash893 903 915929 930 932 954 955 2890 2891 2933 4702

MTxadd 104 580 2392 2397 24022405 2999 3010 3076 3176 3419 3598 3869

MTxaddb 588 3618 3950MTxdefn 395 3339 3342 3371 3376 3405

3521 3613 3635 3797 3835 3971 4058 4060MTxetexno 244MTxspace 2149 2164MTxspace 2164MTxunicodefalse 852MTxunicodetrue 852 853 892

N newcomputermodern (package) 145newpx (package) 21 59 145 239newtx (package) 21 59 145 239

newunicodechar (package) 95 239normalfont 972 4659 4663nullfont 972

O outputmode 194 4133

INDEX 249

P pdfadjustinterwordglue 4406 4700pdfadjustspacing 196 950 4365 4369 4661pdfappendkern 4408 4733pdfcopyfont 1026pdfcprot (package) 26 30 54 64 99 231pdffeedback 1055pdffontexpand 1539 1542 1546 1552pdffontsize 1054 1055pdfnoligatures 2285 2301 2307pdfprependkern 4407 4732pdfprotrudechars 195 4364 4368 4795pdfTEX (engine) 1 4 6ndash9 13ndash19 23ndash35 37ndash39

41ndash43 45 46 53 57ndash59 64 70 72 73

75 76 79 80 83 85 112 115 117 119129 133 134 136 137 140 197 199 231ndash237

pdftexcmds (package) 37 237pdftracingfonts 358pickupfont 2921 2923 2932 2955ndash2957pifont (package) 100pinyin (package) 56 236 237protrudechars 195 4364protrusion (option) 6 11 125 126psnfss (package) 79 198 239pstricks (package) 134pxfonts (package) 21 145

Q qfonts (package) 21 145 233

R ragged2e (package) 26 81 139 237 238reledmac (package) 53 239relsize (package) 108

removetlig 2818rightmarginkern 822rpcode 1223 1264 1265 1464 1467 1867

S selected (option) 8 14 33 69 90 126 232selectfont 1973 3037 3049 4301 4877setfontsize 3244SetExpansion 14 36 3484SetExtraKerning 18 38 3542SetExtraSpacing 19 39 3527SetProtrusion 13 35 3468SetTracking 15 37 3507sfcode 4717shapepar (package) 29 53shbscode 1669 1670 1681 1684 1691showhyphens 4647shrink (option) 8 15 33 128 136 138 234 236

slantsc (package) 177soul (package) 4 30 56 82 235 237 240soulutf8 (package) 30 237spacefactor 2093spaceskip 2094 2097spacing (option) 6 11 26 31 126 237 238stbscode 1662 1663 1680 1684 1690step (option) 8 31 33 128 136 138 232 234 236step (package) 21 145 240stix (package) 21 145 240stix2 (package) 21 145 240stretch (option) 8 15 25 33 128 135 136 138 236svjour3 (package) 108 240

T tagcode 1862 2288 2294tempora (package) 21 145 239tex4ht (package) 54 235TEX Live (distribution) 28 39 146 233textls 23 52 53 923 947 1882 1968 1985 2190textls 24textmicrotypecontext 22 48 919 3041tikz (package) 54 227 237 239tikzposter (package) 238

tipa (package) 100trace (package) 101 235tracingmicrotype 87tracingmicrotypeinpdf 98tracingmicrotypeinpdfallfalse 105tracingmicrotypeinpdfalltrue 105tracking (option) 6 11 23 31 126txfonts (package) 21 145

U ucs (package) 95 236ulgothic (package) 21UnicodeEncodingName 2832unit (option) 7 32 233 235

UseMicrotypeSet 12 33 60 73 3116 3318UTFfouroctetsnoexpand 2737UTFthreeoctetsnoexpand 2736UTFtwooctetsnoexpand 2735

V verbose (option) 9 31 32 128 232 233 236

W wordcount (package) 52 236

X XCharter (package) 21 146 239xeCJK (package) 27 100 238 239

XETEX (engine) 1 4 6 7 9 1213 20 29 31 34 38 40 50 53 57 59 8393 133 138 140 144 147 151 159 238ndash240

XeTeXcharglyph 2621XeTeXfonttype 2572XeTeXglyph 1292XeTeXglyphindex 2608

XeTeXglyphname 2627XeTeXlastfontchar 733XeTeXprotrudechars 4372xspace 2148 2149xspace (package) 83 238xspaceskip 2096 2099xunicode (package) 97 98 238xunicode-addon (package) 100

Y yfonts (package) 24

Z zefonts (package) 21 144

THE LATEX PROJECT PUBLIC LICENSE 250

E The LATEX Project Public LicenseLPPL Version 13c 2008-05-04

Copyright 1999 2002ndash2008 LATEX3 Project

Everyone is allowed to distribute verbatimcopies of this license document but modificationof it is not allowed

PreambleThe LATEX Project Public License (LPPL) is the primarylicense under which the LATEX kernel and the base LATEXpackages are distributed

You may use this license for any work of which youhold the copyright and which you wish to distribute Thislicense may be particularly suitable if your work is TEX-related (such as a LATEX package) but it is written in sucha way that you can use it even if your work is unrelatedto TEX

The section lsquoWHETHER AND HOW TO DISTRIBUTEWORKS UNDER THIS LICENSErsquo below gives instructionsexamples and recommendations for authors who are con-sidering distributing their works under this license

This license gives conditions under which a work maybe distributed and modified as well as conditions underwhich modified versions of that work may be distributed

We the LATEX3 Project believe that the conditionsbelow give you the freedom to make and distribute mod-ified versions of your work that conform with whatevertechnical specifications you wish while maintaining theavailability integrity and reliability of that work If youdo not see how to achieve your goal while meeting theseconditions then read the document lsquocfgguidetexrsquo andlsquomodguidetexrsquo in the base LATEX distribution for sugges-tions

DefinitionsIn this license document the following terms are used

Work Any work being distributed under this License

Derived Work Any work that under any applicable lawis derived from the Work

Modification Any procedure that produces a DerivedWork under any applicable law ndash for example theproduction of a file containing an original file asso-ciated with the Work or a significant portion of sucha file either verbatim or with modifications andortranslated into another language

Modify To apply any procedure that produces a DerivedWork under any applicable law

Distribution Making copies of the Work available fromone person to another in whole or in part Distri-bution includes (but is not limited to) making anyelectronic components of the Work accessible by filetransfer protocols such as FTP or HTTP or by sharedfile systems such as Sunrsquos Network File System (NFS)

Compiled Work A version of the Work that has been pro-cessed into a form where it is directly usable on a

computer system This processing may include us-ing installation facilities provided by the Work trans-formations of the Work copying of components ofthe Work or other activities Note that modificationof any installation facilities provided by the Workconstitutes modification of the Work

Current Maintainer A person or persons nominated assuch within the Work If there is no such explicit nom-ination then it is the lsquoCopyright Holderrsquo under anyapplicable law

Base Interpreter A program or process that is normallyneeded for running or interpreting a part or the wholeof the WorkA Base Interpreter may depend on external compon-ents but these are not considered part of the BaseInterpreter provided that each external componentclearly identifies itself whenever it is used interact-ively Unless explicitly specified when applying thelicense to the Work the only applicable Base Inter-preter is a lsquoLATEX-Formatrsquo or in the case of files belong-ing to the lsquoLATEX-formatrsquo a program implementing thelsquoTEX languagersquo

Conditions on Distribution and Modification1 Activities other than distribution andor modification

of the Work are not covered by this license they areoutside its scope In particular the act of running theWork is not restricted and no requirements are madeconcerning any offers of support for the Work

2 You may distribute a complete unmodified copy ofthe Work as you received it Distribution of only partof the Work is considered modification of the Workand no right to distribute such a Derived Work maybe assumed under the terms of this clause

3 You may distribute a Compiled Work that has been

generated from a complete unmodified copy of theWork as distributed under Clause 2 above as long asthat Compiled Work is distributed in such a way thatthe recipients may install the Compiled Work on theirsystem exactly as it would have been installed if theygenerated a Compiled Work directly from the Work

4 If you are the Current Maintainer of the Work youmay without restriction modify the Work thus creat-ing a Derived Work You may also distribute the De-rived Work without restriction including CompiledWorks generated from the Derived Work DerivedWorks distributed in this manner by the Current Main-

THE LATEX PROJECT PUBLIC LICENSE 251

tainer are considered to be updated versions of theWork

5 If you are not the Current Maintainer of the Workyou may modify your copy of the Work thus creatinga Derived Work based on the Work and compile thisDerived Work thus creating a Compiled Work basedon the Derived Work

6 If you are not the Current Maintainer of the Workyou may distribute a Derived Work provided the fol-lowing conditions are met for every component ofthe Work unless that component clearly states in thecopyright notice that it is exempt from that conditionOnly the Current Maintainer is allowed to add suchstatements of exemption to a component of the Work

(a) If a component of this Derived Work can be adirect replacement for a component of the Workwhen that component is used with the Base In-terpreter then wherever this component of theWork identifies itself to the user when used inter-actively with that Base Interpreter the replace-ment component of this Derived Work clearly andunambiguously identifies itself as a modified ver-sion of this component to the user when usedinteractively with that Base Interpreter

(b) Every component of the Derived Work containsprominent notices detailing the nature of thechanges to that component or a prominent refer-ence to another file that is distributed as part ofthe Derived Work and that contains a completeand accurate log of the changes

(c) No information in the Derived Work implies thatany persons including (but not limited to) the au-thors of the original version of the Work provideany support including (but not limited to) the re-porting and handling of errors to recipients of theDerived Work unless those persons have statedexplicitly that they do provide such support forthe Derived Work

(d) You distribute at least one of the following withthe Derived Work

i A complete unmodified copy of the Work ifyour distribution of a modified component ismade by offering access to copy the modifiedcomponent from a designated place then of-fering equivalent access to copy the Work from

the same or some similar place meets this con-dition even though third parties are not com-pelled to copy the Work along with the modi-fied component

ii Information that is sufficient to obtain a com-plete unmodified copy of the Work

7 If you are not the Current Maintainer of the Workyou may distribute a Compiled Work generated froma Derived Work as long as the Derived Work is dis-tributed to all recipients of the Compiled Work andas long as the conditions of Clause 6 above are metwith regard to the Derived Work

8 The conditions above are not intended to prohibitand hence do not apply to the modification byany method of any component so that it becomesidentical to an updated version of that component ofthe Work as it is distributed by the Current Maintainerunder Clause 4 above

9 Distribution of the Work or any Derived Work in analternative format where the Work or that DerivedWork (in whole or in part) is then produced by ap-plying some process to that format does not relax ornullify any sections of this license as they pertain tothe results of applying that process

10 (a) A Derived Work may be distributed under a dif-ferent license provided that license itself honorsthe conditions listed in Clause 6 above in regardto the Work though it does not have to honor therest of the conditions in this license

(b) If a Derived Work is distributed under a differentlicense that Derived Work must provide sufficientdocumentation as part of itself to allow each recip-ient of that Derived Work to honor the restrictionsin Clause 6 above concerning changes from theWork

11 This license places no restrictions on works that areunrelated to the Work nor does this license place anyrestrictions on aggregating such works with the Workby any means

12 Nothing in this license is intended to or may be usedto prevent complete compliance by all parties withall applicable laws

No WarrantyThere is no warranty for the Work Except when otherwisestated in writing the Copyright Holder provides the Worklsquoas isrsquo without warranty of any kind either expressed orimplied including but not limited to the implied war-ranties of merchantability and fitness for a particular pur-pose The entire risk as to the quality and performance ofthe Work is with you Should the Work prove defectiveyou assume the cost of all necessary servicing repair orcorrection

In no event unless required by applicable law oragreed to in writing will The Copyright Holder or any au-

thor named in the components of the Work or any otherparty who may distribute andor modify the Work as per-mitted above be liable to you for damages includingany general special incidental or consequential damagesarising out of any use of the Work or out of inability touse the Work (including but not limited to loss of datadata being rendered inaccurate or losses sustained byanyone as a result of any failure of the Work to operatewith any other programs) even if the Copyright Holderor said author or said other party has been advised of thepossibility of such damages

THE LATEX PROJECT PUBLIC LICENSE 252

Maintenance of The WorkThe Work has the status lsquoauthor-maintainedrsquo if the Copy-right Holder explicitly and prominently states near theprimary copyright notice in the Work that the Work canonly be maintained by the Copyright Holder or simplythat it is lsquoauthor-maintainedrsquo

The Work has the status lsquomaintainedrsquo if there is aCurrent Maintainer who has indicated in the Work thatthey are willing to receive error reports for the Work (forexample by supplying a valid e-mail address) It is notrequired for the Current Maintainer to acknowledge oract upon these error reports

The Work changes from status lsquomaintainedrsquo to lsquoun-maintainedrsquo if there is no Current Maintainer or the per-son stated to be Current Maintainer of the work cannotbe reached through the indicated means of communica-tion for a period of six months and there are no othersignificant signs of active maintenance

You can become the Current Maintainer of the Workby agreement with any existing Current Maintainer totake over this role

If the Work is unmaintained you can become theCurrent Maintainer of the Work through the followingsteps1 Make a reasonable attempt to trace the Current Main-

tainer (and the Copyright Holder if the two differ)through the means of an Internet or similar search

2 If this search is successful then enquire whether theWork is still maintained

(a) If it is being maintained then ask the CurrentMaintainer to update their communication datawithin one month

(b) If the search is unsuccessful or no action to re-sume active maintenance is taken by the Current

Maintainer then announce within the pertinentcommunity your intention to take over mainten-ance (If the Work is a LATEX work this could bedone for example by posting to comptexttex)

3 (a) If the Current Maintainer is reachable and agreesto pass maintenance of the Work to you then thistakes effect immediately upon announcement

(b) If the Current Maintainer is not reachable andthe Copyright Holder agrees that maintenance ofthe Work be passed to you then this takes effectimmediately upon announcement

4 If you make an lsquointention announcementrsquo as describedin 2b above and after three months your intentionis challenged neither by the Current Maintainer norby the Copyright Holder nor by other people thenyou may arrange for the Work to be changed so as toname you as the (new) Current Maintainer

5 If the previously unreachable Current Maintainer be-comes reachable once more within three months of achange completed under the terms of 3b or 4 thenthat Current Maintainer must become or remain theCurrent Maintainer upon request provided they thenupdate their communication data within one month

A change in the Current Maintainer does not of itselfalter the fact that the Work is distributed under the LPPLlicense

If you become the Current Maintainer of the Workyou should immediately provide within the Work a prom-inent and unambiguous statement of your status as Cur-rent Maintainer You should also announce your newstatus to the same pertinent community as in 2b above

Whether and How to Distribute Works under This LicenseThis section contains important instructions examplesand recommendations for authors who are consideringdistributing their works under this license These authorsare addressed as lsquoyoursquo in this section

Choosing This License or Another LicenseIf for any part of your work you want or need to use dis-tribution conditions that differ significantly from those inthis license then do not refer to this license anywherein your work but instead distribute your work under adifferent license You may use the text of this license as amodel for your own license but your license should notrefer to the LPPL or otherwise give the impression thatyour work is distributed under the LPPL

The document lsquomodguidetexrsquo in the base LATEX dis-tribution explains the motivation behind the conditionsof this license It explains for example why distributingLATEX under the GNU General Public License (GPL) wasconsidered inappropriate Even if your work is unrelatedto LATEX the discussion in lsquomodguidetexrsquo may still berelevant and authors intending to distribute their worksunder any license are encouraged to read it

A Recommendation on Modification WithoutDistributionIt is wise never to modify a component of the Work evenfor your own personal use without also meeting the aboveconditions for distributing the modified component Whileyou might intend that such modifications will never bedistributed often this will happen by accident ndash you mayforget that you have modified that component or it maynot occur to you when allowing others to access the modi-fied version that you are thus distributing it and violatingthe conditions of this license in ways that could havelegal implications and worse cause problems for thecommunity It is therefore usually in your best interest tokeep your copy of the Work identical with the public oneMany works provide ways to control the behavior of thatwork without altering any of its licensed components

How to Use This LicenseTo use this license place in each of the components ofyour work both an explicit copyright notice including yourname and the year the work was authored andor lastsubstantially modified Include also a statement that thedistribution andor modification of that component is

THE LATEX PROJECT PUBLIC LICENSE 253

constrained by the conditions in this licenseHere is an example of such a notice and statement

pigdtx Copyright 2005 M Y Name This work may be distributed andor modified under the conditions of the LaTeX Project Public License either version 13 of this license or (at your option) any later version The latest version of this license is in httpswwwlatex-projectorglppltxt and version 13 or later is part of all distributions of LaTeX version 20051201 or later This work has the LPPL maintenance status `maintained The Current Maintainer of this work is M Y Name This work consists of the files pigdtx and pigins and the derived file pigsty

Given such a notice and statement in a file the con-ditions given in this license document would apply withthe lsquoWorkrsquo referring to the three files lsquopigdtxrsquo lsquopiginsrsquoand lsquopigstyrsquo (the last being generated from lsquopigdtxrsquousing lsquopiginsrsquo) the lsquoBase Interpreterrsquo referring to anylsquoLATEX-Formatrsquo and both lsquoCopyright Holderrsquo and lsquoCurrentMaintainerrsquo referring to the person lsquoM Y Namersquo

If you do not want the Maintenance section of LPPLto apply to your Work change lsquomaintainedrsquo above intolsquoauthor-maintainedrsquo However we recommend that youuse lsquomaintainedrsquo as the Maintenance section was addedin order to ensure that your Work remains useful to thecommunity even when you can no longer maintain andsupport it yourself

Derived Works That Are Not Replacements

Several clauses of the LPPL specify means to provide reliab-ility and stability for the user community They thereforeconcern themselves with the case that a Derived Work isintended to be used as a (compatible or incompatible)replacement of the original Work If this is not the case(eg if a few lines of code are reused for a completelydifferent task) then clauses 6b and 6d shall not apply

Important Recommendations

Defining What Constitutes the WorkThe LPPL requires that distributions of the Work con-

tain all the files of the Work It is therefore important thatyou provide a way for the licensee to determine whichfiles constitute the Work This could for example beachieved by explicitly listing all the files of the Work nearthe copyright notice of each file or by using a line such as

This work consists of all files listed in manifesttxt

in that place In the absence of an unequivocal list itmight be impossible for the licensee to determine what isconsidered by you to comprise the Work and in such acase the licensee would be entitled to make reasonableconjectures as to which files comprise the Work

  • Contents
  • List of Tables
  • Micro-typography with TeX
  • Getting started
  • Options
    • Enabling the micro-typographic features
    • Character protrusion
    • Font expansion
    • Tracking
    • Miscellaneous options
    • Changing options later
      • Selecting fonts for micro-typography
      • Micro fine tuning
        • Character protrusion
        • Font expansion
        • Tracking
        • Additional kerning
        • Interword spacing
        • Character inheritance
        • Configuration files
          • Context-sensitive setup
          • Letterspacing revisited
          • Disabling ligatures
          • Hints and caveats
          • Contributions
          • Acknowledgments
          • References
          • Short history
          • Implementation
            • Preliminaries
              • Debugging
              • Requirements
              • Declarations
              • Auxiliary macros
              • Compatibility
                • Font setup
                  • Protrusion
                  • Expansion
                  • Interword spacing (glue)
                  • Additional kerning
                  • Tracking
                  • Disabling ligatures
                  • Loading the configuration
                  • Translating characters into slots
                  • Hook into LaTeXs font selection
                  • Context-sensitive setup
                    • Configuration
                      • Font sets
                      • Variants and aliases
                      • Disabling ligatures
                      • Interaction with babel
                      • Fine tuning
                      • Character inheritance
                      • Permutation
                        • Package options
                          • Declaring the options
                          • Loading the definition file
                          • Reading the configuration file
                          • Hook for other packages
                          • Changing options later
                          • Processing the options
                              • Configuration files
                                • Font sets
                                • Font variants and aliases
                                • Interaction with babel
                                • Note on admissible characters
                                • Character inheritance
                                  • OT1
                                  • T1
                                  • LY1
                                  • OT4
                                  • QX
                                  • T5
                                  • EU1 EU2 TU
                                  • Euro symbols
                                    • Tracking
                                    • Font expansion
                                    • Character protrusion
                                      • Normal
                                      • Italics
                                      • Small caps
                                      • Italic small caps
                                      • Text companion
                                      • Computer Modern math
                                      • AMS symbols
                                      • Euler
                                      • Euro symbols
                                        • Interword spacing
                                          • Nonfrenchspacing
                                            • Additional kerning
                                              • French
                                              • Turkish
                                                  • OpenType configuration files
                                                    • Character inheritance
                                                    • Character protrusion
                                                      • Auxiliary file for micro fine tuning
                                                      • The title logo
                                                        • Macros
                                                        • Document
                                                          • The letterspacing illustration
                                                            • Macros
                                                            • Document
                                                              • Change history
                                                                • 10 (20040911)
                                                                • 11 (20040921)
                                                                • 12 (20041003)
                                                                • 13 (20041027)
                                                                • 14 (20041112)
                                                                • 14a (20041117)
                                                                • 14b (20041126)
                                                                • 15 (20041215)
                                                                • 16 (20050124)
                                                                • 16a (20050202)
                                                                • 17 (20050323)
                                                                • 18 (20050623)
                                                                • 19 (20051028)
                                                                • 19a (20051205)
                                                                • 19b (20060120)
                                                                • 19c (20060202)
                                                                • 19d (20060505)
                                                                • 19e (20060728)
                                                                • 19f (20060909)
                                                                • 20 (20070114)
                                                                • 21 (20070121)
                                                                • 22 (20070714)
                                                                • 23 (20071223)
                                                                • 23a (20080229)
                                                                • 23b (20080604)
                                                                • 23c (20081111)
                                                                • 23d (20090327)
                                                                • 23e (20091109)
                                                                • 24 (20100110)
                                                                • 25 (20130313)
                                                                • 25a (20130523)
                                                                • 26 (20160501)
                                                                • 26a (20160514)
                                                                • 27 (20170707)
                                                                • 27a (20180114)
                                                                • 27b (20190228)
                                                                • 27c (20191010)
                                                                • 27d (20191118)
                                                                • 28 (20201207)
                                                                • 28a (20210222)
                                                                • 28b (20210225)
                                                                • 28c (20210314)
                                                                  • Index
                                                                    • Options
                                                                    • Commands
                                                                    • A
                                                                    • B
                                                                    • C
                                                                    • D
                                                                    • E
                                                                    • F
                                                                    • G
                                                                    • H
                                                                    • I
                                                                    • J
                                                                    • K
                                                                    • L
                                                                    • M
                                                                    • N
                                                                    • O
                                                                    • P
                                                                    • Q
                                                                    • R
                                                                    • S
                                                                    • T
                                                                    • U
                                                                    • V
                                                                    • W
                                                                    • X
                                                                    • Y
                                                                    • Z
                                                                      • The LaTeX Project Public License
Page 2: The microtype package - ctan.math.utah.edu

CONTENTS 2

Contents

1 Micro-typography with TEX 4

2 Getting started 5

3 Options 631 Enabling the micro-typographic features 632 Character protrusion 733 Font expansion 734 Tracking 835 Miscellaneous options 936 Changing options later 9

4 Selecting fonts for micro-typography 10

5 Micro fine tuning 1251 Character protrusion 1352 Font expansion 1453 Tracking 1554 Additional kerning 1855 Interword spacing 1956 Character inheritance 2057 Configuration files 20

6 Context-sensitive setup 22

7 Letterspacing revisited 23

8 Disabling ligatures 24

9 Hints and caveats 25

10 Contributions 28

11 Acknowledgments 28

12 References 30

13 Short history 30

14 Implementation 34141 Preliminaries 35

Debugging [36] Requirements [38] Declarations [42] Auxiliary macros [43]Compatibility [52]

142 Font setup 56Protrusion [62] Expansion [69] Interword spacing (glue) [72] Additional kern-ing [73] Tracking [75] Disabling ligatures [85] Loading the configuration [87]Translating characters into slots [91] Hook into LATEXrsquos font selection [99]Context-sensitive setup [102]

143 Configuration 105Font sets [105] Variants and aliases [111] Disabling ligatures [112] Interactionwith babel [113] Fine tuning [113] Character inheritance [120] Permuta-tion [121]

LIST OF TABLES 3

144 Package options 125Declaring the options [125] Loading the definition file [129] Reading theconfiguration file [129] Hook for other packages [130] Changing optionslater [131] Processing the options [133]

15 Configuration files 143151 Font sets 143152 Font variants and aliases 144153 Interaction with babel 146154 Note on admissible characters 147155 Character inheritance 147

OT1 [147] T1 [148] LY1 [148] OT4 [149] QX [149] T5 [150] EU1 EU2 TU [151]Euro symbols [151]

156 Tracking 152157 Font expansion 152158 Character protrusion 154

Normal [155] Italics [163] Small caps [174] Italic small caps [177] Textcompanion [178] Computer Modern math [183] AMS symbols [187] Euler [190]Euro symbols [194]

159 Interword spacing 195Nonfrenchspacing [197]

1510 Additional kerning 198French [199] Turkish [199]

16 OpenType configuration files 201161 Character inheritance 201162 Character protrusion 205

17 Auxiliary file for micro fine tuning 219

A The title logo 221A1 Macros 221A2 Document 226

B The letterspacing illustration 226B1 Macros 226B2 Document 229

C Change history 231

D Index 241

E The LATEX Project Public License 250

List of Tables1 Availability of micro-typographic features 72 Predefined font sets 113 Fonts with tailored protrusion settings 214 Order for matching font attributes 89

MICRO-TYPOGRAPHY WITH TEX 4

1 Micro-typography with TEXMicro-typography is the art of enhancing the appearance and readability of adocument while exhibiting a minimum degree of visual obtrusion It is concernedwith what happens between or at the margins of characters words or lines Whereasthe macro-typographical aspects of a document (ie its layout) are clearly visibleeven to the untrained eye micro-typographical refinements should ideally not evenbe recognisable That is you may think that a document looks beautiful but youmight not be able to tell exactly why good micro-typographic practice tries toreduce all potential irritations that might disturb a reader

Some essential micro-typographical aspects are already taken care of by TEX outof the box ndash and in an outstanding manner ndash namely hyphenation and justificationas well as kerning and ligatures Other aspects are in the userrsquos scope of responsib-ilities eg to specify the right amounts of spacing around punctuation charactersnumbers or quotation marks On top of this a number of long-standing micro-typographic techniques have been introduced to the TEX world relatively recentlywith pdfTEX and have since also propagated to LuaTEX and XETEX These featuresmake them the tool of choice not only for the creation of electronic documentsbut also of works of outstanding time-honoured typography most prominentlycharacter protrusion (also known as margin kerning) and font expansion QuotingHagraven Thecirc Thagravenh the author of pdfTEX who writes in his thesis

After you have read the texton the right you can viewthe effect of the features itdescribes by clicking on thelinks

Protrusion onoff

Expansion onoff

Both features are enabledthroughout this document

lsquoMargin kerning is the adjustments of the characters at the margins of a typeset textA simplified employment of margin kerning is hanging punctuation Margin kerningis needed for optical alignment of the margins of a typeset text because mechanicaljustification of the margins makes them look rather ragged Some characters canmake a line appear shorter to the human eye than others Shifting such charactersby an appropriate amount into the margins would greatly improve the appearanceof a typeset text

Composing with font expansion is the method to use a wider or narrower variantof a font to make interword spacing more even A font in a loose line can be substi-tuted by a wider variant so the interword spaces are stretched by a smaller amountSimilarly a font in a tight line can be replaced by a narrower variant to reducethe amount that the interword spaces are shrunk by There is certainly a potentialdanger of font distortion when using such manipulations thus they must be usedwith extreme care The potentiality to adjust a line width by font expansion can betaken into consideration while a paragraph is being broken into lines in order tochoose better breakpointsrsquo [Thagravenh 2000 p 323]

lsquoMargin kerning is the adjustments of the characters at the margins of a typeset textA simplified employment of margin kerning is hanging punctuation Margin kerningis needed for optical alignment of the margins of a typeset text because mechanicaljustification of the margins makes them look rather ragged Some characters canmake a line appear shorter to the human eye than others Shifting such charactersby an appropriate amount into the margins would greatly improve the appearanceof a typeset text

Composing with font expansion is the method to use a wider or narrower variant ofa font to make interword spacing more even A font in a loose line can be substitutedby a wider variant so the interword spaces are stretched by a smaller amountSimilarly a font in a tight line can be replaced by a narrower variant to reducethe amount that the interword spaces are shrunk by There is certainly a potentialdanger of font distortion when using such manipulations thus they must be usedwith extreme care The potentiality to adjust a line width by font expansion can betaken into consideration while a paragraph is being broken into lines in order tochoose better breakpointsrsquo [Thagravenh 2000 p 323]

lsquoMargin kerning is the adjustments of the characters at the margins of a typeset textA simplified employment of margin kerning is hanging punctuation Margin kerningis needed for optical alignment of the margins of a typeset text because mechanicaljustification of the margins makes them look rather ragged Some characters canmake a line appear shorter to the human eye than others Shifting such charactersby an appropriate amount into the margins would greatly improve the appearanceof a typeset text

Composing with font expansion is the method to use a wider or narrower variantof a font to make interword spacing more even A font in a loose line can be substi-tuted by a wider variant so the interword spaces are stretched by a smaller amountSimilarly a font in a tight line can be replaced by a narrower variant to reducethe amount that the interword spaces are shrunk by There is certainly a potentialdanger of font distortion when using such manipulations thus they must be usedwith extreme care The potentiality to adjust a line width by font expansion can betaken into consideration while a paragraph is being broken into lines in order tochoose better breakpointsrsquo [Thagravenh 2000 p 323]

If you had a PDF viewer thatunderstands PDF 15 youcould view the effect of themicro-typographic features byclicking on the links

Both features are enabledthroughout this document

lsquoMargin kerning is the adjustments of the characters at the margins of a typeset textA simplified employment of margin kerning is hanging punctuation Margin kerningis needed for optical alignment of the margins of a typeset text because mechanicaljustification of the margins makes them look rather ragged Some characters canmake a line appear shorter to the human eye than others Shifting such charactersby an appropriate amount into the margins would greatly improve the appearanceof a typeset text

Composing with font expansion is the method to use a wider or narrower variant of afont to make interword spacing more even A font in a loose line can be substituted bya wider variant so the interword spaces are stretched by a smaller amount Similarlya font in a tight line can be replaced by a narrower variant to reduce the amountthat the interword spaces are shrunk by There is certainly a potential danger of fontdistortion when using such manipulations thus they must be used with extremecare The potentiality to adjust a line width by font expansion can be taken intoconsideration while a paragraph is being broken into lines in order to choose betterbreakpointsrsquo [Thagravenh 2000 p 323]

Another micro-typographic technique which has always been extremely difficultto achieve in TEX is robust and hyphenatable letterspacing (tracking)1 Whereasletterspacing can easily be and often is abused when applying it to lowercaseletters readability may be increased by slightly letterspacing (small) capitals or bydecreasing the tracking of very large uppercase type

Setting additional kerning for individual characters is especially (but not only)useful for languages whose typographical tradition requires certain characters to beseparated by a space For example it is customary in French typography to add asmall space before question mark exclamation mark and semi-colon and a biggerspace before the colon and the guillemets Until now this could only be achieved

1 The soul package undertakes great efforts but may still fail in certain circumstances even to systemat-ically adjust the tracking of a font throughout the document remains impossible

GETTING STARTED 5

by making these characters active (as is done for example by the babel package)which may not always be a robust solution In contrast to the standard kerningbuilt into the fonts (which will of course apply as usual) this additional kerningrelates to single characters not to character pairs

Adjustment of interword spacing is based upon the idea that in order to achievea uniform greyness of the text the space between words should also depend onthe surrounding characters For example if a word ends with an lsquorrsquo the followingspace should be a tiny bit smaller than that following say an lsquomrsquo You can thinkof this concept as an extension to TEXrsquos lsquospace factorsrsquo This feature may enhancethe appearance of paragraphs even more Emphasis in the last sentence is onthe word lsquomayrsquo this extension is still highly experimental ndash in particular onlyending characters will currently influence the interword space Also the settingsshipped with microtype are but a first approximation and I would highly welcomecorrections and improvements I suggest reading the reasoning behind the settingsin section 159

The possibility finally to disable all or selected ligatures is particularly useful fortypewriter fonts

The microtype package provides an interface to all these micro-typographic exten-sions All micro-typographic aspects may be customised to your taste and needs ina straight-forward and systematic manner The next chapters present a survey ofall options and customisation possibilities Should the micro-typographic extensiondiscussed in a section work only with certain TEX engines this requirement ismarked inside a grey text box on the right

2 Getting startedThere is nothing surprising in loading this package

usepackagemicrotype

This will be sufficient in most cases and if you are not interested in fine-tuningthe micro-typographic appearance of your document (however unlikely this wouldseem since using this package is proof of your interest in typographic issues) youmay actually skip the rest of this document If this on the other hand does notsatisfy you ndash be it for theoretical or practical reasons ndash this manual will guide youon the path to the desired results along the following milestones

bull Enable the desired micro-typographic features either via the respective packageoption or with the microtypesetup command (section 3)

bull Select the fonts to which this feature should be applied by declaring and activatinglsquosets of fontsrsquo A number of sets are predefined which may be activated directly inthe package options (section 4)

bull Fine-tune the micro-typographic settings of the fonts or sets of fonts (section 5)

bull If yoursquore of the kind who always wants to march on you will certainly be interestedin the possibility of context-sensitive setup (section 6)

bull You are even countenanced to leave the path of typographic virtue and steal somesheep (section 7) or trespass in other ways (section 8)

bull Should you encounter any obstacles follow the hints and caveats (section 9)

OPTIONS 6

3 OptionsLike many other LATEX packages the microtype package accepts options in thewell-known key=value syntax In the following you will find a description of allkeys and their possible values (lsquotruersquo may be omitted multiple values whereallowed must be enclosed in braces the default value is shown on the right ndashif preceded by an asterisk this default only applies when running an up-to-datepdfTEX in PDF mode)

31 Enabling the micro-typographic featurestrue false compatibility nocompatibility langfont set namerang trueprotrusion

These are the main options to control the level of micro-typographic refinementexpansionwhich the fonts in your document should gain By default the package is moderatelygreedy character protrusion will always be enabled font expansion will only bedisabled when the fonts cannot be expanded automatically that is with pdfTEXversions older than 120 or in DVI output mode (see section 35) or with XETEX Inother words microtype will try to apply as much micro-typography as can safely beexpected to work under the respective conditions (hence it is usually not necessaryto load the package with different options eg for PDF resp DVI mode)

Protrusion and expansion may be enabled or disabled independently from eachother by setting the respective key to true resp false The activate option is aactivateshortcut for setting both options at the same time Therefore the following linesall have the same effect (when creating PDF files with a recent version of pdfTEX)

usepackage[protrusion=trueexpansion]microtype

usepackage[activate=truenocompatibility]microtype

usepackagemicrotype

With activated font expansion andor character protrusion line breaks (and con-sequently page breaks) may turn out differently If this is not desired ndash because youare re-typesetting a book whose pagination must not change ndash you may pass thevalue compatibility to the protrusion andor expansion options Typographicallyhowever the results will be suboptimal hence the default value is nocompatibility

Finally you may also specify the name of a font set to which character protrusionandor font expansion should be restricted See section 4 for a detailed discussionSpecifying a font set for a feature implicitly activates this feature

true false langfont set namerang falsetracking

This option will systematically change the tracking of the fonts specified in theactive font set (by default all small capitals) It is not available with XETEX (youmay use the lsquoLetterSpacersquo option of the fontspec package instead) With pdfTEXit is only available in PDF mode

true false langfont set namerang falsekerning

These features do not unconditionally improve the quality of the typeset text thespacingspacing feature is still considered experimental while the kerning feature onlymakes sense in special cases Therefore neither feature is enabled by default Theyare not available with XETEX or LuaTEX

OPTIONS Character protrusion 7

Table 1

Availability of micro-typographic features

TEX engine Micro-typographic features

Engine Version Output Protrusion Expansion Tracking Kerning Spacing

manual automatic

pdfTEX lt 014f DVIPDF empty empty empty empty empty emptyge 014f DVIPDF AElig empty empty empty emptyge 120 DVI AElig empty empty empty empty

PDF AElig AElig empty empty emptyge 140 DVI AElig empty empty

PDF AElig AElig

LuaTEX ge 030 DVI AElig empty empty empty emptyPDF AElig AElig empty empty empty

ge 062 DVI AElig empty ()a empty emptyPDF AElig empty AElig empty empty

XETEX ge 09997 PDF AElig empty empty empty empty empty

AElig = enabled = not enabled empty = not available a by means of variable tracking

Table 1 presents an overview of which micro-typographic features are availableand enabled by default for the relevant TEX versions and output modes

Whether ligatures should be disabled cannot be controlled via a package optionbut by using the DisableLigatures command which is explained in section 8

32 Character protrusion pdfTEX 014f | LuaTEX 030 | XETEX 09997

langintegerrang 1000factor

Using this option you can globally increase or decrease the amount by which thecharacters will be protruded While a value of 1000 means that the full protrusionas specified in the configuration (see section 51) will be used a value of 500 wouldresult in halving all protrusion factors of the configuration This might be useful ifyou are generally satisfied with the settings but prefer the margin kerning to beless or more visible (eg if you are so proud of being able to use this feature thatyou want everybody to see it or ndash to mention a motivation more in compliancewith typographical correctness ndash if you are using a large font that calls for moremodest protrusion)

character langdimensionrang characterunit

This option is described in section 51 apropos the command SetProtrusion Usewith care

33 Font expansion pdfTEX 014f | LuaTEX 030

true false trueauto

Beginning with pdfTEX version 120 (inherited by LuaTEX) the expanded instancesof the fonts may be calculated automatically and at run-time instead of the user

OPTIONS Tracking 8

having to prepare them in advance This option is true by default provided that youare using a TEX engine with this capability and the output mode is PDF2 If auto isset to false the font instances for all expansion steps must exist (with files calledlangfont namerangplusmnlangexpansion valuerang eg cmr12+10 as described in the pdfTEX manual)With recent versions of LuaTEX expansion is always automatic

When generating DVI files font expansion has to be enabled explicitly WithpdfTEX automatic font expansion will not work because the postprocessing drivers(dvips dvipdfm etc) resp the DVI viewer are not able to generate the fonts on thefly With LuaTEX on the other hand expansion in DVI mode is realised by modifyingthe inter-letter spacing (tracking) instead of the glyphs themselves which may ormay not be desired

langintegerrang 20stretch

You may specify the stretchability and shrinkability of a font ie the maximumshrinkamount that a font may be stretched or shrunk The numbers will be divided by1000 so that a stretch limit of 10 means that the font may be expanded by upto 1 The default stretch limit is 20 The shrink limit will by default be the sameas the stretch limit

langintegerrang 1step

Fonts are not expanded by arbitrary amounts but only by certain discrete stepswithin the expansion limits With recent versions of pdfTEX (140 or newer) orLuaTEX this option is by default set to 1 in order to allow trying the maximumnumber of font instances and hence to guarantee the best possible output3 OlderpdfTEX versions however had to include every font instance in the PDF file whichmay increase the file size quite dramatically Therefore in case you are using apre-140 pdfTEX version step is by default set to one fifth of the smaller value ofstretch and shrink

true false falseselected

When applying font expansion it is possible to restrict the expansion of somecharacters that are more sensitive to deformation than others (eg the lsquoOrsquo incontrast to the lsquoIrsquo) This is called selected expansion and its usage allows increasingthe stretch and shrink limits (to say 30 instead of 20) however the gain is limitedsince at the same time the average stretch variance will be decreased Thereforethis option is by default set to false so that all characters will be expanded by thesame amount See section 52 for a more detailed discussion

34 Tracking pdfTEX 140 | LuaTEX 062

langintegerrang 100letterspace

This option changes the default amount for tracking (see section 53) resp letter-spacing (see section 7) The amount is specified in thousandths of 1em admissiblevalues are in the range of minus1000 to +1000

2 With pdfTEX automatic font expansion does not work with bitmap fonts Therefore if you are using theComputer Modern Roman fonts in T1 encoding you should either install the cm-super package or usethe Latin Modern fonts (package lmodern)

3 The downside with this default is that pdfTEX may run out of memory with huge documents in thiscase read about the error messages in the lsquoHints and caveatsrsquo section (9) or try with a larger step

OPTIONS Miscellaneous options 9

35 Miscellaneous optionstrue false falsedraft

If the draft option is passed to the package all micro-typographic extensions willfinalbe disabled which may lead to different line and hence page breaks The draftand final options may also be inherited from the class options of course you canoverride them in the package options Eg if you are using the class option draftto show any overfull boxes you should load microtype with the final option

true false errors silent falseverbose

Information on the settings used for each font will be written into the log file ifyou enable the verbose option When microtype encounters a problem that is notfatal (eg an unknown character in the settings or non-existent settings) it willby default only issue a warning and try to continue Loading the package withverbose=errors will turn all warnings into errors so that you can be sure that noproblem will go unnoticed If on the other hand you have investigated all warningsand decide to ignore them you may silence microtype with verbose=silent

true false falsebabel

Loading the package with the babel option will adjust the typesetting according tothe respective selected language Read section 6 for further information

langfile namerang microtypeconfig

Various settings for this package will be loaded from a main configuration file bydefault microtypecfg (see section 57) You can have a different configuration fileloaded instead by specifying its name without the extension eg config=mycrotype

true false falseDVIoutput

pdfTEX and LuaTEX are not only able to generate PDF output but can also spit outDVI files In fact all recent TEX systems are using pdfTEX as the default enginealso for DVI output and LuaTEX too can be called in DVI mode However sincechanging the output mode inside the document may have undesired effects thisoption should be considered deprecated instead it is recommended to just callthe respective program (latex resp dvilualatex) For XETEX this option is notapplicable

36 Changing options laterlangkey = value listrangmicrotypesetup

Inside the preamble this command accepts all package options described above(except for config) In the document body this command may be used to changethe general settings of the micro-typographic extensions It then accepts all optionsfrom section 31 expansion protrusion and activate which in turn may receivethe values true false compatibility or nocompatibility and tracking kerningand spacing with the admissible values true or false Passing the name of a fontset is not allowed Using this command you could for instance temporarily disablefont expansion by saying

microtypesetupexpansion=false

SELECTING FONTS FOR MICRO-TYPOGRAPHY 10

4 Selecting fonts for micro-typographyBy default character protrusion will be applied to all text fonts used in the docu-ment and a basic set of fonts will be subject to font expansion You may want tocustomise which fonts should get the benefit of micro-typographic treatment Thiscan be achieved by declaring and activating lsquofont setsrsquo these font sets are specifiedvia font attributes that have to match

[langfeaturesrang] langset namerang langset of fontsrangDeclareMicrotypeSet

This command declares a new set of fonts to which the micro-typographic exten-DeclareMicrotypeSetsions should be applied The optional argument may contain a comma-separatedlist of features to which this set should be restricted The starred version of thecommand declares and activates the font set at the same time

The set of fonts is specified by assigning values to the NFSS font attributes encod-ing family series shape and size (cf LATEX 2ε font selection) Letrsquos start with anexample In the main configuration file microtypecfg a font set called lsquobasictextrsquois defined as follows

DeclareMicrotypeSetbasictext encoding = OT1T1T2ALY1OT4QXT5EU1EU2TU family = rmsf series = md size = normalsizefootnotesizesmalllarge

If you now call

UseMicrotypeSet[protrusion]basictext

in the documentrsquos preamble only fonts in the text encodings roman or sansserif families normal (or lsquomediumrsquo) series and in sizes called by normalsizefootnotesize small or large will be protruded Math fonts on the other handwill not since they are in another encoding Neither will fonts in bold face or hugefonts Etc

If an attribute list is empty or missing ndash like the lsquoshapersquo attribute in the aboveexample ndash it does not constitute a restriction In other words this is equivalentto specifying all possible values for that attribute Therefore the predefined setlsquoalltextrsquo which is declared as

DeclareMicrotypeSetalltext encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU

is far less restrictive The only condition here is that the encoding must matchIf a value is followed by an asterisk (like lsquormrsquo and lsquosfrsquo in the first example)

it does not designate an NFSS code but will be translated into the documentrsquoslangvaluerangdefault eg rmdefault4 A single asterisk means langattributerangdefaulteg encodingdefault respectively normalsize for the size axis Sizes may eitherbe specified as a dimension (lsquo10rsquo or lsquo10ptrsquo) or as a size selection command withoutthe backslash You may also specify ranges (eg lsquosmall-Largersquo) while the lower

4 These translations will take place AtBeginDocument which means that changes to the defaults inside thepreamble will also be taken into account Only in cases where you change font defaults AtBeginDocumentyourself you need to load microtype after these changes

SELECTING FONTS FOR MICRO-TYPOGRAPHY 11

Table 2

Predefined font sets

Set name Font attributes

Encoding Family Series Shape Size

all empty empty empty empty empty

alltext(allmath)

Text encodings TS1(OML OMS U)

empty empty empty empty

alltext-nott(allmath-nott)

Text encodings TS1(OML OMS U)

rmsf

empty empty empty

basictext(basicmath)

Text encodings(OML OMS)

rmsf

md empty normalsizefootnotesizesmall large

smallcaps Text encodings empty empty scsiscit empty

footnotesize Text encodings TS1 empty empty empty -small

scriptsize Text encodings TS1 empty empty empty -footnotesize

normalfont encoding family series shape normalsize

lsquoText encodingsrsquo = OT1 T1 T2A LY1 OT4 QX T5 EU1 EU2 TU lsquo rsquo = lsquo defaultrsquo

boundary is included in the range the upper boundary is not Thus lsquo12-16rsquo wouldmatch 12 pt 135 pt and 15999 pt for example but not 16 pt You are allowed toomit the lower or upper bound (lsquo-10rsquo lsquolarge-rsquo)

Additionally to this declaration scheme you can add single fonts to a set usingthe lsquofontrsquo key which expects the concatenation of all font attributes separated byforward slashes ie lsquofont = langencodingranglangfamilyranglangseriesranglangshaperanglangsizerangrsquo This allowsyou to add fonts to the set that are otherwise disjunct from it For instance if youwanted to have the roman family in all sizes protruded but only the normal sizedpossibly italic typewriter font (in contrast to say the small one) this is how youcould declare the set

DeclareMicrotypeSet[protrusion] myset encoding = T1 family = rm font = T1ttmn T1ttmit

As you can tell from the example the asterisk notation is also permitted for thefont key A single asterisk is equivalent to lsquorsquo ie the normal font Sizeselection commands are possible too however ranges are not allowed

Table 2 lists the eleven predefined font sets They may also be activated by passingtheir name to the feature options protrusion expansion tracking kerning andspacing when loading the package for example

usepackage[protrusion=allmathtracking=smallcaps]microtype

MICRO FINE TUNING 12

[langfeaturesrang] langset namerangUseMicrotypeSet

This command activates a font set previously declared by DeclareMicrotypeSetUsing the optional argument you can limit the application of the set to one ormore features This command only has an effect if the feature was activated in thepackage options

[langfeaturesrang] langset namerangDeclareMicrotypeSetDefault

If a feature is enabled but no font set has been chosen explicitly the sets declared bythis command will be activated By default the lsquoalltextrsquo font set will be activatedfor character protrusion and additional kerning the lsquoalltext-nottrsquo set for fontexpansion and interword spacing and the lsquosmallcapsrsquo set for tracking

These commands may only be used in the preamble or in the main configuration fileTheir scope is global to the document Only one set per feature may be activated

5 Micro fine tuningEvery character asks for a particular protrusion kerning or spacing amount Itmay also be desirable to restrict the maximum expansion of certain charactersFurthermore since every font looks different settings have to be specific to afont or set of fonts This package offers flexible and straight-forward methods ofcustomising these finer aspects of micro-typography

All fine-tuning commands follow basically the same syntax they all take threearguments the first one is optional and may contain additional options in thesecond argument you specify the set of fonts to which the settings should apply thethird argument contains the actual settings Here as in all configuration commandsall spaces are ignored

The set of fonts to which the settings should apply is declared using the samesyntax of langfont axisrang = langvalue listrang pairs as for the command DeclareMicrotypeSet(see section 4) with the only difference that values including asterisks (which asyou may recall stand for the respective default) will be translated immediatelyinstead of at the end of the preamble To find the matching settings for a givenfont the package will try all combinations of font encoding family series shapeand size with decreasing significance in this order For instance if settings exist forboth the current family (say T1cmr) and for italic fonts in the normal weight(T1mit) the settings for the cmr family would apply The encoding must alwaysmatch

The characters may be specified either as a single letter (A) as a text sym-bol command (textquoteleft) or as a slot number (resp Unicode number forLuaTEX or XETEX) three or more digits for decimal notation prefixed with forhexadecimal with rsquo for octal numerals (eg the lsquoflrsquo ligature in T1 encoding 0291D rsquo35) 8-bit (and even UTF-8) characters may be entered directly or in LATEXrsquostraditional 7-bit notation both A and Auml are valid provided the character is ac-tually declared in both the input and the font encoding With LuaTEX or XETEXyou may additionally specify a (font-specific) glyph name prefixed with lsquorsquo (egthe lsquoflrsquo ligature as f_l) Note that you also have the possibility to declare lists ofcharacters that should inherit settings (see section 56)

MICRO FINE TUNING Character protrusion 13

51 Character protrusion pdfTEX 014f | LuaTEX 030 | XETEX 09997

[langoptionsrang] langset of fontsrang langprotrusion settingsrangSetProtrusion

Using this command you can set the protrusion factors for each character of a fontor a set of fonts A very incomplete example would be the following

SetProtrusion encoding = T1 family = cmr A = 5050 textquoteleft = 700

which would result in the character lsquoArsquo being protruded by 5 of its width onboth sides and the left quote character by 70 of its width into the left marginThis would apply to all font shapes series and sizes of the T1 encoded ComputerModern Roman family

The protrusion settings consist of langcharacterrang = langprotrusion factorsrang pairs The pro-trusion factors designate the amount that a character should be protruded intothe left margin (first value) respectively into the right margin (second value) Bydefault the values are relative to the character widths so that a value of 1000means that the character should be shifted fully into the margin while for examplewith a value of 50 it would be protruded by 5 of its width Negative values areadmitted as well as numbers larger than 1000 (but effectively not more than 1emof the font) You may omit either number if the character should not be protrudedon that side but must not drop the separating comma

Options

name You may assign a name to the protrusion settings so that you are able toload it by another list

load You can load another list (provided you assigned a name to it) before thecurrent list will be loaded so that the fonts will inherit the values from the loadedlist

In this way the configuration may be simplified considerably You can for instancecreate a default list for a font settings for other shapes or series can then load thesesettings and extend or overwrite them (since the value that comes last will take pre-cedence) Font settings will be loaded recursively The following options will affectall loaded lists in other words any options from the loaded lists will be ignored

factor This option can be used to influence all protrusion factors of the listoverriding any global factor setting (see section 32) For instance if you wantfonts in larger sizes to be protruded less you could load the normal lists just witha different factor applied to them

SetProtrusion [ factor = 700 load = cmr-T1 ] encoding = T1 family = cmr size = large-

MICRO FINE TUNING Font expansion 14

unit By default the protrusion factors are relative to the respective characterrsquoswidth The unit option may be used to override this and make microtype regardall values in the list as thousandths of the specified width Issuing for instancelsquounit=1emrsquo would have the effect that a value of say 50 now results in the characterbeing protruded by 5 of an em of the font (thus simulating the internal measuringof pdfTEXrsquos lpcode and rpcode primitives) The default behaviour can be restoredwith unit=character5

preset Presets the protrusion codes of all characters to the specified values(=langleftranglangrightrang) possibly scaled by a factor A unit setting will only be takeninto account if it is not =character

inputenc Selects an input encoding that should apply to this list regardless ofwhat the documentrsquos input encoding is You may specify any encoding that can beloaded via the inputenc package eg ansinew koi8-r utf8

context The scope of the list may be limited to a certain context For furtherdetails see section 6

52 Font expansion pdfTEX 014f | LuaTEX 030

[langoptionsrang] langset of fontsrang langexpansion settingsrangSetExpansion

By default all characters of a font are allowed to be stretched or shrunk by the sameamount However it is also possible to limit the expansion of certain characters ifthey are more sensitive to deformation This is the purpose of the SetExpansioncommand Note that it will only have an effect if the package has been loadedwith the selected option (cf section 33) Otherwise the expansion settings willbe ignored ndash unlike the options in the optional first argument which will still beevaluated If the selected option has been set to true and settings for a font donrsquotexist font expansion will not be applied to this font at all Should the extraordinarysituation arise that you want to employ selected expansion in general but for aparticular font (set) all characters should be expanded or shrunk by the sameamount you would have to declare an empty list for these fonts

The expansion settings consist of langcharacterrang = langexpansion factorrang pairs You mayspecify one number for each character which determines the amount that a charac-ter may be expanded The numbers denominate thousandths of the full expansionFor example if you set the expansion factor for the character lsquoOrsquo to 500 it will onlybe expanded or shrunk by one half of the amount that the rest of the characterswill be expanded or shrunk While the default value for character protrusion is 0 ndashthat is if you didnrsquot specify any characters none would be protruded ndash the defaultvalue for expansion is 1000 which means that all characters would be expandedby the same amount

Options

name load preset inputenc context Analogous to SetProtrusion the optionalargument may be used to assign a name to the list to load another list to preset

5 The unit option can even be passed globally to the package (cf section 32) However all providedsettings are created under the assumption that the values are relative to the character width Thereforeyou should only change it if you are certain that the default settings will not be used in your document

MICRO FINE TUNING Tracking 15

all expansion factors to set the input encoding or to determine the context of thelist (expansion contexts are only possible with pdfTEX version 1404 or newer)

auto stretch shrink step These keys can be used to override the global set-tings from the package options (see section 33) If you donrsquot specify either one ofstretch shrink and step their respective global value will be used (that is nocalculation will take place)

As a practical example suppose you have a paragraph containing a widow thatcould be avoided by shrinking the font a bit more In conjunction with the contextoption (see section 6 for further details) you could thus allow for more expansionin this particular paragraph

SetExpansion [ context = sloppy stretch = 30 shrink = 60 step = 5 ] encoding = OT1T1TS1 END PREAMBLEmicrotypecontextexpansion=sloppy This paragraph contains a `fussy widow

This method of employing contexts to temporarily apply different expansion para-meters only works with pdfTEX version 1404 or later6 or with LuaTEX Also notethat both pdfTEX and LuaTEX prohibit the use of fonts with different expansionlimits or steps (even of different fonts) within one paragraph hence the sloppycontext would have to be applied to complete paragraphs

factor This option provides a different method to alter expansion settings forcertain fonts working around the restriction just mentioned The factor optioninfluences the expansion factors of all characters (in contrast to the overall stretch-ability) of the font For instance if you want the italic shape to be expanded lessyou could declare

SetExpansion [ factor = 500 ] encoding = shape = it

The factor option can only be used to decrease the stretchability of the charactersthat is it may only receive values smaller than 1000 Also it can only be used forsingle fonts or font sets setting it globally in the package options wouldnrsquot makemuch sense ndash to this end you use the packagersquos stretch and shrink options

53 Tracking pdfTEX 140 | LuaTEX 062

[langoptionsrang] langset of fontsrang langtracking amountrangSetTracking

An important typographic technique ndash which was missing in TEX for a long time ndash isthe adjustment of tracking ie the uniform addition or subtraction of letter space

6 For older versions a dirty trick is laid out in section 142 on page 59

MICRO FINE TUNING Tracking 16

tofrom all the characters in a font For example it is good typographic practiceto slightly space out text set in all capitals or small capitals (as in this document)Legibility may also be improved by minimally increasing the tracking of smallerand decreasing that of larger type7 The SetTracking command allows specifyingthe tracking amount for different fonts or font sets It will also be evaluated by thetextls command which may be used for letterspacing shorter pieces of text (seesection 7)

The tracking amount is specified in thousandths of 1em (or the given unit)negative values are allowed too

Options

name unit context These options serve the same functions as in the previousconfiguration commands The unit may be any dimension default is 1em

spacing When the inter-letter spacing is altered the inter-word spacing probablyalso needs to be adjusted This option expects three numbers for interword spacestretch and shrink respectively which are given in thousandths of 1em (or of thecurrent unit) If a value is followed by an asterisk it denotes thousandths of therespective font dimension which will be added to it For instance with

SetTracking[ spacing = 25166 ] encoding = shape = sc 25

the interword space will be increased by 25 the stretch amount will be set to0166em while the shrink amount will be left untouched If you donrsquot specifythe spacing option the interword space will be scaled by the current letterspaceamount (as in the above example) while stretch and shrink will not be changed

outer spacing If an interword space immediately precedes or follows letter-spaced text it will by default be equal to that within the text With this optionwhich accepts the same values as spacing it may be adjusted independently

outer kerning If on the other hand no interword space precedes or followsyou may still want to slightly set off the first and last letter from adjoining lettersThis option expects the kerning amounts for left and right hand side separated bya comma in thousandths of 1em (or the current unit) If a value is followed byan asterisk it denotes thousandths of the current letterspacing amount A singleasterisk means lsquo500rsquo this is also the default ie the sum of the outer kerns is bydefault equal to the current letterspace amount To remove kerning on both sidesyou would write lsquoouter kerning=00rsquo

no ligatures By default ligatures in letterspaced fonts will be constructed asusual which may be advisable when changing the tracking by only a small amountFor larger letterspacing amounts on the other hand the normal letter space withinligatures would have displeasing e ff e c t s This key expects a comma-separatedlist of characters for which ligatures should be disabled only the character thatbegins a ligature must be specified If the key is given without a value all ligaturesof the font will be disabled With pdfTEX this is not recommended however sinceit entails that kerning will be switched off too With LuaTEX there is no suchlimitation The default settings disable ligatures for the character lsquofrsquo only ie lsquoffrsquo

7 With full-featured fonts like Computer Modern this is usually not necessary though since they come inoptical sizes and the tracking of the small-capitals font is already adjusted

MICRO FINE TUNING Tracking 17

lsquofirsquo ffirsquo etc8 In exceptional situations you can manually break up a ligature byinserting lsquokern0ptrsquo resp babelrsquos | shortcut or protect it by enclosing it inlslig (see section 7)

Since a picture is worth a thousand words probably even more if in our case itdepicts a couple of letterspaced words letrsquos bring one to sum up these somewhatconfusing options Suppose you had the following settings (which are in no wayrecommended they only serve illustrative purposes)

SetTracking [ no ligatures = f spacing = 600-100 outer spacing = 450250150 outer kerning = ] encoding = 160

and then write

Stop textlsstealing sheep

this would be the (typographically dubious) outcomeClick on the image to show thekerns and spacings involvedClick on emphasised words inthe text below to reveal therelation of image and code

If you had a PDF viewer thatunderstands PDF 15 youcould hide the arrows select-ively

Stop T e a l i n g s h e e pWhile the word lsquoStoprsquo is not letterspaced the space between the letters in the othertwo words is expanded by the tracking amounttracking amounttracking amount of 1601000em = 016em Theinner spaceinner spaceinner space within the letterspaced text is increased by 60 while its stretchstretchstretch amountis decreased by 10 and the shrinkshrinkshrink amount is left untouched The outer spaceouter spaceouter space (of045em) immediately before the piece of text may stretchstretchstretch by 025em and shrinkshrinkshrinkby 015em Note that there is no outer space after the text since the exclamationmark immediately follows instead the default outer kernouter kernouter kern of half the letterspaceamount (008em) is added Furthermore one ligatureligatureligature wasnrsquot broken up becausewe neglected to specify the lsquosrsquo in the no ligatures key

As another more realistic example suppose you want to space out all small capitalsby 501000em fonts smaller than small by 002em and to decrease the trackingof large type by 002em This could be achieved with the following settings

usepackage[tracking=true]microtypeDeclareMicrotypeSet[tracking]my encoding = size = -smallLarge- font = sc SetTracking[ no ligatures = f ] encoding = shape = sc 50 SetTracking encoding = size = -small 20 SetTracking encoding = size = Large- -20

Letterspaced fonts for which settings donrsquot exist will be spaced out by the default of01em (adjustable with the package option letterspace see section 35) Suppose

8 With pdfTEX versions older than 1404 all ligatures and hence all kerning will be disabled It istherefore recommended to use at least version 1404

MICRO FINE TUNING Additional kerning 18

your editor wants you to shorten your 1000-pages chef-drsquoœuvre by a handful ofpages you could load microtype with (fingers crossed)

usepackage[tracking=alltextletterspace=-40]microtype

54 Additional kerning pdfTEX 140

[langoptionsrang] langset of fontsrang langkerning settingsrangSetExtraKerning

With this command you can fine tune the extra kerning In contrast to standardkerning which is always associated with a pair of characters and to trackingwhich specifies the space between all characters of a font the extra kerning relatesto single characters that is whenever a particular character appears in the textthe specified kerning will be inserted regardless of which character precedes respfollows it (Put differently this feature allows modifying the left or right sidebearingsof specific glyphs)

It should not be neglected to mention a limitation of this feature words imme-diately following such a kern (not separated by a space) will not be hyphenatedunless you insert the breakpoints manually eg for kerning after the apostrophelsquolrsquoapos-trophersquo Furthermore additional kerning will not be applied in mathmode These restrictions of pdfTEX will hopefully be lifted some time

The kerning settings are specified as pairs of langcharacterrang = langkerning valuesrang wherethe latter consist of two values the kerning added before the character and thekerning appended after the respective character Once again either value may beomitted but not the separating comma

Options

name load factor preset inputenc These options serve the same function asin the previous configuration commands

unit Admissible values are space character and a langdimensionrang By default thevalues denote thousandths of 1em

context When it comes to kerning settings this option is especially useful sinceit allows applying settings depending on the current language

For example you can find the following settings intended to be used for documentswritten in French in the main configuration file

SetExtraKerning [ name = french-default context = french unit = space ] encoding = OT1T1LY1 = 1000 = fontdimen2 = 500 ~ thinspace = 500 = 500

What is the result of these settings If they are active like in the current paragrapha thin space will be inserted in front of each question mark exclamation mark and

MICRO FINE TUNING Interword spacing 19

semicolon a normal space in front of the colon Read section 6 to learn how toactivate these settings This paragraph was input like this

beginmicrotypecontextkerning=french What is the result of these settings If they are active like in the current paragraph a thin space will be inserted in front of each question mark exclamation mark and semicolon a normal space in front of the colon Read section~refseccontext to learn how to activate these settings This paragraph was input like thisendmicrotypecontext

55 Interword spacing pdfTEX 140

[langoptionsrang] langset of fontsrang langspacing settingsrangSetExtraSpacing

This command allows you to fine tune the interword spacing (also known as glue)A preliminary remark on what a lsquospacersquo is may be in order between two wordsTEX will insert a so called glue which is characterised by three parameters ndash thenormal distance between two words the maximum amount of space that may beadded to it and the maximum amount that may be subtracted The latter twoparameters come into effect whenever TEX tries to break a paragraph into lines anddoes not succeed it can then stretch or shrink the spaces between words Thesethree parameters are specific to each font

On top of these glue dimensions TEX has the concept of lsquospace factorsrsquo Theymay be used to increase the space after certain characters most prominently thepunctuation characters pdfTEXrsquos additional spacing adjustment may be consideredas an extension to space factors with much finer control while space factorswill influence all three parameters of interword space (or glue) by the sameamount ndash the kerning the maximum amount that the space may be stretched andthe maximum amount that it may be shrunk ndash you may modify these parametersindependently from one another Furthermore the values may be set differentlyfor each font And probably most importantly the parameters may not only beincreased but also decreased Note that when interword spacing adjustment is ineffect space factors are ignored

The spacing settings are declared as pairs of langcharacterrang = langspacing factorsrang wherethe latter consist of three numbers first the additional kern inserted after thischaracter if it appears before an interword space second the additional stretchamount and third the additional shrink amount All values may also be negativein which case the dimensions will be decreased Not all values have to be specifiedbut the settings must always contain the two separating commas

Options

name load factor preset inputenc context These options serve the same func-tion as in the previous configuration commands

unit You can specify the unit by which the specified numbers are measuredPossible values are character a langdimensionrang and additionally space The latterwill measure the values in thousandths of the respective space dimension set bythe font By default the unit is measured by the space dimensions For examplewith the following (nonsensical) settings

MICRO FINE TUNING Character inheritance 20

SetExtraSpacing [ unit = space ] default font = = 100010001000

the space inserted after a full stop would be doubled (technically speaking 2 timesfontdimen 2) as would the maximum stretch and shrink amounts of the interwordspace (fontdimen3 and 4) Conversely setting all three values to minus1000 wouldcompletely cancel a space after the respective character

56 Character inheritance[langfeaturesrang] langset of fontsrang langinheritance listsrangDeclareCharacterInheritance

In most cases accented characters should inherit the settings from the respectivebase character For example all of the characters Agrave Aacute Acirc Atilde Auml Aring and A shouldprobably be protruded by the same (absolute) amount as the character A Usingthe command DeclareCharacterInheritance you may declare such classes ofcharacters so that you then only have to set up the respective base character Withthe optional argument which may contain a comma-separated list of featuresyou can confine the scope of the list Additionally it accepts the inputenc key toset the input encoding for this list The font set can be declared in the usual wayThe inheritance lists are declared as pairs of langbase characterrang = langlist of inheritingcharactersrang Unless you are using a different encoding or a very peculiarly shapedfont there should be no need to change the default character inheritance settings

The situation is different with LuaTEX and XETEX however the default inherit-ance settings only contain those glyhps that can safely be assumed to exist in anyfont but since OpenType fonts may contain many more glyphs for different scripts(languages) it is quite probable that font-specific settings are necessary whichshould be specified in the fontrsquos configuration file (see next section)

57 Configuration filesThe default configuration consisting of inheritance settings declarations of font setsand alias fonts and generic protrusion expansion spacing and kerning settings willbe loaded from the file microtypecfg You may extend this file with custom settings(or load a different configuration file with the lsquoconfigrsquo option see section 35)

If you embark on creating new settings for a font family you should put theminto a separate file whose name must be lsquomt-langfont familyrangcfgrsquo (eg lsquomt-cmrcfgrsquoany spaces in the font name should be removed eg lsquomt-MinionProcfgrsquo) andmay contain all commands described in the current section 5 These files will beloaded automatically if you are actually using the respective fonts This packageships with configuration files for a number of font families Table 3 lists them all

langlist of suffixesrangDeclareMicrotypeVariants

On its search for a configuration file the package will also try to remove fromDeclareMicrotypeVariantsthe font name a suffix of one or more letters that denotes a lsquovariantrsquo of the basefont (cf Karl Berryrsquos Fontname) It is thus possible to put settings for eg thefonts pplx (expert set) pplj (oldstyle numerals) and ppl (plain) into one and the

MICRO FINE TUNING Configuration files 21

Table 3

Fonts with tailored protru-sion settings

Font family (NFSS code) Features

Type 1 fonts Encodings Shapes

Generic OT1 T1 T2A LY1 QX (TS1)a n (it sl sc)a

Computer Modern Roman (cmr)b OT1 OT4 T1 T2A T5 LY1 TS1 n it sl sc

Bitstream Charter (bch)c OT1 T1 T5 LY1 TS1 n it (sl)d sc

EB Garamonde OT1 T1 LY1 TS1 n it (sl)d sc

URW Garamond (ugm)f OT1 T1 TS1 n it

Bitstream Letter Gothic (blg)g OT1 T1 TS1 n it

Adobe Minion (pmnx pmnj) OT1 T1 T2A LY1 TS1 n it (sl)d sc si

Palatino (ppl pplx pplj)h OT1 OT4 T1 LY1 (TS1)a n it (sl)d sc

Times (ptm ptmx ptmj)i OT1 OT4 T1 LY1 QX (TS1)a n it (sl)d sc

Computer Modern math (cmsy cmm)j OMLOMS nit

AMS symbols (msa msb) U n

Euler (eur eus euf)k U n

Euro symbols (Adobe ITC marvosym) UOT1 n it

OpenType fonts Scripts Shapes

Generic Latin n (it sl sc)a

Latin Modern Romanl Latin Greek n it (sl)d

Charis SIL Latin Cyrillic Greek n it sc

Palatinom Latin n it sc

a Incompleteb Aliases Latin Modern Roman (lmr) ae (aer) zefonts (zer) eco (cmor) hfoldsty (hfor)

mlmodern (mlmr)c Aliases mathdesignCharter (mdbch) MicroPressrsquos chmath (chr) XCharterd Settings inherited from italic shapee Alias Adobe Garamond (pad padx padj)f Aliases mathdesignURW Garamond (mdugm) garamondx (zgmx zgmj)g Alias ulgothic (ulg)h Aliases pxfonts (pxr) qfontsQuasiPalatino TEX Gyre Pagella (qpl) newpx FPL Neu (fp9x fp9j)

domitiani Aliases txfonts (txr) qfontsQuasiTimes TEX Gyre Termes (qtm) newtx tempora step

stixstix2j Aliases Latin Modern (lmsy lmm) mlmodern (mlmsy mlmm)k Alias eulervm (zeur zeus)l Alias New Computer Modernm Aliases Palatino Linotype Palatino LT Std TEX Gyre Pagella Domitian

same file mt-pplcfg This command expects a comma-separated list of variantsuffixes The starred version appends the suffix(es) to the existing list The defaultdeclaration in microtypecfg is

DeclareMicrotypeVariantsxjwad01-LF-TLF-OsF-TOsF

langfont namerang langalias fontrangDeclareMicrotypeAlias

This command may be used for fonts that are very similar or actually the same (forinstance if you did not stick to the Berry naming scheme when installing a font)An example would be the Latin Modern fonts which are derived from ComputerModern so that it is not necessary to create new settings for them ndash you could say

CONTEXT-SENSITIVE SETUP 22

DeclareMicrotypeAliaslmrcmr

which would make the package whenever it encounters the font lmr and does notfind settings for it also try the font cmr In fact you will find this very line alongwith some others in the default configuration file

langfont namerangLoadMicrotypeFile

In rare cases it might be necessary to load a font configuration file manually forinstance from within another configuration file or to be able to extend settingsdefined in a file that would otherwise not be loaded automatically or would beloaded too late9 This command will load the file lsquomt-langfont namerangcfgrsquo

6 Context-sensitive setupThe microtype package also allows applying different micro-typographic settingsto the fonts depending on the context in which they occur This opens up the spacefor infinite possibilities of tweaking the documentrsquos appearance

langcontext assignmentsrangmicrotypecontext

This command may be used anywhere in the document (also in the preamble)to change the micro-typographic context in the current group To each feature(protrusion expansion (or activate as a shortcut for both) tracking spacingand kerning) one context may be assigned Consequently only settings with thecorresponding lsquocontextrsquo keyword will be applied

langcontext assignmentsrangbeginmicrotypecontext

endmicrotypecontext Like many LATEX commands it is also available in the form of an environment

langcontext assignmentsrang langgeneral textrangtextmicrotypecontext

As another possibility the command textmicrotypecontext sets the context(s)for the text given in the second argument

Suppose you want the footnote markers in the text to be protruded by a largeramount You could define settings for the numbers

SetProtrusion [ context = footnote ] font = scriptsize adapt if necessary 1 = 650 2 = 400 3 = 400 4 = 400 5 = 400 6 = 400 7 = 500 8 = 400 9 = 400 0 = 400

and have the context changed in the footnote marker command This commanddiffers among the various classes for the base classes eg article it would be

newcommandnewmakefnmarkhboxtextsuperscriptnormalfont microtypecontextprotrusion=footnotethefnmarkrenewcommandfootnotemark leavevmode ifhmodeedefxsfthespacefactornobreakfi newmakefnmark ifhmodespacefactorxsffi relax

9 Font package authors might also want to have a look at the hook MicrotypeHook described in theimplementation part section 1444

LETTERSPACING REVISITED 23

For the memoir class you would additionally have to disable auto-detection ofmultiple footnotes which prevents protrusion

renewcommandmakefnmarkhboxtextsuperscriptnormalfont microtypecontextprotrusion=footnotethefnmarkletmmmfpreparerelaxletmmmfcheckrelax

Another possibility would be to employ contexts for a language-dependent setupFor instance if you are writing a text in French you could add

microtypecontextkerning=french

to the preamble This would have the effect that kerning settings for the Frenchcontext would be applied to the document Should parts of the document be inEnglish you could write

textmicrotypecontextkerning=English text

to reset the context so that the punctuation characters in these parts will notreceive any extra kerning

Instead of adding these commands manually to your document you may alsoload microtype with the babel option (see section 35) The current language willthen be automatically detected and the contexts set accordingly

langlist of babel languagesrang langcontext listrangDeclareMicrotypeBabelHook

Naturally microtype does not know about the typographic specialties of everylanguage This command is a means of teaching it how to adjust the context when aparticular language is selected The main configuration file contains among othersthe following declaration

DeclareMicrotypeBabelHook frenchfrancaisacadiancanadien kerning=french spacing=

Consequently whenever you switch to the French language the kerning contextwill be changed to lsquofrenchrsquo and the spacing context will be reset This hook onlyhas an effect if the package was loaded with the babel option Currently microtypesupports French and Turkish kerning and English spacing (aka nonfrenchspacing)For unknown languages all contexts will be reset

7 Letterspacing revisited pdfTEX 140 | LuaTEX 062

[langamountrang] langgeneral textrangtextls

While the tracking feature described in section 53 will apply to sets of fontsyou may also want to letterspace shorter pieces of text regardless of the font inwhich they are typeset10 For such ad-hoc letterspacing microtype introduces twocommands that can be used (independently of whether the tracking option isenabled) in the same way as LATEXrsquos text commands textls ndash which also worksin math mode ndash expects the text in the mandatory argument while lsstyle willlsstyle

10 Letterspacing should be used cautiously in particular letterspacing lowercase text is held in abhorrenceby honourable typographers Unless you know what you are doing you should probably only letterspacecapitals or small capitals Another just cause may be emphasis in texts typeset in Fraktur fonts

DISABLING LIGATURES 24

switch on letterspacing for all subsequent fonts until the end of the current groupThe starred version of textls does not add any extra kerning before or aftertextlsthe text which may be useful eg for section titles By default each characterwill be spaced out by 1001000em = 01em this amount may be altered in theoptional argument to textls using the SetTracking command or globally withthe letterspace package option with decreasing significance in this order

langligatureranglslig

Since the commands textls and lsstyle will also evaluate the lsquono ligaturesrsquokey for the respective font you need not worry about protecting or breakingligatures with most fonts However in certain situations there may be a conflict ofligatures beginning with the same letter where some of them should be inhibitedwhile others should not When letterspacing text typeset in Fraktur fonts forexample the ligatures lsquochrsquo lsquockrsquo lsquotzrsquo and lsquoszrsquo (lsquoszligrsquo) should never be broken up youalso usually see the lsquostrsquo (lsquopermilrsquo) ligature in letterspaced text Furthermore at least theyfonts package realises the short s (lsquosrsquo) as the ligature lsquosrsquo On the other handthe lsquoctrsquo ligature and the other lsquolong srsquo ligatures often found in Fraktur fonts shouldbe suppressed There are two ways of solving this problem either donrsquot disablethe lsquosrsquo andor lsquocrsquo ligatures and break those that need to be broken up by insertinglsquokern0ptrsquo or babelrsquos | shortcut or disable them and protect those ligatures thatneed to be protected by enclosing them in the lslig command So the followingtwo solutions have the same result (namely lsquoAu s s i iexcl t s l o s i g k e i t rsquo with ligaturesshown in green inhibited ligatures in red)

SetTracking[no ligatures=f]encoding = LY family = yfrak120textfraklsstyle Ausskern0ptichtsloskern0ptigkeit

SetTracking[no ligatures=fsc]encoding = LY family = yfrak120textfraklsstyle Aulsligssilsligchtlsligslosigkeit

These three commands (plus the letterspace option described in section 34) areletterspacestyalso available with the alternative letterspace package which is in fact a muchstripped-down version of microtype omitting support for all the other extensions(and also omitting the possibilities of the SetTracking command ndash all lsquofrsquo ligatureswill be disabled inner and outer spacing and outer kerning will be set to the defaultvalues described in section 53) If you prefer to forgo microtypersquos specialties youmay load the letterspace package instead Both packages should not be used atthe same time

In contrast to microtype which requires LATEX the letterspace package alsoworks with eplain or even only miniltx for use with eplain load the packagewith usepackage inside the beginpackages endpackages environment withminiltx (which does not support package options) simply input letterspacesty

8 Disabling ligatures pdfTEX 130 | LuaTEX 030

[langcharactersrang] langset of fontsrangDisableLigatures

While completely disabling all ligatures of a font (which will also switch off kerningfor this font) purposely lowers the micro-typographic quality instead of raising

HINTS AND CAVEATS 25

it it is especially useful for typewriter fonts so that eg in a T1 encoded fontlsquotexttt--rsquo will indeed be printed as lsquo--rsquo not as lsquo-rsquo DisableLigatures maybe used to specify in the usual way a set of fonts for which ligatures should bedisabled for example of the typewriter font in T1 encoding

DisableLigaturesencoding = T1 family = tt

It is also possible to disable selected ligatures only The optional argument maycontain a comma-separated list of characters for which the ligature mechanismshould be inhibited

DisableLigatures[]encoding = T1 inhibit lsquo and lsquo but not fi ndash raquo etc

Only the character that begins the ligature(s) should be specified This commandmay only be used in the preamble and only once11

9 Hints and caveatsUse settings that match your font Although the default settings should give reas-onable results for most fonts the particular font you happen to be using may havedifferent character shapes that necessitate more or less protrusion In particularitalic letter shapes may differ wildly in different fonts hence I have decided againstproviding default protrusion settings for them The file test-microtypetex mightbe of some help when adjusting the protrusion settings for a font

Donrsquot use too large a value for expansion Font expansion is a feature that issupposed to enhance the typographic quality of your document by producing amore uniform greyness of the text block (and potentially reducing the number ofnecessary hyphenations) When expanding or shrinking a font too much the effectwill be turned into the opposite Expanding the fonts by more than 2 ie settinga stretch limit of more than 20 should be justified by a typographically trainedeye If you are so lucky as to be in the possession of multiple instances of a MultipleMaster font you may set expansion limits to up to 4

Donrsquot use font expansion for web documents (with older pdfTEX versions) WithpdfTEX versions older than 140 each expanded instance of the font will beembedded in the PDF file hence the file size may increase by quite a large factor(depending on expansion limits and step) Therefore courtesy and thriftiness ofbandwidth command it not to enable font expansion when creating files to bedistributed electronically With pdfTEX 140 and LuaTEX which use a differenttechnique of expansion the increase of file size can be neglected

You might want to disable protrusion in the Table of Contents In unfortunatesituations enabled protrusion might internally alter the line length in the TOC andsimilar lists in such a way that an excess leader dot will fit in The solution is totemporarily disable protrusion for the TOC

microtypesetupprotrusion=falsetableofcontentsmicrotypesetupprotrusion=true

11 With LuaTEX you have to load the fonts with the fontspec option lsquoRenderer=Basicrsquo

HINTS AND CAVEATS 26

You might want to disable protrusion in verbatim environments As you know bynow microtype will by default activate character protrusion for all fonts containedin the font set lsquoalltextrsquo This also includes the typewriter font Although it doesmake sense to protrude the typewriter font if it appears in running text (likefor example in this manual) this is probably not desirable inside the verbatimenvironment However microtype has no knowledge about the context that a fontappears in but will solely decide by examining its attributes Therefore you haveto take care of disabling protrusion in verbatim environments for yourself (thatis if you donrsquot want to disable protrusion for the typewriter font altogether byactivating say the font set lsquoalltext-nottrsquo) While the microtypesetup commandhas of course been designed for cases like this you may find it tiresome to repeat itevery time if you are using the verbatim environment frequently The followingline (which requires the etoolbox package) added to the documentrsquos preamblewould serve the same purpose

AtBeginEnvironmentverbatimmicrotypesetupactivate=false

If you are using the fancyvrb or the listings package this is not necessary sincetheir implementation of the corresponding environments will inhibit protrusionanyway

Settings for GreekThaiArmenian etc encodings are not yet included The defaultsets of fonts for which the micro-typographic features will be enabled (see table 2)only contain those encodings for which configurations exist Therefore if you areusing any other encoding (eg LGR T2B etc) microtype will not apply to thesefonts You have to define and activate a new font set including the encoding(s) youare using (for details see section 4) For protrusion at least you would also haveto create settings for the fonts in question (see section 51) It goes without sayingthat contributions for these encodings are more than welcome

Only employ kerning adjustment if it is customary in the languagersquos typographictradition In contrast to protrusion and expansion additional kerning does notunconditionally improve the micro-typographical quality of your document Youshould only switch it on if you are writing a document in a language whosetypographic tradition warrants such kerning If you are for example writing anEnglish text your readers would probably be rather confused by additional spacesbefore the punctuation characters

Adjustment of interword spacing is still experimental The implementation of thisfeature in pdfTEX is not complete and may not yield the positive effects on thetypographical quality you might expect ndash in certain situations there may even beundesired side effects in particular when used together with the ragged2e packageTherefore the spacing option should not be chosen blindly it is also recommendedto experiment with the settings in order to understand the workings of this feature

Compatibility and interaction with other packages The microtype package is sup-posed to work happily together with all other LATEX packages (except for pdfcprot)However life isnrsquot perfect so problems are to be expected Currently I am aware ofthe following issues

bull Even though all configuration files are still provided in legacy (7-bit) format usingmulti-byte (Unicode) characters in the settings should run smoothly with an up-to-

HINTS AND CAVEATS 27

date LATEX system For older systems or documents in legacy encodings in contrastthis requires loading the inputenc package first Furthermore when using multipleinput encodings in a document 8-bit characters in the settings will only workreliably if you specify the inputenc key

bull When loading the package with the babel option you must load the babel packagebefore microtype

bull Before this package was fully compatible with LuaTEX the following method ofenabling expansion and protrusion with the fontspec package was most oftenfound to be recommended

newfontfeatureMicrotypeprotrusion=defaultexpansion=defaultdefaultfontfeaturesMicrotype

This code should not be used with this package as it will basically override all ofthe settings made by microtype ndash despite the naming the above lines have nothingto do with this package12

bull With pdfTEX it is currently not possible to create character-specific settings forChineseJapaneseKorean fonts Therefore the only micro-typographic extensionthat can be made to work with CJK fonts is (non-selected) font expansion

bull When used with the xeCJK package or the luatexja package text commands (egrsquoA textless) in the configuration will not be understood You therefore haveto ensure that microtype will encounter none of them This requires firstly thatthe glyphs be specified only as single (possibly Unicode) characters as numbersor as glyph names (cf section 5) and secondly if you are using a font for whichpre-defined settings do not exist that you create these settings yourself (becauseotherwise the default settings will be loaded which do contain text commands)Furthermore you should load microtype late

Possible error messages and how to get rid of them (specs may differ)

bull Font csnameendcsname=cmr10+20 at 100pt not loadable Metric (TFM) file not found

This error message will occur if you are trying to employ font expansion whilecreating DVI output Remember that automatic font expansion only works whenrunning pdfTEX or LuaTEX in PDF mode Although expansion is also possible in DVImode with pdfTEX it requires that all instances of the expanded fonts exist on yourTEX system

bull pdfTeX error (font expansion) auto expansion is only possible with scalable fonts

Automatic font expansion has been improved in pdfTEX 140 in that it now notonly works with Type 1 fonts but also with TrueType OpenType and even non-embedded fonts The above error message indicates either that you are trying toapply expansion to a bitmap (pk) font which is still not possible or that the fontisnrsquot found at all eg because of missing map entries

bull Warning pdflatex font ptmr8r cannot be expanded (not an included Type1 font)

and the PDF viewer complains about a missing font eg Adobe Reader thuslyCould not find a font in the Resources dictionary - using Helvetica instead

With pdfTEX versions older than 140 font expansion can only be applied if thefont is actually embedded in the PDF file If you get the above error message your

12 They make use of features provided by luaotfload (via fontspec)

ACKNOWLEDGMENTS 28

TEX system is not set up to embed (or lsquodownloadrsquo) the base PostScript fonts (egTimes Helvetica Courier) In most TEX distributions this can be changed in thefile updmapcfg by setting pdftexDownloadBase14 to true

bull Warning pdflatex (file ecrm1000+20) Font ecrm1000+20 at 1200 not found

Furthermore pdfTEX versions older than 140 require Type 1 fonts for automaticfont expansion When you receive a message like the above you are probably tryingto apply font expansion to a bitmap or TrueType font With older pdfTEX versionsthis is only possible if you manually create expanded instances of the fonts

bull Font T1cmrmn10=ecrm1000 at 100pt not loaded Not enough room left

Memory parameter lsquofont_mem_sizersquo too small

bull TeX capacity exceeded sorry [maximum internal font number (font_max)=2000]

Memory parameter lsquofont_maxrsquo too small

bull TeX capacity exceeded sorry [PDF memory size (pdf_mem_size)=65536]

Memory parameter lsquopdf_mem_sizersquo too small (pdfTEX versions older than 130)

When applying micro-typographic enhancement to a large document with a lot offonts pdfTEX may be running out of some kind of memory It can be increased bysetting the respective parameter to a larger value For web2c-based systems egTEX Live change the settings in texmfcnf for MiKTEX in the file miktexini (24or older) resp pdflatexini (25 or newer)

bull pdfTeX warning (font expansion) font should be expanded before its first use

This warning will occur with pdfTEX versions older than 1404 if tracking andexpansion is applied to a font It is harmless and can be ignored

The source code of this document is freely available If you wonder how this docu-ment was created just have a look at the source code in microtypedtx which iseither already included in your TEX distribution or else can be downloaded fromCTAN For the source code of the logo on the title page and of the letterspacingsample from section 53 see the appendices A and B If you want to re-typeset thedocumentation read the comments at the end of microtypedtx

10 ContributionsI would be glad to include configuration files for more fonts Preparing suchconfigurations is quite a time-consuming task and requires a lot of patience Toalleviate this process this package also includes a test file that can be used tocheck at least the protrusion settings (test-microtypetex) If you have created aconfiguration file for another font or if you have any suggestions for enhancementsin the default configuration files I would gratefully accept them wmlgmxnet

11 AcknowledgmentsThis package would be pointless if Hagraven Thecirc Thagravenh hadnrsquot created the pdfTEXprogramme in the first place which introduced the micro-typographic extensionsand made them available to the TEX world Furthermore I thank him for helping meto improve this package and not least for promoting it in Thagravenh 2004 Thagravenh 2008

ACKNOWLEDGMENTS 29

and elsewhere I also thank him and the rest of the pdfTEX team and more recentlyalso the LuaTEX and XETEX teams for refuting the idea that TEX is dead and forfixing the bugs I find

Harald Harders has contributed protrusion settings for Adobe Minion I wouldalso like to thank him for a number of bug reports and suggestions he had to makeAndreas Buumlhmann has suggested the possibility to specify ranges of font sizes andresourcefully assisted in implementing this He also came up with some good ideasfor the management of complex configurations Ulrich Dirr has made numerous sug-gestion especially concerning the new extensions of interword spacing adjustmentand additional character kerning Georg Duffner has patiently tested microtypeunder XETEX and LuaTEX with his beautiful OpenType font EB Garamond13 Mythanks also go to Maciej Eder for contributing settings for the QX encoding aswell as to Karl Karlsson for providing settings for the Cyrillic T2A encoding andto Hendrik Vogt who made substantial improvements to the Computer ModernRoman italic settings I thank Loren B Davis for providing protrusion settings forOpenType versions of Palatino Linotype I am also very much indebted to Eacutelie Rouxwho not only contributed the lua module in the first place but also together withPhilipp Gesang took care of updating it for the developments in LuaTEX land

I thank Philipp Lehman for adding to his csquotes package the possibility torestore the original meanings of all activated characters thus allowing for thesecharacters to be used in the configuration files Peter Wilson kindly provided a hookin his ledmacledpar packages so that critical editions can finally also benefit fromcharacter protrusion Likewise Donald Arseneau patched his shapepar package toaccommodate protrusion

Additionally the following people have reported bugs made suggestions orhelped otherwise (in chronological order quotes indicate TeXSX user names)Tom Kink Herb Schulz Michael Hoppe Gary L Gray Georg Verweyen Christoph BierPeter Muthesius Bernard Gaulle Adam Kucharczyk Mark Rossi Stephan HennigMichael Zedler Herbert Voszlig Ralf Stubner Holger Uhr Peter Dyballa Morten HoslashgholmSteven Bath Daniel Flipo Michalis Miatidis Sven Naumann Ross HetheringtonWiebke Petersen Geoff Vallis Steven E Harris Karl Berry Peter Meier NathanRosenblum Wolfram Schaalo Vasile Gaburici Sveinung Heggen Axel Berger ColinRourke Maverick Woo Silas S Brown Lars Roumlnnbaumlck Christian Stark Leo MarcinBorkowski hscm George Gratzer Josep Maria Font Juan Acevedo Heiko OberdiekTill A Heilmann Rolf Dieterich Seamus Bradley Meho R Steffen Hoffmann ScottPakin Maiumleul Rouquette Jonas Hogstrom Gabriel Kerneis lsquoRazorXsrrsquo SebastianSchubert lsquoDaversquo Giuseppe Palma Stephan Stiller Christopher Schramm lsquoulirsquo SamMason lsquokleenstarrsquo lsquoHenningrsquo Ronnie Marksch David Carlisle lsquoMaxrsquo lsquoHcNrsquo WillRobertson lsquouser11126rsquo Ulrike Fischer lsquoDanielrsquo lsquoltcomdatarsquo Reinhard Kotucha lsquojcrrsquoNils Anders Danielsson Paolo Ney Frank Mittelbach Franz Wexler Moritz WemheuerlsquoAndy Nrsquo Phelype Oleinik Falk Hanisch Markus Kohm Paolo Polesana Oliver KoppHironori Kitagawa Daniel Benjamin Miller Md Ayquassar Marcel Kruumlger EkkehartSchlicht lsquoCanageekrsquo lsquodsedivecrsquo and lsquoDORpapstrsquo

13 Available from CTAN at pkgebgaramond including configuration files for microtype

SHORT HISTORY 30

12 ReferencesHagraven Thecirc Thagravenh lsquoMicro-typographic extensions to the TEX typesetting systemrsquo DissMasaryk University Brno 2000 in TUGBoat vol 21 (2000) no 4 pp 317ndash434(Online at httpwwwtugorgTUGboatArticlestb21-4tb69thanhpdf)

Hagraven Thecirc Thagravenh lsquoMicro-typographic extensions of pdfTEX in practicersquo in TUGBoatvol 25 (2004) no 1 lsquoProceedings of the Practical TEX 2004 Conferencersquo pp 35ndash38(Online at httpwwwtugorgTUGboatArticlestb25-1thanhpdf)

Hagraven Thecirc Thagravenh lsquoFont-specific issues in pdfTEXrsquo in TUGBoat vol 29 (2008) no 1lsquoEuroBachoTEX 2007 Proceedingsrsquo pp 36ndash41 (Online at httpwwwtugorgTUGboatArticlestb29-1tb91thanh-fontspdf)

Hagraven Thecirc Thagravenh Sebastian Rahtz Hans Hagen Hartmut Henkel Paweł JackowskiMartin Schroumlder Karl Berry The pdfTEX user manual 2 March 2020 (Availablefrom CTAN at systemsdocpdftexmanualpdftex-apdf)

Karl Berry Fontname Filenames for TEX fonts July 2009 (Available from CTAN atinfofontnamefontnamepdf)

LATEX3 Project Team LATEX 2ε font selection November 2020 (Available from CTANat macroslatexbasefntguidepdf)

Will Robertson The fontspec package Font selection for

XELATEX and LuaLATEX21 February 2020 (Available from CTAN at pkgfontspec)

Eacutelie Roux Khaled Hosny Philipp Gesang Ulrike Fischer Marcel Kruumlger Theluaotfload package 8 January 2021 (Available from CTAN at pkgluaotfload)

Carsten Schurig Tobias Schlemmer The pdfcprotsty package 10 June 2005(Available from CTAN at pkgpdfcprot)

Melchior Franz The soul package 17 November 2003 (Available from CTAN atpkgsoul) See also Heiko Oberdiekrsquos extension of this package soulutf8 whichadds Unicode support (Available from CTAN at pkgsoulutf8)

13 Short historyThe comprehensive list of changes can be found in appendix C The following is alist of all changes relevant in the user land bug and compatibility fixes are sweptunder the rug Numbers in brackets indicate the relevant section in this manual

28 (20201207)

bull New default font sets for expansion and spacing lsquoalltext-nottrsquo [4 table 2]

27 (20170707)

bull Allow automatic expansion and letterspacing with LuaTEX in DVI mode (akadvilualatex) [31 33 table 1]

bull Compatibility with LATEX 20170101 (fix warnings)

26 (20160501)

bull Support for LuaTEX ge 085bull Improvements for trackingletterspacing with LuaTEX (Renderer=Basic no longer

required)

SHORT HISTORY 31

bull New font sets lsquoalltext-nottrsquo lsquoallmath-nottrsquo [4 table 2]

25 (20130313)

bull Support for the fontspec package viz for OpenType fonts with LuaTEX and XETEXbull Support for protrusion with XETEX ge 09997bull Support for trackingletterspacing with LuaTEX ge 062bull Allow context-sensitive setup with LuaTEXbull Info if protrusion settings are genericbull Protrusion settings for Latin Modern Roman (OpenType)bull Protrusion settings for Charis SIL (OpenType)bull Protrusion settings for Palatino Linotype (OpenType)

24 (20100110)

bull Protrusion settings for T2A encoded Minion

23e (20091109)

bull Support for the Cyrillic T2A encoding (protrusion expansion spacing)

23d (20090327)

bull New default for expansion option lsquosteprsquo 1 if pdfTEX ge 140 [33]

23c (20081111)

bull Support for LuaTEX enabled by default

23 (20071223)

bull New key lsquoouter kerningrsquo for SetTracking to customise outer kerning [53]bull Adjust protrusion settings for tracking even if protrusion is not enabledbull New option lsquoverbose=silentrsquo to turn all warnings into mere messages [35]bull The letterspace package also works with eplain or miniltx [7]

22 (20070714)

bull Improvements to trackingletterspacing retain kerning (pdfTEX ge 1404) auto-matically adjust protrusion settings

bull New key lsquono ligaturesrsquo for SetTracking to disable selected or all ligatures (pdfTEXge 1404) [53]

bull New keys lsquospacingrsquo and lsquoouter spacingrsquo for SetTracking to customise interwordspacing [53]

bull Possibility to expand a font with different parameters (pdfTEX ge 1404) [52]bull New optional argument for DisableLigatures to disable selected ligatures [8]bull New command DeclareMicrotypeVariants to specify variant suffixes [57]bull New command textmicrotypecontext as a wrapper for microtypecontext [6]bull Protrusion settings for Bitstream Letter Gothic

21 (20070121)

bull New command lslig to protect ligatures in letterspaced text [7]

20 (20070114)

bull Support for the new extensions of pdfTEX ge 140 trackingletterspacing ad-ditional kerning and adjustment of interword spacing (glue) (new commandsSetTracking SetExtraKerning SetExtraSpacing new options lsquotrackingrsquolsquokerningrsquo lsquospacingrsquo) [53 54 55]

SHORT HISTORY 32

bull New commands textls and lsstyle for letterspacing new option lsquoletterspacersquo[34 7]

bull New option lsquobabelrsquo for automatic micro-typographic adjustment to the selectedlanguage [35 6]

bull New font sets lsquosmallcapsrsquo lsquofootnotesizersquo lsquoscriptsizersquo [4 table 2]bull New package lsquoletterspacersquo providing the commands for robust and hyphenatable

letterspacing [7]

19e (20060728)

bull New key lsquoinputencrsquo to specify the listsrsquo input encodings [5]bull Protrusion settings for Euler math fonts

19d (20060505)

bull Support for the Central European QX encoding (protrusion inheritance)bull Protrusion settings for various Euro symbol fonts (Adobe ITC marvosym)bull Support for Unicode input in the configuration (inputencutf8)

19c (20060202)

bull Protrusion settings for URW Garamond

19a (20051205)

bull Defer setup until the end of the preamblebull Inside the preamble microtypesetup accepts all package options [36]bull Protrusion settings for T5 encoded Charter

19 (20051028)

bull New command DisableLigatures to disable ligatures (pdfTEX ge 130) [8]bull New command microtypecontext to change the configuration context new key

lsquocontextrsquo for the configuration commands [6]bull New key lsquofontrsquo to add single fonts to the font sets [4]bull New key lsquopresetrsquo to set all characters to the specified value before loading the listsbull Value lsquorelativersquo renamed to lsquocharacterrsquo for lsquounitrsquo keysbull Support for the Polish OT4 encoding (protrusion expansion inheritance)bull Support for the Vietnamese T5 encoding (protrusion expansion inheritance)

18 (20050623)

bull New command DeclareMicrotypeSetDefault to declare the default font sets [4]bull New option lsquoconfigrsquo to load a different configuration file [35]bull New option lsquounitrsquo to measure protrusion factors relative to a dimension instead of

the character width [51]bull Renamed commands from MicroType to Microtypebull Protrusion settings for AMS math fontsbull Protrusion settings for Times in LY1 encoding completedbull The lsquoallmathrsquo font set also includes U encodingbull Support for protrusion with the ledmac package (pdfTEX ge 130)

17 (20050323)

bull Possibility to specify ranges of font sizes in the set declarations [4 5]bull New command LoadMicrotypeFile to load a configuration file manually [57]bull New command MicrotypeHook for font package authors [1444]bull New option lsquoverbose=errorsrsquo to turn all warnings into errors

SHORT HISTORY 33

bull Warning when running in draft mode

16 (20050124)

bull New option lsquofactorrsquo to influence protrusion resp expansion of all characters of afont or font set [32 5]

bull When pdfTEX is too old to expand fonts automatically expansion has to be enabledexplicitly automatic expansion will be disabled [31]

bull Use e-TEX extensions if available

15 (20041215)

bull When output mode is DVI font expansion has to be enabled explicitly automaticexpansion will be disabled [31]

bull New option lsquoselectedrsquo to enable selected expansion default false [33 52]bull New default for expansion option lsquosteprsquo 4 (min(stretchshrink)5) [33]bull Protrusion settings for Bitstream Charter

14 (20041112)

bull Set up fonts independently from LATEX font loadingbull New option lsquofinalrsquo [35]

12 (20041003)

bull New font sets lsquoallmathrsquo and lsquobasicmathrsquo [4 table 2]bull Protrusion settings for Computer Modern Roman math symbolsbull Protrusion settings for TS1 encoding completed for Computer Modern Roman and

Adobe Garamond

11 (20040921)

bull Protrusion settings for Adobe Minionbull New command DeclareCharacterInheritance [56]bull Characters may also be specified as octal or hexadecimal numbers [5]

10 (20040911)

bull First CTAN release

IMPLEMENTATION 34

14 ImplementationThe docstrip modules in this file are

driver The documentation driver only visible in the dtx file

package The code for the microtype package (microtypesty)

pdftex-def Definitions specific to pdfTEX (microtype-pdftexdef)

xetex-def Definitions specific to XETEX (microtype-xetexdef)

luatex-def Definitions specific to LuaTEX (microtype-luatexdef)

letterspace The code for the letterspace package (letterspacesty)

plain Code for eplain miniltx (letterspace only)

debug Code for additional output in the log fileUsed for ndash surprise ndash debugging purposes

luafile Lua functions (microtypelua)

config Surrounds all configuration modules

cfg-t Surrounds (Latin) text configurations

m-t The main configuration file (microtypecfg)bch Settings for Bitstream Charter (mt-bchcfg)blg Settings for Bitstream Letter Gothic (mt-blgcfg)cmr Settings for Computer Modern Roman (mt-cmrcfg)ebg Settings for EB Garamond (mt-EBGaramondcfg)ppl Settings for Palatino (mt-pplcfg)ptm Settings for Times (mt-ptmcfg)pmn Settings for Adobe Minion (mt-pmncfg)

Contributed by Harald Hardersugm Settings for URW Garamond (mt-ugmcfg)

cfg-u Surrounds non-text configurations (U encoding)

msa Settings for AMS lsquoarsquo symbol font (mt-msacfg)msb Settings for AMS lsquobrsquo symbol font (mt-msbcfg)euf Settings for Euler Fraktur font (mt-eufcfg)eur Settings for Euler Roman font (mt-eurcfg)eus Settings for Euler Script font (mt-euscfg)

cfg-e Surrounds Euro symbol configurations

zpeu Settings for Adobe Euro symbol fonts (mt-zpeucfg)mvs Settings for marvosym Euro symbol (mt-mvscfg)

test A helper file that may be used to create and test protrusion settings(test-microtypetex)

And now for something completely different1 langpackage|letterspacerang

IMPLEMENTATION Preliminaries 35

141 PreliminariesMTMT This is us

2 defMTMT3 langpackagerang microtype4 langletterspacerang letterspace

MTfixcatcode We have to make sure that the category codes of some characters are correct (thegerman package for instance makes active) Probably overly cautious Ceterumcenseo it should be forbidden for packages to change catcodes within the preamble

MTrestorecatcodes Polite as we are wersquoll restore them afterwards5 letMTrestorecatcodesempty

6 defMTfixcatcode127 edefMTrestorecatcodes8 MTrestorecatcodes9 catcode1=thecatcode1relax

10 11 catcode1=2relax12 13 MTfixcatcode1714 ^^Q (comment)14 MTfixcatcode24 9 ^^X (ignore)15 langpackagerangMTfixcatcode3312 16 langpackagerangMTfixcatcode3412 17 MTfixcatcode36 3 $ (math shift)18 MTfixcatcode3912 rsquo19 MTfixcatcode4212 20 MTfixcatcode4312 +21 MTfixcatcode4412 22 MTfixcatcode4512 -23 MTfixcatcode5812 24 MTfixcatcode6012 lt25 MTfixcatcode6112 =26 MTfixcatcode6212 gt27 langpackagerangMTfixcatcode6312 28 MTfixcatcode94 7 ^ (superscript)29 MTfixcatcode9612 `30 langpackagerangMTfixcatcode12412 |

These are all commands for the outside world We define them here as blankcommands so that they wonrsquot generate an error if we are not running pdfTEX

31 langpackagerang32 newcommandDeclareMicrotypeSet[3][]33 newcommandUseMicrotypeSet[2][]34 newcommandDeclareMicrotypeSetDefault[2][]35 newcommandSetProtrusion[3][]36 newcommandSetExpansion[3][]37 newcommandSetTracking[3][]38 newcommandSetExtraKerning[3][]39 newcommandSetExtraSpacing[3][]40 newcommandDisableLigatures[2][]41 newcommandDeclareCharacterInheritance[3][]42 newcommandDeclareMicrotypeVariants[1]43 newcommandDeclareMicrotypeAlias[2]44 newcommandLoadMicrotypeFile[1]45 newcommandDeclareMicrotypeBabelHook[2]46 newcommandmicrotypesetup[1]47 newcommandmicrotypecontext[1]48 newcommandtextmicrotypecontext[2]249 ifpackageloadedletterspaceletMTtextlsrelax50 langpackagerang51 newcommandlsstyle52 newcommandtextls[2][]53 deftextls1

IMPLEMENTATION Preliminaries 36

54 newcommandlslig[1]155 langpackagerang56

These commands also have a starred version57 defDeclareMicrotypeSet1gobbletwo58 defDeclareMicrotypeVariants1gobble

Set declarations are only allowed in the preamble (resp the main configurationfile) The configuration commands on the other hand must be allowed in thedocument too since they may be called inside font configuration files which inprinciple may be loaded at any time

59 onlypreambleDeclareMicrotypeSet60 onlypreambleUseMicrotypeSet61 onlypreambleDeclareMicrotypeSetDefault62 onlypreambleDisableLigatures63 onlypreambleDeclareMicrotypeVariants64 onlypreambleDeclareMicrotypeBabelHook

Donrsquot load letterspace65 expandafterletcsname verletterspacestyendcsnameempty

MToldcmd The old command names had one more hunch66 defMToldcmd1267 newcommand1MTwarning68 string1 is deprecated Please useMessageBreak69 string2 instead70 let 122

71 MToldcmdDeclareMicroTypeAliasDeclareMicrotypeAlias72 MToldcmdDeclareMicroTypeSet DeclareMicrotypeSet73 MToldcmdUseMicroTypeSet UseMicrotypeSet74 MToldcmdLoadMicroTypeFile LoadMicrotypeFile75 langpackagerang

MTwarning

MTwarningnl

MTinfo

MTinfonl

MTvinfo

MTerror

MTwarnerr

Communicate76 defMTwarningPackageWarningMTMT77 defMTwarningnl1MTwarning1gobble78 langpackagerang79 defMTinfoPackageInfoMTMT80 defMTinfonl1MTinfo1gobble81 letMTvinfogobble82 defMTerrorPackageErrorMTMT83 defMTwarnerr1MTerror184 This error message appears because you loaded the `MTMTrsquoMessageBreak85 package with the option `verbose=errorsrsquo Consult the documentationMessageBreak86 in MTMTpdf to find out what went wrong

1411 Debugging

tracingmicrotype

MTdinfo

MTdinfonl

Cases for tracingmicrotype

0 almost none

1 + sets amp lists

2 + heirs

3 + slots

4 + factors87 langdebugrang88 MTwarningnlThis is the debug version89 newcounttracingmicrotype

IMPLEMENTATION Preliminaries 37

90 tracingmicrotype=291 defMTinfo1PackageInfoMTMT1MTaddtoannot192 defMTinfonl1PackageInfoMTMT1gobbleMTaddtoannot193 letMTvinfoMTinfonl94 defMTwarning1PackageWarningMTMT1MTaddtoannotWarning 195 defMTwarningnl1PackageWarningMTMT1gobbleMTaddtoannotWarning 196 defMTdinfo12ifnumtracingmicrotypelt1 elseMTinfo2fi97 defMTdinfonl12ifnumtracingmicrotypelt1 elseMTinfonl2fi

tracingmicrotypeinpdf Another debug method font switches can be marked in the PDF file with a smallcaret an accompanying popup text box displaying all debug messages

Cases for tracingmicrotypeinpdf

1 show new fonts

2 + show known fonts98 newcounttracingmicrotypeinpdf

Letrsquos see how it works (if you donrsquot see anything special on this page your PDFviewer doesnrsquot support annotations)

tracingmicrotypeinpdf=2

MTpdfannot

MTaddtoannot

ifMTinannot

During font setup we save the text for the popup in MTpdfannot (This requirespdfTEX ge 130) The pdftexcmds package provides pdfTEXrsquos utility commands inLuaTEX too

99 RequirePackagepdftexcmds100 newififMTinannot MTinannottrue101 letMTpdfannotempty102 defMTaddtoannot1ifnumtracingmicrotypeinpdfgtz ifMTinannot103 defMessageBreak^^Jspaces104 MTxaddMTpdfannotpdfescapestring1^^Jfifi

iftracingmicrotypeinpdfall With tracingmicrotypeinpdfallfalse the PDF output is (hopefully) identicalbut some font switches will not be displayed otherwise the output is affected butall font switches are visible In the latter case we also insert a small kern so thatmultiple font switches are discernable

105 newififtracingmicrotypeinpdfall

MTshowpdfannot A red caret is shown for fonts which are actually set up by Microtype a green onemarks fonts that we have already seen The Caret annotation requires a viewerfor PDF version 15 (you could use Text if yoursquore using an older PDF viewer)

106 defMTshowpdfannot1107 ifnumtracingmicrotypeinpdflt1 else108 iftracingmicrotypeinpdfallleavevmodefi109 pdfannot height 4pt width 4pt depth 2pt 110 SubtypeCaret111 T(expandafterstringfontname)112 ifcase1or113 Subj(New font)C[1 0 0]114 else115 Subj(Known font)C[0 1 0]116 fi117 Contents(MTpdfannot)118 119 iftracingmicrotypeinpdfallkern1pt fi120 globalMTinannotfalse121 fi122 123 langdebugrang124 langpackagerang

T1blgmn10
Known font
(line 3713)
T1blgmn8
Known font
(line 3713)
T1blgmn10
Known font
(line 3714)
T1blgmn8
Known font
(line 3714)
T1blgmn10
Known font
(line 3715)
T1blgmn8
Known font
(line 3715)
T1blgmn10
Known font
(line 3716)
OT1mdbchmn10
Known font
(line 3717)
OT1mdbchmn7
Known font
(line 3717)
OT1mdbchmn5
Known font
(line 3717)
OMLmdbchmit10
Known font
(line 3717)
OMLmdbchmit7
Known font
(line 3717)
OMLmdbchmit5
Known font
(line 3717)
OMSmdbchmn10
Known font
(line 3717)
OMSmdbchmn7
Known font
(line 3717)
OMSmdbchmn5
Known font
(line 3717)
OMXmdbchmn10
Known font
(line 3717)
OMXmdbchmn7
Known font
(line 3717)
OMXmdbchmn5
Known font
(line 3717)
OMSmdbchmn10
Known font
(line 3717)
OMSmdbchmn7
Known font
(line 3717)
OMSmdbchmn5
Known font
(line 3717)
OMSmdbchmn10
Known font
(line 3717)
OMSmdbchmn7
Known font
(line 3717)
OMSmdbchmn5
Known font
(line 3717)
OMLmdbchmn10
Known font
(line 3717)
OMLmdbchmn7
Known font
(line 3717)
OMLmdbchmn5
Known font
(line 3717)
MDAmdbchmn10
Known font
(line 3717)
MDAmdbchmn7
Known font
(line 3717)
MDAmdbchmn5
Known font
(line 3717)
MDBmdbchmn10
Known font
(line 3717)
MDBmdbchmn7
Known font
(line 3717)
MDBmdbchmn5
Known font
(line 3717)
T1blgmn10
Known font
(line 3718)
T1blgmn10
Known font
(line 3720)
T1blgmn8
Known font
(line 3720)
T1blgmn8
Known font
(line 3727)
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1blgmn10
Known font
(line 3731)
T1blgmn8
Known font
(line 3731)
T1blgmn10
Known font
(line 3732)
T1bchmn9
Known font
(line 3732)
T1bchmn9
Known font
(line 3732)Tracking font `T1bchmn9 on input line 3732trying to find tracking amount list for font `T1bchmn9trying T1bchmntrying T1bchmntrying T1bchmtrying T1bchmtrying T1bchntrying T1bchntrying T1bchtrying T1bchtrying T1mntrying T1mntrying T1mtrying T1mtrying T1ntrying T1ntrying T1trying T1 Loading tracking list `default Tracking by 60
OT1mdbchmn9
Known font
(line 3732)
OT1mdbchmn6
Known font
(line 3732)
OT1mdbchmn5
Known font
(line 3732)
OMLmdbchmit9
Known font
(line 3732)
OMLmdbchmit6
Known font
(line 3732)
OMLmdbchmit5
Known font
(line 3732)
OMSmdbchmn9
Known font
(line 3732)
OMSmdbchmn6
Known font
(line 3732)
OMSmdbchmn5
Known font
(line 3732)
OMXmdbchmn9
Known font
(line 3732)
OMXmdbchmn6
Known font
(line 3732)
OMXmdbchmn5
Known font
(line 3732)
OMSmdbchmn9
Known font
(line 3732)
OMSmdbchmn6
Known font
(line 3732)
OMSmdbchmn5
Known font
(line 3732)
OMSmdbchmn9
Known font
(line 3732)
OMSmdbchmn6
Known font
(line 3732)
OMSmdbchmn5
Known font
(line 3732)
OMLmdbchmn9
Known font
(line 3732)
OMLmdbchmn6
Known font
(line 3732)
OMLmdbchmn5
Known font
(line 3732)
MDAmdbchmn9
Known font
(line 3732)
MDAmdbchmn6
Known font
(line 3732)
MDAmdbchmn5
Known font
(line 3732)
MDBmdbchmn9
Known font
(line 3732)
MDBmdbchmn6
Known font
(line 3732)
MDBmdbchmn5
Known font
(line 3732)
T1bchmit10
Known font
(line 3734)
T1blgmn10
Known font
(line 3736)
T1blgmn8
Known font
(line 3736)
T1blgmn8
Known font
(line 3738)
T1bchmn8
Known font
(line 3738)
T1SourceSansPro-TLFmn8
Known font
(line 3738)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3738)= substituted with T1SourceSansPro-TLFregularn7
T1blgmn10
Known font
(line 3740)
T1blgmn8
Known font
(line 3740)
T1pzcmit10
New font
(line 3742) No configuration file mt-pzccfgSetting up font `T1pzcmit10 on input line 3742protrusion font list emptyprotrusion encoding `T1 in listprotrusion family `pzc not in list No protrusionexpansion font list emptyexpansion encoding `T1 in listexpansion family list emptyexpansion series list emptyexpansion shape list emptyexpansion size list emptytrying to find expansion codes list for font `T1pzcmit10trying T1pzcmittrying T1pzcmittrying T1pzcmtrying T1pzcmtrying T1pzcittrying T1pzcittrying T1pzctrying T1pzctrying T1mittrying T1mittrying T1mtrying T1mtrying T1ittrying T1ittrying T1trying T1 Applying non-selected expansion (list `default)kerning font `T1pzcmit10 not in listkerning encoding `T1 in listkerning family `pzc not in list No kerningnoligatures font list emptynoligatures encoding `T1 in listnoligatures family `pzc not in list
T1blgmn10
Known font
(line 3744)
T1bchmn9
Known font
(line 3745)
T1bchmn9
Known font
(line 3745)Tracking font `T1bchmn9 on input line 3745trying to find tracking amount list for font `T1bchmn9trying T1bchmntrying T1bchmntrying T1bchmtrying T1bchmtrying T1bchntrying T1bchntrying T1bchtrying T1bchtrying T1mntrying T1mntrying T1mtrying T1mtrying T1ntrying T1ntrying T1trying T1 Loading tracking list `default Tracking by 60
OT1mdbchmn9
Known font
(line 3745)
OT1mdbchmn6
Known font
(line 3745)
OT1mdbchmn5
Known font
(line 3745)
OMLmdbchmit9
Known font
(line 3745)
OMLmdbchmit6
Known font
(line 3745)
OMLmdbchmit5
Known font
(line 3745)
OMSmdbchmn9
Known font
(line 3745)
OMSmdbchmn6
Known font
(line 3745)
OMSmdbchmn5
Known font
(line 3745)
OMXmdbchmn9
Known font
(line 3745)
OMXmdbchmn6
Known font
(line 3745)
OMXmdbchmn5
Known font
(line 3745)
OMSmdbchmn9
Known font
(line 3745)
OMSmdbchmn6
Known font
(line 3745)
OMSmdbchmn5
Known font
(line 3745)
OMSmdbchmn9
Known font
(line 3745)
OMSmdbchmn6
Known font
(line 3745)
OMSmdbchmn5
Known font
(line 3745)
OMLmdbchmn9
Known font
(line 3745)
OMLmdbchmn6
Known font
(line 3745)
OMLmdbchmn5
Known font
(line 3745)
MDAmdbchmn9
Known font
(line 3745)
MDAmdbchmn6
Known font
(line 3745)
MDAmdbchmn5
Known font
(line 3745)
MDBmdbchmn9
Known font
(line 3745)
MDBmdbchmn6
Known font
(line 3745)
MDBmdbchmn5
Known font
(line 3745)
T1blgmn10
Known font
(line 3745)
T1bchmn9
Known font
(line 3746)
T1bchmn9
Known font
(line 3746)Tracking font `T1bchmn9 on input line 3746trying to find tracking amount list for font `T1bchmn9trying T1bchmntrying T1bchmntrying T1bchmtrying T1bchmtrying T1bchntrying T1bchntrying T1bchtrying T1bchtrying T1mntrying T1mntrying T1mtrying T1mtrying T1ntrying T1ntrying T1trying T1 Loading tracking list `default Tracking by 60
OT1mdbchmn9
Known font
(line 3746)
OT1mdbchmn6
Known font
(line 3746)
OT1mdbchmn5
Known font
(line 3746)
OMLmdbchmit9
Known font
(line 3746)
OMLmdbchmit6
Known font
(line 3746)
OMLmdbchmit5
Known font
(line 3746)
OMSmdbchmn9
Known font
(line 3746)
OMSmdbchmn6
Known font
(line 3746)
OMSmdbchmn5
Known font
(line 3746)
OMXmdbchmn9
Known font
(line 3746)
OMXmdbchmn6
Known font
(line 3746)
OMXmdbchmn5
Known font
(line 3746)
OMSmdbchmn9
Known font
(line 3746)
OMSmdbchmn6
Known font
(line 3746)
OMSmdbchmn5
Known font
(line 3746)
OMSmdbchmn9
Known font
(line 3746)
OMSmdbchmn6
Known font
(line 3746)
OMSmdbchmn5
Known font
(line 3746)
OMLmdbchmn9
Known font
(line 3746)
OMLmdbchmn6
Known font
(line 3746)
OMLmdbchmn5
Known font
(line 3746)
MDAmdbchmn9
Known font
(line 3746)
MDAmdbchmn6
Known font
(line 3746)
MDAmdbchmn5
Known font
(line 3746)
MDBmdbchmn9
Known font
(line 3746)
MDBmdbchmn6
Known font
(line 3746)
MDBmdbchmn5
Known font
(line 3746)
T1blgmn10
Known font
(line 3747)
T1blgmn8
Known font
(line 3747)
T1blgmn8
Known font
(line 3767)
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
OT1mdbchmn8
Known font
(line 3767)
OT1mdbchmn6
Known font
(line 3767)
OT1mdbchmn5
Known font
(line 3767)
OMLmdbchmit8
Known font
(line 3767)
OMLmdbchmit6
Known font
(line 3767)
OMLmdbchmit5
Known font
(line 3767)
OMSmdbchmn8
Known font
(line 3767)
OMSmdbchmn6
Known font
(line 3767)
OMSmdbchmn5
Known font
(line 3767)
OMXmdbchmn8
Known font
(line 3767)
OMXmdbchmn6
Known font
(line 3767)
OMXmdbchmn5
Known font
(line 3767)
OMSmdbchmn8
Known font
(line 3767)
OMSmdbchmn6
Known font
(line 3767)
OMSmdbchmn5
Known font
(line 3767)
OMSmdbchmn8
Known font
(line 3767)
OMSmdbchmn6
Known font
(line 3767)
OMSmdbchmn5
Known font
(line 3767)
OMLmdbchmn8
Known font
(line 3767)
OMLmdbchmn6
Known font
(line 3767)
OMLmdbchmn5
Known font
(line 3767)
MDAmdbchmn8
Known font
(line 3767)
MDAmdbchmn6
Known font
(line 3767)
MDAmdbchmn5
Known font
(line 3767)
MDBmdbchmn8
Known font
(line 3767)
MDBmdbchmn6
Known font
(line 3767)
MDBmdbchmn5
Known font
(line 3767)
T1blgmit8
Known font
(line 3767)
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1blgmit8
Known font
(line 3767)
T1blgmn8
Known font
(line 3767)
T1blgmn8
Known font
(line 3767)

IMPLEMENTATION Preliminaries 38

1412 Requirements

MTplain The letterspace package works with

0 miniltx

1 eplain

2 LATEX

For plain usage we have to copy some commands from latexltx125 langplainrang126 defMTplain2127 ifxdocumentclassundefined128 defMTplain1129 defhmodebgroupleavevmodebgroup130 defnfsstext1mbox1131 lettypesetprotectrelax132 ifxeplainundefined133 defMTplain0134 defPackageWarning12135 begingroup136 newlinechar=10 137 defMessageBreak^^J(1)spacesspacesspacesspaces138 immediatewrite16^^JPackage 1 Warning 2online^^J139 endgroup140 141 defonline on input line theinputlineno142 defspacesspacespacespacespace143 fi144 fi

MTrequireslatex Better use groups than plain ifs145 defMTrequireslatex1146 ifnumMTplainlt1 expandaftersecondoftwoelseexpandafterfirstoftwofi147 148 langplainrang

For definitions that depend on e-TEX features149 ifcase 0150 ifxeTeXversionundefined 1else151 ifxeTeXversionrelax 1else152 ifcaseeTeXversion 1fi153 fi154 fi155 else156 catcode`^^Q=9 catcode`^^X=14157 fi158 langletterspacerang^^QMTwarningnlThis package requires the etex extensions159 langletterspacerang^^Q MessageBreak ExitingMTrestorecatcodesendinput160 langdebugrangMTdinfonl0this is161 langdebugrang^^Q not162 langdebugrang etex

We check whether we are running pdfTEX XETEX or LuaTEX and load the appro-priate definition file

MTclearoptions If we are using neither of these engines we disable everything and exit163 defMTclearoptions164 langplainrang MTrequireslatex1165 AtEndOfPackageletunprocessedoptionsrelaxMTrestorecatcodes166 letCurrentOptionempty167 langpackagerang letMTendinputendinput168 langplainrang relax169

IMPLEMENTATION Preliminaries 39

A hack circumventing the TEX Live 2004 hack which undefines the pdfTEX primitivesin the format in order to hide the fact that pdfTEX is being run from the user Thishas been fixed in TEX Live 2005

170 ifxnormalpdftexversionundefined else171 letpdftexversion normalpdftexversion172 letpdftexrevisionnormalpdftexrevision173 letpdfoutput normalpdfoutput174 fi

MTengine

MTenginetooold

Old packages might have let pdftexversion to relax175 letMTenginerelax176 langletterspacerangdefMTenginetooold0177 ifxpdftexversionundefined else178 ifxpdftexversionrelax else179 defMTenginepdf180 langletterspacerang letMTpdforluafirstoftwo181 langletterspacerang ifnumpdftexversion gt 139 defMTenginetooold1fi182 fi183 fi184 ifxdirectluaundefined else185 ifxdirectluarelax else186 defMTenginelua

Since approx LuaTEX 080 pdftexversion is let to luatexversion so that wewould be fooled to think that pdfTEX is too old

187 langletterspacerang188 letMTpdforluasecondoftwo189 ifnumluatexversion lt 62 defMTenginetooold0190 else191 defMTenginetooold1192 letMTluadirectlua193 ifnumluatexversion gt 84194 letpdfoutputoutputmode195 letpdfprotrudecharsprotrudechars196 letpdfadjustspacingadjustspacing197 fi198 fi199 langletterspacerang200 fi201 fi202 langpackagerang203 ifxMTenginerelax204 ifxXeTeXversionundefined else205 ifxXeTeXversionrelax else206 defMTenginexe207 fi208 fi209 fi210 langpackagerang211 langpackage|letterspacerang

MTpdftexno pdfTEXrsquos features for which we provide an interface here havenrsquot always beenavailable and some specifics have changed over time Therefore we have to testwhich pdfTEX wersquore using if any MTpdftexno will be used throughout thepackage to respectively do the right thing

Currently we have to distinguish seven cases for pdfTEX

0 not running pdfTEX

1 pdfTEX (lt 014f)

2 + micro-typographic extensions (014fg)

3 + protrusion relative to 1em (ge 014h)

IMPLEMENTATION Preliminaries 40

4 + automatic font expansion protrusion no longer has to be set up first scalefactor fixed to 1000 default efcode= 1000 (ge 120)

5 + (leftright)marginkern pdfnoligatures pdfstrcmp pdfescapestring(ge 130)

6 + adjustment of interword spacing extra kerning letterspacefont pdfmatch14pdftracingfonts always e-TEX (ge 140)

7 + letterspacefont doesnrsquot disable ligatures and kerns pdfcopyfont (ge 1404)

212 langpdftex-defrang213 langdebugrangMTdinfonl0this is pdftex thepdftexversion(pdftexrevision)214 defMTpdftexno7215 ifnumpdftexversion = 140216 ifnumpdftexrevision lt 4217 defMTpdftexno6218 fi219 else220 ifnumpdftexversion lt 140221 defMTpdftexno5222 ifnumpdftexversion lt 130223 defMTpdftexno4224 ifnumpdftexversion lt 120225 defMTpdftexno3226 ifnumpdftexversion = 14227 ifnum expandafter`pdftexrevision lt `h228 defMTpdftexno2229 ifnum expandafter`pdftexrevision lt `f230 defMTpdftexno1231 fi232 fi233 else234 ifnumpdftexversion lt 14235 defMTpdftexno1236 fi237 fi238 fi239 fi240 fi241 fi242 langdebugrangMTdinfonl0pdftex no MTpdftexno243 langpdftex-defrang

MTxetexno XETEX supports character protrusion since version 09997244 langxetex-defrang245 langdebugrangMTdinfonl0this is xetex (theXeTeXversionXeTeXrevision)246 ifdim 0XeTeXrevision pt lt 09997pt247 defMTxetexno1248 else249 defMTxetexno2250 fi251 langdebugrangMTdinfonl0xetex no MTxetexno252 langxetex-defrang

MTluatexno Cases for LuaTEX (luatexversion ought to have been enabled by the format)

0 NA

1 LuaTEX (lt 036)

2 + directlua without state number (ge 036)

14 This command was actually introduced in 130 but failed on strings longer than 1023 bytes

IMPLEMENTATION Preliminaries 41

3 + letterspacefont non-automatic expansion doesnrsquot work anymore andautomatic expansion in DVI mode is realised by modifying the tracking notthe glyphs15 (ge 062)

4 + almost all of the pdfTEX primitives have been renamed (ge 085)

5 + default efcode= 1000 protrusionboundary [not yet supported] (ge 090)

6 + glet(ge 110)

Also sometime between 104 and 107 the function fontsetexpansion has beenintroduced (but wersquore not using it for now)

253 langluatex-defrang254 langdebugrangMTdinfonl0this is luatex (theluatexversion)

MTlua Communicate with lua Beginning with LuaTEX 036 directlua no longer requiresa state number

255 letMTluadirectlua256 defMTluatexno6257 ifnumluatexversionlt110258 defMTluatexno5259 ifnumluatexversionlt90260 defMTluatexno4261 ifnumluatexversionlt85262 defMTluatexno3263 ifnumluatexversionlt62264 defMTluatexno2265 ifnumluatexversionlt36266 defMTluadirectlua0267 defMTluatexno1268 fi269 fi270 fi271 fi272 fi

273 langdebugrangMTdinfonl0luatex no MTluatexno274 langluatex-defrang275 langpdftex-def|xetex-def|letterspacerang276 ifnum277 langpdftex-def|xetex-defrang csname MTMTengine texnoendcsname lt 2278 langletterspacerang MTenginetooold=z279 MTwarningnlYou280 langletterspacerang281 ifxMTenginerelax282 donrsquot seem to be using pdftex or luatexMessageBreak283 Try running `pdftexrsquo or `luatexrsquo instead ofMessageBreak284 `ifxXeTeXversionundefinedelse xefi texrsquo285 else286 langletterspacerang287 are using a MTengine tex version older than288 langpdftex-defrang 014f289 langxetex-defrang 09997290 langletterspacerang MTpdforlua140062291 MessageBreak292 `MTMTrsquo does not work with this versionMessageBreak293 Please install a newer version of MTengine tex294 langletterspacerang fi295 MessageBreak I will quit now296 MTclearoptions297 endinputfi298 langpdftex-def|xetex-def|letterspacerang

15 This may have been changed earlier but Irsquom no longer able to find out when (the last version thatactually works for me is 040)

IMPLEMENTATION Preliminaries 42

Still there Then we can begin We need the keyval package including the lsquonewrsquoKVspdef implementation

299 langpackage|letterspacerang300 RequirePackagekeyval[19971110]301 langpackagerang

MTtoks We need a token register302 newtoksMTtoks

ifMTif A scratch if303 newififMTif

1413 Declarations

ifMTprotrusion

ifMTexpansion

ifMTauto

ifMTselected

ifMTnoligatures

ifMTdraft

ifMTspacing

ifMTkerning

ifMTtracking

ifMTbabel

These are the global switches 304 newififMTprotrusion305 newififMTexpansion306 newififMTauto307 newififMTselected308 newififMTnoligatures309 newififMTdraft310 newififMTspacing311 newififMTkerning312 newififMTtracking313 newififMTbabel

[This line intentionally left blank]MTprlevel

MTexlevel

MTprfactor

MTexfactor

MTspfactor

MTknfactor

and numbers314 letMTprleveltw315 letMTexleveltw316 letMTprfactorm317 letMTexfactorm318 letMTspfactorm319 letMTknfactorm

MTprunit

MTspunit

MTknunit

Default unit for protrusion settings is character width for spacing space for kerning(and tracking) 1em

320 letMTprunitempty321 letMTspunitmne322 defMTknunit1em

MTstretch

MTshrink

MTstep

Expansion settings323 letMTstretchmne324 letMTshrink mne325 letMTstep mne

MTprmin

MTprmax

MTexmin

MTexmax

MTspmin

MTspmax

MTknmin

MTknmax

MTtrmin

MTtrmax

Minimum and maximum values allowed by pdfTEX326 defMTprmin-m327 letMTprmaxm328 letMTexminz329 letMTexmaxm330 defMTspmin-m331 letMTspmaxm332 defMTknmin-m333 letMTknmaxm334 langpackagerang335 defMTtrmin-m336 letMTtrmaxm337 langpackagerang

MTfactordefault Default factor338 defMTfactordefault1000

IMPLEMENTATION Preliminaries 43

MTstretchdefault

MTshrinkdefault

Default values for expansion339 defMTstretchdefault20 340 defMTshrinkdefault20

MTletterspace

MTletterspacedefault

Default value for letterspacing (in thousandths of 1em)341 langpackagerang342 letMTletterspacemne343 defMTletterspacedefault100344 langpackagerang

ifMTdocument Our private test whether wersquore still in the preamble345 newififMTdocument346 langpackagerang347 langpackage|letterspacerang

1414 Auxiliary macros

MTrequirespdftex

MTrequiresluatex

For definitions that depend on a particular pdfTEX resp LuaTEX version348 langpdftex-def|luatex-defrang349 def350 langpdftex-defrang MTrequirespdftex351 langluatex-defrang MTrequiresluatex352 1ifnum353 langpdftex-defrang MTpdftexno354 langluatex-defrang MTluatexno355 lt1 expandaftersecondoftwoelseexpandafterfirstoftwofi356 langluatex-defampdebugrangMTrequiresluatex4MTluatexenableprimitives(rsquopdfrsquorsquotracingfontsrsquo)relax357 langpdftex-defampdebugrangMTrequirespdftex6358 langdebugrangpdftracingfonts=1359 langpdftex-defampdebugrangrelax360 langpdftex-def|luatex-defrang

Some functions are loaded from a dedicated lua file This avoids character escapingproblems and incompatibilities between versions of LuaTEX Unless running arecent LATEX we load the luatexbase package

361 langluatex-defrang362 ifltrfmtversion20160101relaxRequirePackageluatexbase

We load luaotfload because some of its functions are required in microtypeluaThis eliminates the need for the user to load fontspec before microtype Therewill hardly be any LuaTEX documents that donrsquot load this package anyway Since20170101 it is already loaded in the format

363 ifltrfmtversion20170101relaxRequirePackageluaotfload364 MTluarequire(microtype)365 langluatex-defrang

Here it begins The module was contributed by Eacutelie Roux366 langluafilerang367368 function microtypeinfo()369 luatexbasemodule_info(microtype)370 end371372 local find = stringfind373 local match = stringmatch374 local tex_write = texwrite375376 local catpackage377 if luatexbaseregisternumber then378 catpackage = luatexbaseregisternumber(catcodetableatletter) -- LaTeX379 else

IMPLEMENTATION Preliminaries 44

380 catpackage = luatexbasecatcodetablesCatcodeTableLaTeXAtLetter -- luatexbase381 end382 function microtypesprint ()383 texsprint(catpackage )384 end385386 langluafilerang

To be continued but first back to primitivesMTglet Herersquos the forgotten one (finally implemented in LuaTEX)

387 langluatex-defrangMTrequiresluatex6letMTgletgletrelax388 langpackage|letterspacerang389 defMTgletgloballet

MTexpcs

MTexpgcs

Commands to create command sequences Those that are going to be definedglobally should be created inside a group so that the save stack wonrsquot explode

390 defMTexpcs12expandafter1csname2endcsname391 langpackagerang392 defMTexpgcs12begingroupexpandafterendgroupexpandafter1csname2endcsname

MTdefn

MTgdefn

This is namedef and global393 defMTdefnMTexpcsdef394 defMTgdefnMTexpgcsgdef

MTedefn

MTxdefn

Its expanding versions395 langpackagerang396 defMTedefnMTexpcsedef397 langpackagerang398 defMTxdefnMTexpgcsxdef

MTletnc

MTgletnc

let a csname sequence to a command399 defMTletncMTexpcslet400 defMTgletncMTexpgcsMTglet

MTletcn let a command to a csname sequence401 langpackagerang402 defMTletcn12expandafterletexpandafter1csname 2endcsname403 langpackagerang

MTletnn

MTgletnn

let a csname sequence to a csname sequence404 defMTletnnMTexpcsMTletcn405 defMTgletnnMTexpgcsglobalexpandafterMTletcn

MTfont Remove trailing space from the font name406 defMTfontexpandafterstringMTfont

MTexponen Expand the second token once and enclose it in braces407 langpackagerang408 defMTexponen12expandafter1expandafter2

MTexptwoc Expand the next two tokens after lang1rang once409 defMTexptwoc1expandafterexpandafterexpandafter1expandafter410 langpackagerang

MTexptwon Expand the next two tokens after lang1rang once and enclose them in braces411 defMTexptwon123412 expandafterexpandafterexpandafter413 1expandafterexpandafterexpandafter414 expandafter2expandafterexpandafter3

You do not wonder why MTexponec doesnrsquot exist do you

IMPLEMENTATION Preliminaries 45

MTifdefinedcT

MTifdefinedcTF

MTifdefinednT

MTifdefinednTF

Wrapper for testing whether command resp csname sequence is defined If weare running e-TEX we will use its primitives ifdefined and ifcsname whichdecreases memory use substantially

415 defMTifdefinedcT1416 ^^X ifdefined1expandafterfirstofoneelseexpandaftergobblefi417 ^^Q ifx1undefinedexpandaftergobbleelseexpandafterfirstofonefi418 419 langpackagerang420 defMTifdefinedcTF1421 ^^X ifdefined1expandafterfirstoftwoelseexpandaftersecondoftwofi422 langpackagerang^^Q ifx1undefined423 langpackagerang^^Q expandaftersecondoftwoelseexpandafterfirstoftwofi424 425 defMTifdefinednT1426 ^^X ifcsname1endcsnameexpandafterfirstofoneelseexpandaftergobblefi427 langpackagerang^^Q begingroupMTexptwocendgroupifxcsname 1endcsnamerelax428 langpackagerang^^Q expandaftergobbleelseexpandafterfirstofonefi429 430 defMTifdefinednTF1431 ^^X ifcsname1endcsnameexpandafterfirstoftwoelseexpandaftersecondoftwofi432 langpackagerang^^Q begingroupMTexptwocendgroupifxcsname 1endcsnamerelax433 langpackagerang^^Q expandaftersecondoftwoelseexpandafterfirstoftwofi434 435 langpackagerang

MTdetokenizen

MTdetokenizec

MTremlastspace

Translate a macro into a token list With e-TEX we can use detokenize We alsoneed to remove the last trailing space and only the last one ndash therefore the fiddling(and the string isnrsquot perfect of course)

436 defMTdetokenizen1437 ^^X expandafterMTremlastspacedetokenize1 nil438 ^^Q string1439 440 defMTdetokenizec1441 ^^X MTexponenMTdetokenizen1442 ^^Q MTexptwocMTremlastspacestripprefixmeaning1 nil443 444 defMTremlastspace1 21445 ifxnil2else space446 expandafterMTremlastspaceexpandafter2fi447

MTifempty Test whether argument is empty448 langpackagerang449 begingroup450 catcode`=12451 catcode`amp=14452 gdefMTifempty1amp453 if 1amp454 expandafterfirstoftwo455 else456 expandaftersecondoftwo457 fi458 459 endgroup460 langpackagerang

MTifint Test whether argument is an integer using an old trick by Mr Arseneau or thelatest and greatest from pdfTEX or LuaTEX (which also allows negative numbers asrequired by the letterspace option)

461 langpackagerang462 langpackage|letterspacerang463 langpdftex-defrangMTrequirespdftex6464 langletterspacerangMTpdforlua

IMPLEMENTATION Preliminaries 46

465 langpdftex-def|letterspacerang466 defMTifint1467 ifcasepdfmatch^-[0-9]+ $1relax468 expandaftersecondoftwo469 else470 expandafterfirstoftwo471 fi472 473 474 langpdftex-def|letterspacerang475 langpdftex-def|xetex-def|letterspacerang476 defMTifint1477 ififnum9lt11elsefi478 expandafterfirstoftwo479 else480 expandaftersecondoftwo481 fi482 483 langpdftex-def|xetex-def|letterspacerang484 langpdftex-def|letterspacerang485 langluatex-defrangdefMTifint1csnameMTluamicrotypeif_int([[1]])endcsname486 langluafilerang487 local function if_int(s)488 if find(s^-[0-9]+ $) then489 tex_write(firstoftwo)490 else491 tex_write(secondoftwo)492 end493 end494 microtypeif_int = if_int495496 langluafilerang

MTifdimen Test whether argument is dimension (or number) (nd and nc are new Didot respCicero added in pdfTEX 130 px is a pixel)

497 langpdftex-defrang498 MTrequirespdftex6499 defMTifdimen1500 ifcasepdfmatch^([0-9]+([][0-9]+)|[][0-9]+)501 (em|ex|cm|mm|in|pc|pt|dd|cc|bp|sp|nd|nc|px) $1relax502 expandaftersecondoftwo503 else504 expandafterfirstoftwo505 fi506 507 508 langpdftex-defrang509 langpdftex-def|xetex-defrang510 defMTifdimen1511 setboxz=hbox512 MTcount=11relax513 ifnumMTcount=ne514 aftergroupsecondoftwo515 else516 aftergroupfirstoftwo517 fi518 519 520 langpdftex-def|xetex-defrang521 langpdftex-defrang522 langluatex-defrangdefMTifdimen1csnameMTluamicrotypeif_dimen([[1]])endcsname523 langluafilerang524 local function if_dimen(s)525 if (find(s ^-[0-9]+(a) $) or526 find(s ^-[0-9][][0-9]+(a) $)) then

IMPLEMENTATION Preliminaries 47

527 tex_write(firstoftwo)528 else529 tex_write(secondoftwo)530 end531 end532 microtypeif_dimen = if_dimen533534 langluafilerang

MTifdim Compare floating point numbers535 langpackagerang536 defMTifdim123537 ifdim 1p 2 3p538 expandafterfirstoftwo539 else540 expandaftersecondoftwo541 fi542 543 langpackagerang

MTifstreq Test whether two strings (fully expanded) are equal544 langpdftex-def|xetex-defrang545 langpdftex-defrangMTrequirespdftex5546 defMTifstreq12547 langpdftex-defrang ifnumpdfstrcmp12=z548 langxetex-defrang ifnumstrcmp12=z549 expandafterfirstoftwo550 else551 expandaftersecondoftwo552 fi553 554 langpdftex-def|xetex-defrang555 langpdftex-defrang556 557 defMTifstreq12558 edefMTresa1559 edefMTresb2560 ifxMTresaMTresb561 expandafterfirstoftwo562 else563 expandaftersecondoftwo564 fi565 566 567 langpdftex-defrang568 langluatex-defrangdefMTifstreq12csnameMTluamicrotypeif_str_eq([[1]][[2]])endcsname569 langluafilerang570 local function if_str_eq(s1 s2)571 if s1 == s2 then572 tex_write(firstoftwo)573 else574 tex_write(secondoftwo)575 end576 end577 microtypeif_str_eq = if_str_eq578579 langluafilerang

MTxadd Add item to a list580 langpackagerang581 defMTxadd12582 ifx1relax583 xdef12584 else585 xdef112

IMPLEMENTATION Preliminaries 48

586 fi587

MTxaddb Add item to the beginning588 defMTxaddb12589 ifx1relax590 xdef12591 else592 xdef121593 fi594 595 langpackagerang

MTmapclistn

MTmapclistc

MTmapclist

MTclistfunction

MTclistbreak

Run lang2rang on all elements of the comma list lang1rang This and the following is modelledafter LATEX3 commands

596 langpackage|letterspacerang597 defMTmapclistn12598 ifxempty1else599 defMTclistfunction12600 MTmapclist1nilnnil601 fi602

603 defMTmapclistc1MTexponenMTmapclistn1604 defMTmapclist1605 ifxnil1606 expandafterMTclistbreak607 fi608 MTclistfunction1609 MTmapclist610 611 letMTclistfunctiongobble612 defMTclistbreak1nnil613 langpackagerang

MTmaptlistn

MTmaptlistc

MTmaptlist

MTtlistbreak

Execute lang2rang on all elements of the token list lang1rang MTtlistbreak can be usedto jump out of the loop

614 defMTmaptlistn12MTmaptlist21nnil615 defMTmaptlistc12expandafterMTmaptlistexpandafter21nnil616 defMTmaptlist12617 ifxnnil2else618 12619 expandafterMTmaptlist620 expandafter1621 fi622 623 defMTtlistbreak1nnilfi

ifMTinlist

MTinclist

Test whether item lang1rang is in comma list lang2rang Using pdfmatch would be slower624 newififMTinlist625 defMTinclist12626 defMTresa1123nnil627 ifx2empty628 MTinlistfalse629 else630 MTinlisttrue631 fi632 633 expandafterMTresaexpandafter21emptynnil634

MTremfromclist Remove item lang1rang from comma list lang2rang This is basically removeelement fromltcntrldtx Using pdfmatch and pdflastmatch here would be really slow

635 defMTremfromclist12

IMPLEMENTATION Preliminaries 49

636 defMTresa112MTresa12MTresb637 defMTresb1MTresb2MTresbifx1emptyelse1fi638 xdef2MTexptwocMTresbMTresaexpandafter2MTresb1MTresa639

MTintlist

MTintlist

Test whether item is in token list Since this isnrsquot too elegant I thought that at leasthere pdfmatch would be more efficient ndash however it turned out to be even slowerthan this solution

640 defMTintlist12641 MTinlistfalse642 defMTresa1643 MTmaptlistc2MTintlist644 645 defMTintlist1646 edefMTresb1647 ifxMTresaMTresb648 MTinlisttrue649 expandafterMTtlistbreak650 fi651

MTinrlist

MTinrlist

MTinrlist

MTsizename

Test whether size MTsize is in a list of ranges Store the name of the list inMTsizename

652 defMTinrlist1653 MTinlistfalse654 MTmaptlistc1MTinrlist655 656 defMTinrlist1expandafterMTinrlist1657 defMTinrlist123658 MTifdim2=mne659 MTifdim1=MTsize660 MTinlisttrue661 relax662 663 MTifdimMTsizelt1relax664 MTifdimMTsizelt2665 MTinlisttrue666 relax667 668 669 ifMTinlist670 defMTsizename3671 expandafterMTtlistbreak672 fi673

MTloop

MTiterate

MTrepeat

This is the same as LATEXrsquos loop which we mustnrsquot use since this could confuse anouter loop in the document

674 langpackagerang675 defMTloop1MTrepeat676 defMTiterate1relaxexpandafterMTiteratefi677 MTiterate letMTiteraterelax678 679 letMTrepeatfi

MTwhilenum Execute lang3rang from lang1rang up to (excluding) lang2rang (much faster than LATEXrsquos whilenum)680 defMTwhilenum123681 tempcnta1relax682 MTloop 3683 advancetempcnta ne684 ifnumtempcnta lt 2MTrepeat685 686 langpackage|letterspacerang

IMPLEMENTATION Preliminaries 50

MTifluaotffont For fonts loaded by luaotfload we query the fontrsquos table687 langletterspacerangMTpdforlualetMTifluaotffontsecondoftwo688 langluatex-def|letterspacerangdefMTifluaotffontcsnameMTlua689 langluatex-defrang microtypeif_luaotf_font()690 langluafile|letterspacerang691 langluafileranglocal function if_luaotf_font()692 local thefont = fontgetfont(fontcurrent())693 if thefont and ( thefontformat == opentype or thefontformat == truetype )694 then texwrite(firstoftwo)695 else texwrite(secondoftwo)696 end697 langluafilerangend698 langluafilerangmicrotypeif_luaotf_font = if_luaotf_font699 langluafilerang700 langluafile|letterspacerang701 langluatex-def|letterspacerang endcsname702 langluatex-def|letterspacerang703 langletterspacerang

MTdofont Execute lang1rang 256 times704 langpdftex-def|letterspacerangdefMTdofontMTwhilenumzcclvi

resp for the whole font for LuaTEX if itrsquos a Unicode font705 langluatex-defrang706 defMTdofont1707 MTifluaotffont708 defMTdofontfunction1709 MTluamicrotypedo_font()710 MTwhilenumzcclvi1711 712 langluatex-defrang

This is the lua function which is much faster than looping through all glyphsin TEX Legacy fonts (which this function should never work on) donrsquot contain avindex field

713 langluafilerang714 local function do_font()715 local thefont = fontgetfont(fontcurrent())716 if thefont then717 for iv in nextthefontcharacters do718 if vindex == nil or vindex gt 0 then719 microtypesprint([[tempcnta=]]i[[relaxMTdofontfunction]])720 end721 end722 end723 end724 microtypedo_font = do_font725726 langluafilerang

The XETEX variant (itrsquos slow )727 langxetex-defrang728 defMTdofont1729 tempcnta=z730 MTloop731 iffontcharMTfonttempcnta 1fi732 advancetempcntane733 ifnumtempcnta lt XeTeXlastfontcharMTfont MTrepeat734 735 langxetex-defrang736 langpackagerang

MTcount

MTincrement

Increment macro lang1rang by one Saves using up too many counters The e-TEX way is

IMPLEMENTATION Preliminaries 51

slightly faster737 newcountMTcount738 defMTincrement1739 ^^X edef1numbernumexpr 1 + 1relax740 ^^Q MTcount=1relax741 ^^Q advanceMTcount ne742 ^^Q edef1numberMTcount743

MTscale Multiply and divide a counter If we are using e-TEX we will use its numexprprimitive This has the advantage that it is less likely to run into arithmetic overflowThe result of the division will be rounded instead of truncated Therefore wersquoll geta different (more accurate) result in about half of the cases

744 defMTscale123745 ^^Q multiply 1 2relax746 ifnum 3 = z747 ^^X 1=numexpr 1 2relax748 else749 ^^X 1=numexpr 1 2 3relax750 ^^Q divide 1 3relax751 fi752

MTabbrpr

MTabbrex

MTabbrprc

MTabbrexc

MTabbrprinh

MTabbrexinh

MTabbrnl

MTabbrsp

MTabbrspc

MTabbrspinh

MTabbrkn

MTabbrknc

MTabbrkninh

MTabbrtr

MTabbrtrc

Some abbreviations Thus we can have short command names but full-length logoutput

753 defMTabbrprprotrusion754 defMTabbrexexpansion755 defMTabbrprcprotrusion codes756 defMTabbrexcexpansion codes757 defMTabbrprinhprotrusion inheritance758 defMTabbrexinhexpansion inheritance759 defMTabbrnlnoligatures760 defMTabbrspspacing761 defMTabbrspcinterword spacing codes762 defMTabbrspinhinterword spacing inheritance763 defMTabbrknkerning764 defMTabbrknckerning codes765 defMTabbrkninhkerning inheritance766 defMTabbrtrtracking767 defMTabbrtrctracking amount

MTrbbaprotrusion

MTrbbaexpansion

MTrbbaspacing

MTrbbakerning

MTrbbatracking

These we also need the other way round768 defMTrbbaprotrusionpr769 defMTrbbaexpansionex770 defMTrbbaspacingsp771 defMTrbbakerningkn772 defMTrbbatrackingtr

MTfeatures

MTfeatureslong

We can work on these lists to save some guards in the dtx file773 defMTfeaturesprexspkntr774 defMTfeatureslongprotrusionexpansionspacingkerningtracking

MTisfeature Whenever an optional argument accepts a list of features we can use this com-mand to check whether a feature exists in order to prevent a rather confusinglsquoMissing endcsname insertedrsquo error message The feature (long form) must be inlang1rang the type of list to ignore in lang2rang then comes the action

775 defMTisfeature12776 MTinclist1MTfeatureslong777 ifMTinlist778 expandafterfirstofone779 else780 MTerror`1rsquo is not an available micro-typographicMessageBreak

IMPLEMENTATION Preliminaries 52

781 feature Ignoring 2Available features are `MTfeatureslongrsquo782 expandaftergobble783 fi784

1415 Compatibility

For the record the following LATEX kernel commands will be modified by microtype

bull pickupfont

bull dosubstcorrection

bull addaccent (all in section 1429)

bull showhyphens (in section 1446)

The wordcount package redefines the font-switching commands which willbreak microtype Since microtype doesnrsquot have an effect on the number of wordsin the document anyway we will simply disable ourselves

785 ifladedtexwordcount786 MTwarningnlDetected the `wordcountrsquo utilityMessageBreak787 Disabling `MTMTrsquo since it wouldnrsquot work788 MTclearoptionsendinputrelax

The minimal class doesnrsquot define any size commands other than normalsize whichwill result in lots of warnings Therefore we issue a warning about the warnings

789 ifclassloadedminimal790 MTwarningnlDetected the `minimalrsquo classMessageBreak791 Expect lots of warnings and some malfunctionsMessageBreak792 You might want to use a proper class instead793 relax

MTsetup The setup is deferred until the end of the preamble This has a couple of advantagesmicrotypesetup can be used to change options later on in the preamble and fontsdonrsquot have to be set up before microtype

794 langpackagerang795 langpackage|letterspacerang796 langplainrangMTrequireslatex1797 letMTsetupempty

MTaddtosetup We use our private hook to have better control over the timing This will also workwith eplain but not with miniltx alone

798 defMTaddtosetupgaddtomacroMTsetup

Donrsquot hesitate with miniltx799 langplainrangletMTaddtosetupfirstofone

MTwithpackageT We almost never do anything if a package is not loaded800 defMTwithpackageT1ifpackageloaded1firstofonegobble801 langpackage|letterspacerang802 langpackagerang

MTwithbabelandT LATEXrsquos ifpackagewith ignores the class options803 defMTwithbabelandT1804 MTifdefinednToptbabelpkgextension805 expandtwoargsMTinclist1806 csname optbabelpkgextensionendcsnameclassoptionslist807 ifMTinlistexpandaftergobblefi808 gobble809

IMPLEMENTATION Preliminaries 53

MTledmacsetup The ledmac package first saves each paragraph in a box from which it then splitsoff the lines one by one This will destroy character protrusion (There arenrsquot anyproblems with the lineno package since it takes a different approach) mdash mdashAfter much to and fro the situation has finally settled and there is a fix Beginningwith pdfTEX version 121b together with ledpatchsty as of 20050602 (v04)character protrusion will work at last

Peter Wilson was so kind to provide the ldunhboxline hook in ledmac toallow for protrusion leftmarginkern and rightmarginkern are new primitivesof pdfTEX 121b (aka 1300) They are also part of recent XETEX The successorpackages eledmac and reledmac are also supported

810 langpackagerang811 langpdftex-defrangMTrequirespdftex5812 langpdftex-def|luatex-def|xetex-defrang813 defMTledmacsetup814 ifMTprotrusion815 MTifdefinedcTFldunhboxline

MTledunhboxline Hook816 MTinfonlPatching ((r)e)ledmac to enable character protrusion817 letMTledunhboxlineldunhboxline818 renewcommandldunhboxline[1]819 ifhbox1820 kernleftmarginkern1821 expandafterMTledunhboxlineexpandafter1expandafter822 kernrightmarginkern1823 fi824

825 826 MTwarningnl827 Character protrusion in paragraphs with lineMessageBreak828 numbering will only work if you update ledmacMessageBreak829 or use one of its successors eledmac or reledmac830 831 fi832 833 langpdftex-def|luatex-def|xetex-defrang834 langpdftex-defrang835 836 defMTledmacsetup837 ifMTprotrusion838 MTwarningnl839 The pdftex version you are using does not allowMessageBreak840 character protrusion in paragraphs with lineMessageBreak841 numbering by the `((r)e)ledmacrsquo packageMessageBreak842 Upgrade pdftex to version 130 or later843 fi844 845 846 langpdftex-defrang

The shapepar package (v22) fixes this in a similar manner by itself so we donrsquothave to bother

MTrestoreph Restore meaning of and 847 langpackage|letterspacerang848 langpackagerang849 defMTrestorephchardef` chardef`

ifMTfontspec

ifMTxunicode

Two new conditionals for use with XETEX or LuaTEX850 newififMTfontspec851 MTwithpackageTfontspecMTfontspectrue

IMPLEMENTATION Preliminaries 54

852 newififMTxunicode853 MTwithpackageTxunicodeMTxunicodetrue

We need the correct value of the former for configuration commands inside thepreamble (to get the default families right)

854 ifltrfmtversion20201001855 AddToHookpackageafterfontspecMTfontspectruerelax

MTmaybegobblewithtikz

MTtikzsetup

If tikzexpandcount is greater than zero wersquore inside or at the end of a tikznode where we donrsquot want to adjust spacing after letterspacing lest we disturbtikz This is used in MTafteraftergroup and we donrsquot need it for letterspace

856 letMTmaybegobblewithtikzfirstofone857 defMTtikzsetup858 defMTmaybegobblewithtikz859 ifnumtikzexpandcountgtz860 expandaftergobble861 else862 expandafterfirstofone863 fi

MTsetupfonthook This hook will be executed every time a font is set up (inside a group)In the preamble we check for the packages each time a font is set up Thus it

will work regardless when the packages are loadedEven for packages that donrsquot activate any characters in the preamble (like

babel and csquotes) we have to check here too in case they were loaded beforemicrotype and a font is loaded AtBeginDocument before microtype (This isno longer needed since the complete setup is now deferred until the end of thepreamble However it is still necessary for defersetup=false)

864 defMTsetupfonthook

Spanish (as well as Galician and Mexican) babel modify storing the originalmeaning in percentsign

865 MTiffalse866 MTwithbabelandTspanish MTiftrue867 MTwithbabelandTgalicianMTiftrue868 MTwithbabelandTmexican MTiftrue869 ifMTifMTifdefinedcTpercentsignletpercentsignfi

Using disablequotes we can restore the original meaning of all charactersmade active by csquotes (It would be doable for older versions too but we wonrsquotbother)

870 MTwithpackageTcsquotes871 ifpackagelatercsquotes20050511disablequotesrelax

hyperref redefines and inside a url We restore the original meanings(which we can only hope are correct) Same for tex4ht and mathastext

872 MTiffalse873 MTwithpackageThyperref MTiftrue874 MTwithpackageTtex4ht MTiftrue875 MTwithpackageTmathastextMTiftrue876 ifMTifMTrestorephfi877 MTwithpackageTtikzMTtikzsetup878

Check again at the end of the preamble879 langpackagerang880 MTaddtosetup881 langpackagerang

Our competitor the pdfcprot package must not be tolerated

IMPLEMENTATION Preliminaries 55

882 MTwithpackageTpdfcprot883 MTerrorDetected the `pdfcprotrsquo packageMessageBreak884 `MTMTrsquo and `pdfcprotrsquo may not be used together885 The `pdfcprotrsquo package provides an interface to character protrusionMessageBreak886 So does the `MTMTrsquo package Using both packages at the sameMessageBreak887 time will almost certainly lead to undesired results Have your choice888 889 MTwithpackageT ledmacMTledmacsetup890 MTwithpackageT eledmacMTledmacsetup891 MTwithpackageTreledmacMTledmacsetup892 MTwithpackageTxunicodeMTxunicodetrue893 MTwithpackageTfontspecMTfontspectrue

We can clean up MTsetupfonthook now894 MTgletMTsetupfonthookempty895 MTiffalse896 MTwithbabelandTspanish MTiftrue897 MTwithbabelandTgalicianMTiftrue898 MTwithbabelandTmexican MTiftrue899 ifMTif900 gaddtomacroMTsetupfonthook901 MTifdefinedcTpercentsignletpercentsign902 fi903 MTwithpackageTcsquotes904 ifpackagelatercsquotes20050511905 gaddtomacroMTsetupfonthookdisablequotes906 907 MTwarningnl908 Should you receive warnings about unknown slotMessageBreak909 numbers try upgrading the `csquotesrsquo package910 911

We disable microtypersquos additions inside hyperrefrsquos pdfstringdef which redefineslots of commands hyperref doesnrsquot work with plain TEX so in that case we donrsquotbother

912 MTiffalse913 langpackagerang914 langplainrang MTrequireslatex2915 MTwithpackageThyperref916 pdfstringdefDisableCommands917 langpackagerang918 MTltxpickupfont919 lettextmicrotypecontextsecondoftwo920 letmicrotypecontextgobble921 langpackagerang922 deflsstylepdfstringdefWarnlsstyle923 deftextls1pdfstringdefWarntextls924 925 langpackagerang MTiftrue926 927 langplainrang relax928 langpackagerang929 MTwithpackageTtex4htMTiftrue930 MTwithpackageTmathastextMTiftrue931 ifMTifgaddtomacroMTsetupfonthookMTrestorephfi

The listings package makes numbers and letters active932 MTwithpackageTlistings933 gaddtomacroMTcfgcatcodes934 MTwhilenum303Acatcodetempcnta=12relax935 MTwhilenum415Bcatcodetempcnta=11relax936 MTwhilenum617Bcatcodetempcnta=11relax937

IMPLEMENTATION Font setup 56

and the backslash (which would lead to problems in MTgetslot)938 gaddtomacroMTsetupfonthook939 catcode`=z

Inside a listing space is redefined940 defspace

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

941 letlstProcessLetterempty942 943

Of course using both soulrsquos and microtypersquos letterspacing mechanisms at thesame time doesnrsquot make much sense But soul can do more eg underlining Theoptional argument to textls may not be used Also we have to disable expansionwithin soulrsquos trial run Under plain TEX soul doesnrsquot register itself the LATEX wayso we just test for its main command

944 langpackagerang945 ifxSOULundefinedelse946 soulregisterlsstyle 0947 soulregistertextls 1948 ifxXeTeXrevisionundefined949 letMTSOULdowordSOULdoword950 defSOULdowordpdfadjustspacing=z MTSOULdoword951 fi952 fi953 langpackagerang954 MTwithpackageTtikzMTtikzsetup

Compatibility with the pinyin package (from CJK) disable microtype in pymacronwhich loads a different font for the accent In older versions of pinyin (pre-460)pymacron had only one argument

955 MTwithpackageTpinyin956 letMTorigpymacronpymacron957 ifpackagelaterpinyin20050811 460958 defpymacron12959 MTltxpickupfont960 MTorigpymacron12961 MTMTpickupfont962 963 defpymacron1964 MTltxpickupfont965 MTorigpymacron1966 MTMTpickupfont967 968 969 langpackagerang970 971 langpackage|letterspacerang

We need a font (the minimal class doesnrsquot load one)972 langpackagerangexpandafterifxthefontnullfontnormalfontfi

142 Font setupMTsetupfont Setting up a font entails checking for each feature whether it should be applied to

the current font (MTfont)973 langpdftex-def|xetex-def|luatex-defrang974 defMTsetupfont

IMPLEMENTATION Font setup 57

With XETEX and LuaTEX the font may not be actually loaded hence we might see awrong font (in MTgetslot) Therefore we first load the current font

975 langxetex-def|luatex-defrang MTfont

We might have to disable stuff when used together with adventurous packages976 MTsetupfonthook

This will use a copy of the font (allowing for expansion parameter variation andthe use of more than one set of protrusion factors for a font within one paragraph)

977 langpdftex-defrangMTrequirespdftex7978 langpdftex-def|luatex-defranggaddtomacroMTsetupfontMTcopyfont979 langpdftex-defrangrelax

The font properties must be extracted from MTfont since the current value offencoding and friends may be wrong

980 gaddtomacroMTsetupfont981 MTexptwocMTsplitnamestringMTfontnil

Try to find a configuration file for the current font family982 MTexponenMTfindfileMTfamily983 ifxMTfamilyaliasempty else984 MTexponenMTfindfileMTfamilyaliasfi

We have to make sure that cfencoding expands to the correct value (for later inMTgetslot) which isnrsquot the case when selectfont chooses a new encoding(this would be done a second later in selectfont anyway ndash three lines to beexact) (I think I do not need this anymore ndash however Irsquom too afraid to remove it Oops I did it Letrsquos see whether anybody complains)

985 ifxfencodingcfencodingelseencupdatefi986

Tracking has to come first since it means actually loading a different font987 langpdftex-defrangMTrequirespdftex6988 langluatex-defrangMTrequiresluatex3989 langpdftex-def|luatex-defrang gaddtomacroMTsetupfontMTtrackingrelax990 gaddtomacroMTsetupfont991 MTcheckfont992 ifMTinlist993 langdebugrangMTshowpdfannot2994 else995 MTvinfoSetting up font `MTfontrsquoonline996 MTinfonotracking

Now we can begin setting up the font for all features that the current pdfTEXprovides The following commands are let to relax if the respective feature isdisabled via package options

For versions older than 120 protrusion has to be set up first beginning with120 the order doesnrsquot matter

997 MTprotrusion998 langpdftex-def|luatex-defrang MTexpansion999

Interword spacing and kerning (pdfTEX 140)1000 langpdftex-defrang1001 MTrequirespdftex61002 gaddtomacroMTsetupfontMTspacingMTkerning1003 relax1004 langpdftex-defrang

Disable ligatures (pdfTEX 130)1005 langpdftex-defrangMTrequirespdftex5

IMPLEMENTATION Font setup 58

1006 langpdftex-def|luatex-defranggaddtomacroMTsetupfontMTnoligatures1007 langpdftex-defrangrelax1008 gaddtomacroMTsetupfont

Debugging1009 langdebugrangMTshowpdfannot1

Finally register the font so that we donrsquot set it up anew each time1010 MTregisterfont1011 fi1012 1013 langpdftex-def|xetex-def|luatex-defrang

MTcopyfont

MTcopyfont

The new (1404) pdfcopyfont command allows expanding a font with differentparameters or to use more than one set of protrusion factors for a given fontwithin one paragraph It will be used when we find a context for SetProtrusionor SetExpansion in the preamble or when the package has been loaded with thecopyfonts option

1014 langpdftex-def|luatex-defrang1015 letMTcopyfontrelax1016 langpdftex-defrangMTrequirespdftex71017 defMTcopyfont

MTfontcopy For every new protrusion and expansion context we create a new copy1018 xdefMTfontcopycsnameMTfontMTprcontextMTexcontextendcsname1019 expandafterifxMTfontcopyrelax

MTfontorig pdfTEX doesnrsquot allow copying a font that has already been copied and expandedletterspaced Hence we have to get the original

1020 edefMTfontorigcsnameexpandafterstringfontname origendcsname1021 expandafterifxMTfontorigrelax1022 MTexptwocMTgletMTfontorigfontname1023 else1024 MTexptwocletfontnameMTfontorig1025 fi1026 langpdftex-defrang globalMTexptwocpdfcopyfontMTfontcopyfontname

Even though LuaTEX also provides the primitive from pdfTEX (even renamed tocopyfont that is lsquopromotedrsquo as per the LuaTEX manual) it is seriously crippled inthat OpenType features will be lost Therefore we do not copy the font but load itanew

1027 langluatex-defrang MTexptwocMTluacopyfontmeaningfontnamenil1028 langdebugrangMTdinfo1creating new copy MTfontcopy

Since itrsquos a new font we have to remove it from the context lists1029 MTmapclistcMTactivefeatures1030 MTexpcsifxMTnameuseMTabbr1relaxelse1031 deftempa11032 MTexpcsMTmaptlistcMT1doccontextsMTremfromlist1033 fi1034 1035 fi1036 MTexptwocletMTfontMTfontcopy

We only need the font identifier for letterspacing1037 letfontnameMTfontcopy

But we have to properly substitute the font after wersquore done1038 aftergroupletaftergroupfontnameaftergroupMTfontcopy1039

MTremfromlist

IMPLEMENTATION Font setup 59

1040 defMTremfromlist11041 MTexpcsifxMTtempa 1fontlistrelaxelse1042 expandafterMTexponenexpandafterMTremfromclistexpandafter1043 MTfont csname MTtempa 1fontlistendcsname1044 fi1045 1046 langpdftex-defrangrelax

MTluacopyfont lang1rang and lang2rang are lsquoselectrsquo and lsquofontrsquo respectively lang3rang is the font spec1047 langluatex-defrangdefMTluacopyfont 1 2 3nil1048 langluatex-defrang globalexpandafterfontMTfontcopy=3relax1049 langpdftex-def|luatex-defrang

Herersquos the promised dirty trick for users of older pdfTEX versions which worksaround the problem that the use of the same font with different expansion para-meters is prohibited If you do not want to create a clone of the font setup (thiswould require duplicating the tfmvf files under a new name and writing new fdfiles and map entries) you can load a minimally larger font for the paragraph inquestion Eg for a document typeset in 10 pt

SetExpansion [ stretch = 30 shrink = 60 step = 5 ] encoding = size = 10001 newcommandexpandpar[1] fontsize10001baselineskipselectfont 1par expandparThis 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 package 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

MTfixfontdimensix

MTdimensix

If fontdimen6 is zero character protrusion spacing kerning and tracking wonrsquotwork and we could skip the settings (for example the dsfont fonts donrsquot specifythis dimension this is probably a bug ndash the fourier and newpxnewtx packageshave been fixed in the meantime) However we can fix it ourselves ndash only trackingstill doesnrsquot work (it seems that letterspacefont uses the fontdimen 6 from theoriginal font) XETEX doesnrsquot provide an equivalent to pdffontsize so we use thenominal size instead

1050 langpdftex-def|luatex-def|xetex-defrang1051 defMTfixfontdimensix1052 ifnumfontdimen6MTfont=z1053 fontdimen6MTfont=1054 langpdftex-defrang pdffontsizeMTfont1055 langluatex-defrang MTrequiresluatex4pdffeedback fontsizepdffontsizeMTfont1056 langxetex-defrang MTsize pt1057 MTinfoFixing zero stringfontdimen 6 for font `MTfontrsquoMessageBreak1058 (new value thefontdimen6MTfont)1059 MTgletncMTfont-fake6empty1060 fi1061 edefMTdimensixnumberfontdimen6MTfont1062 1063 langpdftex-def|luatex-def|xetex-defrang

IMPLEMENTATION Font setup 60

MTsplitname

MTencoding

MTfamily

MTseries

MTshape

MTsize

Split up the font name (lang6rang may be a protrusionexpansion context andor aletterspacing amount) With fontspec we also need to remove its internal instancecounter

1064 langpackagerang1065 defMTsplitname123456nil1066 defMTencoding11067 ifMTfontspec1068 edefMTfamilyMTscrubfeature2()relax1069 else1070 defMTfamily21071 fi1072 defMTseries 31073 defMTshape 41074 defMTsize 51075 MTfixfontdimensix

MTfamilyalias Alias family1076 MTifdefinednTFMTMTfamily alias1077 MTletcnMTfamilyaliasMTMTfamily alias1078 letMTfamilyaliasempty1079

MTscrubfeature

MTscrubfeatures

Remove one resp all feature counters (fontspec)1080 defMTscrubfeature1(2)3relax11081 defMTscrubfeatures1(2)3relax1082 11083 ifxrelax3relaxelse1084 MTscrubfeatures3relax1085 fi1086

ifMTdo

MTfeat

MTmaybedo

We check all features of the current font against the lists of the currently activefont set and set ifMTdo accordingly

1087 newififMTdo1088 defMTmaybedo1

(but only if the feature isnrsquot globally set to false)1089 csname ifMTcsname MTabbr1endcsnameendcsname

Begin with setting micro-typography to true for this font The MTchecklisttests will set it to false if the property is not in the list The first non-empty list thatdoes not contain a match will stop us (except for font)

1090 MTdotrue1091 edeftempacsname MT1setnameendcsname1092 MTmapclistnfontencodingfamilyseriesshapesize1093 MTifdefinednTFMTchecklist11094 csname MTchecklist1endcsname1095 MTchecklist11096 11097 1098 else1099 MTdofalse1100 fi1101 ifMTdo

MTfeat stores the current feature1102 defMTfeat11103 csname MTset1codesendcsname1104 else1105 MTifstreq1tr1106 letMTinfonotrackingMTinfonotracking1107 MTvinfo No nameuseMTabbr11108 fi

IMPLEMENTATION Font setup 61

1109

MTinfonotracking

MTinfonotracking

To defer the message to after the font has actually been logged1110 letMTinfonotrackingrelax1111 defMTinfonotrackingMTvinfo No tracking

MTdinfolist

1112 langdebugrangdefMTdinfolist123MTdinfonl1nameuseMTabbr1 21113 langdebugrang ifx3list emptyelse `nameuseMT2rsquo 3 listfi

MTchecklist The generic test (lang1rang is the axis lang2rang the feature tempa contains the set name)1114 defMTchecklist121115 langdebugrang MTifdefinednT1116 langdebugrang MTifdefinednTF1117 MT2list1tempa

Begin a (neatly masqueraded) expandafter orgy to test whether the font attributeis in the list

1118 expandafterMTexponenexpandafterMTinclist1119 csname MT1expandafterendcsname1120 csname MT2list1tempaendcsname1121 ifMTinlist1122 langdebugrangMTdinfolist21in1123 MTdotrue1124 else1125 langdebugrangMTdinfolist21not in1126 MTdofalse1127 expandafterMTclistbreak1128 fi1129

If no limitations have been specified ie the list for a font attribute has not beendefined at all the font should be set up

1130 langdebugrang MTdinfolist211131

MTchecklistfamily Also test for the alias font if the original font is not in the list1132 defMTchecklistfamily11133 langdebugrang MTifdefinednT1134 langdebugrang MTifdefinednTF1135 MT1listfamilytempa1136 MTexptwonMTinclist1137 MTfamilycsname MT1listfamilytempaendcsname1138 ifMTinlist1139 langdebugrangMTdinfolist1familyin1140 MTdotrue1141 else1142 langdebugrangMTdinfolist1familynot in1143 MTdofalse1144 ifxMTfamilyaliasempty else1145 MTexptwonMTinclist1146 MTfamilyaliascsname MT1listfamilytempaendcsname1147 ifMTinlist1148 langdebugrang MTdinfolist1family aliasin1149 MTdotrue1150 langdebugrangelseMTdinfolist1family aliasnot in1151 fi1152 fi1153 fi1154 ifMTdo else1155 expandafterMTclistbreak1156 fi1157 1158 langdebugrang MTdinfolist1family

IMPLEMENTATION Font setup 62

1159

MTchecklistsize Test whether font size is in list of size ranges1160 defMTchecklistsize11161 langdebugrang MTifdefinednT1162 langdebugrang MTifdefinednTF1163 MT1listsizetempa1164 MTexpcsMTinrlistMT1listsizetempa1165 ifMTinlist1166 langdebugrangMTdinfolist1sizein1167 MTdotrue1168 else1169 langdebugrangMTdinfolist1sizenot in1170 MTdofalse1171 expandafterMTclistbreak1172 fi1173 1174 langdebugrang MTdinfolist1size1175

MTchecklistfont If the font matches we skip the rest of the test1176 defMTchecklistfont11177 langdebugrang MTifdefinednT1178 langdebugrang MTifdefinednTF1179 MT1listfonttempa

Since MTfont may be appended with context andor letterspacing specs weconstruct the name from the font characteristics

1180 edeftempbMTencodingMTfamilyMTseriesMTshapeMTsize1181 expandafterMTexponenexpandafterMTinclistexpandafter1182 tempb csname MT1listfonttempaendcsname1183 ifMTinlist1184 langdebugrangMTdinfolist1fontin1185 expandafterMTclistbreak1186 else1187 langdebugrangMTdinfolist1fontnot in1188 MTdofalse1189 fi1190 1191 langdebugrang MTdinfolist1font1192

1421 Protrusion

ifMTnofamily Info for settings that are not family-specific (Warnings seem to be too irritating)The switch is set in MTnextlistname

1193 newififMTnofamily1194 langpackagerang

MTprotrusion Set up for protrusion1195 langpdftex-def|xetex-def|luatex-defrang1196 defMTprotrusionMTmaybedopr

MTsetprcodes This macro is called by MTsetupfont and does all the work for setting up a fontfor protrusion

1197 defMTsetprcodes1198 MTnofamilyfalse

Check whether and if which list should be applied to the current font If family-specific settings donrsquot exist we write it to the log (for each encoding)

1199 MTiflistexists1200 ifMTnofamily

IMPLEMENTATION Font setup 63

1201 MTifdefinednTFMTencoding-MTfamily-settingsrelax1202 MTinfonlLoading generic protrusion settings for font familyMessageBreak1203 `MTfamilyrsquo (encoding MTencoding)MessageBreak1204 For optimal results create family-specific settingsMessageBreak1205 See the microtype manual for details1206 MTgletncMTencoding-MTfamily-settingsempty1207 1208 fi1209 MTgetopt1210 MTresetprcodes

Get the name of the inheritance list and parse it1211 MTgetinhlist

Set an input encoding1212 MTsetinputencc

Load additional lists1213 MTloadlistMTprcname1214 MTsetlistname

Load the main list1215 MTletcntempcMTprcMTprcname1216 expandafterMTsetcodestempcrelax1217 MTresetprcodes1218

MTsetallpr Set all protrusion codes of the font1219 defMTsetallpr121220 langdebugrangMTdinfonl3-- lprp setting all to 121221 letMTtempempty1222 MTifempty1relaxgaddtomacroMTtemplpcodeMTfonttempcnta=11223 MTifempty2relaxgaddtomacroMTtemprpcodeMTfonttempcnta=21224 MTdofontMTtemp1225

MTresetprcodes

MTresetprcodes

All protrusion codes are zero for new fonts However if we have to reload the fontdue to different contexts we have to reset them This command will be changed bymicrotypecontext if necessary

1226 defMTresetprcodesMTsetallprzz1227 letMTresetprcodesrelax

MTtheprcode

MTtheprcodetr

If the font is letterspaced we have to add half the letterspacing amount to themargin kerns This will be activated in MTsettrcodes

1228 defMTtheprcodetempcntb1229 langpdftex-def|luatex-defrang1230 langpdftex-defrangMTrequirespdftex61231 langluatex-defrangMTrequiresluatex31232 defMTtheprcodetr1233 numexprtempcntb+MTletterspace2relax1234 1235 relax1236 langpdftex-def|luatex-defrang

MTsetcodes Split up the values and set the codes1237 defMTsetcodes11238 ifxrelax1emptyelse1239 MTsplitcodes 1==relax1240 expandafterMTsetcodes1241 fi1242

MTsplitcodes The keyval package would remove spaces here which we neednrsquot do sinceSetProtrusion ignores spaces in the protrusion list anyway MTgetcharunit

IMPLEMENTATION Font setup 64

may mean different things1243 defMTsplitcodes1=2=3relax1244 deftempa11245 ifxtempaempty else1246 MTgetslot1247 langpdftex-def|luatex-defrang ifnumMTchar gt mne1248 langxetex-defrang ifxMTcharempty else1249 MTgetcharunit1250 csname MTMTfeat splitvalendcsname2relax1251 fi1252 fi1253

MTprsplitval

1254 defMTprsplitval12relax1255 deftempb11256 MTifemptytempbrelax1257 MTscaletoem1258 lpcodeMTfontMTchar=MTtheprcode1259 langdebugrangMTdinfonl4 lp (MTchar) numberlpcodeMTfontMTcharspace [1]1260 1261 deftempb21262 MTifemptytempbrelax1263 MTscaletoem1264 rpcodeMTfontMTchar=MTtheprcode1265 langdebugrangMTdinfonl4 rp (MTchar) numberrpcodeMTfontMTcharspace [2]1266

Now we can set the values for the inheriting characters Their slot numbers aresaved in the macro MTinhlanglist nameranglangslot numberrang

1267 MTifdefinedcTMTprinhname1268 MTifdefinednTMTinhMTprinhname MTchar 1269 MTexpcsMTmaptlistc1270 MTinhMTprinhname MTchar 1271 MTsetprheirs1272 1273 1274

MTscaletoem Since pdfTEX version 014h we have to adjust the protrusion factors (ie convertnumbers from thousandths of character width to thousandths of an em of the font)We have to do this before setting the inheriting characters so that the latter inheritthe absolute value not the relative one if they have a differing width (eg the lsquoffrsquoligature) Unlike protcodetex and pdfcprot we do not calculate with lpcoderesp rpcode since this would disallow protrusion factors larger than the characterwidth (since [lr]pcodersquos limit is 1000) Now the maximum protrusion is 1em ofthe font

The unit is in MTcount the desired factor in tempb and the result will bereturned in tempcntb

1275 langpdftex-defrangMTrequirespdftex31276 defMTscaletoem1277 tempcntb=MTcountrelax

For really huge fonts (100 pt or so) an arithmetic overflow could occur with vanillaTEX Using e-TEX this canrsquot happen since the intermediate value is 64 bit whichcould only be reached with a character width larger than maxdimen

1278 MTscaletempcntb tempb MTdimensix1279 ifnumtempcntb=z else1280 MTscalefactor1281 fi1282

IMPLEMENTATION Font setup 65

MTgetcharwd Get the width of the character When using e-TEX we can employ fontcharwdinstead of building scratch boxes

1283 defMTgetcharwd1284 langpdftex-defrang1285 ^^X MTcount=fontcharwdMTfontMTcharrelax1286 ^^Q setboxz=hboxMTfont charMTchar1287 ^^Q MTcount=wdz1288 langpdftex-defrang1289 langluatex-defrang MTcount=fontcharwdMTfontMTcharrelax

MTchar contains a slot number (legacy fonts) a Unicode number or a glyph name(if MTchar is negative)

1290 langxetex-defrang1291 ifnumMTcharltz1292 setboxz=hboxMTfont XeTeXglyph-MTchar1293 MTcount=wdz1294 else1295 MTcount=fontcharwdMTfontMTcharrelax1296 fi1297 langxetex-defrang1298 ifnumMTcount=z MTinfomissingchar fi1299

For letterspaced fonts we have to subtract the letterspacing amount from thecharactersrsquo widths The protrusion amounts will be adjusted in MTsetprcodesThe letterspaced font is already loaded so that 1em = fontdimen6

1300 langpdftex-defrang1301 MTrequirespdftex61302 gaddtomacroMTgetcharwd1303 MTifdefinedcTMTletterspace1304 advanceMTcount -dimexprMTletterspace sp dimexpr 1em1000relax1305 1306 relax1307

No adjustment with versions 014f and 014g1308 defMTscaletoem1309 MTcount=tempbrelax1310 ifnumMTcount=z else1311 MTscalefactor1312 fi1313

We need this in MTwarncodetoolarge (neutralised)1314 defMTgetcharwdMTcount=MTdimensix1315 1316 langpdftex-defrang1317 langpdftex-def|xetex-def|luatex-defrang

MTgetfontdimen For the space unit1318 langpackagerang1319 defMTgetfontdimen11320 ifnumfontdimen1MTfont=z1321 MTwarningnlFont `MTfontrsquo does not specify itsMessageBreak1322 backslashchar fontdimen 1 (itrsquos zero)MessageBreak1323 You should use a different `unitrsquo for MTcurrlistname1324 else1325 MTcount=fontdimen1MTfont1326 fi1327

MTinfomissingchar Info about missing characters or characters with zero width1328 defMTinfomissingchar

IMPLEMENTATION Font setup 66

1329 MTinfonlCharacter `theMTtoksrsquo1330 ^^X ifnumMTcharltz is missingelse1331 ^^X iffontcharMTfontMTchar1332 has a width of 0pt1333 ^^X else is missingfifi1334 ^^Q MessageBreak (itrsquos probably missing)1335 MessageBreak in font `MTfontrsquoMessageBreak1336 Ignoring protrusion settings for this character1337

MTscalefactor Furthermore we might have to multiply with a factor1338 defMTscalefactor1339 ifnumcsname MTMTfeat factorendcsname=m else1340 expandafterMTscaleexpandafter tempcntb1341 csname MTMTfeat factorendcsname m1342 fi1343 ifnumtempcntbgtcsname MTMTfeat maxendcsnamerelax1344 MTexpcsMTwarncodetoolargeMTMTfeat max1345 else1346 ifnumtempcntbltcsname MTMTfeat minendcsnamerelax1347 MTexpcsMTwarncodetoolargeMTMTfeat min1348 fi1349 fi1350

MTwarncodetoolarge Type out a warning if a chosen protrusion factor is too large after the conversionAs a special service we also type out the maximum amount that may be specifiedin the configuration

1351 defMTwarncodetoolarge11352 tempcnta=1relax1353 ifnumcsname MTMTfeat factorendcsname=m else1354 expandafterMTscaleexpandaftertempcntaexpandafter1355 m csname MTMTfeat factorendcsname1356 fi1357 MTscaletempcnta MTdimensix MTcount1358 MTwarningnlThe nameuseMTabbrMTfeat code tempbspace1359 is too large for characterMessageBreak1360 `theMTtoksrsquo in MTcurrlistnameMessageBreak1361 Setting it to the maximum of numbertempcnta1362 tempcntb=1relax1363

MTgetopt The optional argument to the configuration commands (except for SetExpansionand SetTracking which are being dealt with in MTgetexopt and MTgettroptresp)

1364 defMTgetopt1365 MTsetlistname

MTprfactor

MTspfactor

MTknfactor

Apply a factor1366 MTifdefinednTFMTMTfeat ccsname MTMTfeat cnameendcsname factor1367 MTletnnMTMTfeat factor1368 MTMTfeat ccsname MTMTfeat cnameendcsname factor1369 MTvinfo Multiplying nameuseMTabbrMTfeat codes by1370 numbercsname MTMTfeat factorendcsname10001371 1372 MTletnnMTMTfeat factorMTMTfeat factor1373

MTprunit

MTspunit

MTknunit

The unit can only be evaluated here since it might be font-specific If itrsquos emptyitrsquos relative to character widths if itrsquos minus1 relative to space dimensions

1374 MTifdefinednTFMTMTfeat ccsname MTMTfeat cnameendcsname unit1375 MTletnnMTMTfeat unit1376 MTMTfeat ccsname MTMTfeat cnameendcsname unit

IMPLEMENTATION Font setup 67

1377 MTexpcsifxMTMTfeat unitempty1378 MTvinfo Setting nameuseMTabbrMTfeat codes1379 relative to character widths1380 else1381 MTexpcsifxMTMTfeat unitmne1382 MTvinfo Setting nameuseMTabbrMTfeat codes1383 relative to width of space1384 fi1385 fi1386 1387 MTletnnMTMTfeat unitMTMTfeat unit1388

MTgetspaceunit

MTgetcharunit

The codes are either relative to character widths or to a fixed width For spacingand kerning lists they may also be relative to the width of the interword glue Onlythe setting from the top list will be taken into account

1389 letMTgetcharunitrelax1390 letMTgetspaceunitgobble1391 MTexpcsifxMTMTfeat unitempty1392 letMTgetcharunitMTgetcharwd1393 else1394 MTexpcsifxMTMTfeat unitmne1395 letMTgetspaceunitMTgetfontdimen1396 else1397 MTexpcsMTgetunitMTMTfeat unit1398 fi1399 fi

Preset all characters If so we surely donrsquot need to reset too1400 MTifdefinednTMTMTfeat ccsname MTMTfeat cnameendcsname preset1401 csname MTpresetMTfeatendcsname1402 MTletncMTresetMTfeat codesrelax1403 1404

MTgetunit

MTgetunit

If unit contains an em or ex we use the corresponding fontdimen to obtain thereal size Simply converting the em into points might give a wrong result sincethe font probably isnrsquot set up yet so that these dimensions havenrsquot been updatedeither

1405 defMTgetunit11406 expandafterMTgetunit1 enil1407 ifxxemptyelselet1xfi1408 defaultunitstempdima1 ptrelaxnnil1409 ifdimtempdima=z1410 MTwarningnl1411 Cannot set nameuseMTabbrMTfeat factors relative to zeroMessageBreak1412 width Setting factors of list `nameuseMTMTfeat cnamersquoMessageBreak1413 relative to character widths instead1414 let1empty1415 letMTgetcharunitMTgetcharwd1416 else1417 MTvinfo Setting nameuseMTabbrMTfeat factors relative1418 to thetempdima1419 MTcount=tempdimarelax1420 fi1421 1422 defMTgetunit1e23nil1423 ifx3letxempty else1424 if m21425 edefx1fontdimen6MTfont1426 else1427 if x21428 edefx1fontdimen5MTfont1429 fi

IMPLEMENTATION Font setup 68

1430 fi1431 fi1432

MTsetinputenc The configurations may be under the regime of an input encoding1433 defMTsetinputenc1

MTcat We remember the current category (c or inh) in case of warnings later1434 defMTcat1

1435 edeftempaMTMTfeat 1csname MTMTfeat 1nameendcsname inputenc1436 MTifdefinednTtempaMTsetinputenc1437

MTsetinputenc More recent versions of inputenc remember the current encoding so that we cantest whether we really have to load the encoding file

1438 MTaddtosetup1439 ifpackageloadedinputenc1440 ifpackagelaterinputenc200602221441 defMTsetinputenc1442 MTifstreqinputencodingnamecsnametempaendcsnamerelax1443 MTloadinputenc1444 1445 1446 letMTsetinputencMTloadinputenc1447 1448 1449 defMTsetinputenc1450 MTwarningnlKey `inputencrsquo used in MTcurrlistname but the `inputencrsquo1451 MessageBreak package isnrsquot loaded Ignoring input encoding1452 1453 1454

MTloadinputenc Set up normal catcodes since eg listings would otherwise want to actuallytypeset the inputenc file when it is being loaded inside a listing

1455 defMTloadinputenc1456 MTcfgcatcodes1457 langdebugrangMTdinfonl1loading input encoding nameusetempa1458 inputencodingnameusetempa1459 1460 langpackagerang

MTsetprheirs Set the inheriting characters1461 langpdftex-def|xetex-def|luatex-defrang1462 defMTsetprheirs11463 lpcodeMTfont 1=lpcodeMTfontMTcharrelax1464 rpcodeMTfont 1=rpcodeMTfontMTcharrelax1465 langdebugrangMTdinfonl2-- heir of MTchar 11466 langdebugrangMTdinfonl4 lprp (1) numberlpcodeMTfontMTcharspace1467 langdebugrang numberrpcodeMTfontMTcharspace1468

MTpresetpr

MTpresetpr

Preset characters Presetting them relative to their widths is not allowed1469 defMTpresetpr1470 expandafterexpandafterexpandafterMTpresetpr1471 csname MTprcMTprcname presetendcsnamenil1472 1473 defMTpresetpr12nil1474 ifxMTprunitempty1475 MTwarnpresettowidthpr1476 letMTpresetauxMTpresetauxfactor1477 else1478 defMTpresetauxMTpresetauxspace21479 fi

IMPLEMENTATION Font setup 69

1480 MTifempty1lettempaemptyMTpresetaux1tempa1481 MTifempty2lettempbemptyMTpresetaux2tempb1482 MTsetallprtempatempb1483

MTpresetaux

MTpresetauxfactor

MTpresetauxspace

Auxiliary macro for presetting Store value lang1rang in macro lang2rang1484 defMTpresetauxfactor121485 tempcntb=1relax1486 MTscalefactor1487 edef2numbertempcntb1488 1489 defMTpresetauxspace1231490 deftempb21491 MTgetspaceunit11492 MTscaletoem1493 edef3numbertempcntb1494

MTwarnpresettowidth

1495 defMTwarnpresettowidth11496 MTwarningnl1497 Cannot preset characters relative to their widthsMessageBreak1498 for nameuseMTabbr1 list `nameuseMT1cnamersquo Presetting them1499 MessageBreak relative to 1em instead1500 1501 langpdftex-def|xetex-def|luatex-defrang

1422 Expansion

MTexpansion Set up for expansion1502 langpdftex-def|luatex-defrang1503 defMTexpansionMTmaybedoex

MTsetexcodess Setting up font expansion is a bit different because of the selected option Thereare two versions of this macro

If selected=true we only apply font expansion to those fonts for which a listhas been declared (ie like for protrusion)

1504 defMTsetexcodess1505 MTiflistexists1506 MTgetexopt1507 letMTgetcharunitrelax1508 MTresetefcodes1509 MTgetinhlist1510 MTsetinputencc1511 MTloadlistMTexcname1512 MTsetlistname1513 MTletcntempcMTexcMTexcname1514 expandafterMTsetcodestempcrelax1515 MTexpandfont1516 relax1517 1518 langpdftex-def|luatex-defrang

MTsetexcodesn If on the other hand all characters should be expanded by the same amount weonly take the first optional argument to SetExpansion into account

ifMTnonselected We need this boolean in MTiflistexists so that no warning for missing listswill be issued

1519 langpackagerangnewififMTnonselected1520 langpdftex-def|luatex-defrang1521 defMTsetexcodesn1522 MTnonselectedtrue

IMPLEMENTATION Font setup 70

1523 MTiflistexists1524 MTgetexopt1525 1526 letMTstretch MTstretch1527 letMTshrink MTshrink1528 letMTstep MTstep1529 letMTauto MTauto1530 letMTexfactorMTexfactor1531 1532 MTresetefcodes1533 MTexpandfont1534 MTnonselectedfalse1535

MTsetexcodes Default is non-selected It can be changed in the package options1536 letMTsetexcodesMTsetexcodesn

MTexpandfont Expand the font For some reason older LuaTEX versions freeze if the autoexpandmodifier is missing Canrsquot be bothered to find out why For newer versions we couldalso use the function fontsetexpansion or in the future luaotfloadrsquos expansionfont feature

1537 langluatex-defrang1538 MTrequiresluatex31539 MTrequiresluatex4letpdffontexpandexpandglyphsinfontrelax1540 ifnumluatexversionlt791541 defMTexpandfont1542 pdffontexpandMTfont MTstretch MTshrink MTstep autoexpandrelax1543 1544 else1545 defMTexpandfont1546 pdffontexpandMTfont MTstretch MTshrink MTsteprelax1547 1548 fi1549 1550 langluatex-defrang1551 defMTexpandfont1552 pdffontexpandMTfont MTstretch MTshrink MTstep MTautorelax1553 1554 langluatex-defrang

MTsetallex

MTresetefcodes

At first all expansion factors for the characters will be set to 1000 (respectively thefactor of this font)

1555 defMTsetallex11556 langdebugrangMTdinfonl3-- ex setting all to number11557 MTdofontefcodeMTfonttempcnta=1relax1558 1559 defMTresetefcodesMTsetallexMTexfactor

MTresetefcodes However this is only necessary for pdfTEX versions prior to 120 or LuaTEX lt 090(actually I think 087)

1560 langpdftex-defrangMTrequirespdftex41561 langluatex-defrangMTrequiresluatex51562 1563 defMTresetefcodes1564 ifnumMTexfactor=m else1565 MTresetefcodes1566 fi1567 1568 1569 letMTresetefcodesMTresetefcodes1570

MTexsplitval Therersquos only one number per character

IMPLEMENTATION Font setup 71

1571 defMTexsplitval1relax1572 tempcntb=1relax

Take an optional factor into account1573 ifnumMTexfactor=m else1574 MTscaletempcntb MTexfactor m1575 fi1576 ifnumtempcntb gt MTexmax1577 MTwarnextoolargeMTexmax1578 else1579 ifnumtempcntb lt MTexmin1580 MTwarnextoolargeMTexmin1581 fi1582 fi1583 efcodeMTfontMTchar=tempcntb1584 langdebugrangMTdinfonl4 ef (MTchar) numberefcodeMTfontMTchar [1]

Heirs heirs I love thy heirs1585 MTifdefinedcTMTexinhname1586 MTifdefinednTMTinhMTexinhname MTchar 1587 MTexpcsMTmaptlistcMTinhMTexinhname MTchar MTsetexheirs1588 1589 1590

MTwarnextoolarge

1591 defMTwarnextoolarge11592 MTwarningnlExpansion factor numbertempcntbspace too large for1593 characterMessageBreak `theMTtoksrsquo in MTcurrlistnameMessageBreak1594 Setting it to the maximum of number11595 tempcntb=1relax1596

MTgetexopt

MTexfactor

MTstretch

MTshrink

MTstep

MTauto

Apply different values to this font1597 defMTgetexopt1598 MTsetlistname1599 MTifdefinednTFMTexcMTexcname factor1600 MTletcnMTexfactorMTexcMTexcname factor1601 MTvinfo Multiplying expansion factors by numberMTexfactor10001602 1603 letMTexfactorMTexfactor1604 1605 MTgetexoptstretchSetting stretch limit to numberMTstretch1606 MTgetexoptshrink Setting shrink limit to numberMTshrink1607 MTgetexoptstep Setting expansion step to numberMTstep1608 langluatex-defrang MTrequiresluatex3relax1609 MTgetexoptautoMTifstreqMTautoautoexpandEnDisabling automatic expansion1610 langluatex-defrang 1611 MTifdefinednTMTexcMTexcname preset1612 MTpresetex1613 letMTresetefcodesrelax1614 1615

MTgetexopt

1616 defMTgetexopt121617 MTifdefinednTFMTexcMTexcname 11618 MTletnnMT1MTexcMTexcname 11619 MTvinfo 21620 1621 MTletnnMT1MT11622 1623

MTsetexheirs

IMPLEMENTATION Font setup 72

1624 defMTsetexheirs11625 efcodeMTfont1=efcodeMTfontMTchar1626 langdebugrangMTdinfonl2-- heir of MTchar 11627 langdebugrangMTdinfonl4 ef (1) numberefcodeMTfontMTchar1628

MTpresetex

1629 defMTpresetex1630 tempcntb=csname MTexcMTexcname presetendcsnamerelax1631 MTscalefactor1632 MTsetallextempcntb1633 1634 langpdftex-def|luatex-defrang

1423 Interword spacing (glue)

MTspacing Adjustment of interword spacing Only works with pdfTEX1635 langpdftex-defrang1636 MTrequirespdftex61637 defMTspacingMTmaybedosp

MTsetspcodes This is all the same1638 defMTsetspcodes1639 MTiflistexists1640 MTgetopt1641 MTresetspcodes1642 MTgetinhlist1643 MTsetinputencc1644 MTloadlistMTspcname1645 MTsetlistname1646 MTletcntempcMTspcMTspcname1647 expandafterMTsetcodestempcrelax1648 MTresetspcodes1649

MTspsplitval If unit=space MTgetspaceunit will be defined to fetch the correspondingfontdimen (2 for the first 3 for the second and 4 for the third argument)

1650 defMTspsplitval123relax1651 deftempb11652 MTifemptytempbrelax1653 MTgetspaceunit21654 MTscaletoem1655 knbscodeMTfontMTchar=tempcntb1656 langdebugrangMTdinfonl4 knbs (MTchar) numberknbscodeMTfontMTchar [1]1657 1658 deftempb21659 MTifemptytempbrelax1660 MTgetspaceunit31661 MTscaletoem1662 stbscodeMTfontMTchar=tempcntb1663 langdebugrangMTdinfonl4 stbs (MTchar) numberstbscodeMTfontMTchar [2]1664 1665 deftempb31666 MTifemptytempbrelax1667 MTgetspaceunit41668 MTscaletoem1669 shbscodeMTfontMTchar=tempcntb1670 langdebugrangMTdinfonl4 shbs (MTchar) numbershbscodeMTfontMTchar [3]1671 1672 MTifdefinedcTMTspinhname1673 MTifdefinednTMTinhMTspinhname MTchar 1674 MTexpcsMTmaptlistcMTinhMTspinhname MTchar MTsetspheirs1675

IMPLEMENTATION Font setup 73

1676 1677

MTsetspheirs

1678 defMTsetspheirs11679 knbscodeMTfont1=knbscodeMTfontMTchar1680 stbscodeMTfont1=stbscodeMTfontMTchar1681 shbscodeMTfont1=shbscodeMTfontMTchar1682 langdebugrangMTdinfonl2-- heir of MTchar 11683 langdebugrangMTdinfonl4 knbsstbsshbs (1) numberknbscodeMTfontMTchar1684 langdebugrang numberstbscodeMTfontMTcharnumbershbscodeMTfontMTchar1685

MTsetallsp

MTresetspcodes

MTresetspcodes1686 defMTsetallsp1231687 langdebugrangMTdinfonl3-- knbsstbsshbs setting all to 1231688 letMTtempempty1689 MTifempty1relaxgaddtomacroMTtempknbscodeMTfonttempcnta=1relax1690 MTifempty2relaxgaddtomacroMTtempstbscodeMTfonttempcnta=2relax1691 MTifempty3relaxgaddtomacroMTtempshbscodeMTfonttempcnta=3relax1692 MTdofontMTtemp1693 1694 defMTresetspcodesMTsetallspzzz1695 letMTresetspcodesrelax

MTpresetsp

MTpresetsp 1696 defMTpresetsp1697 expandafterexpandafterexpandafterMTpresetsp1698 csname MTspcMTspcname presetendcsnamenil1699 1700 defMTpresetsp123nil1701 ifxMTspunitempty1702 MTwarnpresettowidthsp1703 MTifempty1lettempaemptyMTpresetauxfactor1tempa1704 MTifempty2lettempcemptyMTpresetauxfactor2tempc1705 MTifempty3lettempbemptyMTpresetauxfactor3tempb1706 else1707 MTifempty1lettempaemptyMTpresetauxspace21tempa1708 MTifempty2lettempcemptyMTpresetauxspace32tempc1709 MTifempty3lettempbemptyMTpresetauxspace43tempb1710 fi1711 MTsetallsptempatempctempb1712 1713 relax

1424 Additional kerning

MTkerning Again only check for additional kerning for new versions of pdfTEX1714 MTrequirespdftex61715 defMTkerningMTmaybedokn

MTsetkncodes Itrsquos getting boring I know1716 defMTsetkncodes1717 MTiflistexists1718 MTgetopt1719 MTresetkncodes1720 MTgetinhlist1721 MTsetinputencc1722 MTloadlistMTkncname1723 MTsetlistname1724 MTletcntempcMTkncMTkncname1725 expandafterMTsetcodestempcrelax1726 MTresetkncodes

IMPLEMENTATION Font setup 74

1727

MTknsplitval Again the unit may be measured in the space dimension this time only fontdimen 21728 defMTknsplitval12relax1729 deftempb11730 MTifemptytempbrelax1731 MTgetspaceunit21732 MTscaletoem1733 knbccodeMTfontMTchar=tempcntb1734 langdebugrangMTdinfonl4 knbc (MTchar) numberknbccodeMTfontMTchar [1]1735 1736 deftempb21737 MTifemptytempbrelax1738 MTgetspaceunit21739 MTscaletoem1740 knaccodeMTfontMTchar=tempcntb1741 langdebugrangMTdinfonl4 knac (MTchar) numberknaccodeMTfontMTchar [2]1742 1743 MTifdefinedcTMTkninhname1744 MTifdefinednTMTinhMTkninhname MTchar 1745 MTexpcsMTmaptlistcMTinhMTkninhname MTchar MTsetknheirs1746 1747 1748

MTsetknheirs

1749 defMTsetknheirs11750 knbccodeMTfont1=knbccodeMTfontMTchar1751 knaccodeMTfont1=knaccodeMTfontMTchar1752 langdebugrangMTdinfonl2-- heir of MTchar 11753 langdebugrangMTdinfonl4 knbc (1) numberknbccodeMTfontMTchar1754 langdebugrang numberknaccodeMTfontMTchar1755

MTsetallkn

MTresetkncodes

MTresetkncodes1756 defMTsetallkn121757 langdebugrangMTdinfonl3-- knacknbc setting all to 121758 letMTtempempty1759 MTifempty1relaxgaddtomacroMTtempknbccodeMTfonttempcnta=1relax1760 MTifempty2relaxgaddtomacroMTtempknaccodeMTfonttempcnta=2relax1761 MTdofontMTtemp1762 1763 defMTresetkncodesMTsetallknzz1764 letMTresetkncodesrelax

MTpresetkn

MTpresetkn 1765 defMTpresetkn1766 expandafterexpandafterexpandafterMTpresetkn1767 csname MTkncMTkncname presetendcsnamenil1768 1769 defMTpresetkn12nil1770 ifxMTknunitempty1771 MTwarnpresettowidthkn1772 letMTpresetauxMTpresetauxfactor1773 else1774 defMTpresetauxMTpresetauxspace21775 fi1776 MTifempty1lettempaemptyMTpresetaux1tempa1777 MTifempty2lettempbemptyMTpresetaux2tempb1778 MTsetallkntempatempb1779 1780 relax1781 langpdftex-defrang

IMPLEMENTATION Font setup 75

1425 Tracking

This only works with pdfTEX 140 or LuaTEX 0621782 langpdftex-def|luatex-defrang1783 langpdftex-defrangMTrequirespdftex61784 langluatex-defrangMTrequiresluatex31785

MTtracking

MTtracking

MTtrfontlist

We only check whether a font should not be letterspaced at all not whether wersquovealready done that (because we have to do it again)

1786 letMTtrfontlistempty1787 defMTtracking1788 MTexponenMTinclistMTfontMTtrfontlist1789 ifMTinlistelse1790 MTmaybedotr1791 ifMTdoelse1792 xdefMTtrfontlistMTtrfontlistMTfont1793 fi1794 fi1795 1796 langpdftex-def|luatex-defrang1797 langpdftex-def|luatex-def|letterspacerangletMTtracking1798 langpdftex-def|luatex-defrang MTtracking1799 langletterspacerang relax

MTsettrcodes The tracking amount is determined by the optional argument to textls settingsfrom SetTracking or the global letterspace option in this order

Tracking wonrsquot work if the original fontrsquos fontdimen6 is zero in which casewe issue a warning (once for every font)

1800 langpdftex-def|luatex-def|letterspacerang1801 defMTsettrcodes1802 langpdftex-def|luatex-defrang1803 MTvinfoTracking font `MTfontrsquoonline1804 MTifdefinednTFMTfont-fake61805 expandafterifxcsnameMTfont-fake6endcsnameempty1806 MTwarningnl1807 Font `MTfontrsquo does not specify itsMessageBreak1808 backslashchar fontdimen 6 (width of an `emrsquo) ThereforeMessageBreak1809 nameuseMTabbrMTfeat will not work with this font1810 MTgletncMTfont-fake6relax1811 fi1812 1813 MTiflistexists1814 MTgettropt1815 relax1816 langpdftex-def|luatex-defrang1817 MTifdefinedcTFMTletterspacerelaxletMTletterspaceMTletterspace1818 ifnumMTletterspace=z

Zero tracking requires special treatment1819 MTsettrzero1820 else1821 langpdftex-def|luatex-defrang MTvinfo Tracking by numberMTletterspace

Letterspacing only works in PDF mode1822 MTwarntrackingDVI

MTlsfont The letterspaced font instances are saved in macros langfont nameranglangletterspacingamountrangls

In contrast to MTfont which may reflect the font characteristics more accur-ately (taking substitutions into account) fontname is guaranteed to correspondto an actual font identifier

IMPLEMENTATION Font setup 76

1823 xdefMTlsfontcsnameexpandafterstringfontname1824 numberMTletterspace lsendcsname1825 expandafterifxMTlsfontrelax1826 langdebugrangMTdinfonl1 new letterspacing instance

In case of nested letterspacing with different amounts we have to extract the basefont again

1827 MTgetlsbasefont

luaotfload provides the faux font feature kernfactor which we will use whendealing with non-legacy fonts as it is less problematic and faster than the pdfTEXprimitive letterspacefont

1828 langluatex-def|letterspacerang1829 MTifluaotffont1830 langluatex-defampdebugrangMTdinfonl1 luaotf font MessageBreak1831 langluatex-defampdebugrang expandafterfontnamefontname1832 ifnumMTletterspaceltzdefMTminus-elseletMTminusemptyfi1833 globalexpandafterfontMTlsfont=1834 expandafterMTexptwocexpandafterMTlsfontspecfont1835 expandafterfontnameexpandafterfontnamespace nil1836 1837 langluatex-def|letterspacerang1838 langluatex-defampdebugrangMTdinfonl1 legacy font1839 globalexpandafterletterspacefontMTlsfontfontnameMTletterspace1840 langluatex-def|letterspacerang

Scale interword spacing (not configurable in letterspace)1841 langpdftex-def|luatex-defrang1842 MTifdefinedcTFMTtrispace1843 lettempaMTtrispace1844 edeftempaMTletterspace1845 MTifdefinedcTFMTtrospace1846 edeftempatempaMTtrospace1847 edeftempatempa1848 expandafterMTtrsetspacetempa1849 langpdftex-def|luatex-defrang1850 langletterspacerang1851 spacing = ltletterspace amountgt1852 fontdimen2MTlsfont=dimexprnumexpr 1000+MTletterspacerelax sp1853 fontdimen2MTlsfont1000relax1854 langletterspacerang

Adjust outer kerning (microtype only)1855 langpdftex-def|luatex-defrang1856 MTifdefinedcTFMTtrokernlettempaMTtrokerndeftempa1857 expandafterMTtrsetokerntempa

Disable ligatures (not configurable in letterspace)1858 MTifdefinedcTMTtrligaturesMTtrnoligatures1859 langpdftex-def|luatex-defrang1860 langletterspacerang1861 no ligatures = f1862 tagcodeMTlsfont`f=mne1863 langletterspacerang

Adjust protrusion values now and maybe later (in MTprsplitval) (not forLuaTEX though where letterspacing does not interfere with protrusion)

1864 langluatex-def|letterspacerang MTifluaotffontrelax1865 langdebugrangMTdinfonl2 compensating for tracking (numberMTletterspace)1866 MTdofontlpcodeMTlsfonttempcnta=numexprMTletterspace2relax1867 rpcodeMTlsfonttempcnta=numexprMTletterspace2relax1868 letMTtheprcodeMTtheprcodetr1869 langluatex-def|letterspacerang 1870 fi

IMPLEMENTATION Font setup 77

Finally let the letterspaced font propagate With LuaTEX we also need to load1871 aftergroupMTsetlsfont1872 langpdftex-def|luatex-defrang letMTfontMTlsfont1873 langluatex-defrang MTifluaotffontMTfontrelax

MTsetcurrls

MTcurrls

We need to remember the current letterspacing amount (for lslig)1874 xdefMTsetcurrlsdefnoexpandMTcurrlsMTletterspace1875 aftergroupMTsetcurrls

Adjust surrounding spacing and kerningMTsetcurros We get the current outer spacing and adjust it then after the end of the current

outer group set the current outer spacing again and adjust1876 langpdftex-def|luatex-defrang1877 MTouterspace=csname MTouterspaceexpandafterstringfontnameendcsnamerelax1878 xdefMTsetcurrosMTouterspace=theMTouterspacerelax1879 MTtrouterl1880 langpdftex-def|luatex-defrang

If MTlsadjust is empty itrsquos the starred version of textls Use scaling to avoida lsquoDimension too largersquo

1881 ifxMTlsadjustempty1882 langletterspacerang textls outer kerning = textls outer kerning = 001883 MTouterkern=-dimexprMTletterspace sp fontdimen6fontname2000relax1884 MTlsouterk

Otherwise get the current outer kerning and adjust it for left and right side(microtype only)

1885 langpdftex-def|luatex-defrang1886 else1887 MTouterkern=expandafterexpandafterexpandafterfirstoftwo1888 csname MTouterkernexpandafterstringfontnameendcsnamerelax1889 ifdimMTouterkern=zelse MTlsouterk fi1890 MTouterkern=expandafterexpandafterexpandaftersecondoftwo1891 csname MTouterkernexpandafterstringfontnameendcsnamerelax1892 langpdftex-def|luatex-defrang1893 langletterspacerang1894 xdefMTsetcurrokMTouterkern=theMTouterkernrelax1895 MTafteraftergroup1896 MTsetcurrok1897 noexpandMTlsouterk1898 1899 langletterspacerang1900 fi1901 langpdftex-def|luatex-defrang

MTsetcurrok Carry the outer kerning amount to outside the next group then set outer spacing(which will set kerning if no space follows)

1902 xdefMTsetcurrokMTouterkern=theMTouterkernrelax

Stuff to be done after the letterspace group The letterspace package only adjuststhe kerning

1903 MTafteraftergroup1904 MTsetcurros1905 MTsetcurrok1906 noexpandMTtrouterr1907 1908 langpdftex-def|luatex-defrang1909 fi1910 langpdftex-def|luatex-defrang 1911

MTafteraftergroup This helper macro carries stuff outside of the current group to the end of the nextgroup but will then respect grouping which is crucial for nested letterspacing

IMPLEMENTATION Font setup 78

(Following an idea of Will Robertson)1912 defMTafteraftergroup11913 langletterspacerang MTmaybegobblewithtikz1914 MTifdefinednTFMTaftergroupnumbercurrentgrouplevelrelax1915 MTexpcsxdefMTaftergroupnumbercurrentgrouplevel1916 MTexpcsMTgletMTaftergroupnumbercurrentgrouplevelnoexpandundefined11917 expandafteraftergroupexpandafteraftergroupMTexpcsaftergroup1918 MTaftergroupnumbercurrentgrouplevel1919 1920 langletterspacerang 1921 1922 langpdftex-def|luatex-def|letterspacerang

MTlsfontspeccolon

MTlsfontspecfont

Add the kernfactor feature to a font loaded by fontspec (we might have to addthe colon ourselves)

1923 langluatex-def|letterspacerang1924 defMTlsfontspeccolon1234nilifx312else123fi1925 defMTlsfontspecfont1 2nil1926 MTlsfontspeccolon1relaxnil1927 kernfactor=MTminus ifnumMTletterspace=1000 1else 01928 ifnumMTminusMTletterspacelt100 0fi1929 ifnumMTminusMTletterspacelt10 0fi1930 numberMTminusMTletterspace fi1931 ifx2 at fsize ptelse2firelax1932 1933 langluatex-def|letterspacerang

MTgettropt Various settings (only for the microtype version)1934 langpdftex-def|luatex-defrang1935 defMTgettropt1936 MTsetlistname1937 letMTtrfactorm

MTtrunit Different unit (for letterspace andor (outer)spacing)1938 MTifdefinednTMTtrcMTtrcname unit1939 MTletcnMTtrunitMTtrcMTtrcname unit1940 ifdimMTtrunit=1em1941 letMTtrunitundefined1942 else1943 MTgetunitMTtrunit1944 fi1945 1946 MTifdefinednTMTtrcMTtrcname1947 MTletcnMTletterspaceMTtrcMTtrcname1948 MTifdefinedcTMTtrunit1949 lettempbMTletterspace1950 MTscaletoem1951 edefMTletterspacenumbertempcntb1952 1953

MTtrispace

MTtrospace

Adjust interword spacing1954 MTgettroptspacing ispace1955 MTgettroptouterspacingospace

MTtrokern Adjust outer kerning1956 MTgettroptouterkerningokern

MTtrligatures Which ligatures should we disable (empty means all undefined none)1957 MTgettroptnoligatures ligatures1958

MTgettropt

1959 defMTgettropt12

IMPLEMENTATION Font setup 79

1960 MTifdefinednTMTtrcMTtrcname 11961 MTletnnMTtr2MTtrcMTtrcname 11962 1963 langpdftex-def|luatex-defrang

MTsetlsfont Redefine fontname which will be called a second later (in selectfont)1964 langpdftex-def|luatex-def|letterspacerang1965 langplainrangMTrequireslatex21966 defMTsetlsfontMTexptwocletfontnameMTlsfont

lsstyle Disable the tests whether the font should be letterspaced then trigger the setupOnly 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 againSetting glbcurrsize globally to empty (our previous solution) could throw usinto an infinite loop (eg with the psnfss packages via everymathsize) sowe issue glbsettings instead However in certain situations we may still misssome math fonts so letrsquos try to also enforce it by emptying glbcurrsize fingerscrossed The overhead seems small

1967 DeclareRobustCommandlsstyle1968 notmathalphabetlsstyletextls1969 letglbcurrsizeempty1970 langpdftex-def|luatex-defrang MTmaybegobblewithtikzaftergroupglbsettings1971 langpdftex-def|luatex-defrang defMTfeattr1972 letMTtrackingMTsettrcodes1973 selectfont1974

Now the definitions for the letterspace package with plain TEX1975 langplainrang1976 1977 defMTsetlsfontMTlsfont1978 deflsstyle1979 begingroup1980 escapecharmne1981 xdeffontnamecsnameexpandafterstringthefontendcsname1982 MTsettrcodes1983 endgroup1984 1985 lettextlsundefined1986 letlsligundefined1987 1988 langplainrang

lslig For Fraktur fonts some ligatures shouldnrsquot be broken up This command willtemporarily select the base font and insert the correct kerning

1989 DeclareRobustCommandlslig[1]1990 MTifdefinedcTFMTcurrls1991 escapecharmne1992 MTgetlsbasefont1993 MTouterkern=dimexprMTcurrls sp fontdimen6fontname2000relax1994 kernMTouterkern1995 fontname 11996 kernMTouterkern1997 11998

MTlsbasefont

MTgetlsbasefont

pdfTEX cannot letterspace fonts that already are letterspaced Therefore we haveto save the base font in langfont namerangbase

The previous solution (checking the macrorsquos 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

IMPLEMENTATION Font setup 80

1999 defMTgetlsbasefont2000 xdefMTlsbasefontcsnameexpandafterstringfontname baseendcsname2001 expandafterifxMTlsbasefontrelax2002 MTexptwocMTgletMTlsbasefontfontname2003 else2004 langdebugrangMTdinfonl1 fixing base font2005 MTexptwocletfontnameMTlsbasefont2006 fi2007

MTsetlsbasefont

MTsettrzero

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

2008 defMTsetlsbasefontMTexptwocletfontnameMTlsbasefont2009 defMTsettrzero2010 langdebugrangMTdinfonl1 zero tracking2011 xdefMTlsbasefontcsnameexpandafterstringfontname baseendcsname2012 expandafterifxMTlsbasefontrelax else2013 langdebugrangMTdinfonl1 fixing base font2014 aftergroupMTsetlsbasefont2015 fi2016 2017 langpdftex-def|luatex-def|letterspacerang

MTtrnoligatures pdfTEX 1400ndash1403 disabled all ligatures in letterspaced fonts2018 langpdftex-def|luatex-defrang2019 langpdftex-defrangMTrequirespdftex72020 defMTtrnoligatures2021 ifxMTtrligaturesempty2022 MTnoligaturesMTlsfontundefined2023 else2024 MTnoligaturesMTlsfontMTtrligatures2025 fi2026 2027 langpdftex-defrang2028 2029 defMTtrnoligatures2030 MTwarningnl2031 Disabling selected ligatures is only possible sinceMessageBreak2032 pdftex 1404 Disabling all ligatures instead2033 MTgletMTtrnoligaturesrelax2034 2035 2036 langpdftex-defrang

MTouterspace A new skip for outer spacing2037 newskipMTouterspace

MTtrsetspace Adjust interword spacing (fontdimen234) for inner and outer space For innerspacing the font dimensions will be adjusted the settings for outer spacing will beremembered in a macro

2038 defMTtrsetspace1234562039 langdebugrangMTdinfonl2 orig space thefontdimen2MTlsfont2040 langdebugrang thefontdimen3MTlsfont thefontdimen4MTlsfont2041 langdebugrang MessageBreak (123) (456)2042 letMTtempempty2043 MTtrsetspace142empty2044 MTtrsetspace253plus2045 MTtrsetspace364minus2046 MTgletncMTouterspaceexpandafterstringfontnameMTtemp2047 langdebugrangMTdinfonl2 inner space thefontdimen2MTlsfont2048 langdebugrang thefontdimen3MTlsfont thefontdimen4MTlsfont2049 langdebugrangMTdinfonl2 outer space MTtemp2050

IMPLEMENTATION Font setup 81

MTtrsetspace If settings for outer spacing lang2rang donrsquot exist they will be inherited from the innerspacing settings lang1rang

2051 defMTtrsetspace12342052 MTifempty22053 MTifempty1relax2054 MTtrsetspace1310002055 fontdimen3MTlsfont=tempdima2056 2057 edefMTtempMTtemp4thefontdimen3MTlsfont2058 2059 MTtrsetspace2320002060 edefMTtempMTtemp4thetempdima2061 MTifempty1relax2062 MTtrsetspace1310002063 fontdimen3MTlsfont=tempdima2064 2065 2066

MTtrsetspace If the value is followed by an asterisk the fontdimen will be scaled by the respectiveamount otherwise the value denotes the desired dimension in the respective unit

2067 defMTtrsetspace1232068 MTtestast1nil2069 MTifdefinedcTFMTtrunit2070 edeftempb1MTscaletoem2071 tempcntb=1relax2072 tempdima=dimexprtempcntb spMTdimensix1000relax

For fontdimen2 we also have to subtract the kerning that letterspacing adds toeach side of the characters (only half if itrsquos for outer spacing)

2073 ifnum2=tw2074 advancetempdima -dimexprMTletterspace spMTdimensix3relax2075 fi2076 2077 MTifemptytempalettempaMTletterspacerelax2078 tempdima=dimexpr numexpr1000+tempa sp fontdimen2MTlsfont1000relax2079 2080 langdebugrangMTdinfonl3 font dimen 2 (1) thetempdima2081

MTtrouterl Recall the last skip (must really be an interword space not just a marker nor alsquohardrsquo space ie one that doesnrsquot contain stretch or shrink parts)

2082 defMTtrouterl2083 ifhmode2084 ifdimlastskipgt5sp2085 edefxthelastskip minus 0pt2086 setboxzhboxMTouterspace=x2087 ifdimwdzgtz2088 langdebugrangMTdinfo2[[[ adjusting pre space theMTouterspace2089 unskip hskipMTouterspacerelax

Disable left outer kerning2090 letMTlsouterkrelax2091 else

The ragged2e package sets spaceskip without glue2092 ifdimlastskip=2093 ifnumspacefactorlt20002094 spaceskip2095 else2096 ifdimxspaceskip=z2097 dimexprspaceskip+fontdimen7fontnamerelax2098 else2099 xspaceskip

IMPLEMENTATION Font setup 82

2100 fi2101 fi2102 langdebugrangMTdinfo2[[[ adjusting pre space (skip) theMTouterspace2103 unskip hskipMTouterspacerelax2104 letMTlsouterkrelax2105 fi2106 fi2107 fi2108 fi2109

MTtrouternext

MTtrouterr

microtype also adjusts spacing The following is borrowed from soul Irsquove added thecases for italic correction since tracking may also be triggered by text commands(eg textsc)

2110 defMTtrouterr2111 futureletMTtrouternextMTtrouterr2112

MTifouternext We avoid using ifx tests in case MTtrouternext is let to fi etc2113 defMTifouternext12114 ifxMTtrouternext1expandafterfirstoftwoelseexpandaftersecondoftwofi2115

MTtrouterr

2116 defMTtrouterr2117 defMTtemp

Donrsquot adjust in math mode There was a tricky bug when textls was the lastcommand in a mathchoice group

2118 ifmmode else

A similar bug occurred when adjustment would happen inside a discretionarygroup which we prevent here This only works with e-TEX (which we know isavailable)

2119 ifnumcurrentgrouptype=10 else2120 defMTtemp1ifhmodehskipMTouterspace2121 langdebugrangMTdinfo2]]] adjusting post space (1) theMTouterspace2122 fi2123 expandafterifcatexpandafternoexpandcsname MTtrouternextendcsnameegroup

2124 ifhmodeunkernfiegroup2125 MTsetcurrok MTsetcurros2126 defMTtempafterassignmentMTtrouterrletMTtemp=2127 else

If the next token is maybeic (from an enclosing text command) we gobble itread the next one feed it to maybeic (via MTtroutericr) and then callourselves again

2128 MTifouternextmaybeic2129 MTsetcurrok MTsetcurros2130 defMTtempafterassignmentMTtroutericrletMTtemp=2131

If the next token is checkicr (from an inner text command) we insert ourselvesjust before it This will then call maybeic again the next round (which howeverwill always insert an italic correction since it doesnrsquot read beyond our group)

2132 MTifouternextcheckicr2133 defMTtempaftergroupMTtrouterrcheckicrletMTtemp=2134 2135 MTifouternextsptoken2136 defMTtemp ifhmodehskipMTouterspace2137 langdebugrangMTdinfo2]]] adjusting post space (2) theMTouterspace

IMPLEMENTATION Font setup 83

2138 fi2139 2140 MTifouternext~2141 defMTtemp~nobreakhskipMTouterspace2142 langdebugrangMTdinfo2]]] adjusting post space (3) theMTouterspace2143 2144 2145 MTifouternext relax2146 MTifouternextspacerelax2147 MTifouternextxobeysprelax

xspace requires special treatment2148 MTifouternextxspace2149 defMTtempxspaceMTxspace2150

If therersquos no outer spacing there may be outer kerning2151 defMTtempifdimMTouterkern=zelseMTlsouterk2152 langdebugrangMTdinfo2--- adjusting post kern theMTouterkern2153 fi2154 MTletncMTtrouternextrelax2155 fi2156 fifi2157 MTtemp2158

MTtroutericr

MTtroutericr

Helper macros for the italic correction mess2159 defMTtroutericrafterassignmentMTtroutericrMTtrouterr2160 defMTtroutericr2161 letlettoken= MTtrouternext2162 maybeic2163

MTxspace

MTxspace

If the group is followed by xspace we first feed xspace with the next token thencheck whether it has inserted a space lettoken might be something evil so itshould be encapsulated here

2164 defMTxspacefutureletlettokenMTxspace2165 defMTxspacexspacefirsttruexspace2166 ifdimlastskipgt5sp2167 unskip hskipMTouterspace2168 else2169 ifdimMTouterkern=zelseMTlsouterk fi2170 fi2171

For older pdfTEX versions and LuaTEX throw an error2172 2173 DeclareRobustCommandlsstyle2174 MTerrorLetterspacing only works with MTengine tex version2175 langpdftex-defrang 1402176 langluatex-defrang 0622177 MessageBreak or newer2178 Upgrade MTengine tex or try the `soulrsquo package instead2179 MTgletlsstylerelax2180 2181

And for XETEX too2182 langpdftex-def|luatex-defrang2183 langxetex-defrang2184 DeclareRobustCommandlsstyle2185 MTerrorLetterspacing currently doesnrsquot work with xetex2186 Run pdftex or luatex or use the `soulrsquo package instead2187 MTgletlsstylerelax2188

IMPLEMENTATION Font setup 84

2189 langxetex-defrangtextls

MTlsadjust

This command may be used like the other text commands The starred versionremoves kerning on the sides The optional argument changes the letterspacingfactor

2190 langpackage|letterspacerang2191 DeclareRobustCommandtextls2192 ifstarletMTlsadjustMTlsadjustemptyMTtextls2193 letMTlsadjustMTlsadjustrelaxMTtextls2194

MTtextls

MTletterspace

This is now almost LATEXrsquos DeclareTextFontCommand with the difference that weadjust the outer spacing and kerning also for lsstyle while LATEXrsquos text switchesdonrsquot bother about italic correction

2195 newcommandMTtextls[2][]2196 ifmmode2197 nfsstextMTlssetls1lsstyle22198 else2199 hmodebgroup2200 MTlssetls12201 lsstyle 22202 expandafter2203 egroup2204 fi2205

MTlsadjust

MTlsadjustempty

MTlsadjustrelax

MTlssetls

Set current letterspacing amount and outer kerning This has to be done inside thesame group as the letterspacing command

2206 defMTlsadjustemptyletMTlsadjustempty2207 defMTlsadjustrelaxletMTlsadjustrelax2208 defMTlssetls12209 MTifempty12210 letMTletterspaceundefined2211 KVspdefMTletterspace12212 edefMTletterspacenumberMTletterspace2213 MTlstoolargeMTletterspace2214 MTlsadjust2215

MTlstoolarge Test whether letterspacing amount is too large2216 defMTlstoolarge12217 ifnum1gtMTtrmax2218 MTwarningMaximum for option `letterspacersquo is numberMTtrmax2219 let1MTtrmax2220 else2221 ifnum1ltMTtrmin2222 MTwarningMinimum for option `letterspacersquo is numberMTtrmin2223 let1MTtrmin2224 fi2225 fi2226

MTouterkern

MTtrsetokern

This dimen is used for the starred version of textls for lslig and for adjustedouter kerning

2227 newdimenMTouterkern2228 langpackage|letterspacerang2229 langpdftex-def|luatex-defrang2230 defMTtrsetokern122231 letMTtempempty2232 MTifempty1MTtrsetokernMTtrsetokern12233 MTifempty2MTtrsetokernMTtrsetokern22234 MTgletncMTouterkernexpandafterstringfontnameMTtemp2235 langdebugrangMTdinfonl2 outer kerning (12)

IMPLEMENTATION Font setup 85

2236 langdebugrang = nameuseMTouterkernexpandafterstringfontname2237

MTtrsetokern

2238 defMTtrsetokern12239 MTtestast1nil2240 MTifdefinedcTFMTtrunit2241 edeftempb1MTscaletoem2242 tempcntb=1relax2243 tempdima=dimexpr tempcntb sp MTdimensix1000relax2244 2245 MTifemptytempalettempamrelax2246 tempdima=dimexpr numexprtempaMTletterspace1000relax sp2247 fontdimen6MTlsfont2000relax2248 2249 advancetempdima -dimexpr MTletterspace sp2250 fontdimen6MTlsfont2000relax2251 edefMTtempMTtempthetempdima2252 2253 langpdftex-def|luatex-defrang

MTlsouterk Adjust outer kerning We additionally add a marker (kern3spkern-3sp) for casesof nested letterspacing without anything actually printed

2254 langpdftex-def|luatex-def|letterspacerang2255 defMTlsouterk2256 ifhmode2257 ifdimlastkern=-3sp unkern2258 ifdimlastkern=3sp kern-3sp2259 expandafterexpandafterexpandaftergobble2260 else unkern2261 expandafterexpandafterexpandafterfirstofone2262 fi2263 else2264 expandafterfirstofone2265 fi2266 kernMTouterkernkern3spkern-3sprelax2267 fi2268 2269 langpdftex-def|luatex-def|letterspacerang

1426 Disabling ligatures

MTnoligatures The possibility to disable ligatures is a new features of pdfTEX 130 and also workswith LuaTEX

2270 langpdftex-def|luatex-defrang2271 langpdftex-defrangMTrequirespdftex52272 defMTnoligatures2273 MTdotrue2274 lettempaMTnlsetname2275 MTmapclistnfontencodingfamilyseriesshapesize2276 MTifdefinednTFMTchecklist12277 csname MTchecklist1endcsname2278 MTchecklist12279 nl2280 2281 ifMTdo2282 MTnoligaturesMTfontMTnlligatures2283 fi2284

MTnoligatures This is also used by MTsettrcodes2285 langluatex-defrangMTrequiresluatex4letpdfnoligaturesignoreligaturesinfontrelax2286 defMTnoligatures12

IMPLEMENTATION Font setup 86

2287 MTifdefinedcTF2

Early MiKTEX versions (before 252579) didnrsquot know tagcode2288 MTifdefinedcTFtagcode

No lsquoinputencrsquo key2289 letMTwarnmaybeinputencempty2290 defMTcurrlistnamebackslashchar DisableLigatures2291 MTmapclistc22292 KVspdeftempa1MTgetslot2293 ifnumMTchargtmne2294 tagcode1MTchar=mne

With LuaTEX we additionally register the ligatures that should be inhibited in atable (used by the luaotfload function keepligature)

2295 langluatex-defrang MTifluaotffont2296 langluatex-defrang MTluamicrotypenoligatures([[1]][[MTchar]])relax2297 fi2298 2299 MTvinfo Disabling ligatures for characters 22300 2301 pdfnoligatures12302 MTwarningCannot disable selected ligatures (pdftex doesnrsquotMessageBreak2303 know backslashchar tagcode) Disabling all ligatures ofMessageBreak2304 the font instead2305 2306 2307 pdfnoligatures12308 langluatex-defrang MTifluaotffont2309 langluatex-defrang MTluamicrotypenoligatures([[1]]_all_)relax2310 MTvinfo Disabling all ligatures2311 2312 2313 langpdftex-defrangrelax2314 langpdftex-def|luatex-defrang

For each potential ligature luaotfload will call the keepligature function whichexpects the first node of the ligature to check whether they should be kept orinhibited Herersquos our concoction of this function The table microtypeligs will bepopulated in MTnoligatures

2315 langluafilerang2316 microtypeligs = microtypeligs or 23172318 local function noligatures(fontcsliga)2319 local fontcs = match(fontcs([^ ]+))2320 microtypeligs[fontcs] = microtypeligs[fontcs] or 2321 tableinsert(microtypeligs[fontcs]liga)2322 end2323 microtypenoligatures = noligatures23242325 local function keepligature(c)2326 local nodedirect = nodedirect2327 local getfield = nodedirectgetfield2328 local getfont = nodedirectgetfont2329 local fch2330 if type(c) == userdata then -- in older luaotfload versions c was a node2331 f = cfont2332 ch = ccomponentschar2333 else -- since 26 c is a (direct node) number2334 f = getfont(c)2335 ch = getfield(getfield(ccomponents)char)2336 end2337 -- if ch then -- should always be true2338 local ligs = microtypeligs[match(texfontidentifier(f)([^ ]+))]

IMPLEMENTATION Font setup 87

2339 if ligs then2340 for _lig in pairs(ligs) do2341 if lig == _all_ or tonumber(lig) == ch then2342 return false2343 end2344 end2345 end2346 return true2347 -- end2348 end23492350 if luaotfload and luaotfloadletterspace then2351 if luaotfloadletterspacekeepligature then2352 microtypeinfo(overwriting function `keepligaturersquo)2353 end2354 luaotfloadletterspacekeepligature = keepligature2355 end23562357 langluafilerang

1427 Loading the configuration

MTloadlist Recurse through the lists to be loaded2358 langpackagerang2359 defMTloadlist12360 edeftempa12361 MTletcntempbMTMTfeat ctempa load2362 MTifstreqtempatempb2363 MTerrornameuseMTabbrMTfeat list `temparsquo cannot load itself2364 2365 ifxtempbrelax else2366 MTifdefinednTFMTMTfeat ctempb2367 MTvinfo First loading nameuseMTabbrMTfeat list `tempbrsquo2368 begingroup2369 MTloadlisttempb2370 endgroup2371 edefMTcurrlistnamenameuseMTabbrMTfeat list2372 noexpandMessageBreak`tempbrsquo2373 MTletcntempcMTMTfeat ctempb2374 expandafterMTsetcodestempcrelax2375 2376 MTerrornameuseMTabbrMTfeat list `tempbrsquo undefinedMessageBreak2377 Cannot load it from list `temparsquo2378 2379 fi2380 2381

MTfindfile Micro-typographic settings may be written into a file mt-langfont familyrangcfgMTfilelist We must also record whether wersquove already loaded the file

2382 letMTfilelistempty2383 defMTfindfile1

Check for existence of the file only once2384 MTinclist1MTfilelist2385 ifMTinlist else

Donrsquot forget that because reading the files takes place inside a group all commandsthat may be used there have to be defined globally

2386 MTbegincatcodes2387 letMTbegincatcodesrelax2388 letMTendcatcodesrelax2389 InputIfFileExistsmt-1cfg

IMPLEMENTATION Font setup 88

2390 edefMTcurrfilemt-1cfg2391 MTvinfo Loading configuration file MTcurrfile2392 MTxaddMTfilelist12393 2394 MTgetbasefamily1emptyemptyemptynil2395 MTexponenMTinclisttempaMTfilelist2396 ifMTinlist2397 MTxaddMTfilelist12398 else2399 InputIfFileExistsmt-tempacfg2400 edefMTcurrfilemt-tempacfg2401 MTvinfo Loading configuration file MTcurrfile2402 MTxaddMTfilelisttempa12403 2404 MTvinfo No configuration file mt-1cfg2405 MTxaddMTfilelist12406 2407 fi2408 2409 endgroup2410 fi2411

MTcfgcatcodes We have to make sure that all characters have the correct category code Especiallynew lines and spaces should be ignored since files might be loaded in the middleof the document This is basically nfsscatcodes (from the LATEX kernel) Irsquoveadded amp (in tabulars) (french) $ _ ~ and = (Turkish babel)

OK now all printable characters up to 127 are lsquootherrsquo We hope that letters arealways letters and numbers other (listings makes them active see section 1415)

We leave ^ at catcode 7 so that stuff like lsquo^^ffrsquo remains possible2412 defMTcfgcatcodes2413 makeatletter2414 catcode`^72415 catcode` 92416 catcode`^^I92417 catcode`^^M92418 catcode`z2419 catcode`ne2420 catcode`tw2421 catcode`62422 catcode`142423 MTmaptlistn2424 $amprsquo()+-lt=gt[]_`|~2425 makeother2426

MTbegincatcodes This will be used before reading the files as well as in all configuration commandsso that catcodes are also harmless when these commands are used outside theconfiguration files

2427 defMTbegincatcodes2428 begingroup2429 MTcfgcatcodes2430

MTendcatcodes End group if outside configuration file (otherwise relax)2431 letMTendcatcodesendgroup

MTgetbasefamily The family name might have a suffix eg for expert set (x) old style numbers (j)swash capitals (w) etc We mustnrsquot simply remove the last letter as this would makefor instance cms out of cmss and cmsy (OK cmex will still become cme )

We only work on the font name if it is longer than three characters

IMPLEMENTATION Font setup 89

Table 4

Order for matching fontattributes

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Encoding bull bull bull bull bull bull bull bull bull bull bull bull bull bull bull bullFamily bull bull bull bull bull bull bull bull - - - - - - - -Series bull bull bull bull - - - - bull bull bull bull - - - -Shape bull bull - - bull bull - - bull bull - - bull bull - -Size bull - bull - bull - bull - bull - bull - bull - bull -

2432 defMTgetbasefamily1234nil2433 ifxempty42434 deftempa1232435 else2436 lettempaempty2437 edeftempb12342438 expandafterMTgetbasefamilytempbnil2439 fi2440

MTgetbasefamily This will only remove one suffix (the longest match) so that combinations of suffixeswould have be to added manually (eg DeclareMicrotypeVariantsaw) Butotherwise something like lsquopplxrsquo would be truncated to lsquoprsquo

2441 defMTgetbasefamily12nil2442 edeftempatempa12443 ifx2expandaftergobbleelseexpandafterfirstofonefi2444 MTintlist2MTvariants2445 ifMTinlistelseMTgetbasefamily2nilfi2446

MTlistname

MTgetlistname

MTgetlistname

Try all combinations of font family series shape and size to get a list for the currentfont

2447 defMTgetlistname12448 langdebugrangMTdinfonl1trying to find nameuseMTabbr1 list for font `MTfontrsquo2449 letMTlistnameundefined2450 deftempb12451 MTmaptlistcMTtryorderMTgetlistname2452 2453 defMTgetlistname12454 expandafterMTnextlistname12455 ifxMTlistnameundefined else2456 expandafterMTtlistbreak2457 fi2458

MTtryorder Beginning with version 17 we always check for the font size Since the matchingorder has become more logical now it can be described in words so that we donrsquotneed table 4 in the documentation part any longer and can cast it off here

2459 defMTtryorder2460 111111101101110010111010100110002461 011101100101010000110010000100002462

MTnextlistname The current context is added to the font attributes That is the context must match2463 defMTnextlistname12342464 ifnum1=zMTnofamilytruefi2465 edeftempaMTencoding2466 ifnum1=ne MTfamily fi2467 ifnum2=ne MTseries fi2468 ifnum3=ne MTshape fi2469 ifnum4=ne fi2470 MTcontext

IMPLEMENTATION Font setup 90

2471 langdebugrangMTdinfonl1trying tempa2472 MTifdefinednTFMTtempb tempa2473 MTnextlistname42474

Also try with an alias family2475 ifnum1=ne2476 ifxMTfamilyaliasempty else2477 edeftempaMTencoding2478 MTfamilyalias2479 ifnum2=ne MTseriesfi2480 ifnum3=ne MTshapefi2481 ifnum4=ne fi2482 MTcontext2483 langdebugrangMTdinfonl1(alias) tempa2484 MTifdefinednTMTtempb tempa2485 MTnextlistname42486 2487 fi2488 fi2489 2490

MTnextlistname If size is to be evaluated do that otherwise use the current list2491 defMTnextlistname12492 ifnum1=ne2493 MTexpcsMTinrlistMTtempb tempa sizes2494 ifMTinlist2495 letMTlistnameMTsizename2496 fi2497 else2498 MTletcnMTlistnameMTtempb tempa2499 fi2500

MTiflistexists

MTcontext 2501 defMTiflistexists2502 MTletcnMTcontextMTMTfeat context2503 MTifstreqMTcontextletMTcontextemptyrelax2504 MTgetlistnameMTfeat c2505 MTifdefinedcTFMTlistname2506 MTedefnMTMTfeat cnameMTlistname2507 ifMTnonselected2508 MTvinfo Applying non-selected expansion (list `MTlistnamersquo)2509 else2510 MTvinfo Loading nameuseMTabbrMTfeat list `MTlistnamersquo2511 fi2512 firstoftwo2513

Since the name cannot be empty this is a sound proof that no matching listexists

2514 MTletncMTMTfeat cnameempty

Donrsquot warn if selected=false2515 ifMTnonselected2516 MTvinfo Applying non-selected expansion (no list)2517 else

Tracking doesnrsquot require a list either2518 MTifstreqMTfeattrrelax2519 MTwarningI cannot find a nameuseMTabbrMTfeat list2520 for fontMessageBreak`MTfontrsquo2521 ifxMTcontextemptyelsespace(context `MTcontextrsquo)fi2522 Switching offMessageBreaknameuseMTabbrMTfeat for this font

IMPLEMENTATION Font setup 91

2523 2524 fi2525 secondoftwo2526 2527

MTgetinhlist

MTcontext

The inheritance lists are global (no context)2528 defMTgetinhlist2529 letMTcontextempty

2530 MTgetlistnameMTfeat inh2531 MTifdefinedcTFMTlistname2532 MTedefnMTMTfeat inhnameMTlistname2533 langdebugrangMTdinfonl1 Using nameuseMTabbrMTfeat inheritance list2534 langdebugrang `MTlistnamersquo2535 MTletcntempcMTMTfeat inhMTlistname

If the list is empty it has already been parsed2536 ifxtempcempty else2537 langdebugrangMTdinfonl1parsing inheritance list

The group is only required in case an input encoding is given2538 begingroup2539 edefMTcurrlistnameinheritance listnoexpandMessageBreak`MTlistnamersquo2540 MTsetinputencinh2541 expandafterMTinhdotempcrelax2542 MTgletncMTMTfeat inhMTlistnameempty2543 endgroup2544 fi2545 2546 MTletncMTMTfeat inhnameundefined2547 2548

1428 Translating characters into slots

Get the slot number of the character in the current encodingMTgetslot There are lots of possibilities how a character may be specified in the configuration

files which makes translating them into slot numbers quite expensive Also wewant to have this as robust as possible so that the user does not have to solve asphinxrsquos riddle if anything goes wrong

MTchar

MTchar

The character is in tempa we want its slot number in MTchar2549 defMTgetslot2550 escapechar`2551 letMTcharmne2552 MTnoresttrue

Save unexpanded string in case we need to issue a warning message2553 MTtoks=expandaftertempa

It might be an active character ie an 8-bit character defined by inputenc If sowe will expand it here to its LICR form

2554 MTexptwocMTisactivestringtempanil

Now letrsquos walk through (hopefully) all possible cases

bull Itrsquos a letter a character or a number

2555 expandafterMTislettertemparelaxrelax2556 ifnumMTchar lt z

IMPLEMENTATION Font setup 92

bull OK so it must be a macro We do not allow random commands but only thosedefined in LATEXrsquos idiosyncratic font encoding scheme

If langencodingranglangcommandrang (thatrsquos one command) is defined we try to extract theslot number

We must be cautious not to stumble over accented characters consisting of twocommands like lsquoi or UCYRI hence string wouldnrsquot be safe enough

2557 MTifdefinednTFMTencodingMTdetokenizectempa2558 MTissymbol

bull Now wersquoll catch the rest which hopefully is an accented character (eg a)

2559 expandafterMTiscompositetemparelaxrelax2560 ifnumMTchar lt z

bull It could also be a chardefed command (eg the percent character) This seemsthe least likely case so itrsquos last

2561 expandafterMTexptwocexpandafterMTischarexpandafter2562 meaningexpandaftertempaMTcharstringrelaxrelaxrelax2563 fi2564 fi

2565 letMTcharMTchar2566 MTgetslot2567 escapecharmne2568 2569 langpackagerang

MTgetslot

2570 langpdftex-def|luatex-def|xetex-defrang2571 defMTgetslot

If itrsquos a legacy (ie TFM) font proceed as usual2572 langxetex-defrang ifnumXeTeXfonttypeMTfont=z2573 ifnumMTchar gt mne

In LuaTEX it may also be a glyph name prefixed with lsquorsquo2574 langluatex-defrang2575 ifnumMTchar=47relax2576 ifMTnorest else2577 tempcnta=MTlua2578 local glyph = microtypename_to_slot([[expandaftergobbletempa]]true)2579 if glyph then texwrite(glyph)2580 else texwrite(-1)2581 end2582 relax2583 ifnumtempcntaltz2584 MTwarnunknown2585 letMTcharmne2586 else2587 edefMTcharthetempcnta2588 langdebugrangMTdinfonl3gt `theMTtoksrsquo is a glyph name (thetempcnta)2589 fi2590 fi2591 else2592 langluatex-defrang

If the user has specified something like lsquofirsquo or wanted to define a number butforgot to use three digits wersquoll have something left of the string In this case weissue a warning and forget the complete string

2593 ifMTnorest else

IMPLEMENTATION Font setup 93

2594 MTwarnrest2595 langpdftex-def|luatex-defrang letMTcharmne2596 langxetex-defrang letMTcharempty2597 fi2598 langluatex-defrang fi2599 else2600 MTwarnunknown2601 langxetex-defrang letMTcharempty2602 fi2603 langxetex-defrang2604 else

There are more possibilities for XETEX It may also be a glyph name (prefixedwith lsquorsquo) We indicate this to MTgetcharwd by reversing the sign of MTchar

2605 ifnumMTchar=47relax2606 ifMTnorest edefMTcharU472607 else2608 tempcnta=XeTeXglyphindexexpandaftergobbletemparelax2609 ifnumtempcnta=z2610 MTwarnunknown2611 letMTcharempty2612 else2613 edefMTchartempaspace2614 edefMTchar-thetempcnta2615 langdebugrangMTdinfonl3gt `theMTtoksrsquo is a glyph name (thetempcnta)2616 fi2617 fi2618 else2619 ifnumMTchar gt mne2620 ifMTnorest

Or itrsquos a Unicode number which we mustnrsquot translate into a glyph number sincethe latter is font-specific

2621 tempcnta=XeTeXcharglyphMTcharrelax2622 ifnumtempcnta=z2623 MTinfomissingchar2624 letMTcharempty2625 else2626 langdebugrangMTdinfonl3gt (glyph number thetempcnta2627 langdebugrang glyph name XeTeXglyphnameMTfonttempcnta)2628 edefMTcharUMTchar2629 fi2630 else2631 MTwarnrest2632 letMTcharempty2633 fi2634 else2635 MTwarnunknown2636 letMTcharempty2637 fi2638 fi2639 fi2640 langxetex-defrang2641 2642 langpdftex-def|luatex-def|xetex-defrang

This is the lua function to translate glyph name into slot number Beginning withv22 luaotfload provides this function in an API which we use if available but(for now at least) keep the old code for backward compatibility

2643 langluafilerang2644 if luaotfload and luaotfloadaux and luaotfloadauxslot_of_name then2645 local slot_of_name = luaotfloadauxslot_of_name2646 microtypename_to_slot = function(name unsafe)2647 return slot_of_name(fontcurrent() name unsafe)

IMPLEMENTATION Font setup 94

2648 end2649 else2650 -- we dig into internal structure (should be avoided)2651 local function name_to_slot(name unsafe)2652 if fonts then2653 local unicodes2654 if fontsids then -- legacy luaotfload2655 local tfmdata = fontsids[fontcurrent()]2656 if not tfmdata then return end2657 unicodes = tfmdatasharedotfdataluatexunicodes2658 else -- new location2659 local tfmdata = fontshashesidentifiers[fontcurrent()]2660 if not tfmdata then return end2661 unicodes = tfmdataresourcesunicodes2662 end2663 local unicode = unicodes[name]2664 if unicode then -- does the rsquoorrsquo branch actually exist2665 return type(unicode) == number and unicode or unicode[1]2666 end2667 end2668 end2669 microtypename_to_slot = name_to_slot2670 end26712672 langluafilerang

MTisletter Input is a letter a character or a numberMTmaxchar

MTmaxslot

Warning if resulting character or slot number is too large2673 langpdftex-def|luatex-def|xetex-defrang2674 defMTmaxchar2675 langpdftex-defrang 127 2676 langluatex-def|xetex-defrang 1114111 2677 defMTmaxslot2678 langpdftex-defrang 255 2679 langluatex-def|xetex-defrang 1114111 2680 langpdftex-def|luatex-def|xetex-defrang

ifMTnorest Test whether all of the string has been used up2681 langpackagerang2682 newififMTnorest

2683 defMTisletter12relax2684 ifcat anoexpand1relax2685 edefMTcharnumber`12686 ifx22687 langdebugrangMTdinfonl3gt `theMTtoksrsquo is a letter (MTchar)2688 else2689 MTnorestfalse2690 fi2691 else2692 ifcat noexpand1relax2693 edefMTcharnumber`12694 langdebugrangMTdinfonl3gt `theMTtoksrsquo is a character (MTchar)2695 ifx22696 ifnumMTchar gt MTmaxchar MTwarnascii fi2697 else2698 MTnorestfalse2699 expandafterMTisnumber12relaxrelax2700 fi2701 fi2702 fi2703

MTisnumber Numbers may be specified as a three-digit decimal number (029) as a hexadecimalnumber (prefixed with 1D) or as a octal number (prefixed with rsquo rsquo35) They

IMPLEMENTATION Font setup 95

must consist of at least three characters (including the prefix) that is F is notpermitted

2704 defMTisnumber123relax2705 ifxrelax3relax else2706 ifxrelax2relax else2707 MTnoresttrue2708 if1relax2709 defxuppercaseedefMTcharnumber123x2710 langdebugrangMTdinfonl3gt a hexadecimal number MTchar2711 else2712 if1rsquorelax2713 defMTcharnumber1232714 langdebugrangMTdinfonl3gt an octal number MTchar2715 else2716 MTifint1232717 defMTcharnumber1232718 langdebugrangMTdinfonl3gt a decimal number MTchar2719 MTnorestfalse2720 fi2721 fi2722 ifnumMTchar gt MTmaxslot2723 MTwarnnumbertoolargenoexpand1noexpand2noexpand32724 letMTcharmne2725 fi2726 fi2727 fi2728

MTisactive Expand an active character (This was completely broken in v17 and only workedby chance before) We setdisplayprotect to translate eg Auml into A that isto whatever it is defined in the inputenc encoding file

Unfortunately the (older) inputenc definitions prefer the protectedgenericvariants (eg copyright instead of textcopyright) which our parser wonrsquotbe able to understand (Irsquom fed up now so you have to complain if you reallyreally want to be able to write lsquocopyrsquo instead of textcopyright thus rendering yourconfiguration files unportable)

Unicode characters (inputencutf8utf8x) are also supported2729 defMTisactive12nil2730 ifnumcatcode`1 = active2731 begingroup2732 setdisplayprotect2733 letIeCfirstofone2734 letinpencundefinedMTundefinedchar

Unicode handling has changed again with LATEX 201910012735 letUTFtwooctetsnoexpandempty2736 letUTFthreeoctetsnoexpandempty2737 letUTFfouroctetsnoexpandempty

We refrain from checking whether there is a sufficient number of octets2738 defUTFviiidefined1ifx 1relax2739 MTundefinedcharutf8elseexpandafter 1fi

For ucs (utf8x) Letrsquos call it experimental 2740 MTifdefinedcTPrerenderUnicode2741 PrerenderUnicodetempaletunicodecharfilterfirstofone

The expandafter hocus-pocus should please newunicodechar2742 edefxendgroup2743 defnoexpandtempaexpandafterexpandafterexpandafteremptytempa

Append what we think the translation is to the token register we use for the log

IMPLEMENTATION Font setup 96

2744 MTtoks=theMTtoksspace(=2745 expandafterexpandafterexpandafteremptytempa)2746 2747 x2748 fi2749

MTundefinedchar For characters not defined in the current input encoding2750 defMTundefinedchar1undefined in input encoding ``1rsquorsquo

MTissymbol The symbol commands might expand to funny stuff depending on context Insteadof simply expanding langcommandrang we construct the command langencodingranglangcommandrangand see whether its meaning is charlanghex numberrang which is the case for everythingthat has been defined with DeclareTextSymbol in the encoding definition files

2751 defMTissymbol2752 expandafterdefexpandafterMTcharexpandafter2753 csnameMTencodingMTdetokenizectempaendcsname

Since recently some glyphs are defined optionally in LATEX by checking if the glyphactually exists in the font (eg textasteriskcentered)

2754 expandafterexpandafterexpandafter2755 MTisoptcharMTchariffontcharcharelsefirelax2756 expandafterMTexptwocexpandafterMTischarexpandafter2757 meaningexpandafterMTcharMTcharstringrelaxrelaxrelax2758 ifnumMTchar lt z

In TU encoding some commands (currently textquotesingle textasciigraveand textquotedbl) are defined by means of the auxiliary macro removetligwhich we take care of here

2759 expandafterexpandafterexpandafterMTistligMTcharrelaxrelax2760 ifnumMTchar lt z

Finally if it hasnrsquot been defined by DeclareTextSymbol it could be a letter (egi when using frenchpro)

2761 expandafterexpandafterexpandafterMTisletterMTcharrelaxrelax2762 fi2763 fi2764

MTisoptchar This seems adventurous but wersquore only redefining the text command within thescope of our setup

2765 defMTisoptchar1iffontchar2char3else4firelax2766 ifx12767 iffontchar22768 expandafterchardef2769 csnameMTencodingMTdetokenizectempaendcsname=3relax2770 fi2771 fi2772

MTischar

MTcharstring

A helper macro that inspects the meaning of its argument2773 begingroup2774 catcode`=z

2775 MTmaptlistnCHARLEXmakeother2776 lowercase2777 defxendgroup2778 defMTcharstringCHAR2779 defMTischar1CHAR234relax2780 ifxrelax4relax2781 ifMTxunicode2782 expandafterMTischarxMTstripprefix1gtrelaxCHAR 2783 relaxrelaxrelaxrelaxrelax

IMPLEMENTATION Font setup 97

2784 fi2785 else2786 ifxrelax1relax2787 if3relax2788 edefMTcharnumber22789 MTifstreqMTcharstring34relaxMTnorestfalse2790 else2791 edefMTcharnumber232792 MTifstreqMTcharstring4relax2793 MTisxchar23|4CHARrelax2794 fi2795 langdebugrang MTdinfonl3gt `theMTtoksrsquo is a char (MTchar)2796 fi2797 fi2798

MTisxchar With fontspecrsquos TU encoding glyph numbers may be up to four digits2799 defMTisxchar1|2CHAR34relax2800 MTifstreqMTcharstring342801 edefMTcharnumber12MTnorestfalse2802

MTcharxstring

MTstripprefix

MTischarx

For xunicode which doesnrsquot countdef but rather defs the chars2803 defMTcharxstringCHAR 2804 defMTstripprefix1gt2relax22805 defMTischarx1CHAR 23456relax2806 ifxrelax1relax2807 ifxrelax6relaxelse2808 edefMTcharnumber23452809 MTifstreqRELAX gtCHAR 6relaxMTnorestfalse2810 langdebugrang MTdinfonl3gt `theMTtoksrsquo is a xunicode char (MTchar)2811 fi2812 fi2813 2814 2815 2816 x

MTistlig This might have to change again with the next LATEX release or so I feared butit still seems to be fine

2817 defMTistlig12relax2818 ifxremovetlig12819 langdebugrang MTdinfonl3gt `theMTtoksrsquo (removing removetlig)2820 MTremovetlig2821 fi2822

MTremovetlig We remove the removetlig command and only pass on the number2823 defMTremovetlig2824 expandafterMTexptwocexpandafterMTisnumber2825 expandaftersecondoftwoMTcharrelaxrelax2826

MTiscomposite Here we are dealing with accented characters specified as two tokens2827 defMTiscomposite12relax2828 ifx2else

Again we construct a control sequence this time of the form langencodingranglangaccentrang-langcharacterrang eg T1-a which we then expand once to see if it is aletter (if it has been defined by DeclareTextComposite) This should be robustfinally especially since we also detokenize the input instead of only stringifyingit Thus we will die gracefully even on wrong Unicode input without utf8

2829 expandafterdefexpandafterMTcharexpandaftercsnameexpandafter

IMPLEMENTATION Font setup 98

2830 stringcsnameMTencodingendcsname2831 MTdetokenizen1-MTdetokenizen2endcsname

In 2017 LATEX introduced a new way of declaring accented Unicode commands(DeclareUnicodeComposite) which we take care of here (UnicodeEncodingNamehas been introduced at the same time)

2832 ifxUnicodeEncodingNameundefinedelse2833 expandafterexpandafterexpandafter2834 MTisunicompMTchariffontcharelsefirelax2835 fi2836 expandafterexpandafterexpandafterMTisletterMTcharrelaxrelax

Again xunicode2837 ifnumMTchar lt z2838 ifMTxunicode2839 edefMTcharMTexptwocMTstripprefixmeaningMTchargtrelax2840 expandafterMTexptwocexpandafterMTischarxexpandafter2841 MTcharMTcharxstringrelaxrelaxrelaxrelaxrelax2842 fi2843 fi2844 fi2845

MTisunicomp Helper for DeclareUnicodeComposite2846 defMTisunicomp1iffontchar2else3firelax2847 ifx1edefMTchariffontchar2fifi2848

[What about math Well for a moment the following looked like a solution withmtismathchar defined accordingly analogous to MTischar above to pick upthe last two tokens (the meaning of a mathchardefrsquoed command expands to itshexadecimal notation)

defMTismathchar1 ifrelaxnoexpand1 its a macro letx1 else its a character mathchardefx=mathcode`1relax fi expandafterMTexptwocexpandaftermtismathcharexpandafter meaningexpandafterxmtmathcharstringrelaxrelaxrelax

However the problem is that mathcodes and mathchardefs have global scopeTherefore if they are changed by a package that loads different math fonts thereis no guarantee whatsoever that things will still be correct (eg the minus in cmsywhen the euler package is loaded) So no way to go unfortunately]

Some warning messages for performance reasons separated hereMTcurrlistname

MTsetlistname

The type and name of the current list defined at various places2849 defMTsetlistname2850 edefMTcurrlistnamenameuseMTabbrMTfeat listnoexpandMessageBreak2851 `nameuseMTMTfeat cnamersquo2852

MTwarnascii For lsquootherrsquo characters gt 127 we issue a warning (inputenc probably hasnrsquot beenloaded) since correspondence with the slot numbers would be purely coincidental

2853 defMTwarnascii2854 MTwarningnlCharacter `theMTtoksrsquo (= MTchar)2855 is outside of ASCII rangeMessageBreak2856 You must load the `inputencrsquo package before usingMessageBreak2857 8-bit characters in MTcurrlistname2858

IMPLEMENTATION Font setup 99

MTwarnnumbertoolarge Number too large2859 defMTwarnnumbertoolarge12860 MTwarningnl2861 Number 1 in encoding `MTencodingrsquo too largeMessageBreak2862 Ignoring it in MTcurrlistname2863

MTwarnrest Not all of the string has been parsed2864 defMTwarnrest2865 MTwarningnl2866 Unknown slot number of characterMessageBreak`theMTtoksrsquo2867 MTwarnmaybeinputencMessageBreak2868 in font encoding `MTencodingrsquoMessageBreak2869 Make sure itrsquos a single characterMessageBreak2870 (or a number) in MTcurrlistname2871

MTwarnunknown No idea what went wrong2872 defMTwarnunknown2873 MTwarningnl2874 Unknown slot number of characterMessageBreak`theMTtoksrsquo2875 MTwarnmaybeinputencMessageBreak2876 in font encoding `MTencodingrsquo in MTcurrlistname2877

MTwarnmaybeinputenc In case an input encoding had been requested2878 defMTwarnmaybeinputenc2879 MTifdefinednT2880 MTMTfeat MTcat csname MTMTfeat MTcat nameendcsname inputenc2881 (input encoding `nameuse2882 MTMTfeat MTcat csname MTMTfeat MTcat nameendcsname inputencrsquo)2883

1429 Hook into LATEXrsquos font selection

We append MTsetupfont to pickupfont which is called by LATEX every time afont is selected We then check whether wersquove already seen this font and if notset it up for micro-typography This ensures that we will catch all fonts and thatwe will not set up fonts more than once The whole package really hangs on thiscommand

In contrast to the pdfcprot package it is not necessary to declare in advancewhich fonts should benefit from micro-typographic treatment Also only thosefonts that are actually being used will be set up

For my reference

bull pickupfont is called by selectfont wrongfontshape orgetanddefinefonts (for math)

bull pickupfont calls definenewfont

bull definenewfont may call (inside a group)

ndash wrongfontshape which in turn will call pickupfont and thusdefinenewfont again or

ndash extractfont

bull getexternalfont is called by extractfont by itself and by the substitutionmacros

IMPLEMENTATION Font setup 100

Up to version 13 of this package we were using definenewfont as the hookwhich is only called for new fonts and therefore seemed the natural choice How-ever this meant that we had to take special care to catch all fonts we additionallyhad to set up the default font the error font (if it wasnrsquot the default font) we hadto check for some packages that might have been loaded before microtype andwere loading fonts eg jurabib ledmac pifont (loaded by hyperref) tipa andprobably many more Furthermore we had to include a hack for the IEEEtran classwhich loads all fonts in the class file itself (to fine tune inter-word spacing) andthe memoir class too To cut this short it seemed to get out of hand and I decidedthat it would be better to use pickupfont and decide for ourselves whether wersquovealready seen that font I hope the overhead isnrsquot too large

MTfontlist

MTfont

We use a comma separated list2884 letMTfontlistempty2885 letMTfontempty

All this is done at the beginning of the document It doesnrsquot work for plain ofcourse which doesnrsquot have pickupfont

2886 langpackagerang2887 langpackage|letterspacerang2888 langplainrangMTrequireslatex22889 MTaddtosetup

MTorigpickupfont The luatexja package redefines char which will upset our parsing of text symbolsand commands instead of fixing this we wonrsquot bother at least for the moment butsimply issue a warning and disable all further warnings The fix is left to the user bynot specifying any text commands but only (Unicode) letters The xeCJK packageor rather its xunicode-addon also modifies the way text symbols are defined (likeluatexja but in a different way) Again we only issue a warning

2890 langpackagerang MTwithpackageTluatexjaMTwarnunknownonceluatexja2891 langpackagerang MTwithpackageTxeCJK MTwarnunknownoncexeCJK

microtype also works with CJK in the sense that nothing will break when bothpackages are used at the same time However since CJK has its own way of encodingit is currently not possible to create character-specific settings That is the onlyfeature available with CJK fonts is (non-selected) expansion (Tracking doesnrsquotreally work for other reasons) Like us CJK redefines pickupfont

2892 ifpackageloadedCJK

The xeCJK package in turn pretends that CJK was loaded but does not changethe definition of pickupfont With xeCJK protrusion should be possible also forCJK characters I havenrsquot tried it though

2893 ifpackageloadedxeCJKfirstofone2894 ifpackagelaterCJK20061017 4702895 defMTorigpickupfontCJKifundefinedCJKplane2896 defMTorigpickupfontifundefinedCJKplane2897 gaddtomacroMTorigpickupfont2898 expandafterifxfontnamerelaxdefinenewfontfi

CJKutf8 redefines pickupfont once more (recent versions in PDF mode asdetermined by ifpdf which CJKutf8 loads)

2899 ifpackageloadedCJKutf82900 ifpackagelaterCJKutf820080522 4802901 ifpdfexpandaftersecondoftwoelseexpandafterfirstoftwofi2902 firstoftwo2903 firstoftwo2904 gaddtomacroMTorigpickupfont2905 expandafterifxcsnamecurrfontshapefsizeCJKplaneendcsnamerelax

IMPLEMENTATION Font setup 101

2906 definenewfontelsexdeffontname2907 csname currfontshapefsizeCJKplaneendcsnamefi2908 gaddtomacroMTorigpickupfont2909 expandafterifxcsname currfontshapefsizeCJKplaneendcsnamerelax2910 definenewfontdefCJKtempv2911 ifxCJKtempCJKplane2912 expandafterifxcsname CJKcmapffamilyCJKplaneendcsnamerelax2913 elsecsname CJKcmapffamilyCJKplaneendcsnamefi2914 else CJKaddcmapCJKplane fi2915 elsexdeffontname2916 csname currfontshapefsizeCJKplaneendcsnamefi2917 gobble2918 2919 firstofone

This is the normal LATEX definition2920 defMTorigpickupfontexpandafterifxfontnamerelaxdefinenewfontfi

Check whether pickupfont is defined as expected The warning issued byCheckCommand would be a bit too generic

2921 ifxpickupfontMTorigpickupfont else2922 MTwarningnl2923 Command stringpickupfontspace is not defined as expected2924 MessageBreak Patching it anyway Some things may break2925 langpackagerang2926 MessageBreak Double-check whether micro-typography is indeed2927 MessageBreak applied to the document2928 MessageBreak (Hint Turn on `verbosersquo mode)2929 langpackagerang2930 2931 fi

pickupfont Then we append our stuff Everything is done inside a group2932 gaddtomacropickupfontbegingroup

If the trace package is loaded we turn off tracing of microtypersquos setup which isextremely noisy

2933 MTwithpackageTtracegaddtomacropickupfontconditionallytraceoff2934 gaddtomacropickupfont2935 escapecharmne2936 langpackagerang2937 langdebugrang globalMTinannottrue2938 langdebugrang MTgletMTpdfannotempty2939 langdebugrang MTaddtoannot(line numberinputlineno)

If MTfont is empty no substitution has taken place hence fontname is correctOtherwise if they are different fontname does not describe the font actuallyused This test will catch first order substitutions like bx to b but it will still fail ifthe substituting font is itself substituted

2940 MTletcnMTfontMTsubstexpandafterstringfontname2941 ifxMTfontrelax2942 letMTfontfontname2943 else2944 ifxMTfontfontname else2945 langdebugrang MTaddtoannot= substituted with MTfont2946 MTregistersubstfont2947 fi2948 fi2949 MTsetupfont2950 langpackagerang2951 langletterspacerang MTtracking2952 endgroup2953 2954 langpackagerang

IMPLEMENTATION Font setup 102

MTpickupfont

MTMTpickupfont

MTltxpickupfont

Remember the patched command because we may have to disable ourselves incertain situations

2955 letMTpickupfontpickupfont2956 defMTMTpickupfont letpickupfontMTpickupfont2957 defMTltxpickupfontletpickupfontMTorigpickupfont

dosubstcorrection Additionally we hook into dosubstcorrection which is called if a substitutionhas taken place to record the name of the ersatz font Unfortunately this will onlywork for one-level substitutions We have to remember the substitute for the rest ofthe document not just for the first time it is called since we need it every time afont is letterspaced

2958 gaddtomacrodosubstcorrection2959 edefMTfontcsnamecurrfontshapefsizeendcsname2960 MTgletncMTsubstexpandafterstringfontnameMTfont

addaccent

MTorigaddaccent

Inside addaccent we have to disable microtypersquos setup since the grouping inthe patched pickupfont would break the accent if different fonts are used forthe base character and the accent Fortunately LATEX takes care that the fonts usedfor the accent are already set up so that we cannot be overlooking them

2961 letMTorigaddaccentaddaccent2962 defaddaccent122963 MTltxpickupfont2964 MTorigaddaccent122965 MTMTpickupfont2966 2967 langpackagerang2968 2969 langplainrangrelax2970 langpackagerang

Consequently (if all goes well) we are the last ones to change these commandstherefore there is no need to check whether our definition has survived

MTcheckfont Check whether wersquove already seen the current font2971 defMTcheckfontMTexponenMTinclistMTfontMTfontlist

MTregisterfont Register the current font2972 defMTregisterfontxdefMTfontlistMTfontlistMTfont

MTregistersubstfont Register the substituted font (only if it isnrsquot registered already) Additionally wehave to remove the substitute font from the list of fonts so that we set it up again

2973 defMTregistersubstfont2974 MTexponenMTinclistfontnameMTfontlist2975 ifMTinlistelse2976 xdefMTfontlistMTfontlistfontname2977 expandafterMTremfromclistMTfontMTfontlist2978 fi2979

14210 Context-sensitive setup

Here are the variants for context-sensitive setupMTactivefeatures The activated features are stored in this command

2980 letMTactivefeaturesempty

MTcheckfontcx Every feature has its own list of fonts that have already been dealt with If thefont neednrsquot be set up for a feature we temporarily disable the correspondingsetup command This should be more efficient than book-keeping the fonts in listsassociated with the combination of contexts as wersquove done it before

IMPLEMENTATION Font setup 103

2981 defMTcheckfontcx2982 MTiftrue2983 MTmapclistcMTactivefeatures2984 expandafterMTexponenexpandafterMTinclistexpandafterMTfont2985 csname MT1csname MT1contextendcsname fontlistendcsname2986 ifMTinlist2987 MTletncMTnameuseMTabbr1relax2988 else2989 MTiffalse2990 fi2991 2992 ifMTif MTinlisttrue else MTinlistfalse fi2993

MTregistersubstfontcx Add the substituted font to each feature list and possibly remove substitute font2994 defMTregistersubstfontcx2995 MTmapclistcMTactivefeatures2996 expandafterMTexponenexpandafterMTinclistexpandafterfontname2997 csname MT1csname MT1contextendcsname fontlistendcsname2998 ifMTinlist else2999 MTexpcsMTxadd3000 MT1csname MT1contextendcsname fontlist3001 fontname3002 expandafterMTexponenexpandafterMTremfromclistexpandafterMTfont3003 csname MT1csname MT1contextendcsname fontlistendcsname3004 fi3005 3006

MTregisterfontcx For each feature add the current font to the list unless we didnrsquot set it up3007 defMTregisterfontcx3008 MTmapclistcMTactivefeatures3009 MTexpcsifxMTnameuseMTabbr1relaxelse3010 MTexpcsMTxadd3011 MT1csname MT1contextendcsname fontlist3012 MTfont3013 deftempa13014 MTexpcsMTmaptlistcMT1doccontextsMTmayberemfromlist3015 fi3016 3017

MTmayberemfromlist Recurse through all context font lists of the document and remove the font unlessitrsquos the current context

3018 defMTmayberemfromlist13019 MTifstreqtempa1tempacsname MTtempa contextendcsnamerelax3020 expandafterMTexponenexpandafterMTremfromclistexpandafter3021 MTfont csname MTtempa 1fontlistendcsname3022 3023

microtypecontext

MTmicrotypecontext

The user may change the context so that different setups are possible This isespecially useful for multi-lingual documents

Inside the preamble this command shouldnrsquot actually do anything but remem-ber itself for later

3024 defmicrotypecontextMTbegincatcodesMTmicrotypecontext3025 defMTmicrotypecontext1MTendcatcodesMTaddtosetupmicrotypecontext13026 MTaddtosetup3027 DeclareRobustCommandmicrotypecontext3028 MTbegincatcodes3029 MTmicrotypecontext3030 3031 defMTmicrotypecontext13032 MTendcatcodes

IMPLEMENTATION Font setup 104

3033 MTsetupcontexts3034 letMTresetcontextrelax

We need to ensure that math fonts are set up anew3035 MTgletglbcurrsizeempty3036 setkeysMTC13037 selectfont3038 MTresetcontext3039 3040

textmicrotypecontext

MTtextmicrotypecontext

MTtextmicrotypecontext

This is just a wrapper around microtypecontext3041 DeclareRobustCommandtextmicrotypecontextMTbegincatcodesMTtextmicrotypecontext3042 defMTtextmicrotypecontext1MTendcatcodesMTtextmicrotypecontext13043 defMTtextmicrotypecontext12microtypecontext12

MTresetcontext

MTresetcontext

We have to reset the font at the end of the group provided there actually was achange

3044 defMTresetcontext3045 MTvinfoltltlt Resetting contextsonline3046 langdebugrang MessageBreak= MTprcontextMTexcontext3047 langdebugrang MTtrcontextMTkncontextMTspcontext3048 3049 selectfont3050

MTsetupcontexts The first time microtypecontext is called we initialise the context lists andredefine the commands used in pickupfont

3051 defMTsetupcontexts3052 MTmapclistcMTactivefeatures3053 MTgletncMT1fontlistMTfontlist3054 MTgletMTcheckfontMTcheckfontcx3055 MTgletMTregisterfontMTregisterfontcx3056 MTgletMTregistersubstfontMTregistersubstfontcx3057 MTgletMTsetupcontextsrelax3058

Define context keys3059 MTmapclistcMTfeatureslong3060 definekeyMTC1[]3061 edeftempbnameuseMTrbba13062 MTexponenMTinclisttempbMTactivefeatures3063 ifMTinlist

Using an empty context is only asking for trouble therefore we choose the lsquorsquoinstead (hoping for the LATEX usersrsquo natural awe of this character)

3064 MTifempty1defMTvaldefMTval13065 MTexpcsifxMTtempb contextMTval3066 langdebugrangMTdinfo1gtgtgt no change of 1 context `MTvalrsquo3067 else3068 MTvinfogtgtgt Changing 1 context to `MTvalrsquoMessageBreakonline3069 langdebugrang space(previous `nameuseMTtempb contextrsquo)3070 3071 defMTresetcontextaftergroupMTresetcontext

The next time we see the font we have to reset all factors3072 MTgletnnMTresettempb codesMTresettempb codes

We must also keep track of all contexts in the document3073 expandafterMTexponenexpandafterMTintlistexpandafter3074 MTval csname MTtempb doccontextsendcsname3075 ifMTinlist else3076 MTexpcsMTxaddMTtempb doccontextsMTval3077 langdebugrang MTdinfo1||| added 1 context nameuseMTtempb doccontexts

IMPLEMENTATION Configuration 105

3078 fi3079 MTedefnMTtempb contextMTval3080 fi3081 fi3082 3083

We also allow the activate shortcut3084 definekeyMTCactivate[]3085 setkeysMTCprotrusion=13086 setkeysMTCexpansion=13087

MTprcontext

MTexcontext

MTtrcontext

MTspcontext

MTkncontext

MTprdoccontexts

MTexdoccontexts

MTtrdoccontexts

MTspdoccontexts

MTkndoccontexts

MTextracontext

Initialise the contexts3088 MTexponenMTmapclistnMTfeaturesnl3089 MTdefnMT1context3090 MTdefnMT1doccontexts3091 3092 letMTextracontextempty

143 Configuration1431 Font sets

DeclareMicrotypeSet

DeclareMicrotypeSet

Calling this macro will create a comma list for every font attribute of the formMTlangfeatureranglistlangattributeranglangset namerang If the optional argument is empty lists forall available features will be created

The third argument must be a list of key=value pairs If a font attribute is notspecified we define the corresponding list to relax so that it does not constitutea constraint

3093 defDeclareMicrotypeSet3094 MTbegincatcodes3095 ifstar3096 MTDeclareSetAndUseIt3097 MTDeclareSet3098

MTDeclareSet

3099 newcommandMTDeclareSet[3][]3100 MTifempty13101 MTmapclistcMTfeaturesMTdeclaresets1233102 3103 MTmapclistn13104 MTifempty1relax3105 MTisfeature1set declaration `2rsquo3106 MTexponenMTdeclaresets3107 csname MTrbba1endcsname233108 3109 3110 3111 3112 MTendcatcodes3113

MTDeclareSetAndUseIt

3114 newcommandMTDeclareSetAndUseIt[3][]3115 MTDeclareSet[1]233116 UseMicrotypeSet[1]23117

MTcurrsetname We need to remember the name of the set currently being declared3118 letMTcurrsetnameempty

IMPLEMENTATION Configuration 106

MTdeclaresets Define the current set name and parse the keys3119 defMTdeclaresets1233120 defMTcurrsetname23121 MTifdefinednTMT1setMTcurrsetname3122 MTwarningRedefining nameuseMTabbr1 set `MTcurrsetnamersquo3123 MTmapclistnfontencodingfamilyseriesshapesize3124 MTgletncMT1list1MTcurrsetnameundefined3125 3126 3127 MTgletncMT1setMTcurrsetnameempty3128 langdebugrangMTdinfo1declaring nameuseMTabbr1 set `MTcurrsetnamersquo3129 setkeysMT1set33130

MTdefinesetkey lang1rang = font axis lang2rang = feature3131 defMTdefinesetkey123132 definekeyMT2set1[]3133 MTgletncMT2list1MTcurrsetnameempty3134 MTmapclistn13135 KVspdefMTval13136 MTgethighlevel1

We do not add the expanded value to the list 3137 MTexptwongaddtomacro3138 csname MT2list1MTcurrsetnameexpandafterendcsname3139 MTval3140

but keep in mind that the list has to be expanded at the end of the preamble3141 expandaftergaddtomacroexpandafterMTfontsets3142 csname MT2list1MTcurrsetnameendcsname3143 langdebugrangMTdinfonl1-- 1 nameuseMT2list1MTcurrsetname3144 3145

MTgethighlevel Saying for instance lsquofamily=rmrsquo or lsquoshape=bfrsquo will expand to rmdefault respbfdefault

3146 defMTgethighlevel13147 expandafterMTtestastMTvalnilrelax

And lsquofamily = rsquo will become familydefault3148 MTifemptytempadeftempa1relax

Test whether the command is actually defined3149 MTifdefinednTFtempa default3150 edefMTvalexpandafternoexpandcsname tempa defaultendcsname3151 MTwarning`backslashchartempa defaultrsquo is not a defined commandMessageBreak3152 Ignoring `1 = temparsquo in font setMessageBreak`MTcurrsetnamersquo3153 letMTvalempty

In contrast to earlier versions these values will not be expanded immediately butat the end of the preamble

3154 3155

MTtestast It the last character is an asterisk execute the second argument otherwise the firstone

3156 defMTtestast12nil3157 deftempa13158 MTifempty23159

MTfontsets

MTfixfontset

Fully expand the font specification and fix catcodes for all font sets Also remove

IMPLEMENTATION Configuration 107

fontspecrsquos counters3160 letMTfontsetsempty3161 defMTfixfontset13162 MTifdefinedcT13163 xdef113164 ifMTfontspec3165 xdef1expandafterMTscrubfeatures1()relax3166 fi3167 globalonelevelsanitize13168 3169

MTdefinesetkeysize size requires special treatment3170 defMTdefinesetkeysize13171 definekeyMT1setsize[]3172 MTmapclistn13173 defMTval13174 expandafterMTgetrangeMTval--nil3175 ifxMTvalrelax else3176 MTexpcsMTxadd3177 MT1listsizeMTcurrsetname3178 MTlowerMTupperrelax3179 fi3180 3181 langdebugrangMTdinfonl1-- size nameuseMT1listsizeMTcurrsetname3182 3183

Font sizes may also be specified as ranges This has been requested by AndreasBuumlhmann who has also offered valuable help in implementing this Now it is forinstance possible to set up different lists for fonts with optical sizes (The MinionProproject does this for the OpenType version of Adobersquos Minion (Available from CTANat pkgminionpro))

MTgetrange

MTupper

MTlower

Ranges will be stored as triplets of langlower boundranglangupper boundranglanglist namerangFor simple sizes the upper boundary is minus1

3184 defMTgetrange1-2-3nil3185 MTifempty13186 MTifempty23187 letMTvalrelax3188 3189 defMTlower03190 defMTval23191 MTgetsize3192 edefMTupperMTval3193 3194 3195 defMTval13196 MTgetsize3197 ifxMTvalrelax else3198 edefMTlowerMTval3199 MTifempty23200 MTifempty33201 defMTupper-1

2048 pt is TEXrsquos maximum font size3202 defMTupper20483203 3204 defMTval23205 MTgetsize3206 ifxMTvalrelax else3207 MTifdimMTlowergtMTval3208 MTerror3209 Invalid size range (MTlowerspace gt MTval) in font set

IMPLEMENTATION Configuration 108

3210 `MTcurrsetnamersquoMessageBreak Swapping sizes3211 edefMTupperMTlower3212 edefMTlowerMTval3213 3214 edefMTupperMTval3215 3216 MTifdimMTlower=MTupper3217 defMTupper-13218 relax3219 fi3220 3221 fi3222 3223

MTgetsize Translate a size selection command and normalise it3224 defMTgetsize

A single star would mean sizedefault which doesnrsquot exist so we define it to benormalsize

3225 ifMTvalrelax3226 deftempanormalsize3227 else3228 MTletcntempaMTval3229 fi3230 ifxtemparelaxelse3231 MTgetsize3232 fi

Test whether we finally got a number or dimension so that we can strip the lsquoptrsquo(defaultunits and strippt are kernel macros)

3233 MTifdimenMTval3234 defaultunitstempdimaMTval ptrelaxnnil3235 edefMTvalstrippttempdima3236 3237 MTwarningCould not parse font size `MTvalrsquoMessageBreak3238 in font set `MTcurrsetnamersquo3239 letMTvalrelax3240 3241

MTgetsize

MTgetsize

The relsize solution of parsing setfontsize does not work with the AMSclasses among others I hope my hijacking doesnrsquot do any harm We redefinesetfontsize instead of setfontsize because some classes might define thesize selection commands by simply using fontsize (eg the a0poster class)

3242 defMTgetsize3243 begingroup3244 defsetfontsize1234nilendgroupdefMTval23245 tempanil3246

The svjour3 class defines the size commands using conditionals using e-TEXprimitives we close any leftovers here

3247 ^^Xifclassloadedsvjour33248 ^^X defMTgetsize3249 ^^X tempcnta=currentiflevel3250 ^^X MTgetsize3251 ^^X MTloop3252 ^^X ifnumnumexprcurrentiflevel-1gttempcnta3253 ^^X csname fiendcsname3254 ^^X MTrepeat3255 ^^X 3256 ^^X

IMPLEMENTATION Configuration 109

3257 letMTgetsizeMTgetsize3258 ^^X

MTdefinesetkeyfont

3259 defMTdefinesetkeyfont13260 definekeyMT1setfont[]3261 MTgletncMT1listfontMTcurrsetnameempty3262 MTmapclistn13263 defMTval13264 MTifstreqMTvaldefMTvalrelax3265 expandafterMTgetfontMTvalnil3266 MTexptwongaddtomacro3267 csname MT1listfontMTcurrsetnameexpandafterendcsname3268 MTval3269 3270 expandaftergaddtomacroexpandafterMTfontsets3271 csname MT1listfontMTcurrsetnameendcsname3272 langdebugrangMTdinfonl1-- font nameuseMT1listfontMTcurrsetname3273 3274

MTgetfont Translate any asterisks3275 defMTgetfont123456nil3276 MTgetfont1234503277 ifxMTvalrelaxdefMTval0fi3278 expandaftergaddtomacroexpandaftertempbexpandafterMTval3279 letMTvaltempb3280

MTgetfont Helper macro also used by MTgetfontandsize3281 defMTgetfont1234563282 lettempbempty3283 defMTtemp123453284 MTgetaxisencoding13285 MTgetaxisfamily 23286 MTgetaxisseries 33287 MTgetaxisshape 43288 ifnum6gtzedeftempbtempbfi3289 MTifempty53290 MTwarnaxisemptysizestringnormalsize3291 defMTval3292 3293 defMTval53294 3295 MTgetsize3296

MTgetaxis

3297 defMTgetaxis123298 defMTval23299 MTgethighlevel13300 MTifemptyMTval3301 MTwarnaxisempty1csname 1defaultendcsname3302 expandafterdefexpandafterMTvalexpandaftercsname 1defaultendcsname3303 relax3304 expandaftergaddtomacroexpandaftertempbexpandafterMTval3305

MTwarnaxisempty

3306 defMTwarnaxisempty123307 MTwarning1 axis is empty in font specificationMessageBreak3308 `MTtemprsquo Using `2rsquo instead3309

We can finally assemble all pieces to define DeclareMicrotypeSetrsquos keys They are

IMPLEMENTATION Configuration 110

also used for DisableLigatures3310 MTexponenMTmapclistnMTfeaturesnl3311 MTdefinesetkeyencoding13312 MTdefinesetkeyfamily 13313 MTdefinesetkeyseries 13314 MTdefinesetkeyshape 13315 MTdefinesetkeysize 13316 MTdefinesetkeyfont 13317

UseMicrotypeSet To use a particular set we simply redefine MTlangfeaturerangsetname If the optionalargument is empty set names for all features will be redefined

3318 defUseMicrotypeSet3319 MTbegincatcodes3320 MTUseMicrotypeSet3321

MTUseMicrotypeSet

3322 newcommandMTUseMicrotypeSet[2][]3323 MTifempty13324 MTmapclistcMTfeaturesMTuseset123325 3326 MTmapclistn13327 MTifempty1relax3328 MTisfeature1activation of set `2rsquo3329 MTexponenMTuseset3330 csname MTrbba1endcsname23331 3332 3333 3334 3335 MTendcatcodes3336

MTprsetname

MTexsetname

MTtrsetname

MTspsetname

MTknsetname

MTuseset

Only use sets that have been declared3337 defMTuseset123338 MTifdefinednTFMT1set23339 MTxdefnMT1setname23340 3341 MTifdefinednTFMT1setnamerelax3342 MTxdefnMT1setnamenameuseMTdefault1set3343 3344 MTerror3345 The nameuseMTabbr1 set `2rsquo is undeclaredMessageBreak3346 Using set `nameuseMT1setnamersquo instead3347 3348

DeclareMicrotypeSetDefault This command can be used in the main configuration file to declare the defaultfont set in case no set is specified in the package options

3349 defDeclareMicrotypeSetDefault3350 MTbegincatcodes3351 MTDeclareMicrotypeSetDefault3352

MTDeclareMicrotypeSetDefault

3353 newcommandMTDeclareMicrotypeSetDefault[2][]3354 MTifempty13355 MTmapclistcMTfeaturesMTsetdefaultset123356 3357 MTmapclistn13358 MTifempty1relax3359 MTisfeature1declaration of default set `2rsquo3360 MTexponenMTsetdefaultset

IMPLEMENTATION Configuration 111

3361 csname MTrbba1endcsname23362 3363 3364 3365 3366 MTendcatcodes3367

MTdefaultprset

MTdefaultexset

MTdefaulttrset

MTdefaultspset

MTdefaultknset

MTsetdefaultset

3368 defMTsetdefaultset123369 MTifdefinednTFMT1set23370 langdebugrangMTdinfo1declaring default nameuseMTabbr1 set `2rsquo3371 MTxdefnMTdefault1set23372 3373 MTerror3374 The nameuseMTabbr1 set `2rsquo is not declaredMessageBreak3375 Cannot make it the default set Using setMessageBreak `allrsquo instead3376 MTxdefnMTdefault1setall3377 3378

1432 Variants and aliases

DeclareMicrotypeVariants

MTvariants

Specify suffixes for variants (see fontnamevariantsmap) The starred versionappends to the list

3379 letMTvariantsempty3380 defDeclareMicrotypeVariants3381 MTbegincatcodes3382 ifstar3383 MTDeclareVariants3384 letMTvariantsemptyMTDeclareVariants3385

MTDeclareVariants

3386 defMTDeclareVariants13387 MTmapclistn13388 deftempa13389 onelevelsanitizetempa3390 xdefMTvariantsMTvariantstempa3391 3392 MTendcatcodes3393

DeclareMicrotypeAlias This can be used to set an alias name for a font so that the file and the settings forthe aliased font will be loaded

3394 defDeclareMicrotypeAlias3395 MTbegincatcodes3396 MTDeclareMicrotypeAlias3397

MTDeclareMicrotypeAlias

3398 newcommandMTDeclareMicrotypeAlias[2]3399 deftempb23400 onelevelsanitizetempb3401 MTifdefinednTMT1alias3402 MTwarningAlias font family `tempbrsquo will override3403 alias `nameuseMT1aliasrsquoMessageBreak3404 for font family `1rsquo3405 MTxdefnMT1aliastempb

If we encounter this command while a font is being set up we also set the aliasfor the current font so that if DeclareMicrotypeAlias has been issued inside a

IMPLEMENTATION Configuration 112

configuration file the configuration file for the alias font will be loaded too3406 MTifdefinedcTMTfamily3407 langdebugrangMTdinfo1Activating alias font `tempbrsquo for `MTfamilyrsquo3408 MTgletMTfamilyaliastempb3409 3410 MTendcatcodes3411

LoadMicrotypeFile May be used to load a configuration file manually3412 defLoadMicrotypeFile13413 edeftempazapspace1 empty3414 onelevelsanitizetempa3415 MTexponenMTinclisttempaMTfilelist3416 ifMTinlist3417 MTvinfo Configuration file mt-tempacfg already loaded3418 else3419 MTxaddMTfilelisttempa3420 MTbegincatcodes3421 InputIfFileExistsmt-tempacfg3422 edefMTcurrfilemt-tempacfg3423 MTvinfo Loading configuration file MTcurrfile3424 3425 MTwarningConfiguration file mt-tempacfgMessageBreak3426 does not exist3427 3428 MTendcatcodes3429 fi3430 3431 langpackagerang3432 langpackage|letterspacerang

1433 Disabling ligatures

DisableLigatures

MTDisableLigatures

MTnlsetname

MTnlligatures

This is really simple now we can re-use the set definitions of DeclareMicrotypeSetthere can only be one set which wersquoll call lsquono ligaturesrsquo

The optional argument may be used to disable selected ligatures only3433 langpdftex-def|luatex-defrang3434 langpdftex-defrangMTrequirespdftex53435 defDisableLigatures3436 MTbegincatcodes3437 MTDisableLigatures3438 3439 newcommandMTDisableLigatures[2][]3440 MTifempty1relaxgdefMTnlligatures13441 xdefMTactivefeaturesMTactivefeaturesnl3442 globalMTnoligaturestrue3443 MTdeclaresetsnlno ligatures23444 gdefMTnlsetnameno ligatures3445 MTendcatcodes3446 3447 langpdftex-defrang3448 langpdftex-def|luatex-defrang

If pdfTEX is too old we throw an error3449 langpdftex-def|xetex-defrang3450 renewcommandDisableLigatures[2][]3451 MTerrorDisabling ligatures of a font is only possibleMessageBreak3452 with pdftex version 130 or newerMessageBreak3453 Ignoring stringDisableLigatures3454 langpdftex-defrang Upgrade3455 langxetex-defrang Use3456 pdftex3457

IMPLEMENTATION Configuration 113

3458 langpdftex-defrang3459 langpdftex-def|xetex-defrang

1434 Interaction with babel

DeclareMicrotypeBabelHook Declare the context that should be loaded when a babel language is selected Thecommand will not check whether a previous declaration will be overwritten

3460 langpackagerang3461 defDeclareMicrotypeBabelHook123462 MTmapclistn13463 KVspdeftempa13464 MTgdefnMTbabeltempa23465 3466 3467 langpackagerang

1435 Fine tuning

The commands SetExpansion and SetProtrusion provide an interface for settingthe character protrusion resp expansion factors for a set of fonts

SetProtrusion This macro accepts three arguments [options] set of font attributes and list ofcharacter protrusion factors

A new macro called MTprclangnamerang will be defined to be lang3rang (ie the list ofcharacters not expanded)

3468 langpdftex-def|xetex-def|luatex-defrang3469 defSetProtrusion3470 MTbegincatcodes3471 MTSetProtrusion3472

MTSetProtrusion

MTprcname

MTextracontext

MTpermutelist

We want the catcodes to be correct even if this is called in the preamble3473 newcommandMTSetProtrusion[3][]3474 letMTextracontextempty

Parse the optional first argument We first have to know the name before we candeal with the extra options

3475 MTsetnamedkeysMTprc13476 langdebugrangMTdinfo1creating protrusion list `MTprcnamersquo3477 defMTpermutelistprc3478 setkeysMTcfg2

We have parsed the second argument and can now define macros for all permuta-tions of the font attributes to point to MTprclangnamerang

3479 MTpermute

which we can now define to be lang3rang Here as elsewhere we have to make thedefinitions global since they will occur inside a group

3480 MTgdefnMTprcMTprcname33481 MTendcatcodes3482 3483 langpdftex-def|xetex-def|luatex-defrang

SetExpansion SetExpansion only differs in that it allows some extra options (stretch shrinkstep auto)

3484 langpdftex-def|luatex-defrang3485 defSetExpansion3486 MTbegincatcodes3487 MTSetExpansion3488

IMPLEMENTATION Configuration 114

MTSetExpansion

MTexcname

MTextracontext

MTpermutelist

3489 newcommandMTSetExpansion[3][]3490 letMTextracontextempty3491 MTsetnamedkeysMTexc13492 MTifdefinednTMTexcMTexcname factor3493 ifnumcsname MTexcMTexcname factorendcsname gt m3494 MTwarningnlExpansion factor numbernameuseMTexcMTexcname factor3495 too large in listMessageBreak `MTexcnamersquo Setting it to the3496 maximum of 10003497 MTgletncMTexcMTexcname factorm3498 fi3499 3500 langdebugrangMTdinfo1creating expansion list `MTexcnamersquo3501 defMTpermutelistexc3502 setkeysMTcfg23503 MTpermute3504 MTgdefnMTexcMTexcname33505 MTendcatcodes3506

SetTracking

3507 defSetTracking3508 MTbegincatcodes3509 MTSetTracking3510

MTSetTracking Third argument may be empty3511 newcommandMTSetTracking[3][]3512 letMTextracontextempty3513 MTsetnamedkeysMTtrc13514 langdebugrangMTdinfo1creating tracking list `MTtrcnamersquo3515 defMTpermutelisttrc3516 setkeysMTcfg23517 MTpermute3518 KVspdeftempa33519 MTifemptytemparelax3520 MTifinttempa3521 MTxdefnMTtrcMTtrcnametempa3522 MTwarningValue `temparsquo is not a number inMessageBreak3523 tracking set `MTcurrsetnamersquo3524 MTendcatcodes3525 3526 langpdftex-def|luatex-defrang

SetExtraSpacing

3527 langpdftex-defrang3528 defSetExtraSpacing3529 MTbegincatcodes3530 MTSetExtraSpacing3531

MTSetExtraSpacing

MTspcname

MTextracontext

MTpermutelist

3532 newcommandMTSetExtraSpacing[3][]3533 letMTextracontextempty3534 MTsetnamedkeysMTspc13535 langdebugrangMTdinfo1creating spacing list `MTspcnamersquo3536 defMTpermutelistspc3537 setkeysMTcfg23538 MTpermute3539 MTgdefnMTspcMTspcname33540 MTendcatcodes3541

SetExtraKerning

IMPLEMENTATION Configuration 115

3542 defSetExtraKerning3543 MTbegincatcodes3544 MTSetExtraKerning3545

MTSetExtraKerning

MTkncname

MTextracontext

MTpermutelist

3546 newcommandMTSetExtraKerning[3][]3547 letMTextracontextempty3548 MTsetnamedkeysMTknc13549 langdebugrangMTdinfo1creating kerning list `MTkncnamersquo3550 defMTpermutelistknc3551 setkeysMTcfg23552 MTpermute3553 MTgdefnMTkncMTkncname33554 MTendcatcodes3555 3556 langpdftex-defrang

MTsetnamedkeys

MToptions

We first set the name (if specified) then remove it from the list and set theremaining keys

3557 langpackagerang3558 defMTsetnamedkeys123559 defx1name=23nil3560 setkeys1name=23561 gdefMToptions133562 MTremfromclistname=MToptions3563 3564 x2name=nil3565 expandtwoargssetkeys1MToptions3566

MTdefinecodekey Define the keys for the configuration lists (which are setting the codes in pdfTEXspeak)

3567 defMTdefinecodekey123568 definekeyMT21[]3569 tempcnta=ne3570 MTmapclistn13571 KVspdefMTval1

Here too we allow for something like lsquobfrsquo It will be expanded immediately3572 MTgethighlevel13573 MTedefnMTtemp1thetempcntaMTval3574 advancetempcnta ne3575 3576 3577

MTdefinecodekeyfamily Remove fontspecrsquos internal feature counter3578 defMTdefinecodekeyfamily13579 definekeyMT1family[]3580 tempcnta=ne3581 MTmapclistn13582 KVspdefMTval13583 MTgethighlevelfamily3584 ifMTfontspec3585 edefxedefnoexpandMTvalnoexpandMTscrubfeatureMTval()relaxx3586 fi3587 MTedefnMTtempfamilythetempcntaMTval3588 advancetempcnta ne3589 3590 3591

MTdefinecodekeysize MTtempsize must be in a csname so that it is at least relax not undefined

IMPLEMENTATION Configuration 116

3592 defMTdefinecodekeysize13593 definekeyMT1size[]3594 MTmapclistn13595 KVspdefMTval13596 expandafterMTgetrangeMTval--nil3597 ifxMTvalrelax else3598 MTexpcsMTxaddMTtempsize3599 MTlowerMTupperMTcurrsetname3600 fi3601 3602 3603

MTdefinecodekeyfont

3604 defMTdefinecodekeyfont13605 definekeyMT1font[]3606 MTmapclistn13607 KVspdefMTval13608 MTifstreqMTvaldefMTvalrelax3609 expandafterMTgetfontandsizeMTvalnil3610 ifMTfontspec3611 edeftempbexpandafterMTscrubfeaturestempb()relax3612 fi3613 MTxdefnMTMTpermutelist tempbMTextracontext3614 csname MTMTpermutelist nameendcsname3615 langdebugrangMTdinfonl1initialising use list for font tempb=MTval3616 langdebugrang ifxMTextracontextemptyelseMessageBreak3617 langdebugrang (context MTextracontext)fi3618 MTexpcsMTxaddb3619 MTMTpermutelist tempbMTextracontext sizes3620 MTvalmneMTcurrsetname3621 3622 3623

MTgetfontandsize Translate any asterisks and split off the size3624 defMTgetfontandsize123456nil3625 MTgetfont1234513626

3627 MTdefinecodekeyencodingcfg3628 MTdefinecodekeyfamily cfg3629 MTdefinecodekeyseries cfg3630 MTdefinecodekeyshape cfg3631 MTdefinecodekeysize cfg3632 MTdefinecodekeyfont cfg

MTdefineoptkey

3633 defMTdefineoptkey123634 definekeyMT1c2[]MTifempty1relax3635 MTxdefnMT1cMTcurrsetname 213636

MTlistnamecount The options in the optional first argument3637 newcountMTlistnamecount3638 MTmapclistcMTfeatures

Use file name and line number as the list name if the user didnrsquot bother to inventone ndash also check whether the name already exists (in case more than one unnamedlist is loaded in the same line for example AtBeginDocument)

3639 definekeyMT1cname[]3640 MTifempty13641 MTifdefinednTFMT1cMTcurrfiletheinputlineno3642 globaladvanceMTlistnamecountne3643 MTedefnMT1cnameMTcurrfiletheinputlineno

IMPLEMENTATION Configuration 117

3644 (numberMTlistnamecount)3645 3646 MTedefnMT1cnameMTcurrfiletheinputlineno3647 3648 3649 MTedefnMT1cname13650 MTifdefinednTMT1ccsname MT1cnameendcsname3651 MTwarningRedefining nameuseMTabbr1 list `nameuseMT1cnamersquo3652 3653 3654 MTletcnMTcurrsetnameMT1cname3655 3656 MTdefineoptkey1load3657 MTdefineoptkey1factor3658 MTdefineoptkey1preset3659 MTdefineoptkey1inputenc

Only one context is allowed This might change in the future3660 definekeyMT1ccontext[]MTifempty1relaxdefMTextracontext13661 3662 langpackagerang

Automatically enable font copying if we find a protrusion or expansion contextAfter the preamble check whether font copying is enabled For older pdfTEXversions disallow It also works with LuaTEX 030 or newer

3663 langpdftex-def|luatex-defrang3664 langpdftex-defrangMTrequirespdftex73665 definekeyMTexccontext[]3666 MTifempty1relax3667 MTgletMTcopyfontMTcopyfont3668 defMTextracontext13669 3670 3671 MTaddtosetup3672 definekeyMTexccontext[]3673 ifxMTcopyfontMTcopyfont3674 MTifempty1relaxdefMTextracontext13675 else3676 MTerrorMTMTspace isnrsquot set up for expansion contextsMessageBreak3677 Ignoring `contextrsquo keyonline3678 Either move the settings inside the preambleMessageBreak3679 or load the package with the `copyfontsrsquo option3680 fi3681 3682

Protrusion contexts might also work without copying the font so we donrsquot issuean error but only a warning The problem is that pdfTEX only allows one set ofprotrusion factors for a given font within one paragraph (those that are in effect atthe end of the paragraph will be in effect for the whole paragraph) When differentfonts are loaded ndash like in the example with the footnote markers ndash we donrsquot needto copy the fonts

3683 definekeyMTprccontext[]3684 MTifempty1relax3685 MTgletMTcopyfontMTcopyfont3686 defMTextracontext13687 3688 3689 MTaddtosetup3690 definekeyMTprccontext[]3691 MTifempty1relaxdefMTextracontext13692 ifxMTcopyfontMTcopyfontelse3693 MTwarningnlIf protrusion contexts donrsquot work as expected

IMPLEMENTATION Configuration 118

3694 MessageBreak load the package with the `copyfontsrsquo option3695 fi3696 3697 3698 langpdftex-def|luatex-defrang3699 langpdftex-defrang3700 3701 definekeyMTexccontext[]3702 MTerrorExpansion contexts only work with pdftex 1404MessageBreak3703 or later Ignoring `contextrsquo keyonline3704 Upgrade pdftex3705 3706 langpdftex-defrang3707 langpdftex-def|xetex-defrang3708 definekeyMTprccontext[]3709 MTerrorProtrusion contexts only work with pdftex3710 langpdftex-defrang 1404MessageBreak or later3711 langxetex-defrang MessageBreak or luatex3712 Ignoring `contextrsquo keyonline3713 langpdftex-defrang Upgrade pdftex3714 langxetex-defrang Use pdftex or luatex3715 3716 langpdftex-def|xetex-defrang3717 langpdftex-defrang

MTwarnnodim

3718 langpackagerang3719 defMTwarnnodim13720 MTwarning`temparsquo is not a dimensionMessageBreak3721 Ignoring it and setting values relative toMessageBreak 13722 3723 langpackagerang

Protrusion codes may be relative to character width or to any dimension3724 langpdftex-def|xetex-def|luatex-defrang3725 definekeyMTprcunit[character]3726 MTgletncMTprcMTcurrsetname unitempty3727 deftempa13728 MTifstreqtempacharacterrelax

Test whether itrsquos a dimension but do not translate it into its final form here sinceit may be font-specific

3729 MTifdimentempa3730 MTgletncMTprcMTcurrsetname unittempa3731 MTwarnnodimcharacter widths3732 3733 3734 langpdftex-def|xetex-def|luatex-defrang

Tracking may only be relative to a dimension3735 langpdftex-def|luatex-defrang3736 definekeyMTtrcunit[1em]3737 MTgletncMTtrcMTcurrsetname unitempty3738 deftempa13739 MTifdimentempa3740 MTgletncMTtrcMTcurrsetname unittempa3741 MTwarnnodim1em3742 MTgdefnMTtrcMTcurrsetname unit1em3743 3744 langpdftex-def|luatex-defrang

Spacing and kerning codes may additionally be relative to space dimensions3745 langpdftex-defrang3746 MTmapclistnspkn3747 definekeyMT1cunit[space]

IMPLEMENTATION Configuration 119

3748 MTgletncMT1cMTcurrsetname unitempty3749 deftempa13750 MTifstreqtempacharacterrelax3751 MTgletncMT1cMTcurrsetname unitmne3752 MTifstreqtempaspacerelax3753 MTifdimentempa3754 MTgletncMT1cMTcurrsetname unittempa3755 MTwarnnodimwidth of space3756 3757 3758 3759 3760 langpdftex-defrang

The first argument to SetExpansion accepts some more options3761 langpdftex-def|luatex-defrang3762 MTmapclistnstretchshrinkstep3763 definekeyMTexc1[]3764 MTifempty1relax3765 MTifint1

A space terminates the number3766 MTgdefnMTexcMTcurrsetname 11 3767 3768 MTwarning3769 Value `1rsquo for option `1rsquo is not a numberMessageBreak3770 Ignoring it3771 3772 3773 3774 3775 definekeyMTexcauto[true]3776 deftempa13777 csname iftempaendcsname

Donrsquot use autoexpand for pdfTEX version older than 1203778 langpdftex-defrang MTrequirespdftex43779 langluatex-defrang MTrequiresluatex3relax3780 MTgdefnMTexcMTcurrsetname autoautoexpand3781 langpdftex-defrang MTwarningpdftex too old for automatic font expansion3782 else3783 langpdftex-defrang MTrequirespdftex43784 langluatex-defrang3785 MTrequiresluatex33786 MTwarningNon-automatic font expansion doesnrsquot work withMessageBreak3787 luatex3788 langluatex-defrang3789 MTgletncMTexcMTcurrsetname autoempty3790 langpdftex-defrang relax3791 fi3792

Tracking Interword spacing and outer kerning The variant with space just in caseSetTracking is called inside an argument (eg to IfFileExists)

3793 MTdefineoptkeytrspacing3794 MTdefineoptkeytrouterspacing3795 MTdefineoptkeytrouterkerning

Which ligatures should be disabled3796 definekeyMTtrcnoligatures[]3797 MTxdefnMTtrcMTcurrsetname noligatures13798 definekeyMTtrcouter spacing[]setkeysMTtrcouterspacing=13799 definekeyMTtrcouter kerning[]setkeysMTtrcouterkerning=13800 definekeyMTtrcno ligatures[]setkeysMTtrcnoligatures=13801 langpdftex-def|luatex-defrang

IMPLEMENTATION Configuration 120

1436 Character inheritance

DeclareCharacterInheritance This macro may be used in the configuration files to declare characters that shouldinherit protrusion resp expansion values from other characters Thus there is noneed to define all accented characters (eg lsquoa rsquoa ^a ~a a ra kaua) which will make the configuration files look much nicer and easier tomaintain If a single character of an inheritance list should have a different valueone can simply override it

MTinhfeat The optional argument may be used to restrict the list to some featuresMTextrainputenc and to specify an input encoding

3802 langpackagerang3803 renewcommandDeclareCharacterInheritance[1][]3804 letMTextracontextempty3805 letMTextrainputencundefined3806 letMTinhfeatempty3807 setkeysMTinh13808 MTbegincatcodes3809 MTsetinhlist3810

MTsetinhlist No need to create an inheritance list for tracking3811 defMTsetinhlist123812 MTifemptyMTinhfeat3813 MTmapclistcMTfeatures3814 MTifstreq1trrelaxMTdeclarecharinh1123815 3816 3817 MTmapclistcMTinhfeat3818 KVspdeftempa13819 MTifemptytemparelax3820 edeftempacsname MTrbbatempaendcsname3821 MTifstreqtempatrrelax3822 MTexponenMTdeclarecharinhtempa123823 3824 3825 MTendcatcodes3826

The keys for the optional argument3827 MTmapclistcMTfeatureslong3828 definekeyMTinh1[]edefMTinhfeatMTinhfeat13829 definekeyMTinhinputencdefMTextrainputenc1

MTdeclarecharinh The lists cannot be given a name by the user3830 defMTdeclarecharinh1233831 MTedefnMT1inhname3832 MTcurrfiletheinputlineno (nameuseMTabbr1)3833 MTletcnMTcurrsetnameMT1inhname3834 MTifdefinedcTMTextrainputenc3835 MTxdefnMT1inhMTcurrsetname inputencMTextrainputenc3836 langdebugrangMTdinfo1creating inheritance list `nameuseMT1inhnamersquo3837 MTgdefnMT1inhcsname MT1inhnameendcsname33838 defMTpermutelist1inh3839 setkeysMTinh23840 MTpermute3841

Parse the second argument DeclareCharacterInheritance may also be set upfor various combinations We can reuse the key setup from the configuration lists(Set)

3842 MTdefinecodekeyencodinginh

IMPLEMENTATION Configuration 121

3843 MTdefinecodekeyfamily inh3844 MTdefinecodekeyseries inh3845 MTdefinecodekeyshape inh3846 MTdefinecodekeysize inh3847 MTdefinecodekeyfont inh

MTinhdo Now parse the third argument the inheritance lists We define the commandsMTinhlangnameranglangslotrang containing the inheriting characters They will also betranslated to slot numbers here to save some time The following will be ex-ecuted only once namely the first time this inheritance list is encountered (inMTsetlangfeaturerangcodes)

3848 defMTinhdo13849 ifxrelax1empty else3850 MTinhsplit 1==relax3851 expandafterMTinhdo3852 fi3853

MTinhsplit Only gather the inheriting characters here Their codes will actually be set inMTsetlangfeaturerangcodes

3854 langpackagerang3855 langpdftex-def|xetex-def|luatex-defrang3856 defMTinhsplit1=2=3relax3857 deftempa13858 ifxtempaempty else3859 MTgetslot3860 langpdftex-def|luatex-defrang ifnumMTchar gt mne3861 langxetex-defrang ifxMTcharemptyelse3862 letMTvalMTchar3863 MTmapclistn23864 deftempa13865 ifxtempaempty else3866 MTgetslot3867 langpdftex-def|luatex-defrang ifnumMTchar gt mne3868 langxetex-defrang ifxMTcharemptyelse3869 MTexpcsMTxaddMTinhMTlistname MTval MTchar3870 fi3871 fi3872 3873 langdebugrangMTdinfonl2children of 1 (MTval)3874 langdebugrang nameuseMTinhMTlistname MTval 3875 fi3876 fi3877 3878 langpdftex-def|xetex-def|luatex-defrang

1437 Permutation

MTpermute

MTpermute

MTpermute

MTpermute

MTpermute

Calling MTpermute will define commands for all permutations of the specified fontattributes of the form MTlanglist typeranglangencodingranglangfamilyranglangseriesranglangshaperanglang|rang tobe the expansion of MTlanglist typerangname ie the name of the currently defined listSize ranges are held in a separate macro called MTlanglist typeranglangfont axesrangsizeswhich in turn contains the respective langlist namerangs attached to the ranges So that

SetProtrusion encoding = U family = euroitceuroitcs E = 10050 SetProtrusion encoding = U family = euroitceuroitcs shape = it

IMPLEMENTATION Configuration 122

E = 100

would yield the following assignments3879 langpackagerang3880 MTgdefnMTprcUeuroitceuroitc3881 MTgdefnMTprcUeuroitcseuroitc3882 MTgdefnMTprcUeuroitciteuroitci3883 MTgdefnMTprcUeuroitcsiteuroitci3884 MTgdefnMTprceuroitcE=100503885 MTgdefnMTprceuroitciE=1003886 defMTpermute3887 letMTcntencodingne3888 MTpermute

Undefine commands for the next round3889 MTmaptlistnencodingfamilyseriesshapeMTpermutereset3890 MTgletMTtempsizeundefined3891 3892 defMTpermute3893 letMTcntfamilyne3894 MTpermute3895 MTincrementMTcntencoding3896 MTifdefinednTMTtempencodingMTcntencoding3897 MTpermute3898 3899 defMTpermute3900 letMTcntseriesne3901 MTpermute3902 MTincrementMTcntfamily3903 MTifdefinednTMTtempfamilyMTcntfamily3904 MTpermute3905 3906 defMTpermute3907 letMTcntshapene3908 MTpermute3909 MTincrementMTcntseries3910 MTifdefinednTMTtempseriesMTcntseries3911 MTpermute3912 3913 defMTpermute3914 MTpermute3915 MTincrementMTcntshape3916 MTifdefinednTMTtempshapeMTcntshape3917 MTpermute3918

MTpermute In order to save some memory we can ignore unused encodings (inside the docu-ment)

3919 defMTpermute3920 MTpermutedefineencoding3921 ifMTdocument3922 ifxMTtempencodingempty else3923 MTifdefinednTFTMTtempencodingrelax3924 expandafterexpandafterexpandaftergobble3925 fi3926 fi3927 MTpermute3928

MTpermute

3929 defMTpermute3930 MTpermutedefinefamily3931 MTpermutedefineseries3932 MTpermutedefineshape3933 edeftempaMTtempencoding

IMPLEMENTATION Configuration 123

3934 MTtempfamily3935 MTtempseries3936 MTtempshape3937 MTifdefinedcTMTtempsize

Some sanity checks an encoding must be specified (unless nothing else is)3938 MTifstreqtemparelax3939 ifxMTtempencodingempty3940 MTwarning3941 You have to specify an encoding forMessageBreak3942 nameuseMTabbrMTpermutelist list3943 `nameuseMTMTpermutelist namersquoMessageBreak3944 Ignoring it3945 else3946 MTifdefinedcTFMTtempsize

Add the list of ranges to the beginning of the current combination after checkingfor conflicts

3947 MTifdefinednTMTMTpermutelist tempaMTextracontext sizes3948 MTmaptlistcMTtempsizeMTcheckrlist3949 3950 MTexpcsMTxaddb3951 MTMTpermutelist tempaMTextracontext sizes3952 MTtempsize3953 langdebugrangMTdinfonl1initialising use list for font tempaMessageBreak3954 langdebugrang sizes csname MTMTpermutelist tempaMTextracontext3955 langdebugrang sizesendcsname3956

Only one list can apply to a given combination But we donrsquot warn if the overriddenlist is to be loaded by the current one

3957 MTifdefinednTMTMTpermutelist tempaMTextracontext3958 MTifstreqcsname MTMTpermutelist tempaMTextracontextendcsname3959 csname MTMTpermutelist csname MTMTpermutelist nameendcsname loadendcsname3960 relax3961 MTwarningnameuseMTabbrMTpermutelist list3962 `nameuseMTMTpermutelist namersquo willMessageBreak override3963 list `nameuseMTMTpermutelist tempaMTextracontextrsquo3964 for MessageBreak font `temparsquo3965 3966 3967 langdebugrangMTdinfonl1initialising use list for font tempa3968 langdebugrang ifxMTextracontextemptyelseMessageBreak3969 langdebugrang (context MTextracontext)fi3970 3971 MTxdefnMTMTpermutelist tempaMTextracontext3972 csname MTMTpermutelist nameendcsname3973 fi3974 3975

MTpermutedefine Define the commands3976 defMTpermutedefine13977 tempcnta=csname MTcnt1endcsnamerelax3978 MTifdefinednTFMTtemp1thetempcnta3979 MTedefnMTtemp1csname MTtemp1thetempcntaendcsname3980 MTletncMTtemp1empty3981

MTpermutereset Reset the commands3982 defMTpermutereset13983 tempcnta=ne3984 MTloop3985 MTletncMTtemp1thetempcntaundefined

IMPLEMENTATION Configuration 124

3986 advancetempcntane3987 MTifdefinednTFMTtemp1thetempcnta3988 iftrue3989 iffalse3990 MTrepeat3991

MTcheckrlist For every new range item in MTtempsize check whether it overlaps with rangesin the existing list

3992 defMTcheckrlist1expandafterMTcheckrlist 1

MTcheckrlist Define the current new range and 3993 defMTcheckrlist1233994 deftempb13995 deftempc23996 MTiffalse3997 MTexpcsMTmaptlistc3998 MTMTpermutelist tempaMTextracontext sizes3999 MTcheckrange4000

MTcheckrange recurse through the list of existing ranges4001 defMTcheckrange1expandafterMTcheckrange 1

MTcheckrange tempb and tempc are lower resp upper bound of the new range lang1rang and lang2rangthose of the existing range lang3rang is the list name

4002 defMTcheckrange1234003 MTifdim2=mne4004 MTifdimtempc=mne

bull Both items are simple sizes

4005 MTifdimtempb=1MTiftruerelax4006

bull Item in list is a simple size new item is a range

4007 MTifdimtempbgt1relax4008 MTifdimtempcgt14009 MTiftrue4010 edeftempb1 (with range tempbspace to tempc)4011 relax4012 4013 4014 4015 MTifdimtempc=mne

bull Item in list is a range new item is a simple size

4016 MTifdimtempblt24017 MTifdimtempblt1relaxMTiftrue4018 relax4019

bull Both items are ranges

4020 MTifdimtempblt24021 MTifdimtempcgt14022 MTiftrue4023 edeftempb1 to 2 (with range tempbspace to tempc)4024 relax4025 relax4026 4027 4028 ifMTif

IMPLEMENTATION Package options 125

4029 MTifstreq34030 csname MTMTpermutelist csname MTMTpermutelist nameendcsname loadendcsname4031 relax4032 MTwarningnameuseMTabbrMTpermutelist list4033 `nameuseMTMTpermutelist namersquo will overrideMessageBreak4034 list `3rsquo for font tempaMessageBreak size tempb4035

If wersquove already found a conflict with this item we can skip the rest of the list

4036 expandafterMTtlistbreak4037 fi4038

144 Package options1441 Declaring the options

ifMToptexpansion

ifMToptauto

ifMToptDVI

Keep track of whether the user explicitly set these options4039 newififMToptexpansion4040 newififMToptauto4041 newififMToptDVI

MToptwarnadmissible Some warnings4042 defMToptwarnadmissible124043 MTwarningnl`1rsquo is not an admissible value for optionMessageBreak4044 `2rsquo Assuming `falsersquo4045

MToptwarnnan

4046 langpackagerang4047 langpackage|letterspacerang4048 langplainrangMTrequireslatex14049 defMToptwarnnan124050 MTwarningnlValue `1rsquo for option `2rsquo is not aMessageBreak number4051 Using default value of numbernameuseMT2default4052 4053 langplainrangrelax4054 langpackage|letterspacerang4055 langpackagerang

MToptdefset

4056 defMToptdefset14057 MTifdefinednTFMTtempb setMTval4058 MTxdefnMTtempb setnameMTval4059 4060 MTxdefnMTtempb setnamenameuseMTdefaulttempb set4061 MTwarningnlThe 1 set `MTvalrsquo is undeclaredMessageBreak4062 Using set `nameuseMTtempb setnamersquo instead4063 4064

expansion and protrusion may be true false compatibility nocompatibilityandor a langset namerang

4065 MTmapclistnprotrusionexpansion4066 definekeyMT1[true]4067 csname MTopt1trueendcsname4068 MTmapclistn14069 KVspdefMTval14070 MTifemptyMTvalrelax4071 csname MT1trueendcsname4072 edeftempbcsname MTrbba1endcsname4073 MTifstreqMTvaltruerelax

IMPLEMENTATION Package options 126

4074 4075 MTifstreqMTvalfalse4076 csname MT1falseendcsname4077 4078 MTifstreqMTvalcompatibility4079 MTletncMTtempb levelne4080 4081 MTifstreqMTvalnocompatibility4082 MTletncMTtempb leveltw4083

If everything failed it should be a set name4084 MToptdefset14085 4086 4087 4088 4089 4090 4091 4092

activate is a shortcut for protrusion and expansion4093 definekeyMTactivate[true]4094 setkeysMTprotrusion=14095 setkeysMTexpansion=14096

spacing kerning and tracking do not have a compatibility level4097 MTmapclistnspacingkerningtracking4098 definekeyMT1[true]4099 MTmapclistn14100 KVspdefMTval14101 MTifemptyMTvalrelax4102 csname MT1trueendcsname4103 MTifstreqMTvaltruerelax4104 4105 MTifstreqMTvalfalse4106 csname MT1falseendcsname4107 4108 edeftempbcsname MTrbba1endcsname4109 MToptdefset14110 4111 4112 4113 4114 4115

MTdefboolopt The truefalse options draft final (may be inherited from the class options)auto selected babel DVIoutput defersetup copyfonts

4116 defMTdefboolopt124117 definekeyMT1[true]4118 deftempa14119 MTifstreqtempatruerelax4120 MTifstreqtempafalserelax4121 MToptwarnadmissible114122 deftempafalse4123 4124 4125 24126 4127

Boolean options that only set the switch

IMPLEMENTATION Package options 127

4128 MTmapclistndraftselectedbabel4129 MTdefboolopt1csname MT1tempaendcsname4130 MTdefbooloptautocsname MTautotempaendcsname MToptautotrue

The DVIoutput option will change pdfoutput immediately to minimise the risk ofconfusing other packages

4131 langpackagerang4132 langpdftex-def|luatex-def|xetex-defrang4133 langluatex-defrangMTrequiresluatex4letpdfoutputoutputmoderelax4134 MTdefbooloptDVIoutput4135 csname iftempaendcsname4136 langpdftex-def|luatex-defrang4137 ifnumpdfoutputgtz MToptDVItrue fi4138 pdfoutputz4139 else4140 ifnumpdfoutputltne MToptDVItrue fi4141 pdfoutputne4142 langpdftex-def|luatex-defrang4143 langxetex-defrang MTwarningnlIgnoring `DVIoutputrsquo option4144 fi4145 4146 langpdftex-def|luatex-def|xetex-defrang

Setting the defersetup option to false will restore the old behaviour where thesetup took place at the time when the package was loaded This is undocumentedsince I would like to learn about the cases where this is necessary

The only problem with the new deferred setup I can think of is when a boxis being constructed inside the preamble and this box contains a font that is notloaded before the box is being used

4147 langpackagerang4148 MTdefbooloptdefersetup4149 csname iftempaendcsname else4150 AtEndOfPackage4151 MTsetup4152 letMTsetupempty4153 letMTaddtosetupfirstofone4154 4155 fi4156 4157 langpackagerang

copyfonts will copy all fonts before setting them up This allows protrusion andexpansion with different parameters This options is also undocumented in the hopethat we can always find out automatically whether itrsquos required It also works withLuaTEX 030 or newer

4158 langpdftex-def|luatex-defrang4159 langpdftex-defrangMTrequirespdftex74160 MTdefbooloptcopyfonts4161 csname iftempaendcsname4162 MTgletMTcopyfontMTcopyfont4163 else4164 MTgletMTcopyfontrelax4165 fi4166 4167 langpdftex-defrang4168 langpdftex-def|luatex-defrang4169 langpdftex-def|xetex-defrang4170 MTdefbooloptcopyfonts4171 csname iftempaendcsname4172 MTerror4173 langpdftex-defrang The pdftex version you are using is too oldMessageBreak4174 langpdftex-defrang to use the `copyfontsrsquo optionUpgrade pdftex

IMPLEMENTATION Package options 128

4175 langxetex-defrang The `copyfontsrsquo option does not work with xetex4176 langxetex-defrang Use pdftex or luatex instead4177 fi4178 4179 langpdftex-defrang4180 langpdftex-def|xetex-defrang

final is the opposite to draft4181 langpackagerang4182 MTdefbooloptfinal4183 csname iftempaendcsname4184 MTdraftfalse4185 else4186 MTdrafttrue4187 fi4188

For verbose output we redefine MTvinfo4189 definekeyMTverbose[true]4190 letMTvinfoMTinfonl4191 deftempa14192 MTifstreqtempatruerelax

Take problems seriously4193 MTifstreqtempaerrors4194 letMTwarning MTwarnerr4195 letMTwarningnlMTwarnerr4196 4197 letMTvinfogobble

Cast warnings to the winds4198 MTifstreqtempasilent4199 letMTwarning MTinfo4200 letMTwarningnlMTinfonl4201 4202 MTifstreqtempafalserelaxMToptwarnadmissible1verbose4203 4204 4205 4206 4207 langpackagerang

Options with numerical keys factor stretch shrink step letterspace4208 langpackage|letterspacerang4209 langplainrangMTrequireslatex14210 MTmapclistn4211 langpackagerang stretchshrinkstep4212 letterspace4213 definekeyMT1[csname MT1defaultendcsname]4214 deftempa1

No nonsense in MTfactor et al A space terminates the number4215 MTifinttempa4216 MTedefnMT1tempa4217 MToptwarnnan114218 4219 4220 langplainrangrelax4221 langpackage|letterspacerang

factor will define the protrusion factor only4222 langpackagerang4223 definekeyMTfactor[MTfactordefault]4224 deftempa1 4225 MTifinttempa

IMPLEMENTATION Package options 129

4226 edefMTprfactortempa4227 MToptwarnnan1factor4228

Unit for protrusion codes4229 definekeyMTunit[character]4230 deftempa14231 MTifstreqtempacharacterrelax4232 MTifdimentempa4233 letMTprunittempa4234 MTwarningnl`temparsquo is not a dimensionMessageBreak4235 Ignoring it and setting values relative toMessageBreak4236 character widths4237 4238

1442 Loading the definition file

MTendinput Abort if no capable engine found4239 letMTendinputrelax

4240 ifxMTenginerelax4241 MTwarningnlYou donrsquot seem to be using pdftex luatex or xetexMessageBreak4242 `MTMTrsquo only works with these enginesMessageBreak4243 I will quit now4244 MTclearoptions4245 else

Otherwise load the engine-specific code (as strewn across this file)4246 inputmicrotype-MTengine texdef4247 fi4248 MTendinput

1443 Reading the configuration file

The package should just work if called without any options Therefore expansionwill be switched off by default if output is DVI since it isnrsquot likely that expandedfonts are available (This grows more important as modern TEX systems haveswitched to the pdfTEX engine even for DVI output so that the user might not evenbe aware of the fact that shersquos running pdfTEX)

4249 MTprotrusiontrue4250 langpackagerang4251 langpdftex-def|luatex-defrang4252 ifnumpdfoutputltne else

Also we only enable expansion by default if pdfTEX can expand the fonts automat-ically

4253 langpdftex-defrang MTrequirespdftex44254 MTexpansiontrue4255 langpdftex-defrang MTautotrue4256 langpdftex-defrang relax4257 fi4258 langluatex-defrangMTautotrue4259 langpdftex-def|luatex-defrang

The main configuration file will be loaded before processing the package optionsMTconfigfile

MTgetconfig

However the config option must of course be evaluated beforehand We also haveto define a no-op for the regular option processing later

4260 langpackagerang4261 definekeyMTconfig[]relax4262 defMTgetconfig1config=23nil

IMPLEMENTATION Package options 130

4263 MTifempty24264 defMTconfigfileMTMTcfg4265 defMTconfigfile2cfg4266 4267 expandafterexpandafterexpandafterMTgetconfig4268 csname optcurrnamecurrextendcsnameconfig=nil

Load the file4269 IfFileExistsMTconfigfile4270 MTinfonlLoading configuration file MTconfigfile4271 MTbegincatcodes4272 letMTbegincatcodesrelax4273 letMTendcatcodesrelax4274 letMTcurrfileMTconfigfile4275 inputMTconfigfile4276 endgroup4277 MTwarningnl4278 Could not find configuration file `MTconfigfilersquoMessageBreak4279 This will almost certainly cause undesired resultsMessageBreak4280 Please fix your installation4281

MTcheckactiveset We have to make sure that font sets are active If the user didnrsquot activate any weuse those sets declared by DeclareMicrotypeSetDefault (this is done at the endof the preamble)

4282 defMTcheckactiveset14283 MTifdefinednTFMT1setname4284 MTinfonlUsing nameuseMTabbr1 set `nameuseMT1setnamersquo4285 4286 MTifdefinednTFMTdefault1set4287 MTgletnnMT1setnameMTdefault1set4288 MTinfonlUsing default nameuseMTabbr1 set `nameuseMT1setnamersquo4289

If no default font set has been declared in the main configuration file we use the(empty non-existent) set lsquorsquo and issue a warning

4290 MTgdefnMT1setname4291 MTwarningnlNo nameuseMTabbr1 set chosen no default set declared4292 MessageBreak Using empty set4293 4294 4295

1444 Hook for other packages

MicrotypeHook This hook may be used by font package authors eg to declare alias fonts If itis defined it will be executed here ie after the main configuration file has beenloaded and before the package options are evaluated

This hook was needed in versions prior to 19a to overcome the situation that(1) the microtype package should be loaded after all font defaults have been setup (hence using ifpackageloaded in the font package was not viable) and(2) checking AtBeginDocument could be too late since fonts might already havebeen loaded and consequently set up in the preamble With the new deferredsetup one could live without this command however it remains here since itrsquossimpler than testing whether the package 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 packages arenrsquot overwritten Example

IMPLEMENTATION Package options 131

defMinionProMTHookDeclareMicrotypeAliasMinionPro-LFMinionProifpackageloadedmicrotype MinionProMTHook ifundefinedMicrotypeHook letMicrotypeHookMinionProMTHook gaddtomacroMicrotypeHookMinionProMTHook

MicroTypeHook with a capital T (which only existed in version 17) is providedfor compatibility reasons At some point in the future it will no longer be availablehence it should not be used

4296 MTifdefinedcTMicroTypeHookMTwarning4297 Command stringMicroTypeHookspace is deprecatedMessageBreak4298 Use stringMicrotypeHookspace insteadMicroTypeHook4299 MTifdefinedcTMicrotypeHookMicrotypeHook

1445 Changing options later

microtypesetup

MTdefineoptionX

Inside the preamble microtypesetup accepts the same options as the package (un-less defersetup=false) In the document body it accepts the options protrusionexpansion activate tracking spacing and kerning Specifying font sets is notallowed

4300 defmicrotypesetupsetkeysMT4301 MTaddtosetupdefmicrotypesetup1setkeysMTX1selectfont4302 langpackagerang4303 langpdftex-def|luatex-def|xetex-defrang4304 defMTdefineoptionX124305 definekeyMTX1[true]4306 edeftempbcsname MTrbba1endcsname4307 MTmapclistn14308 KVspdefMTval14309 MTifemptyMTvalrelax4310 tempcnta=mne4311 MTifstreqMTvaltrue

Enabling micro-typography in the middle of the document is not allowed if it hasbeen disabled in the package options since fonts might already have been loadedand hence wouldnrsquot be set up

4312 MTchecksetup14313 tempcnta=csname MTtempb levelendcsname4314 MTvinfoEnabling 14315 (level numbercsname MTtempb levelendcsname)online4316 4317 4318 MTifstreqMTvalfalse4319 tempcnta=z4320 MTvinfoDisabling 1online4321 4322 MTifstreqMTvalcompatibility4323 MTchecksetup14324 tempcnta=ne4325 MTletncMTtempb levelne4326 MTvinfoSetting 1 to level 1online4327 4328 4329 MTifstreqMTvalnocompatibility4330 MTchecksetup14331 tempcnta=tw4332 MTletncMTtempb leveltw4333 MTvinfoSetting 1 to level 2online4334 4335 MTerrorValue `MTvalrsquo for key `1rsquo not recognised

IMPLEMENTATION Package options 132

4336 Use any of `truersquo `falsersquo `compatibilityrsquo or4337 `nocompatibilityrsquo4338 4339 4340 4341 4342 ifnumtempcntagtmne4343 2tempcntarelax4344 fi4345 4346 4347 4348

MTchecksetup Test whether the feature wasnrsquot disabled in the package options4349 defMTchecksetup14350 csname ifMT1endcsname4351 expandafterfirstofone4352 else4353 MTerrorYou cannot enable 1 if it was disabledMessageBreak4354 in the package optionsLoad microtype with 1 enabled4355 expandaftergobble4356 fi4357

4358 MTdefineoptionXprotrusionMTprotrudechars4359 langpdftex-def|luatex-def|xetex-defrang4360 langpdftex-def|luatex-defrang4361 MTdefineoptionXexpansionMTadjustspacing

MTprotrudechars

MTadjustspacing 4362 langluatex-defrang4363 MTrequiresluatex44364 letpdfprotrudecharsprotrudechars4365 letpdfadjustspacingadjustspacing4366 relax4367 langluatex-defrang4368 letMTprotrudecharspdfprotrudechars4369 letMTadjustspacingpdfadjustspacing4370 langpdftex-def|luatex-defrang4371 langxetex-defrang4372 letMTprotrudecharsXeTeXprotrudechars4373 definekeyMTXexpansion[true]MTwarningIgnoring expansion setup4374 langxetex-defrang

MTdefineoptionX The same for tracking spacing and kerning which do not have a compatibilitylevel

4375 langpdftex-def|luatex-defrang4376 langpdftex-defrangMTrequirespdftex64377 langluatex-defrangMTrequiresluatex34378 defMTdefineoptionX124379 definekeyMTX1[true]4380 MTmapclistn14381 KVspdefMTval14382 MTifemptyMTvalrelax4383 tempcnta=mne4384 MTifstreqMTvaltrue4385 MTchecksetup14386 tempcnta=ne4387 MTvinfoEnabling 1online4388 4389 4390 MTifstreqMTvalfalse4391 tempcnta=z4392 MTvinfoDisabling 1online

IMPLEMENTATION Package options 133

4393 MTerrorValue `MTvalrsquo for key `1rsquo not recognised4394 Use either `truersquo or `falsersquo4395 4396 4397 ifnumtempcntagtmne4398 2relax4399 fi4400 4401 4402 4403

We cannot simply let MTtracking relax since this may select the already letter-spaced font instance

4404 MTdefineoptionXtrackingifnumtempcnta=z letMTtrackingMTsettrzero4405 else letMTtrackingMTtracking fi4406 langpdftex-defrang MTdefineoptionXspacingpdfadjustinterwordgluetempcnta4407 langpdftex-defrang MTdefineoptionXkerningpdfprependkerntempcnta4408 langpdftex-defrang pdfappendkerntempcnta4409 4410 langpdftex-def|luatex-defrang4411 langpdftex-def|luatex-def|xetex-defrang

Disable for older pdfTEX versions and for XETEX and LuaTEX4412 definekeyMTXtracking[true]MTwarningIgnoring tracking setup4413 langluatex-defrang4414 definekeyMTXkerning[true]MTwarningIgnoring kerning setup4415 definekeyMTXspacing[true]MTwarningIgnoring spacing setup4416 langpdftex-defrang4417 definekeyMTXactivate[true]4418 setkeysMTXprotrusion=14419 langpdftex-def|luatex-defrang setkeysMTXexpansion=14420 4421 langpdftex-def|luatex-def|xetex-defrang

MTsavedsetupfont Disable everything ndash may be used as a temporary work-around in case setting upfonts doesnrsquot work under certain circumstances but only until that specific problemis fixed This is undocumented as it completely deprives us of the possibility to act ndashwersquore blind and paralysed

4422 langpackagerang4423 letMTsavedsetupfontMTsetupfont

4424 definekeyMTXdisable[]4425 MTinfoInactivate `MTMTrsquo package4426 letMTsetupfontrelax4427 4428 definekeyMTXenable[]4429 MTinfoReactivate `MTMTrsquo package4430 letMTsetupfontMTsavedsetupfont4431 4432 langpackagerang

1446 Processing the options

MTProcessOptionsWithKV Parse options4433 langpackage|letterspacerang4434 langplainrangMTrequireslatex14435 defMTProcessOptionsWithKV14436 lettempcrelax4437 letMTtempempty4438 langplainrang MTrequireslatex24439 MTmapclistcclassoptionslist4440 defCurrentOption1

IMPLEMENTATION Package options 134

4441 MTifdefinednTKV1expandafterMTgetkeyCurrentOption=nil4442 edefMTtempMTtempCurrentOption4443 expandtwoargsremoveelementCurrentOption4444 unusedoptionlistunusedoptionlist4445 4446 4447 edefMTtempnoexpandsetkeys14448 MTtempptionlistcurrnamecurrext

eplain can handle package options4449 langplainrang4450 edefMTtempnoexpandsetkeys14451 csname usepkgoptionsusepkgpkgendcsname4452 langplainrang4453 MTtemp4454 MTclearoptions4455

MTgetkey For key=val in class options4456 defMTgetkey1=2nil1

4457 MTProcessOptionsWithKVMT4458 langplainrangrelax4459 langpackage|letterspacerang4460 langpackagerang

Now we can take the appropriate actions We also tell the log file which optionsthe user has chosen (in case itrsquos interested)

4461 MTaddtosetup4462 ifMTdraft

We disable most of what wersquove just defined in the 4462 lines above if we arerunning in draft mode

4463 MTwarningnl`draftrsquo option activeMessageBreak4464 Disabling all micro-typographic extensionsMessageBreak4465 This might lead to different line and page breaks4466 letMTsetupfontrelax4467 renewcommandLoadMicrotypeFile[1]4468 renewcommandmicrotypesetup[1]4469 renewcommandmicrotypecontext[1]4470 renewcommandlsstyle4471 else4472 MTsetupPDF4473 MTsetupcopies

Fix the font sets4474 MTmaptlistcMTfontsetsMTfixfontset4475 MTsetupprotrusion4476 MTsetupexpansion4477 MTsetuptracking4478 MTsetupwarntracking4479 MTsetupspacing4480 MTsetupkerning4481 MTsetupnoligatures4482 4483 langpackagerang

MTsetupPDF pdfTEX can create DVI output too However both the DVI viewer and dvips needto find actual fonts Therefore expansion will only work if the fonts for differentdegrees of expansion are readily available

Some packages depend on the value of pdfoutput and will get confused if it ischanged after they have been loaded These packages are among others colorgraphics hyperref crop contour pstricks and as a matter of course ifpdf

IMPLEMENTATION Package options 135

Instead of testing for each package (thatrsquos not our job) we only say that it wasmicrotype that changed it This must be sufficient

4484 langpdftex-def|luatex-defrang4485 defMTsetupPDF4486 MTinfonlGenerating ifnumpdfoutputltne DVI else PDF fi output4487 ifMToptDVIspace (changed by MTMT)fi4488

MTsetupcopies Working on font copies4489 defMTsetupcopies4490 ifxMTcopyfontrelaxelse MTinfonlUsing font copies for contextsfi4491 4492 langpdftex-def|luatex-defrang4493 langxetex-defrang4494 letMTsetupPDFrelax4495 letMTsetupcopiesrelax4496 langxetex-defrang

MTsetupprotrusion Protrusion4497 langpdftex-def|xetex-def|luatex-defrang4498 defMTsetupprotrusion4499 ifMTprotrusion4500 edefMTactivefeaturesMTactivefeaturespr4501 MTprotrudecharsMTprlevel4502 MTinfonlCharacter protrusion enabled (level numberMTprlevel)4503 ifnumMTprfactor=MTfactordefault elseMessageBreak4504 factor numberMTprfactorfi4505 ifxMTprunitempty elseMessageBreak unit MTprunitfi4506 MTcheckactivesetpr4507 else4508 letMTprotrusionrelax4509 MTinfonlNo character protrusion4510 fi4511 4512 langpdftex-def|xetex-def|luatex-defrang

MTsetupexpansion For DVI output the user must have explicitly passed the expansion option tothe package Under LuaTEX expansion works quite differently the glyphs willbe positioned as if they were transformed without actually being transformedSince this could still be considered a viable option we donrsquot disable the featurecompletely but issue a warning

4513 langpdftex-def|luatex-defrang4514 defMTsetupexpansion4515 ifnumpdfoutputltne4516 ifMToptexpansion4517 langluatex-defrang4518 ifMTexpansion4519 MTrequiresluatex34520 MTwarningnlFont expansion doesnrsquot work properly with luatex inMessageBreak4521 DVI mode the glyphs wonrsquot be actually transformedMessageBreak4522 but will only be shifted You might want to useMessageBreak4523 pdflatex instead Irsquoll continue anyway 4524 MTexpansionfalse4525 relax4526 fi4527 langluatex-defrang4528 else4529 MTexpansionfalse4530 fi4531 fi4532 ifMTexpansion

Set up the values for font expansion if stretch has not been specified we take the

IMPLEMENTATION Package options 136

default value of 204533 ifnumMTstretch=mne4534 letMTstretchMTstretchdefault4535 fi

If shrink has not been specified it will inherit the value from stretch4536 ifnumMTshrink=mne4537 letMTshrinkMTstretch4538 fi

If step has not been specified we will just set it to 1 for recent pdfTEX versions Mytests did not show much difference neither in compilation time (within the marginof error) nor in file size (less than 1 difference for microtypepdf with step=1compared to step=5) With older versions we set it to min(stretchshrink)5rounded off minimum value 1

4539 ifnumMTstep=mne4540 langpdftex-defrang MTrequirespdftex64541 defMTstep1 4542 langpdftex-defrang4543 4544 ifnumMTstretchgtMTshrink4545 ifnumMTshrink=z4546 tempcnta=MTstretch4547 else4548 tempcnta=MTshrink4549 fi4550 else4551 ifnumMTstretch=z4552 tempcnta=MTshrink4553 else4554 tempcnta=MTstretch4555 fi4556 fi4557 dividetempcnta 5relax4558 ifnumtempcnta=z tempcnta=ne fi4559 edefMTstepnumbertempcntaspace4560 4561 langpdftex-defrang4562 fi4563 ifnumMTstep=z4564 MTwarningnlThe expansion step cannot be set to zeroMessageBreak4565 Setting it to one4566 defMTstep1 4567 fi

MTauto Automatic expansion of the font This new feature of pdfTEX 120 makes thehz programme really usable It must be either lsquoautoexpandrsquo or empty (or lsquo1000rsquo forolder versions of pdfTEX) With LuaTEX we just leave it empty as therersquos actuallyno difference ndash non-automatic font expansion doesnrsquot work anymore In LuaTEX106 the lsquoautoexpandrsquo option seems to have been removed altogether and wouldtrigger a warning

4568 letMTautoempty4569 ifMTauto

We turn off automatic expansion if output mode is DVI4570 langpdftex-defrang4571 MTrequirespdftex44572 ifnumpdfoutputltne4573 ifMToptauto4574 MTerror4575 Automatic font expansion only works for PDF outputMessageBreak4576 However you are creating a DVI file

IMPLEMENTATION Package options 137

4577 If you have created expanded fonts instances remove `autorsquo from4578 MessageBreak the package options Otherwise you have to switch4579 off expansionMessageBreak completely4580 fi4581 MTautofalse4582 else4583 defMTautoautoexpand4584 fi

Also if pdfTEX is too old4585 4586 MTerror4587 The pdftex version you are using is too old forMessageBreak4588 automatic font expansion4589 If you have created expanded fonts instances remove `autorsquo fromMessageBreak4590 the package options Otherwise you have to switch off expansionMessageBreak4591 completely or upgrade pdftex to version 120 or newer4592 MTautofalse4593 defMTauto1000 4594 4595 langpdftex-defrang4596 langluatex-defrang MTrequiresluatex3relaxdefMTautoautoexpand4597 else4598 langpdftex-defrang

No automatic expansion4599 MTrequirespdftex4relax4600 defMTauto1000 4601 4602 langpdftex-defrang4603 langluatex-defrang4604 MTrequiresluatex34605 ifMToptauto4606 MTerrorNon-automatic font expansion does not work withMessageBreak4607 luatexRemove `auto=falsersquo from the package options or use pdftex4608 MTautotrue4609 fi4610 relax4611 langluatex-defrang4612 fi

Choose the appropriate macro for selected expansion4613 ifMTselected4614 letMTsetexcodesMTsetexcodess4615 else4616 letMTsetexcodesMTsetexcodesn4617 fi

Filter out stretch=0shrink=0 since it would result in a pdfTEX error4618 ifnumMTstretch=z4619 ifnumMTshrink=z4620 MTwarningnl4621 Both the stretch and shrink limit are set to zeroMessageBreak4622 Disabling font expansion4623 MTexpansionfalse4624 fi4625 fi4626 fi4627 ifMTexpansion4628 edefMTactivefeaturesMTactivefeaturesex4629 MTadjustspacingMTexlevel4630 MTinfonlifMTauto Aelse Non-afi utomatic font expansion enabled4631 (level numberMTexlevel)MessageBreak4632 stretch numberMTstretch shrink numberMTshrink4633 step numberMTstep ifMTselectedelse non-fi selected

IMPLEMENTATION Package options 138

MTcheckstep Check whether stretch and shrink are multiples of step4634 defMTcheckstep14635 tempcnta=csname MT1endcsname4636 dividetempcnta MTstep4637 multiplytempcnta MTstep4638 ifnumtempcnta=csname MT1endcsnameelse4639 MTwarningnlThe 1 amount is not a multiple of stepMessageBreak4640 The effective maximum 1 is thetempcntaspace4641 (step numberMTstep)4642 fi4643 4644 MTcheckstepstretch4645 MTcheckstepshrink4646 MTcheckactivesetex

showhyphens Inside showhyphens font expansion should be disabled (Since 20170110 theLATEX format contains a different version for XETEX but since expansion doesnrsquotwork with XETEX we donrsquot have to bother) Since 20191001 the command isrobust

4647 MTifdefinednTFshowhyphens 4648 defMTtemp124649 expandafterCheckCommandcsname showhyphens endcsname[1]14650 DeclareRobustCommandshowhyphens[1]24651 4652 defMTtemp124653 CheckCommandshowhyphens[1]14654 gdefshowhyphens124655 4656 MTtemp4657 setbox0vboxcolorbegingroup4658 everyparparfillskipzskip4659 hsizemaxdimennormalfontpretolerancemnetolerancemne4660 hbadnesszshowboxdepthz 1colorendgroup4661 setbox0vboxcolorbegingrouppdfadjustspacingz4662 everyparparfillskipzskip4663 hsizemaxdimennormalfontpretolerancemnetolerancemne4664 hbadnesszshowboxdepthz 1colorendgroup

4665 else4666 letMTexpansionrelax4667 MTinfonlNo font expansion4668 fi4669 4670 langpdftex-def|luatex-defrang4671 langxetex-defrang4672 defMTsetupexpansion4673 ifMTexpansion4674 ifMToptexpansion4675 MTerrorFont expansion does not work with xetex4676 Use pdftex or luatex instead4677 fi4678 fi4679 4680 langxetex-defrang

MTsetuptracking Tracking spacing and kerning4681 langpdftex-def|luatex-defrang4682 langpdftex-defrangMTrequirespdftex64683 langluatex-defrangMTrequiresluatex34684 defMTsetuptracking4685 ifMTtracking4686 edefMTactivefeaturesMTactivefeaturestr4687 MTinfonlTracking enabled4688 MTcheckactivesettr

IMPLEMENTATION Package options 139

Enable protrusion for compensation at the line edges4689 ifMTprotrusionelseMTprotrudecharsnefi4690 else4691 letMTtrackingrelax4692 MTinfonlNo adjustment of tracking4693 fi4694 4695 langpdftex-def|luatex-defrang

MTsetupspacing

4696 langpdftex-defrang4697 defMTsetupspacing4698 ifMTspacing4699 edefMTactivefeaturesMTactivefeaturessp4700 pdfadjustinterwordgluene4701 MTinfonlAdjustment of interword spacing enabled

The ragged2e package sets interword spaces to a fixed value without glue microtypersquosmodifications can therefore have undesired effects Therefore we issue a warning

4702 MTwithpackageTragged2e4703 MTwarningnlYou are using the `ragged2ersquo packageMessageBreak4704 Adjustment of interword spacing may lead toMessageBreak4705 undesired results when used with `ragged2ersquoMessageBreak4706 In this case disable the `spacingrsquo option4707 4708 MTcheckactivesetsp4709 else4710 letMTspacingrelax4711 MTinfonlNo adjustment of interword spacing4712 fi4713

MTsetupspacingcheck Warning if nonfrenchspacing is active since space factors will be ignoredwith pdfadjustinterwordglue gt0 Why 1500 Because some packages redefinefrenchspacing16

4714 defMTsetupspacingcheck4715 ifMTspacing4716 ifMTbabel else4717 ifnumsfcode` gt 15004718 MTifstreqMTspcontextnonfrenchrelax4719 MTwarningnl4720 stringnonfrenchspacingspace is active Adjustment ofMessageBreak4721 interword spacing will disable it You might wantMessageBreak4722 to add `backslashcharMTMT contextspacing=nonfrenchrsquoMessageBreak4723 to your preamble4724 4725 fi4726 fi4727 fi4728

MTsetupkerning

4729 defMTsetupkerning4730 ifMTkerning4731 edefMTactivefeaturesMTactivefeatureskn4732 pdfprependkernne4733 pdfappendkernne4734 MTinfonlAdjustment of character kerning enabled4735 MTcheckactivesetkn4736 else4737 letMTkerningrelax

16 Cf the ctt thread lsquofrenchspacing with AMS packages and babelrsquo started by Philipp Lehman on16 August 2005 MID ddtbaj$rob$1onlinede

IMPLEMENTATION Package options 140

4738 MTinfonlNo adjustment of character kerning4739 fi4740 4741 langpdftex-defrang

MTerrordoesntwork If pdfTEX is too old we disable tracking spacing and kerning and throw an errormessage We also switch the features off for LuaTEX and XETEX

4742 langpdftex-def|luatex-defrang4743 langluatex-defrang4744 defMTsetuptracking4745 ifMTtracking4746 MTerrorThe tracking feature only works with luatex 062MessageBreak4747 or newer Switching it offUpgrade luatex4748 MTtrackingfalse4749 MTletncMTtrackingrelax4750 else4751 MTinfonlNo adjustment of tracking (luatex too old)4752 fi4753 4754 4755 langluatex-defrang4756 langpdftex-def|xetex-def|luatex-defrang4757 defMTerrordoesntwork14758 csname ifMT1endcsname4759 MTerrorThe 1 feature only works with pdftex 140MessageBreak4760 or newer Switching it off4761 langpdftex-defrang Upgrade pdftex4762 langluatex-def|xetex-defrang Use pdftex instead4763 csname MT1falseendcsname4764 MTletncMT1relax4765 else4766 MTinfonlNo adjustment of 14767 langpdftex-defrang space(pdftex too old)4768 4769 fi4770 4771 langpdftex-def|xetex-defrang defMTsetuptrackingMTerrordoesntworktracking4772 defMTsetupkerning MTerrordoesntworkkerning4773 defMTsetupspacing MTerrordoesntworkspacing4774 langpdftex-defrang4775 langpdftex-def|xetex-def|luatex-defrang

MTsetupwarntracking

4776 langletterspacerangMTaddtosetup4777 langpdftex-def|luatex-defrangdefMTsetupwarntracking

MTwarntrackingDVI With pdfTEX we issue a warning when letterspacing in DVI mode since it willprobably not work We also switch on protrusion if it isnrsquot already to compensatefor the letterspacing kerns

4778 langpdftex-def|luatex-def|letterspacerang4779 4780 langpdftex-def|letterspacerang4781 ifnumpdfoutputltne4782 defMTwarntrackingDVI4783 langletterspacerang MTpdforlua4784 MTwarningnl4785 You are using trackingletterspacing in DVI modeMessageBreak4786 This will probably not work unless the post-MessageBreak4787 processing program (dvips dvipdfm(x) ) isMessageBreak4788 able to create the virtual fonts on the fly4789 langletterspacerang relax4790 MTgletMTwarntrackingDVIrelax4791 4792 else

IMPLEMENTATION Package options 141

4793 langpdftex-def|letterspacerang4794 defMTwarntrackingDVI4795 ifnumpdfprotrudecharsltne globalpdfprotrudecharsne fi4796 MTgletMTwarntrackingDVIrelax4797 4798 langpdftex-def|letterspacerang fi

4799 ifnumMTletterspace=mne4800 letMTletterspaceMTletterspacedefault4801 else4802 MTlstoolargeMTletterspace4803 fi4804 4805 langpdftex-def|luatex-def|letterspacerang4806 langxetex-defrangletMTsetupwarntrackingrelax

MTsetupnoligatures DisableLigatures is only admissible in the preamble therefore we can nowdisable the corresponding macro if it was never called

4807 langpdftex-def|luatex-defrang4808 defMTsetupnoligatures4809 langpdftex-defrang MTrequirespdftex54810 ifMTnoligatures else4811 letMTnoligaturesrelax4812 fi4813 langpdftex-defrang relax4814 4815 langpdftex-def|luatex-defrang4816 langxetex-defrangletMTsetupnoligaturesrelax

Remove the leading comma in MTactivefeatures and set the document switchto true

4817 langpackagerang4818 MTaddtosetup4819 ifxMTactivefeaturesempty else4820 edefMTactivefeaturesexpandaftergobbleMTactivefeatures4821 fi4822 MTdocumenttrue4823

MTsetbabelcontext Interaction with babel4824 defMTsetbabelcontext14825 MTifdefinednTFMTbabel14826 MTvinfo Changing to language context `1rsquoMessageBreakonline4827 expandafterMTexponenexpandaftermicrotypecontext4828 csname MTbabel1endcsname4829 4830 microtypecontextprotrusion=expansion=spacing=kerning=4831 4832

MTshorthandoff Active characters can only be switched off if babel isnrsquot loaded after microtype4833 ifpackageloadedbabel4834 defMTshorthandoff124835 MTinfonlSwitching off 1 babelrsquos active characters (2)4836 shorthandoff24837 4838 defMTshorthandoff124839 MTerrorYou must load `babelrsquo before `MTMTrsquo4840 Otherwise `MTMTrsquo cannot switch off 1 babelrsquosMessageBreak4841 active characters4842

We patch the language switching commands to enable language-dependent setup4843 MTaddtosetup4844 ifMTbabel

IMPLEMENTATION Package options 142

4845 ifpackageloadedbabel4846 MTinfonlRedefining babelrsquos language switching commands4847 letMTorigselectlanguageselectlanguage4848 defselectlanguage14849 MTorigselectlanguage14850 MTsetbabelcontext14851 4852 letMTorigforeignlanguageforeignlanguage4853 defforeignlanguage14854 MTorigforeignlanguage14855 MTsetbabelcontext14856 4857 ifMTkerning

Disable French babelrsquos active characters4858 MTiffalse4859 MTwithbabelandTfrench MTiftrue4860 MTwithbabelandTfrenchb MTiftrue4861 MTwithbabelandTfrancaisMTiftrue4862 MTwithbabelandTcanadienMTiftrue4863 MTwithbabelandTacadian MTiftrue4864 ifMTifMTshorthandoffFrenchfi

Disable Turkish babelrsquos active characters4865 MTiffalse4866 MTwithbabelandTturkish MTiftrue4867 ifMTifMTshorthandoffTurkish=fi4868 fi

In case babel was loaded before microtype4869 MTsetbabelcontextlanguagename4870 4871 MTwarningnlYou did not load the babel packageMessageBreak4872 The `babelrsquo option wonrsquot have any effect4873 4874 fi4875

Now we close the fi from ifMTdraft4876 MTaddtosetupfi

Set up the current font most likely the normal font This has to come after all ofthe setup (including anything from the preamble) has been dealt with

4877 selectfont

MTcurrfile This is the current file (hopefully with the correct extension)4878 edefMTcurrfilejobnametex4879 langpackagerang

Finally execute the setup macro at the end of the preamble and empty it (thecombine class calls it repeatedly)

4880 langpackage|letterspacerang4881 langplainrangMTrequireslatex14882 AtBeginDocumentMTsetup MTgletMTsetupempty4883 langplainrangrelax4884 langpackage|letterspacerang

Must come at the very very end4885 langpackagerangMTifdefinedcTMTsetupspacingcheck4886 langpackagerang AtBeginDocumentMTsetupspacingcheck

Restore catcodes4887 langpackage|letterspacerangMTrestorecatcodes

That was that

CONFIGURATION FILES 143

15 Configuration filesLetrsquos now write the font configuration files

4888 langconfigrang4889

151 Font setsWe first declare some sets in the main configuration file

4890 langm-trang4891 -----------------------------------------------------------------------4892 FONT SETS48934894 DeclareMicrotypeSetall4895 4896

4897 DeclareMicrotypeSetallmath4898 encoding = OT1T1T2ALY1OT4QXT5EU1EU2TUTS1OMLOMSU 48994900 DeclareMicrotypeSetalltext4901 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU 4902

4903 DeclareMicrotypeSetallmath-nott4904 encoding = OT1T1T2ALY1OT4QXT5EU1EU2TUTS1OMLOMSU4905 family = rmsf4906 49074908 DeclareMicrotypeSetalltext-nott4909 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU4910 family = rmsf4911 4912

4913 DeclareMicrotypeSetbasicmath4914 encoding = OT1T1T2ALY1OT4QXT5EU1EU2TUOMLOMS4915 family = rmsf4916 series = md4917 size = normalsizefootnotesizesmalllarge4918 49194920 DeclareMicrotypeSetbasictext4921 encoding = OT1T1T2ALY1OT4QXT5EU1EU2TU4922 family = rmsf4923 series = md4924 size = normalsizefootnotesizesmalllarge4925 4926

4927 DeclareMicrotypeSetsmallcaps4928 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU4929 shape = scsiscit4930 4931

4932 DeclareMicrotypeSetfootnotesize4933 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU4934 size = -small4935 49364937 DeclareMicrotypeSetscriptsize4938 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU

CONFIGURATION FILES Font variants and aliases 144

4939 size = -footnotesize4940 49414942 DeclareMicrotypeSetnormalfont4943 font = 4944

The default sets4945 -----------------------------------------------------------------------4946 DEFAULT SETS49474948 DeclareMicrotypeSetDefault[protrusion]alltext4949 DeclareMicrotypeSetDefault[expansion] alltext-nott4950 DeclareMicrotypeSetDefault[spacing] alltext-nott4951 DeclareMicrotypeSetDefault[kerning] alltext4952 DeclareMicrotypeSetDefault[tracking] smallcaps4953

152 Font variants and aliasesThese are the variants I happen to be using (expert encoding oldstyle numeralsswashes alternative display inferior and superior numerals) Additionally weadd the now common variants for Lining Tabular Oldstyle and Tabular Oldstylenumbers

4954 -----------------------------------------------------------------------4955 FONT VARIANTS AND ALIASES49564957 DeclareMicrotypeVariantsxjwad01-LF-TLF-OsF-TOsF

Other candidates 2 (proportional digits) e (engraved) f (Fraktur) g (small text)h (shadow) l (outline) n (informal) p (ornaments) r (roman) s (sans serif)t (typewriter) Irsquove omitted them since they seem hardly be used andor they areactually more than just a variant ie they shouldnrsquot share a file

Fonts that are lsquothe samersquo The fontspec package will set lmr as the default fontwhose declarations for EU1EU2TU encoding are in mt-LatinModernRomancfgSince 20161203 the default encoding with XETEX and LuaTEX in the LATEX formatis TU even if fontspec is not loaded

49584959 MTiffalse4960 ifxUnicodeEncodingNameundefinedelse4961 MTifstreqencodingdefaultUnicodeEncodingNameMTiftruerelax4962 fi4963 ifMTfontspecMTiftruefi4964 ifMTif4965 -- ComputerLatin Modern Roman4966 DeclareMicrotypeAliaslmrLatin Modern Roman4967 else4968 DeclareMicrotypeAliaslmrcmr lmodern4969 fi

The Latin Modern fonts the virtual fonts from the ae and zefonts and the eco andhfoldsty packages (oldstyle numerals) as well as mlmodern all inherit the (basic)settings from Computer Modern Roman Some of them are in part overwritten laterWe mustnrsquot forget the Latin Modern math fonts

4970 DeclareMicrotypeAliaslmsycmsy 4971 DeclareMicrotypeAliaslmm cmm 4972 DeclareMicrotypeAliasaer cmr ae4973 DeclareMicrotypeAliaszer cmr zefonts

CONFIGURATION FILES Font variants and aliases 145

4974 DeclareMicrotypeAliascmorcmr eco4975 DeclareMicrotypeAliashforcmr hfoldsty4976 DeclareMicrotypeAliasmlmrcmr mlmodern4977 DeclareMicrotypeAliasmlmsycmsy 4978 DeclareMicrotypeAliasmlmm cmm

Another new Computer Modern extension The newcomputermodern package loadsit by file name

4979 DeclareMicrotypeAliasNew Computer ModernLatin Modern Roman4980 DeclareMicrotypeAliasNewCM10-Bookotf Latin Modern Roman4981 DeclareMicrotypeAliasNewCM10-RegularotfLatin Modern Roman

The packages pxfonts and txfonts fonts inherit Palatino and Times settings re-spectively also the TEX Gyre fonts Pagella and Termes (formerly qfonts)

4982 -- Palatino4983 DeclareMicrotypeAliaspxr ppl pxfonts4984 DeclareMicrotypeAliasqpl ppl TeX Gyre Pagella (formerly qfontsQuasiPalatino)

The lsquoFPL Neursquo fonts a lsquore-implementationrsquo of Palatino4985 DeclareMicrotypeAliasfp9xpplx FPL Neu4986 DeclareMicrotypeAliasfp9jpplj

The newpx package a replacement for pxfonts4987 DeclareMicrotypeAliaszpllfpplx newpxtext4988 DeclareMicrotypeAliaszplosfpplj 4989 DeclareMicrotypeAliaszpltlfpplx 4990 DeclareMicrotypeAliaszpltosfpplj

The domitian package4991 DeclareMicrotypeAliasDomitian-TLF pplx domitian4992 DeclareMicrotypeAliasDomitian-TOsFpplj

The OpenType versions4993 DeclareMicrotypeAliasPalatino LinotypePalatino4994 DeclareMicrotypeAliasPalatino LT Std Palatino4995 DeclareMicrotypeAliasTeX Gyre Pagella Palatino4996 DeclareMicrotypeAliasDomitian Palatino4997 DeclareMicrotypeAliasAsana Math Palatino4998 -- Times New Roman4999 DeclareMicrotypeAliastxrptm txfonts

The newtx package a replacement for txfonts5000 DeclareMicrotypeAliasntxlfptmx newtxtext5001 DeclareMicrotypeAliasntxosfptmj 5002 DeclareMicrotypeAliasntxtlfptmx 5003 DeclareMicrotypeAliasntxtosfptmj

The tempora package5004 DeclareMicrotypeAliasTempora-TLF ptmx tempora5005 DeclareMicrotypeAliasTempora-TOsFptmj 5006 DeclareMicrotypeAliasqtmptm TeX Gyre Termes (formerly qfontsQuasiTimes)

The step package5007 DeclareMicrotypeAliasSTEP-TLF ptmx step5008 DeclareMicrotypeAliasSTEP-TOsFptmj

The stix and stix2 packages (the latter has departed a bit from being a Timesclone but still seems close enough)

5009 DeclareMicrotypeAliasstix ptm stix5010 DeclareMicrotypeAliasstix2ptm stix2

More Times variants to be checked pns mns (TimesNewRomanPS) mnt (Times-NewRomanMT TimesNRSevenMT) mtm (TimesSmallTextMT) pte (TimesEuropa)ptt (TimesTen) TimesEighteen TimesModernEF

CONFIGURATION FILES Interaction with babel 146

MicroPressrsquos Charter version (chmath)5011 -- Charter5012 DeclareMicrotypeAliaschrbch CH Math

The XCharter package extends the Charter fonts5013 DeclareMicrotypeAliasXCharter-TLF bch XCharter5014 DeclareMicrotypeAliasXCharter-TOsFbch

The mathdesign package provides math fonts matching Bitstream Charter and URWGaramond

5015 DeclareMicrotypeAliasmdbchbch mathdesignCharter5016 -- Garamond5017 DeclareMicrotypeAliasmdugmugm mathdesignURW Garamond

The garamondx package an extension of URW Garamond providing small caps andoldstyle figures

5018 DeclareMicrotypeAliaszgmxugm garamondx5019 DeclareMicrotypeAliaszgmjugm 5020 DeclareMicrotypeAliaszgmIugm 5021 DeclareMicrotypeAliaszgmqugm

Because a configuration file for Adobe Garamond wouldnrsquot be permitted for TEX Livedistribution we use EB Garamond as the base font

5022 DeclareMicrotypeAliaspad EBGaramond-LF Adobe Garamond5023 DeclareMicrotypeAliaspadxEBGaramond-TLF 5024 DeclareMicrotypeAliaspadjEBGaramond-TOsF 5025 --

URW Letter Gothic is similar enough to Bitstream Letter Gothic to share the config-uration

5026 DeclareMicrotypeAliasulgblg URW LetterGothic -gt Bitstream LetterGothic12Pitch

The eulervm package virtually extends the Euler fonts5027 DeclareMicrotypeAliaszeureur Euler VM5028 DeclareMicrotypeAliaszeuseus

Euro symbol fonts to save some files5029 DeclareMicrotypeAliaszpeus zpeu Adobe Euro sans -gt serif5030 DeclareMicrotypeAliaseurosanszpeu Adobe Euro sans -gt serif5031

153 Interaction with babel

Contexts that are to be set when switching to a language5032 -----------------------------------------------------------------------5033 INTERACTION WITH THE `babelrsquo PACKAGE50345035 DeclareMicrotypeBabelHook5036 englishUKenglishbritishUSenglishamerican5037 kerning= spacing=nonfrench50385039 DeclareMicrotypeBabelHook5040 frenchfrancaisacadiancanadien5041 kerning=french spacing=50425043 DeclareMicrotypeBabelHook5044 turkish5045 kerning=turkish spacing=5046

CONFIGURATION FILES Note on admissible characters 147

154 Note on admissible charactersAll printable ASCII characters are allowed in the settings with the followingexceptions (on the left hand side the replacements on the right)

textbackslash textbraceleft textbraceright^ textasciicircum

Comma and equal sign must be guarded with braces (lsquorsquo lsquo=rsquo) to keep keyvalhappy

Character commands are allowed as far as they have been defined in the properLATEX way that is when they have been assigned a slot in the font encoding withDeclareTextSymbol or DeclareTextComposite Characters defined via chardefare also possible

Ligatures and mathchardefrsquoed symbols have to be specified numerically Ofcourse numerical identification is possible in any other case too

8-bit characters are also admissible provided they have been declared in theinput encoding file They should however only be used in private configurationfiles where the proper input encoding is guaranteed or else in combination withthe lsquoinputencrsquo key

With XETEX or LuaTEX in contrast it is advisable to use the proper Unicodecharacters or the font-specific glyph names prefixed with lsquorsquo (cf section 16)

155 Character inheritanceFirst the lists of inheriting characters We only declare those characters that are thesame on both sides ie not Πfor O

5047 langm-trang5048 langm-t|zpeu|mvsrang5049 -----------------------------------------------------------------------5050 CHARACTER INHERITANCE50515052 langm-t|zpeu|mvsrang5053 langm-trang

1551 OT1

Glyphs that should possibly inherit settings on one side only 012 (lsquofirsquo ligature)013 (lsquoflrsquo) 014 (lsquoffirsquo) 015 (lsquofflrsquo) AElig aelig Œ œ

5054 DeclareCharacterInheritance5055 encoding = OT1 5056 f = 011 ff5057 i = i5058 j = j5059 O = O5060 o = o5061 5062

CONFIGURATION FILES Character inheritance 148

1552 T1

Candidates here 028 (lsquofirsquo) 029 (lsquoflrsquo) 030 (lsquoffirsquo) 031 (lsquofflrsquo) 156 (lsquoIJrsquo ligature sinceLATEX 20051201 accessible as IJ) 188 (lsquoijrsquo ij) AElig aelig Œ œ

5063 DeclareCharacterInheritance5064 encoding = T1 5065 A = `ArsquoA^A~AAr Ak Au A5066 a = `arsquoa^a~aar ak au a5067 C = rsquoCc Cv C5068 c = rsquocc cv c5069 D = v DDH5070 d = v ddj5071 E = `ErsquoE^EEk Ev E5072 e = `ersquoe^eek ev e5073 f = 027 ff5074 G = u G5075 g = u g5076 I = `IrsquoI^III5077 i = `irsquoi^iii5078 j = j5079 L = LrsquoLv L5080 l = lrsquolv l5081 N = rsquoN~Nv N5082 n = rsquon~nv n5083 O = O`OrsquoO^O~OOH O5084 o = o`orsquoo^o~ooH o5085 R = rsquoRv R5086 r = rsquorv r5087 S = rsquoSc Sv SSS5088 s = rsquosc sv s5089 T = c Tv T5090 t = c tv t5091 U = `UrsquoU^UUH Ur U5092 u = `ursquou^uuH ur u5093 Y = rsquoYY5094 y = rsquoyy5095 Z = rsquoZZv Z5096 z = rsquozzv z

The lsquosoft hyphenrsquo often has reduced right side bearing so that it may already beprotruded hence no inheritance

5097 - = 1275098 5099

1553 LY1

More characters 008 (lsquoflrsquo) 012 (lsquofirsquo) 014 (lsquoffirsquo) 015 (lsquofflrsquo) AElig aelig Œ œ5100 DeclareCharacterInheritance5101 encoding = LY1 5102 A = `ArsquoA^A~AAr A5103 a = `arsquoa^a~aar a5104 C = c C5105 c = c c5106 D = DH5107 E = `ErsquoE^EE5108 e = `ersquoe^ee5109 f = 011 ff5110 I = `IrsquoI^II5111 i = `irsquoi^iii5112 L = L5113 l = l5114 N = ~N

CONFIGURATION FILES Character inheritance 149

5115 n = ~n5116 O = `OrsquoO^O~OOO5117 o = `orsquoo^o~ooo5118 S = v S5119 s = v s5120 U = `UrsquoU^UU5121 u = `ursquou^uu5122 Y = rsquoYY5123 y = rsquoyy5124 Z = v Z5125 z = v z5126 5127

1554 OT4

The Polish OT1 extension More interesting characters here 009 (lsquofkrsquo) 012 (lsquofirsquo)013 (lsquoflrsquo) 014 (lsquoffirsquo) 015 (lsquofflrsquo) AElig aelig Œ œ

5128 DeclareCharacterInheritance5129 encoding = OT4 5130 A = k A5131 a = k a5132 C = rsquoC5133 c = rsquoc5134 E = k E5135 e = k e5136 f = 011 ff5137 i = i5138 j = j5139 L = L5140 l = l5141 N = rsquoN5142 n = rsquon5143 O = OrsquoO5144 o = orsquoo5145 S = rsquoS5146 s = rsquos5147 Z = rsquoZZ5148 z = rsquozz5149 textquotedblleft = FF5150 5151

1555 QX

The Central European QX encoding17 Ligatures 009 (lsquofkrsquo) 012 (lsquofirsquo) 013 (lsquoflrsquo)014 (lsquoffirsquo) 015 (lsquofflrsquo) AElig aelig Œ œ

5152 DeclareCharacterInheritance5153 encoding = QX 5154 A = `ArsquoA^A~AAk AAA5155 a = `arsquoa^a~aak aaa5156 C = rsquoCc C5157 c = rsquocc c5158 D = DH5159 E = `ErsquoE^EEk E5160 e = `ersquoe^eek e5161 f = 011 ff5162 I = `IrsquoI^IIk I5163 i = `irsquoi^iik ii5164 j = j

17 Contributed by Maciej Eder

CONFIGURATION FILES Character inheritance 150

5165 L = L5166 l = l5167 N = rsquoN~N5168 n = rsquon~n5169 O = O`OrsquoO^O~OO5170 o = o`orsquoo^o~oo

The Romanian textcommabelow accents are actually replacements for the cvariants which had previously (and erroneously18) been included in QX encodingThey are still kept for backwards compatibility

5171 S = rsquoSc Stextcommabelow Sv S5172 s = rsquosc stextcommabelow sv s5173 T = c Ttextcommabelow T5174 t = c ttextcommabelow t5175 U = `UrsquoU^UUk U5176 u = `ursquou^uuk u5177 Y = rsquoYY5178 y = rsquoyy5179 Z = rsquoZZv Z5180 z = rsquozzv z5181 = textellipsis5182 5183

1556 T5

The Vietnamese encoding T5 It is so crowded with accented and double-accentedcharacters that there is no room for any ligatures

5184 DeclareCharacterInheritance5185 encoding = T5 5186 A = `ArsquoA~Ah Ad A^Au A5187 `AcircumflexrsquoAcircumflex~AcircumflexhAcircumflexdAcircumflex5188 `AbreversquoAbreve~AbrevehAbrevedAbreve5189 a = `arsquoa~ah ad a^au a5190 `acircumflexrsquoacircumflex~acircumflexhacircumflexdacircumflex5191 `abreversquoabreve~abrevehabrevedabreve5192 D = DJ5193 d = dj5194 E = `ErsquoE~Eh Ed E^E5195 `EcircumflexrsquoEcircumflex~EcircumflexhEcircumflexdEcircumflex5196 e = `ersquoe~eh ed e^e5197 `ecircumflexrsquoecircumflex~ecircumflexhecircumflexdecircumflex5198 I = `IrsquoI~Ih Id I5199 i = `irsquoi~ih id ii5200 O = `OrsquoO~Oh Od O^Ohorn O5201 `OcircumflexrsquoOcircumflex~OcircumflexhOcircumflexdOcircumflex5202 `OhornrsquoOhorn~OhornhOhorndOhorn5203 o = `orsquoo~oh od o^ohorn o5204 `ocircumflexrsquoocircumflex~ocircumflexhocircumflexdocircumflex5205 `ohornrsquoohorn~ohornhohorndohorn5206 U = `UrsquoU~Uh Ud Uhorn U5207 `UhornrsquoUhorn~UhornhUhorndUhorn5208 u = `ursquou~uh ud uhorn u5209 `uhornrsquouhorn~uhornhuhornduhorn5210 Y = `YrsquoY~Yh Yd Y5211 y = `yrsquoy~yh yd y5212 5213

18 Cf httptugorgpipermailtex-live2008-August017204html

CONFIGURATION FILES Character inheritance 151

1557 EU1 EU2 TU

The EU1 ( XETEX) EU2 (LuaTEX) and since fontspec version 25 TU encodingsare not well-defined in the sense that they donrsquot contain a fixed number of glyphsall of which must be present OpenType fonts may contain thousands of glyphsbut we only define those that should be present in every font (basically T1) Thisinheritance list should be overridden by font-specific ones

5214 DeclareCharacterInheritance5215 encoding = TUEU1EU2 5216 A = `ArsquoA^A~AAr Ak Au A5217 a = `arsquoa^a~aar ak au a5218 C = rsquoCc Cv C5219 c = rsquocc cv c5220 D = v DDH5221 d = v ddj5222 E = `ErsquoE^EEk Ev E5223 e = `ersquoe^eek ev e5224 f = f_f sometimes f_f sometimes ff5225 G = u G5226 g = u g5227 I = `IrsquoI^III5228 i = `irsquoi^iii5229 j = j5230 L = LrsquoLv L5231 l = lrsquolv l5232 N = rsquoN~Nv N5233 n = rsquon~nv n5234 O = O`OrsquoO^O~OOH O5235 o = o`orsquoo^o~ooH o5236 R = rsquoRv R5237 r = rsquorv r5238 S = rsquoSc Sv S SS5239 s = rsquosc sv s5240 T = c Tv T5241 t = c tv t5242 U = `UrsquoU^UUH Ur U5243 u = `ursquou^uuH ur u5244 Y = rsquoYY5245 y = rsquoyy5246 Z = rsquoZZv Z5247 z = rsquozzv z5248 52495250 langm-trang

1558 Euro symbols

Make Euro symbols settings simpler5251 langzpeurang5252 DeclareCharacterInheritance5253 encoding = U5254 family = zpeuzpeuseurosans 5255 E = 128 52565257 langzpeurang5258 langmvsrang

Since 20060511 (that is one week after Irsquove added these settings after thepackage had been dormant for six years) marvosymrsquos encoding is (correctly) Uinstead of OT1

5259 DeclareCharacterInheritance5260 encoding = OT1U

CONFIGURATION FILES Tracking 152

5261 family = mvs 5262 164 = 099100101 EURhvEURcrEURtm52635264 langmvsrang

156 TrackingBy default we only disable the lsquofrsquo ligatures for those fonts that have any Thusligatures and especially kerning for all other characters will be retained

5265 langm-trang5266 -----------------------------------------------------------------------5267 TRACKINGLETTERSPACING52685269 SetTracking5270 [ name = default5271 no ligatures = f ]5272 encoding = OT1T1T2ALY1OT4QXEU2TU 5273 5274

157 Font expansionThese are Hagraven Thecirc Thagravenhrsquos original expansion settings They are used for all fonts(until somebody shows mercy and creates font-specific settings)

5275 -----------------------------------------------------------------------5276 EXPANSION52775278 SetExpansion5279 [ name = default ]5280 encoding = OT1OT4QXT1LY1 5281 5282 A = 500 a = 7005283 AE = 500 ae = 7005284 B = 700 b = 7005285 C = 700 c = 7005286 D = 500 d = 7005287 E = 700 e = 7005288 F = 7005289 G = 500 g = 7005290 H = 700 h = 7005291 K = 700 k = 7005292 M = 700 m = 7005293 N = 700 n = 7005294 O = 500 o = 7005295 OE = 500 oe = 7005296 P = 700 p = 7005297 Q = 500 q = 7005298 R = 7005299 S = 700 s = 7005300 U = 700 u = 7005301 W = 700 w = 7005302 Z = 700 z = 7005303 2 = 7005304 3 = 7005305 6 = 7005306 8 = 7005307 9 = 7005308 5309

CONFIGURATION FILES Font expansion 153

Settings for Cyrillic T2A encoding19

5310 SetExpansion5311 [ name = T2A ]5312 encoding = T2A 5313 5314 A = 500 a = 7005315 B = 700 b = 7005316 C = 700 c = 7005317 D = 500 d = 7005318 E = 700 e = 7005319 F = 7005320 G = 500 g = 7005321 H = 700 h = 7005322 K = 700 k = 7005323 M = 700 m = 7005324 N = 700 n = 7005325 O = 500 o = 7005326 P = 700 p = 7005327 Q = 500 q = 7005328 R = 7005329 S = 700 s = 7005330 U = 700 u = 7005331 W = 700 w = 7005332 Z = 700 z = 7005333 2 = 7005334 3 = 7005335 6 = 7005336 8 = 7005337 9 = 7005338 CYRA = 500 cyra = 7005339 CYRB = 700 cyrb = 7005340 CYRV = 700 cyrv = 7005341 CYRG = 700 cyrg = 7005342 CYRD = 700 cyrd = 7005343 CYRE = 700 cyre = 7005344 CYRZH = 700 cyrzh = 7005345 CYRZ = 700 cyrz = 7005346 CYRI = 700 cyri = 7005347 CYRISHRT = 700 cyrishrt = 7005348 CYRK = 700 cyrk = 7005349 CYRL = 700 cyrl = 7005350 CYRM = 700 cyrm = 7005351 CYRN = 700 cyrn = 7005352 CYRO = 500 cyro = 7005353 CYRP = 700 cyrp = 7005354 CYRR = 700 cyrr = 7005355 CYRS = 700 cyrs = 7005356 CYRT = 700 cyrt = 7005357 CYRU = 700 cyru = 7005358 CYRF = 700 cyrf = 7005359 CYRH = 700 cyrh = 7005360 CYRC = 700 cyrc = 7005361 CYRCH = 700 cyrch = 7005362 CYRSH = 700 cyrsh = 7005363 CYRSHCH = 700 cyrshch = 7005364 CYRHRDSN = 700 cyrhrdsn = 7005365 CYRERY = 700 cyrery = 7005366 CYRSFTSN = 700 cyrsftsn = 7005367 CYREREV = 700 cyrerev = 7005368 CYRYU = 700 cyryu = 7005369 CYRYA = 700 cyrya = 7005370 5371

19 Contributed by Karl Karlsson

CONFIGURATION FILES Character protrusion 154

T5 encoding does not contain AE ae OE and oe5372 SetExpansion5373 [ name = T5 ]5374 encoding = T5 5375 5376 A = 500 a = 7005377 B = 700 b = 7005378 C = 700 c = 7005379 D = 500 d = 7005380 E = 700 e = 7005381 F = 7005382 G = 500 g = 7005383 H = 700 h = 7005384 K = 700 k = 7005385 M = 700 m = 7005386 N = 700 n = 7005387 O = 500 o = 7005388 P = 700 p = 7005389 Q = 500 q = 7005390 R = 7005391 S = 700 s = 7005392 U = 700 u = 7005393 W = 700 w = 7005394 Z = 700 z = 7005395 2 = 7005396 3 = 7005397 6 = 7005398 8 = 7005399 9 = 7005400 54015402 langm-trang

158 Character protrusion5403 -----------------------------------------------------------------------5404 PROTRUSION5405

For future historians Hagraven Thecirc Thagravenhrsquos original settings (from protcodetex con-verted to microtype notation)

SetProtrusion [ name = thanh ] encoding = OT1 A = 5050 F = 50 J = 50 K = 50 L = 50 T = 5050 V = 5050 W = 5050 X = 5050 Y = 5050 k = 50 r = 50 t = 50 v = 5050 w = 5050 x = 5050 y = 5050 = 700 = 700

CONFIGURATION FILES Character protrusion 155

= 500 = 500 = 200 = 200 ( = 50 ) = 50 - = 700 textendash = 300 textemdash = 200 textquoteleft = 700 textquoteright = 700 textquotedblleft = 500 textquotedblright = 500

1581 Normal

The default settings always use the most moderate value5406 langcfg-trang5407 SetProtrusion5408 langm-trang [ name = default ]

We also create configuration files for the fonts

bull Bitstream Charter (NFSS code bch)

5409 langbchrang [ name = bch-default ]

bull Bitstream Letter Gothic (blg)

5410 langblgrang [ name = blg-default ]

bull Computer Modern Roman (cmr)

5411 langcmrrang [ name = cmr-default ]

bull EB Garamond

5412 langebgrang [ name = EBGaramond-default ]

bull Minion20 (pmnx pmnj)

5413 langpmnrang [ name = pmnj-default ]

bull Palatino (ppl pplx pplj)

5414 langpplrang [ name = ppl-default ]

bull Times (ptm ptmx ptmj)

5415 langptmrang [ name = ptm-default ]

bull URW Garamond (ugm)5416 langugmrang [ name = ugm-default ]5417 langm-t|cmr|pmnrang 5418 langbch|blg|ebg|ugmrang encoding = OT15419 langppl|ptmrang encoding = OT1OT45420 langbchrang family = bch 5421 langblgrang family = blg 5422 langebgrang family = EBGaramond-LFEBGaramond-OsFEBGaramond-TLFEBGaramond-TOsF 5423 langpplrang family = pplpplxpplj 5424 langptmrang family = ptmptmxptmj 5425 langugmrang family = ugm 5426 5427 langm-t|bch|blg|cmr|ebg|pmn|ppl|ptmrang A = 50505428 langugmrang A = 501005429 langebg|ptmrang AE = 50 5430 langugmrang AE = 150505431 langugmrang B = 505432 langbch|ebg|pmn|ugmrang C = 50

20 Contributed by Harald Harders and Karl Karlsson

CONFIGURATION FILES Character protrusion 156

5433 langbch|ebg|pmnrang D = 505434 langugmrang D = 705435 langugmrang E = 505436 langm-t|bch|cmr|ebg|pmn|ptmrang F = 505437 langugmrang F = 705438 langbch|ebg|pmnrang G = 50 5439 langugmrang G = 50505440 langblgrang I = 1501505441 langm-t|cmr|ebg|pmn|ppl|ptm|ugmrang J = 50 5442 langbch|blgrang J = 100 5443 langblgrang K = 505444 langblgrang K = 50 5445 langm-t|bch|cmr|ebg|pmn|pplrang L = 505446 langblgrang L = 1505447 langptmrang L = 805448 langugmrang L = 1205449 langbch|ebg|pmn|ugmrang O = 50505450 langebgrang OE = 50 5451 langugmrang OE = 50505452 langblgrang P = 1005453 langugmrang P = 505454 langbch|ebg|pmnrang Q = 50705455 langugmrang Q = 50505456 langbchrang R = 505457 langugmrang R = 705458 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang T = 50505459 langblgrang T = 1001005460 langugmrang T = 70705461 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang V = 50505462 langblg|ugmrang V = 70705463 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang W = 50505464 langugmrang W = 70705465 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang X = 50505466 langugmrang X = 50705467 langm-t|bch|cmr|ebg|pmn|pplrang Y = 50505468 langblg|ptm|ugmrang Y = 80805469 langugmrang Z = 50505470 langblgrang f = 1501005471 langblgrang i = 1501505472 langblgrang j = 1001005473 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang k = 505474 langugmrang k = 705475 langblgrang l = 1501505476 langpmnrang l = -505477 langebg|pplrang p = 50505478 langugmrang p = 505479 langebg|pplrang q = 50 5480 langblgrang r = 505481 langblgrang r = 100 805482 langcmr|ebg|pmnrang t = 705483 langbchrang t = 505484 langblgrang t = 150 805485 langugmrang t = 1005486 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang v = 50505487 langblgrang v = 1001005488 langugmrang v = 50705489 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang w = 50505490 langugmrang w = 50705491 langblgrang x = 50505492 langblgrang x = 1001005493 langm-t|bch|ebg|pmnrang y = 505494 langblgrang y = 501005495 langcmr|ppl|ptmrang y = 50705496 langugmrang y = 70

5497 langcmrrang 0 = 50

CONFIGURATION FILES Character protrusion 157

5498 langm-trang 1 = 50505499 langbch|blg|ebg|ptm|ugmrang 1 = 1501505500 langcmrrang 1 = 1002005501 langpmnrang 1 = 505502 langpplrang 1 = 1001005503 langbch|cmr|ebg|ugmrang 2 = 50505504 langblgrang 2 = 1005505 langbch|pmnrang 3 = 50 5506 langcmr|ebg|ugmrang 3 = 50505507 langblgrang 3 = 100 5508 langm-t|ebgrang 4 = 50505509 langbchrang 4 = 100505510 langblgrang 4 = 100 5511 langcmr|ugmrang 4 = 70705512 langpmnrang 4 = 50 5513 langptmrang 4 = 70 5514 langcmrrang 5 = 505515 langebgrang 5 = 50505516 langbchrang 6 = 50 5517 langcmrrang 6 = 505518 langebgrang 6 = 50505519 langm-trang 7 = 50505520 langbch|ebg|pmn|ugmrang 7 = 50805521 langblgrang 7 = 1001005522 langcmr|ptmrang 7 = 501005523 langpplrang 7 = 505524 langcmrrang 8 = 505525 langbch|ebgrang 9 = 50505526 langcmrrang 9 = 505527 langm-t|cmr|ebg|pmn|ppl|ptm|ugmrang = 7005528 langbchrang = 6005529 langblgrang = 4005005530 langblgrang = 5005531 langblgrang = 3004005532 langm-t|cmr|ebg|pmn|ppl|ptm|ugmrang = 5005533 langbchrang = 4005534 langblgrang = 3004005535 langm-t|bch|ebg|pmn|ptmrang = 3005536 langblgrang = 2003005537 langcmr|pplrang = 5005538 langugmrang = 4005539 langblgrang = 1005540 langblgrang = 2002005541 langm-t|ebg|pmn|ptmrang = 1005542 langbch|cmr|ppl|ugmrang = 2005543 langblgrang = 1501505544 langpmnrang = 3003005545 langm-t|bch|cmr|ebg|pmn|pplrang = 50505546 langptmrang = 1001005547 langm-t|bch|blg|cmr|ebg|pmn|ppl|ptmrang ~ = 2002505548 langugmrang ~ = 3003505549 langebg|ppl|ptmrang amp = 501005550 langugmrang amp = 1005551 langm-t|cmr|ebg|pmnrang = 50505552 langbchrang = 505553 langppl|ptmrang = 1001005554 langugmrang = 501005555 langblgrang = 1001005556 langm-t|ppl|ptm|ugmrang = 2002005557 langbch|pmnrang = 2003005558 langblgrang = 1502005559 langcmr|ebgrang = 3003005560 langm-t|cmr|ppl|ptmrang + = 2502505561 langbchrang + = 1502505562 langebgrang + = 300300

CONFIGURATION FILES Character protrusion 158

5563 langblg|pmnrang + = 1502005564 langugmrang + = 2503005565 langblg|ugmrang == 2002005566 langm-t|ebg|pmn|ptmrang ( = 100 ) = 2005567 langbch|ugmrang ( = 200 ) = 2005568 langcmr|blgrang ( = 300 ) = 3005569 langpplrang ( = 100 ) = 3005570 langbch|pmnrang [ = 100 ] = 1005571 langblgrang [ = 300100 ] = 300

5572 langm-t|ebg|pmn|ptmrang = 1002005573 langbchrang = 2005574 langblgrang = 3003005575 langcmr|pplrang = 2003005576 langugmrang = 1003005577 langm-t|ptmrang - = 5005005578 langbch|cmr|pplrang - = 4005005579 langblgrang - = 3004005580 langebgrang - = 3005005581 langpmnrang - = 2004005582 langugmrang - = 5006005583 langblgrang lt = 200100 gt = 1002005584 langblgrang _ = 1502505585 langblgrang | = 2502505586 langm-t|pmnrang textendash = 200200 textemdash = 1501505587 langbchrang textendash = 200300 textemdash = 1502505588 langcmrrang textendash = 400300 textemdash = 3002005589 langebg|ppl|ptmrang textendash = 300300 textemdash = 2002005590 langugmrang textendash = 250300 textemdash = 250250

Why settings for left and right quotes Because in some languages they might beused like that (see the csquotes package for examples)

5591 langm-t|bch|pmnrang textquoteleft = 300400 textquoteright = 3004005592 langblgrang textquoteleft = 400600 textquoteright = 4006005593 langcmrrang textquoteleft = 500700 textquoteright = 5006005594 langebg|pplrang textquoteleft = 500700 textquoteright = 5007005595 langptmrang textquoteleft = 500500 textquoteright = 3005005596 langugmrang textquoteleft = 300600 textquoteright = 3006005597 langm-t|bch|pmnrang textquotedblleft = 300300 textquotedblright = 3003005598 langblgrang textquotedblright = 3004005599 langcmrrang textquotedblleft = 500300 textquotedblright = 2006005600 langebg|ppl|ptmrang textquotedblleft = 300400 textquotedblright = 3004005601 langugmrang textquotedblleft = 400400 textquotedblright = 4004005602 5603

Greek uppercase letters are in OT1 encoding only5604 langm-t|cmr|pmnrang5605 SetProtrusion5606 langm-trang [ name = OT1-default5607 langcmrrang [ name = cmr-OT15608 langpmnrang [ name = pmnj-OT15609 langm-trang load = default ]5610 langcmrrang load = cmr-default ]5611 langpmnrang load = pmnj-default ]5612 langm-trang encoding = OT1 5613 langcmrrang encoding = OT1OT45614 langpmnrang encoding = OT15615 langcmrrang family = cmr 5616 langpmnrang family = pmnj 5617 5618 langm-t|cmrrang AE = 50 5619 langpmnrang OE = 50 5620 langcmrrang5621 00 = 150 Gamma

CONFIGURATION FILES Character protrusion 159

5622 01 = 100100 Delta5623 02 = 50 50 Theta5624 03 = 100100 Lambda5625 06 = 50 50 Sigma5626 07 = 100100 Upsilon5627 08 = 50 50 Phi5628 09 = 50 50 Psi

Remaining slots can be found in the source file5629 langcmrrang5630 56315632 langm-t|cmr|pmnrang

T1 and LY1 encodings contain some more characters The default list will be loadedfirst For XETEX (EU1) and LuaTEX (EU2) we simply use the T1 list as default (fornow)

5633 SetProtrusion5634 langm-trang [ name = T1-default5635 langbchrang [ name = bch-T15636 langblgrang [ name = blg-T15637 langcmrrang [ name = cmr-T15638 langebgrang [ name = EBGaramond-T15639 langpmnrang [ name = pmnj-T15640 langpplrang [ name = ppl-T15641 langptmrang [ name = ptm-T15642 langugmrang [ name = ugm-T15643 langm-trang load = default ]5644 langbchrang load = bch-default ]5645 langblgrang load = blg-default ]5646 langcmrrang load = cmr-default ]5647 langebgrang load = EBGaramond-default ]5648 langpmnrang load = pmnj-default ]5649 langpplrang load = ppl-default ]5650 langptmrang load = ptm-default ]5651 langugmrang load = ugm-default ]5652 langm-trang encoding = T1LY1EU1EU2TU 5653 langbch|cmr|ebg|pmn|pplrang encoding = T1LY15654 langblg|ptm|ugmrang encoding = T15655 langbchrang family = bch 5656 langblgrang family = blg 5657 langcmrrang family = cmr 5658 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF 5659 langpmnrang family = pmnj 5660 langpplrang family = pplpplxpplj 5661 langptmrang family = ptmptmxptmj 5662 langugmrang family = ugm 5663 5664 langm-t|cmrrang AE = 50 5665 langbch|pmnrang OE = 50 5666 langpmnrang TH = 505667 langblgrang v L = 2505668 langblgrang v d = 2505669 langblgrang v l = 2505670 langblgrang v t = 2505671 langblgrang 127 = 3004005672 langblgrang 156 = 100 IJ5673 langblgrang 188 = 80 80 ij5674 langm-t|bch|ebg|pmn|ppl|ptmrang _ = 1001005675 langcmrrang _ = 2002005676 langugmrang _ = 1002005677 langm-t|ebg|pmn|ptmrang textbackslash = 1002005678 langbchrang textbackslash = 1502005679 langblgrang textbackslash = 2503005680 langcmr|pplrang textbackslash = 200300

CONFIGURATION FILES Character protrusion 160

5681 langugmrang textbackslash = 1003005682 langugmrang textbar = 2002005683 langblgrang textendash = 300300 textemdash = 1501505684 langblgrang textquotedbl = 300400 textquotedblleft = 3004005685 langcmrrang textquotedbl = 300300 textquotedblleft = 200600

The EC fonts do something weird they insert an implicit kern between quote andboundary character Therefore we must override the settings from OT1

5686 langm-t|cmr|ebg|ppl|ptm|ugmrang quotesinglbase = 400400 quotedblbase = 4004005687 langblgrang quotesinglbase = 400400 quotedblbase = 3004005688 langbch|pmnrang quotesinglbase = 400400 quotedblbase = 3003005689 langm-t|bch|pmnrang guilsinglleft = 400300 guilsinglright = 3004005690 langblgrang guilsinglleft = 300500 guilsinglright = 3005005691 langcmr|ebg|ppl|ptmrang guilsinglleft = 400400 guilsinglright = 3005005692 langugmrang guilsinglleft = 400400 guilsinglright = 3006005693 langm-trang guillemotleft = 200200 guillemotright = 2002005694 langcmrrang guillemotleft = 300200 guillemotright = 1004005695 langbch|pmnrang guillemotleft = 200200 guillemotright = 1503005696 langblg|ebg|ppl|ptmrang guillemotleft = 300300 guillemotright = 2004005697 langugmrang guillemotleft = 300400 guillemotright = 3004005698 langm-t|bch|cmr|ebg|pmn|ppl|ugmrang textexclamdown = 100 textquestiondown = 100 5699 langblgrang textexclamdown = 200 textquestiondown = 100 5700 langptmrang textexclamdown = 200 textquestiondown = 200 5701 langm-t|cmr|ebg|ppl|ptm|ugmrang textbraceleft = 400200 textbraceright = 2004005702 langbch|blg|pmnrang textbraceleft = 200 textbraceright = 3005703 langm-t|bch|cmr|ebg|ppl|ptm|ugmrang textless = 200100 textgreater = 1002005704 langpmnrang textless = 100 textgreater = 1005705 langpmnrang textvisiblespace = 100100 not in LY1

5706 5707

The lmodern fonts used to restore the original settings from OT1 fonts Now theyrequire even other settings though

5708 langcmrrang5709 SetProtrusion5710 [ name = lmr-T15711 load = cmr-T1 ]5712 encoding = T1LY15713 family = lmr 5714 5715 textquotedblleft = 300400 textquotedblright = 3004005716 57175718 langcmrrang

Settings for the T2A encoding (generic Computer Modern Roman and Minion)21

5719 langm-t|cmr|pmnrang5720 SetProtrusion5721 langm-trang [ name = T2A-default5722 langcmrrang [ name = cmr-T2A5723 langpmnrang [ name = pmnj-T2A5724 langm-trang load = default ]5725 langcmrrang load = cmr-default ]5726 langpmnrang load = pmnj-default ]5727 encoding = T2A5728 langm-trang 5729 langcmrrang family = cmr 5730 langpmnrang family = pmnj 5731 5732 CYRA = 50505733 CYRG = 505734 CYRK = 50

21 Contributed by Karl Karlsson

CONFIGURATION FILES Character protrusion 161

5735 CYRT = 50505736 CYRH = 50505737 CYRU = 50505738 langpmnrang CYRS = 50 5739 langpmnrang CYRO = 50505740 cyrk = 505741 cyrg = 505742 cyrh = 50505743 langm-t|pmnrang cyru = 50505744 langcmrrang cyru = 50705745 langm-trang _ = 1001005746 langcmrrang _ = 2002005747 langm-trang textbackslash = 100200 quotedblbase = 4004005748 langcmrrang textbackslash = 200300 quotedblbase = 4004005749 langpmnrang textbackslash = 100200 quotedblbase = 3003005750 langcmrrang textquotedbl = 300300 textquotedblleft = 2006005751 langm-trang guillemotleft = 200200 guillemotright = 2002005752 langcmrrang guillemotleft = 300200 guillemotright = 1004005753 langpmnrang guillemotleft = 200200 guillemotright = 1503005754 langm-t|cmrrang textbraceleft = 400200 textbraceright = 2004005755 langpmnrang textbraceleft = 200 textbraceright = 3005756 langm-t|cmrrang textless = 200100 textgreater = 1002005757 langpmnrang textless = 100 textgreater = 1005758 57595760 langm-t|cmr|pmnrang

Settings for the QX encoding (generic and Times)22 It also includes some glyphsotherwise in TS1

5761 langm-t|ptmrang5762 SetProtrusion5763 langm-trang [ name = QX-default5764 langptmrang [ name = ptm-QX5765 langm-trang load = default ]5766 langptmrang load = ptm-default ]5767 langm-trang encoding = QX 5768 langptmrang encoding = QX5769 langptmrang family = ptmptmxptmj 5770 5771 AE = 50 5772 langptmrang = 2002005773 = = 1001005774 textunderscore = 1001005775 textbackslash = 1002005776 quotedblbase = 4004005777 langm-trang guillemotleft = 200200 guillemotright = 2002005778 langptmrang guillemotleft = 300300 guillemotright = 2004005779 textexclamdown = 100 textquestiondown = 100 5780 langm-trang textbraceleft = 400200 textbraceright = 2004005781 langptmrang textbraceleft = 200200 textbraceright = 2003005782 textless = 200100 textgreater = 1002005783 textminus = 200200 textdegree = 3003005784 langm-trang copyright = 100100 textregistered = 1001005785 langptmrang copyright = 100150 textregistered = 1001505786 langptmrang textxgeq = 100 textxleq = 100 5787 langptmrang textalpha = 50 textDelta = 70 705788 langptmrang textpi = 50 80 textSigma = 705789 langptmrang textmu = 80 texteuro = 50 505790 langptmrang textellipsis = 150200 textasciitilde = 80 805791 langptmrang textapprox = 50 50 textinfty = 1001005792 langptmrang textdagger = 150150 textdaggerdbl = 1001005793 langptmrang textdiv = 50150 textsection = 80 805794 langptmrang texttimes = 100150 textpm = 50 80

22 Contributed by Maciej Eder

CONFIGURATION FILES Character protrusion 162

5795 langptmrang textbullet = 150150 textperiodcentered = 3003005796 langptmrang textquotesingle = 500500 textquotedbl = 3003005797 langptmrang textperthousand = 505798 57995800 langm-t|ptmrang

T5 is based on OT1 it shares some but not all extra characters of T1 All accentedcharacters are already taken care of by the inheritance list

5801 langcmr|bchrang5802 SetProtrusion5803 langcmrrang [ name = cmr-T55804 langcmrrang load = cmr-default ]5805 langbchrang [ name = bch-T55806 langbchrang load = bch-default ]5807 encoding = T55808 langcmrrang family = cmr 5809 langbchrang family = bch 5810 5811 langbchrang _ = 1001005812 langbchrang textbackslash = 1502005813 langcmrrang textbackslash = 2003005814 langcmrrang textquotedblleft = 2006005815 langcmrrang textquotedbl = 3003005816 langbchrang quotesinglbase = 400400 quotedblbase = 3003005817 langcmrrang quotesinglbase = 400400 quotedblbase = 4004005818 langbchrang guilsinglleft = 400300 guilsinglright = 3004005819 langcmrrang guilsinglleft = 400400 guilsinglright = 3005005820 langbchrang guillemotleft = 200200 guillemotright = 1503005821 langcmrrang guillemotleft = 300200 guillemotright = 1004005822 langbchrang textbraceleft = 200 textbraceright = 3005823 langcmrrang textbraceleft = 400200 textbraceright = 2004005824 textless = 200100 textgreater = 1002005825 58265827 langcmr|bchrang

Minion with lining numbers5828 langpmnrang5829 SetProtrusion5830 [ name = pmnx-OT15831 load = pmnj-default ]5832 encoding = OT15833 family = pmnx 5834 5835 1 = 2301805836 58375838 SetProtrusion5839 [ name = pmnx-T15840 load = pmnj-T1 ]5841 encoding = T1LY15842 family = pmnx 5843 5844 1 = 2301805845 58465847 SetProtrusion5848 [ name = pmnx-T2A5849 load = pmnj-T2A ]5850 encoding = T2A5851 family = pmnx 5852 5853 1 = 2301805854

CONFIGURATION FILES Character protrusion 163

58555856 langpmnrang

Times is the default font for LY1 therefore we provide settings for the additionalcharacters in this encoding too

5857 langptmrang5858 SetProtrusion5859 [ name = ptm-LY15860 load = ptm-T1 ]5861 encoding = LY15862 family = ptmptmxptmj 5863 5864 _ = 1001005865 texttrademark = 1001005866 textregistered = 1001005867 textcopyright = 1001005868 textdegree = 3003005869 textminus = 2002005870 textellipsis = 1502005871 texteuro = 5872 textcent = 1001005873 textquotesingle = 5005005874 textflorin = 50 705875 textdagger = 1501505876 textdaggerdbl = 1001005877 textperthousand = 505878 textbullet = 1501505879 textonesuperior = 1001005880 texttwosuperior = 50 505881 textthreesuperior = 50 505882 textperiodcentered = 3003005883 textplusminus = 50 805884 textmultiply = 1001005885 textdivide = 50150

Remaining slots in the source file5886 58875888 langptmrang

1582 Italics

To find default settings for italic is difficult since the character shapes and theirbehaviour at the beginning or end of line may be wildly different for differentfonts In the generic settings we therefore omit the letters and only set up thepunctuation characters

The italic glyphs of Computer Modern Roman feature a lot of side bearingtherefore almost all of them have to protrude23

5889 SetProtrusion5890 langm-trang [ name = OT1-it ]5891 langbchrang [ name = bch-it ]5892 langblgrang [ name = blg-it5893 langblgrang load = blg-default ]5894 langcmrrang [ name = cmr-it ]5895 langebgrang [ name = EBGaramond-it ]5896 langpmnrang [ name = pmnj-it ]5897 langpplrang [ name = ppl-it ]5898 langptmrang [ name = ptm-it ]5899 langugmrang [ name = ugm-it ]5900 langm-t|bch|blg|ebg|ugmrang encoding = OT1

23 Settings contributed by Hendrik Vogt

CONFIGURATION FILES Character protrusion 164

5901 langppl|ptmrang encoding = OT1OT45902 langbchrang family = bch5903 langblgrang family = blg5904 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF5905 langpplrang family = pplpplxpplj5906 langptmrang family = ptmptmxptmj5907 langugmrang family = ugm5908 langm-t|bch|ebg|ppl|ptmrang shape = itsl 5909 langblg|ugmrang shape = it 5910 langcmr|pmnrang 5911 5912 langcmrrang A = 1001005913 langptmrang A = 100505914 langebg|pmnrang A = 50 5915 langugmrang A = 1505916 langpplrang A = 50505917 langptmrang AE = 100 5918 langebg|pplrang AE = 50 5919 langcmrrang B = 83-405920 langebg|ppl|ptmrang B = 50 5921 langpmnrang B = 20-505922 langbch|ppl|ptm|ugmrang C = 50 5923 langcmrrang C = 165-755924 langebgrang C = 100 5925 langpmnrang C = 50-505926 langcmrrang D = 75 -285927 langebg|ppl|ptmrang D = 50505928 langpmnrang D = 20 5929 langcmrrang E = 80-555930 langebg|ppl|ptmrang E = 50 5931 langpmnrang E = 20-505932 langcmrrang F = 85-805933 langebg|ptmrang F = 100 5934 langpmnrang F = 10 5935 langpplrang F = 50 5936 langbch|ppl|ptm|ugmrang G = 50 5937 langcmrrang G = 153-155938 langebgrang G = 100 5939 langpmnrang G = 50-505940 langcmrrang H = 73-605941 langebg|ppl|ptmrang H = 50 5942 langcmrrang I = 140-1205943 langebg|ptmrang I = 50 5944 langpmnrang I = 20-505945 langcmrrang J = 135-805946 langebgrang J = 50 5947 langpmnrang J = 20 5948 langptmrang J = 100 5949 langcmrrang K = 70-305950 langebg|ppl|ptmrang K = 50 5951 langpmnrang K = 20 5952 langcmrrang L = 87 405953 langebg|ppl|ptmrang L = 50 5954 langpmnrang L = 20505955 langugmrang L = 1005956 langcmrrang M = 67-455957 langpmnrang M = -305958 langptmrang M = 50 5959 langcmrrang N = 75-555960 langpmnrang N = -305961 langptmrang N = 50 5962 langbch|pmn|ppl|ptmrang O = 50 5963 langcmrrang O = 150-305964 langebgrang O = 100 5965 langugmrang O = 7050

CONFIGURATION FILES Character protrusion 165

5966 langppl|ptmrang OE = 50 5967 langebgrang OE = 100 5968 langcmrrang P = 82-505969 langebg|ppl|ptmrang P = 50 5970 langpmnrang P = 20-505971 langbch|pmn|ppl|ptmrang Q = 50 5972 langcmrrang Q = 150-305973 langebgrang Q = 100 5974 langugmrang Q = 70505975 langcmrrang R = 75 155976 langebg|ppl|ptmrang R = 50 5977 langpmnrang R = 20 5978 langbch|ebg|ppl|ptmrang S = 50 5979 langcmrrang S = 90-655980 langpmnrang S = 20-305981 langbch|ebg|ppl|ptmrang $ = 50 5982 langcmrrang $ = 100-205983 langpmnrang $ = 20-305984 langbch|pmn|ugmrang T = 70 5985 langcmrrang T = 220-855986 langebg|ppl|ptmrang T = 100 5987 langcmrrang U = 230-555988 langebg|ppl|ptmrang U = 50 5989 langpmnrang U = 50-505990 langcmrrang V = 260-605991 langebg|pmn|ugmrang V = 100 5992 langppl|ptmrang V = 100505993 langcmrrang W = 185-555994 langebg|pmn|ugmrang W = 100 5995 langpplrang W = 50 5996 langptmrang W = 100505997 langcmrrang X = 70-305998 langppl|ptmrang X = 50 5999 langcmrrang Y = 250-606000 langpmnrang Y = 50 6001 langpplrang Y = 100506002 langptmrang Y = 100 6003 langcmrrang Z = 90-606004 langpmnrang Z = -506005 langcmrrang a = 150-106006 langcmrrang b = 170 6007 langcmrrang c = 173-106008 langcmrrang d = 150-556009 langpmnrang d = -506010 langcmrrang e = 180 6011 langcmrrang f = -2506012 langebg|pmnrang f = -1006013 langcmrrang g = 150-106014 langcmrrang h = 100 6015 langcmrrang i = 210 6016 langpmnrang i = -306017 langcmrrang j = -406018 langpmnrang j = -306019 langcmrrang k = 110-506020 langcmrrang l = 240-1106021 langpmnrang l = -1006022 langcmrrang m = 80 6023 langcmrrang n = 115 6024 langbchrang o = 50506025 langcmrrang o = 155 6026 langbchrang p = 506027 langpmnrang p = -50 6028 langbchrang q = 50 6029 langcmrrang q = 170-406030 langcmrrang r = 155-40

CONFIGURATION FILES Character protrusion 166

6031 langpmnrang r = 506032 langcmrrang s = 130 6033 langbchrang t = 506034 langcmrrang t = 230-106035 langcmrrang u = 120 6036 langcmrrang v = 140-256037 langpmn|ugmrang v = 50 6038 langbchrang w = 506039 langcmrrang w = 98-206040 langpmn|ugmrang w = 50 6041 langcmrrang x = 65-406042 langbchrang y = 506043 langcmrrang y = 130-206044 langcmrrang z = 110-806045 langcmrrang 0 = 170-856046 langbch|ptmrang 1 = 1501006047 langcmrrang 1 = 2301106048 langebgrang 1 = 150 6049 langpmnrang 1 = 50 6050 langpplrang 1 = 100 6051 langugmrang 1 = 1501506052 langcmrrang 2 = 130-706053 langebg|ppl|ptmrang 2 = 50 6054 langpmnrang 2 = -50 6055 langbchrang 3 = 50 6056 langcmrrang 3 = 140-706057 langpmnrang 3 = -100 6058 langptmrang 3 = 100506059 langbchrang 4 = 100 6060 langcmrrang 4 = 130806061 langebgrang 4 = 150 6062 langppl|ptmrang 4 = 50 6063 langcmrrang 5 = 160 6064 langptmrang 5 = 50 6065 langbchrang 6 = 50 6066 langcmrrang 6 = 175-306067 langbch|ebg|ptmrang 7 = 100 6068 langcmrrang 7 = 250-1506069 langpmnrang 7 = 20 6070 langpplrang 7 = 50 6071 langcmrrang 8 = 130-406072 langcmrrang 9 = 155-806073 langm-t|cmr|ebg|pmn|pplrang = 5006074 langblgrang = 4006006075 langbch|ptm|ugmrang = 7006076 langblgrang = 3005006077 langm-t|ebg|pmn|pplrang = 5006078 langcmrrang = 4506079 langbch|ugmrang = 6006080 langptmrang = 7006081 langm-t|cmr|ebg|pplrang = 3006082 langbch|ugmrang = 4006083 langpmnrang = 2006084 langptmrang = 5006085 langm-t|cmr|ebg|pplrang = 3006086 langbch|ugmrang = 4006087 langpmnrang = 2006088 langptmrang = 5006089 langptmrang = 1006090 langbchrang = 2006091 langptmrang = 1006092 langpplrang = 3006093 langpmnrang = 4002006094 langm-t|ebg|pmn|ppl|ptmrang amp = 50506095 langbchrang amp = 80

CONFIGURATION FILES Character protrusion 167

6096 langcmrrang amp = 130306097 langugmrang amp = 501006098 langm-t|ebg|pmnrang = 100 6099 langcmrrang = 180506100 langbchrang = 50506101 langppl|ptmrang = 1001006102 langugmrang = 100506103 langm-t|pmn|pplrang = 2002006104 langbchrang = 3002006105 langcmrrang = 380206106 langebgrang = 5001006107 langptm|ugmrang = 4002006108 langm-t|pmn|pplrang + = 1502006109 langcmrrang + = 1802006110 langbch|ugmrang + = 2502506111 langebg|ptmrang + = 2502006112 langm-t|ebg|pmn|pplrang = 50506113 langbchrang = 80506114 langcmrrang = 180106115 langptmrang = 1501506116 langm-t|bch|ugmrang ~ = 1501506117 langcmr|ebg|pmn|ppl|ptmrang ~ = 2001506118 langugmrang == 2002006119 langm-t|bch|ebg|pmn|ppl|ptm|ugmrang ( = 200 ) = 2006120 langcmrrang ( = 300 ) = 706121 langm-t|ebg|ppl|ptm|ugmrang = 1002006122 langcmrrang = 1001006123 langbchrang = 1506124 langpmnrang = 1001506125 langm-trang - = 3003006126 langbch|ebgrang - = 3004006127 langpmnrang - = 2003006128 langcmrrang - = 5003006129 langpplrang - = 3005006130 langptmrang - = 5005006131 langugmrang - = 4007006132 langblgrang _ = 03006133 langm-t|pmnrang textendash = 200200 textemdash = 1501506134 langbchrang textendash = 200300 textemdash = 1502006135 langcmrrang textendash = 500300 textemdash = 4001706136 langebg|ppl|ptm|ugmrang textendash = 300300 textemdash = 2002006137 langm-t|bch|pmn|ugmrang textquoteleft = 400200 textquoteright = 4002006138 langblgrang textquoteleft = 400400 textquoteright = 4004006139 langcmrrang textquoteleft = 800200 textquoteright = 800-206140 langebgrang textquoteleft = 800200 textquoteright = 8002006141 langpplrang textquoteleft = 700400 textquoteright = 7004006142 langptmrang textquoteleft = 800500 textquoteright = 8005006143 langm-t|bch|pmnrang textquotedblleft = 400200 textquotedblright = 4002006144 langblgrang textquotedblright = 3003006145 langcmrrang textquotedblleft = 540100 textquotedblright = 5001006146 langebgrang textquotedblleft = 700200 textquotedblright = 7002006147 langpplrang textquotedblleft = 500300 textquotedblright = 5003006148 langptmrang textquotedblleft = 700400 textquotedblright = 7004006149 langugmrang textquotedblleft = 600200 textquotedblright = 6002006150 61516152 langcmr|pmnrang6153 SetProtrusion6154 langcmrrang [ name = cmr-it-OT16155 langpmnrang [ name = pmnj-it-OT16156 langcmrrang load = cmr-it ]6157 langpmnrang load = pmnj-it ]6158 langcmrrang encoding = OT1OT46159 langpmnrang encoding = OT16160 langcmrrang family = cmr

CONFIGURATION FILES Character protrusion 168

6161 langpmnrang family = pmnj6162 langcmrrang shape = it 6163 langpmnrang shape = itsl 6164 6165 langcmrrang AE = 100 6166 langpmnrang AE = -506167 langcmrrang OE = 100 6168 langpmnrang OE = 50 6169 langcmrrang6170 00 = 200150 Gamma6171 01 = 150100 Delta6172 02 = 150 50 Theta6173 03 = 150 50 Lambda6174 04 = 100100 Xi6175 05 = 100100 Pi6176 06 = 100 50 Sigma6177 07 = 200150 Upsilon6178 08 = 150 50 Phi6179 09 = 150100 Psi6180 0A = 50 50 Omega6181 langcmrrang6182 61836184 langcmr|pmnrang6185 SetProtrusion6186 langm-trang [ name = T1-it-default6187 langbchrang [ name = bch-it-T16188 langblgrang [ name = blg-it-T16189 langcmrrang [ name = cmr-it-T16190 langebgrang [ name = EBGaramond-it-T16191 langpmnrang [ name = pmnj-it-T16192 langpplrang [ name = ppl-it-T16193 langptmrang [ name = ptm-it-T16194 langugmrang [ name = ugm-it-T16195 langm-trang load = OT1-it ]6196 langbchrang load = bch-it ]6197 langblgrang load = blg-T1 ]6198 langcmrrang load = cmr-it ]6199 langpmnrang load = pmnj-it ]6200 langebgrang load = EBGaramond-it ]6201 langpplrang load = ppl-it ]6202 langptmrang load = ptm-it ]6203 langugmrang load = ugm-it ]6204 langm-t|bch|cmr|ebg|pmn|pplrang encoding = T1LY16205 langblg|ptm|ugmrang encoding = T16206 langbchrang family = bch6207 langblgrang family = blg6208 langcmrrang family = cmr6209 langpmnrang family = pmnj6210 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF6211 langpplrang family = pplpplxpplj6212 langptmrang family = ptmptmxptmj6213 langugmrang family = ugm6214 langm-t|bch|ebg|pmn|ppl|ptmrang shape = itsl 6215 langblg|cmr|ugmrang shape = it 6216 6217 langm-t|bch|pmnrang _ = 1006218 langblgrang _ = 03006219 langcmr|ugmrang _ = 1002006220 langebg|ppl|ptmrang _ = 1001006221 langblgrang = 4006006222 langblgrang = 3005006223 langcmrrang AE = 100 6224 langpmnrang AE = -506225 langbch|pmnrang OE = 50

CONFIGURATION FILES Character protrusion 169

6226 langcmrrang OE = 100 6227 langpmnrang 031 = -100 ffl6228 langcmr|ptmrang 156 = 100 IJ6229 langebgrang 156 = 50 IJ6230 langpmnrang 156 = 20 IJ6231 langpmnrang 188 = -30 ij6232 langpmnrang v t = 1006233 langm-t|ebg|ppl|ptmrang textbackslash = 1002006234 langcmr|ugmrang textbackslash = 3003006235 langbchrang textbackslash = 1501506236 langpmnrang textbackslash = 1001506237 langugmrang textbar = 2002006238 langcmrrang textquotedblleft = 5003006239 langblgrang textquoteleft = 400400 textquoteright = 4004006240 langblgrang textquotedbl = 300300 textquotedblleft = 3003006241 langblgrang textquotedblright = 300300 quotedblbase = 2006006242 langm-t|ptmrang quotesinglbase = 300700 quotedblbase = 4005006243 langcmrrang quotesinglbase = 300700 quotedblbase = 2006006244 langbch|pmnrang quotesinglbase = 200500 quotedblbase = 1505006245 langebg|pplrang quotesinglbase = 500500 quotedblbase = 4004006246 langugmrang quotesinglbase = 300700 quotedblbase = 3005006247 langm-t|ppl|ptmrang guilsinglleft = 400400 guilsinglright = 3005006248 langbch|pmnrang guilsinglleft = 300400 guilsinglright = 2005006249 langcmrrang guilsinglleft = 500300 guilsinglright = 4004006250 langebgrang guilsinglleft = 500400 guilsinglright = 3005006251 langugmrang guilsinglleft = 400400 guilsinglright = 3006006252 langm-t|pplrang guillemotleft = 300300 guillemotright = 3003006253 langbch|pmnrang guillemotleft = 200300 guillemotright = 1504006254 langcmrrang guillemotleft = 400100 guillemotright = 2003006255 langebgrang guillemotleft = 300300 guillemotright = 2004006256 langptmrang guillemotleft = 300400 guillemotright = 2004006257 langugmrang guillemotleft = 300400 guillemotright = 3004006258 langm-t|ebg|ppl|ugmrang textexclamdown = 100 textquestiondown = 200 6259 langcmr|ptmrang textexclamdown = 200 textquestiondown = 200 6260 langpmnrang textexclamdown = -50 textquestiondown = -50 6261 langm-t|ppl|ugmrang textbraceleft = 200100 textbraceright = 2002006262 langbch|pmnrang textbraceleft = 200 textbraceright = 2006263 langcmr|ebg|ptmrang textbraceleft = 400100 textbraceright = 2002006264 langbch|pmnrang textless = 100 textgreater = 1006265 langcmr|ebg|ppl|ptmrang textless = 300100 textgreater = 2001006266 langpmnrang textvisiblespace = 1001006267 62686269 langm-t|cmr|pmnrang6270 SetProtrusion6271 langm-trang [ name = T2A-it-default6272 langcmrrang [ name = cmr-it-T2A6273 langpmnrang [ name = pmnj-it-T2A6274 langm-trang load = OT1-it ]6275 langcmrrang load = cmr-it ]6276 langpmnrang load = pmnj-it ]6277 encoding = T2A6278 langcmrrang family = cmr6279 langpmnrang family = pmnj6280 langm-t|pmnrang shape = itsl 6281 langcmrrang shape = it 6282 6283 langcmrrang CYRA = 100506284 langpmnrang CYRA = 50 6285 langcmrrang CYRB = 50 6286 langcmrrang CYRV = 50 6287 langpmnrang CYRV = 20-506288 langcmrrang CYRG = 100 6289 langpmnrang CYRG = 10 6290 langcmrrang CYRD = 50

CONFIGURATION FILES Character protrusion 170

6291 langcmrrang CYRE = 50 6292 langpmnrang CYRE = 20-506293 langcmrrang CYRZH = 50 6294 langcmrrang CYRZ = 50 6295 langpmnrang CYRZ = 20-506296 langcmrrang CYRI = 50 6297 langpmnrang CYRI = -306298 langcmrrang CYRISHRT = 50 6299 langcmrrang CYRK = 50 6300 langpmnrang CYRK = 20 6301 langcmrrang CYRL = 50 6302 langcmrrang CYRM = 50 6303 langpmnrang CYRM = -306304 langcmrrang CYRN = 50 6305 langcmrrang CYRO = 100 6306 langpmnrang CYRO = 50 6307 langcmrrang CYRP = 50 6308 langcmrrang CYRR = 50 6309 langpmnrang CYRR = 20-506310 langcmrrang CYRS = 100 6311 langpmnrang CYRS = 50 6312 langcmrrang CYRT = 100 6313 langpmnrang CYRT = 70 6314 langcmrrang CYRU = 100 6315 langpmnrang CYRU = 50 6316 langcmrrang CYRF = 100 6317 langcmrrang CYRH = 50 6318 langcmrrang CYRC = 50 6319 langcmrrang CYRCH = 100 6320 langcmrrang CYRSH = 50 6321 langcmrrang CYRSHCH = 50 6322 langcmrrang CYRHRDSN = 100 6323 langcmrrang CYRERY = 50 6324 langcmrrang CYRSFTSN = 50 6325 langcmrrang CYREREV = 50 6326 langcmrrang CYRYU = 50 6327 langcmrrang CYRYA = 50 6328 langpmnrang CYRYA = 206329 langpmnrang cyrr = -50 6330 langm-t|pmnrang _ = 1006331 langcmrrang _ = 1002006332 langpmnrang 031 = -100 ffl6333 langpmnrang v t = 1006334 langm-trang textbackslash = 100200 quotedblbase = 4005006335 langcmrrang textbackslash = 300300 quotedblbase = 2006006336 langpmnrang textbackslash = 100150 quotedblbase = 1505006337 langm-trang guillemotleft = 300300 guillemotright = 3003006338 langcmrrang guillemotleft = 400100 guillemotright = 2003006339 langpmnrang guillemotleft = 200300 guillemotright = 1504006340 langm-trang textbraceleft = 200100 textbraceright = 2002006341 langcmrrang textbraceleft = 400100 textbraceright = 2002006342 langpmnrang textbraceleft = 200 textbraceright = 2006343 langcmrrang textquotedblleft = 5003006344 langcmrrang textless = 300100 textgreater = 2001006345 langpmnrang textless = 100 textgreater = 1006346 63476348 langm-t|cmr|pmnrang6349 langm-t|ptmrang6350 SetProtrusion6351 langm-trang [ name = QX-it-default6352 langptmrang [ name = ptm-it-QX6353 langm-trang load = OT1-it ]6354 langptmrang load = ptm-it ]6355 encoding = QX

CONFIGURATION FILES Character protrusion 171

6356 langptmrang family = ptmptmxptmj6357 shape = itsl 6358 6359 langptmrang 009 = 50 fk6360 = = 1001006361 langm-trang textunderscore = 1001006362 langptmrang textunderscore = 1001506363 textbackslash = 1002006364 quotedblbase = 3004006365 langm-trang guillemotleft = 300300 guillemotright = 3003006366 langptmrang guillemotleft = 200400 guillemotright = 2004006367 textexclamdown = 200 textquestiondown = 200 6368 textbraceleft = 200100 textbraceright = 2002006369 textless = 100100 textgreater = 1001006370 textminus = 200200 textdegree = 3001506371 langm-trang copyright = 100100 textregistered = 1001006372 langptmrang textregistered = 100150 copyright = 1001506373 langptmrang textDelta = 70 textdelta = 506374 langptmrang textpi = 50 80 textmu = 806375 langptmrang texteuro = 200 textellipsis = 1002006376 langptmrang textquoteleft = 500400 textquoteright = 5004006377 langptmrang textquotedblleft = 500300 textquotedblright = 4004006378 langptmrang textapprox = 50 50 textinfty = 1001006379 langptmrang textdagger = 150150 textdaggerdbl = 1001006380 langptmrang textdiv = 150150 textasciitilde = 80 806381 langptmrang texttimes = 100150 textpm = 50 806382 langptmrang textbullet = 300100 textperiodcentered = 3003006383 langptmrang textquotesingle = 500500 textquotedbl = 3003006384 langptmrang textperthousand = 506385 63866387 langm-t|ptmrang6388 langcmr|bchrang6389 SetProtrusion6390 langcmrrang [ name = cmr-it-T56391 langcmrrang load = cmr-it ]6392 langbchrang [ name = bch-it-T56393 langbchrang load = bch-it ]6394 encoding = T56395 langbchrang family = bch6396 langcmrrang family = cmr6397 shape = it 6398 6399 langbchrang _ = 1006400 langcmrrang _ = 1002006401 langbchrang textbackslash = 1501506402 langcmrrang textbackslash = 3003006403 langbchrang quotesinglbase = 200500 quotedblbase = 1505006404 langcmrrang quotesinglbase = 300700 quotedblbase = 2006006405 langbchrang guilsinglleft = 300400 guilsinglright = 2005006406 langcmrrang guilsinglleft = 500300 guilsinglright = 4004006407 langbchrang guillemotleft = 200300 guillemotright = 1504006408 langcmrrang guillemotleft = 400100 guillemotright = 2003006409 langbchrang textbraceleft = 200 textbraceright = 2006410 langcmrrang textbraceleft = 400100 textbraceright = 2002006411 langbchrang textless = 100 textgreater = 1006412 langcmrrang textless = 300100 textgreater = 2001006413 64146415 langcmr|bchrang

Slanted is very similar to italic6416 langcmrrang6417 SetProtrusion6418 [ name = cmr-sl

CONFIGURATION FILES Character protrusion 172

6419 load = cmr-it-OT1 ]6420 encoding = OT1OT46421 family = cmr6422 shape = sl 6423 6424 L = 506425 f = -506426 - = 300 6427 textendash = 400 textemdash = 300 6428 64296430 SetProtrusion6431 [ name = cmr-sl-T16432 load = cmr-it-T1 ]6433 encoding = T1LY16434 family = cmr6435 shape = sl 6436 6437 L = 506438 f = -506439 - = 300 6440 textendash = 400 textemdash = 300 6441 64426443 SetProtrusion6444 [ name = cmr-sl-T2A6445 load = cmr-it-T2A ]6446 encoding = T2A6447 family = cmr6448 shape = sl 6449 6450 L = 506451 f = -506452 - = 300 6453 textendash = 400 textemdash = 300 6454 64556456 SetProtrusion6457 [ name = cmr-sl-T56458 load = cmr-it-T5 ]6459 encoding = T56460 family = cmr6461 shape = sl 6462 6463 L = 506464 f = -506465 - = 300 6466 textendash = 400 textemdash = 300 6467 64686469 SetProtrusion6470 [ name = lmr-it-T16471 load = cmr-it-T1 ]6472 encoding = T1LY16473 family = lmr6474 shape = itsl 6475 6476 textquotedblleft = 200 textquotedblright = 2006477 quotesinglbase = 400 quotedblbase = 5006478 6479

Oldstyle numerals are slightly different6480 SetProtrusion6481 [ name = cmr(oldstyle)-it

CONFIGURATION FILES Character protrusion 173

6482 load = cmr-it-T1 ]6483 encoding = T16484 family = hforcmor6485 shape = itsl 6486 6487 1 = 250 506488 2 = 150-1006489 3 = 100-506490 4 = 1501506491 6 = 200 6492 7 = 200 506493 8 = 150-506494 9 = 100 506495 64966497 langcmrrang6498 langpmnrang6499 SetProtrusion6500 [ name = pmnx-it6501 load = pmnj-it ]6502 encoding = OT16503 family = pmnx6504 shape = itsl 6505 6506 1 = 1001506507 65086509 SetProtrusion6510 [ name = pmnx-it-T16511 load = pmnj-it-T1 ]6512 encoding = T1LY16513 family = pmnx6514 shape = itsl 6515 6516 1 = 1001506517 65186519 SetProtrusion6520 [ name = pmnx-it-T2A6521 load = pmnj-it-T2A ]6522 encoding = T2A6523 family = pmnx6524 shape = itsl 6525 6526 1 = 1001506527 65286529 langpmnrang6530 langptmrang6531 SetProtrusion6532 [ name = ptm-it-LY16533 load = ptm-it-T1 ]6534 encoding = LY16535 family = ptmptmxptmj6536 shape = itsl 6537 6538 _ = 1001006539 texttrademark = 1001006540 textregistered = 1001006541 textcopyright = 1001006542 textdegree = 3001006543 textminus = 2002006544 textellipsis = 1002006545 texteuro = 6546 textcent = 100100

CONFIGURATION FILES Character protrusion 174

6547 textquotesingle = 500 6548 textflorin = 100 706549 textdagger = 1501506550 textdaggerdbl = 1001006551 textbullet = 1501506552 textonesuperior = 1501006553 texttwosuperior = 150 506554 textthreesuperior = 150 506555 textparagraph = 100 6556 textperiodcentered = 5003006557 textonequarter = 50 6558 textonehalf = 50 6559 textplusminus = 1001006560 textmultiply = 1501506561 textdivide = 1501506562 65636564 langptmrang

1583 Small caps

Small caps should inherit the values from their big brothers Since values arerelative to character width we donrsquot need to adjust them any further (but we haveto reset some characters)

6565 lang(blg|ugm)rang6566 SetProtrusion6567 langm-trang [ name = OT1-sc6568 langbchrang [ name = bch-sc6569 langcmrrang [ name = cmr-sc-OT16570 langebgrang [ name = EBGaramond-sc6571 langpmnrang [ name = pmnj-sc6572 langpplrang [ name = ppl-sc6573 langptmrang [ name = ptm-sc6574 langm-trang load = default ]6575 langbchrang load = bch-default ]6576 langcmrrang load = cmr-OT1 ]6577 langebgrang load = EBGaramond-default ]6578 langpmnrang load = pmnj-default ]6579 langpplrang load = ppl-default ]6580 langptmrang load = ptm-default ]6581 langm-t|bch|ebg|pmnrang encoding = OT16582 langcmr|ppl|ptmrang encoding = OT1OT46583 langbchrang family = bch6584 langcmrrang family = cmr6585 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF6586 langpmnrang family = pmnj6587 langpplrang family = pplpplxpplj6588 langptmrang family = ptmptmxptmj6589 shape = sc 6590 6591 a = 50506592 langcmr|ebg|ppl|ptmrang ae = 50 6593 langbch|pmnrang c = 50 6594 langbch|ebg|pmnrang d = 506595 langm-t|bch|cmr|ebg|pmn|ptmrang f = 506596 langbch|ebg|pmnrang g = 50 6597 langm-t|cmr|ebg|pmn|ppl|ptmrang j = 50 6598 langbchrang j = 100 6599 langm-t|bch|cmr|ebg|pmn|pplrang l = 506600 langptmrang l = 806601 langm-t|bch|cmr|ebg|pmn|pplrang 013 = 50 fl6602 langptmrang 013 = 80 fl6603 langbch|ebg|pmnrang o = 5050

CONFIGURATION FILES Character protrusion 175

6604 langebg|pmnrang oe = 50 6605 langpplrang p = 0 06606 langbch|ebg|pmnrang q = 50706607 langpplrang q = 0 6608 langm-t|cmr|ebg|pmn|ppl|ptmrang r = 06609 t = 50506610 langm-t|bch|cmr|ebg|pmn|pplrang y = 50506611 langptmrang y = 80806612 66136614 SetProtrusion6615 langm-trang [ name = T1-sc6616 langbchrang [ name = bch-sc-T16617 langcmrrang [ name = cmr-sc-T16618 langebgrang [ name = EBGaramond-sc-T16619 langpmnrang [ name = pmnj-sc-T16620 langpplrang [ name = ppl-sc-T16621 langptmrang [ name = ptm-sc-T16622 langm-trang load = T1-default ]6623 langbchrang load = bch-T1 ]6624 langcmrrang load = cmr-T1 ]6625 langebgrang load = EBGaramond-T1 ]6626 langpmnrang load = pmnj-T1 ]6627 langpplrang load = ppl-T1 ]6628 langptmrang load = ptm-T1 ]6629 encoding = T1LY16630 langbchrang family = bch6631 langcmrrang family = cmr6632 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF6633 langpmnrang family = pmnj6634 langpplrang family = pplpplxpplj6635 langptmrang family = ptmptmxptmj6636 shape = sc 6637 6638 a = 50506639 langcmr|ebg|ppl|ptmrang ae = 50 6640 langbch|pmnrang c = 50 6641 langbch|ebg|pmnrang d = 506642 langm-t|bch|cmr|ebg|pmn|ptmrang f = 506643 langbch|ebg|pmnrang g = 50 6644 langm-t|cmr|ebg|pmn|ppl|ptmrang j = 50 6645 langbchrang j = 100 6646 langm-t|bch|cmr|ebg|pmn|pplrang l = 506647 langptmrang l = 806648 langm-t|bch|cmr|ebg|pmn|pplrang 029 = 50 fl6649 langptmrang 029 = 80 fl6650 langbch|ebg|pmnrang o = 50506651 langbch|ebg|pmnrang oe = 50 6652 langpplrang p = 0 06653 langbch|ebg|pmnrang q = 50706654 langpplrang q = 0 6655 langm-t|cmr|ebg|pmn|ppl|ptmrang r = 06656 t = 50506657 langm-t|bch|cmr|ebg|pmn|pplrang y = 50506658 langptmrang y = 80806659 66606661 lang(blg|ugm)rang6662 langm-t|cmrrang6663 SetProtrusion6664 langm-trang [ name = T2A-sc6665 langcmrrang [ name = cmr-sc-T2A6666 langm-trang load = T2A-default ]6667 langcmrrang load = cmr-T2A ]6668 encoding = T2A

CONFIGURATION FILES Character protrusion 176

6669 langcmrrang family = cmr6670 shape = sc 6671 6672 cyra = 50506673 cyrg = 506674 cyrt = 50506675 cyry = 506676 66776678 langm-t|cmrrang6679 langm-trang6680 SetProtrusion6681 [ name = QX-sc6682 load = QX-default ]6683 encoding = QX6684 shape = sc 6685 6686 a = 50506687 f = 506688 j = 50 6689 l = 506690 013 = 50 fl6691 r = 06692 t = 50506693 y = 50506694 66956696 langm-trang6697 langcmr|bchrang6698 SetProtrusion6699 langbchrang [ name = bch-sc-T56700 langbchrang load = bch-T5 ]6701 langcmrrang [ name = cmr-sc-T56702 langcmrrang load = cmr-T5 ]6703 encoding = T56704 langbchrang family = bch6705 langcmrrang family = cmr6706 shape = sc 6707 6708 a = 50506709 langbchrang c = 50 6710 langbchrang d = 506711 f = 506712 langbchrang g = 50 6713 langbchrang j = 100 6714 langcmrrang j = 50 6715 l = 506716 langbchrang o = 50506717 langbchrang q = 0 6718 langcmrrang r = 06719 t = 50506720 y = 50506721 67226723 langcmr|bchrang6724 langpmnrang6725 SetProtrusion6726 [ name = pmnx-sc6727 load = pmnj-sc ]6728 encoding = OT16729 family = pmnx6730 shape = sc 6731 6732 1 = 2301806733

CONFIGURATION FILES Character protrusion 177

67346735 SetProtrusion6736 [ name = pmnx-sc-T16737 load = pmnj-sc-T1 ]6738 encoding = T1LY16739 family = pmnx6740 shape = sc 6741 6742 1 = 2301806743 6744

1584 Italic small caps

Minion provides real small caps in italics The slantsc package calls them scitPhilipp Lehmanrsquos fontinstallationguide suggests si

6745 SetProtrusion6746 [ name = pmnj-scit6747 load = pmnj-it ]6748 encoding = OT16749 family = pmnj6750 shape = scitsi 6751 6752 a = 50 6753 ae = -506754 b = 20-506755 c = 50-506756 d = 20 06757 e = 20-506758 f = 10 06759 012 = 10-50 fi6760 013 = 10-50 fl6761 014 = 10-50 ffi6762 015 = 10-50 ffl6763 g = 50-506764 i = 20-506765 j = 20 06766 k = 20 6767 l = 20506768 m = -306769 n = -306770 o = 50 6771 oe = 50-506772 p = 20-506773 q = 50 6774 r = 20 06775 s = 20-306776 t = 70 6777 u = 50-506778 v = 100 6779 w = 100 6780 y = 50 6781 z = -506782 67836784 SetProtrusion6785 [ name = pmnj-scit-T16786 load = pmnj-it-T1 ]6787 encoding = T1LY16788 family = pmnj6789 shape = scitsi 6790 6791 a = 50 6792 ae = -50

CONFIGURATION FILES Character protrusion 178

6793 b = 20-506794 c = 50-506795 d = 20 06796 e = 20-506797 f = 10 06798 028 = 10-50 fi6799 029 = 10-50 fl6800 030 = 10-50 ffi6801 031 = 10-50 ffl6802 g = 50-506803 i = 20-506804 188 = 20 0 ij6805 j = 20 06806 k = 20 6807 l = 20506808 m = -306809 n = -306810 o = 50 6811 oe = 50-506812 p = 20-506813 q = 50 6814 r = 20 06815 s = 20-306816 t = 70 6817 u = 50-506818 v = 100 6819 w = 100 6820 y = 50 6821 z = -506822 68236824 SetProtrusion6825 [ name = pmnx-scit6826 load = pmnj-scit ]6827 encoding = OT16828 family = pmnx6829 shape = scitsi 6830 6831 1 = 1001506832 68336834 SetProtrusion6835 [ name = pmnx-scit-T16836 load = pmnj-scit-T1 ]6837 encoding = T1LY16838 family = pmnx6839 shape = scitsi 6840 6841 1 = 1001506842 68436844 langpmnrang

1585 Text companion

Finally the TS1 encoding Still quite incomplete for Times and especially PalatinoAnybody

6845 SetProtrusion6846 langm-trang [ name = textcomp ]6847 langbchrang [ name = bch-textcomp ]6848 langblgrang [ name = blg-textcomp ]6849 langcmrrang [ name = cmr-textcomp ]6850 langebgrang [ name = EBGaramond-textcomp ]6851 langpmnrang [ name = pmn-textcomp ]

CONFIGURATION FILES Character protrusion 179

6852 langpplrang [ name = ppl-textcomp ]6853 langptmrang [ name = ptm-textcomp ]6854 langugmrang [ name = ugm-textcomp ]6855 langm-trang encoding = TS1 6856 langm-trang encoding = TS16857 langbchrang family = bch 6858 langblgrang family = blg 6859 langcmrrang family = cmr 6860 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF 6861 langpmnrang family = pmnxpmnj 6862 langpplrang family = pplpplxpplj 6863 langptmrang family = ptmptmxptmj 6864 langugmrang family = ugm 6865 6866 langblgrang textquotestraightbase = 4005006867 langcmrrang textquotestraightbase = 3003006868 langebg|pmnrang textquotestraightbase = 4004006869 langblgrang textquotestraightdblbase = 3004006870 langcmr|pmnrang textquotestraightdblbase = 3003006871 langebgrang textquotestraightdblbase = 4004006872 langbch|cmr|ebg|pmn|ugmrang texttwelveudash = 2002006873 langbch|cmr|ebg|pmnrang textthreequartersemdash = 1501506874 langugmrang textthreequartersemdash = 2002006875 langblgrang textquotesingle = 5006006876 langcmr|pmnrang textquotesingle = 3004006877 langebgrang textquotesingle = 4005006878 langptmrang textquotesingle = 5005006879 langugmrang textquotesingle = 3005006880 langbch|cmr|pmnrang textasteriskcentered = 2003006881 langblgrang textasteriskcentered = 1502006882 langebgrang textasteriskcentered = 3003006883 langugmrang textasteriskcentered = 1002006884 langpmnrang textfractionsolidus = -200-2006885 langcmrrang textoneoldstyle = 1001006886 langpmnrang textoneoldstyle = 506887 langcmrrang textthreeoldstyle = 506888 langebg|pmnrang textthreeoldstyle = 50 6889 langcmrrang textfouroldstyle = 50 506890 langebg|pmnrang textfouroldstyle = 50 6891 langcmr|ebg|pmnrang textsevenoldstyle = 50 806892 langcmrrang textlangle = 400 6893 langcmrrang textrangle = 4006894 langm-t|bch|pmn|ptmrang textminus = 2002006895 langcmr|ebg|pplrang textminus = 3003006896 langblg|ugmrang textminus = 2503006897 langbch|ebg|pmnrang textlbrackdbl = 100 6898 langblgrang textlbrackdbl = 200 6899 langbch|ebg|pmnrang textrbrackdbl = 1006900 langblgrang textrbrackdbl = 2006901 langpmnrang textasciigrave = 2005006902 langbch|blg|cmr|ebg|pmnrang texttildelow = 2002506903 langpmnrang textasciibreve = 3004006904 langpmnrang textasciicaron = 3004006905 langpmnrang textacutedbl = 2003006906 langpmnrang textgravedbl = 1503006907 langbch|pmn|ugmrang textdagger = 80 806908 langblgrang textdagger = 2002006909 langcmr|ebgrang textdagger = 1001006910 langptmrang textdagger = 1501506911 langblgrang textdaggerdbl = 1501506912 langcmr|ebg|pmnrang textdaggerdbl = 80 806913 langptmrang textdaggerdbl = 1001006914 langbchrang textbardbl = 1001006915 langblg|ugmrang textbardbl = 1501506916 langbchrang textbullet = 200200

CONFIGURATION FILES Character protrusion 180

6917 langblgrang textbullet = 4005006918 langcmr|ebg|pmnrang textbullet = 1006919 langptmrang textbullet = 1501506920 langugmrang textbullet = 501006921 langbch|cmr|pmnrang textcelsius = 50 6922 langebgrang textcelsius = 80 6923 langbchrang textflorin = 50 506924 langblgrang textflorin = 1001006925 langebg|ugmrang textflorin = 1006926 langpmnrang textflorin = 501006927 langptmrang textflorin = 50 706928 langcmrrang textcolonmonetary = 506929 langebg|pmnrang textcolonmonetary = 50 6930 langpmnrang textinterrobang = 1006931 langpmnrang textinterrobangdown = 100 6932 langm-t|ebg|ptmrang texttrademark = 1001006933 langbchrang texttrademark = 1501506934 langblg|cmr|pplrang texttrademark = 2002006935 langpmnrang texttrademark = 50 506936 langugmrang texttrademark = 1001506937 langbch|ugmrang textcent = 50 6938 langptmrang textcent = 1001006939 langbchrang textsterling = 50 6940 langugmrang textsterling = 506941 langbchrang textbrokenbar = 2002006942 langblgrang textbrokenbar = 2502506943 langugmrang textbrokenbar = 2003006944 langpmnrang textasciidieresis = 3004006945 langm-t|bch|cmr|ebg|ptm|ugmrang textcopyright = 1001006946 langpmnrang textcopyright = 1001506947 langpplrang textcopyright = 2002006948 langbch|cmr|ugmrang textordfeminine = 1002006949 langebg|pmnrang textordfeminine = 2002006950 langbch|cmr|ebg|pmn|ugmrang textlnot = 200 6951 langblgrang textlnot = 2001006952 langm-t|bch|cmr|ebg|ptm|ugmrang textregistered = 1001006953 langpmnrang textregistered = 501506954 langpplrang textregistered = 2002006955 langpmnrang textasciimacron = 1502006956 langm-t|ppl|ptmrang textdegree = 3003006957 langbchrang textdegree = 1502006958 langblg|ugmrang textdegree = 2002006959 langcmr|ebgrang textdegree = 4004006960 langpmnrang textdegree = 1504006961 langbch|cmr|ebg|pmn|ugmrang textpm = 1502006962 langblgrang textpm = 1001006963 langptmrang textpm = 50 806964 langbch|blg|ugmrang texttwosuperior = 1002006965 langcmrrang texttwosuperior = 501006966 langebg|pmnrang texttwosuperior = 2002006967 langptmrang texttwosuperior = 50 506968 langbch|blg|ugmrang textthreesuperior = 1002006969 langcmrrang textthreesuperior = 501006970 langebg|pmnrang textthreesuperior = 2002006971 langptmrang textthreesuperior = 50 506972 langpmnrang textasciiacute = 3004006973 langbch|ugmrang textmu = 1006974 langbch|ebg|pmnrang textparagraph = 1006975 langbch|cmr|ebg|pmnrang textperiodcentered = 3004006976 langblgrang textperiodcentered = 4005006977 langptmrang textperiodcentered = 3003006978 langugmrang textperiodcentered = 2005006979 langbch|blg|ugmrang textonesuperior = 2003006980 langcmr|ebg|pmnrang textonesuperior = 2002006981 langptmrang textonesuperior = 100100

CONFIGURATION FILES Character protrusion 181

6982 langbch|ebg|pmn|ugmrang textordmasculine = 2002006983 langblg|cmrrang textordmasculine = 1002006984 langbch|cmr|pmnrang texteuro = 100 6985 langebgrang texteuro = 501006986 langbchrang texttimes = 2002006987 langblg|ptmrang texttimes = 1001006988 langcmrrang texttimes = 1502506989 langebgrang texttimes = 1001506990 langpmnrang texttimes = 701006991 langugmrang texttimes = 2003006992 langbch|ebg|pmnrang textdiv = 1502006993 langblgrang textdiv = 1001006994 langcmrrang textdiv = 1502506995 langptmrang textdiv = 501006996 langugmrang textdiv = 2003006997 langptmrang textperthousand = 506998 langugmrang textsection = 1006999 langugmrang textonehalf = 501007000 langugmrang textonequarter = 501007001 langugmrang textthreequarters = 501007002 langugmrang textsurd = 100

Remaining slots in the source file7003 70047005 langcmr|ebg|pmn|ugmrang7006 SetProtrusion7007 langcmrrang [ name = cmr-textcomp-it ]7008 langebgrang [ name = EBGaramond-textcomp-it ]7009 langpmnrang [ name = pmn-textcomp-it ]7010 langugmrang [ name = ugm-textcomp-it ]7011 encoding = TS17012 langcmrrang family = cmr7013 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF7014 langpmnrang family = pmnxpmnj7015 langugmrang family = ugm7016 langugmrang shape = itsl 7017 langugmrang shape = it 7018 7019 langcmrrang textquotestraightbase = 3006007020 langebg|pmnrang textquotestraightbase = 4004007021 langcmrrang textquotestraightdblbase = 3006007022 langebgrang textquotestraightdblbase = 3004007023 langpmnrang textquotestraightdblbase = 3003007024 texttwelveudash = 2002007025 langcmr|ebg|pmnrang textthreequartersemdash = 1501507026 langugmrang textthreequartersemdash = 2002007027 langcmrrang textquotesingle = 6003007028 langebgrang textquotesingle = 8001007029 langpmnrang textquotesingle = 3002007030 langugmrang textquotesingle = 5005007031 langcmrrang textasteriskcentered = 3002007032 langebgrang textasteriskcentered = 5001007033 langpmnrang textasteriskcentered = 2003007034 langugmrang textasteriskcentered = 3001507035 langpmnrang textfractionsolidus = -200-2007036 langcmrrang textoneoldstyle = 100 507037 langebgrang textoneoldstyle = 100 7038 langpmnrang textoneoldstyle = 50 7039 langebgrang texttwooldstyle = 50 7040 langpmnrang texttwooldstyle = -50 7041 langcmrrang textthreeoldstyle = 100 507042 langpmnrang textthreeoldstyle = -100 7043 langcmrrang textfouroldstyle = 50 507044 langebgrang textfouroldstyle = 50100

CONFIGURATION FILES Character protrusion 182

7045 langcmrrang textsevenoldstyle = 50 807046 langebgrang textsevenoldstyle = 50 7047 langpmnrang textsevenoldstyle = 20 7048 langcmrrang textlangle = 400 7049 langcmrrang textrangle = 4007050 langcmr|ebgrang textminus = 3003007051 langpmnrang textminus = 2002007052 langugmrang textminus = 2503007053 langebg|pmnrang textlbrackdbl = 100 7054 langebg|pmnrang textrbrackdbl = 1007055 langpmnrang textasciigrave = 3003007056 langcmr|ebg|pmnrang texttildelow = 2002507057 langpmnrang textasciibreve = 3003007058 langpmnrang textasciicaron = 3003007059 langpmnrang textacutedbl = 2003007060 langpmnrang textgravedbl = 1503007061 langcmrrang textdagger = 1001007062 langebgrang textdagger = 2001007063 langpmnrang textdagger = 80 507064 langugmrang textdagger = 80 807065 langcmr|ebgrang textdaggerdbl = 80 807066 langpmnrang textdaggerdbl = 80 507067 langugmrang textbardbl = 1501507068 langcmrrang textbullet = 2001007069 langebgrang textbullet = 300 7070 langpmnrang textbullet = 30 707071 langugmrang textbullet = 501007072 langcmrrang textcelsius = 100 7073 langebgrang textcelsius = 200 7074 langpmnrang textcelsius = 50-507075 langebgrang textflorin = 100 7076 langpmnrang textflorin = 501007077 langugmrang textflorin = 1007078 langcmrrang textcolonmonetary = 150 7079 langebgrang textcolonmonetary = 100 7080 langpmnrang textcolonmonetary = 50-507081 langcmr|ebgrang texttrademark = 200 7082 langpmnrang texttrademark = 501007083 langugmrang texttrademark = 150 507084 langugmrang textcent = 50 7085 langugmrang textsterling = 507086 langugmrang textbrokenbar = 2003007087 langpmnrang textasciidieresis = 3002007088 langcmrrang textcopyright = 100 7089 langebgrang textcopyright = 2001007090 langpmnrang textcopyright = 1001507091 langugmrang textcopyright = 300 7092 langcmrrang textordfeminine = 1001007093 langpmnrang textordfeminine = 2002007094 langugmrang textordfeminine = 1002007095 langcmr|ebgrang textlnot = 300 7096 langpmn|ugmrang textlnot = 200 7097 langcmrrang textregistered = 100 7098 langebgrang textregistered = 2001007099 langpmnrang textregistered = 501507100 langugmrang textregistered = 300 7101 langpmnrang textasciimacron = 1502007102 langcmr|ebgrang textdegree = 5001007103 langpmnrang textdegree = 1501507104 langugmrang textdegree = 3002007105 langcmrrang textpm = 1501007106 langebgrang textpm = 2001507107 langpmn|ugmrang textpm = 1502007108 langcmrrang textonesuperior = 400 7109 langebgrang textonesuperior = 300100

CONFIGURATION FILES Character protrusion 183

7110 langpmnrang textonesuperior = 2001007111 langugmrang textonesuperior = 3003007112 langcmrrang texttwosuperior = 400 7113 langebgrang texttwosuperior = 300 7114 langpmnrang texttwosuperior = 2001007115 langugmrang texttwosuperior = 3002007116 langcmrrang textthreesuperior = 400 7117 langebgrang textthreesuperior = 300 7118 langpmnrang textthreesuperior = 2001007119 langugmrang textthreesuperior = 3002007120 langugmrang textmu = 1007121 langpmnrang textasciiacute = 3002007122 langcmrrang textparagraph = 200 7123 langpmnrang textparagraph = 1007124 langcmrrang textperiodcentered = 5005007125 langebg|pmn|ugmrang textperiodcentered = 3004007126 langcmrrang textordmasculine = 1001007127 langpmnrang textordmasculine = 2002007128 langugmrang textordmasculine = 3002007129 langcmrrang texteuro = 200 7130 langebgrang texteuro = 100 7131 langpmnrang texteuro = 100-507132 langcmrrang texttimes = 2002007133 langebgrang texttimes = 2001007134 langpmnrang texttimes = 701007135 langugmrang texttimes = 2003007136 langcmr|ebgrang textdiv = 2002007137 langpmnrang textdiv = 1502007138 langugmrang textdiv = 2003007139 langugmrang textsection = 2007140 langugmrang textonehalf = 501007141 langugmrang textonequarter = 501007142 langugmrang textthreequarters = 501007143 langugmrang textsurd = 1007144 71457146 langcmr|ebg|pmn|ugmrang

1586 Computer Modern math

Now to the math symbols for Computer Modern Roman Definitions have beenextracted from fontmathltx I did not spend too much time fiddling with thesesettings so they can surely be improved

The math font lsquooperatorsrsquo (also used for the mathrm and mathbf alphabets) isOT1cmr which wersquove already set up above Itrsquos declared as

DeclareSymbolFontoperators OT1cmrm nSetSymbolFontoperatorsboldOT1cmrbxn

mathit (OT1cmrmit) is also already set upThere are (for the moment) no settings for mathsf and mathttMath font lsquolettersrsquo (also used as mathnormal) is declared as

DeclareSymbolFontletters OMLcmmmitSetSymbolFontletters boldOMLcmmbit

7147 langcmrrang7148 SetProtrusion7149 [ name = cmr-math-letters ]7150 encoding = OML7151 family = cmm7152 series = mb7153 shape = it

CONFIGURATION FILES Character protrusion 184

7154 7155 A = 100 50 mathnormal7156 B = 50 7157 C = 50 7158 D = 50 507159 E = 50 7160 F = 100 507161 G = 50 507162 H = 50 507163 I = 50 507164 J = 150 507165 K = 501007166 L = 50 507167 M = 50 7168 N = 50 7169 O = 50 7170 P = 50 7171 Q = 50 507172 R = 50 7173 S = 50 7174 T = 501007175 U = 50 507176 V = 1001007177 W = 501007178 X = 501007179 Y = 1001007180 f = 1001007181 h = 1007182 i = 507183 j = 507184 k = 507185 r = 507186 v = 507187 w = 507188 x = 507189 0B = 50100 alpha7190 0C = 50 50 beta7191 0D = 200150 gamma7192 0E = 50 50 delta7193 0F = 50 50 epsilon7194 10 = 50150 zeta7195 12 = 50 theta7196 13 = 100 iota7197 14 = 100 kappa7198 15 = 100 50 lambda7199 16 = 50 mu7200 17 = 50 nu7201 18 = 50 xi7202 19 = 50100 pi7203 1A = 50 50 rho7204 1B = 150 sigma7205 1C = 50150 tau7206 1D = 50 50 upsilon7207 1F = 50100 chi7208 20 = 50 50 psi7209 21 = 50 omega7210 22 = 50 varepsilon7211 23 = 50 vartheta7212 24 = 50 varpi7213 25 = 100 varrho7214 26 = 100100 varsigma7215 27 = 50 50 varphi7216 28 = 100100 leftharpoonup7217 29 = 100100 leftharpoondown7218 2A = 100100 rightharpoonup

CONFIGURATION FILES Character protrusion 185

7219 2B = 100100 rightharpoondown7220 2C = 300200 lhook7221 2D = 200300 rhook7222 2E = 100 triangleright7223 2F = 100 triangleleft7224 3A = 500 ldotp7225 3B = 500 7226 3C = 200100 lt7227 3D = 300400 7228 3E = 100200 gt7229 3F = 200200 star7230 5B = 100 flat7231 5E = 200200 smile7232 5F = 200200 frown7233 7C = 100 jmath7234 7D = 100 wp

Remaining slots in the source file7235 7236

Math font lsquosymbolsrsquo (also used for the mathcal alphabet) is declared as

DeclareSymbolFontsymbols OMScmsymnSetSymbolFontsymbols boldOMScmsybn

7237 SetProtrusion7238 [ name = cmr-math-symbols ]7239 encoding = OMS7240 family = cmsy7241 series = mb7242 shape = n 7243 7244 A = 150 50 mathcal7245 C = 1007246 D = 507247 F = 501507248 I = 1007249 J = 1001507250 K = 1007251 L = 100 7252 M = 50 507253 N = 501007254 P = 507255 Q = 50 7256 R = 507257 T = 501507258 V = 50 507259 W = 507260 X = 1001007261 Y = 100 7262 Z = 1001507263 00 = 300300 -7264 01 = 700 cdot cdotp7265 02 = 150250 times7266 03 = 150250 ast7267 04 = 200300 div7268 05 = 150250 diamond7269 06 = 200200 pm7270 07 = 200200 mp7271 08 = 100100 oplus7272 09 = 100100 ominus7273 0A = 100100 otimes7274 0B = 100100 oslash7275 0C = 100100 odot7276 0D = 100100 bigcirc

CONFIGURATION FILES Character protrusion 186

7277 0E = 100100 circ7278 0F = 100100 bullet7279 10 = 100100 asymp7280 11 = 100100 equiv7281 12 = 200100 subseteq7282 13 = 100200 supseteq7283 14 = 200100 leq7284 15 = 100200 geq7285 16 = 200100 preceq7286 17 = 100200 succeq7287 18 = 200200 sim7288 19 = 150150 approx7289 1A = 200100 subset7290 1B = 100200 supset7291 1C = 200100 ll7292 1D = 100200 gg7293 1E = 300100 prec7294 1F = 100300 succ7295 20 = 100200 leftarrow7296 21 = 200100 rightarrow7297 22 = 100100 uparrow7298 23 = 100100 downarrow7299 24 = 100100 leftrightarrow7300 25 = 100100 nearrow7301 26 = 100100 searrow7302 27 = 100100 simeq7303 28 = 100100 Leftarrow7304 29 = 100100 Rightarrow7305 2A = 100100 Uparrow7306 2B = 100100 Downarrow7307 2C = 100100 Leftrightarrow7308 2D = 100100 nwarrow7309 2E = 100100 swarrow7310 2F = 100 propto7311 30 = 400 prime7312 31 = 100100 infty7313 32 = 150100 in7314 33 = 100150 ni7315 34 = 100100 triangle bigtriangleup7316 35 = 100100 bigtriangledown7317 38 = 100 forall7318 39 = 100 exists7319 3A = 200 neg7320 3E = 200200 top7321 3F = 200200 bot perp7322 5E = 100200 wedge7323 5F = 100200 vee7324 60 = 300 vdash7325 61 = 300 dashv7326 62 = 100100 lfloor7327 63 = 100100 rfloor7328 64 = 100100 lceil7329 65 = 100100 rceil7330 66 = 150 lbrace7331 67 = 150 rbrace7332 68 = 400 langle7333 69 = 400 rangle7334 6C = 100100 updownarrow7335 6D = 100100 Updownarrow7336 6E = 100300 backslash setminus7337 72 = 100100 nabla7338 79 = 200200 dagger7339 7A = 100100 ddagger7340 7B = 100 mathparagraph7341 7C = 100100 clubsuit

CONFIGURATION FILES Character protrusion 187

7342 7D = 100100 diamondsuit7343 7E = 100100 heartsuit7344 7F = 100100 spadesuit

Remaining slots in the source file7345 7346

We donrsquot bother about lsquolargesymbolsrsquo since it will only be used in display mathwhere protrusion doesnrsquot work anyway Itrsquos declared as

DeclareSymbolFontlargesymbolsOMXcmexmn

7347 langcmrrang7348 langcfg-trang

1587 AMS symbols

Settings for the AMS math fonts (amssymb)7349 langcfg-urang

Symbol font lsquoarsquo7350 langmsarang7351 SetProtrusion7352 [ name = AMS-a ]7353 encoding = U7354 family = msa 7355 7356 05 = 150250 centerdot7357 06 = 100100 lozenge7358 07 = 50 50 blacklozenge7359 08 = 50 50 circlearrowright7360 09 = 50 50 circlearrowleft7361 0A = 100100 rightleftharpoons7362 0B = 100100 leftrightharpoons7363 0D = -50200 Vdash7364 0E = -50200 Vvdash7365 0F = -70150 vDash7366 10 = 100150 twoheadrightarrow7367 11 = 100150 twoheadleftarrow7368 12 = 50100 leftleftarrows7369 13 = 50 80 rightrightarrows7370 14 = 120120 upuparrows7371 15 = 120120 downdownarrows7372 16 = 200200 upharpoonright7373 17 = 200200 downharpoonright7374 18 = 200200 upharpoonleft7375 19 = 200200 downharpoonleft7376 1A = 80100 rightarrowtail7377 1B = 80100 leftarrowtail7378 1C = 50 50 leftrightarrows7379 1D = 50 50 rightleftarrows7380 1E = 250 Lsh7381 1F = 250 Rsh7382 20 = 100100 rightsquigarrow7383 21 = 100100 leftrightsquigarrow7384 22 = 100 50 looparrowleft7385 23 = 50100 looparrowright7386 24 = 50 80 circeq7387 25 = 100 succsim7388 26 = 100 gtrsim7389 27 = 100 gtrapprox7390 28 = 150 50 multimap7391 2B = 100150 doteqdot

CONFIGURATION FILES Character protrusion 188

7392 2C = 100150 triangleq7393 2D = 100 50 precsim7394 2E = 100 50 lesssim7395 2F = 50 50 lessapprox7396 30 = 100 50 eqslantless7397 31 = 50 50 eqslantgtr7398 32 = 100 50 curlyeqprec7399 33 = 50100 curlyeqsucc7400 34 = 100 50 preccurlyeq7401 36 = 50 leqslant7402 38 = 50 backprime7403 39 = 250250 dabar the dash bar in dash(leftright)arrow7404 3C = 50100 succcurlyeq7405 3E = 50 geqslant7406 40 = 50 sqsubset7407 41 = 50 sqsupset7408 42 = 150 vartriangleright rhd7409 43 = 150 vartriangleleft lhd7410 44 = 100 trianglerighteq unrhd7411 45 = 100 trianglelefteq unlhd7412 46 = 100100 bigstar7413 48 = 50 50 blacktriangledown7414 49 = 100 blacktriangleright7415 4A = 100 blacktriangleleft7416 4B = 150 dashrightarrow (the arrow)7417 4C = 150 dashleftarrow7418 4D = 50 50 vartriangle7419 4E = 50 50 blacktriangle7420 4F = 50 50 triangledown7421 50 = 50 50 eqcirc7422 56 = 150 Rrightarrow7423 57 = 150 Lleftarrow7424 58 = 100300 checkmark7425 5C = 50 50 angle7426 5D = 50 50 measuredangle7427 5E = 50 50 sphericalangle7428 5F = 50 varpropto7429 60 = 100100 smallsmile7430 61 = 100100 smallfrown7431 62 = 50 Subset7432 63 = 50 Supset7433 66 = 150150 curlywedge7434 67 = 150150 curlyvee7435 68 = 50150 leftthreetimes7436 69 = 100 50 rightthreetimes7437 6C = 50 50 bumpeq7438 6D = 50 50 Bumpeq7439 6E = 100 lll7440 6F = 100 ggg7441 70 = 50100 ulcorner7442 71 = 100 50 urcorner7443 75 = 150200 dotplus7444 76 = 50100 backsim7445 78 = 50100 llcorner7446 79 = 100 50 lrcorner7447 7C = 100100 intercal7448 7D = 50 50 circledcirc7449 7E = 50 50 circledast7450 7F = 50 50 circleddash

Remaining slots in the source file7451 74527453 langmsarang

CONFIGURATION FILES Character protrusion 189

Symbol font lsquobrsquo7454 langmsbrang7455 SetProtrusion7456 [ name = AMS-b ]7457 encoding = U7458 family = msb 7459 7460 A = 50 50 mathbb7461 C = 50 507462 G = 507463 L = 507464 P = 507465 R = 507466 T = 507467 V = 50 507468 X = 50 507469 Y = 50 507470 00 = 50 50 lvertneqq7471 01 = 50 50 gvertneqq7472 02 = 50 50 nleq7473 03 = 50 50 ngeq7474 04 = 100 50 nless7475 05 = 50150 ngtr7476 06 = 100 50 nprec7477 07 = 50150 nsucc7478 08 = 50 50 lneqq7479 09 = 50 50 gneqq7480 0A = 100100 nleqslant7481 0B = 100100 ngeqslant7482 0C = 100 50 lneq7483 0D = 50100 gneq7484 0E = 100 50 npreceq7485 0F = 50100 nsucceq7486 10 = 50 precnsim7487 11 = 50 50 succnsim7488 12 = 50 50 lnsim7489 13 = 50 50 gnsim7490 14 = 50 50 nleqq7491 15 = 50 50 ngeqq7492 16 = 50 50 precneqq7493 17 = 50 50 succneqq7494 18 = 50 50 precnapprox7495 19 = 50 50 succnapprox7496 1A = 50 50 lnapprox7497 1B = 50 50 gnapprox7498 1C = 150200 nsim7499 1D = 50 50 ncong7500 1E = 100150 diagup7501 1F = 100150 diagdown7502 20 = 100 50 varsubsetneq7503 21 = 50100 varsupsetneq7504 22 = 100 50 nsubseteqq7505 23 = 50100 nsupseteqq7506 24 = 100 50 subsetneqq7507 25 = 50100 supsetneqq7508 26 = 100 50 varsubsetneqq7509 27 = 50100 varsupsetneqq7510 28 = 100 50 subsetneq7511 29 = 50100 supsetneq7512 2A = 100 50 nsubseteq7513 2B = 50100 nsupseteq7514 2C = 50100 nparallel7515 2D = 100150 nmid7516 2E = 150150 nshortmid7517 2F = 100100 nshortparallel

CONFIGURATION FILES Character protrusion 190

7518 30 = 150 nvdash7519 31 = 150 nVdash7520 32 = 100 nvDash7521 33 = 100 nVDash7522 34 = 100 ntrianglerighteq7523 35 = 100 ntrianglelefteq7524 36 = 100 ntriangleleft7525 37 = 100 ntriangleright7526 38 = 100200 nleftarrow7527 39 = 100200 nrightarrow7528 3A = 100100 nLeftarrow7529 3B = 50100 nRightarrow7530 3C = 100100 nLeftrightarrow7531 3D = 100200 nleftrightarrow7532 3E = 50 50 divideontimes7533 3F = 50 50 varnothing7534 60 = 200 Finv7535 61 = 50 Game7536 68 = 100100 eqsim7537 69 = 50 beth7538 6A = 50 gimel7539 6B = 150 daleth7540 6C = 200 lessdot7541 6D = 200 gtrdot7542 6E = 100200 ltimes7543 6F = 150100 rtimes7544 70 = 50100 shortmid7545 71 = 50 50 shortparallel7546 72 = 200300 smallsetminus7547 73 = 100200 thicksim7548 74 = 50100 thickapprox7549 75 = 50 50 approxeq7550 76 = 50100 succapprox7551 77 = 50 50 precapprox7552 78 = 100100 curvearrowleft7553 79 = 50150 curvearrowright7554 7A = 50200 digamma7555 7B = 100 50 varkappa7556 7F = 200 backepsilon

Remaining slots in the source file7557 75587559 langmsbrang

1588 Euler

Euler Roman font (package euler)7560 langeurrang7561 SetProtrusion7562 [ name = euler ]7563 encoding = U7564 family = eur 7565 7566 01 = 1001007567 03 = 1001507568 06 = 1007569 07 = 1001507570 08 = 1001007571 0A = 1001007572 0B = 507573 0C = 1007574 0D = 1001007575 0E = 100

CONFIGURATION FILES Character protrusion 191

7576 0F = 1001007577 10 = 1001007578 13 = 1007579 14 = 1007580 15 = 507581 16 = 507582 17 = 501007583 18 = 501007584 1A = 507585 1B = 507586 1C = 501007587 1D = 501007588 1E = 501007589 1F = 501007590 20 = 507591 21 = 507592 22 = 501007593 24 = 507594 27 = 501007595 1 = 1001007596 7 = 501007597 3A = 3005007598 3B = 2004007599 3C = 2001007600 3D = 2002007601 3E = 1002007602 A = 1007603 D = 507604 J = 50 7605 K = 507606 L = 507607 Q = 507608 T = 50 7609 X = 50 507610 Y = 50 7611 h = 507612 k = 507613 7614

Extended by the eulervm package7615 SetProtrusion7616 [ name = euler-vm7617 load = euler ]7618 encoding = U7619 family = zeur 7620 7621 28 = 1002007622 29 = 1002007623 2A = 1001507624 2B = 1001507625 2C = 2003007626 2D = 2003007627 2E = 1007628 2F = 100 7629 3F = 1501507630 5B = 1007631 5E = 1001007632 5F = 1001007633 80 = 507634 81 = 2002507635 82 = 1002007636 76377638 langeurrang

CONFIGURATION FILES Character protrusion 192

Euler Script font (eucal)7639 langeusrang7640 SetProtrusion7641 [ name = euscript ]7642 encoding = U7643 family = eus 7644 7645 A = 1001007646 B = 501007647 C = 50 507648 D = 501007649 E = 501007650 F = 50 7651 G = 50 7652 H = 1007653 K = 507654 L = 1507655 M = 507656 N = 507657 O = 50 507658 P = 50 507659 T = 1007660 U = 507661 V = 50 507662 W = 50 507663 X = 50 507664 Y = 50 7665 Z = 501007666 00 = 2502507667 18 = 2002007668 3A = 2001507669 40 = 1007670 5E = 1001007671 5F = 1001007672 66 = 50 7673 67 = 507674 6E = 2002007675 76767677 SetProtrusion7678 [ name = euscript-vm7679 load = euscript ]7680 encoding = U7681 family = zeus 7682 7683 01 = 6006007684 02 = 2002007685 03 = 2002007686 04 = 2002007687 05 = 1501507688 06 = 2002007689 07 = 2002007690 08 = 1001007691 09 = 1001007692 0A = 1001007693 0B = 1001007694 0C = 1001007695 0D = 1001007696 0E = 1501507697 0F = 1001007698 10 = 1501507699 11 = 1001007700 12 = 1501007701 13 = 1001507702 14 = 150100

CONFIGURATION FILES Character protrusion 193

7703 15 = 1001507704 16 = 2001007705 17 = 1002007706 19 = 1501507707 1A = 1501007708 1B = 1001507709 1C = 1001007710 1D = 1001007711 1E = 2501007712 1F = 1002507713 20 = 1502007714 21 = 1502007715 22 = 1501507716 23 = 1501507717 24 = 1002007718 25 = 1501507719 26 = 1501507720 27 = 1001007721 28 = 1001007722 29 = 1001507723 2A = 1001007724 2B = 1001007725 2C = 1001007726 2D = 1501507727 2E = 1501507728 2F = 1001007729 30 = 1001007730 31 = 1001007731 32 = 1001007732 33 = 1001007733 34 = 1001007734 35 = 1001007735 3E = 1501507736 3F = 1501507737 60 = 2007738 61 = 200 7739 62 = 1001007740 63 = 1001007741 64 = 1001007742 65 = 1001007743 68 = 300 7744 69 = 3007745 6C = 1001007746 6D = 1001007747 6F = 1001007748 72 = 1001007749 73 = 2001007750 76 = 1007751 77 = 100 7752 78 = 50 507753 79 = 1001007754 7A = 1001007755 7D = 1501507756 7E = 1001007757 A8 = 1001007758 A9 = 1001007759 AB = 2002007760 BA = 2007761 BB = 2007762 BD = 2002007763 DE = 2002007764 77657766 langeusrang

CONFIGURATION FILES Character protrusion 194

Euler Fraktur font (eufrak)7767 langeufrang7768 SetProtrusion7769 [ name = mathfrak ]7770 encoding = U7771 family = euf 7772 7773 A = 507774 B = 507775 C = 50 507776 D = 807777 E = 50 7778 G = 507779 L = 807780 O = 507781 T = 807782 X = 80 507783 Z = 80 507784 b = 507785 c = 507786 k = 507787 p = 507788 q = 50 7789 v = 507790 w = 507791 x = 507792 1 = 1001007793 2 = 80 807794 3 = 80 507795 4 = 80 507796 7 = 50 507797 12 = 5005007798 13 = 5005007799 = 2007800 rsquo = 2003007801 ( = 200 7802 ) = 2007803 = 2002007804 + = 2002507805 - = 2002007806 = 3003007807 = 4004007808 = = 2002007809 = 2007810 = 2007811 ] = 2007812 78137814 langeufrang7815 langcfg-urang

1589 Euro symbols

Settings for various Euro symbols (Adobe Euro fonts (packages eurosans europs)ITC Euro fonts (package euroitc) and marvosym24) The euroitc settings are hiddenin the package itself (1437) for lsquofree softwarersquo compliance reasons (Not quitesure whether this is what Karl really had in mind )

7816 langcfg-erang7817 SetProtrusion7818 langzpeurang encoding = U7819 langmvsrang encoding = OT1U

24 Of course there are many more symbols in this font Feel free to contribute protrusion settings

CONFIGURATION FILES Interword spacing 195

Figure 1

Example of interwordspacing (from M SiemoneitTypographisches GestaltenFrankfurtM 1989) Thenumbers indicate thepreference for shrinking theinterword space

7820 langzpeurang family = zpeu 7821 langmvsrang family = mvs 7822 7823 langzpeurang E = 50 7824 langmvsrang 164 = 5050 EUR7825 langmvsrang 068 = 50-100 EURdig7826 78277828 langzpeurang7829 SetProtrusion7830 encoding = U7831 family = zpeu7832 shape = it 7833 7834 E = 100-507835 78367837 SetProtrusion7838 encoding = U7839 family = zpeuseurosans 7840 7841 E = 100507842 78437844 SetProtrusion7845 encoding = U7846 family = zpeuseurosans7847 shape = it 7848 7849 E = 200 7850 78517852 langzpeurang7853 langcfg-erang

159 Interword spacingDefault unit is space

7854 langm-t|cmrrang7855 -----------------------------------------------------------------------7856 INTERWORD SPACING78577858 langm-t|cmrrang7859 langm-trang7860 SetExtraSpacing7861 [ name = default ]7862 encoding = OT1T1LY1OT4QXT5 7863

These settings are only a first approximation The following reasoning is from amail from Ulrich Dirr who also provided the sample in figure 1 I do not claim tohave coped with the task

CONFIGURATION FILES Interword spacing 196

lsquoThe idea is ndash analog to the tables for expansion and protrusion ndash to havetables for optical reductionexpansion of spaces in dependence of the actualcharacter so that the distance between words is optically equal

When reducing distances the (weighting) order is

bull after commas7864 = -500500

bull in front of capitals which have optical more room on their left side eg lsquoArsquolsquoJrsquo lsquoTrsquo lsquoVrsquo lsquoWrsquo and lsquoYrsquo [this is not yet possible ndash RS]

bull in front of capitals which have circleoval shapes on their left side eg lsquoCrsquolsquoGrsquo lsquoOrsquo and lsquoQrsquo [ditto ndash RS]

bull after lsquorrsquo (because of the bigger optical room on the righthand side)7865 r = -300300

bull [before or] after lowercase characters with ascenders7866 b = -2002007867 d = -2002007868 f = -2002007869 h = -2002007870 k = -2002007871 l = -2002007872 t = -200200

bull [before or] after lowercase characters with x-height plus descender withadditional optical space eg lsquovrsquo or lsquowrsquo

7873 c = -1001007874 p = -1001007875 v = -1001007876 w = -1001007877 z = -1001007878 x = -1001007879 y = -100100

bull [before or] after lowercase characters with x-height plus descender withoutadditional optical space

7880 i = 50 -507881 m = 50 -507882 n = 50 -507883 u = 50 -50

bull after colon and semicolon7884 = 200-2007885 = 200-200

bull after punctuation which ends a sentence eg period exclamation markquestion mark

7886 = 250-2507887 = 250-2507888 = 250-250

The order has to be reversed when enlarging is neededrsquo

7889 78907891 langm-trang

Questions are

CONFIGURATION FILES Interword spacing 197

bull Is the result really better

bull Is it overdone (Try with a factor lt 1000)

bull Should the first parameter also be used (Probably)

bull What about quotation marks parentheses etc

Furthermore there seems to be a pdfTEX bug with spacing in combination witha non-zero spaceskip (reported by Axel Berger)

parfillskip0ptrightskip0pt plus 1emspaceskipfontdimen2font test testparpdfadjustinterwordglue2stbscodefont`t=-50 test testbye

Some more characters in T2A25

7892 langcmrrang7893 SetExtraSpacing7894 [ name = T2A7895 load = default ]7896 encoding = T2A7897 family = cmr 7898 7899 cyrg = -3003007900 cyrb = -2002007901 cyrk = -2002007902 cyrs = -1001007903 cyrr = -1001007904 cyrh = -1001007905 cyru = -1001007906 cyrt = 50 -507907 cyrp = 50 -507908 cyri = 50 -507909 cyrishrt = 50 -507910 7911

1591 Nonfrenchspacing

The following settings simulate nonfrenchspacing (since space factors will beignored when spacing adjustment is in effect) They may be used for Englishcontexts

From the TEXbook

lsquoIf the space factor f is different from 1000 the interword glue is computedas follows Take the normal space glue for the current font and add theextra space if f ge 2000 [ ] Then the stretch component is multiplied byf 1000 while the shrink component is multiplied by 1000 f rsquo

The lsquoextra spacersquo (fontdimen7) for Computer Modern Roman is a third offontdimen2 ie 333

7912 SetExtraSpacing7913 [ name = nonfrench-cmr7914 load = default7915 context = nonfrench ]7916 encoding = OT1T1LY1OT4QXT5

25 Contributed by Karl Karlsson

CONFIGURATION FILES Additional kerning 198

7917 family = cmr 7918

latexltx has

defnonfrenchspacing sfcode` 3000 sfcode` 3000 sfcode` 3000

7919 = 3332000-6677920 = 3332000-6677921 = 3332000-667

sfcode` 2000

7922 = 3331000-500

sfcode` 1500

7923 = 500-333

sfcode` 1250

7924 = 250-200

7925 79267927 langcmrrang

fontinst however which is also used to create the psnfss font metrics setsfontdimen7 to 240 by default Therefore the fallback settings use this value forthe first component

7928 langm-trang7929 SetExtraSpacing7930 [ name = nonfrench-default7931 load = default7932 context = nonfrench ]7933 encoding = OT1T1LY1OT4QXT5 7934 7935 = 2402000-6677936 = 2402000-6677937 = 2402000-6677938 = 2401000-5007939 = 500-3337940 = 250-2007941 7942

Empty settings to prevent spurious warnings7943 SetExtraSpacing7944 [ name = empty ]7945 encoding = TS1 7946 7947

1510 Additional kerningDefault unit is 1em

7948 -----------------------------------------------------------------------7949 ADDITIONAL KERNING7950

CONFIGURATION FILES Additional kerning 199

A dummy list to be loaded when no context is active7951 SetExtraKerning7952 [ name = empty ]7953 encoding = OT1T1T2ALY1OT4QXT5TS1 7954 7955

15101 French

The ratio of fontdimen2 to fontdimen6 varies for different fonts so that eitherthe kerning of the colon (which should be a space ie fontdimen 2) or that of theother punctuation characters (TEXrsquos thinspace ie one sixth of fontdimen6)may be inaccurate depending on which unit we choose (space or 1em) For Timesfor example a thin space would be 665 I donrsquot know whether French typographyreally wants a thin space or rather (as it happens to turn out with CMR) half aspace (Wikipedia26 claims it should be a quarter of an em which seems too muchto me then again it also says that this was a thin space in French typography)

7956 SetExtraKerning7957 [ name = french-default7958 context = french7959 unit = space ]7960 encoding = OT1T1LY1 7961 7962 = 1000 = fontdimen27963 = 500 ~ thinspace7964 = 500 7965 = 500 7966 7967

These settings have the disadvantage that a word following a left guillemet willnot be hyphenated This might be fixed in pdfTEX

7968 SetExtraKerning7969 [ name = french-guillemets7970 context = french-guillemets7971 load = french-default7972 unit = space ]7973 encoding = T1LY1 7974 7975 guillemotleft = 800 = 08fontdimen27976 guillemotright = 800 7977 79787979 SetExtraKerning7980 [ name = french-guillemets-OT17981 context = french-guillemets7982 load = french-default7983 unit = space ]7984 encoding = OT1 7985 7986

15102 Turkish7987 SetExtraKerning7988 [ name = turkish7989 context = turkish ]7990 encoding = OT1T1LY1

26 httpfrwikipediaorgwikiEspace_typographique 5 July 2007

CONFIGURATION FILES Additional kerning 200

7991 7992 = 167 = thinspace7993 = 167 7994 = = 167 7995 79967997 langm-trang7998 langconfigrang

OPENTYPE CONFIGURATION FILES 201

16 OpenType configuration filesThese are the configuration files for the following OpenType fonts27

bull Latin Modern Roman

bull Charis SIL28

bull Palatino29

The settings are typeset in the respective font

161 Character inheritanceOpenType fonts may differ considerably in how complete their arsenal of glyphs isTherefore each font family should have their own inheritance settings

79998000 -----------------------------------------------------------------------8001 INHERITANCE80028003 for xetex (EU1) and luatex (EU2) resp both (TU)8004 langLatinModernRomanrang8005 DeclareCharacterInheritance8006 encoding = EU1EU2TU8007 family = Latin Modern Roman

8008 A = AgraveAacuteAcircAtildeAumlAringĀĂĄǺȀẠẢẤẦẨẪẬẮẰẲẶ8009 Α Greek8010 AElig = Ǽ8011 B = ฿8012 Β Greek8013 C = CcedilĆĈĊČ8014 D = ETHĎĐḌḎ8015 E = EgraveEacuteEcircEumlĒĔĖĘĚȄẸẺẼỀẾỄỂỆ8016 Ε Greek8017 G = ĜĞĠĢǦǴ8018 H = ĤĦḤḦḪ8019 Η Greek8020 I = IgraveIacuteIcircIumlĨĪĬĮİȈỈỊ8021 Ι Greek8022 J = Ĵ8023 K = Ķ8024 Κ Greek8025 L = ĹĻŁḶ ĽĿḸ8026 M = Μ Greek8027 N = NtildeŃŅŇṄṆ8028 Ν Greek8029 O = OgraveOacuteOcircOtildeOumlOslashŌŎŐỌƠǪǾȌỎỐỒỔỖỘỚỜỠỞỢ8030 Ο Greek8031 P = Ρ Greek8032 R = ŔŖŘȐṚṘṜ8033 S = ŚŜŞŠȘṢ8034 T = ŢŤȚṬṮ8035 Τ Greek8036 U = UgraveUacuteUcircUumlŨŪŬŮŰŲƯȔỤỦỨỪỬỮỰ8037 W = ŴẀẂẄ8038 X = Χ Greek8039 Y = YacuteŶŸỴỶỸ

27 This is file microtype-utfdtx28 Available at httpsoftwaresilorgcharis29 These settings have been contributed by Loren B Davis

OPENTYPE CONFIGURATION FILES Character inheritance 202

8040 Z = ŹŻŽẒ8041 Ζ Greek8042 a = agraveaacuteacircatildeaumlaringāăąǻȁạảấầẩẫậắằẳẵ8043 aelig = ǽ8044 c = ccedilćĉċč8045 d = đḍḏ8046 e = egraveeacuteecirceumlēĕėęěȅẹẻẽếềểễệ8047 f = ff Unicode 64256 glyph name in Latin Modern f_f in New Computer Modern ff8048 g = ĝğġģǧǵ8049 h = ĥħḥḧḫ8050 i = igraveiacuteicirciumlĩīĭįıȉỉị8051 j = ĵ8052 k = ķ8053 l = ĺļłḷḹ ľlmiddot8054 n = ntildeńņňṅṇ8055 o = ograveoacuteocircotildeoumloslashōŏőọơǫǿȍỏốồổỗộớờỡởợ8056 r = ŕŗřȑṛṙṝ8057 s = śŝşšșṣ8058 t = ţțṭṯẗ ť8059 u = ugraveuacuteucircuumlũūŭůűųưȕụủứừửữự8060 w = ŵẁẃẅ8061 y = yacuteŷyumlỳỵỷỹ8062 z = źżžẓ8063

8064 langLatinModernRomanrang8065 langCharisSILrang8066 DeclareCharacterInheritance8067 encoding = EU1EU2TU8068 family = Charis SIL

8069 A = AgraveAacuteAcircAtildeAumlAringĀĂĄǍǞǠȦǺȀȂḀẠẢẤẦẨẪẬẮẰẲẴẶꜲ

8070 АӐӒ Cyrillic8071 AElig = Ǣ8072 ǼӔ Cyrillic8073 B = ḂḄḆ8074 В Cyr8075 C = CcedilĆĈḈĊČ8076 СҪ Cyr8077 D = ĎḊḌḎḐḒĐ

8078 E = EgraveEacuteEcircEumlĒĔĖĘĚȄȨȆḔḖḘḚḜẸẺẼẾỀỂỄỆ8079 ЕЀЁӖ Cyr8080 F = Ḟ8081 G = ĜĞĠĢǦǴḠԌ8082 H = ĤȞḢḤḦḨḪ8083 НҢҤӇӉ Cyr8084 I = IgraveIacuteIcircȈIumlĮĨỊĪİǏỈȊĬḬIuml8085 ІЇӀӏ Cyr8086 J = Ĵ8087 Ј Cyr8088 K = ĶǨḰḲḴ

8089 КЌҚҜҞҠӃԞ Cyr8090 L = ĹĻĽḶḸḺḼ Lmiddot

8091 M = ḾṀṂ8092 МӍ Cyr8093 N = NtildeŃŅŇǸṄṆṈṊ

8094 ИЙЍҊӢӤ Cyr

8095 O = OgraveOacuteOcircOtildeOumlŌŎŐǑǪǬȌȎȪȬȮȰṌṎṐṒỌỎỐỒỔỖỘỚỜỞỠƠ8096 ОѲӦӨӪ Cyr8097 Θ Greek8098 P = ṔṖ8099 РҎ Cyr8100 Q = Ԛ Cyr8101 R = ŔŖŘȐȒṘṚṜṞ

8102 S = ŚŜŞŠȘṠṢṤṦṨ

OPENTYPE CONFIGURATION FILES Character inheritance 203

8103 Ѕ Cyr8104 T = ŢŤȚṪṬṮṰ8105 ТҬ Cyr

8106 U = UgraveUacuteUcircUumlŨŪŬŮŰŲǓǕǗǙǛȔȖṲṴṶṸṺỤỦỨỪỬỮỰ8107 V = ṼṾ8108 W = ŴẀẂẄẆẈ8109 Ԝ Cyr8110 X = ẊẌ8111 ХҲӼӾ Cyr8112 Y = YacuteŶŸȲẎỲỴỶỸ8113 ҮҰ Cyr8114 Z = ŹŻŽẐẒẔ

8115 a = agraveaacuteacircatildeaumlaringāăąǎǟǡȧǻȁȃḁạảầấẩẫậắằẳẵặ aʾ8116 аӑӓ Cyr8117 aelig = ǽ8118 ӕ Cyr8119 b = ḃḅḇ8120 c = ccedilćĉċčḉ8121 сҫ Cyr8122 d = ďḋḍḏḑḓ

8123 e = egraveeacuteecirceumlēĕėęěȅȩȇḕḗḙḛḝẹẻẽềếểễệ8124 еѐёӗ Cyr8125 f = ḟff f_f8126 g = ĝğġģǧǵḡ8127 h = ĥȟḣḥḧḩḫẖ8128 Һһ Cyr8129 i = ıigraveiacuteicircȉǐiumlįīịĩḭḯỉȋĭ8130 ії Cyr8131 j = ĵǰ8132 ј Cyr8133 k = ķǩḱḳḵ

8134 l = ĺļḻḷḹḽ ľlmiddot8135 m = ḿṁṃ8136 n = ntildeńņňǹṅṇṉṋ ʼn

8137 o = ograveoacuteocircotildeoumlōŏőǒǫǭȍȏȫȭȯȱṍṏṑṓọỏồốổỗộớờởỡợ8138 оѳӧөӫ Cyr8139 p = ṕṗ8140 рҏ Cyr8141 q = ԛ Cyr8142 r = ŕŗřȑȓṙṛṝṟ8143 s = śŝşšșṡṣṥṧṩ8144 ѕ Cyr8145 t = ţțṫṭṯṱẗ ť

8146 u = ugraveuacuteucircuumlũūŭůűųǔǖǘǚǜȕȗṳṵṷṹṻụủứừửữự8147 v = ṽṿ8148 w = ŵẁẃẅẇẉẘ8149 ԝ Cyr8150 x = ẋẍ8151 хҳ Cyr8152 y = yacuteyumlŷȳẏẙỳỵỷỹ8153 уўӯӱӳ Cyr8154 z = źżžẑẓẕ8155 Cyrillic8156 Г = ЃҐҒӶӺ8157 Ж = ҖӜӁ8158 З = ӞҘ8159 Л = Ӆ8160 П = Ԥ8161 У = ЎӮӰӲ8162 Ч = ҶҸӋӴ8163 Ы = Ӹ8164 Ә = Ӛ8165 Ҽ = Ҿ8166 г = ѓґғӷӻ

OPENTYPE CONFIGURATION FILES Character inheritance 204

8167 ж = җӂӝ8168 з = ҙӟ8169 и = йѝҋӣӥ8170 к = ќқҝҟҡӄԟ8171 л = ӆ8172 м = ӎ8173 н = ңҥӈӊ8174 п = ԥ8175 т = ҭ8176 х = ӽӿ8177 ч = ҷҹӌӵ8178 ш = щ8179 ы = ӹ8180 э = ӭ8181 ҽ = ҿ8182 ә = ӛ8183 ү = ұ8184 Г = Γ Greek8185 П = Π Greek8186 81878188 missing tipa math symbols

8189 langCharisSILrang8190 langPalatinorang8191 DeclareCharacterInheritance8192 encoding = EU1EU2TU8193 family = Palatino

Unfortunately I donrsquot have a Palatino variant containing all of the following glyphsThe settings are typeset in TEX Gyre Pagella missing glyphs printed in red aretaken from Charis SIL glyphs missing even in Charis SIL appear as lsquorsquo To see thereal settings consult mt-Palatinocfg

8194 A = AgraveAacuteAcircAtildeAumlĀĂĄǍǞǠȦǺȀȂḀẠẢẤẦẨẪẬẮẰẲẴẶꜲ8195 B = ḂḄḆ8196 C = CcedilĆĈḈĊČ8197 D = ĎḊḌḎḐḒ8198 E = EgraveEacuteEcircEumlĒĔĖĘĚȄȨȆḔḖḘḚḜẸẺẼẾỀỂỄỆ8199 F = Ḟ8200 G = ĜĞĠĢǦǴḠ8201 H = ĤȞḢḤḦḨḪ8202 I = IgraveIacuteIcircȈIumlĮĨỊĪİǏỈȊĬḬIuml8203 J = Ĵ8204 K = ĶǨḰḲḴ8205 L = ĹĻĽḶḸḺḼỺĿŁ Lmiddot8206 M = ḾṀṂ8207 N = NtildeŃŅŇǸṄṆṈṊ8208 O = OgraveOacuteOcircOtildeOumlŌŎŐǑǪǬȌȎȪȬȮȰṌṎṐṒỌỎỐỒỔỖỘỚỜỞỠƠ8209 P = ṔṖ8210 R = ŔŖŘȐȒṘṚṜṞ8211 S = ŚŜŞŠȘṠṢṤṦṨ8212 T = ŢŤȚṪṬṮṰ8213 U = UgraveUacuteUcircUumlŨŪŬŮŰŲǓǕǗǙǛȔȖṲṴṶṸṺỤỦỨỪỬỮỰ8214 V = ṼṾ8215 W = ŴẀẂẄẆẈ8216 X = ẊẌ8217 Y = YacuteŶŸȲẎỲỴỶỸ8218 Z = ŹŻŽẐẒẔ8219 a = agraveaacuteacircatildeaumlaringāăąǎǟǡȧǻȁȃḁạảầấẩẫậắằẳẵặ aʾ8220 b = ḃḅḇ8221 c = ccedilćĉċčḉ8222 d = ďḋḍḏḑḓ8223 e = egraveeacuteecirceumlēĕėęěȅȩȇḕḗḙḛḝẹẻẽềếểễệ

OPENTYPE CONFIGURATION FILES Character inheritance 205

8224 f = ḟff8225 g = ĝğġģǧǵḡ8226 h = ĥȟḣḥḧḩḫẖ8227 i = ıigraveiacuteicircȉǐiumlįīịĩḭḯỉȋĭ8228 j = ĵǰ8229 k = ķǩḱḳḵ8230 l = ĺļḻḷḹḽ ľlmiddot8231 m = ḿṁṃ8232 n = ntildeńņňǹṅṇṉṋ ʼn8233 o = ograveoacuteocircotildeoumlōŏőǒǫǭȍȏȫȭȯȱṍṏṑṓọỏồốổỗộớờởỡợ8234 p = ṕṗ8235 r = ŕŗřȑȓṙṛṝṟ8236 s = śŝşšșṡṣṥṧṩ8237 t = ţțṫṭṯṱẗ ť8238 u = ugraveuacuteucircuumlũūŭůűųǔǖǘǚǜȕȗṳṵṷṹṻụủứừửữự8239 v = ṽṿ8240 w = ŵẁẃẅẇẉẘ8241 x = ẋẍ8242 y = yacuteyumlŷȳẏẙỳỵỷỹ8243 z = źżžẑẓẕ8244

8245 langPalatinorang

Less characters in the Lato font 8246 langLatorang8247 DeclareCharacterInheritance8248 encoding = TUEU1EU28249 family = Lato

8250 A = AgraveAacuteAcircAtildeAumlAringĄ

8251 a = agraveaacuteacircatildeaumlaringą

8252 C = ĆCcedil

8253 c = ćccedil

8254 D= ETH

8255 E = EgraveEacuteEcircEumlĘ

8256 e = egraveeacuteecirceumlę

8257 I = IgraveIacuteIcircIuml

8258 i = igraveiacuteicirciumlı

8259 L = Ł

8260 l = ł

8261 N= ŃNtilde

8262 n = ńntilde

8263 O= OslashOgraveOacuteOcircOtildeOuml

8264 o = oslashograveoacuteocircotildeouml

8265 S = ŚŠ

8266 s = śš

8267 U= UgraveUacuteUcircUuml

8268 u = ugraveuacuteucircuuml

8269 Y = YacuteŸ

8270 y = yacuteyuml

8271 Z = ŹŻŽ

8272 z = źżž

8273

8274 langLatorang

and even less in the self-professedly awesone Font Awesome font8275 langFontAwesomerang8276 DeclareCharacterInheritance8277 encoding = TUEU1EU28278 family = FontAwesome 8279 8280 langFontAwesomerang

OPENTYPE CONFIGURATION FILES Character protrusion 206

162 Character protrusion82818282 -----------------------------------------------------------------------8283 PROTRUSION82848285 langLatinModernRomanrang8286 SetProtrusion8287 [ name = LMR-default ]8288 encoding = EU1EU2TU8289 family = Latin Modern Roman 8290

8291 A = 50508292 AElig = 50 8293 F = 508294 J = 50 8295 K = 508296 L = 508297 T = 50508298 V = 50508299 W = 50508300 X = 50508301 Y = 50508302 k = 508303 r = 508304 t = 708305 v = 50508306 w = 50508307 x = 50508308 y = 50708309 0 = 508310 1 = 1002008311 2 = 50508312 3 = 50508313 4 = 70708314 5 = 508315 6 = 508316 7 = 501008317 8 = 508318 9 = 508319 = 7008320 = 5008321 = 5008322 = 5008323 = 1008324 = 2008325 = 50508326 ~ = 2002508327 = 50508328 = 3003008329 + = 2502508330 - = 400500 hyphen8331 ndash = 400300 endash8332 mdash = 300200 emdash8333 _ = 200200 underscore8334 = 2003008335 backslash = 2003008336 = 300400 quotesingle8337 lsquo = 500700 rsquo = 5006008338 ldquo = 500300 rdquo = 2006008339 sbquo = 400400 bdquo = 4004008340 lsaquo = 400400 rsaquo = 3005008341 laquo = 300200 raquo = 1004008342 iexcl = 100 iquest = 100 8343 ( = 300 ) = 300

OPENTYPE CONFIGURATION FILES Character protrusion 207

8344 lt = 200100 gt = 1002008345 braceleft = 400200 braceright = 2004008346 angleleft = 400 angleright = 4008347 dagger = 1001008348 Dagger = 80 808349 bull = 2002008350 middot = 400450 periodcentered8351 = 80 508352 ₡ = 508353 deg = 4004008354 trade = 1002008355 copy = 1001008356 reg = 1001008357 ordf = 1002008358 ordm = 1002008359 sup1 = 2002508360 sup2 = 501008361 sup3 = 501008362 not = 200 8363 minus = 3003008364 plusmn = 1502008365 times = 1502508366 divide = 1502508367 euro = 100 8368 oneoldstyle = 1001008369 twooldstyle = 50 508370 threeoldstyle = 30 808371 fouroldstyle = 50 508372 sevenoldstyle = 50 808373 Γ = 180 Gamma8374 Δ = 100100 Delta8375 Θ = 50 50 Theta8376 Λ = 100100 Lambda8377 Ξ = Xi8378 Π = Pi8379 Σ = 50 50 Sigma8380 Υ = 100100 Upsilon8381 Φ = 50 50 Phi8382 Ψ = 50 50 Psi8383 Ω = Omega

8384 83858386 SetProtrusion8387 [ name = LMR-it ]8388 encoding = EU1EU2TU8389 family = Latin Modern Roman8390 shape = itsl 8391

8392 A = 1251008393 AElig = 125-558394 B = 90-408395 C = 145-758396 D = 75 -288397 E = 80-558398 F = 85-808399 G = 153-158400 H = 73-608401 I = 140-1208402 IJ = 140-808403 J = 135-808404 K = 70-308405 L = 87 408406 M = 67-458407 N = 75-558408 O = 150-30

OPENTYPE CONFIGURATION FILES Character protrusion 208

8409 Π= 150-558410 P = 82-508411 Q = 150-308412 R = 75 158413 S = 90-658414 $ = 100-208415 T = 220-858416 U = 230-558417 V = 260-608418 W = 185-558419 X = 70-308420 Y = 250-608421 Z = 90-608422 a = 150-108423 b = 170 8424 c = 173-108425 d = 150-558426 e = 180 8427 f = -2508428 g = 150-108429 h = 100 8430 i = 210 8431 ij = 210-408432 j = -408433 k = 110-508434 l = 240-1108435 m = 80 8436 n = 115 8437 o = 155 8438 q = 170-408439 r = 155-408440 s = 130 8441 t = 230-108442 u = 120 8443 v = 140-258444 w = 98-208445 x = 65-408446 y = 130-208447 z = 110-808448 0 = 170-858449 1 = 2301108450 2 = 130-708451 3 = 140-708452 4 = 130808453 5 = 160 8454 6 = 175-308455 7 = 250-1508456 8 = 130-408457 9 = 155-808458 = 5008459 = 4508460 = 3008461 = 3008462 amp = 130308463 = 180508464 = 380208465 + = 1802008466 = 180108467 ~ = 2001508468 ( = 300 ) = 708469 = 1001008470 - = 500300 hyphen8471 ndash = 500300 endash8472 mdash = 400170 emdash8473 _ = 100200 underscore

OPENTYPE CONFIGURATION FILES Character protrusion 209

8474 = 300400 quotesingle8475 = 5003008476 lsquo = 800200 rsquo = 800-208477 ldquo = 540100 rdquo = 5001008478 sbquo = 300700 bdquo = 2006008479 lsaquo = 500300 rsaquo = 4004008480 laquo = 400100 raquo = 2003008481 iexcl = 200 iquest = 200 8482 lt = 300100 gt = 2001008483 backslash = 3003008484 braceleft = 400100 braceright = 2002008485 dagger = 200 808486 Dagger = 120 808487 bull = 2201008488 middot = 550300 periodcentered8489 = 170 8490 ₡ = 100 508491 para = 200 8492 deg = 5003008493 trade = 200 708494 copy = 50 708495 reg = 50 708496 ordf = 1401008497 ordm = 1401008498 sup1 = 4001508499 sup2 = 250 808500 sup3 = 250 808501 not = 250 808502 minus = 3002008503 plusmn = 1501708504 times = 2002008505 divide = 2002008506 euro = 150 8507 oneoldstyle = 1001008508 twooldstyle = 100 808509 threeoldstyle = 80 508510 fouroldstyle = 80 808511 fiveoldstyle = 50 8512 sixoldstyle = 50 8513 sevenoldstyle = 80 808514 eightoldstyle = 50 8515 Γ = 100120 Gamma8516 Δ = 120100 Delta8517 Θ = 120 50 Theta8518 Λ = 130100 Lambda8519 Ξ = 100 Xi8520 Π = 100 Pi8521 Σ = 100 50 Sigma8522 Υ = 180100 Upsilon8523 Φ = 130 70 Phi8524 Ψ = 130 50 Psi8525 Ω = 50 Omega

8526 8527 langLatinModernRomanrang8528 langCharisSILrang8529 SetProtrusion8530 [ name = Charis-default ]8531 encoding = EU1EU2TU8532 family = Charis SIL 8533

8534 A = 50508535 AElig = 50508536 C = 50 8537 D = 508538 F = 50

OPENTYPE CONFIGURATION FILES Character protrusion 210

8539 G = 50 8540 J = 100 8541 K = 508542 L = 508543 Ŀ = 1008544 O = 50508545 Œ= 50 8546 P = 508547 Q = 50708548 R = 508549 ẞ = 40 capital sharp s8550 T = 50508551 V = 50508552 W = 50508553 X = 50508554 Y = 50508555 k = 508556 ŀ = 1508557 r = 508558 t = 508559 v = 50508560 w = 50508561 x = 50508562 y = 508563 1 = 1501508564 2 = 50508565 3 = 50 8566 4 = 100508567 6 = 50 8568 7 = 50808569 9 = 50508570 = 6008571 = 5008572 = 4008573 = 3008574 = 1008575 = 2008576 = 50508577 ~ = 2002508578 = 508579 = 3003008580 += 2002508581 = 2008582 backslash = 1502008583 | = 2002008584 - = 400500 hyphen8585 ndash = 200300 endash8586 mdash= 150250 emdash8587 ―= 200200 Horizontal Bar = texttwelveudash8588 ‒ = 150150 Figure Dash = textthreequartersemdash8589 _ = 1001008590 = = 1001008591 lsquo = 300400 rsquo = 3004008592 ldquo = 300300 rdquo = 3003008593 sbquo = 400400 bdquo = 3003008594 lsaquo = 400300 rsaquo = 3004008595 laquo = 200200 raquo = 1503008596 iexcl = 100 iquest = 100 8597 ( = 200 ) = 2008598 lt= 200150 gt = 1002008599 [ = 100 ] = 1008600 braceleft = 200 braceright = 3008601 dagger = 80 808602 Dagger = 1001008603 bull = 200200

OPENTYPE CONFIGURATION FILES Character protrusion 211

8604 deg = 1502008605 trade = 1501508606 cent = 50 8607 pound = 50 8608 brvbar = 2002008609 copy = 1001008610 reg = 1001008611 ordf = 1002008612 ordm = 2002008613 not = 200 508614 micro = 1008615 para = 1008616 middot = 3004008617 sup1 = 2003008618 sup2 = 1002008619 sup3 = 1002008620 euro = 100 8621 plusmn= 1502008622 times= 2002008623 divide= 2502508624 minus = 2002008625 minus= 2002008626 Cyrillic8627 Б = 508628 Г = 1308629 Ж = 50508630 З = 30508631 Л = 50 8632 У = 50508633 Ф = 50508634 Ч = 100 8635 Ъ = 508636 Ь = 508637 Э = 50508638 Ю= 408639 Я = 50 8640 Ѵ = 50508641 Ҽ = 50 8642 Ђ = 501008643 Є = 50 8644 Љ = 50508645 Њ = 508646 Ћ = 50508647 Ԅ = 1001008648 Ԇ = 50508649 Ѣ = 508650 Ҍ = 508651 Ԉ= 50808652 Ԋ= 808653 Ԏ = 50508654 Ԓ = 50 8655 Ԕ= 50408656 Ԗ = 508657 Ԙ = 50 8658 Ԡ= 508659 Ԣ= 508660 Ԃ = 1008661 б = 50508662 г = 708663 к = 508664 л = 50 8665 т = 50508666 ф = 50508667 ч = 50 8668 ъ = 50

OPENTYPE CONFIGURATION FILES Character protrusion 212

8669 ь = 508670 э = 508671 я = 50 8672 љ = 50 8673 њ = 508674 ѣ = 508675 ѵ = 50508676 ҽ = 50 8677 ҍ = 508678 ү = 50508679 ҕ = 508680 ҧ = 508681 ԃ = 1008682 ԅ = 1001008683 ԇ = 50508684 ԉ = 50708685 ԋ = 708686 ԙ = 50308687 ԡ = 508688 ԣ = 508689 Д П Ц Ш Щ Ы Ҕ Ҧ Ҩ Ә Ҵ Џ Ӭ Ӡ Ԑ Ԁ8690 в д ж з и м н п ц ш ы ю ђ є ћ џ ә ԑ ҩ ҵ ӡ ԁ ԍ ԏ ԓ ԕ ԗ8691 Greek8692 Δ = 50508693 Ψ = 50508694 γ = 70708695 λ = 40708696 π = 40508697 ρ = 508698 σ = 508699 χ = 5050

8700 87018702 SetProtrusion8703 [ name = Charis-it ]8704 encoding = EU1EU2TU8705 family = Charis SIL8706 shape = itsl 8707

8708 C = 50 8709 G = 50 8710 J = 50 8711 L = 50508712 O = 50 8713 Œ= 50 8714 Q = 50 8715 S = 50 8716 $ = 50 8717 T = 70 8718 o = 50508719 p = 508720 q = 50 8721 t = 508722 w = 508723 y = 508724 1 = 1501008725 3 = 50 8726 4 = 100 8727 6 = 50 8728 7 = 100 8729 = 7008730 = 6008731 = 4008732 = 4008733 = 150

OPENTYPE CONFIGURATION FILES Character protrusion 213

8734 amp = 808735 = 50508736 = 3002008737 += 2502508738 = 80508739 ~ = 1501508740 = 1508741 backslash = 1501508742 - = 300400 hyphen8743 ndash = 200300 endash8744 mdash= 150200 emdash8745 _ = 1008746 = = 2002008747 plusmn= 1502008748 times= 2502508749 divide= 2502508750 deg = 1502008751 middot = 3004008752 lsquo = 400200 rsquo = 4002008753 ldquo = 300200 rdquo = 4002008754 sbquo = 200500 bdquo = 1505008755 lsaquo = 300400 rsaquo = 2005008756 laquo = 200300 raquo = 1504008757 ( = 200 ) = 2008758 lt= 200200 gt = 2002008759 braceleft = 300 braceright = 2008760 Cyrillic8761 Ж = 50308762 Л = 50 8763 У = 50308764 Ф = 50 8765 Ч = 100 8766 Ъ = 508767 Ь = 508768 Э = 50508769 Я = 50 8770 Ѵ = 50508771 Љ = 50508772 Ԅ = 1401008773 Ԇ = 70508774 Ԉ= 50808775 Ԋ= 808776 Ԏ = 50508777 г = 50508778 д = 50308779 м = 50 8780 ф = 50 8781 ч = 50 8782 ъ = 508783 ь = 508784 э = 508785 я = 50 8786 љ = 50508787 њ = 508788 ѵ = 50508789 ҍ = 508790 ԅ = 1401008791 ԇ = 70508792 ԉ = 50708793 ԋ = 708794 Greek8795 Γ = 1308796 Δ = 50508797 Ψ = 50508798 γ = 7070

OPENTYPE CONFIGURATION FILES Character protrusion 214

8799 λ = 40708800 π = 40508801 ρ = 508802 σ = 508803 χ = 5050

8804

The small caps glyph names in Charis SIL have changed with version 50 of thefont We try to get the names right both with LuaTEX (where we can simply querythe font version) and with XETEX (where we check for glyph name)

88058806 quick and dirty -- maybe wersquoll promote this to a8807 regular key some time8808 definekeyMTprccommandcsname 1endcsname88098810 glyph names have changed with version 50 of Charis SIL8811 before aSC bSC 8812 after asc bsc 8813 ifxMTluaundefined8814 gdefMTgetCHARISSC8815 test whether glyph asc exists8816 ifnumnumexprXeTeXglyphindex ascrelax gt 08817 gdefMTCHARISSCsc8818 else8819 gdefMTCHARISSCSC8820 fi8821 8822 else8823 gdefMTgetCHARISSC8824 gdefMTCHARISSCMTlua8825 check font version8826 -- why doesnrsquot this work8827 f = fontgetfont(fontcurrent())8828 i = fontloaderinfo(ffilename)8829 if (tonumber(iversion) lt 5) then8830 if (tonumber(fontloaderinfo(fontgetfont(fontcurrent())filename)version) lt 5) then8831 texprint(SC)8832 else8833 texprint(sc)8834 end8835 8836 8837 fi88388839 SetProtrusion8840 [ name = Charis-sc8841 load = Charis-default8842 command = MTgetCHARISSC ]8843 encoding = EU1EU2TU8844 family = Charis SIL8845 shape = sc 8846

8847 ᴀ = 100100 etc doesnt work with textsc8848 aMTCHARISSC = 1001008849 cMTCHARISSC = 50 8850 dMTCHARISSC = 508851 fMTCHARISSC = 508852 gMTCHARISSC = 50 8853 jMTCHARISSC = 100 8854 kMTCHARISSC = 508855 lMTCHARISSC = 508856 f_lMTCHARISSC = 508857 oMTCHARISSC = 50508858 oeMTCHARISSC = 50

OPENTYPE CONFIGURATION FILES Character protrusion 215

8859 qMTCHARISSC = 50708860 rMTCHARISSC = 508861 tMTCHARISSC = 501008862 vMTCHARISSC = 50508863 wMTCHARISSC = 50508864 xMTCHARISSC = 50508865 yMTCHARISSC = 5050

8866 8867 langCharisSILrang8868 langPalatinorang8869 SetProtrusion8870 [ name = palatino-default ]8871 encoding = EU1EU2TU8872 family = Palatino 8873

8874 A = 50508875 D = 508876 J = 50 8877 K = 508878 L = 508879 O = 25 8880 T = 50508881 V = 50508882 W = 50508883 X = 50508884 Y = 50508885 b = 258886 d = 25308887 f = 508888 g = 1008889 k = 508890 p = 508891 q = 50 8892 r = 508893 t = 50 = 50 = 508894 v = 75508895 w = 50508896 x = 50508897 y = 50708898 1 = 100508899 2 = 25508900 4 = 50 8901 6 = 50 8902 9 = 25 8903 AElig = 100 8904 Π= 25 8905 = 700 = 350 hellip = 1508906 = 5008907 = 5008908 = 5008909 = 100 = 1008910 = 200 = 2008911 = 50508912 ~ = 2002508913 amp = 501008914 = 1001008915 = 2002008916 + = 2502508917 ( = 100 ) = 3008918 = 2003008919 - = 4005008920 textendash = 300300 textemdash = 2002008921 textquoteleft = 500700 textquoteright = 5007008922 textquotedblleft = 300400 textquotedblright = 3004008923 textbackslash = 200300

OPENTYPE CONFIGURATION FILES Character protrusion 216

8924 quotesinglbase = 400400 quotedblbase = 4004008925 guilsinglleft = 400400 guilsinglright = 3005008926 guillemotleft = 300300 guillemotright = 2004008927 textexclamdown = 100 textquestiondown = 100 8928 textbraceleft = 400200 textbraceright = 2004008929 textless = 200100 textgreater = 1002008930 le = 200100 ge = 1002008931 textminus = 3003008932 texttrademark = 2002008933 textcopyright = 2002008934 textregistered = 2002008935 textdegree = 3003008936 brvbar = 450500 not = 2501508937 = 1502508938 middot = 850 7008939 para = 10008940 times = 150 3008941 ordf = 300300 ordm = 3003008942 ⁰ = 2004008943 sup1 = 400350 sup2 = 200300 sup3 = 2504008944 ⁴ = 250350 ⁵ = 200300 ⁶ = 2504008945 ⁷ = 200450 ⁸ = 250400 ⁹ = 2003508946 ₀ = 2004008947 ₁ = 400250 ₂ = 200300 ₃ = 2504008948 ₄ = 250350 ₅ = 200300 ₆ = 2504008949 ₇ = 200450 ₈ = 250400 ₉ = 2003508950 plusmn = 150100 divide = 3003008951 thorn = 258952 ₊ = 300450 ₋ = 3004508953 ⁺ = 300450 ⁻ = 3004508954 dagger = 200250 Dagger = 2002508955 π = 50 8956 ſ = 508957 = 1001508958 textservicemark = 1002008959 ‐ = 400500 ‑ = 400500 ‒ = 2003008960 ndash = 205305 mdash = 200300 ― = 501508961 bull = 1252008962 asc = 50508963 89648965 SetProtrusion8966 [ name = palatino-it ]8967 encoding = EU1EU2TU8968 family = Palatino8969 shape = itsl 8970

8971 A = 50508972 AElig = 50 8973 B = 50 8974 C = 50 8975 D = 50508976 E = 50 8977 F = 50 8978 G = 50 8979 H = 50 8980 K = 50 8981 L = 50 8982 O = 50 8983 Π= 50 8984 P = 50 8985 Q = 50 8986 R = 50 8987 S = 50 8988 $ = 50

OPENTYPE CONFIGURATION FILES Character protrusion 217

8989 T = 100 8990 U = 50 8991 V = 100508992 W = 50 8993 X = 50 8994 Y = 100508995 b = 508996 c = 25 8997 g = 75 8998 i = 25 8999 m = 509000 n = 509001 p = 259002 q = 25 9003 x = 509004 1 = 100 9005 2 = 50 9006 4 = 50 9007 7 = 50 9008 = 500 = 350 hellip = 2009009 = 5009010 = 3009011 = 3009012 = 300 = 3009013 amp = 50509014 = 1001009015 = 2002009016 + = 1502009017 = 50509018 ~ = 2001509019 ( = 200 ) = 2009020 = 1002009021 - = 3005009022 textendash = 300300 textemdash = 2002009023 textquoteleft = 700400 textquoteright = 7004009024 textquotedblleft = 500300 textquotedblright = 5003009025 _ = 1001009026 textbackslash = 1002009027 quotesinglbase = 500500 quotedblbase = 4004009028 guilsinglleft = 400400 guilsinglright = 3005009029 guillemotleft = 300300 guillemotright = 3003009030 textexclamdown = 100 textquestiondown = 200 9031 textbraceleft = 200100 textbraceright = 2002009032 textless = 300100 textgreater = 2001009033 le = 200100 ge = 1002009034 brvbar = 450500 not = 2501509035 middot = 850 7009036 para = 10009037 times = 150 3009038 ordf = 300250 deg = 300300 ordm = 3002509039 ⁰ = 3002009040 sup1 = 300150 sup2 = 350200 sup3 = 2501509041 ⁴ = 350100 ⁵ = 300 50 ⁶ = 4001009042 ⁷ = 400 50 ⁸ = 250 50 ⁹ = 300 509043 ₀ = 3003009044 ₁ = 300350 ₂ = 300150 ₃ = 2502509045 ₄ = 400200 ₅ = 300100 ₆ = 4502009046 ₇ = 450150 ₈ = 400250 ₉ = 4002009047 plusmn = 150100 divide = 3003009048 thorn = 50 9049 dagger = 250200 Dagger = 2502009050 ₊ = 300450 ₋ = 3004509051 ⁺ = 300450 ⁻ = 3004509052 ‐ = 300500 ‑ = 300500 ‒ = 1003009053 ndash = 125305 mdash = 200300 ― = 125150

OPENTYPE CONFIGURATION FILES Character protrusion 218

9054 bull = 125200

9055 90569057 SetProtrusion9058 [ name = palatino-sc9059 load = palatino-default ]9060 encoding = EU1EU2TU9061 family = Palatino9062 shape = sc 9063

9064 a = 50509065 aelig = 50 9066 b = 0 09067 d = 0 09068 f = 0 09069 g = 0 09070 j = 50 9071 l = 509072 o = 0 09073 p = 0 09074 q = 0 9075 r = 09076 t = 50509077 y = 50509078 fl = 0509079 ffl = 0509080 = 0509081 = 050

9082 9083 langPalatinorang9084 langLatorang No settings yet9085 langFontAwesomerang9086 SetProtrusion9087 [ name = empty ]9088 encoding = TUEU1EU29089 family = FontAwesome 9090 9091 langFontAwesomerang9092

AUXILIARY FILE FOR MICRO FINE TUNING 219

17 Auxiliary file for micro fine tuningThis file can be used to test protrusion and expansion settings

9093 langtestrang9094 documentclassarticle90959096 Here you can specify the font you want to test using9097 the commands fontfamily fontseries and fontshape9098 Make sure to end all lines with a comment character9099 newcommandTestFont9100 fontfamilyppl9101 fontseriesb9102 fontshapeit sc sl9103 91049105 usepackageifthen9106 usepackage[T1]fontenc9107 usepackage[latin1]inputenc9108 usepackage[verboseexpansion=alltextstretch=50]microtype91099110 pagestyleempty9111 setlengthparindent0pt9112 newcommandcrulefillcleadershbox$mkern-2musmash-mkern-2mu$hfill9113 newcommandtestprotrusion[2][]9114 ifthenelseequal1r29115 lorem ipsum dolor sit amet9116 ifthenelseequal1rcrulefillleftarrowfill 29117 ifthenelseequal1lcrulefillrightarrowfill9118 you know the rest9119 ifthenelseequal1l29120 linebreak9121 fontencodingencodingdefault9122 fontseriesseriesdefault9123 fontshapeshapedefault9124 selectfont9125 Here is the beginning of a line dotfill and here is its endlinebreak9126 9127 newcommandshowTestFontexpandafterstripprefixmeaningTestFont9128 defstripprefix1gt9129 newcountcharcount9130 begindocument91319132 microtypesetupexpansion=false91339134 centering The font in this document is called by9135 textttshowTestFontparbigskip91369137 TestFontselectfont9138 This line intentionally left emptylinebreak9139 A -- Z9140 charcount=659141 loop9142 testprotrusioncharcharcount9143 advancecharcount 19144 ifnumcharcount lt 91 repeat9145 a -- z9146 charcount=979147 loop9148 testprotrusioncharcharcount9149 advancecharcount 19150 ifnumcharcount lt 123 repeat9151 0 -- 99152 charcount=489153 loop

AUXILIARY FILE FOR MICRO FINE TUNING 220

9154 testprotrusioncharcharcount9155 advancecharcount 19156 ifnumcharcount lt 58 repeat9157 9158 testprotrusion[r]9159 testprotrusion[r]9160 testprotrusion[r]9161 testprotrusion[r]9162 testprotrusion[r]9163 testprotrusion[r]9164 testprotrusion[l]textexclamdown9165 testprotrusion[l]textquestiondown9166 testprotrusion[r])9167 testprotrusion[l](9168 testprotrusion9169 testprotrusionchar`9170 testprotrusion-9171 testprotrusiontextendash9172 testprotrusiontextemdash9173 testprotrusiontextquoteleft9174 testprotrusiontextquoteright9175 testprotrusiontextquotedblleft9176 testprotrusiontextquotedblright9177 testprotrusionquotesinglbase9178 testprotrusionquotedblbase9179 testprotrusionguilsinglleft9180 testprotrusionguilsinglright9181 testprotrusionguillemotleft9182 testprotrusionguillemotright91839184 newpage9185 The following displays the current font stretched by 59186 normal and shrunk by 591879188 bigskip9189 newlengthMTln9190 newcommandteststring9191 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567899192 settowidthMTlnteststring9193 microtypesetupexpansion=true91949195 parbox105MTlnteststringlinebreak9196 teststringparbigskip9197 parbox095MTlnteststring91989199 enddocument9200 langtestrang

Needless to say that things may always be improved For suggestions mail towmlgmxnet

THE TITLE LOGO 221

A The title logoThis is microtype-logodtx You may treat this file in three different ways

bull compile it by itself

bull input it in the body of a dtx file

bull input it in the preamble it then provides the command printlogo which will do just that

The first two cases require the style file microtype-docsty which can be generated from microtypeins with

makefilemicrotype-docstydocsty

9201 langlogorangHerersquos how the logo on the title page was created30 It has nothing to do with microtype actually but uses fontinstIt is based on an experiment I posted to the decomptexttex newsgroup31 It will show

bull the character

bull the TEX box

bull the bounding box

bull kerns

A1 MacrosTo run this file TEX needs to find the afm file (either in the TEXINPUTS path or in the current working directory)

First input fontinst

9202 input fontinststy

bboxsty is an addition to fontinst which makes dimensions of the bounding boxes available (and was writtenby Hagraven Thecirc Thagravenh by the way) These dimensions are specified in the afm file but not used by TEX which is whyfontinst will discard them otherwise

9203 input bboxsty

tempdim Allocate some dimen registers

9204 newdimentempdim

fboxrulei Frame width of the box as TEX sees it

9205 newdimenfboxrulei9206 fboxrulei=01pt

fboxruleii Frame width of the bounding box

9207 newdimenfboxruleii9208 fboxruleii=01pt

kernboxheight Height of the box indicating the kern

9209 newdimenkernboxheight9210 kernboxheight=5pt

scaletoem An auxiliary macro Return a dimension relative to the em-width of the font Requires e-TEX

9211 setcommandscaletoem1dimexpr 1 spfontdimen6font1000relax

showlogo A fontinst incantation whose sole purpose is to produce the logo Its argument is a string (letters only)

9212 fontinstcc9213 defshowlogo1

Some fonts do not specify the fontdimen6 (width of an em) in the afm file In this case use the font size which iscorrect in most cases

9214 ifdimfontdimen6font = 0pt9215 typeout~Warning~no~fontdimen~6~specified~^^J9216 ~setting~it~to~pdffontsizefont ifnumpdftexversion lt 130 ptfi~9217 fontdimen6font=pdffontsizefont ifnumpdftexversion lt 130 ptfirelax9218 fi9219 installfonts9220 input_metricslogofontmetricsprintbbs1relax

30 Note that the logo module will not be created when installing microtype Instead the source file microtype-logodtx isincluded as an attachment in the PDF file If your PDF reader supports this you can to extract it alternativelyyou may use the pdftk tool

31 Message ID 42aa3687$0$24366$9b4e6d93newsread2arcor-onlinenet

ProvidesFilemicrotype-logodtx[20090608] ^^A dont count the backslashes in this documentmakeatletterletorigstepchecksumstepchecksumletstepchecksumrelaxmakeatother sectionThe title logo labelsectitle-logo^^Aiffalse meta-comment ^^A ======================================================================== This is filemicrotype-logodtx You may treat this file in three different waysbeginitemize item compile it by itself item verb|input| it in the body of a filedtx file item verb|input| it in the preamble it then provides the command verb|printlogo| which will do just thatenditemize The first two cases require the style file filemicrotype-docsty which can be generated from filemicrotypeins withbeginverbatimmakefilemicrotype-docstydocstyendverbatim ^^A ========================================================================^^Afi beginmacrocodeltlogogt endmacrocode Heres how the logo on the title page was createdfootnote Note that the |logo| module will not be created when installing microtype Instead the source file filemicrotype-logodtx is included as an attachment in the acronymPDF file If your acronymPDF reader supports this you can textattachfile [color=002 004 048mimetype=textplain]microtype-logodtx click here to extract it alternatively you may use the |pdftk| tool It has nothing to do with microtype actually but uses pkgfontinst It is based on an experiment I posted to the urldecomptexttex newsgroupfootnote Message ID nolinkurl42aa3687$0$24366$9b4e6d93newsread2arcor-onlinenet It will showbeginitemize item the character item the TeX box item the bounding box item kernsenditemize subsectionMacros To run this file TeX needs to find the fileafm file (either in the |TEXINPUTS| path or in the current working directory) First input pkgfontinst beginmacrocodeinput fontinststy endmacrocode filebboxsty is an addition to pkgfontinst which makes dimensions of the bounding boxes available (and was written by thanh by the way) These dimensions are specified in the fileafm file but not used by TeX which is why pkgfontinst will discard them otherwise beginmacrocodeinput bboxsty endmacrocodebeginmacrotempdim Allocate some dimen registers beginmacrocodenewdimentempdim endmacrocodeendmacrobeginmacrofboxrulei Frame width of the box as TeX sees it beginmacrocodenewdimenfboxruleifboxrulei=01pt endmacrocodeendmacrobeginmacrofboxruleii Frame width of the bounding box beginmacrocodenewdimenfboxruleiifboxruleii=01pt endmacrocodeendmacrobeginmacrokernboxheight Height of the box indicating the kern beginmacrocodenewdimenkernboxheightkernboxheight=5pt endmacrocodeendmacrobeginmacroscaletoem An auxiliary macro Return a dimension relative to the |em|-width of the font Requires etex beginmacrocodesetcommandscaletoem1dimexpr 1 spfontdimen6font1000relax endmacrocodeendmacrobeginmacroshowlogo A pkgfontinst incantation whose sole purpose is to produce the logo Its argument is a string (letters only) beginmacrocodefontinstccdefshowlogo1 endmacrocode Some fonts do not specify the fontdim6 (width of an |em|) in the |afm| file In this case use the font size which is correct in most cases beginmacrocode ifdimfontdimen6font = 0pt typeout~Warning~no~fontdimen~6~specified~^^J ~setting~it~to~pdffontsizefont ifnumpdftexversion lt 130 ptfi~ fontdimen6font=pdffontsizefont ifnumpdftexversion lt 130 ptfirelax fi installfonts input_metricslogofontmetricsprintbbs1relax endinstallfontsnormalcc endmacrocodeendmacro Layers beginmacrocodemakeatletterdefmtllayer12pdfliteralOC1 BDC2pdfliteralEMCifxmtobjectsundefinedletmtobjectsemptyfiifxmtorder undefinedletmtorder emptyfixdefmtordermtorder[(Logo)letmtlresourcesemptydefmtlregister1 immediatepdfobjltlt TypeOCG Name(1) gtgt expandafterxdefcsname mtl1endcsnamethepdflastobjspace 0 R xdefmtobjectsmtobjectscsname mtl1endcsname xdefmtordermtordercsname mtl1endcsname xdefmtlresourcesmtlresources1 csname mtl1endcsnamemtlregistercanvasmtlregistercharactersmtlregisterbounding-boxesmtlregisterTeX-boxesxdefmtordermtorder]globalletmtlobjectsmtobjectsdeftogglelayer12 pdfstartlink width wdlogobox height htlogobox depth dplogobox userSubtypeLink BS ltlt TypeBorderW 0 gtgt HO A ltlt SSetOCGState State[Toggle csname mtl1endcsname] gtgt 2pdfendlink endmacrocodebeginmacroprintbbs Preparation beginmacrocodesetcommandprintbbs1 setbox0hbox1 leavevmode kern-fboxrulei endmacrocode The canvas in the natural width of the text minus protrusion in color |bgcolor| beginmacrocode mtllayercanvas getboundarychars1relax tempdim=dimexprwd0 - (scaletoemlpcodefontfirstchar+ scaletoemrpcodefontlastchar)relax kerndimexprscaletoemlpcodefontfirstcharrelax lowerdimexprdp0+005em relax vboxcolorbgcolor hrule width tempdim height dimexprdp0+ht0+015emrelax kern-tempdim endmacrocode The baseline in color |blcolor| beginmacrocode vboxcolorblcolor hrule width tempdim height fboxrulei kern-dimexprwd0 -scaletoemrpcodefontlastcharrelax endmacrocode The string beginmacrocode printbbss 1relaxrelax endmacrocodeendmacrobeginmacrogetboundarychars Get first~dots beginmacrocodedefgetboundarychars12relax deffirstchar`1 getlastchar12relax endmacrocodeendmacrobeginmacrogetlastchar dots~and last character beginmacrocodedefgetlastchar12 ifxrelax2relax deflastchar`1 else expandaftergetlastchar fi 2 endmacrocodeendmacrobeginmacroprintbbss Loop over all characters of the string beginmacrocodedefprintbbss123relax ifxrelax1relax else ifxrelax2relax printbb1 else printbb12 fi expandafterprintbbss fi 23relax endmacrocodeendmacrobeginmacroprintbb Record the kern between the current and the following character then print the character cmdkerning is a pkgfontinst command beginmacrocodesetcommandprintbb12 setbox0hboxkerning12xdefthekernnumberresult showboxes1 endmacrocode This could be another application beginmacrocode quad w thescaletoemwidth1 bb thescaletoembbleft1 thescaletoembbright1 thescaletoemnumbernumexprwidth1-bbright1relax h height1bbtop1 bbbottom1depth1par endmacrocodeendmacrobeginmacroshowboxes Print the boxes for char meta1 This wont work if meta1 isnt also the PostScript name of the glyph (eg `comma =llap `) beginmacrocodesetcommandshowboxes1 leavevmode colortexcolor endmacrocode We have to record the width of the glyph beginmacrocode setbox0hboxcolortextcolor1 globaltempdim=wd0relax kern-fboxrulei endmacrocodebeginenumerateitem textitThe TeX box Print a frame in color |texcolor| This frame shows the glyph as TeX sees it beginmacrocode mtllayerTeX-boxes hbox lowerdimexpr dp0 + fboxruleirelax hbox vbox hrule heightfboxrulei hbox vrule widthfboxrulei height dimexprht0 + 2fboxruleirelax phantomunhcopy0 vrule widthfboxrulei hrule heightfboxrulei endmacrocodeitem textitThe character Now we step back and print the actual glyph We hold it back until now so that it will be printed emphon top of its box beginmacrocode kern-wd0 mtllayercharactershboxbox0 endmacrocode Step back by the amount that the characters bounding box differs from the TeX box on the left side beginmacrocode kerndimexprscaletoembbleft1-tempdim-fboxruleiirelax endmacrocodeitem textitThe bounding box will be printed in color |bbcolor| beginmacrocode mtllayerbounding-boxes colorbbcolor hbox lowerdimexpr-scaletoembbbottom1+fboxruleiirelax hbox vbox hrule heightfboxruleii hbox to dimexprscaletoemnumexpr bbright1-bbleft1relax+2fboxruleiirelax vrule height dimexprscaletoemnumexpr bbtop1-bbbottom1relax widthfboxruleii hfill vrule widthfboxruleii hrule heightfboxruleii kern-dimexprfboxruleii+fboxruleirelax endmacrocodeitem textitThe kern We also print a small box in color |kerncolor| indicating the kerning between the current and the next character filled for negative kerns empty for positive kerns beginmacrocode kernscaletoemnumexprwidth1-bbright1relax mtllayerTeX-boxes ifnumthekernlt0 colorkerncolor kernscaletoemthekern lowerkernboxheighthboxvrule width -dimexprscaletoemthekernrelax height kernboxheight kernscaletoemthekern else colortexcolor ifnumthekern=0 else lowerkernboxheight hbox vbox hrule heightfboxrulei hbox vrule height kernboxheight widthfboxrulei kerndimexprscaletoemthekern-2fboxruleirelax vrule widthfboxrulei hrule heightfboxrulei fi fi kern-fboxrulei endmacrocodeendenumerateendmacro beginmacrocodenewboxlogoboxdefprintlogo setboxlogobox=hboxvbox MakePercentComment endmacrocode This is the Kepler MM font used in the logo beginmacrocode deflogofontpkpri9e10 transformfontlogofontreencodefont8rfromafmpkpmmri8a10 fontthelogofont=logofontspace at 82pt endmacrocode This would load the italic Palatino font instead beginmacrocodedeflogofontpplritransformfontlogofont8rreencodefont8rfromafmlogofont8aedeflogofontlogofont8rfontthelogofont=logofontspace at 78pt endmacrocode Load the font beginmacrocode thelogofont endmacrocode Protrusion values (overdone for didactic reasons) beginmacrocode lpcodefont`M=96 rpcodefont`e=46 endmacrocode Now we can generate the logo beginmacrocode pdfliteral directSXS gs showlogoMicrotype rlapnormalfontnormalsizeraisebox55ptfootnotemark[1] kern5pt[3baselineskip] longdefmakefntext1 leftskip 0pt parindent 0pt everyparparindent 0pt leavevmodehbox to 15ptthefnmarkhss1 footnotetext[1]This graphic display on a togglelayercanvascanvas the togglelayercharacterscharacters their togglelayerbounding-boxesbounding boxes and togglelayerTeX-boxesTeX boxes edeflogodimenswidth thewdlogobox height thehtlogobox depth thedplogobox immediatepdfobjltltTypeExtGState CA 06 ca 06 BMNormal gtgt immediatepdfxform attr Group ltltTypeGroup STransparency I true CSDeviceRGB gtgt resources Properties ltltmtlresourcesgtgt ExtGState ltlt SXS thepdflastobjspace 0 R gtgt logobox vskip-25baselineskip leavevmode togglelayercharacters pdfrefxformpdflastxform pdfannotlogodimens SubtypeWidget FTBtn T(Logo) F 4 why did I say this AP ltlt N thepdflastxformspace 0 R gtgt AA ltlt E ltlt SSetOCGState State[Toggle mtlcharacters] gtgt X ltlt SSetOCGState State[Toggle mtlcharacters] gtgt D ltlt SSetOCGState State[Toggle csname mtlbounding-boxesendcsname] gtgt U ltlt SSetOCGState State[Toggle csname mtlTeX-boxesendcsname] gtgt gtgt vspace3baselineskip endmacrocode Our font beginmacrocodepdfmapline+pkpmmri8r10 KeplMM-It_385_575_10_ TeXBase1Encoding ReEncodeFont lt8renc ltpkpmmri8a10pfb endmacrocode Define colours (|thered| and |thegreen| are copied from filemicrotypedtx) beginmacrocodedefmtdefinecolors definecolortheredrgb065004007 definecolorthegreenrgb006044008 colorlettexcolorthegreen50 TeX boxes colorletkerncolortexcolor negative kerns colorletbbcolorthered50 bounding box colorletbgcolorblack8 canvas colorletblcolorblack50 baseline colorlettextcolorblack40 text endmacrocode Use with filemicrotypedtx beginmacrocodeifxdocumentclasstwoclasseserror usepackage[xcdraw]xcolor mtdefinecolorselse endmacrocodesubsectionDocument Now we can start the document beginmacrocodedocumentclass[10pta4paper]ltxdocprovidecommandMakePercentCommentrelaxexpandafterdefcsname vermicrotypedtxendcsname29999999 endmacrocode Re-use the preamble from filemicrotypedtx beginmacrocodeusepackagemicrotype-docusepackageattachfilemakeatletterpdfcatalogOCProperties ltlt OCGs [mtobjects] D ltlt Order [mtorder] gtgt gtgtmakeatotherbegindocument endmacrocode You are currently reading this beginmacrocodeDocInputmicrotype-logodtxnewpage And here it isvfillbegincenter printlogo nullendcentervfillexpandafterenddocumentfi endmacrocode Thats it^^A resume counting backslashesmakeatletterletstepchecksumorigstepchecksum^^Amakeatother beginmacrocodeltlogogt endmacrocodeendinput

THE TITLE LOGO Macros 222

9221 endinstallfonts9222 9223 normalcc

Layers

9224 makeatletter9225 defmtllayer12pdfliteralOC1 BDC2pdfliteralEMC9226 ifxmtobjectsundefinedletmtobjectsemptyfi9227 ifxmtorder undefinedletmtorder emptyfi9228 xdefmtordermtorder[(Logo)9229 letmtlresourcesempty9230 defmtlregister19231 immediatepdfobjltlt TypeOCG Name(1) gtgt9232 expandafterxdefcsname mtl1endcsnamethepdflastobjspace 0 R 9233 xdefmtobjectsmtobjectscsname mtl1endcsname9234 xdefmtordermtordercsname mtl1endcsname9235 xdefmtlresourcesmtlresources1 csname mtl1endcsname9236 mtlregistercanvas9237 mtlregistercharacters9238 mtlregisterbounding-boxes9239 mtlregisterTeX-boxes9240 xdefmtordermtorder]9241 globalletmtlobjectsmtobjects9242 deftogglelayer129243 pdfstartlink width wdlogobox height htlogobox depth dplogobox9244 userSubtypeLink9245 BS ltlt TypeBorderW 0 gtgt HO9246 A ltlt SSetOCGState9247 State[Toggle csname mtl1endcsname] gtgt9248 2pdfendlink9249

printbbs Preparation

9250 setcommandprintbbs19251 setbox0hbox19252 leavevmode9253 kern-fboxrulei

The canvas in the natural width of the text minus protrusion in color bgcolor

9254 mtllayercanvas9255 getboundarychars1relax9256 tempdim=dimexprwd0 - (scaletoemlpcodefontfirstchar+9257 scaletoemrpcodefontlastchar)relax9258 kerndimexprscaletoemlpcodefontfirstcharrelax9259 lowerdimexprdp0+005em relax vboxcolorbgcolor9260 hrule width tempdim9261 height dimexprdp0+ht0+015emrelax9262 kern-tempdim

The baseline in color blcolor

9263 vboxcolorblcolor9264 hrule width tempdim9265 height fboxrulei9266 9267 kern-dimexprwd0 -scaletoemrpcodefontlastcharrelax

The string

9268 printbbss 1relaxrelax9269

getboundarychars Get first

9270 defgetboundarychars12relax9271 deffirstchar`19272 getlastchar12relax9273

getlastchar and last character

9274 defgetlastchar12

THE TITLE LOGO Macros 223

9275 ifxrelax2relax9276 deflastchar`19277 else9278 expandaftergetlastchar9279 fi 29280

printbbss Loop over all characters of the string

9281 defprintbbss123relax9282 ifxrelax1relax9283 else9284 ifxrelax2relax9285 printbb19286 else9287 printbb129288 fi9289 expandafterprintbbss9290 fi 23relax9291

printbb Record the kern between the current and the following character then print the character kerning is a fontinstcommand

9292 setcommandprintbb129293 setbox0hboxkerning12xdefthekernnumberresult9294 showboxes1

This could be another application

9295 quad9296 w thescaletoemwidth19297 bb thescaletoembbleft19298 thescaletoembbright19299 thescaletoemnumbernumexprwidth1-bbright1relax9300 h height1bbtop1 bbbottom1depth1par9301

showboxes Print the boxes for char lang1rang This wonrsquot work if lang1rang isnrsquot also the PostScript name of the glyph (eg lsquocommarsquo = lsquorsquo)

9302 setcommandshowboxes19303 leavevmode9304 colortexcolor

We have to record the width of the glyph

9305 setbox0hboxcolortextcolor19306 globaltempdim=wd0relax9307 kern-fboxrulei

1 The TEX box Print a frame in color texcolor This frame shows the glyph as TEX sees it

9308 mtllayerTeX-boxes9309 hbox9310 lowerdimexpr dp0 + fboxruleirelax9311 hbox9312 vbox9313 hrule heightfboxrulei9314 hbox9315 vrule widthfboxrulei height dimexprht0 + 2fboxruleirelax9316 phantomunhcopy09317 vrule widthfboxrulei9318 9319 hrule heightfboxrulei9320

2 The character Now we step back and print the actual glyph We hold it back until now so that it will be printedon top of its box

9321 kern-wd09322 mtllayercharactershboxbox0

Step back by the amount that the characterrsquos bounding box differs from the TEX box on the left side

9323 kerndimexprscaletoembbleft1-tempdim-fboxruleiirelax

THE TITLE LOGO Macros 224

3 The bounding box will be printed in color bbcolor

9324 mtllayerbounding-boxes9325 colorbbcolor9326 hbox9327 lowerdimexpr-scaletoembbbottom1+fboxruleiirelax9328 hbox9329 vbox9330 hrule heightfboxruleii9331 hbox to dimexprscaletoemnumexpr9332 bbright1-bbleft1relax+2fboxruleiirelax9333 vrule height dimexprscaletoemnumexpr9334 bbtop1-bbbottom1relax9335 widthfboxruleii9336 hfill9337 vrule widthfboxruleii9338 hrule heightfboxruleii9339 9340 kern-dimexprfboxruleii+fboxruleirelax9341

4 The kern We also print a small box in color kerncolor indicating the kerning between the current and the nextcharacter filled for negative kerns empty for positive kerns

9342 kernscaletoemnumexprwidth1-bbright1relax9343 mtllayerTeX-boxes9344 ifnumthekernlt09345 colorkerncolor9346 kernscaletoemthekern9347 lowerkernboxheighthboxvrule width -dimexprscaletoemthekernrelax9348 height kernboxheight9349 kernscaletoemthekern9350 else9351 colortexcolor9352 ifnumthekern=0 else9353 lowerkernboxheight9354 hbox9355 vbox9356 hrule heightfboxrulei9357 hbox9358 vrule height kernboxheight widthfboxrulei9359 kerndimexprscaletoemthekern-2fboxruleirelax9360 vrule widthfboxrulei9361 9362 hrule heightfboxrulei9363 fi9364 fi9365 9366 9367 kern-fboxrulei9368

9369 newboxlogobox9370 defprintlogo9371 setboxlogobox=hboxvbox9372 MakePercentComment

This is the Kepler MM font used in the logo

9373 deflogofontpkpri9e109374 transformfontlogofontreencodefont8rfromafmpkpmmri8a109375 fontthelogofont=logofontspace at 82pt

This would load the italic Palatino font instead

9376 deflogofontpplri9377 transformfontlogofont8rreencodefont8rfromafmlogofont8a9378 edeflogofontlogofont8r9379 fontthelogofont=logofontspace at 78pt

Load the font

THE TITLE LOGO Macros 225

9380 thelogofont

Protrusion values (overdone for didactic reasons)

9381 lpcodefont`M=969382 rpcodefont`e=46

Now we can generate the logo

9383 pdfliteral directSXS gs9384 showlogoMicrotype9385 rlapnormalfontnormalsizeraisebox55ptfootnotemark[1]9386 kern5pt[3baselineskip]9387 longdefmakefntext19388 leftskip 0pt9389 parindent 0pt9390 everyparparindent 0pt9391 leavevmodehbox to 15ptthefnmarkhss19392 footnotetext[1]This graphic display on a9393 togglelayercanvascanvas the togglelayercharacterscharacters9394 their togglelayerbounding-boxesbounding boxes9395 and togglelayerTeX-boxesTeX boxes9396 9397 edeflogodimenswidth thewdlogobox height thehtlogobox depth thedplogobox9398 immediatepdfobjltltTypeExtGState CA 06 ca 06 BMNormal gtgt9399 immediatepdfxform9400 attr Group ltltTypeGroup STransparency I true CSDeviceRGB gtgt9401 resources Properties ltltmtlresourcesgtgt9402 ExtGState ltlt SXS thepdflastobjspace 0 R gtgt 9403 logobox9404 vskip-25baselineskip9405 leavevmode9406 togglelayercharacters9407 pdfrefxformpdflastxform9408 9409 pdfannotlogodimens9410 SubtypeWidget FTBtn T(Logo)9411 F 4 why did I say this9412 AP ltlt N thepdflastxformspace 0 R gtgt9413 AA ltlt E ltlt SSetOCGState State[Toggle mtlcharacters] gtgt9414 X ltlt SSetOCGState State[Toggle mtlcharacters] gtgt9415 D ltlt SSetOCGState State[Toggle csname mtlbounding-boxesendcsname] gtgt9416 U ltlt SSetOCGState State[Toggle csname mtlTeX-boxesendcsname] gtgt9417 gtgt 9418 vspace3baselineskip9419

Our font

9420 pdfmapline+pkpmmri8r10 KeplMM-It_385_575_10_ TeXBase1Encoding ReEncodeFont lt8renc ltpkpmmri8a10pfb

Define colours (thered and thegreen are copied from microtypedtx)

9421 defmtdefinecolors9422 definecolortheredrgb0650040079423 definecolorthegreenrgb0060440089424 colorlettexcolorthegreen50 TeX boxes9425 colorletkerncolortexcolor negative kerns9426 colorletbbcolorthered50 bounding box9427 colorletbgcolorblack8 canvas9428 colorletblcolorblack50 baseline9429 colorlettextcolorblack40 text9430

Use with microtypedtx

9431 ifxdocumentclasstwoclasseserror9432 usepackage[xcdraw]xcolor9433 mtdefinecolors9434 else

THE LETTERSPACING ILLUSTRATION Document 226

A2 DocumentNow we can start the document

9435 documentclass[10pta4paper]ltxdoc9436 providecommandMakePercentCommentrelax9437 expandafterdefcsname vermicrotypedtxendcsname29999999

Re-use the preamble from microtypedtx

9438 usepackagemicrotype-doc9439 usepackageattachfile9440 makeatletter9441 pdfcatalogOCProperties ltlt OCGs [mtobjects] D ltlt Order [mtorder] gtgt gtgt9442 makeatother9443 begindocument

You are currently reading this

9444 DocInputmicrotype-logodtx9445 newpage9446 And here it is9447 vfill9448 begincenter9449 printlogo null9450 endcenter9451 vfill9452 expandafterenddocument9453 fi

Thatrsquos it

9454 langlogorang

B The letterspacing illustrationThis is microtype-lssampledtx You may treat this file in three different ways

bull compile it by itself

bull input it in the body of a dtx file

bull input it in the preamble it then provides the commands

ndash lssample prints the letterspacing illustration

ndash anchorarrow anchors an arrow for layer lang1rangndash showarrow toggles layer lang1rang or lang2rang and prints lang2rang

The first two cases require the style file microtype-docsty which can be generated from microtypeins with

makefilemicrotype-docstydocsty

9455 ifxlssampleundefined9456 langlssamplerang

Upon popular request herersquos how Irsquove created the letterspacing illustration32

B1 MacrosRule width and image height and depth

9457 makeatletter9458 newdimenlsamount9459 newdimenlsrule9460 lsrule=02pt9461 deflsheight8pt9462 deflsdepth12pt

32 Note that the lssample module will not be created when installing microtype Instead the source filemicrotype-lssampledtx is included as an attachment in the PDF file If your PDF reader supports this you can

to extract it alternatively you may use the pdftk tool

ProvidesFilemicrotype-lssampledtx[20090608] ^^A dont count the backslashes in this documentmakeatletterletorigstepchecksumstepchecksumletstepchecksumrelaxmakeatother sectionThe letterspacing illustration labelsecletterspace-ill^^Aiffalse meta-comment ^^A ======================================================================== This is filemicrotype-lssampledtx You may treat this file in three different waysbeginitemize item compile it by itself item verb|input| it in the body of a filedtx file item verb|input| it in the preamble it then provides the commands beginitemize item verb|lssample| prints the letterspacing illustration item verb|anchorarrow| anchors an arrow for layer meta1 item verb|showarrow| toggles layer meta1 or meta2 and prints meta2 enditemizeenditemize The first two cases require the style file filemicrotype-docsty which can be generated from filemicrotypeins withbeginverbatimmakefilemicrotype-docstydocstyendverbatim ^^A ========================================================================^^Afi beginmacrocodeifxlssampleundefinedltlssamplegt endmacrocode Upon popular request heres how Ive created the letterspacing illustrationfootnote Note that the |lssample| module will not be created when installing microtype Instead the source file filemicrotype-lssampledtx is included as an attachment in the acronymPDF file If your acronymPDF reader supports this you can textattachfile [color=002 004 048mimetype=textplain]microtype-lssampledtx click here to extract it alternatively you may use the |pdftk| tool subsectionMacros Rule width and image height and depth beginmacrocodemakeatletternewdimenlsamountnewdimenlsrulelsrule=02ptdeflsheight8ptdeflsdepth12pt endmacrocode Our font (Adobe Caslon) beginmacrocodedeflsfontfontfamilypacaselectfont endmacrocode Loop over all letters in meta2 letterspacing them by meta1 beginmacrocodedefdols12lsamount=1relax dolss2enddolsdefdolss12enddols ifxempty2emptydividelsamount 2fi ls1 ifxempty2emptyelse dolss2enddols fi endmacrocode One pkgtikz picture for each letter beginmacrocodedefls1 begintikzpicture[remember pictureline width=lsrule] tikzstyleevery node=[inner sep=0pt] endmacrocode The bounding box beginmacrocode mtslayerstuff node[draw=thegrey fill=theshade outer sep=lsrule anchor=base font=lsfont]phantom1 endmacrocode The letter beginmacrocode node[anchor=basefont=lsfont](1)1 endmacrocode Two auxiliary coordinates beginmacrocode path (1south west) ++(+5lsrule-5lsrule) coordinate (1L) path (1base east) ++(-5lsrule-lsdepth) coordinate (1R) mtslayerstuff endmacrocode Now draw the normal character width beginmacrocode draw[color=thered75 fill=thered30 outer sep=lsrule] (1L) rectangle (1R) ifdimlsamountgt0pt path (1base east) ++(+5lsamount-6pt) coordinate (1_ls) path (1R) ++(lsamount+lsrule+lsdepth) coordinate (1E) endmacrocode and the letter space beginmacrocode draw[color=thered fill=thered50 outer sep=lsrule] (1R) ++(+lsrule+0pt) rectangle (1E) fi endtikzpicture ignorespaces endmacrocode Draw the interword space beginmacrocodedeflssp1234 begintikzpicture[remember pictureline width=lsruleinner sep=0pt] mtslayerstuff tikzstyleevery draw=[anchor=bottom] coordinate(1space) at (22lsdepth2) coordinate(1stretch) at (2+32+0pt) coordinate(1shrink) at (2-42+0pt) draw[color=thegreenfill=thegreen50use as bounding box] (00) rectangle ++(+2+lsdepth) draw[color=thegreenfill=thegreen30] (+2-lsrule) rectangle ++(+3-4pt+lsrule) draw[color=thegreenfill=thegreen50] (+2-lsrule) rectangle ++(-4-4pt+lsrule) draw[-gtline width=03ptshorten lt=05lsrulecolor=thegreen50] (+2-2pt-5lsrule) -- ++(+3+0pt) draw[-gtline width=03ptshorten lt=05lsrulecolor=thegreen30] (+2-2pt-5lsrule) -- ++(-4+0pt) endtikzpicture ignorespaces endmacrocode Layers beginmacrocodedefmtslayer12pdfliteral pageOC1 BDC2pdfliteral pageEMCdefmtsxlayer12pdfliteral pageOCstuff BDC OC1 BDC2pdfliteral pageEMC EMCifxmtobjectsundefinedletmtobjectsemptyfiifxmtorder undefinedletmtorder emptyfixdefmtordermtorder[(Sheep)letmtsresourcesemptydefmtsregister1 immediatepdfobjltlt TypeOCG Name(1) gtgt expandafterxdefcsname mts1endcsnamethepdflastobjspace 0 R xdefmtobjectsmtobjectscsname mts1endcsname xdefmtordermtordercsname mts1endcsname xdefmtsresourcesmtsresources1 csname mts1endcsnamemtsregisterstuffmtsregistertrackingmtsregisterispacemtsregisterospacemtsregisteristretchmtsregisterishrinkmtsregisterostretchmtsregisteroshrinkmtsregisterokernmtsregisterligaturemtsregister_compatibilityxdefmtordermtorder] endmacrocode Anchor point for the arrow in the code beginmacrocodenewcommandanchorarrow[1] tikz[remember pictureoverlay]node(1_c) endmacrocode Add an arrow from code to image beginmacrocodenewcommandaddarrow[5][left] tikz[remember pictureoverlaybend angle=14looseness=075gt=latex] mtsxlayer3draw[-gtthickcolor=the2](4) to[bend 1] (5) endmacrocode Toggle layer beginmacrocodedeftogglelayer123 pdfstartlink userSubtypeLink BS ltlt TypeBorderW 0 gtgt HO BS ltlt TypeBorderW 1 SD D[4 1] gtgt C[07 07 07] HO Contents(Click to Toggle) A ltlt SSetOCGState State[Toggle csname mts1endcsname] gtgt rlap2 fboxsep=0pt fboxrule=0pt mtsxlayerstuff rlapfcolorboxwhitewhitevphantomkgcolorthe32 mtsxlayer1 fcolorboxwhitethe350vphantomkgcolorwhite2 pdfendlinknewcommandshowarrow[2][] ifxrelax1relaxdeftempa2elsedeftempa1fi togglelayertempaitshape 2 endmacrocode The environment for our illustration beginmacrocodedeflssample1 parskip 4pt parindent 0pt par vskip4pt leftskip 15pt mtpseudomargcolortheblueClick on the image to show the kerns and spacings involved Click on emphasised words in the text below to reveal the relation of image and codestrut mtlayer_compatibility mtplacerlaphskip-marginparwidth colorwhite vrule widthdimexprhsize+marginparwidthrelax heightmtunvdimen mtpseudomargcolorthered If you had a acronymPDF viewer that understands acronymPDFsmaller15 you could hide the arrows selectively vskip-mtunvdimen vskip-4pt setlengthfboxsep4pt leavevmode pdfstartlink userSubtypeLink BS ltlt TypeBorderW 0 gtgt HO A ltlt SSetOCGState State[Toggle mtsstuff] gtgt fcolorboxtheframetheshade fontsize3438selectfont 1 pdfendlink parmedskip edefxpdfpageresourcesProperties ltltmtsresourcesgtgtx endmacrocode Now define the illustration to be used in the document beginmacrocodedeflssample lssample dols0ptStop lsspo045em025em015em dols016emstealinghskip-dimexpr 008em+lsrulerelax lsspi1382pt465pt208pt dols016emsheep dols0pt endmacrocode Dont forget to add the arrows beginmacrocode vspace-baselineskip addarrowred trackinglsamount_ceasta_ls addarrowred okern okernend_ceastp_ls addarrowgreen ospace ospace_ceast ospace addarrowgreen ispace ispace_ccenterispace addarrowgreen75 istretchistretch_ceastistretchnorth addarrowgreen75 ishrink ishrink_cwest ishrinknorth addarrowgreen75 ostretchostretch_ceastostretchnorth addarrowgreen75 oshrink oshrink_ceast oshrinknorth addarrow[right]greyligaturenolig_ceast stcenterfi endmacrocode This is for use with filemicrotypedtx beginmacrocodeifxdocumentclasstwoclasseserror usepackagetikzelse endmacrocodesubsectionDocument beginmacrocodedocumentclass[10pta4paper]ltxdocexpandafterdefcsname vermicrotypedtxendcsname29999999 endmacrocode Re-use the preamble from filemicrotypedtx beginmacrocodeusepackagemicrotype-docusepackageattachfileusepackagetikzmakeatletterpdfcatalogOCProperties ltlt OCGs [mtobjects] D ltlt Order [mtorder] BaseStateOFF gtgt gtgt makeatotherbegindocument endmacrocode You are currently reading this beginmacrocodeDocInputmicrotype-lssampledtx endmacrocode Now show what we are able to do beginmacrocodenoindent Since a picture is worth a thousand words probably even more if in our case it depicts a couple of letterspaced words lets bring one to sum up these somewhat confusing options Suppose you had the following settings (which I would in no way recommend they are only for illustrative purposes)beginverbatimSetTracking [ no ligatures = anchorarrownoligf spacing = 60anchorarrowispace0 -1anchorarrowistretch00 anchorarrowishrink outer spacing = 4anchorarrowospace50 2anchorarrowostretch501anchorarrowoshrink50 outer kerning = anchorarrowokernbegin anchorarrowokernend ] encoding = 1anchorarrowlsamount60 endverbatim and then writebeginverbatimStop textlsstealing sheependverbatim this is the (typographically dubious) outcome lssamplenoindent While the word `Stop is not letterspaced the space between the letters in the other two words is expanded by the showarrow[tracking]tracking~amountred of 1601000em=allowbreak016em The showarrow[ispace]inner~spacegreen within the letterspaced text is increased by 60 while its showarrow[istretch]stretchgreen amount is decreased by 10 and the showarrow[ishrink]shrinkgreen amount is left untouched The showarrow[ospace]outer~spacegreen (of 045em) immediately before the piece of text may showarrow[ostretch]stretchgreen by 025em and showarrow[oshrink]shrinkgreen by 015em Note that there is no outer space after the text since the exclamation mark immediately follows instead the default showarrow[okern]outer~kernred of half the letterspace amount (008em) is added Furthermore one showarrowligaturegrey wasnt broken up because we neglected to specify the `|s| in the |no ligatures| keyexpandafterenddocumentfi endmacrocode^^A resume counting backslashesmakeatletterletstepchecksumorigstepchecksum^^Amakeatother beginmacrocodeltlssamplegt endmacrocodenewpageendinput

THE LETTERSPACING ILLUSTRATION Macros 227

Our font (Adobe Caslon)

9463 deflsfontfontfamilypacaselectfont

Loop over all letters in lang2rang letterspacing them by lang1rang9464 defdols12lsamount=1relax dolss2enddols9465 defdolss12enddols9466 ifxempty2emptydividelsamount 2fi9467 ls19468 ifxempty2emptyelse dolss2enddols fi9469

One tikz picture for each letter

9470 defls19471 begintikzpicture[remember pictureline width=lsrule]9472 tikzstyleevery node=[inner sep=0pt]

The bounding box

9473 mtslayerstuff9474 node[draw=thegrey9475 fill=theshade9476 outer sep=lsrule9477 anchor=base9478 font=lsfont]phantom19479

The letter

9480 node[anchor=basefont=lsfont](1)1

Two auxiliary coordinates

9481 path (1south west) ++(+5lsrule-5lsrule) coordinate (1L)9482 path (1base east) ++(-5lsrule-lsdepth) coordinate (1R)9483 mtslayerstuff

Now draw the normal character width

9484 draw[color=thered759485 fill=thered309486 outer sep=lsrule]9487 (1L) rectangle (1R)9488 ifdimlsamountgt0pt9489 path (1base east) ++(+5lsamount-6pt) coordinate (1_ls)9490 path (1R) ++(lsamount+lsrule+lsdepth) coordinate (1E)

and the letter space

9491 draw[color=thered9492 fill=thered509493 outer sep=lsrule]9494 (1R) ++(+lsrule+0pt) rectangle (1E)9495 fi9496 9497 endtikzpicture9498 ignorespaces9499

Draw the interword space

9500 deflssp12349501 begintikzpicture[remember pictureline width=lsruleinner sep=0pt]9502 mtslayerstuff9503 tikzstyleevery draw=[anchor=bottom]9504 coordinate(1space) at (22lsdepth2)9505 coordinate(1stretch) at (2+32+0pt)9506 coordinate(1shrink) at (2-42+0pt)9507 draw[color=thegreenfill=thegreen50use as bounding box]9508 (00) rectangle ++(+2+lsdepth)9509 draw[color=thegreenfill=thegreen30]9510 (+2-lsrule) rectangle ++(+3-4pt+lsrule)9511 draw[color=thegreenfill=thegreen50]9512 (+2-lsrule) rectangle ++(-4-4pt+lsrule)9513 draw[-gtline width=03ptshorten lt=05lsrulecolor=thegreen50]

THE LETTERSPACING ILLUSTRATION Macros 228

9514 (+2-2pt-5lsrule) -- ++(+3+0pt)9515 draw[-gtline width=03ptshorten lt=05lsrulecolor=thegreen30]9516 (+2-2pt-5lsrule) -- ++(-4+0pt)9517 9518 endtikzpicture9519 ignorespaces9520

Layers

9521 defmtslayer12pdfliteral pageOC1 BDC2pdfliteral pageEMC9522 defmtsxlayer12pdfliteral pageOCstuff BDC OC1 BDC2pdfliteral pageEMC EMC9523 ifxmtobjectsundefinedletmtobjectsemptyfi9524 ifxmtorder undefinedletmtorder emptyfi9525 xdefmtordermtorder[(Sheep)9526 letmtsresourcesempty9527 defmtsregister19528 immediatepdfobjltlt TypeOCG Name(1) gtgt9529 expandafterxdefcsname mts1endcsnamethepdflastobjspace 0 R 9530 xdefmtobjectsmtobjectscsname mts1endcsname9531 xdefmtordermtordercsname mts1endcsname9532 xdefmtsresourcesmtsresources1 csname mts1endcsname9533 mtsregisterstuff9534 mtsregistertracking9535 mtsregisterispace9536 mtsregisterospace9537 mtsregisteristretch9538 mtsregisterishrink9539 mtsregisterostretch9540 mtsregisteroshrink9541 mtsregisterokern9542 mtsregisterligature9543 mtsregister_compatibility9544 xdefmtordermtorder]

Anchor point for the arrow in the code

9545 newcommandanchorarrow[1]9546 tikz[remember pictureoverlay]node(1_c)

Add an arrow from code to image

9547 newcommandaddarrow[5][left]9548 tikz[remember pictureoverlaybend angle=14looseness=075gt=latex]9549 mtsxlayer3draw[-gtthickcolor=the2](4) to[bend 1] (5)9550

Toggle layer

9551 deftogglelayer1239552 pdfstartlink9553 userSubtypeLink9554 BS ltlt TypeBorderW 0 gtgt HO9555 BS ltlt TypeBorderW 1 SD D[4 1] gtgt9556 C[07 07 07] HO9557 Contents(Click to Toggle)9558 A ltlt SSetOCGState9559 State[Toggle csname mts1endcsname] gtgt 9560 rlap29561 fboxsep=0pt fboxrule=0pt9562 mtsxlayerstuff9563 rlapfcolorboxwhitewhitevphantomkgcolorthe329564 mtsxlayer19565 fcolorboxwhitethe350vphantomkgcolorwhite29566 9567 pdfendlink9568 9569 newcommandshowarrow[2][]9570 ifxrelax1relaxdeftempa2elsedeftempa1fi9571 togglelayertempaitshape 2

THE LETTERSPACING ILLUSTRATION Document 229

The environment for our illustration

9572 deflssample19573 parskip 4pt parindent 0pt9574 par9575 vskip4pt9576 leftskip 15pt9577 mtpseudomargcolortheblueClick on the image to show the kerns9578 and spacings involved Click on emphasised words in the text below9579 to reveal the relation of image and codestrut9580 mtlayer_compatibility9581 mtplacerlaphskip-marginparwidth colorwhite9582 vrule widthdimexprhsize+marginparwidthrelax heightmtunvdimen9583 mtpseudomargcolorthered9584 If you had a acronymPDF viewer that understands9585 acronymPDFsmaller15 you could hide the arrows selectively9586 vskip-mtunvdimen9587 vskip-4pt9588 setlengthfboxsep4pt9589 leavevmode9590 pdfstartlink9591 userSubtypeLink9592 BS ltlt TypeBorderW 0 gtgt HO9593 A ltlt SSetOCGState9594 State[Toggle mtsstuff] gtgt 9595 fcolorboxtheframetheshade9596 fontsize3438selectfont 19597 pdfendlink9598 parmedskip9599 9600 edefxpdfpageresourcesProperties ltltmtsresourcesgtgtx9601

Now define the illustration to be used in the document

9602 deflssample9603 lssample9604 dols0ptStop9605 lsspo045em025em015em9606 dols016emstealinghskip-dimexpr 008em+lsrulerelax9607 lsspi1382pt465pt208pt9608 dols016emsheep9609 dols0pt9610

Donrsquot forget to add the arrows

9611 vspace-baselineskip9612 addarrowred trackinglsamount_ceasta_ls9613 addarrowred okern okernend_ceastp_ls9614 addarrowgreen ospace ospace_ceast ospace9615 addarrowgreen ispace ispace_ccenterispace9616 addarrowgreen75 istretchistretch_ceastistretchnorth9617 addarrowgreen75 ishrink ishrink_cwest ishrinknorth9618 addarrowgreen75 ostretchostretch_ceastostretchnorth9619 addarrowgreen75 oshrink oshrink_ceast oshrinknorth9620 addarrow[right]greyligaturenolig_ceast stcenter9621 9622 fi

This is for use with microtypedtx

9623 ifxdocumentclasstwoclasseserror9624 usepackagetikz9625 else

B2 Document9626 documentclass[10pta4paper]ltxdoc9627 expandafterdefcsname vermicrotypedtxendcsname29999999

THE LETTERSPACING ILLUSTRATION Document 230

Re-use the preamble from microtypedtx9628 usepackagemicrotype-doc9629 usepackageattachfile9630 usepackagetikz9631 makeatletter9632 pdfcatalogOCProperties ltlt OCGs [mtobjects]9633 D ltlt Order [mtorder] BaseStateOFF gtgt gtgt 9634 makeatother9635 begindocument

You are currently reading this9636 DocInputmicrotype-lssampledtx

Now show what we are able to do9637 noindent9638 Since a picture is worth a thousand words probably even more if in our9639 case it depicts a couple of letterspaced words letrsquos bring one to sum up9640 these somewhat confusing options Suppose you had the following settings9641 (which I would in no way recommend they are only for illustrative purposes)9642 beginverbatim9643 SetTracking9644 [ no ligatures = anchorarrownoligf9645 spacing = 60anchorarrowispace09646 -1anchorarrowistretch00 anchorarrowishrink9647 outer spacing = 4anchorarrowospace509648 2anchorarrowostretch501anchorarrowoshrink509649 outer kerning = anchorarrowokernbegin9650 anchorarrowokernend ]9651 encoding = 9652 1anchorarrowlsamount60 9653 endverbatim9654 and then write9655 beginverbatim9656 Stop textlsstealing sheep9657 endverbatim9658 this is the (typographically dubious) outcome96599660 lssample96619662 noindent9663 While the word `Stoprsquo is not letterspaced the space between the letters in9664 the other two words is expanded by the showarrow[tracking]tracking~amountred9665 of 1601000em=allowbreak016em9666 The showarrow[ispace]inner~spacegreen within the letterspaced text is9667 increased by 60 while its showarrow[istretch]stretchgreen amount is9668 decreased by 10 and the showarrow[ishrink]shrinkgreen amount is left9669 untouched9670 The showarrow[ospace]outer~spacegreen (of 045em) immediately before the9671 piece of text may showarrow[ostretch]stretchgreen by 025em and9672 showarrow[oshrink]shrinkgreen by 015em9673 Note that there is no outer space after the text since the exclamation mark9674 immediately follows instead the default showarrow[okern]outer~kernred9675 of half the letterspace amount (008em) is added9676 Furthermore one showarrowligaturegrey wasnrsquot broken up because we9677 neglected to specify the `|s|rsquo in the |no ligatures| key96789679 expandafterenddocument9680 fi

9681 langlssamplerang

CHANGE HISTORY 231

C Change history

20040911 Version 10

General Initial version 1

20040921 Version 11

General configuration file names in lowercase (sug-gested by Harald Harders) 87

remove 8-bit characters from the configuration files(suggested by Harald Harders) 147

Protrusion add factors for some more characters 154settings for Adobe Minion (contributed by Harald

Harders) 155DeclareCharacterInheritance new command pos-

sibility to specify character inheritance 120MTdeclaresets remove spaces around set name 106MTfindfile fix also check whether the file for

the base font family has already been loaded 87MTgetbasefamily only remove suffixes lsquoxrsquo or lsquojrsquo 88MTgetlistname donrsquot check for empty attributes

list 89MTifempty fix use category code 12 for the percent

character (reported by Tom Kink) 45MTisnumber numbers may also be specified in

hexadecimal or octal (suggested by HaraldHarders) 94

MTpdftexno fix version check (reported by HaraldHarders) 40

MTpermute donrsquot use sets for empty encoding 121MTsetupexpansion issue an error instead of a

warning when pdfTEX version is too old forautoexpand 137

MTsplitcodes fix allow zero and negative values 63MTuseset remove spaces around set name 110

20041003 Version 12

Font aliases declare cmor as an alias of cmr 144Font sets new allmath and basicmath 143Protrusion add settings for Computer Modern Roman

and Adobe Garamond in TS1 encoding 178add settings for Computer Modern Roman math

symbols 183MTfamilyalias define alias font name as an altern-

ative not as a replacement 60MTgetbasefamily also remove lsquowrsquo (swash capit-

als) 88MTgethighlevel check whether defaults have

changed 106

MTgetinhlist fix set inheritance list globallyto empty 91

MTgetlistname alternatively check for alias fontname 89

MTgetsize additional magic to catch some errors 108MTgetsize hijack setfontsize instead of

setfontsize 108MTloop fix new macro used instead of loop 49MTmaybedo also check for alias font name 60MTpermute more sanity checks for

SetProtrusion and SetExpansion 123MTsetupfont also search for alias font file 57

fix call encupdate if necessary 57

20041027 Version 13

General fix specifying load option does no longerrequire to give a name too 116

Font aliases declare aer zer and hfor as aliases ofcmr 144

MTfixcatcode check some category codes (com-patibility with german) 35

MTloadlist check whether list exists 87

20041112 Version 14

General check for pdfcprot 54donrsquot use scratch registers in global definitions 91use pickupfont instead of definenewfont as

the hook for MTsetupfont 100use one instead of five counters 50

Protrusion tweak quote characters for cmr variants

(OT1 T1 lmr) 160microtypesetup fix set the correct levels and re-

member them warning when enabling an optiondisabled in package options 131

SetExpansion fix specifying extra options does nolonger require to give a name too 113

20041117 Version 14a

General new option final 128MTcfgcatcodes fix reset some more catcodes

when reading files (reported by Michael Hoppe) 88

CHANGE HISTORY 232

20041126 Version 14b

General fix set catcodes before reading global con-figuration file (reported by Christoph Bier) 130

optimisation use less expandafters and csnames 44Protrusion harmonise dashes in upshape and italic

(cmr pad ppl) 154slanted like italics 163

MTchecklistfamily fix donrsquot try alias familyname if encoding failed 61

MTgetbasefamily fix failed for font names of the

form abczz (reported by Georg Verweyen) 88MTgetslot donrsquot define MTchar globally (save

stack problem) 91MTifdimen donrsquot set MTcount globally (save stack

problem) 46MTsetupPDF new message if pdfoutput is

changed 134MTuseset donrsquot use undeclared font sets 110

20041215 Version 15

General defaults step 4 (suggested by Hagraven ThecircThagravenh) 128

new option selected by default false (suggestedby Hagraven Thecirc Thagravenh) 126

Documentation add lsquoShort historyrsquo 30Inheritance remove ss from T1 list add DJ 148Protrusion settings for Bitstream Charter 155DeclareMicrotypeAlias remove spaces around ar-

guments 111MTcfgcatcodes reset catcode of lsquo=rsquo (compatibility

with Turkish babel) 88MTfixcatcode reset catcode of lsquoˆrsquo (compatibility

with chemsym) 35

MTgethighlevel donrsquot test defaults if called afterbegin document 106

MTscalefactor warning for factors outside limits 66MTscaletoem donrsquot use lpcode and rpcode for

the calculation 64MTsetexcodes allow non-selected font expan-

sion 70MTsetprcodes adjust protrusion factors before

setting the inheriting characters 62MTsetupexpansion defaults calculate step as

min(stretchshrink)5 136defaults turn off expansion for DVI output 135disable automatic expansion for DVI output 136

20050124 Version 16

General defaults turn off expansion for old pdfTEXversions 129

load a font if none is selected 56new option factor by default 1000 128restructure dtx file 143test whether pickupfont has changed 102test whether numeric options receive a number 128use e-TEXrsquos ifcsname and ifdefined if defined 44

Protrusion add italic uppercase Greek letters 163improve settings for numbers (pointed out by Peter

Muthesius) 156

tune CMR math letters (OML encoding) 183MTgetcharwd use e-TEXrsquos fontcharwd if available 65MTgetinhlist correct message if selected is

false 91MTsetexcodes introduce factor option 70MTsetprcodes introduce factor option 62MTsetupexpansion disable automatic expansion

for old pdfTEX versions 137MTuseset retain current set if new set is un-

declared 110MTvinfo new macro instead of ifMTverbose 36

20050202 Version 16a

Documentation add table of fonts with tailored pro-trusion settings 21

MTgetslot completely redone hopefully morerobust (compatible with frenchpro problem

reported by Bernard Gaulle) 91MTpdftexno new macro 39MTresetefcodes only reset efcodes for older

pdfTEX versions 70

20050323 Version 17

General allow specification of size ranges (suggestedby Andreas Buumlhmann) 107

disallow automatic expansion if pdfTEX too old 119fix remove space after autoexpand 119new value for verbose option errors 128shorter command names 51warning when running in draft mode 134

Documentation add hint about compatibility 26remove table of match order (now table 4 on

page 89) 12Protrusion fix remove from OT1 add

textbackslash to T1 encoding 158LoadMicrotypeFile new command (suggested by

Andreas Buumlhmann) 112MicrotypeHook new command for font package

authors 130microtypesetup fix warning also when setting to

(no)compatibility 131MTbegincatcodes also use inside configuration

commands 88MTcfgcatcodes reset catcode of lsquorsquo (compatibility

with french packages) 88

CHANGE HISTORY 233

MTDeclareMicrotypeAlias may also be used insideconfiguration files 112

MTgetlistname use tfor (Andreas Buumlhmannrsquosidea) 89

MTgetslot remove backslash hack 91test for chardefed commands 92test whether langencodingranglangrang is defined 92

MTiflistexists donrsquot define MT1cnameglobally here and elsewhere 90

MTifdimen comparison with 1 to allow size smallerthan 1 (suggested by Andreas Buumlhmann) 46

MTincrement use e-TEXrsquos numexpr if available 50MTiscomposite new macro construct command

for composite character no uncontrolled expan-sion 97

MTscale new macro use e-TEXrsquos numexpr if avail-able 51

MTsetexcodes two versions of this macro 70MTsplitname donrsquot define MTencoding ampc

globally 60MTtestast make it simpler 106MTtryorder always check for size too (suggested

by Andreas Buumlhmann) 89fix also check for langseriesranglangshaperang (reported by

Andreas Buumlhmann) 89MTwarncodetoolarge new macro type out max-

imum protrusion factor 66MTwarnerr new macro for verbose=errors 36showhyphens modify showhyphens 138

20050623 Version 18

General SetProtrusion new key unit 118if font substitution has occurred set up the substi-

tute font not the selected one 100new option config to load a different main config-

uration file 129new option unit by default character 129

Documentation add example for factor option 13add example of how to get rid of a widow (sugges-

ted by Adam Kucharczyk) 15add hint about error messages 27

Font aliases declare pxr and txr as aliases of pplresp ptm 145

Font sets add U encoding to allmath 143Inheritance remove DJ from T1 list (itrsquos the same as

DH) 148Protrusion add LY1 characters for Times 163

settings for AMS math fonts 187verified settings for slanted Computer Modern Ro-

man 171addaccent fix disable micro-typographic setup in-

side addaccent (reported by Stephan Hennig) 102DeclareMicrotypeAlias warning when overriding

an alias font 111DeclareMicrotypeSetDefault new command set

default font set 110MTcfgcatcodes reset catcodes of the remaining

ASCII characters 88MTcheckrlist made recursive 124MTcurrlistname new macro current list type

and name 98MTdeclaresets warning when redefining a set 106MTdefinesetkey use comma lists instead of

token lists 106

MTfindfile no longer wrap names in commands 87MTfixfontdimensix new macro test whether

fontdimen6 is defined 59MTgetcharwd warning for missing (resp zero-

width) characters 65MTgetlistname made recursive 89MTgetslot fix expand active characters 91

test whether langencodingranglangrang is defined made morerobust 92

MTgetunit new macro get unit for codes 67MTinrlist made recursive 49MTisactive new macro translate inputenc-

defined characters 95MTisletter warning for non-ASCII characters 94MTledmacsetup character protrusion with ledmac 53MTmapclistn new macro used instead of for 48MTmaptlistn new macro used instead of tfor 48MToldcmd renamed commands from

MicroType to Microtype 36MTpdftexno case 5 pdfTEX 130 40MTpermute add ranges to the beginning of

the lists 123MTscale fix remove spaces in e-TEX variant (repor-

ted by Mark Rossi) 51MTsetupfonthook restore and when

hyperref is loaded 54restore csquotesrsquos active characters 54restore percent character if Spanish babel is loaded 54

MTsplitcodes get character width once only 63MTuseset fix remove braces in first line 110MTxadd simplified 47

20051028 Version 19

General DeclareMicrotypeSet new key font 109SetProtrusion value lsquorelativersquo renamed to

lsquocharacterrsquo for key unit 118allow context-specific font setup 100compatibility with TEX Live hack (reported by Her-

bert Voszlig) 39disable microtype setup inside hyperrefrsquospdfstringdef (reported by Hagraven Thecirc Thagravenh) 55

fix use true as the default value 125option unit rename value relative to character 129

Documentation add hint about verbatim environ-ment 25

add remark about Type 1 fonts required for auto-matic font expansion 8

Font aliases declare qpl and qtm (qfonts TEX Gyre)as aliases of ppl resp ptm 145

Font sets add OT4 encoding to text sets 143add T5 encoding to text sets 143

Inheritance add list for OT4 149add list for T5 (requested by Hagraven Thecirc Thagravenh) 150

CHANGE HISTORY 234

Protrusion fix remove uppercase Greek letters fromT1 encoded CMR 158

settings for OT4 encoding (Computer Modern Ro-man Palatino Times) 154

settings for T5 encoded Computer Modern Roman 154DisableLigatures new command disable ligatures

(requires pdfTEX 130) 112microtypecontext new command change setup

context in the document 103MTchecklistfamily fix add two missing

expandafters 61MTdetokenizec fix the e-TEX version 45MTexptwon new macros less expandafters 44

MTgetopt new key lsquopresetrsquo to set all characters tothe specified value before loading the lists 67

MTisactive redone use setdisplayprotect 95MTisletter using catcode should be more effi-

cient than inspecting the meaning 94MTmaybedo redone 60MTremfromclist new macro remove an item

from a comma list 48MTscalefactor generalised 66MTsetupexpansion disable expansion if both step

and shrink are zero 137warning if user requested zero step 136

MTtoks use instead of toks 42SetProtrusion (et al) new key font 113

20051205 Version 19a

General lsquolangfile nameranglangline numberrangrsquo as default listname 116

new option defersetup by default true 127remove superfluous test whether pickupfont has

changed 102Documentation add explanation for error message

in DVI mode 27add explanation for error message with non-Type 1

fonts 28Font aliases declare mdbch (mathdesign) as an alias

of bch 146Protrusion fix remove lsquo_ rsquo from OT1 encoding 159

settings for T5 encoded Charter 154microtypesetup inside the preamble accepts all

package options 131MTcheckfontcx optimise context-sensitive setup 102MTdefinesetkey donrsquot expand variables imme-

diately (requested by Georg Verweyen) 106MTgethighlevel no longer check whether defaults

have changed 106MTifdefinedcT new macros true case only 45MTifint use pdfmatch if available 45MTifstreq use pdfstrcmp if available 47MTinclist fix 48MTinfomissingchar info instead of warning

(after Michael Hoppe reported that the lsquoflrsquo ligatureis missing in Palatino SC) 65

MTisfeature new macro check for pdfTEX fea-ture 51

MTmapclistn following LATEX3 48MTpermute donrsquot define permutations for

unused encodings 122MTremfromclist fix 48MTsetup defer setup until the end of the preamble 52

20060120 Version 19b

General compatibility with listings sanitise morecatcodes (reported by Holger Uhr) 55

compatibility with the extendedchar option of thelistings package 56

Documentation activate expansion in the distributedPDF 1

add samples of micro-typographic features 4MTfeatures use throughout the package to adjust

to beta-ness 51MTifdimen use pdfmatch if available 46MTwarncodetoolarge fix calculation with

present factor 66

20060202 Version 19c

Documentation add example of how to increase pro-trusion of footnote markers (suggested by GeorgVerweyen) 22

Protrusion settings for URW Garamond 155

MTdefinecodekeyfont fix context was ignored 116MTdefinecodekeysize fix embrace

MTtempsize in csname (bug introduced inv19b) 115

20060505 Version 19d

Font sets md instead of m series in basic sets 143add QX encoding to text sets 143

Inheritance add list for QX encoding (contributed byMaciej Eder) 149

Protrusion settings for QX encoding (contributed byMaciej Eder) 161

settings for Euro symbols (Adobe ITC marvosym) 194tweak AMS settings 187

DeclareCharacterInheritance fix empty context 120MTdetokenizen new macro use detokenize if

available 45MTgetexopt fix evaluate preset 71MTgetfontdimen warning for zero fontdimen 65MTgetopt optimise donrsquot reset when preset op-

tion is set 67set list name before presetting 67

CHANGE HISTORY 235

MTisactive support for Unicode (inputencutf8) 95MTsetupfonthook restore and when tex4ht

is loaded (reported by Peter Dyballa) 54SetProtrusion (et al) optimise unify keys for

mandatory argument 113

(et al) split keys of optional and mandatory argu-ment 113

20060728 Version 19e

General fix default value for activate true 126Documentation add hint about unknown encodings 26

include LPPL 249Font aliases declare zeur and zeus (eulervm) as

aliases of eur resp eus (euler) 146Inheritance adapt to marvosymrsquos changed encoding 151Protrusion complete settings for Euler Fraktur and

Script fonts 194fix forgotten comma in mt-mvscfg adapt tomarvosymrsquos changed encoding 194

settings for Euler Roman font 190DeclareCharacterInheritance new key lsquoinputencrsquo

to set the input encoding 120MTremfromclist model after removeelement 48MTsetup empty MTsetup after use (compatibil-

ity with the combine class) 52pickupfont no tracing with trace package 101SetExpansion new key inputenc 113SetProtrusion (et al) new key inputenc 113

20060909 Version 19f

Protrusion fix euler-vm did not load euler settings 191MTcurrlistname fix MessageBreak must not be

expanded 98MTgdefn new macros global variants 44MTgetinhlist fix input encoding must be set

after the inheritance list has been parsed 91MTglet new macro 44

MTresetcontext only reset context if it has actu-ally been changed 104

MTsetinhlist fix forgotten comma in the fea-tures list 120

MTsetnamedkeys new macro set name first sim-plify parsing of optional argument 115

SetProtrusion (et al) set catcodes before parsingoptional argument 113

20070114 Version 20

General compatibility with listings set catcode ofbackslash to zero (reported by Steven Bath) 56

compatibility with soul register textls andlsstyle 56

new option babel by default false (language-dependent setup suggested by Ulrich Dirr) 126

new option letterspace by default 100 128new package letterspace a stripped-down ver-

sion containing the letterspacing commandsonly 1

option lsquobabelrsquo fix switch off French babelrsquos short-hands properly (reported by Daniel Flipo) 142

option lsquobabelrsquo switch off Turkish babelrsquos short-hands 142

option lsquounitrsquo SetProtrusion deprecate valuelsquorelativersquo completely 118

Documentation add hint about how to increasefont_max and font_mem_size 28

add hint about warning when tracking and expan-sion is applied to a font 28

add remark about lsquodraftrsquo option disablingmicrotype (noted by Michalis Miatidis) 9

qualify hint about web documents with regard toolder pdfTEX versions 25

qualify hints about expansion error messages withregard to older pdfTEX versions 27

Font sets new footnotesize and scriptsize 143

new smallcaps 143DeclareMicrotypeBabelHook new command inter-

action with babel 113lsstyle fix font switches donrsquot pose a problem

anymore 79fix letterspacing commands may be nested 79new command letterspacing 79totally redone using the new letterspacefont 79

MTdeclaresets fix empty size list when redefin-ing set 106

MTissymbol made even more robust 96MTloadinputenc sanitise catcodes before loading

input encoding (problem with listings) 68MTpdftexno case 6 pdfTEX 140 40MTsetupnoligatures maybe disable

MTnoligatures after the preamble 141MTsplitname adjust to possible letterspacing 60SetExtraKerning new command additional kern-

ing 114SetExtraSpacing new command adjustment of

interword spacing 114SetTracking new command tracking 114textls new command letterspacing 84

starred version remove spaces around text 84tracingmicrotypeinpdf new debug method mark

all fonts with PDF annotations 37

CHANGE HISTORY 236

20070121 Version 21

General compatibility with pinyin disablemicrotype in pymacron (reported by Sven Nau-mann) 56

fix letterspace package forgot to load keyval 42lslig new command protect ligatures in letter-

spaced text 79

MTgetlsbasefont redone use pdfmatch tomake it bullet-proof 79

MTorigpickupfont compatibility with CJK alsocheck for its definition 100

textls fix use hmodebgroup 84

20070714 Version 22

General disable microtype if wordcount is loaded(reported by Ross Hetherington) 52

new option copyfonts 127simplify key declarations 116use catcode trickery for e-TEX test 38

Documentation add hint about error message withpdfTEX 140 27

add hint about extra TOC leader dot (first dis-covered by Morten Hoslashgholm) 25

add overview 5logo transparency and amusement 1

Font aliases declare chr (chmath) as an alias of bch(reported by Geoff Vallis) 146

declare fp9x fp9j (FPL Neu) as aliases of ppl[xj] 145Font sets default set for tracking smallcaps 144Inheritance remove lsquo-rsquorarr lsquo127rsquo 148Protrusion settings for Bitstream Letter Gothic 155Spacing add sample 195Tracking add ligatures that are to be disabled 152DeclareMicrotypeVariants new command 111DisableLigatures new optional argument disable

selected ligatures only 112lslig always defined 79MTchecklistfont fix construct font name from

characteristics 62MTcopyfont optionally work on copies of fonts 58MTgetbasefamily redone working on font names

and suffixes of arbitrary length 88MTgetcharwd subtract letterspacing amount from

width 65MTgetlsbasefont fix again remember base font

in a macro 79MTifdimen employ LuaTEX features if available 46MTifint employ LuaTEX features if available 45MTifstreq employ LuaTEX features if available 47

fix e-TEX version shouldnrsquot use x and y (foundby Wiebke Petersen) 47

MTiscomposite more robust expand exactly once 97MTissymbol expand once more (for frenchpro) 96MTlsfont use fontname not MTfont 75MTlua (basic) support for LuaTEX 41MTpdftexno case 7 pdfTEX 1404 40MTpresetauxspace generalised 69MTsetallpr (et al) allow empty values 63MTsetinputenc only load inputenc files if neces-

sary 68MTsettrcodes disable ligatures in letterspaced

fonts manually (due to change in pdfTEX 1404) 76possibility to customise interword spacing 76

MTsetupexpansion warning if stretch or shrinkarenrsquot multiples of step 137

MTsetupfont donrsquot call encupdate anymore 57only add features that are available with the re-

spective pdfTEX 57MTsetupfonthook restore percent character if

Galician babel is loaded 54MTtheprcodetr adjust protrusion of letter-

spaced fonts 63MTtracking remember fonts that shouldnrsquot be let-

terspaced 75MTtracking fix tracking couldnrsquot be re-enabled 75MTwarntrackingDVI warning when letterspacing

in DVI mode 140MTwithbabelandT also inspect class options 52pickupfont letterspace setup inside group 101SetTracking new key lsquono ligaturesrsquo to disable

ligatures of letterspaced fonts 114new keys lsquospacingrsquo and lsquoouter spacingrsquo to adjust

interword spacing (suggested by Steven E Har-ris) 114

third argument may be empty 114textmicrotypecontext new command wrapper

around microtypecontext 104

20071223 Version 23

General disable microtypecontext in hyperrefrsquospdfstringdef 55

fix really switch off Turkish shorthands 142new value for verbose option silent (suggested

by Karl Berry) 128turned some warnings into errors 128

Documentation add kerning sample 18add letterspacing illustration 17

dosubstcorrection remember substitute font forall times (reported by Stephan Hennig) 102

lslig redone extract outer kerns from currentletterspacing amount 79

microtypecontext made robust (reported byStephan Hennig) 103

MTbegincatcodes fix donrsquot disable KVspdef 88MTdefinesetkeyfont font single asterisk

means normal font 109MTinclist donrsquot use x (reported by Peter Meier) 48MTisactive support for extended Unicode

(inputencutf8x resp ucs) ndash experimental 95MTnoligatures fix set evaluation didnrsquot work (bug

introduced in v22) 85MTplain letterspace support for eplainminiltx 38MTsetcurros adjusting spaces made more reli-

able 77

CHANGE HISTORY 237

MTsettrcodes also adjust tracking if protrusion isnot enabled and even for letterspace (reportedby Stephan Hennig) 76

possibility to customise outer kerning (suggestedby Stephan Hennig) 76

MTSetTracking sanity check for value 114MTsetuptracking enable protrusion when track-

ing is enabled 139MTtrouterl only change pre outer space if it

contains shrink 81

20080229 Version 23a

General fix test for soul under plain TEX 56Documentation add hint about babel having to be

loaded first 27add table of available and enabled features 7mention soulutf8 30

Protrusion adjust LMR quotation marks again 160MTerrordoesntwork error messages if pdfTEX is

too old for extensions 140MTfixcatcode fix catcodes earlier and also for the

letterspace package 35MTgetkey fix key=val in class options list 134MTsetcodes generalised 63MTsetupfonthook restore percent character if

Mexican babel is loaded 54

20080604 Version 23b

MTexpgcs new macro reduce save stack size 44MTfontcopy enable font copies also with protru-

sion contexts (reported by Nathan Rosenblum) 58MTgetsize grouping 108MTnoligatures fix warning messages for un-

known slots 86MTorigpickupfont compatibility with CJKutf8

also check for its definition 100MTrequireslatex new macro 38MTsettrcodes fix protrusion adjustment only

for new fonts (reported by Wolfram Schaalo) 76MTtrouterl fix only in horizontal mode 81

make spaceskip-aware (ragged2e) 81MTtrouterr additional test for horizontal mode 82

20081111 Version 23c

General LuaTEX supported by default 40Documentation add hint about spacing being exper-

imental 26add hint about partial incompatibility with CJK 27

Inheritance add textcommabelow[STst] to QX en-

coding (reported by Vasile Gaburici) 150MTdetokenizec fix remove last space only (repor-

ted by Ulrich Dirr) 45MTtrouterr additional test for horizontal mode

(reported by Sveinung Heggen) 82

20090327 Version 23d

General fix pinyin compatibility check (reported bySilas S Brown) 56

move setup to the very end (for Colin Rourke) 142ifMTinannot use pdftexcmds for debugging 37lsstyle disable for LuaTEX 79

make invalid in math mode 79microtypesetup select font after setup 131MTcheckactiveset warning for missing default

sets 130MTlua update for LuaTEX 036 41MTsettrcodes allow zero tracking 75MTsettrzero fix allow switching off tracking

(reported by Ulrich Dirr) 80MTsetupexpansion default step 1 for pdfTEX

versions ge 140 136MTtrouterr donrsquot use x (reported by Ulrich

Dirr) 82fix donrsquot adjust in math mode (reported by Chris-

toph Bier) 82fix donrsquot adjust inside discretionary (reported by

Maverick Woo) 82MTtrsetokern allow empty value for outer

kerning 84textls make math mode aware 84

20091109 Version 23e

Documentation suggest to patch verbatim insteadof verbatim 26

Expansion settings for T2A encoding (contributed byKarl Karlsson) 153

Font sets sc instead of sc in smallcaps set 143add T2A encoding 143

Protrusion settings for T2A encoding (contributed byKarl Karlsson) 160

Spacing settings for T2A encoding (contributed by

Karl Karlsson) 197MTfixfontdimensix fix gobbling settings with

tracking failed (reported by Leo) 59MTsetup make space-unaware (requested by Mar-

cin Borkowski) 52MTtikzsetup compatibility with tikz (first repor-

ted by Christian Stark) 54MTtrouterr fix set current kerning and spacing

again (found by Lars Roumlnnbaumlck) 82

CHANGE HISTORY 238

20100110 Version 24

General new file microtypelua containing the luafunctions (contributed by Eacutelie Roux) 43

Protrusion settings for T2A encoded Minion (contrib-uted by Karl Karlsson) 160

20130313 Version 25

General allow contexts for LuaTEX 117disable lsquoDVIoutputrsquo option for XETEX 127fix check whether lsquolangfileranglanglinerangrsquo list name already

exists (reported by Till A Heilmann) 116letterspacing with LuaTEX 062 75new files microtype-pdftexdefmicrotype-xetexdef microtype-luatexdefcontaining engine-specific definitions 38

protrusion with XETEX 40restore space inside listings (reported by Rolf

Dieterich) 56Documentation add hint about LuaTEX compatibility 27

add hint about spacing and ragged2e 26add hint about dtx source code 28include microtype-logodtx andmicrotype-lssampledtx 221

Font aliases declare lmsy and lmm as aliases of cmsyresp cmm (reported by Jonas Hogstrom) 144

declare zgmx etc (garamondx) as aliases of ugm 146declare Latin Modern Roman (OpenType version)

as alias of lmr when fontspec is loaded 144declare TeX Gyre Pagella Asana Math Palatino LT

Std and Palatino as aliases of Palatino Linotype(OpenType version) 145

Font sets add EU1 and EU2 encodings 143Inheritance add rudimentary list for EU1 and EU2 151Protrusion add default lists for EU1 and EU2 159

improvements to Computer Modern Roman italics(contributed by Hendrik Vogt) 163

Tracking add EU2 encoding to default list 152DeclareCharacterInheritance allow more than

one encoding 120DeclareMicrotypeAlias ignore spaces 111ifMTnofamily info if settings are not family-specific

(suggested by Hagraven Thecirc Thagravenh) 62LoadMicrotypeFile remove all spaces in font name 112lsstyle fix ensure to set up math fonts (reported

by RazorXsr) 79

MTdefinecodekeyfamily compatibility withfontspec remove its internal counter (repor-ted by Till A Heilmann) 115

MTdefinecodekeyfont scrub fontspec featurecount (found by Meho R) 116

MTdofont adapt for LuaTEX 50adapt for XETEX 50

MTgetslot adapt for LuaTEX (requested by GeorgDuffner) 92

adapt for XETEX 92MTifouternext fix conflict with amsmath (repor-

ted by Scott Pakin) 82MTinfomissingchar fix error message for XETEX

(reported by Juan Acevedo) 65MTischarx compatibility with xunicode 97MTledmacsetup fix to work with XETEX (reported

by Maiumleul Rouquette) 53MTlssetls allow formulas in optional argument

to textls (fix by Heiko Oberdiek) 84MTmicrotypecontext fix ensure to set up math

fonts (reported by RazorXsr) 104MTregistersubstfont only register substituted

font if it isnrsquot registered already (reported byGeorge Gratzer and Josep Maria Font) 102

MTregistersubstfontcx only register if it isnrsquotregistered already 103

MTscrubfeatures compatibility with fontspecremove its internal counter 60

MTsetallpr fix remove space (found byMeho R) 63

MTsetprcodes make info about generic set-tings encoding-specific (reported by SebastianSchubert) 62

MTsetupspacing warning with ragged2e (reportedby Steffen Hoffmann) 139

MTsetupfont select font with fontspec (found byGeorg Duffner) 57

MTsetupfonthook restore and whenmathastext is loaded (found by Seamus Bradley) 54

20130523 Version 25a

General use luatexbase instead of luatextra (con-tributed by Eacutelie Roux) 43

Documentation add notes on typesetting the docu-mentation 28

include OpenType configuration files 201MTafteraftergroup fix get outer kerning and

spacing of nested letterspacing right 78MTgetslot adapt to luaotfload v22 (contrib-

uted by Eacutelie Roux) 93MTledunhboxline simplified 53MTledmacsetup support for eledmac 53MTlsouterk add marker for tightly nested letter-

spacing 85MTsettrcodes fix load font for fontspec 77MTxspace fix outer spacing problem with xspace

(reported by Dave) 83

20160501 Version 26

General load luaotfload with LuaTEX 43redefine MTsetupfonthook globally for problem

with tikzposter (reported by Sam Mason) 55

Documentation add hint about partial incompatibil-ity with xeCJK and luatexja 27

missing characters printed with Charis SIL 201

CHANGE HISTORY 239

suggest to use etoolbox to patch verbatim 26Font sets add TU encoding (notified by Will

Robertson) 143add si and scit to smallcaps set (reported by uli) 143new allmath-nott and alltext-nott (suggested

by Karl Berry) 143Inheritance add TU encoding 151Protrusion add TU encoding to lists 159Tracking add TU encoding to default list 152DeclareMicrotypeSet ignore spaces 105DeclareMicrotypeSetDefault ignore spaces 110DeclareMicrotypeVariants ignore spaces 111lsstyle fix ensure to set up math fonts (reported

by kleenstar) 79microtypecontext allow activate shortcut (repor-

ted by Karl Berry) 103MTdeclaresets fix undefine lists for redefining 106MTdofont speed up for LuaTEX 50MTengine fix test with LuaTEX 085 39MTgetslot fix could fail with XETEX (reported

by Christopher Schramm) 92

MTisxchar update for fontspecrsquos TU encoding 97MTledmacsetup support for reledmac 53MTluatexno update for LuaTEX 085 (renamed

primitives) 41MTnoligatures use luaotfload function to keep

inhibit ligatures 86MTorigpickupfont (in)compatibility with

luatexja disable unknown slots warnings (re-ported by Max) 100

(in)compatibility with xeCJK disable unknownslots warnings (reported by HcN) 100

compatibility with xeCJK pretend that CJK wasnrsquotloaded 100

MTsettrcodes use luaotfloadrsquos kernfactor fea-ture if available 76

MTxspace fix outer spacing problem with (notonly) algorithm (reported by Henning and Ron-nie Marksch) 83

UseMicrotypeSet ignore spaces 110

20160514 Version 26a

General fixes for letterspace package with LuaTEX 49MTdofont fix lua function (reported by Herbert

Voszlig) 50MTlsfontspecfont fix for value of plusmn1000 78

20170707 Version 27

General drop luatexbase with recent LATEX 43warning with minimal class 52

Documentation mention that additional kerning doesnot work in math mode (discovered by lsquoDanielrsquo) 18

Font aliases declare aliases for newpx 145declare aliases for newtx 145declare aliases for tempora 145declare aliases for XCharter 146declare Latin Modern Roman as alias of lmr with

new LATEX format (reported by Ulrike Fischer) 144Protrusion automatically choose correct names for

Charis SIL small caps (reported by lsquoltcomdatarsquo) 214lsstyle fix prevent infinite loop with psnfss and

exscale packages (reported by user11126 solu-tion by Ulrike Fischer) 79

MTcheckrange donrsquot warn for override if conflict-ing list is loaded 124

MTiscomposite compatibility with LATEX20170101 (DeclareUnicodeComposite) (re-ported by Ulrike Fischer and lsquojcrrsquo) 98

MTlsfontspecfont fix for lsquofilelangfontrangrsquo spec (re-ported by Reinhard Kotucha) 78

MTpermute donrsquot warn for override if con-flicting list is loaded 123

MTresetefcodes only reset efcodes for olderLuaTEX versions 70

MTsetupexpansion donrsquot disable automatic expan-sion for DVI output with LuaTEX 136

MTtikzsetup compatibility with tikz (again) 54MTwarntrackingDVI donrsquot warn for letterspacing

in DVI mode with LuaTEX 140

20180114 Version 27a

General disallow non-automatic expansion withLuaTEX 119

MTauto remove lsquoautoexpandrsquo for LuaTEX 106 (re-ported by Ulrike Fischer) 136

with LuaTEX non-automatic font expansion is nolonger possible (as confirmed by Hans Hagen) 136

MTgethighlevel test whether default isdefined 106

MTgetslot expand active characters earlier 91MTinfonotracking defer lsquoNo trackingrsquo message 61MTisactive compatibility with newunicodechar

(reported by Nils Anders Danielsson) 95

20190228 Version 27b

General update lua function microtypeinfo afterchanges in luaotfload (reported by Moritz Wem-heuer and Ulrike Fischer) 43

Documentation update hint about non-7-bit charac-ters (notified by Frank Mittelbach) 26

Inheritance add textquotedblleft ligature to OT4

(reported by Franz Wexler) 149MTinfomissingchar fix message for glyphs spe-

cified as names in XETEX (reported by Paolo Ney) 65MTsetupfont always select current font with XETEX

and LuaTEX (reported by Paolo Ney solution byUlrike Fischer) 57

CHANGE HISTORY 240

20191010 Version 27c

General turn warning into info when overwriting thekeepligature function (reported by Andy N) 86

MTisactive compatibility with LATEX 20191001 95

MTissymbol take care of removetlig 96showhyphens compatibility with LATEX 20191001

(reported by Phelype Oleinik and Falk Hanisch) 138

20191118 Version 27d

MTcopyfont in LuaTEX donrsquot use the copyfontprimitive but load the font anew (reported byPaolo Polesana and Oliver Kopp) 58

MTregistersubstfont remove substitute font

from list (reported by Markus Kohm) 102

MTregistersubstfontcx remove substitute fontfrom lists 103

20201207 Version 28

General letterspace works with e-TEX only 38compatibility with soul patch for font change

(reported by Md Ayquassar) 56fix for luatexbase 43

Documentation declare DVIoutput option deprec-ated 9

squash fake news about automatic font expansionwith dvilualatex 8

Font aliases declare aliases for step and domitian(notified by Daniel Benjamin Miller) 145

declare aliases for stix and stix2 fonts 145declare New Computer Modern as an alias of Latin

Modern Roman 145Font sets default set for expansion alltext-nott 144

default set for spacing alltext-nott 144

lsstyle fix enforce math setup again 79microtypecontext fix activate shortcut 103

ignore spaces 103MTdofont fix for XETEX 50

simplify lua function 50MTfixfontdimensix try to fix zero fontdimen6 59MTifluaotffont use lua function 49MTifstreq use XETEXrsquos stringcmp 47MTsetupexpansion warning when expanding in

DVI mode with LuaTEX (reported by Daniel Ben-jamin Miller) 135

MTtrsetspace simplified 81MTtrunit fix allow unit regardless whether

letterspacing is set 78textmicrotypecontext ignore spaces 104

20210222 Version 28a

General rename mt-padcfg to mt-EBGaramondcfg(requested by Karl Berry) 143

rename mt-PalatinoLinotypecfg tomt-Palatinocfg (requested by Karl Berry) 201

Documentation reorganise table 1 for clarification(suggested by Daniel Benjamin Miller) 7

Font aliases add -LF -TLF -OsF and -TOsF as vari-ants 144

declare mlmodern fonts as aliases of Latin Modern(reported by Daniel Benjamin Miller) 144

reference New Computer Modern also by file name(reported by Canageek) 145

Inheritance specify lsquoffrsquo ligature as Unicode instead ofglyph name 201

Protrusion hide euroitc settings (requested by KarlBerry) 194

Spacing add dummy settings (reported byDORpapst) 198

DeclareCharacterInheritance skip settings fortracking 120

MTgetsize compatibility with svjour3 (repor-ted by Ekkehart Schlicht (no relation)) 108

MTglet use LuaTEXrsquos glet if available 44

20210225 Version 28b

Inheritance dummy settings for the Font Awesomefont (mt-FontAwesomecfg) 205

settings for the Lato font (mt-Latocfg) (reportedby dsedivec) 205

20210314 Version 28c

ifMTfontspec add to hook for fontspec 54MTisoptchar fix for optionally defined glyphs

(reported by Frank Mittelbach) 96

MTremovetlig fix for text commands containingconditionals (reported by Frank Mittelbach) 97

INDEX 241

D IndexNumbers in upright shape refer to the page where the corresponding entry is described (bold face) resp occursNumbers in italics refer to the code line where the corresponding entry is defined (underlined) resp used

Options DVIoutput 9activate 6auto 7babel 9config 9draft 9expansion 6factor 7final 9kerning 6

letterspace 8protrusion 6selected 8shrink 8spacing 6step 8stretch 8tracking 6unit 7verbose 9

Commands DeclareCharacterInheritance 20DeclareMicrotypeAlias 21DeclareMicrotypeBabelHook 23DeclareMicrotypeSet 10DeclareMicrotypeSet 10DeclareMicrotypeSetDefault 12DeclareMicrotypeVariants 20DeclareMicrotypeVariants 20DisableLigatures 24LoadMicrotypeFile 22SetExpansion 14SetExtraKerning 18

SetExtraSpacing 19SetProtrusion 13SetTracking 15UseMicrotypeSet 12lslig 24lsstyle 23microtypecontext 22microtypesetup 9textls 24textls 23textmicrotypecontext 22

A a0poster (package) 108activate (option) 6 126 235addaccent 2961adjustspacing 196 4365ae (package) 21 144

algorithm (package) 239amsmath (package) 238amssymb (package) 187article (package) 22auto (option) 7 8 126

B babel (option) 9 23 27 32 126 235babel (package) 2 3 5 17 23 24 27

54 88 113 141 142 146 232 233 235ndash237

C chemsym (package) 232chmath (package) 21 146 236CJK (package) 27 56 100 236 237 239CJKutf8 (package) 100 237cm-super (package) 8color (package) 134combine (package) 142 235

config (option) 9 20 32 129 233contour (package) 134copyfonts (option) 58 126 127 236crop (package) 134csquotes (package) 29 54 158 233currfontshape 2905 2907 2909 2916 2959

D DeclareCharacterInheritance 20 41 3802DeclareMicrotypeAlias 21 43 71 3394DeclareMicrotypeBabelHook 23 45 64 3460DeclareMicrotypeSet 10 32 57 59 72 3093DeclareMicrotypeSet 10 3093DeclareMicrotypeSetDefault 12 34 61 3349DeclareMicrotypeVariants 20 42 58 63 3379DeclareMicrotypeVariants 20defersetup (option) 54 126 127 131 234

definenewfont 2898 2906 2910 2920DisableLigatures 24 40 62 3433dosubstcorrection 2958docstrip (package) 34domitian (package) 21 145 240draft (option) 9 126 128 235dsfont (package) 59DVIoutput (option) 9 126 127 238 240

E eco (package) 21 144efcode 1557 1583 1584 1625 1627eledmac (package) 53 238eplain (package) 24 31 34 38 52 134 236e-TEX (engine) 33 38 40 45

50 51 64 65 82 108 221 232ndash234 236 240etoolbox (package) 26 239eucal (package) 192eufrak (package) 194

euler (package) 98 190 235eulervm (package) 21 146 191 235euroitc (package) 194 240europs (package) 194eurosans (package) 194expandglyphsinfont 1539expansion (option) 6 11 125 126 135exscale (package) 239

INDEX 242

F ffamily 2912 2913fsize 1931 2905 2907 2909 2916 2959factor (option) 7 13 33 128 232fancyvrb (package) 26final (option) 9 33 126 128 231fix-cm (package) 59font 972 1048 1833 1981fontname 111 1020 1022 1024 1026

1027 1037 1038 1823 1831 1835 18391877 1883 1888 1891 1966 1981 19931995 2000 2002 2005 2008 2011 20462097 2234 2236 2898 2906 2915 29202940 2942 2944 2960 2974 2976 2996 3001

fontcharwd 1285 1289 1295fontdimen 1052 1053

1057 1058 1061 1320 1325 1425 14281852 1853 1883 1993 2039 2040 20472048 2055 2057 2063 2078 2097 2247 2250

fontinst (package) 198 221 223fontinstallationguide (package) 177fontname 1831 1835fontspec (package) 6 25 27 30

31 43 60 78 97 107 115 144 151 238ndash240fourier (package) 59french (package) 232frenchpro (package) 96 232 236

G garamondx (package) 21 146 238german (package) 35 231glbcurrsize 1969 3035

glbsettings 1970graphics (package) 134

H hfoldsty (package) 21 144 hyperref (package) 54 55 100 134 233 236

I IEEEtran (package) 100iffontchar

731 1331 2755 2765 2767 2834 2846 2847ifMTauto 304 4569 4630ifMTbabel 304 4716 4844ifMTdo 1087 1154 1791 2281ifMTdocument 345 3921ifMTdraft 304 4462ifMTexpansion 304 4518 4532 4627 4673ifMTfontspec 850 1067 3164 3584 3610ifMTif 303

869 876 899 931 2992 4028 4864 4867ifMTinannot 99ifMTinlist 624 669 777 807 992 1121

1138 1147 1165 1183 1789 2385 23962445 2494 2975 2986 2998 3063 3075 3416

ifMTkerning 304 4730 4857

ifMTnofamily 1193 1200ifMTnoligatures 304 4810ifMTnonselected 1519 2507 2515ifMTnorest 2576 2593 2606 2620 2681ifMToptauto 4039 4573 4605ifMToptDVI 4039 4487ifMToptexpansion 4039 4516 4674ifMTprotrusion 304 814 837 4499 4689ifMTselected 304 4613 4633ifMTspacing 304 4698 4715ifMTtracking 304 4685 4745ifMTxunicode 850 2781 2838ifpdf (package) 100 134iftracingmicrotypeinpdfall 105ignoreligaturesinfont 2285inputenc (package)

14 27 32 56 68 91 95 98 233 235 236

J jurabib (package) 100

K kerning (option) 6 11 31 126keyval (package) 42 63 147 236knaccode 1740 1741 1751 1754 1760

knbccode 1733 1734 1750 1753 1759knbscode 1655 1656 1679 1683 1689

L ledmac (package) 29 32 53 100 233ledpar (package) 29leftmarginkern 820letterspace (option) 8 17 24 32 45 75 128 235letterspace (package) 1 24 31 32

34 36 38 54 76 77 79 235ndash237 239 240letterspacefont 1839lineno (package) 53listings (package) 26 55 56 68 88 234 235 238lmodern (package) 8 160LoadMicrotypeFile 22 44 74 3412 4467lpcode 1222 1258 1259 1463 1466 1866

lslig 24 54 1986 1989lsstyle 23 51 922 946

1967 2173 2179 2184 2187 2197 2201 4470luaotfload (package)

27 30 43 50 70 76 86 93 238 239LuaTEX (engine) 1 4 6ndash9 12ndash16 20

23ndash25 27 29ndash31 34 37ndash41 43ndash45 50 5357 58 70 75ndash77 83 85 86 92 117 127133 135 136 140 144 147 151 159 236ndash240

luatexbase (package) 43 238ndash240luatexja (package) 27 100 238 239luatextra (package) 238

M marvosym (package) 21 32 34 151 194 234 235mathastext (package) 54 238mathdesign (package) 21 146 234memoir (package) 23 100MicrotypeHook 130 4296microtypecontext

22 47 920 3024 3043 4469 4827 4830microtypecontext (environment) 22microtypesetup 9 46 4300 4468MiKTEX (distribution) 28miniltx (package) 24 31 34 38 52 236minimal (package) 52 56 239

MinionPro (package) 107mlmodern (package) 21 144 240MTfont 406 995 1018 1057 1059 1321

1335 1803ndash1805 1807 1810 2448 2520 2945MTabbrex 753MTabbrexc 753MTabbrexinh 753MTabbrkn 753MTabbrknc 753MTabbrkninh 753MTabbrnl 753MTabbrpr 753

INDEX 243

MTabbrprc 753MTabbrprinh 753MTabbrsp 753MTabbrspc 753MTabbrspinh 753MTabbrtr 753MTabbrtrc 753MTactivefeatures

1029 2980 2983 2995 3008 3052 30623441 4500 4628 4686 4699 4731 4819 4820

MTaddtoannot 99MTaddtosetup 798

799 880 1438 2889 3025 3026 36713689 4153 4301 4461 4776 4818 4843 4876

MTadjustspacing 4361 4362 4629MTafteraftergroup 1895 1903 1912MTauto 1529 4568 4583 4593 4596 4600MTauto 1529 1552 1597MTautofalse 306 4581 4592MTautotrue 306 4255 4258 4608MTbabelfalse 313MTbabeltrue 313MTbegincatcodes

2386 2387 2427 3024 3028 30413094 3319 3350 3381 3395 3420 34363470 3486 3508 3529 3543 3808 4271 4272

MTcat 1434 2880 2882MTcfgcatcodes 933 1456 2412 2429MTchar 1247 1248 1258 1259

1264 1265 1268 1270 1285 1286 12891463ndash1467 1583 1584 1586 1587 1625ndash1627 1655 1656 1662 1663 1669 16701673 1674 1679ndash1684 1733 1734 17401741 1744 1745 1750ndash1754 2293 22942296 2549 2565 2573 2575 2585 25872595 2596 2601 2605 2606 2611 26132619 2621 2624 2628 2632 2636 27522755 2757 2759 2761 2825 2829 28342836 2839 2841 2847 3860ndash3862 3867ndash3869

MTchar 1291 1292 1295 13301331 2549 2556 2560 2565 2614 26852687 2693 2694 2696 2709 2710 27132714 2717 2718 2722 2724 2758 27602788 2791 2795 2801 2808 2810 2837 2854

MTcharstring 2562 2757 2773 2800MTcharxstring 2803 2841MTcheckactiveset

4282 4506 4646 4688 4708 4735MTcheckfont 991 2971 3054MTcheckfontcx 2981 3054MTcheckrange 3999 4001MTcheckrange 4001 4002MTcheckrlist 3948 3992MTcheckrlist 3992 3993MTcheckstep 4634MTchecklist 1095 1114 2278MTchecklistfamily 1132MTchecklistfont 1176MTchecklistsize 1160MTchecksetup 4312 4323 4330 4349 4385MTclearoptions 163 296 788 4244 4454MTclistbreak 596 1127 1155 1171 1185MTclistfunction 596MTcntencoding 3887 3895 3896MTcntfamily 3893 3902 3903

MTcntseries 3900 3909 3910MTcntshape 3907 3915 3916MTconfigfile 4260 4269 4270 4274 4275 4278MTcontext 2470 2482 2501 2528MTcopyfont 978

1014 3667 3673 3685 3692 4162 4164 4490MTcopyfont 1014 3667 3673 3685 3692 4162MTcount 512 513

737 1277 1285 1287 1289 1293 12951298 1304 1309 1310 1314 1325 1357 1419

MTcurrfile 2390 2391 2400 24013422 3423 3641 3643 3646 3832 4274 4878

MTcurrlistname 1323 1360 1450 15932290 2371 2539 2849 2857 2862 2870 2876

MTcurrls 1874 1990 1993MTcurrsetname 3118 3120ndash

3122 3124 3127 3128 3133 3138 31423143 3152 3177 3181 3210 3238 32613267 3271 3272 3523 3599 3620 36353654 3726 3730 3737 3740 3742 37483751 3754 3766 3780 3789 3797 3833 3835

MTdeclarecharinh 3814 3822 3830MTdeclaresets 3101 3106 3119 3443MTDeclareMicrotypeAlias 3396 3398MTDeclareMicrotypeSetDefault 3351 3353MTDeclareSet 3097 3099 3115MTDeclareSetAndUseIt 3096 3114MTDeclareVariants 3383 3384 3386MTdefboolopt 4116

4129 4130 4134 4148 4160 4170 4182MTdefn 393 3089 3090MTdefaultexset 3368MTdefaultknset 3368MTdefaultprset 3368MTdefaultspset 3368MTdefaulttrset 3368MTdefinecodekey

3567 3627 3629 3630 3842 3844 3845MTdefinecodekeyfamily 3578 3628 3843MTdefinecodekeyfont 3604 3632 3847MTdefinecodekeysize 3592 3631 3846MTdefineoptkey 3633 3656ndash3659 3793ndash3795MTdefineoptionX 4300 4358 4361MTdefineoptionX 4375 4404 4406 4407MTdefinesetkey 3131 3311ndash3314MTdefinesetkeyfont 3259 3316MTdefinesetkeysize 3170 3315MTdetokenizec 436 2557 2753 2769MTdetokenizen 436 2831MTdimensix

1050 1278 1314 1357 2072 2074 2243MTdinfo 87MTdinfolist

1112 1122 1125 1130 1139 1142 11481150 1158 1166 1169 1174 1184 1187 1191

MTdinfonl 87MTDisableLigatures 3433MTdofont 704 1224 1557 1692 1761 1866MTdocumentfalse 345MTdocumenttrue 345 4822MTdofalse 1087 1099 1126 1143 1170 1188MTdofontfunction 708 719MTdotrue 1087 1090 1123 1140 1149 1167 2273MTdraftfalse 309 4184MTdrafttrue 309 4186

INDEX 244

MTedefn 395 2506 2532 30793573 3587 3643 3646 3649 3831 3979 4216

MTencoding 1064 1180 1201 1203 1206 24652477 2557 2753 2769 2830 2861 2868 2876

MTendcatcodes 2388 2431 3025 30323042 3112 3335 3366 3392 3410 34283445 3481 3505 3524 3540 3554 3825 4273

MTendinput 167 4239 4248MTengine 175

277 281 287 293 2174 2178 4240 4246MTenginetooold 175 278MTerror 76 780 883

2174 2185 2363 2376 3208 3344 33733451 3676 3702 3709 4172 4335 43534393 4574 4586 4606 4675 4746 4759 4839

MTerrordoesntwork 4742MTexcname 1511

1513 1599 1600 1611 1617 1618 1630 3489MTexcontext 1018 3046 3088MTexdoccontexts 3088MTexfactor 314 1530 1603MTexfactor 1530 1559 1564 1573 1574 1597MTexinhname 1585ndash1587MTexlevel 314 4629 4631MTexmax 326 1576 1577MTexmin 326 1579 1580MTexsetname 3337MTexsplitval 1571MTexpcs 390 393 396 399 404 1030

1032 1041 1164 1269 1344 1347 13771381 1391 1394 1397 1587 1674 17451915ndash1917 2493 2999 3009 3010 30143065 3076 3176 3598 3618 3869 3950 3997

MTexpgcs 390 394 398 400 405MTexponen 407 441 603 982

984 1042 1118 1181 1788 2395 29712974 2984 2996 3002 3020 3062 30733088 3106 3310 3329 3360 3415 3822 4827

MTexptwoc 409 427 432 442 638 981 10221024 1026 1027 1036 1834 1966 20022005 2008 2554 2561 2756 2824 2839 2840

MTexptwon 411 1136 1145 3137 3266MTexpandfont 1515 1533 1537MTexpansion 998 1502 4666MTexpansionfalse 305 4524 4529 4623MTexpansiontrue 305 4254MTextracontext 3088 3473 3489 3512

3532 3546 3613 3616 3617 3619 36603668 3674 3686 3691 3804 3947 39513954 3957 3958 3963 3968 3969 3971 3998

MTextrainputenc 3802 3829 3834 3835MTfactordefault 338 4223 4503MTfamily 982 1064

1137 1180 1201 1203 1206 2466 3406 3407MTfamilyalias

983 984 1076 1144 1146 2476 2478 3408MTfeat 1087 1250 1339 1341 1343

1344 1346 1347 1353 1355 1358 1366ndash1370 1372 1374ndash1378 1381 1382 13871391 1394 1397 1400ndash1402 1411 14121417 1435 1809 1971 2361 2363 23662367 2371 2373 2376 2502 2504 25062510 2514 2518 2519 2522 2530 25322533 2535 2542 2546 2850 2851 2880 2882

MTfeatures 773 3088 3101 3310 3324 3355 3638 3813

MTfeatureslong 773 776 781 3059 3827MTfilelist 2382

2384 2392 2395 2397 2402 2405 3415 3419MTfindfile 982 984 2382MTfixcatcode 5MTfixfontset 3160 4474MTfixfontdimensix 1050 1075MTfont 406 731 733

975 981 1036 1043 1052ndash1055 10581061 1222 1223 1258 1259 1264 12651285 1286 1289 1292 1295 1320 13251331 1425 1428 1463 1464 1466 14671542 1546 1552 1557 1583 1584 16251627 1655 1656 1662 1663 1669 16701679ndash1681 1683 1684 1689ndash1691 17331734 1740 1741 1750 1751 1753 17541759 1760 1788 1792 1872 1873 22822572 2627 2884 2940ndash2942 2944 29592960 2971 2972 2977 2984 3002 3012 3021

MTfontcopy 1018 1026 1028 1036ndash1038 1048MTfontlist

2884 2971 2972 2974 2976 2977 3053MTfontorig 1020MTfontsets 3141 3160 3270 4474MTfontspecfalse 850MTfontspectrue 850 851 855 893MTgdefn 393 3464 3480 3504 3539

3553 3742 3766 3780 3837 3880ndash3885 4290MTgetaxis 3284ndash3287 3297MTgetbasefamily 2394 2432MTgetbasefamily 2438 2441MTgetcharunit 1249 1389 1415 1507MTgetcharwd 1283 1314 1392 1415MTgetconfig 4260MTgetexopt 1506 1524 1597MTgetexopt 1605ndash1607 1609 1616MTgetfont 3265 3275MTgetfont 3276 3281 3625MTgetfontandsize 3609 3624MTgetfontdimen 1318 1395MTgethighlevel 3136 3146 3299 3572 3583MTgetinhlist 1211 1509 1642 1720 2528MTgetlistname 2447 2504 2530MTgetlistname 2447MTgetlsbasefont 1827 1992 1999MTgetopt 1209 1364 1640 1718MTgetrange 3174 3184 3596MTgetsize 3191 3196 3205 3224 3295MTgetsize 3231 3242MTgetsize 3242MTgetslot 1246 2292 2549 3859 3866MTgetslot 2566 2570MTgetspaceunit

1389 1491 1653 1660 1667 1731 1738MTgettropt 1814 1934MTgettropt 1954ndash1957 1959MTgetunit 1397 1405 1943MTgetunit 1405MTgetkey 4441 4456MTglet 387 400 894 1022 1916 2002 2033

2179 2187 2938 3035 3054ndash3057 34083667 3685 3890 4162 4164 4790 4796 4882

INDEX 245

MTgletnc 399 1059 1206 1810 2046 2234 2542

2960 3053 3124 3127 3133 3261 34973726 3730 3737 3740 3748 3751 3754 3789

MTgletnn 404 3072 4287MTiffalse 303

865 872 895 912 2989 3996 4858 4865MTiflistexists

1199 1505 1523 1639 1717 1813 2501MTifluaotffont

687 707 1829 1864 1873 2295 2308MTifouternext

2113 2128 2132 2135 2140 2145ndash2148MTiftrue 303

866ndash868 873ndash875 896ndash898 925 929 9302982 4005 4009 4017 4022 4859ndash4863 4866

MTifdefinedcT 415 869 9011267 1303 1585 1672 1743 1858 19482740 3162 3406 3834 3937 4296 4299 4885

MTifdefinedcTF 415 815 1817 1842 1845 18561990 2069 2240 2287 2288 2505 2531 3946

MTifdefinednT 415 804 1115 1133 1161 1177 12681400 1436 1586 1611 1673 1744 19381946 1960 2484 2879 3121 3401 34923650 3896 3903 3910 3916 3947 3957 4441

MTifdefinednTF 415 10761093 1116 1134 1162 1178 1201 13661374 1599 1617 1804 1914 2276 23662472 2557 3149 3338 3341 3369 36413923 3978 3987 4057 4283 4286 4647 4825

MTifdim 535 658 659 663 664 3207 32164003ndash4005 4007 4008 4015ndash4017 4020 4021

MTifdimen 497 3233 3729 3739 3753 4232MTifempty 448 1222 1223 1256 1262

1480 1481 1652 1659 1666 1689ndash16911703ndash1705 1707ndash1709 1730 1737 17591760 1776 1777 2052 2053 2061 20772209 2232 2233 2245 3064 3100 31043148 3158 3185 3186 3199 3200 32893300 3323 3327 3354 3358 3440 35193634 3640 3660 3666 3674 3684 36913764 3812 3819 4070 4101 4263 4309 4382

MTifint 461 2716 3520 3765 4215 4225MTifstreq 544 1105 1442 1609 2362 2503

2518 2789 2792 2800 2809 3019 32643608 3728 3750 3752 3814 3821 39383958 4029 4073 4075 4078 4081 41034105 4119 4120 4192 4193 4198 42024231 4311 4318 4322 4329 4384 4390 4718

MTinclist 624776 805 1118 1136 1145 1181 17882384 2395 2971 2974 2984 2996 3062 3415

MTinrlist 652 1164 2493MTinrlist 652MTinrlist 652MTintlist 640 2444 3073MTintlist 640MTinannotfalse 100MTinannottrue 100MTincrement 737 3895 3902 3909 3915MTinfo 76 91 96 1057 4199 4425 4429MTinfomissingchar 1298 1328 2623

MTinfonl 76 92 93 97 816 12021329 4190 4200 4270 4284 4288 44864490 4502 4509 4630 4667 4687 46924701 4711 4734 4738 4751 4766 4835 4846

MTinfonotracking 996 1106 1110MTinfonotracking 1106 1110MTinhdo 2541 3848MTinhfeat 3802 3812 3817 3828MTinhsplit 3850 3854MTinlistfalse 624 628 641 653 2992MTinlisttrue 624 630 648 660 665 2992MTisactive 2554 2729MTischar 2561 2756 2773MTischarx 2782 2803 2840MTiscomposite 2559 2827MTisfeature 775 3105 3328 3359MTisletter 2555 2673 2761 2836MTisnumber 2699 2704 2824MTisoptchar 2755 2765MTissymbol 2558 2751MTistlig 2759 2817MTisunicomp 2834 2846MTisxchar 2793 2799MTiterate 674MTkerning 1002 1714 4737MTkerningfalse 311MTkerningtrue 311MTkncname 1722 1724 1767 3546MTkncontext 3047 3088MTkndoccontexts 3088MTknfactor 314MTknfactor 1366MTkninhname 1743ndash1745MTknmax 326MTknmin 326MTknsetname 3337MTknsplitval 1728MTknunit 320MTknunit 1374 1770MTledunhboxline 816MTledmacsetup 810 889ndash891MTletcn 401 404 405 1077 1215

1513 1600 1646 1724 1939 1947 23612373 2498 2502 2535 2940 3228 3654 3833

MTletnc 399 1402 2154 2514 2546 29873980 3985 4079 4082 4325 4332 4749 4764

MTletnn 404 1367 1372 1375 1387 1618 1621 1961

MTletterspace 341 1817 1947 1949 1951 4799 4800 4802

MTletterspace 1233 13031304 1817 1818 1821 1824 1832 18391844 1852 1865ndash1867 1874 1883 1927ndash1930 2074 2077 2195 2210ndash2213 2246 2249

MTletterspacedefault 341 4800MTlistname 2447

2495 2498 2505 2506 2508 2510 25312532 2534 2535 2539 2542 3869 3874

MTlistnamecount 3637 3642 3644MTloadinputenc 1443 1446 1455MTloadlist 1213 1511 1644 1722 2358MTloop 674 682 730 3251 3984MTlower 3178 3184 3599MTlsadjust 1881 2206MTlsadjust 2190 2214

INDEX 246

MTlsadjustempty 2192 2206MTlsadjustrelax 2193 2206MTlsbasefont 1999 2008 2011 2012MTlsfontspeccolon 1923MTlsfontspecfont 1834 1923MTlsouterk 1884

1889 1897 2090 2104 2151 2169 2254MTlssetls 2197 2200 2206MTlstoolarge 2213 2216 4802MTlsfont 1823

1833 1839 1852 1853 1862 1866 18671872 1966 1977 2022 2024 2039 20402047 2048 2055 2057 2063 2078 2247 2250

MTltxpickupfont 918 959 964 2955 2963MTlua 192 255 356

364 485 522 568 688 709 2296 2309 2577MTluacopyfont 1047MTluacopyfont 1027 1047MTluatexno 253 354MTmapclist 596MTmapclistc 596

1029 2291 2983 2995 3008 3052 30593101 3324 3355 3638 3813 3817 3827 4439

MTmapclistn 596 1092 2275 3088 3103 3123 3134

3172 3262 3310 3326 3357 3387 34623570 3581 3594 3606 3746 3762 38634065 4068 4097 4099 4128 4210 4307 4380

MTmaptlist 614MTmaptlistc 614 643 654 1032 1269

1587 1674 1745 2451 3014 3948 3997 4474MTmaptlistn 614 2423 2775 3889MTmaxchar 2673 2696MTmaxslot 2673 2722MTmaybedo 1087 1196 1503 1637 1715 1790MTmaybegobblewithtikz 856 1913 1970MTmayberemfromlist 3014 3018MTmicrotypecontext 3024MTminus 1832 1927ndash1930MTMT 2 76 79 82 84

86 91 92 94 95 292 787 884 886 36764242 4264 4425 4429 4487 4722 4839 4840

MTMTpickupfont 961 966 2955 2965MTnextlistname 2454 2463MTnextlistname 2473 2485 2491MTnlligatures 2282 3433MTnlsetname 2274 3433MTnofamilyfalse 1193 1198MTnofamilytrue 1193 2464MTnoligatures 1006 2270 4811MTnoligatures 2022 2024 2282 2285MTnoligaturesfalse 308MTnoligaturestrue 308 3442MTnonselectedfalse 1519 1534MTnonselectedtrue 1519 1522MTnorestfalse

2682 2689 2698 2719 2789 2801 2809MTnoresttrue 2552 2682 2707MToldcmd 66 71ndash74MToptautofalse 4040MToptautotrue 4040 4130MToptdefset 4056 4084 4109MToptDVIfalse 4041MToptDVItrue 4041 4137 4140MToptexpansionfalse 4039

MToptexpansiontrue 4039MToptions 3557MToptwarnadmissible 4042 4121 4202MToptwarnnan 4046 4217 4227MTorigaddaccent 2961MTorigforeignlanguage 4852 4854MTorigpickupfont 2890 2957MTorigpymacron 956 960 965MTorigselectlanguage 4847 4849MTouterkern 1883 1887 1889 1890 1894 1902

1993 1994 1996 2151 2152 2169 2227 2266MTouterspace 1877

1878 2037 2086 2088 2089 2102 21032120 2121 2136 2137 2141 2142 2167

MTpdfannot 99MTpdforlua 180 188 290 464 687 4783MTpdftexno 212 353MTpermute 3479 3503 3517 3538 3552 3840 3879MTpermute 3879MTpermute 3879MTpermute 3879MTpermute 3879MTpermute 3914 3919MTpermute 3927 3929MTpermutedefine 3920 3930ndash3932 3976MTpermutereset 3889 3982MTpermutelist 3473 3489

3515 3532 3546 3613 3614 3619 38383942 3943 3947 3951 3954 3957ndash39593961ndash3963 3971 3972 3998 4030 4032 4033

MTpickupfont 2955MTplain 125 146MTprcname 1213 1215 1471 3473MTprcontext 1018 3046 3088MTprdoccontexts 3088MTprfactor 314 4226 4503 4504MTprfactor 1366MTprinhname 1267 1268 1270MTprlevel 314 4501 4502MTprmax 326MTprmin 326MTprsetname 3337MTprsplitval 1254MTprunit 320 4233 4505MTprunit 1374 1474MTpresetaux 1476

1478 1480 1481 1484 1772 1774 1776 1777MTpresetauxfactor 1476 1484 1703ndash1705 1772MTpresetauxspace 1478 1484 1707ndash1709 1774MTpresetex 1612 1629MTpresetkn 1765MTpresetkn 1765MTpresetpr 1469MTpresetpr 1469MTpresetsp 1696MTpresetsp 1696MTProcessOptionsWithKV 4433 4457MTprotrudechars 4358 4362 4501 4689MTprotrusion 997 1195 4508MTprotrusionfalse 304MTprotrusiontrue 304 4249MTrbbaexpansion 768MTrbbakerning 768MTrbbaprotrusion 768MTrbbaspacing 768

INDEX 247

MTrbbatracking 768MTregisterfont 1010 2972 3055MTregisterfontcx 3007 3055MTregistersubstfont 2946 2973 3056MTregistersubstfontcx 2994 3056MTremfromclist 635 1042 2977 3002 3020 3562MTremfromlist 1032 1040MTremlastspace 436MTremovetlig 2820 2823MTrepeat 674 684 733 3254 3990MTrequireslatex 145 164 796

914 1965 2888 4048 4209 4434 4438 4881MTrequiresluatex 348 387 988 1055 1231

1538 1539 1561 1608 1784 2285 37793785 4133 4363 4377 4519 4596 4604 4683

MTrequirespdftex 348463 498 545 811 977 987 1001 10051016 1230 1275 1301 1560 1636 17141783 2019 2271 3434 3664 3778 37834159 4253 4376 4540 4571 4599 4682 4809

MTresa 558 560 626 633 636 638 642 647MTresb 559 560 636ndash638 646 647MTresetcontext 3034 3038 3044 3071MTresetcontext 3044 3071MTresetefcodes 1508 1532 1560 1613MTresetefcodes 1555 1565 1569MTresetkncodes 1719 1726 1756MTresetkncodes 1756MTresetprcodes 1210 1217 1226MTresetprcodes 1226MTresetspcodes 1641 1648 1686MTresetspcodes 1686MTrestorecatcodes 5 7 8 159 165 4887MTrestoreph 847 876 931MTsavedsetupfont 4422 4430MTscale 744 1278 1340 1354 1357 1574MTscalefactor 1280 1311 1338 1486 1631MTscaletoem 1257 1263 1275 1308 1492

1654 1661 1668 1732 1739 1950 2070 2241MTscrubfeature 1068 1080 3585MTscrubfeatures 1080 3165 3611MTselectedfalse 307MTselectedtrue 307MTseries 1064 1180 2467 2479MTsetallex 1555 1632MTsetallkn 1756 1778MTsetallpr 1219 1226 1482MTsetallsp 1686 1711MTsetbabelcontext 4824 4850 4855 4869MTsetcodes 1216 1237 1514 1647 1725 2374MTsetcurrls 1874MTsetcurrok 1894 1896 1902 1905 2125 2129MTsetcurros 1876 1904 2125 2129MTsetdefaultset 3355 3360 3368MTsetexcodes 1536 4614 4616MTsetexcodesn 1519 1536 4616MTsetexcodess 1504 4614MTsetexheirs 1587 1624MTsetinhlist 3809 3811MTsetinputenc 1212 1433 1510 1643 1721 2540MTsetinputenc 1436 1438MTsetkncodes 1716MTsetknheirs 1745 1749MTsetlistname 1214

1365 1512 1598 1645 1723 1936 2849

MTsetlsbasefont 2008MTsetlsfont 1871 1964 1977MTsetnamedkeys 3475 3491 3513 3534 3548 3557MTsetprcodes 1197MTsetprheirs 1271 1461MTsetspcodes 1638MTsetspheirs 1674 1678MTsettrcodes 1800 1972 1982MTsettrzero 1819 2008 4404MTSetExpansion 3487 3489MTSetExtraKerning 3544 3546MTSetExtraSpacing 3530 3532MTSetProtrusion 3471 3473MTSetTracking 3509 3511MTsetup 794 798 4151 4152 4882MTsetupcontexts 3033 3051MTsetupcopies 4473 4489MTsetupexpansion 4476 4513MTsetupkerning 4480 4729 4772MTsetupnoligatures 4481 4807MTsetupPDF 4472 4484 4494MTsetupprotrusion 4475 4497MTsetupspacing 4479 4696 4773MTsetupspacingcheck 4714 4885 4886MTsetuptracking 4477 4681 4744 4771MTsetupwarntracking 4478 4776MTsetupfont 973 2949 4423 4426 4430 4466MTsetupfonthook 864 894 900 905 931 938 976MTshape 1064 1180 2468 2480MTshorthandoff 4833 4864 4867MTshowpdfannot 106MTshrink 323 1527

4536 4537 4544 4545 4548 4552 4619 4632MTshrink 1527 1542 1546 1552 1597MTshrinkdefault 339MTsize 659 663 664 1056 1064 1180MTsizename 652 2495MTSOULdoword 949 950MTspcname 1644 1646 1698 3532MTspcontext 3047 3088 4718MTspdoccontexts 3088MTspfactor 314MTspfactor 1366MTspinhname 1672ndash1674MTspmax 326MTspmin 326MTspsetname 3337MTspsplitval 1650MTspunit 320MTspunit 1374 1701MTspacing 1002 1635 4710MTspacingfalse 310MTspacingtrue 310MTsplitcodes 1239 1243MTsplitname 981 1064MTstep 323 1528 4539

4541 4559 4563 4566 4633 4636 4637 4641MTstep 1528 1542 1546 1552 1597MTstretch 323 1526 4533

4534 4537 4544 4546 4551 4554 4618 4632MTstretch 1526 1542 1546 1552 1597MTstretchdefault 339 4534MTstripprefix 2782 2803 2839MTtemp 1221ndash1224 1688ndash1692 1758ndash1761

2042 2046 2049 2057 2060 2117 2120

INDEX 248

2126 2130 2133 2136 2141 2149 21512157 2231 2234 2251 3283 3308 44374442 4447 4448 4450 4453 4648 4652 4656

MTtempencoding 3922 3923 3933 3939MTtempfamily 3934MTtempseries 3935MTtempshape 3936MTtempsize 3890 3937 3946 3948 3952MTtestast 2068 2239 3147 3156MTtextmicrotypecontext 3041MTtextls 49 2192 2193 2195MTtextmicrotypecontext 3041MTtheprcode 1228 1258 1264 1868MTtheprcodetr 1228 1868MTtikzsetup 856 877 954MTtlistbreak 614 649 671 2456 4036MTtoks 302

1329 1360 1593 2553 2588 2615 26872694 2744 2795 2810 2819 2854 2866 2874

MTtrcname 19381939 1946 1947 1960 1961 3514 3521

MTtrcontext 3047 3088MTtrdoccontexts 3088MTtrfactor 1937MTtrfontlist 1786MTtrispace 1842 1843 1954MTtrligatures 1858 1957 2021 2024MTtrmax 326 2217ndash2219MTtrmin 326 2221ndash2223MTtrnoligatures 1858 2018MTtrokern 1856 1956MTtrospace 1845 1846 1954MTtroutericr 2130 2159MTtroutericr 2159MTtrouterl 1879 2082MTtrouternext 2110 2114 2161MTtrouterr 1906 2110 2126 2133 2159MTtrouterr 2111 2116MTtrsetokern 1857 2227MTtrsetokern 2232 2233 2238MTtrsetspace 1848 2038MTtrsetspace 2043ndash2045 2051MTtrsetspace 2054 2059 2062 2067MTtrsetname 3337MTtrunit 1938 2069 2240MTtracking 989 1786 1972 2951 4404 4405 4691MTtracking 1786 4405MTtrackingfalse 312 4748MTtrackingtrue 312MTtryorder 2451 2459MTundefinedchar 2734 2739 2750MTupper 3178 3184 3599MTuseset 3324 3329 3337MTUseMicrotypeSet 3320 3322MTval 3064ndash3066 3068 3074 3076

3079 3135 3139 3147 3150 3153 3173ndash3175 3187 3190 3192 3195 3197 3198

3204 3206 3207 3209 3212 3214 32253228 3233ndash3235 3237 3239 3244 3263ndash3265 3268 3277ndash3279 3291 3293 32983300 3302 3304 3571 3573 3582 35853587 3595ndash3597 3607ndash3609 3615 36203862 3869 3873 3874 4057 4058 40614069 4070 4073 4075 4078 4081 41004101 4103 4105 4308 4309 4311 43184322 4329 4335 4381 4382 4384 4390 4393

MTvariants 2444 3379 3390MTvinfo 76 93 995 1107 1111 1369

1378 1382 1417 1601 1619 1803 18212299 2310 2367 2391 2401 2404 25082510 2516 3045 3068 3417 3423 41904197 4314 4320 4326 4333 4387 4392 4826

MTwarnascii 2696 2853MTwarnaxisempty 3290 3301 3306MTwarncodetoolarge 1344 1347 1351MTwarnerr 76 4194 4195MTwarnextoolarge 1577 1580 1591MTwarnmaybeinputenc 2289 2867 2875 2878MTwarnnodim 3718 3731 3741 3755MTwarnnumbertoolarge 2723 2859MTwarnpresettowidth 1475 1495 1702 1771MTwarnrest 2594 2631 2864MTwarntrackingDVI 1822 4778MTwarnunknown 2584 2600 2610 2635 2872MTwarnunknownonce 2890 2891MTwarning 67 76 94 2218 2222 2302 2519

3122 3151 3237 3307 3402 3425 35223651 3720 3768 3781 3786 3940 39614032 4194 4199 4296 4373 4412 4414 4415

MTwarningnl 76 88 95 158 279 786 790 826838 907 1321 1358 1410 1450 14961592 1806 2030 2854 2860 2865 28732922 3494 3693 4043 4050 4061 41434195 4200 4234 4241 4277 4291 44634520 4564 4620 4639 4703 4719 4784 4871

MTwhilenum 680 704 710 934ndash936MTwithbabelandT

803 866ndash868 896ndash898 4859ndash4863 4866MTwithpackageT 800 851 853

870 873ndash875 877 882 889ndash893 903 915929 930 932 954 955 2890 2891 2933 4702

MTxadd 104 580 2392 2397 24022405 2999 3010 3076 3176 3419 3598 3869

MTxaddb 588 3618 3950MTxdefn 395 3339 3342 3371 3376 3405

3521 3613 3635 3797 3835 3971 4058 4060MTxetexno 244MTxspace 2149 2164MTxspace 2164MTxunicodefalse 852MTxunicodetrue 852 853 892

N newcomputermodern (package) 145newpx (package) 21 59 145 239newtx (package) 21 59 145 239

newunicodechar (package) 95 239normalfont 972 4659 4663nullfont 972

O outputmode 194 4133

INDEX 249

P pdfadjustinterwordglue 4406 4700pdfadjustspacing 196 950 4365 4369 4661pdfappendkern 4408 4733pdfcopyfont 1026pdfcprot (package) 26 30 54 64 99 231pdffeedback 1055pdffontexpand 1539 1542 1546 1552pdffontsize 1054 1055pdfnoligatures 2285 2301 2307pdfprependkern 4407 4732pdfprotrudechars 195 4364 4368 4795pdfTEX (engine) 1 4 6ndash9 13ndash19 23ndash35 37ndash39

41ndash43 45 46 53 57ndash59 64 70 72 73

75 76 79 80 83 85 112 115 117 119129 133 134 136 137 140 197 199 231ndash237

pdftexcmds (package) 37 237pdftracingfonts 358pickupfont 2921 2923 2932 2955ndash2957pifont (package) 100pinyin (package) 56 236 237protrudechars 195 4364protrusion (option) 6 11 125 126psnfss (package) 79 198 239pstricks (package) 134pxfonts (package) 21 145

Q qfonts (package) 21 145 233

R ragged2e (package) 26 81 139 237 238reledmac (package) 53 239relsize (package) 108

removetlig 2818rightmarginkern 822rpcode 1223 1264 1265 1464 1467 1867

S selected (option) 8 14 33 69 90 126 232selectfont 1973 3037 3049 4301 4877setfontsize 3244SetExpansion 14 36 3484SetExtraKerning 18 38 3542SetExtraSpacing 19 39 3527SetProtrusion 13 35 3468SetTracking 15 37 3507sfcode 4717shapepar (package) 29 53shbscode 1669 1670 1681 1684 1691showhyphens 4647shrink (option) 8 15 33 128 136 138 234 236

slantsc (package) 177soul (package) 4 30 56 82 235 237 240soulutf8 (package) 30 237spacefactor 2093spaceskip 2094 2097spacing (option) 6 11 26 31 126 237 238stbscode 1662 1663 1680 1684 1690step (option) 8 31 33 128 136 138 232 234 236step (package) 21 145 240stix (package) 21 145 240stix2 (package) 21 145 240stretch (option) 8 15 25 33 128 135 136 138 236svjour3 (package) 108 240

T tagcode 1862 2288 2294tempora (package) 21 145 239tex4ht (package) 54 235TEX Live (distribution) 28 39 146 233textls 23 52 53 923 947 1882 1968 1985 2190textls 24textmicrotypecontext 22 48 919 3041tikz (package) 54 227 237 239tikzposter (package) 238

tipa (package) 100trace (package) 101 235tracingmicrotype 87tracingmicrotypeinpdf 98tracingmicrotypeinpdfallfalse 105tracingmicrotypeinpdfalltrue 105tracking (option) 6 11 23 31 126txfonts (package) 21 145

U ucs (package) 95 236ulgothic (package) 21UnicodeEncodingName 2832unit (option) 7 32 233 235

UseMicrotypeSet 12 33 60 73 3116 3318UTFfouroctetsnoexpand 2737UTFthreeoctetsnoexpand 2736UTFtwooctetsnoexpand 2735

V verbose (option) 9 31 32 128 232 233 236

W wordcount (package) 52 236

X XCharter (package) 21 146 239xeCJK (package) 27 100 238 239

XETEX (engine) 1 4 6 7 9 1213 20 29 31 34 38 40 50 53 57 59 8393 133 138 140 144 147 151 159 238ndash240

XeTeXcharglyph 2621XeTeXfonttype 2572XeTeXglyph 1292XeTeXglyphindex 2608

XeTeXglyphname 2627XeTeXlastfontchar 733XeTeXprotrudechars 4372xspace 2148 2149xspace (package) 83 238xspaceskip 2096 2099xunicode (package) 97 98 238xunicode-addon (package) 100

Y yfonts (package) 24

Z zefonts (package) 21 144

THE LATEX PROJECT PUBLIC LICENSE 250

E The LATEX Project Public LicenseLPPL Version 13c 2008-05-04

Copyright 1999 2002ndash2008 LATEX3 Project

Everyone is allowed to distribute verbatimcopies of this license document but modificationof it is not allowed

PreambleThe LATEX Project Public License (LPPL) is the primarylicense under which the LATEX kernel and the base LATEXpackages are distributed

You may use this license for any work of which youhold the copyright and which you wish to distribute Thislicense may be particularly suitable if your work is TEX-related (such as a LATEX package) but it is written in sucha way that you can use it even if your work is unrelatedto TEX

The section lsquoWHETHER AND HOW TO DISTRIBUTEWORKS UNDER THIS LICENSErsquo below gives instructionsexamples and recommendations for authors who are con-sidering distributing their works under this license

This license gives conditions under which a work maybe distributed and modified as well as conditions underwhich modified versions of that work may be distributed

We the LATEX3 Project believe that the conditionsbelow give you the freedom to make and distribute mod-ified versions of your work that conform with whatevertechnical specifications you wish while maintaining theavailability integrity and reliability of that work If youdo not see how to achieve your goal while meeting theseconditions then read the document lsquocfgguidetexrsquo andlsquomodguidetexrsquo in the base LATEX distribution for sugges-tions

DefinitionsIn this license document the following terms are used

Work Any work being distributed under this License

Derived Work Any work that under any applicable lawis derived from the Work

Modification Any procedure that produces a DerivedWork under any applicable law ndash for example theproduction of a file containing an original file asso-ciated with the Work or a significant portion of sucha file either verbatim or with modifications andortranslated into another language

Modify To apply any procedure that produces a DerivedWork under any applicable law

Distribution Making copies of the Work available fromone person to another in whole or in part Distri-bution includes (but is not limited to) making anyelectronic components of the Work accessible by filetransfer protocols such as FTP or HTTP or by sharedfile systems such as Sunrsquos Network File System (NFS)

Compiled Work A version of the Work that has been pro-cessed into a form where it is directly usable on a

computer system This processing may include us-ing installation facilities provided by the Work trans-formations of the Work copying of components ofthe Work or other activities Note that modificationof any installation facilities provided by the Workconstitutes modification of the Work

Current Maintainer A person or persons nominated assuch within the Work If there is no such explicit nom-ination then it is the lsquoCopyright Holderrsquo under anyapplicable law

Base Interpreter A program or process that is normallyneeded for running or interpreting a part or the wholeof the WorkA Base Interpreter may depend on external compon-ents but these are not considered part of the BaseInterpreter provided that each external componentclearly identifies itself whenever it is used interact-ively Unless explicitly specified when applying thelicense to the Work the only applicable Base Inter-preter is a lsquoLATEX-Formatrsquo or in the case of files belong-ing to the lsquoLATEX-formatrsquo a program implementing thelsquoTEX languagersquo

Conditions on Distribution and Modification1 Activities other than distribution andor modification

of the Work are not covered by this license they areoutside its scope In particular the act of running theWork is not restricted and no requirements are madeconcerning any offers of support for the Work

2 You may distribute a complete unmodified copy ofthe Work as you received it Distribution of only partof the Work is considered modification of the Workand no right to distribute such a Derived Work maybe assumed under the terms of this clause

3 You may distribute a Compiled Work that has been

generated from a complete unmodified copy of theWork as distributed under Clause 2 above as long asthat Compiled Work is distributed in such a way thatthe recipients may install the Compiled Work on theirsystem exactly as it would have been installed if theygenerated a Compiled Work directly from the Work

4 If you are the Current Maintainer of the Work youmay without restriction modify the Work thus creat-ing a Derived Work You may also distribute the De-rived Work without restriction including CompiledWorks generated from the Derived Work DerivedWorks distributed in this manner by the Current Main-

THE LATEX PROJECT PUBLIC LICENSE 251

tainer are considered to be updated versions of theWork

5 If you are not the Current Maintainer of the Workyou may modify your copy of the Work thus creatinga Derived Work based on the Work and compile thisDerived Work thus creating a Compiled Work basedon the Derived Work

6 If you are not the Current Maintainer of the Workyou may distribute a Derived Work provided the fol-lowing conditions are met for every component ofthe Work unless that component clearly states in thecopyright notice that it is exempt from that conditionOnly the Current Maintainer is allowed to add suchstatements of exemption to a component of the Work

(a) If a component of this Derived Work can be adirect replacement for a component of the Workwhen that component is used with the Base In-terpreter then wherever this component of theWork identifies itself to the user when used inter-actively with that Base Interpreter the replace-ment component of this Derived Work clearly andunambiguously identifies itself as a modified ver-sion of this component to the user when usedinteractively with that Base Interpreter

(b) Every component of the Derived Work containsprominent notices detailing the nature of thechanges to that component or a prominent refer-ence to another file that is distributed as part ofthe Derived Work and that contains a completeand accurate log of the changes

(c) No information in the Derived Work implies thatany persons including (but not limited to) the au-thors of the original version of the Work provideany support including (but not limited to) the re-porting and handling of errors to recipients of theDerived Work unless those persons have statedexplicitly that they do provide such support forthe Derived Work

(d) You distribute at least one of the following withthe Derived Work

i A complete unmodified copy of the Work ifyour distribution of a modified component ismade by offering access to copy the modifiedcomponent from a designated place then of-fering equivalent access to copy the Work from

the same or some similar place meets this con-dition even though third parties are not com-pelled to copy the Work along with the modi-fied component

ii Information that is sufficient to obtain a com-plete unmodified copy of the Work

7 If you are not the Current Maintainer of the Workyou may distribute a Compiled Work generated froma Derived Work as long as the Derived Work is dis-tributed to all recipients of the Compiled Work andas long as the conditions of Clause 6 above are metwith regard to the Derived Work

8 The conditions above are not intended to prohibitand hence do not apply to the modification byany method of any component so that it becomesidentical to an updated version of that component ofthe Work as it is distributed by the Current Maintainerunder Clause 4 above

9 Distribution of the Work or any Derived Work in analternative format where the Work or that DerivedWork (in whole or in part) is then produced by ap-plying some process to that format does not relax ornullify any sections of this license as they pertain tothe results of applying that process

10 (a) A Derived Work may be distributed under a dif-ferent license provided that license itself honorsthe conditions listed in Clause 6 above in regardto the Work though it does not have to honor therest of the conditions in this license

(b) If a Derived Work is distributed under a differentlicense that Derived Work must provide sufficientdocumentation as part of itself to allow each recip-ient of that Derived Work to honor the restrictionsin Clause 6 above concerning changes from theWork

11 This license places no restrictions on works that areunrelated to the Work nor does this license place anyrestrictions on aggregating such works with the Workby any means

12 Nothing in this license is intended to or may be usedto prevent complete compliance by all parties withall applicable laws

No WarrantyThere is no warranty for the Work Except when otherwisestated in writing the Copyright Holder provides the Worklsquoas isrsquo without warranty of any kind either expressed orimplied including but not limited to the implied war-ranties of merchantability and fitness for a particular pur-pose The entire risk as to the quality and performance ofthe Work is with you Should the Work prove defectiveyou assume the cost of all necessary servicing repair orcorrection

In no event unless required by applicable law oragreed to in writing will The Copyright Holder or any au-

thor named in the components of the Work or any otherparty who may distribute andor modify the Work as per-mitted above be liable to you for damages includingany general special incidental or consequential damagesarising out of any use of the Work or out of inability touse the Work (including but not limited to loss of datadata being rendered inaccurate or losses sustained byanyone as a result of any failure of the Work to operatewith any other programs) even if the Copyright Holderor said author or said other party has been advised of thepossibility of such damages

THE LATEX PROJECT PUBLIC LICENSE 252

Maintenance of The WorkThe Work has the status lsquoauthor-maintainedrsquo if the Copy-right Holder explicitly and prominently states near theprimary copyright notice in the Work that the Work canonly be maintained by the Copyright Holder or simplythat it is lsquoauthor-maintainedrsquo

The Work has the status lsquomaintainedrsquo if there is aCurrent Maintainer who has indicated in the Work thatthey are willing to receive error reports for the Work (forexample by supplying a valid e-mail address) It is notrequired for the Current Maintainer to acknowledge oract upon these error reports

The Work changes from status lsquomaintainedrsquo to lsquoun-maintainedrsquo if there is no Current Maintainer or the per-son stated to be Current Maintainer of the work cannotbe reached through the indicated means of communica-tion for a period of six months and there are no othersignificant signs of active maintenance

You can become the Current Maintainer of the Workby agreement with any existing Current Maintainer totake over this role

If the Work is unmaintained you can become theCurrent Maintainer of the Work through the followingsteps1 Make a reasonable attempt to trace the Current Main-

tainer (and the Copyright Holder if the two differ)through the means of an Internet or similar search

2 If this search is successful then enquire whether theWork is still maintained

(a) If it is being maintained then ask the CurrentMaintainer to update their communication datawithin one month

(b) If the search is unsuccessful or no action to re-sume active maintenance is taken by the Current

Maintainer then announce within the pertinentcommunity your intention to take over mainten-ance (If the Work is a LATEX work this could bedone for example by posting to comptexttex)

3 (a) If the Current Maintainer is reachable and agreesto pass maintenance of the Work to you then thistakes effect immediately upon announcement

(b) If the Current Maintainer is not reachable andthe Copyright Holder agrees that maintenance ofthe Work be passed to you then this takes effectimmediately upon announcement

4 If you make an lsquointention announcementrsquo as describedin 2b above and after three months your intentionis challenged neither by the Current Maintainer norby the Copyright Holder nor by other people thenyou may arrange for the Work to be changed so as toname you as the (new) Current Maintainer

5 If the previously unreachable Current Maintainer be-comes reachable once more within three months of achange completed under the terms of 3b or 4 thenthat Current Maintainer must become or remain theCurrent Maintainer upon request provided they thenupdate their communication data within one month

A change in the Current Maintainer does not of itselfalter the fact that the Work is distributed under the LPPLlicense

If you become the Current Maintainer of the Workyou should immediately provide within the Work a prom-inent and unambiguous statement of your status as Cur-rent Maintainer You should also announce your newstatus to the same pertinent community as in 2b above

Whether and How to Distribute Works under This LicenseThis section contains important instructions examplesand recommendations for authors who are consideringdistributing their works under this license These authorsare addressed as lsquoyoursquo in this section

Choosing This License or Another LicenseIf for any part of your work you want or need to use dis-tribution conditions that differ significantly from those inthis license then do not refer to this license anywherein your work but instead distribute your work under adifferent license You may use the text of this license as amodel for your own license but your license should notrefer to the LPPL or otherwise give the impression thatyour work is distributed under the LPPL

The document lsquomodguidetexrsquo in the base LATEX dis-tribution explains the motivation behind the conditionsof this license It explains for example why distributingLATEX under the GNU General Public License (GPL) wasconsidered inappropriate Even if your work is unrelatedto LATEX the discussion in lsquomodguidetexrsquo may still berelevant and authors intending to distribute their worksunder any license are encouraged to read it

A Recommendation on Modification WithoutDistributionIt is wise never to modify a component of the Work evenfor your own personal use without also meeting the aboveconditions for distributing the modified component Whileyou might intend that such modifications will never bedistributed often this will happen by accident ndash you mayforget that you have modified that component or it maynot occur to you when allowing others to access the modi-fied version that you are thus distributing it and violatingthe conditions of this license in ways that could havelegal implications and worse cause problems for thecommunity It is therefore usually in your best interest tokeep your copy of the Work identical with the public oneMany works provide ways to control the behavior of thatwork without altering any of its licensed components

How to Use This LicenseTo use this license place in each of the components ofyour work both an explicit copyright notice including yourname and the year the work was authored andor lastsubstantially modified Include also a statement that thedistribution andor modification of that component is

THE LATEX PROJECT PUBLIC LICENSE 253

constrained by the conditions in this licenseHere is an example of such a notice and statement

pigdtx Copyright 2005 M Y Name This work may be distributed andor modified under the conditions of the LaTeX Project Public License either version 13 of this license or (at your option) any later version The latest version of this license is in httpswwwlatex-projectorglppltxt and version 13 or later is part of all distributions of LaTeX version 20051201 or later This work has the LPPL maintenance status `maintained The Current Maintainer of this work is M Y Name This work consists of the files pigdtx and pigins and the derived file pigsty

Given such a notice and statement in a file the con-ditions given in this license document would apply withthe lsquoWorkrsquo referring to the three files lsquopigdtxrsquo lsquopiginsrsquoand lsquopigstyrsquo (the last being generated from lsquopigdtxrsquousing lsquopiginsrsquo) the lsquoBase Interpreterrsquo referring to anylsquoLATEX-Formatrsquo and both lsquoCopyright Holderrsquo and lsquoCurrentMaintainerrsquo referring to the person lsquoM Y Namersquo

If you do not want the Maintenance section of LPPLto apply to your Work change lsquomaintainedrsquo above intolsquoauthor-maintainedrsquo However we recommend that youuse lsquomaintainedrsquo as the Maintenance section was addedin order to ensure that your Work remains useful to thecommunity even when you can no longer maintain andsupport it yourself

Derived Works That Are Not Replacements

Several clauses of the LPPL specify means to provide reliab-ility and stability for the user community They thereforeconcern themselves with the case that a Derived Work isintended to be used as a (compatible or incompatible)replacement of the original Work If this is not the case(eg if a few lines of code are reused for a completelydifferent task) then clauses 6b and 6d shall not apply

Important Recommendations

Defining What Constitutes the WorkThe LPPL requires that distributions of the Work con-

tain all the files of the Work It is therefore important thatyou provide a way for the licensee to determine whichfiles constitute the Work This could for example beachieved by explicitly listing all the files of the Work nearthe copyright notice of each file or by using a line such as

This work consists of all files listed in manifesttxt

in that place In the absence of an unequivocal list itmight be impossible for the licensee to determine what isconsidered by you to comprise the Work and in such acase the licensee would be entitled to make reasonableconjectures as to which files comprise the Work

  • Contents
  • List of Tables
  • Micro-typography with TeX
  • Getting started
  • Options
    • Enabling the micro-typographic features
    • Character protrusion
    • Font expansion
    • Tracking
    • Miscellaneous options
    • Changing options later
      • Selecting fonts for micro-typography
      • Micro fine tuning
        • Character protrusion
        • Font expansion
        • Tracking
        • Additional kerning
        • Interword spacing
        • Character inheritance
        • Configuration files
          • Context-sensitive setup
          • Letterspacing revisited
          • Disabling ligatures
          • Hints and caveats
          • Contributions
          • Acknowledgments
          • References
          • Short history
          • Implementation
            • Preliminaries
              • Debugging
              • Requirements
              • Declarations
              • Auxiliary macros
              • Compatibility
                • Font setup
                  • Protrusion
                  • Expansion
                  • Interword spacing (glue)
                  • Additional kerning
                  • Tracking
                  • Disabling ligatures
                  • Loading the configuration
                  • Translating characters into slots
                  • Hook into LaTeXs font selection
                  • Context-sensitive setup
                    • Configuration
                      • Font sets
                      • Variants and aliases
                      • Disabling ligatures
                      • Interaction with babel
                      • Fine tuning
                      • Character inheritance
                      • Permutation
                        • Package options
                          • Declaring the options
                          • Loading the definition file
                          • Reading the configuration file
                          • Hook for other packages
                          • Changing options later
                          • Processing the options
                              • Configuration files
                                • Font sets
                                • Font variants and aliases
                                • Interaction with babel
                                • Note on admissible characters
                                • Character inheritance
                                  • OT1
                                  • T1
                                  • LY1
                                  • OT4
                                  • QX
                                  • T5
                                  • EU1 EU2 TU
                                  • Euro symbols
                                    • Tracking
                                    • Font expansion
                                    • Character protrusion
                                      • Normal
                                      • Italics
                                      • Small caps
                                      • Italic small caps
                                      • Text companion
                                      • Computer Modern math
                                      • AMS symbols
                                      • Euler
                                      • Euro symbols
                                        • Interword spacing
                                          • Nonfrenchspacing
                                            • Additional kerning
                                              • French
                                              • Turkish
                                                  • OpenType configuration files
                                                    • Character inheritance
                                                    • Character protrusion
                                                      • Auxiliary file for micro fine tuning
                                                      • The title logo
                                                        • Macros
                                                        • Document
                                                          • The letterspacing illustration
                                                            • Macros
                                                            • Document
                                                              • Change history
                                                                • 10 (20040911)
                                                                • 11 (20040921)
                                                                • 12 (20041003)
                                                                • 13 (20041027)
                                                                • 14 (20041112)
                                                                • 14a (20041117)
                                                                • 14b (20041126)
                                                                • 15 (20041215)
                                                                • 16 (20050124)
                                                                • 16a (20050202)
                                                                • 17 (20050323)
                                                                • 18 (20050623)
                                                                • 19 (20051028)
                                                                • 19a (20051205)
                                                                • 19b (20060120)
                                                                • 19c (20060202)
                                                                • 19d (20060505)
                                                                • 19e (20060728)
                                                                • 19f (20060909)
                                                                • 20 (20070114)
                                                                • 21 (20070121)
                                                                • 22 (20070714)
                                                                • 23 (20071223)
                                                                • 23a (20080229)
                                                                • 23b (20080604)
                                                                • 23c (20081111)
                                                                • 23d (20090327)
                                                                • 23e (20091109)
                                                                • 24 (20100110)
                                                                • 25 (20130313)
                                                                • 25a (20130523)
                                                                • 26 (20160501)
                                                                • 26a (20160514)
                                                                • 27 (20170707)
                                                                • 27a (20180114)
                                                                • 27b (20190228)
                                                                • 27c (20191010)
                                                                • 27d (20191118)
                                                                • 28 (20201207)
                                                                • 28a (20210222)
                                                                • 28b (20210225)
                                                                • 28c (20210314)
                                                                  • Index
                                                                    • Options
                                                                    • Commands
                                                                    • A
                                                                    • B
                                                                    • C
                                                                    • D
                                                                    • E
                                                                    • F
                                                                    • G
                                                                    • H
                                                                    • I
                                                                    • J
                                                                    • K
                                                                    • L
                                                                    • M
                                                                    • N
                                                                    • O
                                                                    • P
                                                                    • Q
                                                                    • R
                                                                    • S
                                                                    • T
                                                                    • U
                                                                    • V
                                                                    • W
                                                                    • X
                                                                    • Y
                                                                    • Z
                                                                      • The LaTeX Project Public License
Page 3: The microtype package - ctan.math.utah.edu

LIST OF TABLES 3

144 Package options 125Declaring the options [125] Loading the definition file [129] Reading theconfiguration file [129] Hook for other packages [130] Changing optionslater [131] Processing the options [133]

15 Configuration files 143151 Font sets 143152 Font variants and aliases 144153 Interaction with babel 146154 Note on admissible characters 147155 Character inheritance 147

OT1 [147] T1 [148] LY1 [148] OT4 [149] QX [149] T5 [150] EU1 EU2 TU [151]Euro symbols [151]

156 Tracking 152157 Font expansion 152158 Character protrusion 154

Normal [155] Italics [163] Small caps [174] Italic small caps [177] Textcompanion [178] Computer Modern math [183] AMS symbols [187] Euler [190]Euro symbols [194]

159 Interword spacing 195Nonfrenchspacing [197]

1510 Additional kerning 198French [199] Turkish [199]

16 OpenType configuration files 201161 Character inheritance 201162 Character protrusion 205

17 Auxiliary file for micro fine tuning 219

A The title logo 221A1 Macros 221A2 Document 226

B The letterspacing illustration 226B1 Macros 226B2 Document 229

C Change history 231

D Index 241

E The LATEX Project Public License 250

List of Tables1 Availability of micro-typographic features 72 Predefined font sets 113 Fonts with tailored protrusion settings 214 Order for matching font attributes 89

MICRO-TYPOGRAPHY WITH TEX 4

1 Micro-typography with TEXMicro-typography is the art of enhancing the appearance and readability of adocument while exhibiting a minimum degree of visual obtrusion It is concernedwith what happens between or at the margins of characters words or lines Whereasthe macro-typographical aspects of a document (ie its layout) are clearly visibleeven to the untrained eye micro-typographical refinements should ideally not evenbe recognisable That is you may think that a document looks beautiful but youmight not be able to tell exactly why good micro-typographic practice tries toreduce all potential irritations that might disturb a reader

Some essential micro-typographical aspects are already taken care of by TEX outof the box ndash and in an outstanding manner ndash namely hyphenation and justificationas well as kerning and ligatures Other aspects are in the userrsquos scope of responsib-ilities eg to specify the right amounts of spacing around punctuation charactersnumbers or quotation marks On top of this a number of long-standing micro-typographic techniques have been introduced to the TEX world relatively recentlywith pdfTEX and have since also propagated to LuaTEX and XETEX These featuresmake them the tool of choice not only for the creation of electronic documentsbut also of works of outstanding time-honoured typography most prominentlycharacter protrusion (also known as margin kerning) and font expansion QuotingHagraven Thecirc Thagravenh the author of pdfTEX who writes in his thesis

After you have read the texton the right you can viewthe effect of the features itdescribes by clicking on thelinks

Protrusion onoff

Expansion onoff

Both features are enabledthroughout this document

lsquoMargin kerning is the adjustments of the characters at the margins of a typeset textA simplified employment of margin kerning is hanging punctuation Margin kerningis needed for optical alignment of the margins of a typeset text because mechanicaljustification of the margins makes them look rather ragged Some characters canmake a line appear shorter to the human eye than others Shifting such charactersby an appropriate amount into the margins would greatly improve the appearanceof a typeset text

Composing with font expansion is the method to use a wider or narrower variantof a font to make interword spacing more even A font in a loose line can be substi-tuted by a wider variant so the interword spaces are stretched by a smaller amountSimilarly a font in a tight line can be replaced by a narrower variant to reducethe amount that the interword spaces are shrunk by There is certainly a potentialdanger of font distortion when using such manipulations thus they must be usedwith extreme care The potentiality to adjust a line width by font expansion can betaken into consideration while a paragraph is being broken into lines in order tochoose better breakpointsrsquo [Thagravenh 2000 p 323]

lsquoMargin kerning is the adjustments of the characters at the margins of a typeset textA simplified employment of margin kerning is hanging punctuation Margin kerningis needed for optical alignment of the margins of a typeset text because mechanicaljustification of the margins makes them look rather ragged Some characters canmake a line appear shorter to the human eye than others Shifting such charactersby an appropriate amount into the margins would greatly improve the appearanceof a typeset text

Composing with font expansion is the method to use a wider or narrower variant ofa font to make interword spacing more even A font in a loose line can be substitutedby a wider variant so the interword spaces are stretched by a smaller amountSimilarly a font in a tight line can be replaced by a narrower variant to reducethe amount that the interword spaces are shrunk by There is certainly a potentialdanger of font distortion when using such manipulations thus they must be usedwith extreme care The potentiality to adjust a line width by font expansion can betaken into consideration while a paragraph is being broken into lines in order tochoose better breakpointsrsquo [Thagravenh 2000 p 323]

lsquoMargin kerning is the adjustments of the characters at the margins of a typeset textA simplified employment of margin kerning is hanging punctuation Margin kerningis needed for optical alignment of the margins of a typeset text because mechanicaljustification of the margins makes them look rather ragged Some characters canmake a line appear shorter to the human eye than others Shifting such charactersby an appropriate amount into the margins would greatly improve the appearanceof a typeset text

Composing with font expansion is the method to use a wider or narrower variantof a font to make interword spacing more even A font in a loose line can be substi-tuted by a wider variant so the interword spaces are stretched by a smaller amountSimilarly a font in a tight line can be replaced by a narrower variant to reducethe amount that the interword spaces are shrunk by There is certainly a potentialdanger of font distortion when using such manipulations thus they must be usedwith extreme care The potentiality to adjust a line width by font expansion can betaken into consideration while a paragraph is being broken into lines in order tochoose better breakpointsrsquo [Thagravenh 2000 p 323]

If you had a PDF viewer thatunderstands PDF 15 youcould view the effect of themicro-typographic features byclicking on the links

Both features are enabledthroughout this document

lsquoMargin kerning is the adjustments of the characters at the margins of a typeset textA simplified employment of margin kerning is hanging punctuation Margin kerningis needed for optical alignment of the margins of a typeset text because mechanicaljustification of the margins makes them look rather ragged Some characters canmake a line appear shorter to the human eye than others Shifting such charactersby an appropriate amount into the margins would greatly improve the appearanceof a typeset text

Composing with font expansion is the method to use a wider or narrower variant of afont to make interword spacing more even A font in a loose line can be substituted bya wider variant so the interword spaces are stretched by a smaller amount Similarlya font in a tight line can be replaced by a narrower variant to reduce the amountthat the interword spaces are shrunk by There is certainly a potential danger of fontdistortion when using such manipulations thus they must be used with extremecare The potentiality to adjust a line width by font expansion can be taken intoconsideration while a paragraph is being broken into lines in order to choose betterbreakpointsrsquo [Thagravenh 2000 p 323]

Another micro-typographic technique which has always been extremely difficultto achieve in TEX is robust and hyphenatable letterspacing (tracking)1 Whereasletterspacing can easily be and often is abused when applying it to lowercaseletters readability may be increased by slightly letterspacing (small) capitals or bydecreasing the tracking of very large uppercase type

Setting additional kerning for individual characters is especially (but not only)useful for languages whose typographical tradition requires certain characters to beseparated by a space For example it is customary in French typography to add asmall space before question mark exclamation mark and semi-colon and a biggerspace before the colon and the guillemets Until now this could only be achieved

1 The soul package undertakes great efforts but may still fail in certain circumstances even to systemat-ically adjust the tracking of a font throughout the document remains impossible

GETTING STARTED 5

by making these characters active (as is done for example by the babel package)which may not always be a robust solution In contrast to the standard kerningbuilt into the fonts (which will of course apply as usual) this additional kerningrelates to single characters not to character pairs

Adjustment of interword spacing is based upon the idea that in order to achievea uniform greyness of the text the space between words should also depend onthe surrounding characters For example if a word ends with an lsquorrsquo the followingspace should be a tiny bit smaller than that following say an lsquomrsquo You can thinkof this concept as an extension to TEXrsquos lsquospace factorsrsquo This feature may enhancethe appearance of paragraphs even more Emphasis in the last sentence is onthe word lsquomayrsquo this extension is still highly experimental ndash in particular onlyending characters will currently influence the interword space Also the settingsshipped with microtype are but a first approximation and I would highly welcomecorrections and improvements I suggest reading the reasoning behind the settingsin section 159

The possibility finally to disable all or selected ligatures is particularly useful fortypewriter fonts

The microtype package provides an interface to all these micro-typographic exten-sions All micro-typographic aspects may be customised to your taste and needs ina straight-forward and systematic manner The next chapters present a survey ofall options and customisation possibilities Should the micro-typographic extensiondiscussed in a section work only with certain TEX engines this requirement ismarked inside a grey text box on the right

2 Getting startedThere is nothing surprising in loading this package

usepackagemicrotype

This will be sufficient in most cases and if you are not interested in fine-tuningthe micro-typographic appearance of your document (however unlikely this wouldseem since using this package is proof of your interest in typographic issues) youmay actually skip the rest of this document If this on the other hand does notsatisfy you ndash be it for theoretical or practical reasons ndash this manual will guide youon the path to the desired results along the following milestones

bull Enable the desired micro-typographic features either via the respective packageoption or with the microtypesetup command (section 3)

bull Select the fonts to which this feature should be applied by declaring and activatinglsquosets of fontsrsquo A number of sets are predefined which may be activated directly inthe package options (section 4)

bull Fine-tune the micro-typographic settings of the fonts or sets of fonts (section 5)

bull If yoursquore of the kind who always wants to march on you will certainly be interestedin the possibility of context-sensitive setup (section 6)

bull You are even countenanced to leave the path of typographic virtue and steal somesheep (section 7) or trespass in other ways (section 8)

bull Should you encounter any obstacles follow the hints and caveats (section 9)

OPTIONS 6

3 OptionsLike many other LATEX packages the microtype package accepts options in thewell-known key=value syntax In the following you will find a description of allkeys and their possible values (lsquotruersquo may be omitted multiple values whereallowed must be enclosed in braces the default value is shown on the right ndashif preceded by an asterisk this default only applies when running an up-to-datepdfTEX in PDF mode)

31 Enabling the micro-typographic featurestrue false compatibility nocompatibility langfont set namerang trueprotrusion

These are the main options to control the level of micro-typographic refinementexpansionwhich the fonts in your document should gain By default the package is moderatelygreedy character protrusion will always be enabled font expansion will only bedisabled when the fonts cannot be expanded automatically that is with pdfTEXversions older than 120 or in DVI output mode (see section 35) or with XETEX Inother words microtype will try to apply as much micro-typography as can safely beexpected to work under the respective conditions (hence it is usually not necessaryto load the package with different options eg for PDF resp DVI mode)

Protrusion and expansion may be enabled or disabled independently from eachother by setting the respective key to true resp false The activate option is aactivateshortcut for setting both options at the same time Therefore the following linesall have the same effect (when creating PDF files with a recent version of pdfTEX)

usepackage[protrusion=trueexpansion]microtype

usepackage[activate=truenocompatibility]microtype

usepackagemicrotype

With activated font expansion andor character protrusion line breaks (and con-sequently page breaks) may turn out differently If this is not desired ndash because youare re-typesetting a book whose pagination must not change ndash you may pass thevalue compatibility to the protrusion andor expansion options Typographicallyhowever the results will be suboptimal hence the default value is nocompatibility

Finally you may also specify the name of a font set to which character protrusionandor font expansion should be restricted See section 4 for a detailed discussionSpecifying a font set for a feature implicitly activates this feature

true false langfont set namerang falsetracking

This option will systematically change the tracking of the fonts specified in theactive font set (by default all small capitals) It is not available with XETEX (youmay use the lsquoLetterSpacersquo option of the fontspec package instead) With pdfTEXit is only available in PDF mode

true false langfont set namerang falsekerning

These features do not unconditionally improve the quality of the typeset text thespacingspacing feature is still considered experimental while the kerning feature onlymakes sense in special cases Therefore neither feature is enabled by default Theyare not available with XETEX or LuaTEX

OPTIONS Character protrusion 7

Table 1

Availability of micro-typographic features

TEX engine Micro-typographic features

Engine Version Output Protrusion Expansion Tracking Kerning Spacing

manual automatic

pdfTEX lt 014f DVIPDF empty empty empty empty empty emptyge 014f DVIPDF AElig empty empty empty emptyge 120 DVI AElig empty empty empty empty

PDF AElig AElig empty empty emptyge 140 DVI AElig empty empty

PDF AElig AElig

LuaTEX ge 030 DVI AElig empty empty empty emptyPDF AElig AElig empty empty empty

ge 062 DVI AElig empty ()a empty emptyPDF AElig empty AElig empty empty

XETEX ge 09997 PDF AElig empty empty empty empty empty

AElig = enabled = not enabled empty = not available a by means of variable tracking

Table 1 presents an overview of which micro-typographic features are availableand enabled by default for the relevant TEX versions and output modes

Whether ligatures should be disabled cannot be controlled via a package optionbut by using the DisableLigatures command which is explained in section 8

32 Character protrusion pdfTEX 014f | LuaTEX 030 | XETEX 09997

langintegerrang 1000factor

Using this option you can globally increase or decrease the amount by which thecharacters will be protruded While a value of 1000 means that the full protrusionas specified in the configuration (see section 51) will be used a value of 500 wouldresult in halving all protrusion factors of the configuration This might be useful ifyou are generally satisfied with the settings but prefer the margin kerning to beless or more visible (eg if you are so proud of being able to use this feature thatyou want everybody to see it or ndash to mention a motivation more in compliancewith typographical correctness ndash if you are using a large font that calls for moremodest protrusion)

character langdimensionrang characterunit

This option is described in section 51 apropos the command SetProtrusion Usewith care

33 Font expansion pdfTEX 014f | LuaTEX 030

true false trueauto

Beginning with pdfTEX version 120 (inherited by LuaTEX) the expanded instancesof the fonts may be calculated automatically and at run-time instead of the user

OPTIONS Tracking 8

having to prepare them in advance This option is true by default provided that youare using a TEX engine with this capability and the output mode is PDF2 If auto isset to false the font instances for all expansion steps must exist (with files calledlangfont namerangplusmnlangexpansion valuerang eg cmr12+10 as described in the pdfTEX manual)With recent versions of LuaTEX expansion is always automatic

When generating DVI files font expansion has to be enabled explicitly WithpdfTEX automatic font expansion will not work because the postprocessing drivers(dvips dvipdfm etc) resp the DVI viewer are not able to generate the fonts on thefly With LuaTEX on the other hand expansion in DVI mode is realised by modifyingthe inter-letter spacing (tracking) instead of the glyphs themselves which may ormay not be desired

langintegerrang 20stretch

You may specify the stretchability and shrinkability of a font ie the maximumshrinkamount that a font may be stretched or shrunk The numbers will be divided by1000 so that a stretch limit of 10 means that the font may be expanded by upto 1 The default stretch limit is 20 The shrink limit will by default be the sameas the stretch limit

langintegerrang 1step

Fonts are not expanded by arbitrary amounts but only by certain discrete stepswithin the expansion limits With recent versions of pdfTEX (140 or newer) orLuaTEX this option is by default set to 1 in order to allow trying the maximumnumber of font instances and hence to guarantee the best possible output3 OlderpdfTEX versions however had to include every font instance in the PDF file whichmay increase the file size quite dramatically Therefore in case you are using apre-140 pdfTEX version step is by default set to one fifth of the smaller value ofstretch and shrink

true false falseselected

When applying font expansion it is possible to restrict the expansion of somecharacters that are more sensitive to deformation than others (eg the lsquoOrsquo incontrast to the lsquoIrsquo) This is called selected expansion and its usage allows increasingthe stretch and shrink limits (to say 30 instead of 20) however the gain is limitedsince at the same time the average stretch variance will be decreased Thereforethis option is by default set to false so that all characters will be expanded by thesame amount See section 52 for a more detailed discussion

34 Tracking pdfTEX 140 | LuaTEX 062

langintegerrang 100letterspace

This option changes the default amount for tracking (see section 53) resp letter-spacing (see section 7) The amount is specified in thousandths of 1em admissiblevalues are in the range of minus1000 to +1000

2 With pdfTEX automatic font expansion does not work with bitmap fonts Therefore if you are using theComputer Modern Roman fonts in T1 encoding you should either install the cm-super package or usethe Latin Modern fonts (package lmodern)

3 The downside with this default is that pdfTEX may run out of memory with huge documents in thiscase read about the error messages in the lsquoHints and caveatsrsquo section (9) or try with a larger step

OPTIONS Miscellaneous options 9

35 Miscellaneous optionstrue false falsedraft

If the draft option is passed to the package all micro-typographic extensions willfinalbe disabled which may lead to different line and hence page breaks The draftand final options may also be inherited from the class options of course you canoverride them in the package options Eg if you are using the class option draftto show any overfull boxes you should load microtype with the final option

true false errors silent falseverbose

Information on the settings used for each font will be written into the log file ifyou enable the verbose option When microtype encounters a problem that is notfatal (eg an unknown character in the settings or non-existent settings) it willby default only issue a warning and try to continue Loading the package withverbose=errors will turn all warnings into errors so that you can be sure that noproblem will go unnoticed If on the other hand you have investigated all warningsand decide to ignore them you may silence microtype with verbose=silent

true false falsebabel

Loading the package with the babel option will adjust the typesetting according tothe respective selected language Read section 6 for further information

langfile namerang microtypeconfig

Various settings for this package will be loaded from a main configuration file bydefault microtypecfg (see section 57) You can have a different configuration fileloaded instead by specifying its name without the extension eg config=mycrotype

true false falseDVIoutput

pdfTEX and LuaTEX are not only able to generate PDF output but can also spit outDVI files In fact all recent TEX systems are using pdfTEX as the default enginealso for DVI output and LuaTEX too can be called in DVI mode However sincechanging the output mode inside the document may have undesired effects thisoption should be considered deprecated instead it is recommended to just callthe respective program (latex resp dvilualatex) For XETEX this option is notapplicable

36 Changing options laterlangkey = value listrangmicrotypesetup

Inside the preamble this command accepts all package options described above(except for config) In the document body this command may be used to changethe general settings of the micro-typographic extensions It then accepts all optionsfrom section 31 expansion protrusion and activate which in turn may receivethe values true false compatibility or nocompatibility and tracking kerningand spacing with the admissible values true or false Passing the name of a fontset is not allowed Using this command you could for instance temporarily disablefont expansion by saying

microtypesetupexpansion=false

SELECTING FONTS FOR MICRO-TYPOGRAPHY 10

4 Selecting fonts for micro-typographyBy default character protrusion will be applied to all text fonts used in the docu-ment and a basic set of fonts will be subject to font expansion You may want tocustomise which fonts should get the benefit of micro-typographic treatment Thiscan be achieved by declaring and activating lsquofont setsrsquo these font sets are specifiedvia font attributes that have to match

[langfeaturesrang] langset namerang langset of fontsrangDeclareMicrotypeSet

This command declares a new set of fonts to which the micro-typographic exten-DeclareMicrotypeSetsions should be applied The optional argument may contain a comma-separatedlist of features to which this set should be restricted The starred version of thecommand declares and activates the font set at the same time

The set of fonts is specified by assigning values to the NFSS font attributes encod-ing family series shape and size (cf LATEX 2ε font selection) Letrsquos start with anexample In the main configuration file microtypecfg a font set called lsquobasictextrsquois defined as follows

DeclareMicrotypeSetbasictext encoding = OT1T1T2ALY1OT4QXT5EU1EU2TU family = rmsf series = md size = normalsizefootnotesizesmalllarge

If you now call

UseMicrotypeSet[protrusion]basictext

in the documentrsquos preamble only fonts in the text encodings roman or sansserif families normal (or lsquomediumrsquo) series and in sizes called by normalsizefootnotesize small or large will be protruded Math fonts on the other handwill not since they are in another encoding Neither will fonts in bold face or hugefonts Etc

If an attribute list is empty or missing ndash like the lsquoshapersquo attribute in the aboveexample ndash it does not constitute a restriction In other words this is equivalentto specifying all possible values for that attribute Therefore the predefined setlsquoalltextrsquo which is declared as

DeclareMicrotypeSetalltext encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU

is far less restrictive The only condition here is that the encoding must matchIf a value is followed by an asterisk (like lsquormrsquo and lsquosfrsquo in the first example)

it does not designate an NFSS code but will be translated into the documentrsquoslangvaluerangdefault eg rmdefault4 A single asterisk means langattributerangdefaulteg encodingdefault respectively normalsize for the size axis Sizes may eitherbe specified as a dimension (lsquo10rsquo or lsquo10ptrsquo) or as a size selection command withoutthe backslash You may also specify ranges (eg lsquosmall-Largersquo) while the lower

4 These translations will take place AtBeginDocument which means that changes to the defaults inside thepreamble will also be taken into account Only in cases where you change font defaults AtBeginDocumentyourself you need to load microtype after these changes

SELECTING FONTS FOR MICRO-TYPOGRAPHY 11

Table 2

Predefined font sets

Set name Font attributes

Encoding Family Series Shape Size

all empty empty empty empty empty

alltext(allmath)

Text encodings TS1(OML OMS U)

empty empty empty empty

alltext-nott(allmath-nott)

Text encodings TS1(OML OMS U)

rmsf

empty empty empty

basictext(basicmath)

Text encodings(OML OMS)

rmsf

md empty normalsizefootnotesizesmall large

smallcaps Text encodings empty empty scsiscit empty

footnotesize Text encodings TS1 empty empty empty -small

scriptsize Text encodings TS1 empty empty empty -footnotesize

normalfont encoding family series shape normalsize

lsquoText encodingsrsquo = OT1 T1 T2A LY1 OT4 QX T5 EU1 EU2 TU lsquo rsquo = lsquo defaultrsquo

boundary is included in the range the upper boundary is not Thus lsquo12-16rsquo wouldmatch 12 pt 135 pt and 15999 pt for example but not 16 pt You are allowed toomit the lower or upper bound (lsquo-10rsquo lsquolarge-rsquo)

Additionally to this declaration scheme you can add single fonts to a set usingthe lsquofontrsquo key which expects the concatenation of all font attributes separated byforward slashes ie lsquofont = langencodingranglangfamilyranglangseriesranglangshaperanglangsizerangrsquo This allowsyou to add fonts to the set that are otherwise disjunct from it For instance if youwanted to have the roman family in all sizes protruded but only the normal sizedpossibly italic typewriter font (in contrast to say the small one) this is how youcould declare the set

DeclareMicrotypeSet[protrusion] myset encoding = T1 family = rm font = T1ttmn T1ttmit

As you can tell from the example the asterisk notation is also permitted for thefont key A single asterisk is equivalent to lsquorsquo ie the normal font Sizeselection commands are possible too however ranges are not allowed

Table 2 lists the eleven predefined font sets They may also be activated by passingtheir name to the feature options protrusion expansion tracking kerning andspacing when loading the package for example

usepackage[protrusion=allmathtracking=smallcaps]microtype

MICRO FINE TUNING 12

[langfeaturesrang] langset namerangUseMicrotypeSet

This command activates a font set previously declared by DeclareMicrotypeSetUsing the optional argument you can limit the application of the set to one ormore features This command only has an effect if the feature was activated in thepackage options

[langfeaturesrang] langset namerangDeclareMicrotypeSetDefault

If a feature is enabled but no font set has been chosen explicitly the sets declared bythis command will be activated By default the lsquoalltextrsquo font set will be activatedfor character protrusion and additional kerning the lsquoalltext-nottrsquo set for fontexpansion and interword spacing and the lsquosmallcapsrsquo set for tracking

These commands may only be used in the preamble or in the main configuration fileTheir scope is global to the document Only one set per feature may be activated

5 Micro fine tuningEvery character asks for a particular protrusion kerning or spacing amount Itmay also be desirable to restrict the maximum expansion of certain charactersFurthermore since every font looks different settings have to be specific to afont or set of fonts This package offers flexible and straight-forward methods ofcustomising these finer aspects of micro-typography

All fine-tuning commands follow basically the same syntax they all take threearguments the first one is optional and may contain additional options in thesecond argument you specify the set of fonts to which the settings should apply thethird argument contains the actual settings Here as in all configuration commandsall spaces are ignored

The set of fonts to which the settings should apply is declared using the samesyntax of langfont axisrang = langvalue listrang pairs as for the command DeclareMicrotypeSet(see section 4) with the only difference that values including asterisks (which asyou may recall stand for the respective default) will be translated immediatelyinstead of at the end of the preamble To find the matching settings for a givenfont the package will try all combinations of font encoding family series shapeand size with decreasing significance in this order For instance if settings exist forboth the current family (say T1cmr) and for italic fonts in the normal weight(T1mit) the settings for the cmr family would apply The encoding must alwaysmatch

The characters may be specified either as a single letter (A) as a text sym-bol command (textquoteleft) or as a slot number (resp Unicode number forLuaTEX or XETEX) three or more digits for decimal notation prefixed with forhexadecimal with rsquo for octal numerals (eg the lsquoflrsquo ligature in T1 encoding 0291D rsquo35) 8-bit (and even UTF-8) characters may be entered directly or in LATEXrsquostraditional 7-bit notation both A and Auml are valid provided the character is ac-tually declared in both the input and the font encoding With LuaTEX or XETEXyou may additionally specify a (font-specific) glyph name prefixed with lsquorsquo (egthe lsquoflrsquo ligature as f_l) Note that you also have the possibility to declare lists ofcharacters that should inherit settings (see section 56)

MICRO FINE TUNING Character protrusion 13

51 Character protrusion pdfTEX 014f | LuaTEX 030 | XETEX 09997

[langoptionsrang] langset of fontsrang langprotrusion settingsrangSetProtrusion

Using this command you can set the protrusion factors for each character of a fontor a set of fonts A very incomplete example would be the following

SetProtrusion encoding = T1 family = cmr A = 5050 textquoteleft = 700

which would result in the character lsquoArsquo being protruded by 5 of its width onboth sides and the left quote character by 70 of its width into the left marginThis would apply to all font shapes series and sizes of the T1 encoded ComputerModern Roman family

The protrusion settings consist of langcharacterrang = langprotrusion factorsrang pairs The pro-trusion factors designate the amount that a character should be protruded intothe left margin (first value) respectively into the right margin (second value) Bydefault the values are relative to the character widths so that a value of 1000means that the character should be shifted fully into the margin while for examplewith a value of 50 it would be protruded by 5 of its width Negative values areadmitted as well as numbers larger than 1000 (but effectively not more than 1emof the font) You may omit either number if the character should not be protrudedon that side but must not drop the separating comma

Options

name You may assign a name to the protrusion settings so that you are able toload it by another list

load You can load another list (provided you assigned a name to it) before thecurrent list will be loaded so that the fonts will inherit the values from the loadedlist

In this way the configuration may be simplified considerably You can for instancecreate a default list for a font settings for other shapes or series can then load thesesettings and extend or overwrite them (since the value that comes last will take pre-cedence) Font settings will be loaded recursively The following options will affectall loaded lists in other words any options from the loaded lists will be ignored

factor This option can be used to influence all protrusion factors of the listoverriding any global factor setting (see section 32) For instance if you wantfonts in larger sizes to be protruded less you could load the normal lists just witha different factor applied to them

SetProtrusion [ factor = 700 load = cmr-T1 ] encoding = T1 family = cmr size = large-

MICRO FINE TUNING Font expansion 14

unit By default the protrusion factors are relative to the respective characterrsquoswidth The unit option may be used to override this and make microtype regardall values in the list as thousandths of the specified width Issuing for instancelsquounit=1emrsquo would have the effect that a value of say 50 now results in the characterbeing protruded by 5 of an em of the font (thus simulating the internal measuringof pdfTEXrsquos lpcode and rpcode primitives) The default behaviour can be restoredwith unit=character5

preset Presets the protrusion codes of all characters to the specified values(=langleftranglangrightrang) possibly scaled by a factor A unit setting will only be takeninto account if it is not =character

inputenc Selects an input encoding that should apply to this list regardless ofwhat the documentrsquos input encoding is You may specify any encoding that can beloaded via the inputenc package eg ansinew koi8-r utf8

context The scope of the list may be limited to a certain context For furtherdetails see section 6

52 Font expansion pdfTEX 014f | LuaTEX 030

[langoptionsrang] langset of fontsrang langexpansion settingsrangSetExpansion

By default all characters of a font are allowed to be stretched or shrunk by the sameamount However it is also possible to limit the expansion of certain characters ifthey are more sensitive to deformation This is the purpose of the SetExpansioncommand Note that it will only have an effect if the package has been loadedwith the selected option (cf section 33) Otherwise the expansion settings willbe ignored ndash unlike the options in the optional first argument which will still beevaluated If the selected option has been set to true and settings for a font donrsquotexist font expansion will not be applied to this font at all Should the extraordinarysituation arise that you want to employ selected expansion in general but for aparticular font (set) all characters should be expanded or shrunk by the sameamount you would have to declare an empty list for these fonts

The expansion settings consist of langcharacterrang = langexpansion factorrang pairs You mayspecify one number for each character which determines the amount that a charac-ter may be expanded The numbers denominate thousandths of the full expansionFor example if you set the expansion factor for the character lsquoOrsquo to 500 it will onlybe expanded or shrunk by one half of the amount that the rest of the characterswill be expanded or shrunk While the default value for character protrusion is 0 ndashthat is if you didnrsquot specify any characters none would be protruded ndash the defaultvalue for expansion is 1000 which means that all characters would be expandedby the same amount

Options

name load preset inputenc context Analogous to SetProtrusion the optionalargument may be used to assign a name to the list to load another list to preset

5 The unit option can even be passed globally to the package (cf section 32) However all providedsettings are created under the assumption that the values are relative to the character width Thereforeyou should only change it if you are certain that the default settings will not be used in your document

MICRO FINE TUNING Tracking 15

all expansion factors to set the input encoding or to determine the context of thelist (expansion contexts are only possible with pdfTEX version 1404 or newer)

auto stretch shrink step These keys can be used to override the global set-tings from the package options (see section 33) If you donrsquot specify either one ofstretch shrink and step their respective global value will be used (that is nocalculation will take place)

As a practical example suppose you have a paragraph containing a widow thatcould be avoided by shrinking the font a bit more In conjunction with the contextoption (see section 6 for further details) you could thus allow for more expansionin this particular paragraph

SetExpansion [ context = sloppy stretch = 30 shrink = 60 step = 5 ] encoding = OT1T1TS1 END PREAMBLEmicrotypecontextexpansion=sloppy This paragraph contains a `fussy widow

This method of employing contexts to temporarily apply different expansion para-meters only works with pdfTEX version 1404 or later6 or with LuaTEX Also notethat both pdfTEX and LuaTEX prohibit the use of fonts with different expansionlimits or steps (even of different fonts) within one paragraph hence the sloppycontext would have to be applied to complete paragraphs

factor This option provides a different method to alter expansion settings forcertain fonts working around the restriction just mentioned The factor optioninfluences the expansion factors of all characters (in contrast to the overall stretch-ability) of the font For instance if you want the italic shape to be expanded lessyou could declare

SetExpansion [ factor = 500 ] encoding = shape = it

The factor option can only be used to decrease the stretchability of the charactersthat is it may only receive values smaller than 1000 Also it can only be used forsingle fonts or font sets setting it globally in the package options wouldnrsquot makemuch sense ndash to this end you use the packagersquos stretch and shrink options

53 Tracking pdfTEX 140 | LuaTEX 062

[langoptionsrang] langset of fontsrang langtracking amountrangSetTracking

An important typographic technique ndash which was missing in TEX for a long time ndash isthe adjustment of tracking ie the uniform addition or subtraction of letter space

6 For older versions a dirty trick is laid out in section 142 on page 59

MICRO FINE TUNING Tracking 16

tofrom all the characters in a font For example it is good typographic practiceto slightly space out text set in all capitals or small capitals (as in this document)Legibility may also be improved by minimally increasing the tracking of smallerand decreasing that of larger type7 The SetTracking command allows specifyingthe tracking amount for different fonts or font sets It will also be evaluated by thetextls command which may be used for letterspacing shorter pieces of text (seesection 7)

The tracking amount is specified in thousandths of 1em (or the given unit)negative values are allowed too

Options

name unit context These options serve the same functions as in the previousconfiguration commands The unit may be any dimension default is 1em

spacing When the inter-letter spacing is altered the inter-word spacing probablyalso needs to be adjusted This option expects three numbers for interword spacestretch and shrink respectively which are given in thousandths of 1em (or of thecurrent unit) If a value is followed by an asterisk it denotes thousandths of therespective font dimension which will be added to it For instance with

SetTracking[ spacing = 25166 ] encoding = shape = sc 25

the interword space will be increased by 25 the stretch amount will be set to0166em while the shrink amount will be left untouched If you donrsquot specifythe spacing option the interword space will be scaled by the current letterspaceamount (as in the above example) while stretch and shrink will not be changed

outer spacing If an interword space immediately precedes or follows letter-spaced text it will by default be equal to that within the text With this optionwhich accepts the same values as spacing it may be adjusted independently

outer kerning If on the other hand no interword space precedes or followsyou may still want to slightly set off the first and last letter from adjoining lettersThis option expects the kerning amounts for left and right hand side separated bya comma in thousandths of 1em (or the current unit) If a value is followed byan asterisk it denotes thousandths of the current letterspacing amount A singleasterisk means lsquo500rsquo this is also the default ie the sum of the outer kerns is bydefault equal to the current letterspace amount To remove kerning on both sidesyou would write lsquoouter kerning=00rsquo

no ligatures By default ligatures in letterspaced fonts will be constructed asusual which may be advisable when changing the tracking by only a small amountFor larger letterspacing amounts on the other hand the normal letter space withinligatures would have displeasing e ff e c t s This key expects a comma-separatedlist of characters for which ligatures should be disabled only the character thatbegins a ligature must be specified If the key is given without a value all ligaturesof the font will be disabled With pdfTEX this is not recommended however sinceit entails that kerning will be switched off too With LuaTEX there is no suchlimitation The default settings disable ligatures for the character lsquofrsquo only ie lsquoffrsquo

7 With full-featured fonts like Computer Modern this is usually not necessary though since they come inoptical sizes and the tracking of the small-capitals font is already adjusted

MICRO FINE TUNING Tracking 17

lsquofirsquo ffirsquo etc8 In exceptional situations you can manually break up a ligature byinserting lsquokern0ptrsquo resp babelrsquos | shortcut or protect it by enclosing it inlslig (see section 7)

Since a picture is worth a thousand words probably even more if in our case itdepicts a couple of letterspaced words letrsquos bring one to sum up these somewhatconfusing options Suppose you had the following settings (which are in no wayrecommended they only serve illustrative purposes)

SetTracking [ no ligatures = f spacing = 600-100 outer spacing = 450250150 outer kerning = ] encoding = 160

and then write

Stop textlsstealing sheep

this would be the (typographically dubious) outcomeClick on the image to show thekerns and spacings involvedClick on emphasised words inthe text below to reveal therelation of image and code

If you had a PDF viewer thatunderstands PDF 15 youcould hide the arrows select-ively

Stop T e a l i n g s h e e pWhile the word lsquoStoprsquo is not letterspaced the space between the letters in the othertwo words is expanded by the tracking amounttracking amounttracking amount of 1601000em = 016em Theinner spaceinner spaceinner space within the letterspaced text is increased by 60 while its stretchstretchstretch amountis decreased by 10 and the shrinkshrinkshrink amount is left untouched The outer spaceouter spaceouter space (of045em) immediately before the piece of text may stretchstretchstretch by 025em and shrinkshrinkshrinkby 015em Note that there is no outer space after the text since the exclamationmark immediately follows instead the default outer kernouter kernouter kern of half the letterspaceamount (008em) is added Furthermore one ligatureligatureligature wasnrsquot broken up becausewe neglected to specify the lsquosrsquo in the no ligatures key

As another more realistic example suppose you want to space out all small capitalsby 501000em fonts smaller than small by 002em and to decrease the trackingof large type by 002em This could be achieved with the following settings

usepackage[tracking=true]microtypeDeclareMicrotypeSet[tracking]my encoding = size = -smallLarge- font = sc SetTracking[ no ligatures = f ] encoding = shape = sc 50 SetTracking encoding = size = -small 20 SetTracking encoding = size = Large- -20

Letterspaced fonts for which settings donrsquot exist will be spaced out by the default of01em (adjustable with the package option letterspace see section 35) Suppose

8 With pdfTEX versions older than 1404 all ligatures and hence all kerning will be disabled It istherefore recommended to use at least version 1404

MICRO FINE TUNING Additional kerning 18

your editor wants you to shorten your 1000-pages chef-drsquoœuvre by a handful ofpages you could load microtype with (fingers crossed)

usepackage[tracking=alltextletterspace=-40]microtype

54 Additional kerning pdfTEX 140

[langoptionsrang] langset of fontsrang langkerning settingsrangSetExtraKerning

With this command you can fine tune the extra kerning In contrast to standardkerning which is always associated with a pair of characters and to trackingwhich specifies the space between all characters of a font the extra kerning relatesto single characters that is whenever a particular character appears in the textthe specified kerning will be inserted regardless of which character precedes respfollows it (Put differently this feature allows modifying the left or right sidebearingsof specific glyphs)

It should not be neglected to mention a limitation of this feature words imme-diately following such a kern (not separated by a space) will not be hyphenatedunless you insert the breakpoints manually eg for kerning after the apostrophelsquolrsquoapos-trophersquo Furthermore additional kerning will not be applied in mathmode These restrictions of pdfTEX will hopefully be lifted some time

The kerning settings are specified as pairs of langcharacterrang = langkerning valuesrang wherethe latter consist of two values the kerning added before the character and thekerning appended after the respective character Once again either value may beomitted but not the separating comma

Options

name load factor preset inputenc These options serve the same function asin the previous configuration commands

unit Admissible values are space character and a langdimensionrang By default thevalues denote thousandths of 1em

context When it comes to kerning settings this option is especially useful sinceit allows applying settings depending on the current language

For example you can find the following settings intended to be used for documentswritten in French in the main configuration file

SetExtraKerning [ name = french-default context = french unit = space ] encoding = OT1T1LY1 = 1000 = fontdimen2 = 500 ~ thinspace = 500 = 500

What is the result of these settings If they are active like in the current paragrapha thin space will be inserted in front of each question mark exclamation mark and

MICRO FINE TUNING Interword spacing 19

semicolon a normal space in front of the colon Read section 6 to learn how toactivate these settings This paragraph was input like this

beginmicrotypecontextkerning=french What is the result of these settings If they are active like in the current paragraph a thin space will be inserted in front of each question mark exclamation mark and semicolon a normal space in front of the colon Read section~refseccontext to learn how to activate these settings This paragraph was input like thisendmicrotypecontext

55 Interword spacing pdfTEX 140

[langoptionsrang] langset of fontsrang langspacing settingsrangSetExtraSpacing

This command allows you to fine tune the interword spacing (also known as glue)A preliminary remark on what a lsquospacersquo is may be in order between two wordsTEX will insert a so called glue which is characterised by three parameters ndash thenormal distance between two words the maximum amount of space that may beadded to it and the maximum amount that may be subtracted The latter twoparameters come into effect whenever TEX tries to break a paragraph into lines anddoes not succeed it can then stretch or shrink the spaces between words Thesethree parameters are specific to each font

On top of these glue dimensions TEX has the concept of lsquospace factorsrsquo Theymay be used to increase the space after certain characters most prominently thepunctuation characters pdfTEXrsquos additional spacing adjustment may be consideredas an extension to space factors with much finer control while space factorswill influence all three parameters of interword space (or glue) by the sameamount ndash the kerning the maximum amount that the space may be stretched andthe maximum amount that it may be shrunk ndash you may modify these parametersindependently from one another Furthermore the values may be set differentlyfor each font And probably most importantly the parameters may not only beincreased but also decreased Note that when interword spacing adjustment is ineffect space factors are ignored

The spacing settings are declared as pairs of langcharacterrang = langspacing factorsrang wherethe latter consist of three numbers first the additional kern inserted after thischaracter if it appears before an interword space second the additional stretchamount and third the additional shrink amount All values may also be negativein which case the dimensions will be decreased Not all values have to be specifiedbut the settings must always contain the two separating commas

Options

name load factor preset inputenc context These options serve the same func-tion as in the previous configuration commands

unit You can specify the unit by which the specified numbers are measuredPossible values are character a langdimensionrang and additionally space The latterwill measure the values in thousandths of the respective space dimension set bythe font By default the unit is measured by the space dimensions For examplewith the following (nonsensical) settings

MICRO FINE TUNING Character inheritance 20

SetExtraSpacing [ unit = space ] default font = = 100010001000

the space inserted after a full stop would be doubled (technically speaking 2 timesfontdimen 2) as would the maximum stretch and shrink amounts of the interwordspace (fontdimen3 and 4) Conversely setting all three values to minus1000 wouldcompletely cancel a space after the respective character

56 Character inheritance[langfeaturesrang] langset of fontsrang langinheritance listsrangDeclareCharacterInheritance

In most cases accented characters should inherit the settings from the respectivebase character For example all of the characters Agrave Aacute Acirc Atilde Auml Aring and A shouldprobably be protruded by the same (absolute) amount as the character A Usingthe command DeclareCharacterInheritance you may declare such classes ofcharacters so that you then only have to set up the respective base character Withthe optional argument which may contain a comma-separated list of featuresyou can confine the scope of the list Additionally it accepts the inputenc key toset the input encoding for this list The font set can be declared in the usual wayThe inheritance lists are declared as pairs of langbase characterrang = langlist of inheritingcharactersrang Unless you are using a different encoding or a very peculiarly shapedfont there should be no need to change the default character inheritance settings

The situation is different with LuaTEX and XETEX however the default inherit-ance settings only contain those glyhps that can safely be assumed to exist in anyfont but since OpenType fonts may contain many more glyphs for different scripts(languages) it is quite probable that font-specific settings are necessary whichshould be specified in the fontrsquos configuration file (see next section)

57 Configuration filesThe default configuration consisting of inheritance settings declarations of font setsand alias fonts and generic protrusion expansion spacing and kerning settings willbe loaded from the file microtypecfg You may extend this file with custom settings(or load a different configuration file with the lsquoconfigrsquo option see section 35)

If you embark on creating new settings for a font family you should put theminto a separate file whose name must be lsquomt-langfont familyrangcfgrsquo (eg lsquomt-cmrcfgrsquoany spaces in the font name should be removed eg lsquomt-MinionProcfgrsquo) andmay contain all commands described in the current section 5 These files will beloaded automatically if you are actually using the respective fonts This packageships with configuration files for a number of font families Table 3 lists them all

langlist of suffixesrangDeclareMicrotypeVariants

On its search for a configuration file the package will also try to remove fromDeclareMicrotypeVariantsthe font name a suffix of one or more letters that denotes a lsquovariantrsquo of the basefont (cf Karl Berryrsquos Fontname) It is thus possible to put settings for eg thefonts pplx (expert set) pplj (oldstyle numerals) and ppl (plain) into one and the

MICRO FINE TUNING Configuration files 21

Table 3

Fonts with tailored protru-sion settings

Font family (NFSS code) Features

Type 1 fonts Encodings Shapes

Generic OT1 T1 T2A LY1 QX (TS1)a n (it sl sc)a

Computer Modern Roman (cmr)b OT1 OT4 T1 T2A T5 LY1 TS1 n it sl sc

Bitstream Charter (bch)c OT1 T1 T5 LY1 TS1 n it (sl)d sc

EB Garamonde OT1 T1 LY1 TS1 n it (sl)d sc

URW Garamond (ugm)f OT1 T1 TS1 n it

Bitstream Letter Gothic (blg)g OT1 T1 TS1 n it

Adobe Minion (pmnx pmnj) OT1 T1 T2A LY1 TS1 n it (sl)d sc si

Palatino (ppl pplx pplj)h OT1 OT4 T1 LY1 (TS1)a n it (sl)d sc

Times (ptm ptmx ptmj)i OT1 OT4 T1 LY1 QX (TS1)a n it (sl)d sc

Computer Modern math (cmsy cmm)j OMLOMS nit

AMS symbols (msa msb) U n

Euler (eur eus euf)k U n

Euro symbols (Adobe ITC marvosym) UOT1 n it

OpenType fonts Scripts Shapes

Generic Latin n (it sl sc)a

Latin Modern Romanl Latin Greek n it (sl)d

Charis SIL Latin Cyrillic Greek n it sc

Palatinom Latin n it sc

a Incompleteb Aliases Latin Modern Roman (lmr) ae (aer) zefonts (zer) eco (cmor) hfoldsty (hfor)

mlmodern (mlmr)c Aliases mathdesignCharter (mdbch) MicroPressrsquos chmath (chr) XCharterd Settings inherited from italic shapee Alias Adobe Garamond (pad padx padj)f Aliases mathdesignURW Garamond (mdugm) garamondx (zgmx zgmj)g Alias ulgothic (ulg)h Aliases pxfonts (pxr) qfontsQuasiPalatino TEX Gyre Pagella (qpl) newpx FPL Neu (fp9x fp9j)

domitiani Aliases txfonts (txr) qfontsQuasiTimes TEX Gyre Termes (qtm) newtx tempora step

stixstix2j Aliases Latin Modern (lmsy lmm) mlmodern (mlmsy mlmm)k Alias eulervm (zeur zeus)l Alias New Computer Modernm Aliases Palatino Linotype Palatino LT Std TEX Gyre Pagella Domitian

same file mt-pplcfg This command expects a comma-separated list of variantsuffixes The starred version appends the suffix(es) to the existing list The defaultdeclaration in microtypecfg is

DeclareMicrotypeVariantsxjwad01-LF-TLF-OsF-TOsF

langfont namerang langalias fontrangDeclareMicrotypeAlias

This command may be used for fonts that are very similar or actually the same (forinstance if you did not stick to the Berry naming scheme when installing a font)An example would be the Latin Modern fonts which are derived from ComputerModern so that it is not necessary to create new settings for them ndash you could say

CONTEXT-SENSITIVE SETUP 22

DeclareMicrotypeAliaslmrcmr

which would make the package whenever it encounters the font lmr and does notfind settings for it also try the font cmr In fact you will find this very line alongwith some others in the default configuration file

langfont namerangLoadMicrotypeFile

In rare cases it might be necessary to load a font configuration file manually forinstance from within another configuration file or to be able to extend settingsdefined in a file that would otherwise not be loaded automatically or would beloaded too late9 This command will load the file lsquomt-langfont namerangcfgrsquo

6 Context-sensitive setupThe microtype package also allows applying different micro-typographic settingsto the fonts depending on the context in which they occur This opens up the spacefor infinite possibilities of tweaking the documentrsquos appearance

langcontext assignmentsrangmicrotypecontext

This command may be used anywhere in the document (also in the preamble)to change the micro-typographic context in the current group To each feature(protrusion expansion (or activate as a shortcut for both) tracking spacingand kerning) one context may be assigned Consequently only settings with thecorresponding lsquocontextrsquo keyword will be applied

langcontext assignmentsrangbeginmicrotypecontext

endmicrotypecontext Like many LATEX commands it is also available in the form of an environment

langcontext assignmentsrang langgeneral textrangtextmicrotypecontext

As another possibility the command textmicrotypecontext sets the context(s)for the text given in the second argument

Suppose you want the footnote markers in the text to be protruded by a largeramount You could define settings for the numbers

SetProtrusion [ context = footnote ] font = scriptsize adapt if necessary 1 = 650 2 = 400 3 = 400 4 = 400 5 = 400 6 = 400 7 = 500 8 = 400 9 = 400 0 = 400

and have the context changed in the footnote marker command This commanddiffers among the various classes for the base classes eg article it would be

newcommandnewmakefnmarkhboxtextsuperscriptnormalfont microtypecontextprotrusion=footnotethefnmarkrenewcommandfootnotemark leavevmode ifhmodeedefxsfthespacefactornobreakfi newmakefnmark ifhmodespacefactorxsffi relax

9 Font package authors might also want to have a look at the hook MicrotypeHook described in theimplementation part section 1444

LETTERSPACING REVISITED 23

For the memoir class you would additionally have to disable auto-detection ofmultiple footnotes which prevents protrusion

renewcommandmakefnmarkhboxtextsuperscriptnormalfont microtypecontextprotrusion=footnotethefnmarkletmmmfpreparerelaxletmmmfcheckrelax

Another possibility would be to employ contexts for a language-dependent setupFor instance if you are writing a text in French you could add

microtypecontextkerning=french

to the preamble This would have the effect that kerning settings for the Frenchcontext would be applied to the document Should parts of the document be inEnglish you could write

textmicrotypecontextkerning=English text

to reset the context so that the punctuation characters in these parts will notreceive any extra kerning

Instead of adding these commands manually to your document you may alsoload microtype with the babel option (see section 35) The current language willthen be automatically detected and the contexts set accordingly

langlist of babel languagesrang langcontext listrangDeclareMicrotypeBabelHook

Naturally microtype does not know about the typographic specialties of everylanguage This command is a means of teaching it how to adjust the context when aparticular language is selected The main configuration file contains among othersthe following declaration

DeclareMicrotypeBabelHook frenchfrancaisacadiancanadien kerning=french spacing=

Consequently whenever you switch to the French language the kerning contextwill be changed to lsquofrenchrsquo and the spacing context will be reset This hook onlyhas an effect if the package was loaded with the babel option Currently microtypesupports French and Turkish kerning and English spacing (aka nonfrenchspacing)For unknown languages all contexts will be reset

7 Letterspacing revisited pdfTEX 140 | LuaTEX 062

[langamountrang] langgeneral textrangtextls

While the tracking feature described in section 53 will apply to sets of fontsyou may also want to letterspace shorter pieces of text regardless of the font inwhich they are typeset10 For such ad-hoc letterspacing microtype introduces twocommands that can be used (independently of whether the tracking option isenabled) in the same way as LATEXrsquos text commands textls ndash which also worksin math mode ndash expects the text in the mandatory argument while lsstyle willlsstyle

10 Letterspacing should be used cautiously in particular letterspacing lowercase text is held in abhorrenceby honourable typographers Unless you know what you are doing you should probably only letterspacecapitals or small capitals Another just cause may be emphasis in texts typeset in Fraktur fonts

DISABLING LIGATURES 24

switch on letterspacing for all subsequent fonts until the end of the current groupThe starred version of textls does not add any extra kerning before or aftertextlsthe text which may be useful eg for section titles By default each characterwill be spaced out by 1001000em = 01em this amount may be altered in theoptional argument to textls using the SetTracking command or globally withthe letterspace package option with decreasing significance in this order

langligatureranglslig

Since the commands textls and lsstyle will also evaluate the lsquono ligaturesrsquokey for the respective font you need not worry about protecting or breakingligatures with most fonts However in certain situations there may be a conflict ofligatures beginning with the same letter where some of them should be inhibitedwhile others should not When letterspacing text typeset in Fraktur fonts forexample the ligatures lsquochrsquo lsquockrsquo lsquotzrsquo and lsquoszrsquo (lsquoszligrsquo) should never be broken up youalso usually see the lsquostrsquo (lsquopermilrsquo) ligature in letterspaced text Furthermore at least theyfonts package realises the short s (lsquosrsquo) as the ligature lsquosrsquo On the other handthe lsquoctrsquo ligature and the other lsquolong srsquo ligatures often found in Fraktur fonts shouldbe suppressed There are two ways of solving this problem either donrsquot disablethe lsquosrsquo andor lsquocrsquo ligatures and break those that need to be broken up by insertinglsquokern0ptrsquo or babelrsquos | shortcut or disable them and protect those ligatures thatneed to be protected by enclosing them in the lslig command So the followingtwo solutions have the same result (namely lsquoAu s s i iexcl t s l o s i g k e i t rsquo with ligaturesshown in green inhibited ligatures in red)

SetTracking[no ligatures=f]encoding = LY family = yfrak120textfraklsstyle Ausskern0ptichtsloskern0ptigkeit

SetTracking[no ligatures=fsc]encoding = LY family = yfrak120textfraklsstyle Aulsligssilsligchtlsligslosigkeit

These three commands (plus the letterspace option described in section 34) areletterspacestyalso available with the alternative letterspace package which is in fact a muchstripped-down version of microtype omitting support for all the other extensions(and also omitting the possibilities of the SetTracking command ndash all lsquofrsquo ligatureswill be disabled inner and outer spacing and outer kerning will be set to the defaultvalues described in section 53) If you prefer to forgo microtypersquos specialties youmay load the letterspace package instead Both packages should not be used atthe same time

In contrast to microtype which requires LATEX the letterspace package alsoworks with eplain or even only miniltx for use with eplain load the packagewith usepackage inside the beginpackages endpackages environment withminiltx (which does not support package options) simply input letterspacesty

8 Disabling ligatures pdfTEX 130 | LuaTEX 030

[langcharactersrang] langset of fontsrangDisableLigatures

While completely disabling all ligatures of a font (which will also switch off kerningfor this font) purposely lowers the micro-typographic quality instead of raising

HINTS AND CAVEATS 25

it it is especially useful for typewriter fonts so that eg in a T1 encoded fontlsquotexttt--rsquo will indeed be printed as lsquo--rsquo not as lsquo-rsquo DisableLigatures maybe used to specify in the usual way a set of fonts for which ligatures should bedisabled for example of the typewriter font in T1 encoding

DisableLigaturesencoding = T1 family = tt

It is also possible to disable selected ligatures only The optional argument maycontain a comma-separated list of characters for which the ligature mechanismshould be inhibited

DisableLigatures[]encoding = T1 inhibit lsquo and lsquo but not fi ndash raquo etc

Only the character that begins the ligature(s) should be specified This commandmay only be used in the preamble and only once11

9 Hints and caveatsUse settings that match your font Although the default settings should give reas-onable results for most fonts the particular font you happen to be using may havedifferent character shapes that necessitate more or less protrusion In particularitalic letter shapes may differ wildly in different fonts hence I have decided againstproviding default protrusion settings for them The file test-microtypetex mightbe of some help when adjusting the protrusion settings for a font

Donrsquot use too large a value for expansion Font expansion is a feature that issupposed to enhance the typographic quality of your document by producing amore uniform greyness of the text block (and potentially reducing the number ofnecessary hyphenations) When expanding or shrinking a font too much the effectwill be turned into the opposite Expanding the fonts by more than 2 ie settinga stretch limit of more than 20 should be justified by a typographically trainedeye If you are so lucky as to be in the possession of multiple instances of a MultipleMaster font you may set expansion limits to up to 4

Donrsquot use font expansion for web documents (with older pdfTEX versions) WithpdfTEX versions older than 140 each expanded instance of the font will beembedded in the PDF file hence the file size may increase by quite a large factor(depending on expansion limits and step) Therefore courtesy and thriftiness ofbandwidth command it not to enable font expansion when creating files to bedistributed electronically With pdfTEX 140 and LuaTEX which use a differenttechnique of expansion the increase of file size can be neglected

You might want to disable protrusion in the Table of Contents In unfortunatesituations enabled protrusion might internally alter the line length in the TOC andsimilar lists in such a way that an excess leader dot will fit in The solution is totemporarily disable protrusion for the TOC

microtypesetupprotrusion=falsetableofcontentsmicrotypesetupprotrusion=true

11 With LuaTEX you have to load the fonts with the fontspec option lsquoRenderer=Basicrsquo

HINTS AND CAVEATS 26

You might want to disable protrusion in verbatim environments As you know bynow microtype will by default activate character protrusion for all fonts containedin the font set lsquoalltextrsquo This also includes the typewriter font Although it doesmake sense to protrude the typewriter font if it appears in running text (likefor example in this manual) this is probably not desirable inside the verbatimenvironment However microtype has no knowledge about the context that a fontappears in but will solely decide by examining its attributes Therefore you haveto take care of disabling protrusion in verbatim environments for yourself (thatis if you donrsquot want to disable protrusion for the typewriter font altogether byactivating say the font set lsquoalltext-nottrsquo) While the microtypesetup commandhas of course been designed for cases like this you may find it tiresome to repeat itevery time if you are using the verbatim environment frequently The followingline (which requires the etoolbox package) added to the documentrsquos preamblewould serve the same purpose

AtBeginEnvironmentverbatimmicrotypesetupactivate=false

If you are using the fancyvrb or the listings package this is not necessary sincetheir implementation of the corresponding environments will inhibit protrusionanyway

Settings for GreekThaiArmenian etc encodings are not yet included The defaultsets of fonts for which the micro-typographic features will be enabled (see table 2)only contain those encodings for which configurations exist Therefore if you areusing any other encoding (eg LGR T2B etc) microtype will not apply to thesefonts You have to define and activate a new font set including the encoding(s) youare using (for details see section 4) For protrusion at least you would also haveto create settings for the fonts in question (see section 51) It goes without sayingthat contributions for these encodings are more than welcome

Only employ kerning adjustment if it is customary in the languagersquos typographictradition In contrast to protrusion and expansion additional kerning does notunconditionally improve the micro-typographical quality of your document Youshould only switch it on if you are writing a document in a language whosetypographic tradition warrants such kerning If you are for example writing anEnglish text your readers would probably be rather confused by additional spacesbefore the punctuation characters

Adjustment of interword spacing is still experimental The implementation of thisfeature in pdfTEX is not complete and may not yield the positive effects on thetypographical quality you might expect ndash in certain situations there may even beundesired side effects in particular when used together with the ragged2e packageTherefore the spacing option should not be chosen blindly it is also recommendedto experiment with the settings in order to understand the workings of this feature

Compatibility and interaction with other packages The microtype package is sup-posed to work happily together with all other LATEX packages (except for pdfcprot)However life isnrsquot perfect so problems are to be expected Currently I am aware ofthe following issues

bull Even though all configuration files are still provided in legacy (7-bit) format usingmulti-byte (Unicode) characters in the settings should run smoothly with an up-to-

HINTS AND CAVEATS 27

date LATEX system For older systems or documents in legacy encodings in contrastthis requires loading the inputenc package first Furthermore when using multipleinput encodings in a document 8-bit characters in the settings will only workreliably if you specify the inputenc key

bull When loading the package with the babel option you must load the babel packagebefore microtype

bull Before this package was fully compatible with LuaTEX the following method ofenabling expansion and protrusion with the fontspec package was most oftenfound to be recommended

newfontfeatureMicrotypeprotrusion=defaultexpansion=defaultdefaultfontfeaturesMicrotype

This code should not be used with this package as it will basically override all ofthe settings made by microtype ndash despite the naming the above lines have nothingto do with this package12

bull With pdfTEX it is currently not possible to create character-specific settings forChineseJapaneseKorean fonts Therefore the only micro-typographic extensionthat can be made to work with CJK fonts is (non-selected) font expansion

bull When used with the xeCJK package or the luatexja package text commands (egrsquoA textless) in the configuration will not be understood You therefore haveto ensure that microtype will encounter none of them This requires firstly thatthe glyphs be specified only as single (possibly Unicode) characters as numbersor as glyph names (cf section 5) and secondly if you are using a font for whichpre-defined settings do not exist that you create these settings yourself (becauseotherwise the default settings will be loaded which do contain text commands)Furthermore you should load microtype late

Possible error messages and how to get rid of them (specs may differ)

bull Font csnameendcsname=cmr10+20 at 100pt not loadable Metric (TFM) file not found

This error message will occur if you are trying to employ font expansion whilecreating DVI output Remember that automatic font expansion only works whenrunning pdfTEX or LuaTEX in PDF mode Although expansion is also possible in DVImode with pdfTEX it requires that all instances of the expanded fonts exist on yourTEX system

bull pdfTeX error (font expansion) auto expansion is only possible with scalable fonts

Automatic font expansion has been improved in pdfTEX 140 in that it now notonly works with Type 1 fonts but also with TrueType OpenType and even non-embedded fonts The above error message indicates either that you are trying toapply expansion to a bitmap (pk) font which is still not possible or that the fontisnrsquot found at all eg because of missing map entries

bull Warning pdflatex font ptmr8r cannot be expanded (not an included Type1 font)

and the PDF viewer complains about a missing font eg Adobe Reader thuslyCould not find a font in the Resources dictionary - using Helvetica instead

With pdfTEX versions older than 140 font expansion can only be applied if thefont is actually embedded in the PDF file If you get the above error message your

12 They make use of features provided by luaotfload (via fontspec)

ACKNOWLEDGMENTS 28

TEX system is not set up to embed (or lsquodownloadrsquo) the base PostScript fonts (egTimes Helvetica Courier) In most TEX distributions this can be changed in thefile updmapcfg by setting pdftexDownloadBase14 to true

bull Warning pdflatex (file ecrm1000+20) Font ecrm1000+20 at 1200 not found

Furthermore pdfTEX versions older than 140 require Type 1 fonts for automaticfont expansion When you receive a message like the above you are probably tryingto apply font expansion to a bitmap or TrueType font With older pdfTEX versionsthis is only possible if you manually create expanded instances of the fonts

bull Font T1cmrmn10=ecrm1000 at 100pt not loaded Not enough room left

Memory parameter lsquofont_mem_sizersquo too small

bull TeX capacity exceeded sorry [maximum internal font number (font_max)=2000]

Memory parameter lsquofont_maxrsquo too small

bull TeX capacity exceeded sorry [PDF memory size (pdf_mem_size)=65536]

Memory parameter lsquopdf_mem_sizersquo too small (pdfTEX versions older than 130)

When applying micro-typographic enhancement to a large document with a lot offonts pdfTEX may be running out of some kind of memory It can be increased bysetting the respective parameter to a larger value For web2c-based systems egTEX Live change the settings in texmfcnf for MiKTEX in the file miktexini (24or older) resp pdflatexini (25 or newer)

bull pdfTeX warning (font expansion) font should be expanded before its first use

This warning will occur with pdfTEX versions older than 1404 if tracking andexpansion is applied to a font It is harmless and can be ignored

The source code of this document is freely available If you wonder how this docu-ment was created just have a look at the source code in microtypedtx which iseither already included in your TEX distribution or else can be downloaded fromCTAN For the source code of the logo on the title page and of the letterspacingsample from section 53 see the appendices A and B If you want to re-typeset thedocumentation read the comments at the end of microtypedtx

10 ContributionsI would be glad to include configuration files for more fonts Preparing suchconfigurations is quite a time-consuming task and requires a lot of patience Toalleviate this process this package also includes a test file that can be used tocheck at least the protrusion settings (test-microtypetex) If you have created aconfiguration file for another font or if you have any suggestions for enhancementsin the default configuration files I would gratefully accept them wmlgmxnet

11 AcknowledgmentsThis package would be pointless if Hagraven Thecirc Thagravenh hadnrsquot created the pdfTEXprogramme in the first place which introduced the micro-typographic extensionsand made them available to the TEX world Furthermore I thank him for helping meto improve this package and not least for promoting it in Thagravenh 2004 Thagravenh 2008

ACKNOWLEDGMENTS 29

and elsewhere I also thank him and the rest of the pdfTEX team and more recentlyalso the LuaTEX and XETEX teams for refuting the idea that TEX is dead and forfixing the bugs I find

Harald Harders has contributed protrusion settings for Adobe Minion I wouldalso like to thank him for a number of bug reports and suggestions he had to makeAndreas Buumlhmann has suggested the possibility to specify ranges of font sizes andresourcefully assisted in implementing this He also came up with some good ideasfor the management of complex configurations Ulrich Dirr has made numerous sug-gestion especially concerning the new extensions of interword spacing adjustmentand additional character kerning Georg Duffner has patiently tested microtypeunder XETEX and LuaTEX with his beautiful OpenType font EB Garamond13 Mythanks also go to Maciej Eder for contributing settings for the QX encoding aswell as to Karl Karlsson for providing settings for the Cyrillic T2A encoding andto Hendrik Vogt who made substantial improvements to the Computer ModernRoman italic settings I thank Loren B Davis for providing protrusion settings forOpenType versions of Palatino Linotype I am also very much indebted to Eacutelie Rouxwho not only contributed the lua module in the first place but also together withPhilipp Gesang took care of updating it for the developments in LuaTEX land

I thank Philipp Lehman for adding to his csquotes package the possibility torestore the original meanings of all activated characters thus allowing for thesecharacters to be used in the configuration files Peter Wilson kindly provided a hookin his ledmacledpar packages so that critical editions can finally also benefit fromcharacter protrusion Likewise Donald Arseneau patched his shapepar package toaccommodate protrusion

Additionally the following people have reported bugs made suggestions orhelped otherwise (in chronological order quotes indicate TeXSX user names)Tom Kink Herb Schulz Michael Hoppe Gary L Gray Georg Verweyen Christoph BierPeter Muthesius Bernard Gaulle Adam Kucharczyk Mark Rossi Stephan HennigMichael Zedler Herbert Voszlig Ralf Stubner Holger Uhr Peter Dyballa Morten HoslashgholmSteven Bath Daniel Flipo Michalis Miatidis Sven Naumann Ross HetheringtonWiebke Petersen Geoff Vallis Steven E Harris Karl Berry Peter Meier NathanRosenblum Wolfram Schaalo Vasile Gaburici Sveinung Heggen Axel Berger ColinRourke Maverick Woo Silas S Brown Lars Roumlnnbaumlck Christian Stark Leo MarcinBorkowski hscm George Gratzer Josep Maria Font Juan Acevedo Heiko OberdiekTill A Heilmann Rolf Dieterich Seamus Bradley Meho R Steffen Hoffmann ScottPakin Maiumleul Rouquette Jonas Hogstrom Gabriel Kerneis lsquoRazorXsrrsquo SebastianSchubert lsquoDaversquo Giuseppe Palma Stephan Stiller Christopher Schramm lsquoulirsquo SamMason lsquokleenstarrsquo lsquoHenningrsquo Ronnie Marksch David Carlisle lsquoMaxrsquo lsquoHcNrsquo WillRobertson lsquouser11126rsquo Ulrike Fischer lsquoDanielrsquo lsquoltcomdatarsquo Reinhard Kotucha lsquojcrrsquoNils Anders Danielsson Paolo Ney Frank Mittelbach Franz Wexler Moritz WemheuerlsquoAndy Nrsquo Phelype Oleinik Falk Hanisch Markus Kohm Paolo Polesana Oliver KoppHironori Kitagawa Daniel Benjamin Miller Md Ayquassar Marcel Kruumlger EkkehartSchlicht lsquoCanageekrsquo lsquodsedivecrsquo and lsquoDORpapstrsquo

13 Available from CTAN at pkgebgaramond including configuration files for microtype

SHORT HISTORY 30

12 ReferencesHagraven Thecirc Thagravenh lsquoMicro-typographic extensions to the TEX typesetting systemrsquo DissMasaryk University Brno 2000 in TUGBoat vol 21 (2000) no 4 pp 317ndash434(Online at httpwwwtugorgTUGboatArticlestb21-4tb69thanhpdf)

Hagraven Thecirc Thagravenh lsquoMicro-typographic extensions of pdfTEX in practicersquo in TUGBoatvol 25 (2004) no 1 lsquoProceedings of the Practical TEX 2004 Conferencersquo pp 35ndash38(Online at httpwwwtugorgTUGboatArticlestb25-1thanhpdf)

Hagraven Thecirc Thagravenh lsquoFont-specific issues in pdfTEXrsquo in TUGBoat vol 29 (2008) no 1lsquoEuroBachoTEX 2007 Proceedingsrsquo pp 36ndash41 (Online at httpwwwtugorgTUGboatArticlestb29-1tb91thanh-fontspdf)

Hagraven Thecirc Thagravenh Sebastian Rahtz Hans Hagen Hartmut Henkel Paweł JackowskiMartin Schroumlder Karl Berry The pdfTEX user manual 2 March 2020 (Availablefrom CTAN at systemsdocpdftexmanualpdftex-apdf)

Karl Berry Fontname Filenames for TEX fonts July 2009 (Available from CTAN atinfofontnamefontnamepdf)

LATEX3 Project Team LATEX 2ε font selection November 2020 (Available from CTANat macroslatexbasefntguidepdf)

Will Robertson The fontspec package Font selection for

XELATEX and LuaLATEX21 February 2020 (Available from CTAN at pkgfontspec)

Eacutelie Roux Khaled Hosny Philipp Gesang Ulrike Fischer Marcel Kruumlger Theluaotfload package 8 January 2021 (Available from CTAN at pkgluaotfload)

Carsten Schurig Tobias Schlemmer The pdfcprotsty package 10 June 2005(Available from CTAN at pkgpdfcprot)

Melchior Franz The soul package 17 November 2003 (Available from CTAN atpkgsoul) See also Heiko Oberdiekrsquos extension of this package soulutf8 whichadds Unicode support (Available from CTAN at pkgsoulutf8)

13 Short historyThe comprehensive list of changes can be found in appendix C The following is alist of all changes relevant in the user land bug and compatibility fixes are sweptunder the rug Numbers in brackets indicate the relevant section in this manual

28 (20201207)

bull New default font sets for expansion and spacing lsquoalltext-nottrsquo [4 table 2]

27 (20170707)

bull Allow automatic expansion and letterspacing with LuaTEX in DVI mode (akadvilualatex) [31 33 table 1]

bull Compatibility with LATEX 20170101 (fix warnings)

26 (20160501)

bull Support for LuaTEX ge 085bull Improvements for trackingletterspacing with LuaTEX (Renderer=Basic no longer

required)

SHORT HISTORY 31

bull New font sets lsquoalltext-nottrsquo lsquoallmath-nottrsquo [4 table 2]

25 (20130313)

bull Support for the fontspec package viz for OpenType fonts with LuaTEX and XETEXbull Support for protrusion with XETEX ge 09997bull Support for trackingletterspacing with LuaTEX ge 062bull Allow context-sensitive setup with LuaTEXbull Info if protrusion settings are genericbull Protrusion settings for Latin Modern Roman (OpenType)bull Protrusion settings for Charis SIL (OpenType)bull Protrusion settings for Palatino Linotype (OpenType)

24 (20100110)

bull Protrusion settings for T2A encoded Minion

23e (20091109)

bull Support for the Cyrillic T2A encoding (protrusion expansion spacing)

23d (20090327)

bull New default for expansion option lsquosteprsquo 1 if pdfTEX ge 140 [33]

23c (20081111)

bull Support for LuaTEX enabled by default

23 (20071223)

bull New key lsquoouter kerningrsquo for SetTracking to customise outer kerning [53]bull Adjust protrusion settings for tracking even if protrusion is not enabledbull New option lsquoverbose=silentrsquo to turn all warnings into mere messages [35]bull The letterspace package also works with eplain or miniltx [7]

22 (20070714)

bull Improvements to trackingletterspacing retain kerning (pdfTEX ge 1404) auto-matically adjust protrusion settings

bull New key lsquono ligaturesrsquo for SetTracking to disable selected or all ligatures (pdfTEXge 1404) [53]

bull New keys lsquospacingrsquo and lsquoouter spacingrsquo for SetTracking to customise interwordspacing [53]

bull Possibility to expand a font with different parameters (pdfTEX ge 1404) [52]bull New optional argument for DisableLigatures to disable selected ligatures [8]bull New command DeclareMicrotypeVariants to specify variant suffixes [57]bull New command textmicrotypecontext as a wrapper for microtypecontext [6]bull Protrusion settings for Bitstream Letter Gothic

21 (20070121)

bull New command lslig to protect ligatures in letterspaced text [7]

20 (20070114)

bull Support for the new extensions of pdfTEX ge 140 trackingletterspacing ad-ditional kerning and adjustment of interword spacing (glue) (new commandsSetTracking SetExtraKerning SetExtraSpacing new options lsquotrackingrsquolsquokerningrsquo lsquospacingrsquo) [53 54 55]

SHORT HISTORY 32

bull New commands textls and lsstyle for letterspacing new option lsquoletterspacersquo[34 7]

bull New option lsquobabelrsquo for automatic micro-typographic adjustment to the selectedlanguage [35 6]

bull New font sets lsquosmallcapsrsquo lsquofootnotesizersquo lsquoscriptsizersquo [4 table 2]bull New package lsquoletterspacersquo providing the commands for robust and hyphenatable

letterspacing [7]

19e (20060728)

bull New key lsquoinputencrsquo to specify the listsrsquo input encodings [5]bull Protrusion settings for Euler math fonts

19d (20060505)

bull Support for the Central European QX encoding (protrusion inheritance)bull Protrusion settings for various Euro symbol fonts (Adobe ITC marvosym)bull Support for Unicode input in the configuration (inputencutf8)

19c (20060202)

bull Protrusion settings for URW Garamond

19a (20051205)

bull Defer setup until the end of the preamblebull Inside the preamble microtypesetup accepts all package options [36]bull Protrusion settings for T5 encoded Charter

19 (20051028)

bull New command DisableLigatures to disable ligatures (pdfTEX ge 130) [8]bull New command microtypecontext to change the configuration context new key

lsquocontextrsquo for the configuration commands [6]bull New key lsquofontrsquo to add single fonts to the font sets [4]bull New key lsquopresetrsquo to set all characters to the specified value before loading the listsbull Value lsquorelativersquo renamed to lsquocharacterrsquo for lsquounitrsquo keysbull Support for the Polish OT4 encoding (protrusion expansion inheritance)bull Support for the Vietnamese T5 encoding (protrusion expansion inheritance)

18 (20050623)

bull New command DeclareMicrotypeSetDefault to declare the default font sets [4]bull New option lsquoconfigrsquo to load a different configuration file [35]bull New option lsquounitrsquo to measure protrusion factors relative to a dimension instead of

the character width [51]bull Renamed commands from MicroType to Microtypebull Protrusion settings for AMS math fontsbull Protrusion settings for Times in LY1 encoding completedbull The lsquoallmathrsquo font set also includes U encodingbull Support for protrusion with the ledmac package (pdfTEX ge 130)

17 (20050323)

bull Possibility to specify ranges of font sizes in the set declarations [4 5]bull New command LoadMicrotypeFile to load a configuration file manually [57]bull New command MicrotypeHook for font package authors [1444]bull New option lsquoverbose=errorsrsquo to turn all warnings into errors

SHORT HISTORY 33

bull Warning when running in draft mode

16 (20050124)

bull New option lsquofactorrsquo to influence protrusion resp expansion of all characters of afont or font set [32 5]

bull When pdfTEX is too old to expand fonts automatically expansion has to be enabledexplicitly automatic expansion will be disabled [31]

bull Use e-TEX extensions if available

15 (20041215)

bull When output mode is DVI font expansion has to be enabled explicitly automaticexpansion will be disabled [31]

bull New option lsquoselectedrsquo to enable selected expansion default false [33 52]bull New default for expansion option lsquosteprsquo 4 (min(stretchshrink)5) [33]bull Protrusion settings for Bitstream Charter

14 (20041112)

bull Set up fonts independently from LATEX font loadingbull New option lsquofinalrsquo [35]

12 (20041003)

bull New font sets lsquoallmathrsquo and lsquobasicmathrsquo [4 table 2]bull Protrusion settings for Computer Modern Roman math symbolsbull Protrusion settings for TS1 encoding completed for Computer Modern Roman and

Adobe Garamond

11 (20040921)

bull Protrusion settings for Adobe Minionbull New command DeclareCharacterInheritance [56]bull Characters may also be specified as octal or hexadecimal numbers [5]

10 (20040911)

bull First CTAN release

IMPLEMENTATION 34

14 ImplementationThe docstrip modules in this file are

driver The documentation driver only visible in the dtx file

package The code for the microtype package (microtypesty)

pdftex-def Definitions specific to pdfTEX (microtype-pdftexdef)

xetex-def Definitions specific to XETEX (microtype-xetexdef)

luatex-def Definitions specific to LuaTEX (microtype-luatexdef)

letterspace The code for the letterspace package (letterspacesty)

plain Code for eplain miniltx (letterspace only)

debug Code for additional output in the log fileUsed for ndash surprise ndash debugging purposes

luafile Lua functions (microtypelua)

config Surrounds all configuration modules

cfg-t Surrounds (Latin) text configurations

m-t The main configuration file (microtypecfg)bch Settings for Bitstream Charter (mt-bchcfg)blg Settings for Bitstream Letter Gothic (mt-blgcfg)cmr Settings for Computer Modern Roman (mt-cmrcfg)ebg Settings for EB Garamond (mt-EBGaramondcfg)ppl Settings for Palatino (mt-pplcfg)ptm Settings for Times (mt-ptmcfg)pmn Settings for Adobe Minion (mt-pmncfg)

Contributed by Harald Hardersugm Settings for URW Garamond (mt-ugmcfg)

cfg-u Surrounds non-text configurations (U encoding)

msa Settings for AMS lsquoarsquo symbol font (mt-msacfg)msb Settings for AMS lsquobrsquo symbol font (mt-msbcfg)euf Settings for Euler Fraktur font (mt-eufcfg)eur Settings for Euler Roman font (mt-eurcfg)eus Settings for Euler Script font (mt-euscfg)

cfg-e Surrounds Euro symbol configurations

zpeu Settings for Adobe Euro symbol fonts (mt-zpeucfg)mvs Settings for marvosym Euro symbol (mt-mvscfg)

test A helper file that may be used to create and test protrusion settings(test-microtypetex)

And now for something completely different1 langpackage|letterspacerang

IMPLEMENTATION Preliminaries 35

141 PreliminariesMTMT This is us

2 defMTMT3 langpackagerang microtype4 langletterspacerang letterspace

MTfixcatcode We have to make sure that the category codes of some characters are correct (thegerman package for instance makes active) Probably overly cautious Ceterumcenseo it should be forbidden for packages to change catcodes within the preamble

MTrestorecatcodes Polite as we are wersquoll restore them afterwards5 letMTrestorecatcodesempty

6 defMTfixcatcode127 edefMTrestorecatcodes8 MTrestorecatcodes9 catcode1=thecatcode1relax

10 11 catcode1=2relax12 13 MTfixcatcode1714 ^^Q (comment)14 MTfixcatcode24 9 ^^X (ignore)15 langpackagerangMTfixcatcode3312 16 langpackagerangMTfixcatcode3412 17 MTfixcatcode36 3 $ (math shift)18 MTfixcatcode3912 rsquo19 MTfixcatcode4212 20 MTfixcatcode4312 +21 MTfixcatcode4412 22 MTfixcatcode4512 -23 MTfixcatcode5812 24 MTfixcatcode6012 lt25 MTfixcatcode6112 =26 MTfixcatcode6212 gt27 langpackagerangMTfixcatcode6312 28 MTfixcatcode94 7 ^ (superscript)29 MTfixcatcode9612 `30 langpackagerangMTfixcatcode12412 |

These are all commands for the outside world We define them here as blankcommands so that they wonrsquot generate an error if we are not running pdfTEX

31 langpackagerang32 newcommandDeclareMicrotypeSet[3][]33 newcommandUseMicrotypeSet[2][]34 newcommandDeclareMicrotypeSetDefault[2][]35 newcommandSetProtrusion[3][]36 newcommandSetExpansion[3][]37 newcommandSetTracking[3][]38 newcommandSetExtraKerning[3][]39 newcommandSetExtraSpacing[3][]40 newcommandDisableLigatures[2][]41 newcommandDeclareCharacterInheritance[3][]42 newcommandDeclareMicrotypeVariants[1]43 newcommandDeclareMicrotypeAlias[2]44 newcommandLoadMicrotypeFile[1]45 newcommandDeclareMicrotypeBabelHook[2]46 newcommandmicrotypesetup[1]47 newcommandmicrotypecontext[1]48 newcommandtextmicrotypecontext[2]249 ifpackageloadedletterspaceletMTtextlsrelax50 langpackagerang51 newcommandlsstyle52 newcommandtextls[2][]53 deftextls1

IMPLEMENTATION Preliminaries 36

54 newcommandlslig[1]155 langpackagerang56

These commands also have a starred version57 defDeclareMicrotypeSet1gobbletwo58 defDeclareMicrotypeVariants1gobble

Set declarations are only allowed in the preamble (resp the main configurationfile) The configuration commands on the other hand must be allowed in thedocument too since they may be called inside font configuration files which inprinciple may be loaded at any time

59 onlypreambleDeclareMicrotypeSet60 onlypreambleUseMicrotypeSet61 onlypreambleDeclareMicrotypeSetDefault62 onlypreambleDisableLigatures63 onlypreambleDeclareMicrotypeVariants64 onlypreambleDeclareMicrotypeBabelHook

Donrsquot load letterspace65 expandafterletcsname verletterspacestyendcsnameempty

MToldcmd The old command names had one more hunch66 defMToldcmd1267 newcommand1MTwarning68 string1 is deprecated Please useMessageBreak69 string2 instead70 let 122

71 MToldcmdDeclareMicroTypeAliasDeclareMicrotypeAlias72 MToldcmdDeclareMicroTypeSet DeclareMicrotypeSet73 MToldcmdUseMicroTypeSet UseMicrotypeSet74 MToldcmdLoadMicroTypeFile LoadMicrotypeFile75 langpackagerang

MTwarning

MTwarningnl

MTinfo

MTinfonl

MTvinfo

MTerror

MTwarnerr

Communicate76 defMTwarningPackageWarningMTMT77 defMTwarningnl1MTwarning1gobble78 langpackagerang79 defMTinfoPackageInfoMTMT80 defMTinfonl1MTinfo1gobble81 letMTvinfogobble82 defMTerrorPackageErrorMTMT83 defMTwarnerr1MTerror184 This error message appears because you loaded the `MTMTrsquoMessageBreak85 package with the option `verbose=errorsrsquo Consult the documentationMessageBreak86 in MTMTpdf to find out what went wrong

1411 Debugging

tracingmicrotype

MTdinfo

MTdinfonl

Cases for tracingmicrotype

0 almost none

1 + sets amp lists

2 + heirs

3 + slots

4 + factors87 langdebugrang88 MTwarningnlThis is the debug version89 newcounttracingmicrotype

IMPLEMENTATION Preliminaries 37

90 tracingmicrotype=291 defMTinfo1PackageInfoMTMT1MTaddtoannot192 defMTinfonl1PackageInfoMTMT1gobbleMTaddtoannot193 letMTvinfoMTinfonl94 defMTwarning1PackageWarningMTMT1MTaddtoannotWarning 195 defMTwarningnl1PackageWarningMTMT1gobbleMTaddtoannotWarning 196 defMTdinfo12ifnumtracingmicrotypelt1 elseMTinfo2fi97 defMTdinfonl12ifnumtracingmicrotypelt1 elseMTinfonl2fi

tracingmicrotypeinpdf Another debug method font switches can be marked in the PDF file with a smallcaret an accompanying popup text box displaying all debug messages

Cases for tracingmicrotypeinpdf

1 show new fonts

2 + show known fonts98 newcounttracingmicrotypeinpdf

Letrsquos see how it works (if you donrsquot see anything special on this page your PDFviewer doesnrsquot support annotations)

tracingmicrotypeinpdf=2

MTpdfannot

MTaddtoannot

ifMTinannot

During font setup we save the text for the popup in MTpdfannot (This requirespdfTEX ge 130) The pdftexcmds package provides pdfTEXrsquos utility commands inLuaTEX too

99 RequirePackagepdftexcmds100 newififMTinannot MTinannottrue101 letMTpdfannotempty102 defMTaddtoannot1ifnumtracingmicrotypeinpdfgtz ifMTinannot103 defMessageBreak^^Jspaces104 MTxaddMTpdfannotpdfescapestring1^^Jfifi

iftracingmicrotypeinpdfall With tracingmicrotypeinpdfallfalse the PDF output is (hopefully) identicalbut some font switches will not be displayed otherwise the output is affected butall font switches are visible In the latter case we also insert a small kern so thatmultiple font switches are discernable

105 newififtracingmicrotypeinpdfall

MTshowpdfannot A red caret is shown for fonts which are actually set up by Microtype a green onemarks fonts that we have already seen The Caret annotation requires a viewerfor PDF version 15 (you could use Text if yoursquore using an older PDF viewer)

106 defMTshowpdfannot1107 ifnumtracingmicrotypeinpdflt1 else108 iftracingmicrotypeinpdfallleavevmodefi109 pdfannot height 4pt width 4pt depth 2pt 110 SubtypeCaret111 T(expandafterstringfontname)112 ifcase1or113 Subj(New font)C[1 0 0]114 else115 Subj(Known font)C[0 1 0]116 fi117 Contents(MTpdfannot)118 119 iftracingmicrotypeinpdfallkern1pt fi120 globalMTinannotfalse121 fi122 123 langdebugrang124 langpackagerang

T1blgmn10
Known font
(line 3713)
T1blgmn8
Known font
(line 3713)
T1blgmn10
Known font
(line 3714)
T1blgmn8
Known font
(line 3714)
T1blgmn10
Known font
(line 3715)
T1blgmn8
Known font
(line 3715)
T1blgmn10
Known font
(line 3716)
OT1mdbchmn10
Known font
(line 3717)
OT1mdbchmn7
Known font
(line 3717)
OT1mdbchmn5
Known font
(line 3717)
OMLmdbchmit10
Known font
(line 3717)
OMLmdbchmit7
Known font
(line 3717)
OMLmdbchmit5
Known font
(line 3717)
OMSmdbchmn10
Known font
(line 3717)
OMSmdbchmn7
Known font
(line 3717)
OMSmdbchmn5
Known font
(line 3717)
OMXmdbchmn10
Known font
(line 3717)
OMXmdbchmn7
Known font
(line 3717)
OMXmdbchmn5
Known font
(line 3717)
OMSmdbchmn10
Known font
(line 3717)
OMSmdbchmn7
Known font
(line 3717)
OMSmdbchmn5
Known font
(line 3717)
OMSmdbchmn10
Known font
(line 3717)
OMSmdbchmn7
Known font
(line 3717)
OMSmdbchmn5
Known font
(line 3717)
OMLmdbchmn10
Known font
(line 3717)
OMLmdbchmn7
Known font
(line 3717)
OMLmdbchmn5
Known font
(line 3717)
MDAmdbchmn10
Known font
(line 3717)
MDAmdbchmn7
Known font
(line 3717)
MDAmdbchmn5
Known font
(line 3717)
MDBmdbchmn10
Known font
(line 3717)
MDBmdbchmn7
Known font
(line 3717)
MDBmdbchmn5
Known font
(line 3717)
T1blgmn10
Known font
(line 3718)
T1blgmn10
Known font
(line 3720)
T1blgmn8
Known font
(line 3720)
T1blgmn8
Known font
(line 3727)
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1blgmn10
Known font
(line 3731)
T1blgmn8
Known font
(line 3731)
T1blgmn10
Known font
(line 3732)
T1bchmn9
Known font
(line 3732)
T1bchmn9
Known font
(line 3732)Tracking font `T1bchmn9 on input line 3732trying to find tracking amount list for font `T1bchmn9trying T1bchmntrying T1bchmntrying T1bchmtrying T1bchmtrying T1bchntrying T1bchntrying T1bchtrying T1bchtrying T1mntrying T1mntrying T1mtrying T1mtrying T1ntrying T1ntrying T1trying T1 Loading tracking list `default Tracking by 60
OT1mdbchmn9
Known font
(line 3732)
OT1mdbchmn6
Known font
(line 3732)
OT1mdbchmn5
Known font
(line 3732)
OMLmdbchmit9
Known font
(line 3732)
OMLmdbchmit6
Known font
(line 3732)
OMLmdbchmit5
Known font
(line 3732)
OMSmdbchmn9
Known font
(line 3732)
OMSmdbchmn6
Known font
(line 3732)
OMSmdbchmn5
Known font
(line 3732)
OMXmdbchmn9
Known font
(line 3732)
OMXmdbchmn6
Known font
(line 3732)
OMXmdbchmn5
Known font
(line 3732)
OMSmdbchmn9
Known font
(line 3732)
OMSmdbchmn6
Known font
(line 3732)
OMSmdbchmn5
Known font
(line 3732)
OMSmdbchmn9
Known font
(line 3732)
OMSmdbchmn6
Known font
(line 3732)
OMSmdbchmn5
Known font
(line 3732)
OMLmdbchmn9
Known font
(line 3732)
OMLmdbchmn6
Known font
(line 3732)
OMLmdbchmn5
Known font
(line 3732)
MDAmdbchmn9
Known font
(line 3732)
MDAmdbchmn6
Known font
(line 3732)
MDAmdbchmn5
Known font
(line 3732)
MDBmdbchmn9
Known font
(line 3732)
MDBmdbchmn6
Known font
(line 3732)
MDBmdbchmn5
Known font
(line 3732)
T1bchmit10
Known font
(line 3734)
T1blgmn10
Known font
(line 3736)
T1blgmn8
Known font
(line 3736)
T1blgmn8
Known font
(line 3738)
T1bchmn8
Known font
(line 3738)
T1SourceSansPro-TLFmn8
Known font
(line 3738)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3738)= substituted with T1SourceSansPro-TLFregularn7
T1blgmn10
Known font
(line 3740)
T1blgmn8
Known font
(line 3740)
T1pzcmit10
New font
(line 3742) No configuration file mt-pzccfgSetting up font `T1pzcmit10 on input line 3742protrusion font list emptyprotrusion encoding `T1 in listprotrusion family `pzc not in list No protrusionexpansion font list emptyexpansion encoding `T1 in listexpansion family list emptyexpansion series list emptyexpansion shape list emptyexpansion size list emptytrying to find expansion codes list for font `T1pzcmit10trying T1pzcmittrying T1pzcmittrying T1pzcmtrying T1pzcmtrying T1pzcittrying T1pzcittrying T1pzctrying T1pzctrying T1mittrying T1mittrying T1mtrying T1mtrying T1ittrying T1ittrying T1trying T1 Applying non-selected expansion (list `default)kerning font `T1pzcmit10 not in listkerning encoding `T1 in listkerning family `pzc not in list No kerningnoligatures font list emptynoligatures encoding `T1 in listnoligatures family `pzc not in list
T1blgmn10
Known font
(line 3744)
T1bchmn9
Known font
(line 3745)
T1bchmn9
Known font
(line 3745)Tracking font `T1bchmn9 on input line 3745trying to find tracking amount list for font `T1bchmn9trying T1bchmntrying T1bchmntrying T1bchmtrying T1bchmtrying T1bchntrying T1bchntrying T1bchtrying T1bchtrying T1mntrying T1mntrying T1mtrying T1mtrying T1ntrying T1ntrying T1trying T1 Loading tracking list `default Tracking by 60
OT1mdbchmn9
Known font
(line 3745)
OT1mdbchmn6
Known font
(line 3745)
OT1mdbchmn5
Known font
(line 3745)
OMLmdbchmit9
Known font
(line 3745)
OMLmdbchmit6
Known font
(line 3745)
OMLmdbchmit5
Known font
(line 3745)
OMSmdbchmn9
Known font
(line 3745)
OMSmdbchmn6
Known font
(line 3745)
OMSmdbchmn5
Known font
(line 3745)
OMXmdbchmn9
Known font
(line 3745)
OMXmdbchmn6
Known font
(line 3745)
OMXmdbchmn5
Known font
(line 3745)
OMSmdbchmn9
Known font
(line 3745)
OMSmdbchmn6
Known font
(line 3745)
OMSmdbchmn5
Known font
(line 3745)
OMSmdbchmn9
Known font
(line 3745)
OMSmdbchmn6
Known font
(line 3745)
OMSmdbchmn5
Known font
(line 3745)
OMLmdbchmn9
Known font
(line 3745)
OMLmdbchmn6
Known font
(line 3745)
OMLmdbchmn5
Known font
(line 3745)
MDAmdbchmn9
Known font
(line 3745)
MDAmdbchmn6
Known font
(line 3745)
MDAmdbchmn5
Known font
(line 3745)
MDBmdbchmn9
Known font
(line 3745)
MDBmdbchmn6
Known font
(line 3745)
MDBmdbchmn5
Known font
(line 3745)
T1blgmn10
Known font
(line 3745)
T1bchmn9
Known font
(line 3746)
T1bchmn9
Known font
(line 3746)Tracking font `T1bchmn9 on input line 3746trying to find tracking amount list for font `T1bchmn9trying T1bchmntrying T1bchmntrying T1bchmtrying T1bchmtrying T1bchntrying T1bchntrying T1bchtrying T1bchtrying T1mntrying T1mntrying T1mtrying T1mtrying T1ntrying T1ntrying T1trying T1 Loading tracking list `default Tracking by 60
OT1mdbchmn9
Known font
(line 3746)
OT1mdbchmn6
Known font
(line 3746)
OT1mdbchmn5
Known font
(line 3746)
OMLmdbchmit9
Known font
(line 3746)
OMLmdbchmit6
Known font
(line 3746)
OMLmdbchmit5
Known font
(line 3746)
OMSmdbchmn9
Known font
(line 3746)
OMSmdbchmn6
Known font
(line 3746)
OMSmdbchmn5
Known font
(line 3746)
OMXmdbchmn9
Known font
(line 3746)
OMXmdbchmn6
Known font
(line 3746)
OMXmdbchmn5
Known font
(line 3746)
OMSmdbchmn9
Known font
(line 3746)
OMSmdbchmn6
Known font
(line 3746)
OMSmdbchmn5
Known font
(line 3746)
OMSmdbchmn9
Known font
(line 3746)
OMSmdbchmn6
Known font
(line 3746)
OMSmdbchmn5
Known font
(line 3746)
OMLmdbchmn9
Known font
(line 3746)
OMLmdbchmn6
Known font
(line 3746)
OMLmdbchmn5
Known font
(line 3746)
MDAmdbchmn9
Known font
(line 3746)
MDAmdbchmn6
Known font
(line 3746)
MDAmdbchmn5
Known font
(line 3746)
MDBmdbchmn9
Known font
(line 3746)
MDBmdbchmn6
Known font
(line 3746)
MDBmdbchmn5
Known font
(line 3746)
T1blgmn10
Known font
(line 3747)
T1blgmn8
Known font
(line 3747)
T1blgmn8
Known font
(line 3767)
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
OT1mdbchmn8
Known font
(line 3767)
OT1mdbchmn6
Known font
(line 3767)
OT1mdbchmn5
Known font
(line 3767)
OMLmdbchmit8
Known font
(line 3767)
OMLmdbchmit6
Known font
(line 3767)
OMLmdbchmit5
Known font
(line 3767)
OMSmdbchmn8
Known font
(line 3767)
OMSmdbchmn6
Known font
(line 3767)
OMSmdbchmn5
Known font
(line 3767)
OMXmdbchmn8
Known font
(line 3767)
OMXmdbchmn6
Known font
(line 3767)
OMXmdbchmn5
Known font
(line 3767)
OMSmdbchmn8
Known font
(line 3767)
OMSmdbchmn6
Known font
(line 3767)
OMSmdbchmn5
Known font
(line 3767)
OMSmdbchmn8
Known font
(line 3767)
OMSmdbchmn6
Known font
(line 3767)
OMSmdbchmn5
Known font
(line 3767)
OMLmdbchmn8
Known font
(line 3767)
OMLmdbchmn6
Known font
(line 3767)
OMLmdbchmn5
Known font
(line 3767)
MDAmdbchmn8
Known font
(line 3767)
MDAmdbchmn6
Known font
(line 3767)
MDAmdbchmn5
Known font
(line 3767)
MDBmdbchmn8
Known font
(line 3767)
MDBmdbchmn6
Known font
(line 3767)
MDBmdbchmn5
Known font
(line 3767)
T1blgmit8
Known font
(line 3767)
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1blgmit8
Known font
(line 3767)
T1blgmn8
Known font
(line 3767)
T1blgmn8
Known font
(line 3767)

IMPLEMENTATION Preliminaries 38

1412 Requirements

MTplain The letterspace package works with

0 miniltx

1 eplain

2 LATEX

For plain usage we have to copy some commands from latexltx125 langplainrang126 defMTplain2127 ifxdocumentclassundefined128 defMTplain1129 defhmodebgroupleavevmodebgroup130 defnfsstext1mbox1131 lettypesetprotectrelax132 ifxeplainundefined133 defMTplain0134 defPackageWarning12135 begingroup136 newlinechar=10 137 defMessageBreak^^J(1)spacesspacesspacesspaces138 immediatewrite16^^JPackage 1 Warning 2online^^J139 endgroup140 141 defonline on input line theinputlineno142 defspacesspacespacespacespace143 fi144 fi

MTrequireslatex Better use groups than plain ifs145 defMTrequireslatex1146 ifnumMTplainlt1 expandaftersecondoftwoelseexpandafterfirstoftwofi147 148 langplainrang

For definitions that depend on e-TEX features149 ifcase 0150 ifxeTeXversionundefined 1else151 ifxeTeXversionrelax 1else152 ifcaseeTeXversion 1fi153 fi154 fi155 else156 catcode`^^Q=9 catcode`^^X=14157 fi158 langletterspacerang^^QMTwarningnlThis package requires the etex extensions159 langletterspacerang^^Q MessageBreak ExitingMTrestorecatcodesendinput160 langdebugrangMTdinfonl0this is161 langdebugrang^^Q not162 langdebugrang etex

We check whether we are running pdfTEX XETEX or LuaTEX and load the appro-priate definition file

MTclearoptions If we are using neither of these engines we disable everything and exit163 defMTclearoptions164 langplainrang MTrequireslatex1165 AtEndOfPackageletunprocessedoptionsrelaxMTrestorecatcodes166 letCurrentOptionempty167 langpackagerang letMTendinputendinput168 langplainrang relax169

IMPLEMENTATION Preliminaries 39

A hack circumventing the TEX Live 2004 hack which undefines the pdfTEX primitivesin the format in order to hide the fact that pdfTEX is being run from the user Thishas been fixed in TEX Live 2005

170 ifxnormalpdftexversionundefined else171 letpdftexversion normalpdftexversion172 letpdftexrevisionnormalpdftexrevision173 letpdfoutput normalpdfoutput174 fi

MTengine

MTenginetooold

Old packages might have let pdftexversion to relax175 letMTenginerelax176 langletterspacerangdefMTenginetooold0177 ifxpdftexversionundefined else178 ifxpdftexversionrelax else179 defMTenginepdf180 langletterspacerang letMTpdforluafirstoftwo181 langletterspacerang ifnumpdftexversion gt 139 defMTenginetooold1fi182 fi183 fi184 ifxdirectluaundefined else185 ifxdirectluarelax else186 defMTenginelua

Since approx LuaTEX 080 pdftexversion is let to luatexversion so that wewould be fooled to think that pdfTEX is too old

187 langletterspacerang188 letMTpdforluasecondoftwo189 ifnumluatexversion lt 62 defMTenginetooold0190 else191 defMTenginetooold1192 letMTluadirectlua193 ifnumluatexversion gt 84194 letpdfoutputoutputmode195 letpdfprotrudecharsprotrudechars196 letpdfadjustspacingadjustspacing197 fi198 fi199 langletterspacerang200 fi201 fi202 langpackagerang203 ifxMTenginerelax204 ifxXeTeXversionundefined else205 ifxXeTeXversionrelax else206 defMTenginexe207 fi208 fi209 fi210 langpackagerang211 langpackage|letterspacerang

MTpdftexno pdfTEXrsquos features for which we provide an interface here havenrsquot always beenavailable and some specifics have changed over time Therefore we have to testwhich pdfTEX wersquore using if any MTpdftexno will be used throughout thepackage to respectively do the right thing

Currently we have to distinguish seven cases for pdfTEX

0 not running pdfTEX

1 pdfTEX (lt 014f)

2 + micro-typographic extensions (014fg)

3 + protrusion relative to 1em (ge 014h)

IMPLEMENTATION Preliminaries 40

4 + automatic font expansion protrusion no longer has to be set up first scalefactor fixed to 1000 default efcode= 1000 (ge 120)

5 + (leftright)marginkern pdfnoligatures pdfstrcmp pdfescapestring(ge 130)

6 + adjustment of interword spacing extra kerning letterspacefont pdfmatch14pdftracingfonts always e-TEX (ge 140)

7 + letterspacefont doesnrsquot disable ligatures and kerns pdfcopyfont (ge 1404)

212 langpdftex-defrang213 langdebugrangMTdinfonl0this is pdftex thepdftexversion(pdftexrevision)214 defMTpdftexno7215 ifnumpdftexversion = 140216 ifnumpdftexrevision lt 4217 defMTpdftexno6218 fi219 else220 ifnumpdftexversion lt 140221 defMTpdftexno5222 ifnumpdftexversion lt 130223 defMTpdftexno4224 ifnumpdftexversion lt 120225 defMTpdftexno3226 ifnumpdftexversion = 14227 ifnum expandafter`pdftexrevision lt `h228 defMTpdftexno2229 ifnum expandafter`pdftexrevision lt `f230 defMTpdftexno1231 fi232 fi233 else234 ifnumpdftexversion lt 14235 defMTpdftexno1236 fi237 fi238 fi239 fi240 fi241 fi242 langdebugrangMTdinfonl0pdftex no MTpdftexno243 langpdftex-defrang

MTxetexno XETEX supports character protrusion since version 09997244 langxetex-defrang245 langdebugrangMTdinfonl0this is xetex (theXeTeXversionXeTeXrevision)246 ifdim 0XeTeXrevision pt lt 09997pt247 defMTxetexno1248 else249 defMTxetexno2250 fi251 langdebugrangMTdinfonl0xetex no MTxetexno252 langxetex-defrang

MTluatexno Cases for LuaTEX (luatexversion ought to have been enabled by the format)

0 NA

1 LuaTEX (lt 036)

2 + directlua without state number (ge 036)

14 This command was actually introduced in 130 but failed on strings longer than 1023 bytes

IMPLEMENTATION Preliminaries 41

3 + letterspacefont non-automatic expansion doesnrsquot work anymore andautomatic expansion in DVI mode is realised by modifying the tracking notthe glyphs15 (ge 062)

4 + almost all of the pdfTEX primitives have been renamed (ge 085)

5 + default efcode= 1000 protrusionboundary [not yet supported] (ge 090)

6 + glet(ge 110)

Also sometime between 104 and 107 the function fontsetexpansion has beenintroduced (but wersquore not using it for now)

253 langluatex-defrang254 langdebugrangMTdinfonl0this is luatex (theluatexversion)

MTlua Communicate with lua Beginning with LuaTEX 036 directlua no longer requiresa state number

255 letMTluadirectlua256 defMTluatexno6257 ifnumluatexversionlt110258 defMTluatexno5259 ifnumluatexversionlt90260 defMTluatexno4261 ifnumluatexversionlt85262 defMTluatexno3263 ifnumluatexversionlt62264 defMTluatexno2265 ifnumluatexversionlt36266 defMTluadirectlua0267 defMTluatexno1268 fi269 fi270 fi271 fi272 fi

273 langdebugrangMTdinfonl0luatex no MTluatexno274 langluatex-defrang275 langpdftex-def|xetex-def|letterspacerang276 ifnum277 langpdftex-def|xetex-defrang csname MTMTengine texnoendcsname lt 2278 langletterspacerang MTenginetooold=z279 MTwarningnlYou280 langletterspacerang281 ifxMTenginerelax282 donrsquot seem to be using pdftex or luatexMessageBreak283 Try running `pdftexrsquo or `luatexrsquo instead ofMessageBreak284 `ifxXeTeXversionundefinedelse xefi texrsquo285 else286 langletterspacerang287 are using a MTengine tex version older than288 langpdftex-defrang 014f289 langxetex-defrang 09997290 langletterspacerang MTpdforlua140062291 MessageBreak292 `MTMTrsquo does not work with this versionMessageBreak293 Please install a newer version of MTengine tex294 langletterspacerang fi295 MessageBreak I will quit now296 MTclearoptions297 endinputfi298 langpdftex-def|xetex-def|letterspacerang

15 This may have been changed earlier but Irsquom no longer able to find out when (the last version thatactually works for me is 040)

IMPLEMENTATION Preliminaries 42

Still there Then we can begin We need the keyval package including the lsquonewrsquoKVspdef implementation

299 langpackage|letterspacerang300 RequirePackagekeyval[19971110]301 langpackagerang

MTtoks We need a token register302 newtoksMTtoks

ifMTif A scratch if303 newififMTif

1413 Declarations

ifMTprotrusion

ifMTexpansion

ifMTauto

ifMTselected

ifMTnoligatures

ifMTdraft

ifMTspacing

ifMTkerning

ifMTtracking

ifMTbabel

These are the global switches 304 newififMTprotrusion305 newififMTexpansion306 newififMTauto307 newififMTselected308 newififMTnoligatures309 newififMTdraft310 newififMTspacing311 newififMTkerning312 newififMTtracking313 newififMTbabel

[This line intentionally left blank]MTprlevel

MTexlevel

MTprfactor

MTexfactor

MTspfactor

MTknfactor

and numbers314 letMTprleveltw315 letMTexleveltw316 letMTprfactorm317 letMTexfactorm318 letMTspfactorm319 letMTknfactorm

MTprunit

MTspunit

MTknunit

Default unit for protrusion settings is character width for spacing space for kerning(and tracking) 1em

320 letMTprunitempty321 letMTspunitmne322 defMTknunit1em

MTstretch

MTshrink

MTstep

Expansion settings323 letMTstretchmne324 letMTshrink mne325 letMTstep mne

MTprmin

MTprmax

MTexmin

MTexmax

MTspmin

MTspmax

MTknmin

MTknmax

MTtrmin

MTtrmax

Minimum and maximum values allowed by pdfTEX326 defMTprmin-m327 letMTprmaxm328 letMTexminz329 letMTexmaxm330 defMTspmin-m331 letMTspmaxm332 defMTknmin-m333 letMTknmaxm334 langpackagerang335 defMTtrmin-m336 letMTtrmaxm337 langpackagerang

MTfactordefault Default factor338 defMTfactordefault1000

IMPLEMENTATION Preliminaries 43

MTstretchdefault

MTshrinkdefault

Default values for expansion339 defMTstretchdefault20 340 defMTshrinkdefault20

MTletterspace

MTletterspacedefault

Default value for letterspacing (in thousandths of 1em)341 langpackagerang342 letMTletterspacemne343 defMTletterspacedefault100344 langpackagerang

ifMTdocument Our private test whether wersquore still in the preamble345 newififMTdocument346 langpackagerang347 langpackage|letterspacerang

1414 Auxiliary macros

MTrequirespdftex

MTrequiresluatex

For definitions that depend on a particular pdfTEX resp LuaTEX version348 langpdftex-def|luatex-defrang349 def350 langpdftex-defrang MTrequirespdftex351 langluatex-defrang MTrequiresluatex352 1ifnum353 langpdftex-defrang MTpdftexno354 langluatex-defrang MTluatexno355 lt1 expandaftersecondoftwoelseexpandafterfirstoftwofi356 langluatex-defampdebugrangMTrequiresluatex4MTluatexenableprimitives(rsquopdfrsquorsquotracingfontsrsquo)relax357 langpdftex-defampdebugrangMTrequirespdftex6358 langdebugrangpdftracingfonts=1359 langpdftex-defampdebugrangrelax360 langpdftex-def|luatex-defrang

Some functions are loaded from a dedicated lua file This avoids character escapingproblems and incompatibilities between versions of LuaTEX Unless running arecent LATEX we load the luatexbase package

361 langluatex-defrang362 ifltrfmtversion20160101relaxRequirePackageluatexbase

We load luaotfload because some of its functions are required in microtypeluaThis eliminates the need for the user to load fontspec before microtype Therewill hardly be any LuaTEX documents that donrsquot load this package anyway Since20170101 it is already loaded in the format

363 ifltrfmtversion20170101relaxRequirePackageluaotfload364 MTluarequire(microtype)365 langluatex-defrang

Here it begins The module was contributed by Eacutelie Roux366 langluafilerang367368 function microtypeinfo()369 luatexbasemodule_info(microtype)370 end371372 local find = stringfind373 local match = stringmatch374 local tex_write = texwrite375376 local catpackage377 if luatexbaseregisternumber then378 catpackage = luatexbaseregisternumber(catcodetableatletter) -- LaTeX379 else

IMPLEMENTATION Preliminaries 44

380 catpackage = luatexbasecatcodetablesCatcodeTableLaTeXAtLetter -- luatexbase381 end382 function microtypesprint ()383 texsprint(catpackage )384 end385386 langluafilerang

To be continued but first back to primitivesMTglet Herersquos the forgotten one (finally implemented in LuaTEX)

387 langluatex-defrangMTrequiresluatex6letMTgletgletrelax388 langpackage|letterspacerang389 defMTgletgloballet

MTexpcs

MTexpgcs

Commands to create command sequences Those that are going to be definedglobally should be created inside a group so that the save stack wonrsquot explode

390 defMTexpcs12expandafter1csname2endcsname391 langpackagerang392 defMTexpgcs12begingroupexpandafterendgroupexpandafter1csname2endcsname

MTdefn

MTgdefn

This is namedef and global393 defMTdefnMTexpcsdef394 defMTgdefnMTexpgcsgdef

MTedefn

MTxdefn

Its expanding versions395 langpackagerang396 defMTedefnMTexpcsedef397 langpackagerang398 defMTxdefnMTexpgcsxdef

MTletnc

MTgletnc

let a csname sequence to a command399 defMTletncMTexpcslet400 defMTgletncMTexpgcsMTglet

MTletcn let a command to a csname sequence401 langpackagerang402 defMTletcn12expandafterletexpandafter1csname 2endcsname403 langpackagerang

MTletnn

MTgletnn

let a csname sequence to a csname sequence404 defMTletnnMTexpcsMTletcn405 defMTgletnnMTexpgcsglobalexpandafterMTletcn

MTfont Remove trailing space from the font name406 defMTfontexpandafterstringMTfont

MTexponen Expand the second token once and enclose it in braces407 langpackagerang408 defMTexponen12expandafter1expandafter2

MTexptwoc Expand the next two tokens after lang1rang once409 defMTexptwoc1expandafterexpandafterexpandafter1expandafter410 langpackagerang

MTexptwon Expand the next two tokens after lang1rang once and enclose them in braces411 defMTexptwon123412 expandafterexpandafterexpandafter413 1expandafterexpandafterexpandafter414 expandafter2expandafterexpandafter3

You do not wonder why MTexponec doesnrsquot exist do you

IMPLEMENTATION Preliminaries 45

MTifdefinedcT

MTifdefinedcTF

MTifdefinednT

MTifdefinednTF

Wrapper for testing whether command resp csname sequence is defined If weare running e-TEX we will use its primitives ifdefined and ifcsname whichdecreases memory use substantially

415 defMTifdefinedcT1416 ^^X ifdefined1expandafterfirstofoneelseexpandaftergobblefi417 ^^Q ifx1undefinedexpandaftergobbleelseexpandafterfirstofonefi418 419 langpackagerang420 defMTifdefinedcTF1421 ^^X ifdefined1expandafterfirstoftwoelseexpandaftersecondoftwofi422 langpackagerang^^Q ifx1undefined423 langpackagerang^^Q expandaftersecondoftwoelseexpandafterfirstoftwofi424 425 defMTifdefinednT1426 ^^X ifcsname1endcsnameexpandafterfirstofoneelseexpandaftergobblefi427 langpackagerang^^Q begingroupMTexptwocendgroupifxcsname 1endcsnamerelax428 langpackagerang^^Q expandaftergobbleelseexpandafterfirstofonefi429 430 defMTifdefinednTF1431 ^^X ifcsname1endcsnameexpandafterfirstoftwoelseexpandaftersecondoftwofi432 langpackagerang^^Q begingroupMTexptwocendgroupifxcsname 1endcsnamerelax433 langpackagerang^^Q expandaftersecondoftwoelseexpandafterfirstoftwofi434 435 langpackagerang

MTdetokenizen

MTdetokenizec

MTremlastspace

Translate a macro into a token list With e-TEX we can use detokenize We alsoneed to remove the last trailing space and only the last one ndash therefore the fiddling(and the string isnrsquot perfect of course)

436 defMTdetokenizen1437 ^^X expandafterMTremlastspacedetokenize1 nil438 ^^Q string1439 440 defMTdetokenizec1441 ^^X MTexponenMTdetokenizen1442 ^^Q MTexptwocMTremlastspacestripprefixmeaning1 nil443 444 defMTremlastspace1 21445 ifxnil2else space446 expandafterMTremlastspaceexpandafter2fi447

MTifempty Test whether argument is empty448 langpackagerang449 begingroup450 catcode`=12451 catcode`amp=14452 gdefMTifempty1amp453 if 1amp454 expandafterfirstoftwo455 else456 expandaftersecondoftwo457 fi458 459 endgroup460 langpackagerang

MTifint Test whether argument is an integer using an old trick by Mr Arseneau or thelatest and greatest from pdfTEX or LuaTEX (which also allows negative numbers asrequired by the letterspace option)

461 langpackagerang462 langpackage|letterspacerang463 langpdftex-defrangMTrequirespdftex6464 langletterspacerangMTpdforlua

IMPLEMENTATION Preliminaries 46

465 langpdftex-def|letterspacerang466 defMTifint1467 ifcasepdfmatch^-[0-9]+ $1relax468 expandaftersecondoftwo469 else470 expandafterfirstoftwo471 fi472 473 474 langpdftex-def|letterspacerang475 langpdftex-def|xetex-def|letterspacerang476 defMTifint1477 ififnum9lt11elsefi478 expandafterfirstoftwo479 else480 expandaftersecondoftwo481 fi482 483 langpdftex-def|xetex-def|letterspacerang484 langpdftex-def|letterspacerang485 langluatex-defrangdefMTifint1csnameMTluamicrotypeif_int([[1]])endcsname486 langluafilerang487 local function if_int(s)488 if find(s^-[0-9]+ $) then489 tex_write(firstoftwo)490 else491 tex_write(secondoftwo)492 end493 end494 microtypeif_int = if_int495496 langluafilerang

MTifdimen Test whether argument is dimension (or number) (nd and nc are new Didot respCicero added in pdfTEX 130 px is a pixel)

497 langpdftex-defrang498 MTrequirespdftex6499 defMTifdimen1500 ifcasepdfmatch^([0-9]+([][0-9]+)|[][0-9]+)501 (em|ex|cm|mm|in|pc|pt|dd|cc|bp|sp|nd|nc|px) $1relax502 expandaftersecondoftwo503 else504 expandafterfirstoftwo505 fi506 507 508 langpdftex-defrang509 langpdftex-def|xetex-defrang510 defMTifdimen1511 setboxz=hbox512 MTcount=11relax513 ifnumMTcount=ne514 aftergroupsecondoftwo515 else516 aftergroupfirstoftwo517 fi518 519 520 langpdftex-def|xetex-defrang521 langpdftex-defrang522 langluatex-defrangdefMTifdimen1csnameMTluamicrotypeif_dimen([[1]])endcsname523 langluafilerang524 local function if_dimen(s)525 if (find(s ^-[0-9]+(a) $) or526 find(s ^-[0-9][][0-9]+(a) $)) then

IMPLEMENTATION Preliminaries 47

527 tex_write(firstoftwo)528 else529 tex_write(secondoftwo)530 end531 end532 microtypeif_dimen = if_dimen533534 langluafilerang

MTifdim Compare floating point numbers535 langpackagerang536 defMTifdim123537 ifdim 1p 2 3p538 expandafterfirstoftwo539 else540 expandaftersecondoftwo541 fi542 543 langpackagerang

MTifstreq Test whether two strings (fully expanded) are equal544 langpdftex-def|xetex-defrang545 langpdftex-defrangMTrequirespdftex5546 defMTifstreq12547 langpdftex-defrang ifnumpdfstrcmp12=z548 langxetex-defrang ifnumstrcmp12=z549 expandafterfirstoftwo550 else551 expandaftersecondoftwo552 fi553 554 langpdftex-def|xetex-defrang555 langpdftex-defrang556 557 defMTifstreq12558 edefMTresa1559 edefMTresb2560 ifxMTresaMTresb561 expandafterfirstoftwo562 else563 expandaftersecondoftwo564 fi565 566 567 langpdftex-defrang568 langluatex-defrangdefMTifstreq12csnameMTluamicrotypeif_str_eq([[1]][[2]])endcsname569 langluafilerang570 local function if_str_eq(s1 s2)571 if s1 == s2 then572 tex_write(firstoftwo)573 else574 tex_write(secondoftwo)575 end576 end577 microtypeif_str_eq = if_str_eq578579 langluafilerang

MTxadd Add item to a list580 langpackagerang581 defMTxadd12582 ifx1relax583 xdef12584 else585 xdef112

IMPLEMENTATION Preliminaries 48

586 fi587

MTxaddb Add item to the beginning588 defMTxaddb12589 ifx1relax590 xdef12591 else592 xdef121593 fi594 595 langpackagerang

MTmapclistn

MTmapclistc

MTmapclist

MTclistfunction

MTclistbreak

Run lang2rang on all elements of the comma list lang1rang This and the following is modelledafter LATEX3 commands

596 langpackage|letterspacerang597 defMTmapclistn12598 ifxempty1else599 defMTclistfunction12600 MTmapclist1nilnnil601 fi602

603 defMTmapclistc1MTexponenMTmapclistn1604 defMTmapclist1605 ifxnil1606 expandafterMTclistbreak607 fi608 MTclistfunction1609 MTmapclist610 611 letMTclistfunctiongobble612 defMTclistbreak1nnil613 langpackagerang

MTmaptlistn

MTmaptlistc

MTmaptlist

MTtlistbreak

Execute lang2rang on all elements of the token list lang1rang MTtlistbreak can be usedto jump out of the loop

614 defMTmaptlistn12MTmaptlist21nnil615 defMTmaptlistc12expandafterMTmaptlistexpandafter21nnil616 defMTmaptlist12617 ifxnnil2else618 12619 expandafterMTmaptlist620 expandafter1621 fi622 623 defMTtlistbreak1nnilfi

ifMTinlist

MTinclist

Test whether item lang1rang is in comma list lang2rang Using pdfmatch would be slower624 newififMTinlist625 defMTinclist12626 defMTresa1123nnil627 ifx2empty628 MTinlistfalse629 else630 MTinlisttrue631 fi632 633 expandafterMTresaexpandafter21emptynnil634

MTremfromclist Remove item lang1rang from comma list lang2rang This is basically removeelement fromltcntrldtx Using pdfmatch and pdflastmatch here would be really slow

635 defMTremfromclist12

IMPLEMENTATION Preliminaries 49

636 defMTresa112MTresa12MTresb637 defMTresb1MTresb2MTresbifx1emptyelse1fi638 xdef2MTexptwocMTresbMTresaexpandafter2MTresb1MTresa639

MTintlist

MTintlist

Test whether item is in token list Since this isnrsquot too elegant I thought that at leasthere pdfmatch would be more efficient ndash however it turned out to be even slowerthan this solution

640 defMTintlist12641 MTinlistfalse642 defMTresa1643 MTmaptlistc2MTintlist644 645 defMTintlist1646 edefMTresb1647 ifxMTresaMTresb648 MTinlisttrue649 expandafterMTtlistbreak650 fi651

MTinrlist

MTinrlist

MTinrlist

MTsizename

Test whether size MTsize is in a list of ranges Store the name of the list inMTsizename

652 defMTinrlist1653 MTinlistfalse654 MTmaptlistc1MTinrlist655 656 defMTinrlist1expandafterMTinrlist1657 defMTinrlist123658 MTifdim2=mne659 MTifdim1=MTsize660 MTinlisttrue661 relax662 663 MTifdimMTsizelt1relax664 MTifdimMTsizelt2665 MTinlisttrue666 relax667 668 669 ifMTinlist670 defMTsizename3671 expandafterMTtlistbreak672 fi673

MTloop

MTiterate

MTrepeat

This is the same as LATEXrsquos loop which we mustnrsquot use since this could confuse anouter loop in the document

674 langpackagerang675 defMTloop1MTrepeat676 defMTiterate1relaxexpandafterMTiteratefi677 MTiterate letMTiteraterelax678 679 letMTrepeatfi

MTwhilenum Execute lang3rang from lang1rang up to (excluding) lang2rang (much faster than LATEXrsquos whilenum)680 defMTwhilenum123681 tempcnta1relax682 MTloop 3683 advancetempcnta ne684 ifnumtempcnta lt 2MTrepeat685 686 langpackage|letterspacerang

IMPLEMENTATION Preliminaries 50

MTifluaotffont For fonts loaded by luaotfload we query the fontrsquos table687 langletterspacerangMTpdforlualetMTifluaotffontsecondoftwo688 langluatex-def|letterspacerangdefMTifluaotffontcsnameMTlua689 langluatex-defrang microtypeif_luaotf_font()690 langluafile|letterspacerang691 langluafileranglocal function if_luaotf_font()692 local thefont = fontgetfont(fontcurrent())693 if thefont and ( thefontformat == opentype or thefontformat == truetype )694 then texwrite(firstoftwo)695 else texwrite(secondoftwo)696 end697 langluafilerangend698 langluafilerangmicrotypeif_luaotf_font = if_luaotf_font699 langluafilerang700 langluafile|letterspacerang701 langluatex-def|letterspacerang endcsname702 langluatex-def|letterspacerang703 langletterspacerang

MTdofont Execute lang1rang 256 times704 langpdftex-def|letterspacerangdefMTdofontMTwhilenumzcclvi

resp for the whole font for LuaTEX if itrsquos a Unicode font705 langluatex-defrang706 defMTdofont1707 MTifluaotffont708 defMTdofontfunction1709 MTluamicrotypedo_font()710 MTwhilenumzcclvi1711 712 langluatex-defrang

This is the lua function which is much faster than looping through all glyphsin TEX Legacy fonts (which this function should never work on) donrsquot contain avindex field

713 langluafilerang714 local function do_font()715 local thefont = fontgetfont(fontcurrent())716 if thefont then717 for iv in nextthefontcharacters do718 if vindex == nil or vindex gt 0 then719 microtypesprint([[tempcnta=]]i[[relaxMTdofontfunction]])720 end721 end722 end723 end724 microtypedo_font = do_font725726 langluafilerang

The XETEX variant (itrsquos slow )727 langxetex-defrang728 defMTdofont1729 tempcnta=z730 MTloop731 iffontcharMTfonttempcnta 1fi732 advancetempcntane733 ifnumtempcnta lt XeTeXlastfontcharMTfont MTrepeat734 735 langxetex-defrang736 langpackagerang

MTcount

MTincrement

Increment macro lang1rang by one Saves using up too many counters The e-TEX way is

IMPLEMENTATION Preliminaries 51

slightly faster737 newcountMTcount738 defMTincrement1739 ^^X edef1numbernumexpr 1 + 1relax740 ^^Q MTcount=1relax741 ^^Q advanceMTcount ne742 ^^Q edef1numberMTcount743

MTscale Multiply and divide a counter If we are using e-TEX we will use its numexprprimitive This has the advantage that it is less likely to run into arithmetic overflowThe result of the division will be rounded instead of truncated Therefore wersquoll geta different (more accurate) result in about half of the cases

744 defMTscale123745 ^^Q multiply 1 2relax746 ifnum 3 = z747 ^^X 1=numexpr 1 2relax748 else749 ^^X 1=numexpr 1 2 3relax750 ^^Q divide 1 3relax751 fi752

MTabbrpr

MTabbrex

MTabbrprc

MTabbrexc

MTabbrprinh

MTabbrexinh

MTabbrnl

MTabbrsp

MTabbrspc

MTabbrspinh

MTabbrkn

MTabbrknc

MTabbrkninh

MTabbrtr

MTabbrtrc

Some abbreviations Thus we can have short command names but full-length logoutput

753 defMTabbrprprotrusion754 defMTabbrexexpansion755 defMTabbrprcprotrusion codes756 defMTabbrexcexpansion codes757 defMTabbrprinhprotrusion inheritance758 defMTabbrexinhexpansion inheritance759 defMTabbrnlnoligatures760 defMTabbrspspacing761 defMTabbrspcinterword spacing codes762 defMTabbrspinhinterword spacing inheritance763 defMTabbrknkerning764 defMTabbrknckerning codes765 defMTabbrkninhkerning inheritance766 defMTabbrtrtracking767 defMTabbrtrctracking amount

MTrbbaprotrusion

MTrbbaexpansion

MTrbbaspacing

MTrbbakerning

MTrbbatracking

These we also need the other way round768 defMTrbbaprotrusionpr769 defMTrbbaexpansionex770 defMTrbbaspacingsp771 defMTrbbakerningkn772 defMTrbbatrackingtr

MTfeatures

MTfeatureslong

We can work on these lists to save some guards in the dtx file773 defMTfeaturesprexspkntr774 defMTfeatureslongprotrusionexpansionspacingkerningtracking

MTisfeature Whenever an optional argument accepts a list of features we can use this com-mand to check whether a feature exists in order to prevent a rather confusinglsquoMissing endcsname insertedrsquo error message The feature (long form) must be inlang1rang the type of list to ignore in lang2rang then comes the action

775 defMTisfeature12776 MTinclist1MTfeatureslong777 ifMTinlist778 expandafterfirstofone779 else780 MTerror`1rsquo is not an available micro-typographicMessageBreak

IMPLEMENTATION Preliminaries 52

781 feature Ignoring 2Available features are `MTfeatureslongrsquo782 expandaftergobble783 fi784

1415 Compatibility

For the record the following LATEX kernel commands will be modified by microtype

bull pickupfont

bull dosubstcorrection

bull addaccent (all in section 1429)

bull showhyphens (in section 1446)

The wordcount package redefines the font-switching commands which willbreak microtype Since microtype doesnrsquot have an effect on the number of wordsin the document anyway we will simply disable ourselves

785 ifladedtexwordcount786 MTwarningnlDetected the `wordcountrsquo utilityMessageBreak787 Disabling `MTMTrsquo since it wouldnrsquot work788 MTclearoptionsendinputrelax

The minimal class doesnrsquot define any size commands other than normalsize whichwill result in lots of warnings Therefore we issue a warning about the warnings

789 ifclassloadedminimal790 MTwarningnlDetected the `minimalrsquo classMessageBreak791 Expect lots of warnings and some malfunctionsMessageBreak792 You might want to use a proper class instead793 relax

MTsetup The setup is deferred until the end of the preamble This has a couple of advantagesmicrotypesetup can be used to change options later on in the preamble and fontsdonrsquot have to be set up before microtype

794 langpackagerang795 langpackage|letterspacerang796 langplainrangMTrequireslatex1797 letMTsetupempty

MTaddtosetup We use our private hook to have better control over the timing This will also workwith eplain but not with miniltx alone

798 defMTaddtosetupgaddtomacroMTsetup

Donrsquot hesitate with miniltx799 langplainrangletMTaddtosetupfirstofone

MTwithpackageT We almost never do anything if a package is not loaded800 defMTwithpackageT1ifpackageloaded1firstofonegobble801 langpackage|letterspacerang802 langpackagerang

MTwithbabelandT LATEXrsquos ifpackagewith ignores the class options803 defMTwithbabelandT1804 MTifdefinednToptbabelpkgextension805 expandtwoargsMTinclist1806 csname optbabelpkgextensionendcsnameclassoptionslist807 ifMTinlistexpandaftergobblefi808 gobble809

IMPLEMENTATION Preliminaries 53

MTledmacsetup The ledmac package first saves each paragraph in a box from which it then splitsoff the lines one by one This will destroy character protrusion (There arenrsquot anyproblems with the lineno package since it takes a different approach) mdash mdashAfter much to and fro the situation has finally settled and there is a fix Beginningwith pdfTEX version 121b together with ledpatchsty as of 20050602 (v04)character protrusion will work at last

Peter Wilson was so kind to provide the ldunhboxline hook in ledmac toallow for protrusion leftmarginkern and rightmarginkern are new primitivesof pdfTEX 121b (aka 1300) They are also part of recent XETEX The successorpackages eledmac and reledmac are also supported

810 langpackagerang811 langpdftex-defrangMTrequirespdftex5812 langpdftex-def|luatex-def|xetex-defrang813 defMTledmacsetup814 ifMTprotrusion815 MTifdefinedcTFldunhboxline

MTledunhboxline Hook816 MTinfonlPatching ((r)e)ledmac to enable character protrusion817 letMTledunhboxlineldunhboxline818 renewcommandldunhboxline[1]819 ifhbox1820 kernleftmarginkern1821 expandafterMTledunhboxlineexpandafter1expandafter822 kernrightmarginkern1823 fi824

825 826 MTwarningnl827 Character protrusion in paragraphs with lineMessageBreak828 numbering will only work if you update ledmacMessageBreak829 or use one of its successors eledmac or reledmac830 831 fi832 833 langpdftex-def|luatex-def|xetex-defrang834 langpdftex-defrang835 836 defMTledmacsetup837 ifMTprotrusion838 MTwarningnl839 The pdftex version you are using does not allowMessageBreak840 character protrusion in paragraphs with lineMessageBreak841 numbering by the `((r)e)ledmacrsquo packageMessageBreak842 Upgrade pdftex to version 130 or later843 fi844 845 846 langpdftex-defrang

The shapepar package (v22) fixes this in a similar manner by itself so we donrsquothave to bother

MTrestoreph Restore meaning of and 847 langpackage|letterspacerang848 langpackagerang849 defMTrestorephchardef` chardef`

ifMTfontspec

ifMTxunicode

Two new conditionals for use with XETEX or LuaTEX850 newififMTfontspec851 MTwithpackageTfontspecMTfontspectrue

IMPLEMENTATION Preliminaries 54

852 newififMTxunicode853 MTwithpackageTxunicodeMTxunicodetrue

We need the correct value of the former for configuration commands inside thepreamble (to get the default families right)

854 ifltrfmtversion20201001855 AddToHookpackageafterfontspecMTfontspectruerelax

MTmaybegobblewithtikz

MTtikzsetup

If tikzexpandcount is greater than zero wersquore inside or at the end of a tikznode where we donrsquot want to adjust spacing after letterspacing lest we disturbtikz This is used in MTafteraftergroup and we donrsquot need it for letterspace

856 letMTmaybegobblewithtikzfirstofone857 defMTtikzsetup858 defMTmaybegobblewithtikz859 ifnumtikzexpandcountgtz860 expandaftergobble861 else862 expandafterfirstofone863 fi

MTsetupfonthook This hook will be executed every time a font is set up (inside a group)In the preamble we check for the packages each time a font is set up Thus it

will work regardless when the packages are loadedEven for packages that donrsquot activate any characters in the preamble (like

babel and csquotes) we have to check here too in case they were loaded beforemicrotype and a font is loaded AtBeginDocument before microtype (This isno longer needed since the complete setup is now deferred until the end of thepreamble However it is still necessary for defersetup=false)

864 defMTsetupfonthook

Spanish (as well as Galician and Mexican) babel modify storing the originalmeaning in percentsign

865 MTiffalse866 MTwithbabelandTspanish MTiftrue867 MTwithbabelandTgalicianMTiftrue868 MTwithbabelandTmexican MTiftrue869 ifMTifMTifdefinedcTpercentsignletpercentsignfi

Using disablequotes we can restore the original meaning of all charactersmade active by csquotes (It would be doable for older versions too but we wonrsquotbother)

870 MTwithpackageTcsquotes871 ifpackagelatercsquotes20050511disablequotesrelax

hyperref redefines and inside a url We restore the original meanings(which we can only hope are correct) Same for tex4ht and mathastext

872 MTiffalse873 MTwithpackageThyperref MTiftrue874 MTwithpackageTtex4ht MTiftrue875 MTwithpackageTmathastextMTiftrue876 ifMTifMTrestorephfi877 MTwithpackageTtikzMTtikzsetup878

Check again at the end of the preamble879 langpackagerang880 MTaddtosetup881 langpackagerang

Our competitor the pdfcprot package must not be tolerated

IMPLEMENTATION Preliminaries 55

882 MTwithpackageTpdfcprot883 MTerrorDetected the `pdfcprotrsquo packageMessageBreak884 `MTMTrsquo and `pdfcprotrsquo may not be used together885 The `pdfcprotrsquo package provides an interface to character protrusionMessageBreak886 So does the `MTMTrsquo package Using both packages at the sameMessageBreak887 time will almost certainly lead to undesired results Have your choice888 889 MTwithpackageT ledmacMTledmacsetup890 MTwithpackageT eledmacMTledmacsetup891 MTwithpackageTreledmacMTledmacsetup892 MTwithpackageTxunicodeMTxunicodetrue893 MTwithpackageTfontspecMTfontspectrue

We can clean up MTsetupfonthook now894 MTgletMTsetupfonthookempty895 MTiffalse896 MTwithbabelandTspanish MTiftrue897 MTwithbabelandTgalicianMTiftrue898 MTwithbabelandTmexican MTiftrue899 ifMTif900 gaddtomacroMTsetupfonthook901 MTifdefinedcTpercentsignletpercentsign902 fi903 MTwithpackageTcsquotes904 ifpackagelatercsquotes20050511905 gaddtomacroMTsetupfonthookdisablequotes906 907 MTwarningnl908 Should you receive warnings about unknown slotMessageBreak909 numbers try upgrading the `csquotesrsquo package910 911

We disable microtypersquos additions inside hyperrefrsquos pdfstringdef which redefineslots of commands hyperref doesnrsquot work with plain TEX so in that case we donrsquotbother

912 MTiffalse913 langpackagerang914 langplainrang MTrequireslatex2915 MTwithpackageThyperref916 pdfstringdefDisableCommands917 langpackagerang918 MTltxpickupfont919 lettextmicrotypecontextsecondoftwo920 letmicrotypecontextgobble921 langpackagerang922 deflsstylepdfstringdefWarnlsstyle923 deftextls1pdfstringdefWarntextls924 925 langpackagerang MTiftrue926 927 langplainrang relax928 langpackagerang929 MTwithpackageTtex4htMTiftrue930 MTwithpackageTmathastextMTiftrue931 ifMTifgaddtomacroMTsetupfonthookMTrestorephfi

The listings package makes numbers and letters active932 MTwithpackageTlistings933 gaddtomacroMTcfgcatcodes934 MTwhilenum303Acatcodetempcnta=12relax935 MTwhilenum415Bcatcodetempcnta=11relax936 MTwhilenum617Bcatcodetempcnta=11relax937

IMPLEMENTATION Font setup 56

and the backslash (which would lead to problems in MTgetslot)938 gaddtomacroMTsetupfonthook939 catcode`=z

Inside a listing space is redefined940 defspace

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

941 letlstProcessLetterempty942 943

Of course using both soulrsquos and microtypersquos letterspacing mechanisms at thesame time doesnrsquot make much sense But soul can do more eg underlining Theoptional argument to textls may not be used Also we have to disable expansionwithin soulrsquos trial run Under plain TEX soul doesnrsquot register itself the LATEX wayso we just test for its main command

944 langpackagerang945 ifxSOULundefinedelse946 soulregisterlsstyle 0947 soulregistertextls 1948 ifxXeTeXrevisionundefined949 letMTSOULdowordSOULdoword950 defSOULdowordpdfadjustspacing=z MTSOULdoword951 fi952 fi953 langpackagerang954 MTwithpackageTtikzMTtikzsetup

Compatibility with the pinyin package (from CJK) disable microtype in pymacronwhich loads a different font for the accent In older versions of pinyin (pre-460)pymacron had only one argument

955 MTwithpackageTpinyin956 letMTorigpymacronpymacron957 ifpackagelaterpinyin20050811 460958 defpymacron12959 MTltxpickupfont960 MTorigpymacron12961 MTMTpickupfont962 963 defpymacron1964 MTltxpickupfont965 MTorigpymacron1966 MTMTpickupfont967 968 969 langpackagerang970 971 langpackage|letterspacerang

We need a font (the minimal class doesnrsquot load one)972 langpackagerangexpandafterifxthefontnullfontnormalfontfi

142 Font setupMTsetupfont Setting up a font entails checking for each feature whether it should be applied to

the current font (MTfont)973 langpdftex-def|xetex-def|luatex-defrang974 defMTsetupfont

IMPLEMENTATION Font setup 57

With XETEX and LuaTEX the font may not be actually loaded hence we might see awrong font (in MTgetslot) Therefore we first load the current font

975 langxetex-def|luatex-defrang MTfont

We might have to disable stuff when used together with adventurous packages976 MTsetupfonthook

This will use a copy of the font (allowing for expansion parameter variation andthe use of more than one set of protrusion factors for a font within one paragraph)

977 langpdftex-defrangMTrequirespdftex7978 langpdftex-def|luatex-defranggaddtomacroMTsetupfontMTcopyfont979 langpdftex-defrangrelax

The font properties must be extracted from MTfont since the current value offencoding and friends may be wrong

980 gaddtomacroMTsetupfont981 MTexptwocMTsplitnamestringMTfontnil

Try to find a configuration file for the current font family982 MTexponenMTfindfileMTfamily983 ifxMTfamilyaliasempty else984 MTexponenMTfindfileMTfamilyaliasfi

We have to make sure that cfencoding expands to the correct value (for later inMTgetslot) which isnrsquot the case when selectfont chooses a new encoding(this would be done a second later in selectfont anyway ndash three lines to beexact) (I think I do not need this anymore ndash however Irsquom too afraid to remove it Oops I did it Letrsquos see whether anybody complains)

985 ifxfencodingcfencodingelseencupdatefi986

Tracking has to come first since it means actually loading a different font987 langpdftex-defrangMTrequirespdftex6988 langluatex-defrangMTrequiresluatex3989 langpdftex-def|luatex-defrang gaddtomacroMTsetupfontMTtrackingrelax990 gaddtomacroMTsetupfont991 MTcheckfont992 ifMTinlist993 langdebugrangMTshowpdfannot2994 else995 MTvinfoSetting up font `MTfontrsquoonline996 MTinfonotracking

Now we can begin setting up the font for all features that the current pdfTEXprovides The following commands are let to relax if the respective feature isdisabled via package options

For versions older than 120 protrusion has to be set up first beginning with120 the order doesnrsquot matter

997 MTprotrusion998 langpdftex-def|luatex-defrang MTexpansion999

Interword spacing and kerning (pdfTEX 140)1000 langpdftex-defrang1001 MTrequirespdftex61002 gaddtomacroMTsetupfontMTspacingMTkerning1003 relax1004 langpdftex-defrang

Disable ligatures (pdfTEX 130)1005 langpdftex-defrangMTrequirespdftex5

IMPLEMENTATION Font setup 58

1006 langpdftex-def|luatex-defranggaddtomacroMTsetupfontMTnoligatures1007 langpdftex-defrangrelax1008 gaddtomacroMTsetupfont

Debugging1009 langdebugrangMTshowpdfannot1

Finally register the font so that we donrsquot set it up anew each time1010 MTregisterfont1011 fi1012 1013 langpdftex-def|xetex-def|luatex-defrang

MTcopyfont

MTcopyfont

The new (1404) pdfcopyfont command allows expanding a font with differentparameters or to use more than one set of protrusion factors for a given fontwithin one paragraph It will be used when we find a context for SetProtrusionor SetExpansion in the preamble or when the package has been loaded with thecopyfonts option

1014 langpdftex-def|luatex-defrang1015 letMTcopyfontrelax1016 langpdftex-defrangMTrequirespdftex71017 defMTcopyfont

MTfontcopy For every new protrusion and expansion context we create a new copy1018 xdefMTfontcopycsnameMTfontMTprcontextMTexcontextendcsname1019 expandafterifxMTfontcopyrelax

MTfontorig pdfTEX doesnrsquot allow copying a font that has already been copied and expandedletterspaced Hence we have to get the original

1020 edefMTfontorigcsnameexpandafterstringfontname origendcsname1021 expandafterifxMTfontorigrelax1022 MTexptwocMTgletMTfontorigfontname1023 else1024 MTexptwocletfontnameMTfontorig1025 fi1026 langpdftex-defrang globalMTexptwocpdfcopyfontMTfontcopyfontname

Even though LuaTEX also provides the primitive from pdfTEX (even renamed tocopyfont that is lsquopromotedrsquo as per the LuaTEX manual) it is seriously crippled inthat OpenType features will be lost Therefore we do not copy the font but load itanew

1027 langluatex-defrang MTexptwocMTluacopyfontmeaningfontnamenil1028 langdebugrangMTdinfo1creating new copy MTfontcopy

Since itrsquos a new font we have to remove it from the context lists1029 MTmapclistcMTactivefeatures1030 MTexpcsifxMTnameuseMTabbr1relaxelse1031 deftempa11032 MTexpcsMTmaptlistcMT1doccontextsMTremfromlist1033 fi1034 1035 fi1036 MTexptwocletMTfontMTfontcopy

We only need the font identifier for letterspacing1037 letfontnameMTfontcopy

But we have to properly substitute the font after wersquore done1038 aftergroupletaftergroupfontnameaftergroupMTfontcopy1039

MTremfromlist

IMPLEMENTATION Font setup 59

1040 defMTremfromlist11041 MTexpcsifxMTtempa 1fontlistrelaxelse1042 expandafterMTexponenexpandafterMTremfromclistexpandafter1043 MTfont csname MTtempa 1fontlistendcsname1044 fi1045 1046 langpdftex-defrangrelax

MTluacopyfont lang1rang and lang2rang are lsquoselectrsquo and lsquofontrsquo respectively lang3rang is the font spec1047 langluatex-defrangdefMTluacopyfont 1 2 3nil1048 langluatex-defrang globalexpandafterfontMTfontcopy=3relax1049 langpdftex-def|luatex-defrang

Herersquos the promised dirty trick for users of older pdfTEX versions which worksaround the problem that the use of the same font with different expansion para-meters is prohibited If you do not want to create a clone of the font setup (thiswould require duplicating the tfmvf files under a new name and writing new fdfiles and map entries) you can load a minimally larger font for the paragraph inquestion Eg for a document typeset in 10 pt

SetExpansion [ stretch = 30 shrink = 60 step = 5 ] encoding = size = 10001 newcommandexpandpar[1] fontsize10001baselineskipselectfont 1par expandparThis 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 package 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

MTfixfontdimensix

MTdimensix

If fontdimen6 is zero character protrusion spacing kerning and tracking wonrsquotwork and we could skip the settings (for example the dsfont fonts donrsquot specifythis dimension this is probably a bug ndash the fourier and newpxnewtx packageshave been fixed in the meantime) However we can fix it ourselves ndash only trackingstill doesnrsquot work (it seems that letterspacefont uses the fontdimen 6 from theoriginal font) XETEX doesnrsquot provide an equivalent to pdffontsize so we use thenominal size instead

1050 langpdftex-def|luatex-def|xetex-defrang1051 defMTfixfontdimensix1052 ifnumfontdimen6MTfont=z1053 fontdimen6MTfont=1054 langpdftex-defrang pdffontsizeMTfont1055 langluatex-defrang MTrequiresluatex4pdffeedback fontsizepdffontsizeMTfont1056 langxetex-defrang MTsize pt1057 MTinfoFixing zero stringfontdimen 6 for font `MTfontrsquoMessageBreak1058 (new value thefontdimen6MTfont)1059 MTgletncMTfont-fake6empty1060 fi1061 edefMTdimensixnumberfontdimen6MTfont1062 1063 langpdftex-def|luatex-def|xetex-defrang

IMPLEMENTATION Font setup 60

MTsplitname

MTencoding

MTfamily

MTseries

MTshape

MTsize

Split up the font name (lang6rang may be a protrusionexpansion context andor aletterspacing amount) With fontspec we also need to remove its internal instancecounter

1064 langpackagerang1065 defMTsplitname123456nil1066 defMTencoding11067 ifMTfontspec1068 edefMTfamilyMTscrubfeature2()relax1069 else1070 defMTfamily21071 fi1072 defMTseries 31073 defMTshape 41074 defMTsize 51075 MTfixfontdimensix

MTfamilyalias Alias family1076 MTifdefinednTFMTMTfamily alias1077 MTletcnMTfamilyaliasMTMTfamily alias1078 letMTfamilyaliasempty1079

MTscrubfeature

MTscrubfeatures

Remove one resp all feature counters (fontspec)1080 defMTscrubfeature1(2)3relax11081 defMTscrubfeatures1(2)3relax1082 11083 ifxrelax3relaxelse1084 MTscrubfeatures3relax1085 fi1086

ifMTdo

MTfeat

MTmaybedo

We check all features of the current font against the lists of the currently activefont set and set ifMTdo accordingly

1087 newififMTdo1088 defMTmaybedo1

(but only if the feature isnrsquot globally set to false)1089 csname ifMTcsname MTabbr1endcsnameendcsname

Begin with setting micro-typography to true for this font The MTchecklisttests will set it to false if the property is not in the list The first non-empty list thatdoes not contain a match will stop us (except for font)

1090 MTdotrue1091 edeftempacsname MT1setnameendcsname1092 MTmapclistnfontencodingfamilyseriesshapesize1093 MTifdefinednTFMTchecklist11094 csname MTchecklist1endcsname1095 MTchecklist11096 11097 1098 else1099 MTdofalse1100 fi1101 ifMTdo

MTfeat stores the current feature1102 defMTfeat11103 csname MTset1codesendcsname1104 else1105 MTifstreq1tr1106 letMTinfonotrackingMTinfonotracking1107 MTvinfo No nameuseMTabbr11108 fi

IMPLEMENTATION Font setup 61

1109

MTinfonotracking

MTinfonotracking

To defer the message to after the font has actually been logged1110 letMTinfonotrackingrelax1111 defMTinfonotrackingMTvinfo No tracking

MTdinfolist

1112 langdebugrangdefMTdinfolist123MTdinfonl1nameuseMTabbr1 21113 langdebugrang ifx3list emptyelse `nameuseMT2rsquo 3 listfi

MTchecklist The generic test (lang1rang is the axis lang2rang the feature tempa contains the set name)1114 defMTchecklist121115 langdebugrang MTifdefinednT1116 langdebugrang MTifdefinednTF1117 MT2list1tempa

Begin a (neatly masqueraded) expandafter orgy to test whether the font attributeis in the list

1118 expandafterMTexponenexpandafterMTinclist1119 csname MT1expandafterendcsname1120 csname MT2list1tempaendcsname1121 ifMTinlist1122 langdebugrangMTdinfolist21in1123 MTdotrue1124 else1125 langdebugrangMTdinfolist21not in1126 MTdofalse1127 expandafterMTclistbreak1128 fi1129

If no limitations have been specified ie the list for a font attribute has not beendefined at all the font should be set up

1130 langdebugrang MTdinfolist211131

MTchecklistfamily Also test for the alias font if the original font is not in the list1132 defMTchecklistfamily11133 langdebugrang MTifdefinednT1134 langdebugrang MTifdefinednTF1135 MT1listfamilytempa1136 MTexptwonMTinclist1137 MTfamilycsname MT1listfamilytempaendcsname1138 ifMTinlist1139 langdebugrangMTdinfolist1familyin1140 MTdotrue1141 else1142 langdebugrangMTdinfolist1familynot in1143 MTdofalse1144 ifxMTfamilyaliasempty else1145 MTexptwonMTinclist1146 MTfamilyaliascsname MT1listfamilytempaendcsname1147 ifMTinlist1148 langdebugrang MTdinfolist1family aliasin1149 MTdotrue1150 langdebugrangelseMTdinfolist1family aliasnot in1151 fi1152 fi1153 fi1154 ifMTdo else1155 expandafterMTclistbreak1156 fi1157 1158 langdebugrang MTdinfolist1family

IMPLEMENTATION Font setup 62

1159

MTchecklistsize Test whether font size is in list of size ranges1160 defMTchecklistsize11161 langdebugrang MTifdefinednT1162 langdebugrang MTifdefinednTF1163 MT1listsizetempa1164 MTexpcsMTinrlistMT1listsizetempa1165 ifMTinlist1166 langdebugrangMTdinfolist1sizein1167 MTdotrue1168 else1169 langdebugrangMTdinfolist1sizenot in1170 MTdofalse1171 expandafterMTclistbreak1172 fi1173 1174 langdebugrang MTdinfolist1size1175

MTchecklistfont If the font matches we skip the rest of the test1176 defMTchecklistfont11177 langdebugrang MTifdefinednT1178 langdebugrang MTifdefinednTF1179 MT1listfonttempa

Since MTfont may be appended with context andor letterspacing specs weconstruct the name from the font characteristics

1180 edeftempbMTencodingMTfamilyMTseriesMTshapeMTsize1181 expandafterMTexponenexpandafterMTinclistexpandafter1182 tempb csname MT1listfonttempaendcsname1183 ifMTinlist1184 langdebugrangMTdinfolist1fontin1185 expandafterMTclistbreak1186 else1187 langdebugrangMTdinfolist1fontnot in1188 MTdofalse1189 fi1190 1191 langdebugrang MTdinfolist1font1192

1421 Protrusion

ifMTnofamily Info for settings that are not family-specific (Warnings seem to be too irritating)The switch is set in MTnextlistname

1193 newififMTnofamily1194 langpackagerang

MTprotrusion Set up for protrusion1195 langpdftex-def|xetex-def|luatex-defrang1196 defMTprotrusionMTmaybedopr

MTsetprcodes This macro is called by MTsetupfont and does all the work for setting up a fontfor protrusion

1197 defMTsetprcodes1198 MTnofamilyfalse

Check whether and if which list should be applied to the current font If family-specific settings donrsquot exist we write it to the log (for each encoding)

1199 MTiflistexists1200 ifMTnofamily

IMPLEMENTATION Font setup 63

1201 MTifdefinednTFMTencoding-MTfamily-settingsrelax1202 MTinfonlLoading generic protrusion settings for font familyMessageBreak1203 `MTfamilyrsquo (encoding MTencoding)MessageBreak1204 For optimal results create family-specific settingsMessageBreak1205 See the microtype manual for details1206 MTgletncMTencoding-MTfamily-settingsempty1207 1208 fi1209 MTgetopt1210 MTresetprcodes

Get the name of the inheritance list and parse it1211 MTgetinhlist

Set an input encoding1212 MTsetinputencc

Load additional lists1213 MTloadlistMTprcname1214 MTsetlistname

Load the main list1215 MTletcntempcMTprcMTprcname1216 expandafterMTsetcodestempcrelax1217 MTresetprcodes1218

MTsetallpr Set all protrusion codes of the font1219 defMTsetallpr121220 langdebugrangMTdinfonl3-- lprp setting all to 121221 letMTtempempty1222 MTifempty1relaxgaddtomacroMTtemplpcodeMTfonttempcnta=11223 MTifempty2relaxgaddtomacroMTtemprpcodeMTfonttempcnta=21224 MTdofontMTtemp1225

MTresetprcodes

MTresetprcodes

All protrusion codes are zero for new fonts However if we have to reload the fontdue to different contexts we have to reset them This command will be changed bymicrotypecontext if necessary

1226 defMTresetprcodesMTsetallprzz1227 letMTresetprcodesrelax

MTtheprcode

MTtheprcodetr

If the font is letterspaced we have to add half the letterspacing amount to themargin kerns This will be activated in MTsettrcodes

1228 defMTtheprcodetempcntb1229 langpdftex-def|luatex-defrang1230 langpdftex-defrangMTrequirespdftex61231 langluatex-defrangMTrequiresluatex31232 defMTtheprcodetr1233 numexprtempcntb+MTletterspace2relax1234 1235 relax1236 langpdftex-def|luatex-defrang

MTsetcodes Split up the values and set the codes1237 defMTsetcodes11238 ifxrelax1emptyelse1239 MTsplitcodes 1==relax1240 expandafterMTsetcodes1241 fi1242

MTsplitcodes The keyval package would remove spaces here which we neednrsquot do sinceSetProtrusion ignores spaces in the protrusion list anyway MTgetcharunit

IMPLEMENTATION Font setup 64

may mean different things1243 defMTsplitcodes1=2=3relax1244 deftempa11245 ifxtempaempty else1246 MTgetslot1247 langpdftex-def|luatex-defrang ifnumMTchar gt mne1248 langxetex-defrang ifxMTcharempty else1249 MTgetcharunit1250 csname MTMTfeat splitvalendcsname2relax1251 fi1252 fi1253

MTprsplitval

1254 defMTprsplitval12relax1255 deftempb11256 MTifemptytempbrelax1257 MTscaletoem1258 lpcodeMTfontMTchar=MTtheprcode1259 langdebugrangMTdinfonl4 lp (MTchar) numberlpcodeMTfontMTcharspace [1]1260 1261 deftempb21262 MTifemptytempbrelax1263 MTscaletoem1264 rpcodeMTfontMTchar=MTtheprcode1265 langdebugrangMTdinfonl4 rp (MTchar) numberrpcodeMTfontMTcharspace [2]1266

Now we can set the values for the inheriting characters Their slot numbers aresaved in the macro MTinhlanglist nameranglangslot numberrang

1267 MTifdefinedcTMTprinhname1268 MTifdefinednTMTinhMTprinhname MTchar 1269 MTexpcsMTmaptlistc1270 MTinhMTprinhname MTchar 1271 MTsetprheirs1272 1273 1274

MTscaletoem Since pdfTEX version 014h we have to adjust the protrusion factors (ie convertnumbers from thousandths of character width to thousandths of an em of the font)We have to do this before setting the inheriting characters so that the latter inheritthe absolute value not the relative one if they have a differing width (eg the lsquoffrsquoligature) Unlike protcodetex and pdfcprot we do not calculate with lpcoderesp rpcode since this would disallow protrusion factors larger than the characterwidth (since [lr]pcodersquos limit is 1000) Now the maximum protrusion is 1em ofthe font

The unit is in MTcount the desired factor in tempb and the result will bereturned in tempcntb

1275 langpdftex-defrangMTrequirespdftex31276 defMTscaletoem1277 tempcntb=MTcountrelax

For really huge fonts (100 pt or so) an arithmetic overflow could occur with vanillaTEX Using e-TEX this canrsquot happen since the intermediate value is 64 bit whichcould only be reached with a character width larger than maxdimen

1278 MTscaletempcntb tempb MTdimensix1279 ifnumtempcntb=z else1280 MTscalefactor1281 fi1282

IMPLEMENTATION Font setup 65

MTgetcharwd Get the width of the character When using e-TEX we can employ fontcharwdinstead of building scratch boxes

1283 defMTgetcharwd1284 langpdftex-defrang1285 ^^X MTcount=fontcharwdMTfontMTcharrelax1286 ^^Q setboxz=hboxMTfont charMTchar1287 ^^Q MTcount=wdz1288 langpdftex-defrang1289 langluatex-defrang MTcount=fontcharwdMTfontMTcharrelax

MTchar contains a slot number (legacy fonts) a Unicode number or a glyph name(if MTchar is negative)

1290 langxetex-defrang1291 ifnumMTcharltz1292 setboxz=hboxMTfont XeTeXglyph-MTchar1293 MTcount=wdz1294 else1295 MTcount=fontcharwdMTfontMTcharrelax1296 fi1297 langxetex-defrang1298 ifnumMTcount=z MTinfomissingchar fi1299

For letterspaced fonts we have to subtract the letterspacing amount from thecharactersrsquo widths The protrusion amounts will be adjusted in MTsetprcodesThe letterspaced font is already loaded so that 1em = fontdimen6

1300 langpdftex-defrang1301 MTrequirespdftex61302 gaddtomacroMTgetcharwd1303 MTifdefinedcTMTletterspace1304 advanceMTcount -dimexprMTletterspace sp dimexpr 1em1000relax1305 1306 relax1307

No adjustment with versions 014f and 014g1308 defMTscaletoem1309 MTcount=tempbrelax1310 ifnumMTcount=z else1311 MTscalefactor1312 fi1313

We need this in MTwarncodetoolarge (neutralised)1314 defMTgetcharwdMTcount=MTdimensix1315 1316 langpdftex-defrang1317 langpdftex-def|xetex-def|luatex-defrang

MTgetfontdimen For the space unit1318 langpackagerang1319 defMTgetfontdimen11320 ifnumfontdimen1MTfont=z1321 MTwarningnlFont `MTfontrsquo does not specify itsMessageBreak1322 backslashchar fontdimen 1 (itrsquos zero)MessageBreak1323 You should use a different `unitrsquo for MTcurrlistname1324 else1325 MTcount=fontdimen1MTfont1326 fi1327

MTinfomissingchar Info about missing characters or characters with zero width1328 defMTinfomissingchar

IMPLEMENTATION Font setup 66

1329 MTinfonlCharacter `theMTtoksrsquo1330 ^^X ifnumMTcharltz is missingelse1331 ^^X iffontcharMTfontMTchar1332 has a width of 0pt1333 ^^X else is missingfifi1334 ^^Q MessageBreak (itrsquos probably missing)1335 MessageBreak in font `MTfontrsquoMessageBreak1336 Ignoring protrusion settings for this character1337

MTscalefactor Furthermore we might have to multiply with a factor1338 defMTscalefactor1339 ifnumcsname MTMTfeat factorendcsname=m else1340 expandafterMTscaleexpandafter tempcntb1341 csname MTMTfeat factorendcsname m1342 fi1343 ifnumtempcntbgtcsname MTMTfeat maxendcsnamerelax1344 MTexpcsMTwarncodetoolargeMTMTfeat max1345 else1346 ifnumtempcntbltcsname MTMTfeat minendcsnamerelax1347 MTexpcsMTwarncodetoolargeMTMTfeat min1348 fi1349 fi1350

MTwarncodetoolarge Type out a warning if a chosen protrusion factor is too large after the conversionAs a special service we also type out the maximum amount that may be specifiedin the configuration

1351 defMTwarncodetoolarge11352 tempcnta=1relax1353 ifnumcsname MTMTfeat factorendcsname=m else1354 expandafterMTscaleexpandaftertempcntaexpandafter1355 m csname MTMTfeat factorendcsname1356 fi1357 MTscaletempcnta MTdimensix MTcount1358 MTwarningnlThe nameuseMTabbrMTfeat code tempbspace1359 is too large for characterMessageBreak1360 `theMTtoksrsquo in MTcurrlistnameMessageBreak1361 Setting it to the maximum of numbertempcnta1362 tempcntb=1relax1363

MTgetopt The optional argument to the configuration commands (except for SetExpansionand SetTracking which are being dealt with in MTgetexopt and MTgettroptresp)

1364 defMTgetopt1365 MTsetlistname

MTprfactor

MTspfactor

MTknfactor

Apply a factor1366 MTifdefinednTFMTMTfeat ccsname MTMTfeat cnameendcsname factor1367 MTletnnMTMTfeat factor1368 MTMTfeat ccsname MTMTfeat cnameendcsname factor1369 MTvinfo Multiplying nameuseMTabbrMTfeat codes by1370 numbercsname MTMTfeat factorendcsname10001371 1372 MTletnnMTMTfeat factorMTMTfeat factor1373

MTprunit

MTspunit

MTknunit

The unit can only be evaluated here since it might be font-specific If itrsquos emptyitrsquos relative to character widths if itrsquos minus1 relative to space dimensions

1374 MTifdefinednTFMTMTfeat ccsname MTMTfeat cnameendcsname unit1375 MTletnnMTMTfeat unit1376 MTMTfeat ccsname MTMTfeat cnameendcsname unit

IMPLEMENTATION Font setup 67

1377 MTexpcsifxMTMTfeat unitempty1378 MTvinfo Setting nameuseMTabbrMTfeat codes1379 relative to character widths1380 else1381 MTexpcsifxMTMTfeat unitmne1382 MTvinfo Setting nameuseMTabbrMTfeat codes1383 relative to width of space1384 fi1385 fi1386 1387 MTletnnMTMTfeat unitMTMTfeat unit1388

MTgetspaceunit

MTgetcharunit

The codes are either relative to character widths or to a fixed width For spacingand kerning lists they may also be relative to the width of the interword glue Onlythe setting from the top list will be taken into account

1389 letMTgetcharunitrelax1390 letMTgetspaceunitgobble1391 MTexpcsifxMTMTfeat unitempty1392 letMTgetcharunitMTgetcharwd1393 else1394 MTexpcsifxMTMTfeat unitmne1395 letMTgetspaceunitMTgetfontdimen1396 else1397 MTexpcsMTgetunitMTMTfeat unit1398 fi1399 fi

Preset all characters If so we surely donrsquot need to reset too1400 MTifdefinednTMTMTfeat ccsname MTMTfeat cnameendcsname preset1401 csname MTpresetMTfeatendcsname1402 MTletncMTresetMTfeat codesrelax1403 1404

MTgetunit

MTgetunit

If unit contains an em or ex we use the corresponding fontdimen to obtain thereal size Simply converting the em into points might give a wrong result sincethe font probably isnrsquot set up yet so that these dimensions havenrsquot been updatedeither

1405 defMTgetunit11406 expandafterMTgetunit1 enil1407 ifxxemptyelselet1xfi1408 defaultunitstempdima1 ptrelaxnnil1409 ifdimtempdima=z1410 MTwarningnl1411 Cannot set nameuseMTabbrMTfeat factors relative to zeroMessageBreak1412 width Setting factors of list `nameuseMTMTfeat cnamersquoMessageBreak1413 relative to character widths instead1414 let1empty1415 letMTgetcharunitMTgetcharwd1416 else1417 MTvinfo Setting nameuseMTabbrMTfeat factors relative1418 to thetempdima1419 MTcount=tempdimarelax1420 fi1421 1422 defMTgetunit1e23nil1423 ifx3letxempty else1424 if m21425 edefx1fontdimen6MTfont1426 else1427 if x21428 edefx1fontdimen5MTfont1429 fi

IMPLEMENTATION Font setup 68

1430 fi1431 fi1432

MTsetinputenc The configurations may be under the regime of an input encoding1433 defMTsetinputenc1

MTcat We remember the current category (c or inh) in case of warnings later1434 defMTcat1

1435 edeftempaMTMTfeat 1csname MTMTfeat 1nameendcsname inputenc1436 MTifdefinednTtempaMTsetinputenc1437

MTsetinputenc More recent versions of inputenc remember the current encoding so that we cantest whether we really have to load the encoding file

1438 MTaddtosetup1439 ifpackageloadedinputenc1440 ifpackagelaterinputenc200602221441 defMTsetinputenc1442 MTifstreqinputencodingnamecsnametempaendcsnamerelax1443 MTloadinputenc1444 1445 1446 letMTsetinputencMTloadinputenc1447 1448 1449 defMTsetinputenc1450 MTwarningnlKey `inputencrsquo used in MTcurrlistname but the `inputencrsquo1451 MessageBreak package isnrsquot loaded Ignoring input encoding1452 1453 1454

MTloadinputenc Set up normal catcodes since eg listings would otherwise want to actuallytypeset the inputenc file when it is being loaded inside a listing

1455 defMTloadinputenc1456 MTcfgcatcodes1457 langdebugrangMTdinfonl1loading input encoding nameusetempa1458 inputencodingnameusetempa1459 1460 langpackagerang

MTsetprheirs Set the inheriting characters1461 langpdftex-def|xetex-def|luatex-defrang1462 defMTsetprheirs11463 lpcodeMTfont 1=lpcodeMTfontMTcharrelax1464 rpcodeMTfont 1=rpcodeMTfontMTcharrelax1465 langdebugrangMTdinfonl2-- heir of MTchar 11466 langdebugrangMTdinfonl4 lprp (1) numberlpcodeMTfontMTcharspace1467 langdebugrang numberrpcodeMTfontMTcharspace1468

MTpresetpr

MTpresetpr

Preset characters Presetting them relative to their widths is not allowed1469 defMTpresetpr1470 expandafterexpandafterexpandafterMTpresetpr1471 csname MTprcMTprcname presetendcsnamenil1472 1473 defMTpresetpr12nil1474 ifxMTprunitempty1475 MTwarnpresettowidthpr1476 letMTpresetauxMTpresetauxfactor1477 else1478 defMTpresetauxMTpresetauxspace21479 fi

IMPLEMENTATION Font setup 69

1480 MTifempty1lettempaemptyMTpresetaux1tempa1481 MTifempty2lettempbemptyMTpresetaux2tempb1482 MTsetallprtempatempb1483

MTpresetaux

MTpresetauxfactor

MTpresetauxspace

Auxiliary macro for presetting Store value lang1rang in macro lang2rang1484 defMTpresetauxfactor121485 tempcntb=1relax1486 MTscalefactor1487 edef2numbertempcntb1488 1489 defMTpresetauxspace1231490 deftempb21491 MTgetspaceunit11492 MTscaletoem1493 edef3numbertempcntb1494

MTwarnpresettowidth

1495 defMTwarnpresettowidth11496 MTwarningnl1497 Cannot preset characters relative to their widthsMessageBreak1498 for nameuseMTabbr1 list `nameuseMT1cnamersquo Presetting them1499 MessageBreak relative to 1em instead1500 1501 langpdftex-def|xetex-def|luatex-defrang

1422 Expansion

MTexpansion Set up for expansion1502 langpdftex-def|luatex-defrang1503 defMTexpansionMTmaybedoex

MTsetexcodess Setting up font expansion is a bit different because of the selected option Thereare two versions of this macro

If selected=true we only apply font expansion to those fonts for which a listhas been declared (ie like for protrusion)

1504 defMTsetexcodess1505 MTiflistexists1506 MTgetexopt1507 letMTgetcharunitrelax1508 MTresetefcodes1509 MTgetinhlist1510 MTsetinputencc1511 MTloadlistMTexcname1512 MTsetlistname1513 MTletcntempcMTexcMTexcname1514 expandafterMTsetcodestempcrelax1515 MTexpandfont1516 relax1517 1518 langpdftex-def|luatex-defrang

MTsetexcodesn If on the other hand all characters should be expanded by the same amount weonly take the first optional argument to SetExpansion into account

ifMTnonselected We need this boolean in MTiflistexists so that no warning for missing listswill be issued

1519 langpackagerangnewififMTnonselected1520 langpdftex-def|luatex-defrang1521 defMTsetexcodesn1522 MTnonselectedtrue

IMPLEMENTATION Font setup 70

1523 MTiflistexists1524 MTgetexopt1525 1526 letMTstretch MTstretch1527 letMTshrink MTshrink1528 letMTstep MTstep1529 letMTauto MTauto1530 letMTexfactorMTexfactor1531 1532 MTresetefcodes1533 MTexpandfont1534 MTnonselectedfalse1535

MTsetexcodes Default is non-selected It can be changed in the package options1536 letMTsetexcodesMTsetexcodesn

MTexpandfont Expand the font For some reason older LuaTEX versions freeze if the autoexpandmodifier is missing Canrsquot be bothered to find out why For newer versions we couldalso use the function fontsetexpansion or in the future luaotfloadrsquos expansionfont feature

1537 langluatex-defrang1538 MTrequiresluatex31539 MTrequiresluatex4letpdffontexpandexpandglyphsinfontrelax1540 ifnumluatexversionlt791541 defMTexpandfont1542 pdffontexpandMTfont MTstretch MTshrink MTstep autoexpandrelax1543 1544 else1545 defMTexpandfont1546 pdffontexpandMTfont MTstretch MTshrink MTsteprelax1547 1548 fi1549 1550 langluatex-defrang1551 defMTexpandfont1552 pdffontexpandMTfont MTstretch MTshrink MTstep MTautorelax1553 1554 langluatex-defrang

MTsetallex

MTresetefcodes

At first all expansion factors for the characters will be set to 1000 (respectively thefactor of this font)

1555 defMTsetallex11556 langdebugrangMTdinfonl3-- ex setting all to number11557 MTdofontefcodeMTfonttempcnta=1relax1558 1559 defMTresetefcodesMTsetallexMTexfactor

MTresetefcodes However this is only necessary for pdfTEX versions prior to 120 or LuaTEX lt 090(actually I think 087)

1560 langpdftex-defrangMTrequirespdftex41561 langluatex-defrangMTrequiresluatex51562 1563 defMTresetefcodes1564 ifnumMTexfactor=m else1565 MTresetefcodes1566 fi1567 1568 1569 letMTresetefcodesMTresetefcodes1570

MTexsplitval Therersquos only one number per character

IMPLEMENTATION Font setup 71

1571 defMTexsplitval1relax1572 tempcntb=1relax

Take an optional factor into account1573 ifnumMTexfactor=m else1574 MTscaletempcntb MTexfactor m1575 fi1576 ifnumtempcntb gt MTexmax1577 MTwarnextoolargeMTexmax1578 else1579 ifnumtempcntb lt MTexmin1580 MTwarnextoolargeMTexmin1581 fi1582 fi1583 efcodeMTfontMTchar=tempcntb1584 langdebugrangMTdinfonl4 ef (MTchar) numberefcodeMTfontMTchar [1]

Heirs heirs I love thy heirs1585 MTifdefinedcTMTexinhname1586 MTifdefinednTMTinhMTexinhname MTchar 1587 MTexpcsMTmaptlistcMTinhMTexinhname MTchar MTsetexheirs1588 1589 1590

MTwarnextoolarge

1591 defMTwarnextoolarge11592 MTwarningnlExpansion factor numbertempcntbspace too large for1593 characterMessageBreak `theMTtoksrsquo in MTcurrlistnameMessageBreak1594 Setting it to the maximum of number11595 tempcntb=1relax1596

MTgetexopt

MTexfactor

MTstretch

MTshrink

MTstep

MTauto

Apply different values to this font1597 defMTgetexopt1598 MTsetlistname1599 MTifdefinednTFMTexcMTexcname factor1600 MTletcnMTexfactorMTexcMTexcname factor1601 MTvinfo Multiplying expansion factors by numberMTexfactor10001602 1603 letMTexfactorMTexfactor1604 1605 MTgetexoptstretchSetting stretch limit to numberMTstretch1606 MTgetexoptshrink Setting shrink limit to numberMTshrink1607 MTgetexoptstep Setting expansion step to numberMTstep1608 langluatex-defrang MTrequiresluatex3relax1609 MTgetexoptautoMTifstreqMTautoautoexpandEnDisabling automatic expansion1610 langluatex-defrang 1611 MTifdefinednTMTexcMTexcname preset1612 MTpresetex1613 letMTresetefcodesrelax1614 1615

MTgetexopt

1616 defMTgetexopt121617 MTifdefinednTFMTexcMTexcname 11618 MTletnnMT1MTexcMTexcname 11619 MTvinfo 21620 1621 MTletnnMT1MT11622 1623

MTsetexheirs

IMPLEMENTATION Font setup 72

1624 defMTsetexheirs11625 efcodeMTfont1=efcodeMTfontMTchar1626 langdebugrangMTdinfonl2-- heir of MTchar 11627 langdebugrangMTdinfonl4 ef (1) numberefcodeMTfontMTchar1628

MTpresetex

1629 defMTpresetex1630 tempcntb=csname MTexcMTexcname presetendcsnamerelax1631 MTscalefactor1632 MTsetallextempcntb1633 1634 langpdftex-def|luatex-defrang

1423 Interword spacing (glue)

MTspacing Adjustment of interword spacing Only works with pdfTEX1635 langpdftex-defrang1636 MTrequirespdftex61637 defMTspacingMTmaybedosp

MTsetspcodes This is all the same1638 defMTsetspcodes1639 MTiflistexists1640 MTgetopt1641 MTresetspcodes1642 MTgetinhlist1643 MTsetinputencc1644 MTloadlistMTspcname1645 MTsetlistname1646 MTletcntempcMTspcMTspcname1647 expandafterMTsetcodestempcrelax1648 MTresetspcodes1649

MTspsplitval If unit=space MTgetspaceunit will be defined to fetch the correspondingfontdimen (2 for the first 3 for the second and 4 for the third argument)

1650 defMTspsplitval123relax1651 deftempb11652 MTifemptytempbrelax1653 MTgetspaceunit21654 MTscaletoem1655 knbscodeMTfontMTchar=tempcntb1656 langdebugrangMTdinfonl4 knbs (MTchar) numberknbscodeMTfontMTchar [1]1657 1658 deftempb21659 MTifemptytempbrelax1660 MTgetspaceunit31661 MTscaletoem1662 stbscodeMTfontMTchar=tempcntb1663 langdebugrangMTdinfonl4 stbs (MTchar) numberstbscodeMTfontMTchar [2]1664 1665 deftempb31666 MTifemptytempbrelax1667 MTgetspaceunit41668 MTscaletoem1669 shbscodeMTfontMTchar=tempcntb1670 langdebugrangMTdinfonl4 shbs (MTchar) numbershbscodeMTfontMTchar [3]1671 1672 MTifdefinedcTMTspinhname1673 MTifdefinednTMTinhMTspinhname MTchar 1674 MTexpcsMTmaptlistcMTinhMTspinhname MTchar MTsetspheirs1675

IMPLEMENTATION Font setup 73

1676 1677

MTsetspheirs

1678 defMTsetspheirs11679 knbscodeMTfont1=knbscodeMTfontMTchar1680 stbscodeMTfont1=stbscodeMTfontMTchar1681 shbscodeMTfont1=shbscodeMTfontMTchar1682 langdebugrangMTdinfonl2-- heir of MTchar 11683 langdebugrangMTdinfonl4 knbsstbsshbs (1) numberknbscodeMTfontMTchar1684 langdebugrang numberstbscodeMTfontMTcharnumbershbscodeMTfontMTchar1685

MTsetallsp

MTresetspcodes

MTresetspcodes1686 defMTsetallsp1231687 langdebugrangMTdinfonl3-- knbsstbsshbs setting all to 1231688 letMTtempempty1689 MTifempty1relaxgaddtomacroMTtempknbscodeMTfonttempcnta=1relax1690 MTifempty2relaxgaddtomacroMTtempstbscodeMTfonttempcnta=2relax1691 MTifempty3relaxgaddtomacroMTtempshbscodeMTfonttempcnta=3relax1692 MTdofontMTtemp1693 1694 defMTresetspcodesMTsetallspzzz1695 letMTresetspcodesrelax

MTpresetsp

MTpresetsp 1696 defMTpresetsp1697 expandafterexpandafterexpandafterMTpresetsp1698 csname MTspcMTspcname presetendcsnamenil1699 1700 defMTpresetsp123nil1701 ifxMTspunitempty1702 MTwarnpresettowidthsp1703 MTifempty1lettempaemptyMTpresetauxfactor1tempa1704 MTifempty2lettempcemptyMTpresetauxfactor2tempc1705 MTifempty3lettempbemptyMTpresetauxfactor3tempb1706 else1707 MTifempty1lettempaemptyMTpresetauxspace21tempa1708 MTifempty2lettempcemptyMTpresetauxspace32tempc1709 MTifempty3lettempbemptyMTpresetauxspace43tempb1710 fi1711 MTsetallsptempatempctempb1712 1713 relax

1424 Additional kerning

MTkerning Again only check for additional kerning for new versions of pdfTEX1714 MTrequirespdftex61715 defMTkerningMTmaybedokn

MTsetkncodes Itrsquos getting boring I know1716 defMTsetkncodes1717 MTiflistexists1718 MTgetopt1719 MTresetkncodes1720 MTgetinhlist1721 MTsetinputencc1722 MTloadlistMTkncname1723 MTsetlistname1724 MTletcntempcMTkncMTkncname1725 expandafterMTsetcodestempcrelax1726 MTresetkncodes

IMPLEMENTATION Font setup 74

1727

MTknsplitval Again the unit may be measured in the space dimension this time only fontdimen 21728 defMTknsplitval12relax1729 deftempb11730 MTifemptytempbrelax1731 MTgetspaceunit21732 MTscaletoem1733 knbccodeMTfontMTchar=tempcntb1734 langdebugrangMTdinfonl4 knbc (MTchar) numberknbccodeMTfontMTchar [1]1735 1736 deftempb21737 MTifemptytempbrelax1738 MTgetspaceunit21739 MTscaletoem1740 knaccodeMTfontMTchar=tempcntb1741 langdebugrangMTdinfonl4 knac (MTchar) numberknaccodeMTfontMTchar [2]1742 1743 MTifdefinedcTMTkninhname1744 MTifdefinednTMTinhMTkninhname MTchar 1745 MTexpcsMTmaptlistcMTinhMTkninhname MTchar MTsetknheirs1746 1747 1748

MTsetknheirs

1749 defMTsetknheirs11750 knbccodeMTfont1=knbccodeMTfontMTchar1751 knaccodeMTfont1=knaccodeMTfontMTchar1752 langdebugrangMTdinfonl2-- heir of MTchar 11753 langdebugrangMTdinfonl4 knbc (1) numberknbccodeMTfontMTchar1754 langdebugrang numberknaccodeMTfontMTchar1755

MTsetallkn

MTresetkncodes

MTresetkncodes1756 defMTsetallkn121757 langdebugrangMTdinfonl3-- knacknbc setting all to 121758 letMTtempempty1759 MTifempty1relaxgaddtomacroMTtempknbccodeMTfonttempcnta=1relax1760 MTifempty2relaxgaddtomacroMTtempknaccodeMTfonttempcnta=2relax1761 MTdofontMTtemp1762 1763 defMTresetkncodesMTsetallknzz1764 letMTresetkncodesrelax

MTpresetkn

MTpresetkn 1765 defMTpresetkn1766 expandafterexpandafterexpandafterMTpresetkn1767 csname MTkncMTkncname presetendcsnamenil1768 1769 defMTpresetkn12nil1770 ifxMTknunitempty1771 MTwarnpresettowidthkn1772 letMTpresetauxMTpresetauxfactor1773 else1774 defMTpresetauxMTpresetauxspace21775 fi1776 MTifempty1lettempaemptyMTpresetaux1tempa1777 MTifempty2lettempbemptyMTpresetaux2tempb1778 MTsetallkntempatempb1779 1780 relax1781 langpdftex-defrang

IMPLEMENTATION Font setup 75

1425 Tracking

This only works with pdfTEX 140 or LuaTEX 0621782 langpdftex-def|luatex-defrang1783 langpdftex-defrangMTrequirespdftex61784 langluatex-defrangMTrequiresluatex31785

MTtracking

MTtracking

MTtrfontlist

We only check whether a font should not be letterspaced at all not whether wersquovealready done that (because we have to do it again)

1786 letMTtrfontlistempty1787 defMTtracking1788 MTexponenMTinclistMTfontMTtrfontlist1789 ifMTinlistelse1790 MTmaybedotr1791 ifMTdoelse1792 xdefMTtrfontlistMTtrfontlistMTfont1793 fi1794 fi1795 1796 langpdftex-def|luatex-defrang1797 langpdftex-def|luatex-def|letterspacerangletMTtracking1798 langpdftex-def|luatex-defrang MTtracking1799 langletterspacerang relax

MTsettrcodes The tracking amount is determined by the optional argument to textls settingsfrom SetTracking or the global letterspace option in this order

Tracking wonrsquot work if the original fontrsquos fontdimen6 is zero in which casewe issue a warning (once for every font)

1800 langpdftex-def|luatex-def|letterspacerang1801 defMTsettrcodes1802 langpdftex-def|luatex-defrang1803 MTvinfoTracking font `MTfontrsquoonline1804 MTifdefinednTFMTfont-fake61805 expandafterifxcsnameMTfont-fake6endcsnameempty1806 MTwarningnl1807 Font `MTfontrsquo does not specify itsMessageBreak1808 backslashchar fontdimen 6 (width of an `emrsquo) ThereforeMessageBreak1809 nameuseMTabbrMTfeat will not work with this font1810 MTgletncMTfont-fake6relax1811 fi1812 1813 MTiflistexists1814 MTgettropt1815 relax1816 langpdftex-def|luatex-defrang1817 MTifdefinedcTFMTletterspacerelaxletMTletterspaceMTletterspace1818 ifnumMTletterspace=z

Zero tracking requires special treatment1819 MTsettrzero1820 else1821 langpdftex-def|luatex-defrang MTvinfo Tracking by numberMTletterspace

Letterspacing only works in PDF mode1822 MTwarntrackingDVI

MTlsfont The letterspaced font instances are saved in macros langfont nameranglangletterspacingamountrangls

In contrast to MTfont which may reflect the font characteristics more accur-ately (taking substitutions into account) fontname is guaranteed to correspondto an actual font identifier

IMPLEMENTATION Font setup 76

1823 xdefMTlsfontcsnameexpandafterstringfontname1824 numberMTletterspace lsendcsname1825 expandafterifxMTlsfontrelax1826 langdebugrangMTdinfonl1 new letterspacing instance

In case of nested letterspacing with different amounts we have to extract the basefont again

1827 MTgetlsbasefont

luaotfload provides the faux font feature kernfactor which we will use whendealing with non-legacy fonts as it is less problematic and faster than the pdfTEXprimitive letterspacefont

1828 langluatex-def|letterspacerang1829 MTifluaotffont1830 langluatex-defampdebugrangMTdinfonl1 luaotf font MessageBreak1831 langluatex-defampdebugrang expandafterfontnamefontname1832 ifnumMTletterspaceltzdefMTminus-elseletMTminusemptyfi1833 globalexpandafterfontMTlsfont=1834 expandafterMTexptwocexpandafterMTlsfontspecfont1835 expandafterfontnameexpandafterfontnamespace nil1836 1837 langluatex-def|letterspacerang1838 langluatex-defampdebugrangMTdinfonl1 legacy font1839 globalexpandafterletterspacefontMTlsfontfontnameMTletterspace1840 langluatex-def|letterspacerang

Scale interword spacing (not configurable in letterspace)1841 langpdftex-def|luatex-defrang1842 MTifdefinedcTFMTtrispace1843 lettempaMTtrispace1844 edeftempaMTletterspace1845 MTifdefinedcTFMTtrospace1846 edeftempatempaMTtrospace1847 edeftempatempa1848 expandafterMTtrsetspacetempa1849 langpdftex-def|luatex-defrang1850 langletterspacerang1851 spacing = ltletterspace amountgt1852 fontdimen2MTlsfont=dimexprnumexpr 1000+MTletterspacerelax sp1853 fontdimen2MTlsfont1000relax1854 langletterspacerang

Adjust outer kerning (microtype only)1855 langpdftex-def|luatex-defrang1856 MTifdefinedcTFMTtrokernlettempaMTtrokerndeftempa1857 expandafterMTtrsetokerntempa

Disable ligatures (not configurable in letterspace)1858 MTifdefinedcTMTtrligaturesMTtrnoligatures1859 langpdftex-def|luatex-defrang1860 langletterspacerang1861 no ligatures = f1862 tagcodeMTlsfont`f=mne1863 langletterspacerang

Adjust protrusion values now and maybe later (in MTprsplitval) (not forLuaTEX though where letterspacing does not interfere with protrusion)

1864 langluatex-def|letterspacerang MTifluaotffontrelax1865 langdebugrangMTdinfonl2 compensating for tracking (numberMTletterspace)1866 MTdofontlpcodeMTlsfonttempcnta=numexprMTletterspace2relax1867 rpcodeMTlsfonttempcnta=numexprMTletterspace2relax1868 letMTtheprcodeMTtheprcodetr1869 langluatex-def|letterspacerang 1870 fi

IMPLEMENTATION Font setup 77

Finally let the letterspaced font propagate With LuaTEX we also need to load1871 aftergroupMTsetlsfont1872 langpdftex-def|luatex-defrang letMTfontMTlsfont1873 langluatex-defrang MTifluaotffontMTfontrelax

MTsetcurrls

MTcurrls

We need to remember the current letterspacing amount (for lslig)1874 xdefMTsetcurrlsdefnoexpandMTcurrlsMTletterspace1875 aftergroupMTsetcurrls

Adjust surrounding spacing and kerningMTsetcurros We get the current outer spacing and adjust it then after the end of the current

outer group set the current outer spacing again and adjust1876 langpdftex-def|luatex-defrang1877 MTouterspace=csname MTouterspaceexpandafterstringfontnameendcsnamerelax1878 xdefMTsetcurrosMTouterspace=theMTouterspacerelax1879 MTtrouterl1880 langpdftex-def|luatex-defrang

If MTlsadjust is empty itrsquos the starred version of textls Use scaling to avoida lsquoDimension too largersquo

1881 ifxMTlsadjustempty1882 langletterspacerang textls outer kerning = textls outer kerning = 001883 MTouterkern=-dimexprMTletterspace sp fontdimen6fontname2000relax1884 MTlsouterk

Otherwise get the current outer kerning and adjust it for left and right side(microtype only)

1885 langpdftex-def|luatex-defrang1886 else1887 MTouterkern=expandafterexpandafterexpandafterfirstoftwo1888 csname MTouterkernexpandafterstringfontnameendcsnamerelax1889 ifdimMTouterkern=zelse MTlsouterk fi1890 MTouterkern=expandafterexpandafterexpandaftersecondoftwo1891 csname MTouterkernexpandafterstringfontnameendcsnamerelax1892 langpdftex-def|luatex-defrang1893 langletterspacerang1894 xdefMTsetcurrokMTouterkern=theMTouterkernrelax1895 MTafteraftergroup1896 MTsetcurrok1897 noexpandMTlsouterk1898 1899 langletterspacerang1900 fi1901 langpdftex-def|luatex-defrang

MTsetcurrok Carry the outer kerning amount to outside the next group then set outer spacing(which will set kerning if no space follows)

1902 xdefMTsetcurrokMTouterkern=theMTouterkernrelax

Stuff to be done after the letterspace group The letterspace package only adjuststhe kerning

1903 MTafteraftergroup1904 MTsetcurros1905 MTsetcurrok1906 noexpandMTtrouterr1907 1908 langpdftex-def|luatex-defrang1909 fi1910 langpdftex-def|luatex-defrang 1911

MTafteraftergroup This helper macro carries stuff outside of the current group to the end of the nextgroup but will then respect grouping which is crucial for nested letterspacing

IMPLEMENTATION Font setup 78

(Following an idea of Will Robertson)1912 defMTafteraftergroup11913 langletterspacerang MTmaybegobblewithtikz1914 MTifdefinednTFMTaftergroupnumbercurrentgrouplevelrelax1915 MTexpcsxdefMTaftergroupnumbercurrentgrouplevel1916 MTexpcsMTgletMTaftergroupnumbercurrentgrouplevelnoexpandundefined11917 expandafteraftergroupexpandafteraftergroupMTexpcsaftergroup1918 MTaftergroupnumbercurrentgrouplevel1919 1920 langletterspacerang 1921 1922 langpdftex-def|luatex-def|letterspacerang

MTlsfontspeccolon

MTlsfontspecfont

Add the kernfactor feature to a font loaded by fontspec (we might have to addthe colon ourselves)

1923 langluatex-def|letterspacerang1924 defMTlsfontspeccolon1234nilifx312else123fi1925 defMTlsfontspecfont1 2nil1926 MTlsfontspeccolon1relaxnil1927 kernfactor=MTminus ifnumMTletterspace=1000 1else 01928 ifnumMTminusMTletterspacelt100 0fi1929 ifnumMTminusMTletterspacelt10 0fi1930 numberMTminusMTletterspace fi1931 ifx2 at fsize ptelse2firelax1932 1933 langluatex-def|letterspacerang

MTgettropt Various settings (only for the microtype version)1934 langpdftex-def|luatex-defrang1935 defMTgettropt1936 MTsetlistname1937 letMTtrfactorm

MTtrunit Different unit (for letterspace andor (outer)spacing)1938 MTifdefinednTMTtrcMTtrcname unit1939 MTletcnMTtrunitMTtrcMTtrcname unit1940 ifdimMTtrunit=1em1941 letMTtrunitundefined1942 else1943 MTgetunitMTtrunit1944 fi1945 1946 MTifdefinednTMTtrcMTtrcname1947 MTletcnMTletterspaceMTtrcMTtrcname1948 MTifdefinedcTMTtrunit1949 lettempbMTletterspace1950 MTscaletoem1951 edefMTletterspacenumbertempcntb1952 1953

MTtrispace

MTtrospace

Adjust interword spacing1954 MTgettroptspacing ispace1955 MTgettroptouterspacingospace

MTtrokern Adjust outer kerning1956 MTgettroptouterkerningokern

MTtrligatures Which ligatures should we disable (empty means all undefined none)1957 MTgettroptnoligatures ligatures1958

MTgettropt

1959 defMTgettropt12

IMPLEMENTATION Font setup 79

1960 MTifdefinednTMTtrcMTtrcname 11961 MTletnnMTtr2MTtrcMTtrcname 11962 1963 langpdftex-def|luatex-defrang

MTsetlsfont Redefine fontname which will be called a second later (in selectfont)1964 langpdftex-def|luatex-def|letterspacerang1965 langplainrangMTrequireslatex21966 defMTsetlsfontMTexptwocletfontnameMTlsfont

lsstyle Disable the tests whether the font should be letterspaced then trigger the setupOnly 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 againSetting glbcurrsize globally to empty (our previous solution) could throw usinto an infinite loop (eg with the psnfss packages via everymathsize) sowe issue glbsettings instead However in certain situations we may still misssome math fonts so letrsquos try to also enforce it by emptying glbcurrsize fingerscrossed The overhead seems small

1967 DeclareRobustCommandlsstyle1968 notmathalphabetlsstyletextls1969 letglbcurrsizeempty1970 langpdftex-def|luatex-defrang MTmaybegobblewithtikzaftergroupglbsettings1971 langpdftex-def|luatex-defrang defMTfeattr1972 letMTtrackingMTsettrcodes1973 selectfont1974

Now the definitions for the letterspace package with plain TEX1975 langplainrang1976 1977 defMTsetlsfontMTlsfont1978 deflsstyle1979 begingroup1980 escapecharmne1981 xdeffontnamecsnameexpandafterstringthefontendcsname1982 MTsettrcodes1983 endgroup1984 1985 lettextlsundefined1986 letlsligundefined1987 1988 langplainrang

lslig For Fraktur fonts some ligatures shouldnrsquot be broken up This command willtemporarily select the base font and insert the correct kerning

1989 DeclareRobustCommandlslig[1]1990 MTifdefinedcTFMTcurrls1991 escapecharmne1992 MTgetlsbasefont1993 MTouterkern=dimexprMTcurrls sp fontdimen6fontname2000relax1994 kernMTouterkern1995 fontname 11996 kernMTouterkern1997 11998

MTlsbasefont

MTgetlsbasefont

pdfTEX cannot letterspace fonts that already are letterspaced Therefore we haveto save the base font in langfont namerangbase

The previous solution (checking the macrorsquos 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

IMPLEMENTATION Font setup 80

1999 defMTgetlsbasefont2000 xdefMTlsbasefontcsnameexpandafterstringfontname baseendcsname2001 expandafterifxMTlsbasefontrelax2002 MTexptwocMTgletMTlsbasefontfontname2003 else2004 langdebugrangMTdinfonl1 fixing base font2005 MTexptwocletfontnameMTlsbasefont2006 fi2007

MTsetlsbasefont

MTsettrzero

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

2008 defMTsetlsbasefontMTexptwocletfontnameMTlsbasefont2009 defMTsettrzero2010 langdebugrangMTdinfonl1 zero tracking2011 xdefMTlsbasefontcsnameexpandafterstringfontname baseendcsname2012 expandafterifxMTlsbasefontrelax else2013 langdebugrangMTdinfonl1 fixing base font2014 aftergroupMTsetlsbasefont2015 fi2016 2017 langpdftex-def|luatex-def|letterspacerang

MTtrnoligatures pdfTEX 1400ndash1403 disabled all ligatures in letterspaced fonts2018 langpdftex-def|luatex-defrang2019 langpdftex-defrangMTrequirespdftex72020 defMTtrnoligatures2021 ifxMTtrligaturesempty2022 MTnoligaturesMTlsfontundefined2023 else2024 MTnoligaturesMTlsfontMTtrligatures2025 fi2026 2027 langpdftex-defrang2028 2029 defMTtrnoligatures2030 MTwarningnl2031 Disabling selected ligatures is only possible sinceMessageBreak2032 pdftex 1404 Disabling all ligatures instead2033 MTgletMTtrnoligaturesrelax2034 2035 2036 langpdftex-defrang

MTouterspace A new skip for outer spacing2037 newskipMTouterspace

MTtrsetspace Adjust interword spacing (fontdimen234) for inner and outer space For innerspacing the font dimensions will be adjusted the settings for outer spacing will beremembered in a macro

2038 defMTtrsetspace1234562039 langdebugrangMTdinfonl2 orig space thefontdimen2MTlsfont2040 langdebugrang thefontdimen3MTlsfont thefontdimen4MTlsfont2041 langdebugrang MessageBreak (123) (456)2042 letMTtempempty2043 MTtrsetspace142empty2044 MTtrsetspace253plus2045 MTtrsetspace364minus2046 MTgletncMTouterspaceexpandafterstringfontnameMTtemp2047 langdebugrangMTdinfonl2 inner space thefontdimen2MTlsfont2048 langdebugrang thefontdimen3MTlsfont thefontdimen4MTlsfont2049 langdebugrangMTdinfonl2 outer space MTtemp2050

IMPLEMENTATION Font setup 81

MTtrsetspace If settings for outer spacing lang2rang donrsquot exist they will be inherited from the innerspacing settings lang1rang

2051 defMTtrsetspace12342052 MTifempty22053 MTifempty1relax2054 MTtrsetspace1310002055 fontdimen3MTlsfont=tempdima2056 2057 edefMTtempMTtemp4thefontdimen3MTlsfont2058 2059 MTtrsetspace2320002060 edefMTtempMTtemp4thetempdima2061 MTifempty1relax2062 MTtrsetspace1310002063 fontdimen3MTlsfont=tempdima2064 2065 2066

MTtrsetspace If the value is followed by an asterisk the fontdimen will be scaled by the respectiveamount otherwise the value denotes the desired dimension in the respective unit

2067 defMTtrsetspace1232068 MTtestast1nil2069 MTifdefinedcTFMTtrunit2070 edeftempb1MTscaletoem2071 tempcntb=1relax2072 tempdima=dimexprtempcntb spMTdimensix1000relax

For fontdimen2 we also have to subtract the kerning that letterspacing adds toeach side of the characters (only half if itrsquos for outer spacing)

2073 ifnum2=tw2074 advancetempdima -dimexprMTletterspace spMTdimensix3relax2075 fi2076 2077 MTifemptytempalettempaMTletterspacerelax2078 tempdima=dimexpr numexpr1000+tempa sp fontdimen2MTlsfont1000relax2079 2080 langdebugrangMTdinfonl3 font dimen 2 (1) thetempdima2081

MTtrouterl Recall the last skip (must really be an interword space not just a marker nor alsquohardrsquo space ie one that doesnrsquot contain stretch or shrink parts)

2082 defMTtrouterl2083 ifhmode2084 ifdimlastskipgt5sp2085 edefxthelastskip minus 0pt2086 setboxzhboxMTouterspace=x2087 ifdimwdzgtz2088 langdebugrangMTdinfo2[[[ adjusting pre space theMTouterspace2089 unskip hskipMTouterspacerelax

Disable left outer kerning2090 letMTlsouterkrelax2091 else

The ragged2e package sets spaceskip without glue2092 ifdimlastskip=2093 ifnumspacefactorlt20002094 spaceskip2095 else2096 ifdimxspaceskip=z2097 dimexprspaceskip+fontdimen7fontnamerelax2098 else2099 xspaceskip

IMPLEMENTATION Font setup 82

2100 fi2101 fi2102 langdebugrangMTdinfo2[[[ adjusting pre space (skip) theMTouterspace2103 unskip hskipMTouterspacerelax2104 letMTlsouterkrelax2105 fi2106 fi2107 fi2108 fi2109

MTtrouternext

MTtrouterr

microtype also adjusts spacing The following is borrowed from soul Irsquove added thecases for italic correction since tracking may also be triggered by text commands(eg textsc)

2110 defMTtrouterr2111 futureletMTtrouternextMTtrouterr2112

MTifouternext We avoid using ifx tests in case MTtrouternext is let to fi etc2113 defMTifouternext12114 ifxMTtrouternext1expandafterfirstoftwoelseexpandaftersecondoftwofi2115

MTtrouterr

2116 defMTtrouterr2117 defMTtemp

Donrsquot adjust in math mode There was a tricky bug when textls was the lastcommand in a mathchoice group

2118 ifmmode else

A similar bug occurred when adjustment would happen inside a discretionarygroup which we prevent here This only works with e-TEX (which we know isavailable)

2119 ifnumcurrentgrouptype=10 else2120 defMTtemp1ifhmodehskipMTouterspace2121 langdebugrangMTdinfo2]]] adjusting post space (1) theMTouterspace2122 fi2123 expandafterifcatexpandafternoexpandcsname MTtrouternextendcsnameegroup

2124 ifhmodeunkernfiegroup2125 MTsetcurrok MTsetcurros2126 defMTtempafterassignmentMTtrouterrletMTtemp=2127 else

If the next token is maybeic (from an enclosing text command) we gobble itread the next one feed it to maybeic (via MTtroutericr) and then callourselves again

2128 MTifouternextmaybeic2129 MTsetcurrok MTsetcurros2130 defMTtempafterassignmentMTtroutericrletMTtemp=2131

If the next token is checkicr (from an inner text command) we insert ourselvesjust before it This will then call maybeic again the next round (which howeverwill always insert an italic correction since it doesnrsquot read beyond our group)

2132 MTifouternextcheckicr2133 defMTtempaftergroupMTtrouterrcheckicrletMTtemp=2134 2135 MTifouternextsptoken2136 defMTtemp ifhmodehskipMTouterspace2137 langdebugrangMTdinfo2]]] adjusting post space (2) theMTouterspace

IMPLEMENTATION Font setup 83

2138 fi2139 2140 MTifouternext~2141 defMTtemp~nobreakhskipMTouterspace2142 langdebugrangMTdinfo2]]] adjusting post space (3) theMTouterspace2143 2144 2145 MTifouternext relax2146 MTifouternextspacerelax2147 MTifouternextxobeysprelax

xspace requires special treatment2148 MTifouternextxspace2149 defMTtempxspaceMTxspace2150

If therersquos no outer spacing there may be outer kerning2151 defMTtempifdimMTouterkern=zelseMTlsouterk2152 langdebugrangMTdinfo2--- adjusting post kern theMTouterkern2153 fi2154 MTletncMTtrouternextrelax2155 fi2156 fifi2157 MTtemp2158

MTtroutericr

MTtroutericr

Helper macros for the italic correction mess2159 defMTtroutericrafterassignmentMTtroutericrMTtrouterr2160 defMTtroutericr2161 letlettoken= MTtrouternext2162 maybeic2163

MTxspace

MTxspace

If the group is followed by xspace we first feed xspace with the next token thencheck whether it has inserted a space lettoken might be something evil so itshould be encapsulated here

2164 defMTxspacefutureletlettokenMTxspace2165 defMTxspacexspacefirsttruexspace2166 ifdimlastskipgt5sp2167 unskip hskipMTouterspace2168 else2169 ifdimMTouterkern=zelseMTlsouterk fi2170 fi2171

For older pdfTEX versions and LuaTEX throw an error2172 2173 DeclareRobustCommandlsstyle2174 MTerrorLetterspacing only works with MTengine tex version2175 langpdftex-defrang 1402176 langluatex-defrang 0622177 MessageBreak or newer2178 Upgrade MTengine tex or try the `soulrsquo package instead2179 MTgletlsstylerelax2180 2181

And for XETEX too2182 langpdftex-def|luatex-defrang2183 langxetex-defrang2184 DeclareRobustCommandlsstyle2185 MTerrorLetterspacing currently doesnrsquot work with xetex2186 Run pdftex or luatex or use the `soulrsquo package instead2187 MTgletlsstylerelax2188

IMPLEMENTATION Font setup 84

2189 langxetex-defrangtextls

MTlsadjust

This command may be used like the other text commands The starred versionremoves kerning on the sides The optional argument changes the letterspacingfactor

2190 langpackage|letterspacerang2191 DeclareRobustCommandtextls2192 ifstarletMTlsadjustMTlsadjustemptyMTtextls2193 letMTlsadjustMTlsadjustrelaxMTtextls2194

MTtextls

MTletterspace

This is now almost LATEXrsquos DeclareTextFontCommand with the difference that weadjust the outer spacing and kerning also for lsstyle while LATEXrsquos text switchesdonrsquot bother about italic correction

2195 newcommandMTtextls[2][]2196 ifmmode2197 nfsstextMTlssetls1lsstyle22198 else2199 hmodebgroup2200 MTlssetls12201 lsstyle 22202 expandafter2203 egroup2204 fi2205

MTlsadjust

MTlsadjustempty

MTlsadjustrelax

MTlssetls

Set current letterspacing amount and outer kerning This has to be done inside thesame group as the letterspacing command

2206 defMTlsadjustemptyletMTlsadjustempty2207 defMTlsadjustrelaxletMTlsadjustrelax2208 defMTlssetls12209 MTifempty12210 letMTletterspaceundefined2211 KVspdefMTletterspace12212 edefMTletterspacenumberMTletterspace2213 MTlstoolargeMTletterspace2214 MTlsadjust2215

MTlstoolarge Test whether letterspacing amount is too large2216 defMTlstoolarge12217 ifnum1gtMTtrmax2218 MTwarningMaximum for option `letterspacersquo is numberMTtrmax2219 let1MTtrmax2220 else2221 ifnum1ltMTtrmin2222 MTwarningMinimum for option `letterspacersquo is numberMTtrmin2223 let1MTtrmin2224 fi2225 fi2226

MTouterkern

MTtrsetokern

This dimen is used for the starred version of textls for lslig and for adjustedouter kerning

2227 newdimenMTouterkern2228 langpackage|letterspacerang2229 langpdftex-def|luatex-defrang2230 defMTtrsetokern122231 letMTtempempty2232 MTifempty1MTtrsetokernMTtrsetokern12233 MTifempty2MTtrsetokernMTtrsetokern22234 MTgletncMTouterkernexpandafterstringfontnameMTtemp2235 langdebugrangMTdinfonl2 outer kerning (12)

IMPLEMENTATION Font setup 85

2236 langdebugrang = nameuseMTouterkernexpandafterstringfontname2237

MTtrsetokern

2238 defMTtrsetokern12239 MTtestast1nil2240 MTifdefinedcTFMTtrunit2241 edeftempb1MTscaletoem2242 tempcntb=1relax2243 tempdima=dimexpr tempcntb sp MTdimensix1000relax2244 2245 MTifemptytempalettempamrelax2246 tempdima=dimexpr numexprtempaMTletterspace1000relax sp2247 fontdimen6MTlsfont2000relax2248 2249 advancetempdima -dimexpr MTletterspace sp2250 fontdimen6MTlsfont2000relax2251 edefMTtempMTtempthetempdima2252 2253 langpdftex-def|luatex-defrang

MTlsouterk Adjust outer kerning We additionally add a marker (kern3spkern-3sp) for casesof nested letterspacing without anything actually printed

2254 langpdftex-def|luatex-def|letterspacerang2255 defMTlsouterk2256 ifhmode2257 ifdimlastkern=-3sp unkern2258 ifdimlastkern=3sp kern-3sp2259 expandafterexpandafterexpandaftergobble2260 else unkern2261 expandafterexpandafterexpandafterfirstofone2262 fi2263 else2264 expandafterfirstofone2265 fi2266 kernMTouterkernkern3spkern-3sprelax2267 fi2268 2269 langpdftex-def|luatex-def|letterspacerang

1426 Disabling ligatures

MTnoligatures The possibility to disable ligatures is a new features of pdfTEX 130 and also workswith LuaTEX

2270 langpdftex-def|luatex-defrang2271 langpdftex-defrangMTrequirespdftex52272 defMTnoligatures2273 MTdotrue2274 lettempaMTnlsetname2275 MTmapclistnfontencodingfamilyseriesshapesize2276 MTifdefinednTFMTchecklist12277 csname MTchecklist1endcsname2278 MTchecklist12279 nl2280 2281 ifMTdo2282 MTnoligaturesMTfontMTnlligatures2283 fi2284

MTnoligatures This is also used by MTsettrcodes2285 langluatex-defrangMTrequiresluatex4letpdfnoligaturesignoreligaturesinfontrelax2286 defMTnoligatures12

IMPLEMENTATION Font setup 86

2287 MTifdefinedcTF2

Early MiKTEX versions (before 252579) didnrsquot know tagcode2288 MTifdefinedcTFtagcode

No lsquoinputencrsquo key2289 letMTwarnmaybeinputencempty2290 defMTcurrlistnamebackslashchar DisableLigatures2291 MTmapclistc22292 KVspdeftempa1MTgetslot2293 ifnumMTchargtmne2294 tagcode1MTchar=mne

With LuaTEX we additionally register the ligatures that should be inhibited in atable (used by the luaotfload function keepligature)

2295 langluatex-defrang MTifluaotffont2296 langluatex-defrang MTluamicrotypenoligatures([[1]][[MTchar]])relax2297 fi2298 2299 MTvinfo Disabling ligatures for characters 22300 2301 pdfnoligatures12302 MTwarningCannot disable selected ligatures (pdftex doesnrsquotMessageBreak2303 know backslashchar tagcode) Disabling all ligatures ofMessageBreak2304 the font instead2305 2306 2307 pdfnoligatures12308 langluatex-defrang MTifluaotffont2309 langluatex-defrang MTluamicrotypenoligatures([[1]]_all_)relax2310 MTvinfo Disabling all ligatures2311 2312 2313 langpdftex-defrangrelax2314 langpdftex-def|luatex-defrang

For each potential ligature luaotfload will call the keepligature function whichexpects the first node of the ligature to check whether they should be kept orinhibited Herersquos our concoction of this function The table microtypeligs will bepopulated in MTnoligatures

2315 langluafilerang2316 microtypeligs = microtypeligs or 23172318 local function noligatures(fontcsliga)2319 local fontcs = match(fontcs([^ ]+))2320 microtypeligs[fontcs] = microtypeligs[fontcs] or 2321 tableinsert(microtypeligs[fontcs]liga)2322 end2323 microtypenoligatures = noligatures23242325 local function keepligature(c)2326 local nodedirect = nodedirect2327 local getfield = nodedirectgetfield2328 local getfont = nodedirectgetfont2329 local fch2330 if type(c) == userdata then -- in older luaotfload versions c was a node2331 f = cfont2332 ch = ccomponentschar2333 else -- since 26 c is a (direct node) number2334 f = getfont(c)2335 ch = getfield(getfield(ccomponents)char)2336 end2337 -- if ch then -- should always be true2338 local ligs = microtypeligs[match(texfontidentifier(f)([^ ]+))]

IMPLEMENTATION Font setup 87

2339 if ligs then2340 for _lig in pairs(ligs) do2341 if lig == _all_ or tonumber(lig) == ch then2342 return false2343 end2344 end2345 end2346 return true2347 -- end2348 end23492350 if luaotfload and luaotfloadletterspace then2351 if luaotfloadletterspacekeepligature then2352 microtypeinfo(overwriting function `keepligaturersquo)2353 end2354 luaotfloadletterspacekeepligature = keepligature2355 end23562357 langluafilerang

1427 Loading the configuration

MTloadlist Recurse through the lists to be loaded2358 langpackagerang2359 defMTloadlist12360 edeftempa12361 MTletcntempbMTMTfeat ctempa load2362 MTifstreqtempatempb2363 MTerrornameuseMTabbrMTfeat list `temparsquo cannot load itself2364 2365 ifxtempbrelax else2366 MTifdefinednTFMTMTfeat ctempb2367 MTvinfo First loading nameuseMTabbrMTfeat list `tempbrsquo2368 begingroup2369 MTloadlisttempb2370 endgroup2371 edefMTcurrlistnamenameuseMTabbrMTfeat list2372 noexpandMessageBreak`tempbrsquo2373 MTletcntempcMTMTfeat ctempb2374 expandafterMTsetcodestempcrelax2375 2376 MTerrornameuseMTabbrMTfeat list `tempbrsquo undefinedMessageBreak2377 Cannot load it from list `temparsquo2378 2379 fi2380 2381

MTfindfile Micro-typographic settings may be written into a file mt-langfont familyrangcfgMTfilelist We must also record whether wersquove already loaded the file

2382 letMTfilelistempty2383 defMTfindfile1

Check for existence of the file only once2384 MTinclist1MTfilelist2385 ifMTinlist else

Donrsquot forget that because reading the files takes place inside a group all commandsthat may be used there have to be defined globally

2386 MTbegincatcodes2387 letMTbegincatcodesrelax2388 letMTendcatcodesrelax2389 InputIfFileExistsmt-1cfg

IMPLEMENTATION Font setup 88

2390 edefMTcurrfilemt-1cfg2391 MTvinfo Loading configuration file MTcurrfile2392 MTxaddMTfilelist12393 2394 MTgetbasefamily1emptyemptyemptynil2395 MTexponenMTinclisttempaMTfilelist2396 ifMTinlist2397 MTxaddMTfilelist12398 else2399 InputIfFileExistsmt-tempacfg2400 edefMTcurrfilemt-tempacfg2401 MTvinfo Loading configuration file MTcurrfile2402 MTxaddMTfilelisttempa12403 2404 MTvinfo No configuration file mt-1cfg2405 MTxaddMTfilelist12406 2407 fi2408 2409 endgroup2410 fi2411

MTcfgcatcodes We have to make sure that all characters have the correct category code Especiallynew lines and spaces should be ignored since files might be loaded in the middleof the document This is basically nfsscatcodes (from the LATEX kernel) Irsquoveadded amp (in tabulars) (french) $ _ ~ and = (Turkish babel)

OK now all printable characters up to 127 are lsquootherrsquo We hope that letters arealways letters and numbers other (listings makes them active see section 1415)

We leave ^ at catcode 7 so that stuff like lsquo^^ffrsquo remains possible2412 defMTcfgcatcodes2413 makeatletter2414 catcode`^72415 catcode` 92416 catcode`^^I92417 catcode`^^M92418 catcode`z2419 catcode`ne2420 catcode`tw2421 catcode`62422 catcode`142423 MTmaptlistn2424 $amprsquo()+-lt=gt[]_`|~2425 makeother2426

MTbegincatcodes This will be used before reading the files as well as in all configuration commandsso that catcodes are also harmless when these commands are used outside theconfiguration files

2427 defMTbegincatcodes2428 begingroup2429 MTcfgcatcodes2430

MTendcatcodes End group if outside configuration file (otherwise relax)2431 letMTendcatcodesendgroup

MTgetbasefamily The family name might have a suffix eg for expert set (x) old style numbers (j)swash capitals (w) etc We mustnrsquot simply remove the last letter as this would makefor instance cms out of cmss and cmsy (OK cmex will still become cme )

We only work on the font name if it is longer than three characters

IMPLEMENTATION Font setup 89

Table 4

Order for matching fontattributes

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Encoding bull bull bull bull bull bull bull bull bull bull bull bull bull bull bull bullFamily bull bull bull bull bull bull bull bull - - - - - - - -Series bull bull bull bull - - - - bull bull bull bull - - - -Shape bull bull - - bull bull - - bull bull - - bull bull - -Size bull - bull - bull - bull - bull - bull - bull - bull -

2432 defMTgetbasefamily1234nil2433 ifxempty42434 deftempa1232435 else2436 lettempaempty2437 edeftempb12342438 expandafterMTgetbasefamilytempbnil2439 fi2440

MTgetbasefamily This will only remove one suffix (the longest match) so that combinations of suffixeswould have be to added manually (eg DeclareMicrotypeVariantsaw) Butotherwise something like lsquopplxrsquo would be truncated to lsquoprsquo

2441 defMTgetbasefamily12nil2442 edeftempatempa12443 ifx2expandaftergobbleelseexpandafterfirstofonefi2444 MTintlist2MTvariants2445 ifMTinlistelseMTgetbasefamily2nilfi2446

MTlistname

MTgetlistname

MTgetlistname

Try all combinations of font family series shape and size to get a list for the currentfont

2447 defMTgetlistname12448 langdebugrangMTdinfonl1trying to find nameuseMTabbr1 list for font `MTfontrsquo2449 letMTlistnameundefined2450 deftempb12451 MTmaptlistcMTtryorderMTgetlistname2452 2453 defMTgetlistname12454 expandafterMTnextlistname12455 ifxMTlistnameundefined else2456 expandafterMTtlistbreak2457 fi2458

MTtryorder Beginning with version 17 we always check for the font size Since the matchingorder has become more logical now it can be described in words so that we donrsquotneed table 4 in the documentation part any longer and can cast it off here

2459 defMTtryorder2460 111111101101110010111010100110002461 011101100101010000110010000100002462

MTnextlistname The current context is added to the font attributes That is the context must match2463 defMTnextlistname12342464 ifnum1=zMTnofamilytruefi2465 edeftempaMTencoding2466 ifnum1=ne MTfamily fi2467 ifnum2=ne MTseries fi2468 ifnum3=ne MTshape fi2469 ifnum4=ne fi2470 MTcontext

IMPLEMENTATION Font setup 90

2471 langdebugrangMTdinfonl1trying tempa2472 MTifdefinednTFMTtempb tempa2473 MTnextlistname42474

Also try with an alias family2475 ifnum1=ne2476 ifxMTfamilyaliasempty else2477 edeftempaMTencoding2478 MTfamilyalias2479 ifnum2=ne MTseriesfi2480 ifnum3=ne MTshapefi2481 ifnum4=ne fi2482 MTcontext2483 langdebugrangMTdinfonl1(alias) tempa2484 MTifdefinednTMTtempb tempa2485 MTnextlistname42486 2487 fi2488 fi2489 2490

MTnextlistname If size is to be evaluated do that otherwise use the current list2491 defMTnextlistname12492 ifnum1=ne2493 MTexpcsMTinrlistMTtempb tempa sizes2494 ifMTinlist2495 letMTlistnameMTsizename2496 fi2497 else2498 MTletcnMTlistnameMTtempb tempa2499 fi2500

MTiflistexists

MTcontext 2501 defMTiflistexists2502 MTletcnMTcontextMTMTfeat context2503 MTifstreqMTcontextletMTcontextemptyrelax2504 MTgetlistnameMTfeat c2505 MTifdefinedcTFMTlistname2506 MTedefnMTMTfeat cnameMTlistname2507 ifMTnonselected2508 MTvinfo Applying non-selected expansion (list `MTlistnamersquo)2509 else2510 MTvinfo Loading nameuseMTabbrMTfeat list `MTlistnamersquo2511 fi2512 firstoftwo2513

Since the name cannot be empty this is a sound proof that no matching listexists

2514 MTletncMTMTfeat cnameempty

Donrsquot warn if selected=false2515 ifMTnonselected2516 MTvinfo Applying non-selected expansion (no list)2517 else

Tracking doesnrsquot require a list either2518 MTifstreqMTfeattrrelax2519 MTwarningI cannot find a nameuseMTabbrMTfeat list2520 for fontMessageBreak`MTfontrsquo2521 ifxMTcontextemptyelsespace(context `MTcontextrsquo)fi2522 Switching offMessageBreaknameuseMTabbrMTfeat for this font

IMPLEMENTATION Font setup 91

2523 2524 fi2525 secondoftwo2526 2527

MTgetinhlist

MTcontext

The inheritance lists are global (no context)2528 defMTgetinhlist2529 letMTcontextempty

2530 MTgetlistnameMTfeat inh2531 MTifdefinedcTFMTlistname2532 MTedefnMTMTfeat inhnameMTlistname2533 langdebugrangMTdinfonl1 Using nameuseMTabbrMTfeat inheritance list2534 langdebugrang `MTlistnamersquo2535 MTletcntempcMTMTfeat inhMTlistname

If the list is empty it has already been parsed2536 ifxtempcempty else2537 langdebugrangMTdinfonl1parsing inheritance list

The group is only required in case an input encoding is given2538 begingroup2539 edefMTcurrlistnameinheritance listnoexpandMessageBreak`MTlistnamersquo2540 MTsetinputencinh2541 expandafterMTinhdotempcrelax2542 MTgletncMTMTfeat inhMTlistnameempty2543 endgroup2544 fi2545 2546 MTletncMTMTfeat inhnameundefined2547 2548

1428 Translating characters into slots

Get the slot number of the character in the current encodingMTgetslot There are lots of possibilities how a character may be specified in the configuration

files which makes translating them into slot numbers quite expensive Also wewant to have this as robust as possible so that the user does not have to solve asphinxrsquos riddle if anything goes wrong

MTchar

MTchar

The character is in tempa we want its slot number in MTchar2549 defMTgetslot2550 escapechar`2551 letMTcharmne2552 MTnoresttrue

Save unexpanded string in case we need to issue a warning message2553 MTtoks=expandaftertempa

It might be an active character ie an 8-bit character defined by inputenc If sowe will expand it here to its LICR form

2554 MTexptwocMTisactivestringtempanil

Now letrsquos walk through (hopefully) all possible cases

bull Itrsquos a letter a character or a number

2555 expandafterMTislettertemparelaxrelax2556 ifnumMTchar lt z

IMPLEMENTATION Font setup 92

bull OK so it must be a macro We do not allow random commands but only thosedefined in LATEXrsquos idiosyncratic font encoding scheme

If langencodingranglangcommandrang (thatrsquos one command) is defined we try to extract theslot number

We must be cautious not to stumble over accented characters consisting of twocommands like lsquoi or UCYRI hence string wouldnrsquot be safe enough

2557 MTifdefinednTFMTencodingMTdetokenizectempa2558 MTissymbol

bull Now wersquoll catch the rest which hopefully is an accented character (eg a)

2559 expandafterMTiscompositetemparelaxrelax2560 ifnumMTchar lt z

bull It could also be a chardefed command (eg the percent character) This seemsthe least likely case so itrsquos last

2561 expandafterMTexptwocexpandafterMTischarexpandafter2562 meaningexpandaftertempaMTcharstringrelaxrelaxrelax2563 fi2564 fi

2565 letMTcharMTchar2566 MTgetslot2567 escapecharmne2568 2569 langpackagerang

MTgetslot

2570 langpdftex-def|luatex-def|xetex-defrang2571 defMTgetslot

If itrsquos a legacy (ie TFM) font proceed as usual2572 langxetex-defrang ifnumXeTeXfonttypeMTfont=z2573 ifnumMTchar gt mne

In LuaTEX it may also be a glyph name prefixed with lsquorsquo2574 langluatex-defrang2575 ifnumMTchar=47relax2576 ifMTnorest else2577 tempcnta=MTlua2578 local glyph = microtypename_to_slot([[expandaftergobbletempa]]true)2579 if glyph then texwrite(glyph)2580 else texwrite(-1)2581 end2582 relax2583 ifnumtempcntaltz2584 MTwarnunknown2585 letMTcharmne2586 else2587 edefMTcharthetempcnta2588 langdebugrangMTdinfonl3gt `theMTtoksrsquo is a glyph name (thetempcnta)2589 fi2590 fi2591 else2592 langluatex-defrang

If the user has specified something like lsquofirsquo or wanted to define a number butforgot to use three digits wersquoll have something left of the string In this case weissue a warning and forget the complete string

2593 ifMTnorest else

IMPLEMENTATION Font setup 93

2594 MTwarnrest2595 langpdftex-def|luatex-defrang letMTcharmne2596 langxetex-defrang letMTcharempty2597 fi2598 langluatex-defrang fi2599 else2600 MTwarnunknown2601 langxetex-defrang letMTcharempty2602 fi2603 langxetex-defrang2604 else

There are more possibilities for XETEX It may also be a glyph name (prefixedwith lsquorsquo) We indicate this to MTgetcharwd by reversing the sign of MTchar

2605 ifnumMTchar=47relax2606 ifMTnorest edefMTcharU472607 else2608 tempcnta=XeTeXglyphindexexpandaftergobbletemparelax2609 ifnumtempcnta=z2610 MTwarnunknown2611 letMTcharempty2612 else2613 edefMTchartempaspace2614 edefMTchar-thetempcnta2615 langdebugrangMTdinfonl3gt `theMTtoksrsquo is a glyph name (thetempcnta)2616 fi2617 fi2618 else2619 ifnumMTchar gt mne2620 ifMTnorest

Or itrsquos a Unicode number which we mustnrsquot translate into a glyph number sincethe latter is font-specific

2621 tempcnta=XeTeXcharglyphMTcharrelax2622 ifnumtempcnta=z2623 MTinfomissingchar2624 letMTcharempty2625 else2626 langdebugrangMTdinfonl3gt (glyph number thetempcnta2627 langdebugrang glyph name XeTeXglyphnameMTfonttempcnta)2628 edefMTcharUMTchar2629 fi2630 else2631 MTwarnrest2632 letMTcharempty2633 fi2634 else2635 MTwarnunknown2636 letMTcharempty2637 fi2638 fi2639 fi2640 langxetex-defrang2641 2642 langpdftex-def|luatex-def|xetex-defrang

This is the lua function to translate glyph name into slot number Beginning withv22 luaotfload provides this function in an API which we use if available but(for now at least) keep the old code for backward compatibility

2643 langluafilerang2644 if luaotfload and luaotfloadaux and luaotfloadauxslot_of_name then2645 local slot_of_name = luaotfloadauxslot_of_name2646 microtypename_to_slot = function(name unsafe)2647 return slot_of_name(fontcurrent() name unsafe)

IMPLEMENTATION Font setup 94

2648 end2649 else2650 -- we dig into internal structure (should be avoided)2651 local function name_to_slot(name unsafe)2652 if fonts then2653 local unicodes2654 if fontsids then -- legacy luaotfload2655 local tfmdata = fontsids[fontcurrent()]2656 if not tfmdata then return end2657 unicodes = tfmdatasharedotfdataluatexunicodes2658 else -- new location2659 local tfmdata = fontshashesidentifiers[fontcurrent()]2660 if not tfmdata then return end2661 unicodes = tfmdataresourcesunicodes2662 end2663 local unicode = unicodes[name]2664 if unicode then -- does the rsquoorrsquo branch actually exist2665 return type(unicode) == number and unicode or unicode[1]2666 end2667 end2668 end2669 microtypename_to_slot = name_to_slot2670 end26712672 langluafilerang

MTisletter Input is a letter a character or a numberMTmaxchar

MTmaxslot

Warning if resulting character or slot number is too large2673 langpdftex-def|luatex-def|xetex-defrang2674 defMTmaxchar2675 langpdftex-defrang 127 2676 langluatex-def|xetex-defrang 1114111 2677 defMTmaxslot2678 langpdftex-defrang 255 2679 langluatex-def|xetex-defrang 1114111 2680 langpdftex-def|luatex-def|xetex-defrang

ifMTnorest Test whether all of the string has been used up2681 langpackagerang2682 newififMTnorest

2683 defMTisletter12relax2684 ifcat anoexpand1relax2685 edefMTcharnumber`12686 ifx22687 langdebugrangMTdinfonl3gt `theMTtoksrsquo is a letter (MTchar)2688 else2689 MTnorestfalse2690 fi2691 else2692 ifcat noexpand1relax2693 edefMTcharnumber`12694 langdebugrangMTdinfonl3gt `theMTtoksrsquo is a character (MTchar)2695 ifx22696 ifnumMTchar gt MTmaxchar MTwarnascii fi2697 else2698 MTnorestfalse2699 expandafterMTisnumber12relaxrelax2700 fi2701 fi2702 fi2703

MTisnumber Numbers may be specified as a three-digit decimal number (029) as a hexadecimalnumber (prefixed with 1D) or as a octal number (prefixed with rsquo rsquo35) They

IMPLEMENTATION Font setup 95

must consist of at least three characters (including the prefix) that is F is notpermitted

2704 defMTisnumber123relax2705 ifxrelax3relax else2706 ifxrelax2relax else2707 MTnoresttrue2708 if1relax2709 defxuppercaseedefMTcharnumber123x2710 langdebugrangMTdinfonl3gt a hexadecimal number MTchar2711 else2712 if1rsquorelax2713 defMTcharnumber1232714 langdebugrangMTdinfonl3gt an octal number MTchar2715 else2716 MTifint1232717 defMTcharnumber1232718 langdebugrangMTdinfonl3gt a decimal number MTchar2719 MTnorestfalse2720 fi2721 fi2722 ifnumMTchar gt MTmaxslot2723 MTwarnnumbertoolargenoexpand1noexpand2noexpand32724 letMTcharmne2725 fi2726 fi2727 fi2728

MTisactive Expand an active character (This was completely broken in v17 and only workedby chance before) We setdisplayprotect to translate eg Auml into A that isto whatever it is defined in the inputenc encoding file

Unfortunately the (older) inputenc definitions prefer the protectedgenericvariants (eg copyright instead of textcopyright) which our parser wonrsquotbe able to understand (Irsquom fed up now so you have to complain if you reallyreally want to be able to write lsquocopyrsquo instead of textcopyright thus rendering yourconfiguration files unportable)

Unicode characters (inputencutf8utf8x) are also supported2729 defMTisactive12nil2730 ifnumcatcode`1 = active2731 begingroup2732 setdisplayprotect2733 letIeCfirstofone2734 letinpencundefinedMTundefinedchar

Unicode handling has changed again with LATEX 201910012735 letUTFtwooctetsnoexpandempty2736 letUTFthreeoctetsnoexpandempty2737 letUTFfouroctetsnoexpandempty

We refrain from checking whether there is a sufficient number of octets2738 defUTFviiidefined1ifx 1relax2739 MTundefinedcharutf8elseexpandafter 1fi

For ucs (utf8x) Letrsquos call it experimental 2740 MTifdefinedcTPrerenderUnicode2741 PrerenderUnicodetempaletunicodecharfilterfirstofone

The expandafter hocus-pocus should please newunicodechar2742 edefxendgroup2743 defnoexpandtempaexpandafterexpandafterexpandafteremptytempa

Append what we think the translation is to the token register we use for the log

IMPLEMENTATION Font setup 96

2744 MTtoks=theMTtoksspace(=2745 expandafterexpandafterexpandafteremptytempa)2746 2747 x2748 fi2749

MTundefinedchar For characters not defined in the current input encoding2750 defMTundefinedchar1undefined in input encoding ``1rsquorsquo

MTissymbol The symbol commands might expand to funny stuff depending on context Insteadof simply expanding langcommandrang we construct the command langencodingranglangcommandrangand see whether its meaning is charlanghex numberrang which is the case for everythingthat has been defined with DeclareTextSymbol in the encoding definition files

2751 defMTissymbol2752 expandafterdefexpandafterMTcharexpandafter2753 csnameMTencodingMTdetokenizectempaendcsname

Since recently some glyphs are defined optionally in LATEX by checking if the glyphactually exists in the font (eg textasteriskcentered)

2754 expandafterexpandafterexpandafter2755 MTisoptcharMTchariffontcharcharelsefirelax2756 expandafterMTexptwocexpandafterMTischarexpandafter2757 meaningexpandafterMTcharMTcharstringrelaxrelaxrelax2758 ifnumMTchar lt z

In TU encoding some commands (currently textquotesingle textasciigraveand textquotedbl) are defined by means of the auxiliary macro removetligwhich we take care of here

2759 expandafterexpandafterexpandafterMTistligMTcharrelaxrelax2760 ifnumMTchar lt z

Finally if it hasnrsquot been defined by DeclareTextSymbol it could be a letter (egi when using frenchpro)

2761 expandafterexpandafterexpandafterMTisletterMTcharrelaxrelax2762 fi2763 fi2764

MTisoptchar This seems adventurous but wersquore only redefining the text command within thescope of our setup

2765 defMTisoptchar1iffontchar2char3else4firelax2766 ifx12767 iffontchar22768 expandafterchardef2769 csnameMTencodingMTdetokenizectempaendcsname=3relax2770 fi2771 fi2772

MTischar

MTcharstring

A helper macro that inspects the meaning of its argument2773 begingroup2774 catcode`=z

2775 MTmaptlistnCHARLEXmakeother2776 lowercase2777 defxendgroup2778 defMTcharstringCHAR2779 defMTischar1CHAR234relax2780 ifxrelax4relax2781 ifMTxunicode2782 expandafterMTischarxMTstripprefix1gtrelaxCHAR 2783 relaxrelaxrelaxrelaxrelax

IMPLEMENTATION Font setup 97

2784 fi2785 else2786 ifxrelax1relax2787 if3relax2788 edefMTcharnumber22789 MTifstreqMTcharstring34relaxMTnorestfalse2790 else2791 edefMTcharnumber232792 MTifstreqMTcharstring4relax2793 MTisxchar23|4CHARrelax2794 fi2795 langdebugrang MTdinfonl3gt `theMTtoksrsquo is a char (MTchar)2796 fi2797 fi2798

MTisxchar With fontspecrsquos TU encoding glyph numbers may be up to four digits2799 defMTisxchar1|2CHAR34relax2800 MTifstreqMTcharstring342801 edefMTcharnumber12MTnorestfalse2802

MTcharxstring

MTstripprefix

MTischarx

For xunicode which doesnrsquot countdef but rather defs the chars2803 defMTcharxstringCHAR 2804 defMTstripprefix1gt2relax22805 defMTischarx1CHAR 23456relax2806 ifxrelax1relax2807 ifxrelax6relaxelse2808 edefMTcharnumber23452809 MTifstreqRELAX gtCHAR 6relaxMTnorestfalse2810 langdebugrang MTdinfonl3gt `theMTtoksrsquo is a xunicode char (MTchar)2811 fi2812 fi2813 2814 2815 2816 x

MTistlig This might have to change again with the next LATEX release or so I feared butit still seems to be fine

2817 defMTistlig12relax2818 ifxremovetlig12819 langdebugrang MTdinfonl3gt `theMTtoksrsquo (removing removetlig)2820 MTremovetlig2821 fi2822

MTremovetlig We remove the removetlig command and only pass on the number2823 defMTremovetlig2824 expandafterMTexptwocexpandafterMTisnumber2825 expandaftersecondoftwoMTcharrelaxrelax2826

MTiscomposite Here we are dealing with accented characters specified as two tokens2827 defMTiscomposite12relax2828 ifx2else

Again we construct a control sequence this time of the form langencodingranglangaccentrang-langcharacterrang eg T1-a which we then expand once to see if it is aletter (if it has been defined by DeclareTextComposite) This should be robustfinally especially since we also detokenize the input instead of only stringifyingit Thus we will die gracefully even on wrong Unicode input without utf8

2829 expandafterdefexpandafterMTcharexpandaftercsnameexpandafter

IMPLEMENTATION Font setup 98

2830 stringcsnameMTencodingendcsname2831 MTdetokenizen1-MTdetokenizen2endcsname

In 2017 LATEX introduced a new way of declaring accented Unicode commands(DeclareUnicodeComposite) which we take care of here (UnicodeEncodingNamehas been introduced at the same time)

2832 ifxUnicodeEncodingNameundefinedelse2833 expandafterexpandafterexpandafter2834 MTisunicompMTchariffontcharelsefirelax2835 fi2836 expandafterexpandafterexpandafterMTisletterMTcharrelaxrelax

Again xunicode2837 ifnumMTchar lt z2838 ifMTxunicode2839 edefMTcharMTexptwocMTstripprefixmeaningMTchargtrelax2840 expandafterMTexptwocexpandafterMTischarxexpandafter2841 MTcharMTcharxstringrelaxrelaxrelaxrelaxrelax2842 fi2843 fi2844 fi2845

MTisunicomp Helper for DeclareUnicodeComposite2846 defMTisunicomp1iffontchar2else3firelax2847 ifx1edefMTchariffontchar2fifi2848

[What about math Well for a moment the following looked like a solution withmtismathchar defined accordingly analogous to MTischar above to pick upthe last two tokens (the meaning of a mathchardefrsquoed command expands to itshexadecimal notation)

defMTismathchar1 ifrelaxnoexpand1 its a macro letx1 else its a character mathchardefx=mathcode`1relax fi expandafterMTexptwocexpandaftermtismathcharexpandafter meaningexpandafterxmtmathcharstringrelaxrelaxrelax

However the problem is that mathcodes and mathchardefs have global scopeTherefore if they are changed by a package that loads different math fonts thereis no guarantee whatsoever that things will still be correct (eg the minus in cmsywhen the euler package is loaded) So no way to go unfortunately]

Some warning messages for performance reasons separated hereMTcurrlistname

MTsetlistname

The type and name of the current list defined at various places2849 defMTsetlistname2850 edefMTcurrlistnamenameuseMTabbrMTfeat listnoexpandMessageBreak2851 `nameuseMTMTfeat cnamersquo2852

MTwarnascii For lsquootherrsquo characters gt 127 we issue a warning (inputenc probably hasnrsquot beenloaded) since correspondence with the slot numbers would be purely coincidental

2853 defMTwarnascii2854 MTwarningnlCharacter `theMTtoksrsquo (= MTchar)2855 is outside of ASCII rangeMessageBreak2856 You must load the `inputencrsquo package before usingMessageBreak2857 8-bit characters in MTcurrlistname2858

IMPLEMENTATION Font setup 99

MTwarnnumbertoolarge Number too large2859 defMTwarnnumbertoolarge12860 MTwarningnl2861 Number 1 in encoding `MTencodingrsquo too largeMessageBreak2862 Ignoring it in MTcurrlistname2863

MTwarnrest Not all of the string has been parsed2864 defMTwarnrest2865 MTwarningnl2866 Unknown slot number of characterMessageBreak`theMTtoksrsquo2867 MTwarnmaybeinputencMessageBreak2868 in font encoding `MTencodingrsquoMessageBreak2869 Make sure itrsquos a single characterMessageBreak2870 (or a number) in MTcurrlistname2871

MTwarnunknown No idea what went wrong2872 defMTwarnunknown2873 MTwarningnl2874 Unknown slot number of characterMessageBreak`theMTtoksrsquo2875 MTwarnmaybeinputencMessageBreak2876 in font encoding `MTencodingrsquo in MTcurrlistname2877

MTwarnmaybeinputenc In case an input encoding had been requested2878 defMTwarnmaybeinputenc2879 MTifdefinednT2880 MTMTfeat MTcat csname MTMTfeat MTcat nameendcsname inputenc2881 (input encoding `nameuse2882 MTMTfeat MTcat csname MTMTfeat MTcat nameendcsname inputencrsquo)2883

1429 Hook into LATEXrsquos font selection

We append MTsetupfont to pickupfont which is called by LATEX every time afont is selected We then check whether wersquove already seen this font and if notset it up for micro-typography This ensures that we will catch all fonts and thatwe will not set up fonts more than once The whole package really hangs on thiscommand

In contrast to the pdfcprot package it is not necessary to declare in advancewhich fonts should benefit from micro-typographic treatment Also only thosefonts that are actually being used will be set up

For my reference

bull pickupfont is called by selectfont wrongfontshape orgetanddefinefonts (for math)

bull pickupfont calls definenewfont

bull definenewfont may call (inside a group)

ndash wrongfontshape which in turn will call pickupfont and thusdefinenewfont again or

ndash extractfont

bull getexternalfont is called by extractfont by itself and by the substitutionmacros

IMPLEMENTATION Font setup 100

Up to version 13 of this package we were using definenewfont as the hookwhich is only called for new fonts and therefore seemed the natural choice How-ever this meant that we had to take special care to catch all fonts we additionallyhad to set up the default font the error font (if it wasnrsquot the default font) we hadto check for some packages that might have been loaded before microtype andwere loading fonts eg jurabib ledmac pifont (loaded by hyperref) tipa andprobably many more Furthermore we had to include a hack for the IEEEtran classwhich loads all fonts in the class file itself (to fine tune inter-word spacing) andthe memoir class too To cut this short it seemed to get out of hand and I decidedthat it would be better to use pickupfont and decide for ourselves whether wersquovealready seen that font I hope the overhead isnrsquot too large

MTfontlist

MTfont

We use a comma separated list2884 letMTfontlistempty2885 letMTfontempty

All this is done at the beginning of the document It doesnrsquot work for plain ofcourse which doesnrsquot have pickupfont

2886 langpackagerang2887 langpackage|letterspacerang2888 langplainrangMTrequireslatex22889 MTaddtosetup

MTorigpickupfont The luatexja package redefines char which will upset our parsing of text symbolsand commands instead of fixing this we wonrsquot bother at least for the moment butsimply issue a warning and disable all further warnings The fix is left to the user bynot specifying any text commands but only (Unicode) letters The xeCJK packageor rather its xunicode-addon also modifies the way text symbols are defined (likeluatexja but in a different way) Again we only issue a warning

2890 langpackagerang MTwithpackageTluatexjaMTwarnunknownonceluatexja2891 langpackagerang MTwithpackageTxeCJK MTwarnunknownoncexeCJK

microtype also works with CJK in the sense that nothing will break when bothpackages are used at the same time However since CJK has its own way of encodingit is currently not possible to create character-specific settings That is the onlyfeature available with CJK fonts is (non-selected) expansion (Tracking doesnrsquotreally work for other reasons) Like us CJK redefines pickupfont

2892 ifpackageloadedCJK

The xeCJK package in turn pretends that CJK was loaded but does not changethe definition of pickupfont With xeCJK protrusion should be possible also forCJK characters I havenrsquot tried it though

2893 ifpackageloadedxeCJKfirstofone2894 ifpackagelaterCJK20061017 4702895 defMTorigpickupfontCJKifundefinedCJKplane2896 defMTorigpickupfontifundefinedCJKplane2897 gaddtomacroMTorigpickupfont2898 expandafterifxfontnamerelaxdefinenewfontfi

CJKutf8 redefines pickupfont once more (recent versions in PDF mode asdetermined by ifpdf which CJKutf8 loads)

2899 ifpackageloadedCJKutf82900 ifpackagelaterCJKutf820080522 4802901 ifpdfexpandaftersecondoftwoelseexpandafterfirstoftwofi2902 firstoftwo2903 firstoftwo2904 gaddtomacroMTorigpickupfont2905 expandafterifxcsnamecurrfontshapefsizeCJKplaneendcsnamerelax

IMPLEMENTATION Font setup 101

2906 definenewfontelsexdeffontname2907 csname currfontshapefsizeCJKplaneendcsnamefi2908 gaddtomacroMTorigpickupfont2909 expandafterifxcsname currfontshapefsizeCJKplaneendcsnamerelax2910 definenewfontdefCJKtempv2911 ifxCJKtempCJKplane2912 expandafterifxcsname CJKcmapffamilyCJKplaneendcsnamerelax2913 elsecsname CJKcmapffamilyCJKplaneendcsnamefi2914 else CJKaddcmapCJKplane fi2915 elsexdeffontname2916 csname currfontshapefsizeCJKplaneendcsnamefi2917 gobble2918 2919 firstofone

This is the normal LATEX definition2920 defMTorigpickupfontexpandafterifxfontnamerelaxdefinenewfontfi

Check whether pickupfont is defined as expected The warning issued byCheckCommand would be a bit too generic

2921 ifxpickupfontMTorigpickupfont else2922 MTwarningnl2923 Command stringpickupfontspace is not defined as expected2924 MessageBreak Patching it anyway Some things may break2925 langpackagerang2926 MessageBreak Double-check whether micro-typography is indeed2927 MessageBreak applied to the document2928 MessageBreak (Hint Turn on `verbosersquo mode)2929 langpackagerang2930 2931 fi

pickupfont Then we append our stuff Everything is done inside a group2932 gaddtomacropickupfontbegingroup

If the trace package is loaded we turn off tracing of microtypersquos setup which isextremely noisy

2933 MTwithpackageTtracegaddtomacropickupfontconditionallytraceoff2934 gaddtomacropickupfont2935 escapecharmne2936 langpackagerang2937 langdebugrang globalMTinannottrue2938 langdebugrang MTgletMTpdfannotempty2939 langdebugrang MTaddtoannot(line numberinputlineno)

If MTfont is empty no substitution has taken place hence fontname is correctOtherwise if they are different fontname does not describe the font actuallyused This test will catch first order substitutions like bx to b but it will still fail ifthe substituting font is itself substituted

2940 MTletcnMTfontMTsubstexpandafterstringfontname2941 ifxMTfontrelax2942 letMTfontfontname2943 else2944 ifxMTfontfontname else2945 langdebugrang MTaddtoannot= substituted with MTfont2946 MTregistersubstfont2947 fi2948 fi2949 MTsetupfont2950 langpackagerang2951 langletterspacerang MTtracking2952 endgroup2953 2954 langpackagerang

IMPLEMENTATION Font setup 102

MTpickupfont

MTMTpickupfont

MTltxpickupfont

Remember the patched command because we may have to disable ourselves incertain situations

2955 letMTpickupfontpickupfont2956 defMTMTpickupfont letpickupfontMTpickupfont2957 defMTltxpickupfontletpickupfontMTorigpickupfont

dosubstcorrection Additionally we hook into dosubstcorrection which is called if a substitutionhas taken place to record the name of the ersatz font Unfortunately this will onlywork for one-level substitutions We have to remember the substitute for the rest ofthe document not just for the first time it is called since we need it every time afont is letterspaced

2958 gaddtomacrodosubstcorrection2959 edefMTfontcsnamecurrfontshapefsizeendcsname2960 MTgletncMTsubstexpandafterstringfontnameMTfont

addaccent

MTorigaddaccent

Inside addaccent we have to disable microtypersquos setup since the grouping inthe patched pickupfont would break the accent if different fonts are used forthe base character and the accent Fortunately LATEX takes care that the fonts usedfor the accent are already set up so that we cannot be overlooking them

2961 letMTorigaddaccentaddaccent2962 defaddaccent122963 MTltxpickupfont2964 MTorigaddaccent122965 MTMTpickupfont2966 2967 langpackagerang2968 2969 langplainrangrelax2970 langpackagerang

Consequently (if all goes well) we are the last ones to change these commandstherefore there is no need to check whether our definition has survived

MTcheckfont Check whether wersquove already seen the current font2971 defMTcheckfontMTexponenMTinclistMTfontMTfontlist

MTregisterfont Register the current font2972 defMTregisterfontxdefMTfontlistMTfontlistMTfont

MTregistersubstfont Register the substituted font (only if it isnrsquot registered already) Additionally wehave to remove the substitute font from the list of fonts so that we set it up again

2973 defMTregistersubstfont2974 MTexponenMTinclistfontnameMTfontlist2975 ifMTinlistelse2976 xdefMTfontlistMTfontlistfontname2977 expandafterMTremfromclistMTfontMTfontlist2978 fi2979

14210 Context-sensitive setup

Here are the variants for context-sensitive setupMTactivefeatures The activated features are stored in this command

2980 letMTactivefeaturesempty

MTcheckfontcx Every feature has its own list of fonts that have already been dealt with If thefont neednrsquot be set up for a feature we temporarily disable the correspondingsetup command This should be more efficient than book-keeping the fonts in listsassociated with the combination of contexts as wersquove done it before

IMPLEMENTATION Font setup 103

2981 defMTcheckfontcx2982 MTiftrue2983 MTmapclistcMTactivefeatures2984 expandafterMTexponenexpandafterMTinclistexpandafterMTfont2985 csname MT1csname MT1contextendcsname fontlistendcsname2986 ifMTinlist2987 MTletncMTnameuseMTabbr1relax2988 else2989 MTiffalse2990 fi2991 2992 ifMTif MTinlisttrue else MTinlistfalse fi2993

MTregistersubstfontcx Add the substituted font to each feature list and possibly remove substitute font2994 defMTregistersubstfontcx2995 MTmapclistcMTactivefeatures2996 expandafterMTexponenexpandafterMTinclistexpandafterfontname2997 csname MT1csname MT1contextendcsname fontlistendcsname2998 ifMTinlist else2999 MTexpcsMTxadd3000 MT1csname MT1contextendcsname fontlist3001 fontname3002 expandafterMTexponenexpandafterMTremfromclistexpandafterMTfont3003 csname MT1csname MT1contextendcsname fontlistendcsname3004 fi3005 3006

MTregisterfontcx For each feature add the current font to the list unless we didnrsquot set it up3007 defMTregisterfontcx3008 MTmapclistcMTactivefeatures3009 MTexpcsifxMTnameuseMTabbr1relaxelse3010 MTexpcsMTxadd3011 MT1csname MT1contextendcsname fontlist3012 MTfont3013 deftempa13014 MTexpcsMTmaptlistcMT1doccontextsMTmayberemfromlist3015 fi3016 3017

MTmayberemfromlist Recurse through all context font lists of the document and remove the font unlessitrsquos the current context

3018 defMTmayberemfromlist13019 MTifstreqtempa1tempacsname MTtempa contextendcsnamerelax3020 expandafterMTexponenexpandafterMTremfromclistexpandafter3021 MTfont csname MTtempa 1fontlistendcsname3022 3023

microtypecontext

MTmicrotypecontext

The user may change the context so that different setups are possible This isespecially useful for multi-lingual documents

Inside the preamble this command shouldnrsquot actually do anything but remem-ber itself for later

3024 defmicrotypecontextMTbegincatcodesMTmicrotypecontext3025 defMTmicrotypecontext1MTendcatcodesMTaddtosetupmicrotypecontext13026 MTaddtosetup3027 DeclareRobustCommandmicrotypecontext3028 MTbegincatcodes3029 MTmicrotypecontext3030 3031 defMTmicrotypecontext13032 MTendcatcodes

IMPLEMENTATION Font setup 104

3033 MTsetupcontexts3034 letMTresetcontextrelax

We need to ensure that math fonts are set up anew3035 MTgletglbcurrsizeempty3036 setkeysMTC13037 selectfont3038 MTresetcontext3039 3040

textmicrotypecontext

MTtextmicrotypecontext

MTtextmicrotypecontext

This is just a wrapper around microtypecontext3041 DeclareRobustCommandtextmicrotypecontextMTbegincatcodesMTtextmicrotypecontext3042 defMTtextmicrotypecontext1MTendcatcodesMTtextmicrotypecontext13043 defMTtextmicrotypecontext12microtypecontext12

MTresetcontext

MTresetcontext

We have to reset the font at the end of the group provided there actually was achange

3044 defMTresetcontext3045 MTvinfoltltlt Resetting contextsonline3046 langdebugrang MessageBreak= MTprcontextMTexcontext3047 langdebugrang MTtrcontextMTkncontextMTspcontext3048 3049 selectfont3050

MTsetupcontexts The first time microtypecontext is called we initialise the context lists andredefine the commands used in pickupfont

3051 defMTsetupcontexts3052 MTmapclistcMTactivefeatures3053 MTgletncMT1fontlistMTfontlist3054 MTgletMTcheckfontMTcheckfontcx3055 MTgletMTregisterfontMTregisterfontcx3056 MTgletMTregistersubstfontMTregistersubstfontcx3057 MTgletMTsetupcontextsrelax3058

Define context keys3059 MTmapclistcMTfeatureslong3060 definekeyMTC1[]3061 edeftempbnameuseMTrbba13062 MTexponenMTinclisttempbMTactivefeatures3063 ifMTinlist

Using an empty context is only asking for trouble therefore we choose the lsquorsquoinstead (hoping for the LATEX usersrsquo natural awe of this character)

3064 MTifempty1defMTvaldefMTval13065 MTexpcsifxMTtempb contextMTval3066 langdebugrangMTdinfo1gtgtgt no change of 1 context `MTvalrsquo3067 else3068 MTvinfogtgtgt Changing 1 context to `MTvalrsquoMessageBreakonline3069 langdebugrang space(previous `nameuseMTtempb contextrsquo)3070 3071 defMTresetcontextaftergroupMTresetcontext

The next time we see the font we have to reset all factors3072 MTgletnnMTresettempb codesMTresettempb codes

We must also keep track of all contexts in the document3073 expandafterMTexponenexpandafterMTintlistexpandafter3074 MTval csname MTtempb doccontextsendcsname3075 ifMTinlist else3076 MTexpcsMTxaddMTtempb doccontextsMTval3077 langdebugrang MTdinfo1||| added 1 context nameuseMTtempb doccontexts

IMPLEMENTATION Configuration 105

3078 fi3079 MTedefnMTtempb contextMTval3080 fi3081 fi3082 3083

We also allow the activate shortcut3084 definekeyMTCactivate[]3085 setkeysMTCprotrusion=13086 setkeysMTCexpansion=13087

MTprcontext

MTexcontext

MTtrcontext

MTspcontext

MTkncontext

MTprdoccontexts

MTexdoccontexts

MTtrdoccontexts

MTspdoccontexts

MTkndoccontexts

MTextracontext

Initialise the contexts3088 MTexponenMTmapclistnMTfeaturesnl3089 MTdefnMT1context3090 MTdefnMT1doccontexts3091 3092 letMTextracontextempty

143 Configuration1431 Font sets

DeclareMicrotypeSet

DeclareMicrotypeSet

Calling this macro will create a comma list for every font attribute of the formMTlangfeatureranglistlangattributeranglangset namerang If the optional argument is empty lists forall available features will be created

The third argument must be a list of key=value pairs If a font attribute is notspecified we define the corresponding list to relax so that it does not constitutea constraint

3093 defDeclareMicrotypeSet3094 MTbegincatcodes3095 ifstar3096 MTDeclareSetAndUseIt3097 MTDeclareSet3098

MTDeclareSet

3099 newcommandMTDeclareSet[3][]3100 MTifempty13101 MTmapclistcMTfeaturesMTdeclaresets1233102 3103 MTmapclistn13104 MTifempty1relax3105 MTisfeature1set declaration `2rsquo3106 MTexponenMTdeclaresets3107 csname MTrbba1endcsname233108 3109 3110 3111 3112 MTendcatcodes3113

MTDeclareSetAndUseIt

3114 newcommandMTDeclareSetAndUseIt[3][]3115 MTDeclareSet[1]233116 UseMicrotypeSet[1]23117

MTcurrsetname We need to remember the name of the set currently being declared3118 letMTcurrsetnameempty

IMPLEMENTATION Configuration 106

MTdeclaresets Define the current set name and parse the keys3119 defMTdeclaresets1233120 defMTcurrsetname23121 MTifdefinednTMT1setMTcurrsetname3122 MTwarningRedefining nameuseMTabbr1 set `MTcurrsetnamersquo3123 MTmapclistnfontencodingfamilyseriesshapesize3124 MTgletncMT1list1MTcurrsetnameundefined3125 3126 3127 MTgletncMT1setMTcurrsetnameempty3128 langdebugrangMTdinfo1declaring nameuseMTabbr1 set `MTcurrsetnamersquo3129 setkeysMT1set33130

MTdefinesetkey lang1rang = font axis lang2rang = feature3131 defMTdefinesetkey123132 definekeyMT2set1[]3133 MTgletncMT2list1MTcurrsetnameempty3134 MTmapclistn13135 KVspdefMTval13136 MTgethighlevel1

We do not add the expanded value to the list 3137 MTexptwongaddtomacro3138 csname MT2list1MTcurrsetnameexpandafterendcsname3139 MTval3140

but keep in mind that the list has to be expanded at the end of the preamble3141 expandaftergaddtomacroexpandafterMTfontsets3142 csname MT2list1MTcurrsetnameendcsname3143 langdebugrangMTdinfonl1-- 1 nameuseMT2list1MTcurrsetname3144 3145

MTgethighlevel Saying for instance lsquofamily=rmrsquo or lsquoshape=bfrsquo will expand to rmdefault respbfdefault

3146 defMTgethighlevel13147 expandafterMTtestastMTvalnilrelax

And lsquofamily = rsquo will become familydefault3148 MTifemptytempadeftempa1relax

Test whether the command is actually defined3149 MTifdefinednTFtempa default3150 edefMTvalexpandafternoexpandcsname tempa defaultendcsname3151 MTwarning`backslashchartempa defaultrsquo is not a defined commandMessageBreak3152 Ignoring `1 = temparsquo in font setMessageBreak`MTcurrsetnamersquo3153 letMTvalempty

In contrast to earlier versions these values will not be expanded immediately butat the end of the preamble

3154 3155

MTtestast It the last character is an asterisk execute the second argument otherwise the firstone

3156 defMTtestast12nil3157 deftempa13158 MTifempty23159

MTfontsets

MTfixfontset

Fully expand the font specification and fix catcodes for all font sets Also remove

IMPLEMENTATION Configuration 107

fontspecrsquos counters3160 letMTfontsetsempty3161 defMTfixfontset13162 MTifdefinedcT13163 xdef113164 ifMTfontspec3165 xdef1expandafterMTscrubfeatures1()relax3166 fi3167 globalonelevelsanitize13168 3169

MTdefinesetkeysize size requires special treatment3170 defMTdefinesetkeysize13171 definekeyMT1setsize[]3172 MTmapclistn13173 defMTval13174 expandafterMTgetrangeMTval--nil3175 ifxMTvalrelax else3176 MTexpcsMTxadd3177 MT1listsizeMTcurrsetname3178 MTlowerMTupperrelax3179 fi3180 3181 langdebugrangMTdinfonl1-- size nameuseMT1listsizeMTcurrsetname3182 3183

Font sizes may also be specified as ranges This has been requested by AndreasBuumlhmann who has also offered valuable help in implementing this Now it is forinstance possible to set up different lists for fonts with optical sizes (The MinionProproject does this for the OpenType version of Adobersquos Minion (Available from CTANat pkgminionpro))

MTgetrange

MTupper

MTlower

Ranges will be stored as triplets of langlower boundranglangupper boundranglanglist namerangFor simple sizes the upper boundary is minus1

3184 defMTgetrange1-2-3nil3185 MTifempty13186 MTifempty23187 letMTvalrelax3188 3189 defMTlower03190 defMTval23191 MTgetsize3192 edefMTupperMTval3193 3194 3195 defMTval13196 MTgetsize3197 ifxMTvalrelax else3198 edefMTlowerMTval3199 MTifempty23200 MTifempty33201 defMTupper-1

2048 pt is TEXrsquos maximum font size3202 defMTupper20483203 3204 defMTval23205 MTgetsize3206 ifxMTvalrelax else3207 MTifdimMTlowergtMTval3208 MTerror3209 Invalid size range (MTlowerspace gt MTval) in font set

IMPLEMENTATION Configuration 108

3210 `MTcurrsetnamersquoMessageBreak Swapping sizes3211 edefMTupperMTlower3212 edefMTlowerMTval3213 3214 edefMTupperMTval3215 3216 MTifdimMTlower=MTupper3217 defMTupper-13218 relax3219 fi3220 3221 fi3222 3223

MTgetsize Translate a size selection command and normalise it3224 defMTgetsize

A single star would mean sizedefault which doesnrsquot exist so we define it to benormalsize

3225 ifMTvalrelax3226 deftempanormalsize3227 else3228 MTletcntempaMTval3229 fi3230 ifxtemparelaxelse3231 MTgetsize3232 fi

Test whether we finally got a number or dimension so that we can strip the lsquoptrsquo(defaultunits and strippt are kernel macros)

3233 MTifdimenMTval3234 defaultunitstempdimaMTval ptrelaxnnil3235 edefMTvalstrippttempdima3236 3237 MTwarningCould not parse font size `MTvalrsquoMessageBreak3238 in font set `MTcurrsetnamersquo3239 letMTvalrelax3240 3241

MTgetsize

MTgetsize

The relsize solution of parsing setfontsize does not work with the AMSclasses among others I hope my hijacking doesnrsquot do any harm We redefinesetfontsize instead of setfontsize because some classes might define thesize selection commands by simply using fontsize (eg the a0poster class)

3242 defMTgetsize3243 begingroup3244 defsetfontsize1234nilendgroupdefMTval23245 tempanil3246

The svjour3 class defines the size commands using conditionals using e-TEXprimitives we close any leftovers here

3247 ^^Xifclassloadedsvjour33248 ^^X defMTgetsize3249 ^^X tempcnta=currentiflevel3250 ^^X MTgetsize3251 ^^X MTloop3252 ^^X ifnumnumexprcurrentiflevel-1gttempcnta3253 ^^X csname fiendcsname3254 ^^X MTrepeat3255 ^^X 3256 ^^X

IMPLEMENTATION Configuration 109

3257 letMTgetsizeMTgetsize3258 ^^X

MTdefinesetkeyfont

3259 defMTdefinesetkeyfont13260 definekeyMT1setfont[]3261 MTgletncMT1listfontMTcurrsetnameempty3262 MTmapclistn13263 defMTval13264 MTifstreqMTvaldefMTvalrelax3265 expandafterMTgetfontMTvalnil3266 MTexptwongaddtomacro3267 csname MT1listfontMTcurrsetnameexpandafterendcsname3268 MTval3269 3270 expandaftergaddtomacroexpandafterMTfontsets3271 csname MT1listfontMTcurrsetnameendcsname3272 langdebugrangMTdinfonl1-- font nameuseMT1listfontMTcurrsetname3273 3274

MTgetfont Translate any asterisks3275 defMTgetfont123456nil3276 MTgetfont1234503277 ifxMTvalrelaxdefMTval0fi3278 expandaftergaddtomacroexpandaftertempbexpandafterMTval3279 letMTvaltempb3280

MTgetfont Helper macro also used by MTgetfontandsize3281 defMTgetfont1234563282 lettempbempty3283 defMTtemp123453284 MTgetaxisencoding13285 MTgetaxisfamily 23286 MTgetaxisseries 33287 MTgetaxisshape 43288 ifnum6gtzedeftempbtempbfi3289 MTifempty53290 MTwarnaxisemptysizestringnormalsize3291 defMTval3292 3293 defMTval53294 3295 MTgetsize3296

MTgetaxis

3297 defMTgetaxis123298 defMTval23299 MTgethighlevel13300 MTifemptyMTval3301 MTwarnaxisempty1csname 1defaultendcsname3302 expandafterdefexpandafterMTvalexpandaftercsname 1defaultendcsname3303 relax3304 expandaftergaddtomacroexpandaftertempbexpandafterMTval3305

MTwarnaxisempty

3306 defMTwarnaxisempty123307 MTwarning1 axis is empty in font specificationMessageBreak3308 `MTtemprsquo Using `2rsquo instead3309

We can finally assemble all pieces to define DeclareMicrotypeSetrsquos keys They are

IMPLEMENTATION Configuration 110

also used for DisableLigatures3310 MTexponenMTmapclistnMTfeaturesnl3311 MTdefinesetkeyencoding13312 MTdefinesetkeyfamily 13313 MTdefinesetkeyseries 13314 MTdefinesetkeyshape 13315 MTdefinesetkeysize 13316 MTdefinesetkeyfont 13317

UseMicrotypeSet To use a particular set we simply redefine MTlangfeaturerangsetname If the optionalargument is empty set names for all features will be redefined

3318 defUseMicrotypeSet3319 MTbegincatcodes3320 MTUseMicrotypeSet3321

MTUseMicrotypeSet

3322 newcommandMTUseMicrotypeSet[2][]3323 MTifempty13324 MTmapclistcMTfeaturesMTuseset123325 3326 MTmapclistn13327 MTifempty1relax3328 MTisfeature1activation of set `2rsquo3329 MTexponenMTuseset3330 csname MTrbba1endcsname23331 3332 3333 3334 3335 MTendcatcodes3336

MTprsetname

MTexsetname

MTtrsetname

MTspsetname

MTknsetname

MTuseset

Only use sets that have been declared3337 defMTuseset123338 MTifdefinednTFMT1set23339 MTxdefnMT1setname23340 3341 MTifdefinednTFMT1setnamerelax3342 MTxdefnMT1setnamenameuseMTdefault1set3343 3344 MTerror3345 The nameuseMTabbr1 set `2rsquo is undeclaredMessageBreak3346 Using set `nameuseMT1setnamersquo instead3347 3348

DeclareMicrotypeSetDefault This command can be used in the main configuration file to declare the defaultfont set in case no set is specified in the package options

3349 defDeclareMicrotypeSetDefault3350 MTbegincatcodes3351 MTDeclareMicrotypeSetDefault3352

MTDeclareMicrotypeSetDefault

3353 newcommandMTDeclareMicrotypeSetDefault[2][]3354 MTifempty13355 MTmapclistcMTfeaturesMTsetdefaultset123356 3357 MTmapclistn13358 MTifempty1relax3359 MTisfeature1declaration of default set `2rsquo3360 MTexponenMTsetdefaultset

IMPLEMENTATION Configuration 111

3361 csname MTrbba1endcsname23362 3363 3364 3365 3366 MTendcatcodes3367

MTdefaultprset

MTdefaultexset

MTdefaulttrset

MTdefaultspset

MTdefaultknset

MTsetdefaultset

3368 defMTsetdefaultset123369 MTifdefinednTFMT1set23370 langdebugrangMTdinfo1declaring default nameuseMTabbr1 set `2rsquo3371 MTxdefnMTdefault1set23372 3373 MTerror3374 The nameuseMTabbr1 set `2rsquo is not declaredMessageBreak3375 Cannot make it the default set Using setMessageBreak `allrsquo instead3376 MTxdefnMTdefault1setall3377 3378

1432 Variants and aliases

DeclareMicrotypeVariants

MTvariants

Specify suffixes for variants (see fontnamevariantsmap) The starred versionappends to the list

3379 letMTvariantsempty3380 defDeclareMicrotypeVariants3381 MTbegincatcodes3382 ifstar3383 MTDeclareVariants3384 letMTvariantsemptyMTDeclareVariants3385

MTDeclareVariants

3386 defMTDeclareVariants13387 MTmapclistn13388 deftempa13389 onelevelsanitizetempa3390 xdefMTvariantsMTvariantstempa3391 3392 MTendcatcodes3393

DeclareMicrotypeAlias This can be used to set an alias name for a font so that the file and the settings forthe aliased font will be loaded

3394 defDeclareMicrotypeAlias3395 MTbegincatcodes3396 MTDeclareMicrotypeAlias3397

MTDeclareMicrotypeAlias

3398 newcommandMTDeclareMicrotypeAlias[2]3399 deftempb23400 onelevelsanitizetempb3401 MTifdefinednTMT1alias3402 MTwarningAlias font family `tempbrsquo will override3403 alias `nameuseMT1aliasrsquoMessageBreak3404 for font family `1rsquo3405 MTxdefnMT1aliastempb

If we encounter this command while a font is being set up we also set the aliasfor the current font so that if DeclareMicrotypeAlias has been issued inside a

IMPLEMENTATION Configuration 112

configuration file the configuration file for the alias font will be loaded too3406 MTifdefinedcTMTfamily3407 langdebugrangMTdinfo1Activating alias font `tempbrsquo for `MTfamilyrsquo3408 MTgletMTfamilyaliastempb3409 3410 MTendcatcodes3411

LoadMicrotypeFile May be used to load a configuration file manually3412 defLoadMicrotypeFile13413 edeftempazapspace1 empty3414 onelevelsanitizetempa3415 MTexponenMTinclisttempaMTfilelist3416 ifMTinlist3417 MTvinfo Configuration file mt-tempacfg already loaded3418 else3419 MTxaddMTfilelisttempa3420 MTbegincatcodes3421 InputIfFileExistsmt-tempacfg3422 edefMTcurrfilemt-tempacfg3423 MTvinfo Loading configuration file MTcurrfile3424 3425 MTwarningConfiguration file mt-tempacfgMessageBreak3426 does not exist3427 3428 MTendcatcodes3429 fi3430 3431 langpackagerang3432 langpackage|letterspacerang

1433 Disabling ligatures

DisableLigatures

MTDisableLigatures

MTnlsetname

MTnlligatures

This is really simple now we can re-use the set definitions of DeclareMicrotypeSetthere can only be one set which wersquoll call lsquono ligaturesrsquo

The optional argument may be used to disable selected ligatures only3433 langpdftex-def|luatex-defrang3434 langpdftex-defrangMTrequirespdftex53435 defDisableLigatures3436 MTbegincatcodes3437 MTDisableLigatures3438 3439 newcommandMTDisableLigatures[2][]3440 MTifempty1relaxgdefMTnlligatures13441 xdefMTactivefeaturesMTactivefeaturesnl3442 globalMTnoligaturestrue3443 MTdeclaresetsnlno ligatures23444 gdefMTnlsetnameno ligatures3445 MTendcatcodes3446 3447 langpdftex-defrang3448 langpdftex-def|luatex-defrang

If pdfTEX is too old we throw an error3449 langpdftex-def|xetex-defrang3450 renewcommandDisableLigatures[2][]3451 MTerrorDisabling ligatures of a font is only possibleMessageBreak3452 with pdftex version 130 or newerMessageBreak3453 Ignoring stringDisableLigatures3454 langpdftex-defrang Upgrade3455 langxetex-defrang Use3456 pdftex3457

IMPLEMENTATION Configuration 113

3458 langpdftex-defrang3459 langpdftex-def|xetex-defrang

1434 Interaction with babel

DeclareMicrotypeBabelHook Declare the context that should be loaded when a babel language is selected Thecommand will not check whether a previous declaration will be overwritten

3460 langpackagerang3461 defDeclareMicrotypeBabelHook123462 MTmapclistn13463 KVspdeftempa13464 MTgdefnMTbabeltempa23465 3466 3467 langpackagerang

1435 Fine tuning

The commands SetExpansion and SetProtrusion provide an interface for settingthe character protrusion resp expansion factors for a set of fonts

SetProtrusion This macro accepts three arguments [options] set of font attributes and list ofcharacter protrusion factors

A new macro called MTprclangnamerang will be defined to be lang3rang (ie the list ofcharacters not expanded)

3468 langpdftex-def|xetex-def|luatex-defrang3469 defSetProtrusion3470 MTbegincatcodes3471 MTSetProtrusion3472

MTSetProtrusion

MTprcname

MTextracontext

MTpermutelist

We want the catcodes to be correct even if this is called in the preamble3473 newcommandMTSetProtrusion[3][]3474 letMTextracontextempty

Parse the optional first argument We first have to know the name before we candeal with the extra options

3475 MTsetnamedkeysMTprc13476 langdebugrangMTdinfo1creating protrusion list `MTprcnamersquo3477 defMTpermutelistprc3478 setkeysMTcfg2

We have parsed the second argument and can now define macros for all permuta-tions of the font attributes to point to MTprclangnamerang

3479 MTpermute

which we can now define to be lang3rang Here as elsewhere we have to make thedefinitions global since they will occur inside a group

3480 MTgdefnMTprcMTprcname33481 MTendcatcodes3482 3483 langpdftex-def|xetex-def|luatex-defrang

SetExpansion SetExpansion only differs in that it allows some extra options (stretch shrinkstep auto)

3484 langpdftex-def|luatex-defrang3485 defSetExpansion3486 MTbegincatcodes3487 MTSetExpansion3488

IMPLEMENTATION Configuration 114

MTSetExpansion

MTexcname

MTextracontext

MTpermutelist

3489 newcommandMTSetExpansion[3][]3490 letMTextracontextempty3491 MTsetnamedkeysMTexc13492 MTifdefinednTMTexcMTexcname factor3493 ifnumcsname MTexcMTexcname factorendcsname gt m3494 MTwarningnlExpansion factor numbernameuseMTexcMTexcname factor3495 too large in listMessageBreak `MTexcnamersquo Setting it to the3496 maximum of 10003497 MTgletncMTexcMTexcname factorm3498 fi3499 3500 langdebugrangMTdinfo1creating expansion list `MTexcnamersquo3501 defMTpermutelistexc3502 setkeysMTcfg23503 MTpermute3504 MTgdefnMTexcMTexcname33505 MTendcatcodes3506

SetTracking

3507 defSetTracking3508 MTbegincatcodes3509 MTSetTracking3510

MTSetTracking Third argument may be empty3511 newcommandMTSetTracking[3][]3512 letMTextracontextempty3513 MTsetnamedkeysMTtrc13514 langdebugrangMTdinfo1creating tracking list `MTtrcnamersquo3515 defMTpermutelisttrc3516 setkeysMTcfg23517 MTpermute3518 KVspdeftempa33519 MTifemptytemparelax3520 MTifinttempa3521 MTxdefnMTtrcMTtrcnametempa3522 MTwarningValue `temparsquo is not a number inMessageBreak3523 tracking set `MTcurrsetnamersquo3524 MTendcatcodes3525 3526 langpdftex-def|luatex-defrang

SetExtraSpacing

3527 langpdftex-defrang3528 defSetExtraSpacing3529 MTbegincatcodes3530 MTSetExtraSpacing3531

MTSetExtraSpacing

MTspcname

MTextracontext

MTpermutelist

3532 newcommandMTSetExtraSpacing[3][]3533 letMTextracontextempty3534 MTsetnamedkeysMTspc13535 langdebugrangMTdinfo1creating spacing list `MTspcnamersquo3536 defMTpermutelistspc3537 setkeysMTcfg23538 MTpermute3539 MTgdefnMTspcMTspcname33540 MTendcatcodes3541

SetExtraKerning

IMPLEMENTATION Configuration 115

3542 defSetExtraKerning3543 MTbegincatcodes3544 MTSetExtraKerning3545

MTSetExtraKerning

MTkncname

MTextracontext

MTpermutelist

3546 newcommandMTSetExtraKerning[3][]3547 letMTextracontextempty3548 MTsetnamedkeysMTknc13549 langdebugrangMTdinfo1creating kerning list `MTkncnamersquo3550 defMTpermutelistknc3551 setkeysMTcfg23552 MTpermute3553 MTgdefnMTkncMTkncname33554 MTendcatcodes3555 3556 langpdftex-defrang

MTsetnamedkeys

MToptions

We first set the name (if specified) then remove it from the list and set theremaining keys

3557 langpackagerang3558 defMTsetnamedkeys123559 defx1name=23nil3560 setkeys1name=23561 gdefMToptions133562 MTremfromclistname=MToptions3563 3564 x2name=nil3565 expandtwoargssetkeys1MToptions3566

MTdefinecodekey Define the keys for the configuration lists (which are setting the codes in pdfTEXspeak)

3567 defMTdefinecodekey123568 definekeyMT21[]3569 tempcnta=ne3570 MTmapclistn13571 KVspdefMTval1

Here too we allow for something like lsquobfrsquo It will be expanded immediately3572 MTgethighlevel13573 MTedefnMTtemp1thetempcntaMTval3574 advancetempcnta ne3575 3576 3577

MTdefinecodekeyfamily Remove fontspecrsquos internal feature counter3578 defMTdefinecodekeyfamily13579 definekeyMT1family[]3580 tempcnta=ne3581 MTmapclistn13582 KVspdefMTval13583 MTgethighlevelfamily3584 ifMTfontspec3585 edefxedefnoexpandMTvalnoexpandMTscrubfeatureMTval()relaxx3586 fi3587 MTedefnMTtempfamilythetempcntaMTval3588 advancetempcnta ne3589 3590 3591

MTdefinecodekeysize MTtempsize must be in a csname so that it is at least relax not undefined

IMPLEMENTATION Configuration 116

3592 defMTdefinecodekeysize13593 definekeyMT1size[]3594 MTmapclistn13595 KVspdefMTval13596 expandafterMTgetrangeMTval--nil3597 ifxMTvalrelax else3598 MTexpcsMTxaddMTtempsize3599 MTlowerMTupperMTcurrsetname3600 fi3601 3602 3603

MTdefinecodekeyfont

3604 defMTdefinecodekeyfont13605 definekeyMT1font[]3606 MTmapclistn13607 KVspdefMTval13608 MTifstreqMTvaldefMTvalrelax3609 expandafterMTgetfontandsizeMTvalnil3610 ifMTfontspec3611 edeftempbexpandafterMTscrubfeaturestempb()relax3612 fi3613 MTxdefnMTMTpermutelist tempbMTextracontext3614 csname MTMTpermutelist nameendcsname3615 langdebugrangMTdinfonl1initialising use list for font tempb=MTval3616 langdebugrang ifxMTextracontextemptyelseMessageBreak3617 langdebugrang (context MTextracontext)fi3618 MTexpcsMTxaddb3619 MTMTpermutelist tempbMTextracontext sizes3620 MTvalmneMTcurrsetname3621 3622 3623

MTgetfontandsize Translate any asterisks and split off the size3624 defMTgetfontandsize123456nil3625 MTgetfont1234513626

3627 MTdefinecodekeyencodingcfg3628 MTdefinecodekeyfamily cfg3629 MTdefinecodekeyseries cfg3630 MTdefinecodekeyshape cfg3631 MTdefinecodekeysize cfg3632 MTdefinecodekeyfont cfg

MTdefineoptkey

3633 defMTdefineoptkey123634 definekeyMT1c2[]MTifempty1relax3635 MTxdefnMT1cMTcurrsetname 213636

MTlistnamecount The options in the optional first argument3637 newcountMTlistnamecount3638 MTmapclistcMTfeatures

Use file name and line number as the list name if the user didnrsquot bother to inventone ndash also check whether the name already exists (in case more than one unnamedlist is loaded in the same line for example AtBeginDocument)

3639 definekeyMT1cname[]3640 MTifempty13641 MTifdefinednTFMT1cMTcurrfiletheinputlineno3642 globaladvanceMTlistnamecountne3643 MTedefnMT1cnameMTcurrfiletheinputlineno

IMPLEMENTATION Configuration 117

3644 (numberMTlistnamecount)3645 3646 MTedefnMT1cnameMTcurrfiletheinputlineno3647 3648 3649 MTedefnMT1cname13650 MTifdefinednTMT1ccsname MT1cnameendcsname3651 MTwarningRedefining nameuseMTabbr1 list `nameuseMT1cnamersquo3652 3653 3654 MTletcnMTcurrsetnameMT1cname3655 3656 MTdefineoptkey1load3657 MTdefineoptkey1factor3658 MTdefineoptkey1preset3659 MTdefineoptkey1inputenc

Only one context is allowed This might change in the future3660 definekeyMT1ccontext[]MTifempty1relaxdefMTextracontext13661 3662 langpackagerang

Automatically enable font copying if we find a protrusion or expansion contextAfter the preamble check whether font copying is enabled For older pdfTEXversions disallow It also works with LuaTEX 030 or newer

3663 langpdftex-def|luatex-defrang3664 langpdftex-defrangMTrequirespdftex73665 definekeyMTexccontext[]3666 MTifempty1relax3667 MTgletMTcopyfontMTcopyfont3668 defMTextracontext13669 3670 3671 MTaddtosetup3672 definekeyMTexccontext[]3673 ifxMTcopyfontMTcopyfont3674 MTifempty1relaxdefMTextracontext13675 else3676 MTerrorMTMTspace isnrsquot set up for expansion contextsMessageBreak3677 Ignoring `contextrsquo keyonline3678 Either move the settings inside the preambleMessageBreak3679 or load the package with the `copyfontsrsquo option3680 fi3681 3682

Protrusion contexts might also work without copying the font so we donrsquot issuean error but only a warning The problem is that pdfTEX only allows one set ofprotrusion factors for a given font within one paragraph (those that are in effect atthe end of the paragraph will be in effect for the whole paragraph) When differentfonts are loaded ndash like in the example with the footnote markers ndash we donrsquot needto copy the fonts

3683 definekeyMTprccontext[]3684 MTifempty1relax3685 MTgletMTcopyfontMTcopyfont3686 defMTextracontext13687 3688 3689 MTaddtosetup3690 definekeyMTprccontext[]3691 MTifempty1relaxdefMTextracontext13692 ifxMTcopyfontMTcopyfontelse3693 MTwarningnlIf protrusion contexts donrsquot work as expected

IMPLEMENTATION Configuration 118

3694 MessageBreak load the package with the `copyfontsrsquo option3695 fi3696 3697 3698 langpdftex-def|luatex-defrang3699 langpdftex-defrang3700 3701 definekeyMTexccontext[]3702 MTerrorExpansion contexts only work with pdftex 1404MessageBreak3703 or later Ignoring `contextrsquo keyonline3704 Upgrade pdftex3705 3706 langpdftex-defrang3707 langpdftex-def|xetex-defrang3708 definekeyMTprccontext[]3709 MTerrorProtrusion contexts only work with pdftex3710 langpdftex-defrang 1404MessageBreak or later3711 langxetex-defrang MessageBreak or luatex3712 Ignoring `contextrsquo keyonline3713 langpdftex-defrang Upgrade pdftex3714 langxetex-defrang Use pdftex or luatex3715 3716 langpdftex-def|xetex-defrang3717 langpdftex-defrang

MTwarnnodim

3718 langpackagerang3719 defMTwarnnodim13720 MTwarning`temparsquo is not a dimensionMessageBreak3721 Ignoring it and setting values relative toMessageBreak 13722 3723 langpackagerang

Protrusion codes may be relative to character width or to any dimension3724 langpdftex-def|xetex-def|luatex-defrang3725 definekeyMTprcunit[character]3726 MTgletncMTprcMTcurrsetname unitempty3727 deftempa13728 MTifstreqtempacharacterrelax

Test whether itrsquos a dimension but do not translate it into its final form here sinceit may be font-specific

3729 MTifdimentempa3730 MTgletncMTprcMTcurrsetname unittempa3731 MTwarnnodimcharacter widths3732 3733 3734 langpdftex-def|xetex-def|luatex-defrang

Tracking may only be relative to a dimension3735 langpdftex-def|luatex-defrang3736 definekeyMTtrcunit[1em]3737 MTgletncMTtrcMTcurrsetname unitempty3738 deftempa13739 MTifdimentempa3740 MTgletncMTtrcMTcurrsetname unittempa3741 MTwarnnodim1em3742 MTgdefnMTtrcMTcurrsetname unit1em3743 3744 langpdftex-def|luatex-defrang

Spacing and kerning codes may additionally be relative to space dimensions3745 langpdftex-defrang3746 MTmapclistnspkn3747 definekeyMT1cunit[space]

IMPLEMENTATION Configuration 119

3748 MTgletncMT1cMTcurrsetname unitempty3749 deftempa13750 MTifstreqtempacharacterrelax3751 MTgletncMT1cMTcurrsetname unitmne3752 MTifstreqtempaspacerelax3753 MTifdimentempa3754 MTgletncMT1cMTcurrsetname unittempa3755 MTwarnnodimwidth of space3756 3757 3758 3759 3760 langpdftex-defrang

The first argument to SetExpansion accepts some more options3761 langpdftex-def|luatex-defrang3762 MTmapclistnstretchshrinkstep3763 definekeyMTexc1[]3764 MTifempty1relax3765 MTifint1

A space terminates the number3766 MTgdefnMTexcMTcurrsetname 11 3767 3768 MTwarning3769 Value `1rsquo for option `1rsquo is not a numberMessageBreak3770 Ignoring it3771 3772 3773 3774 3775 definekeyMTexcauto[true]3776 deftempa13777 csname iftempaendcsname

Donrsquot use autoexpand for pdfTEX version older than 1203778 langpdftex-defrang MTrequirespdftex43779 langluatex-defrang MTrequiresluatex3relax3780 MTgdefnMTexcMTcurrsetname autoautoexpand3781 langpdftex-defrang MTwarningpdftex too old for automatic font expansion3782 else3783 langpdftex-defrang MTrequirespdftex43784 langluatex-defrang3785 MTrequiresluatex33786 MTwarningNon-automatic font expansion doesnrsquot work withMessageBreak3787 luatex3788 langluatex-defrang3789 MTgletncMTexcMTcurrsetname autoempty3790 langpdftex-defrang relax3791 fi3792

Tracking Interword spacing and outer kerning The variant with space just in caseSetTracking is called inside an argument (eg to IfFileExists)

3793 MTdefineoptkeytrspacing3794 MTdefineoptkeytrouterspacing3795 MTdefineoptkeytrouterkerning

Which ligatures should be disabled3796 definekeyMTtrcnoligatures[]3797 MTxdefnMTtrcMTcurrsetname noligatures13798 definekeyMTtrcouter spacing[]setkeysMTtrcouterspacing=13799 definekeyMTtrcouter kerning[]setkeysMTtrcouterkerning=13800 definekeyMTtrcno ligatures[]setkeysMTtrcnoligatures=13801 langpdftex-def|luatex-defrang

IMPLEMENTATION Configuration 120

1436 Character inheritance

DeclareCharacterInheritance This macro may be used in the configuration files to declare characters that shouldinherit protrusion resp expansion values from other characters Thus there is noneed to define all accented characters (eg lsquoa rsquoa ^a ~a a ra kaua) which will make the configuration files look much nicer and easier tomaintain If a single character of an inheritance list should have a different valueone can simply override it

MTinhfeat The optional argument may be used to restrict the list to some featuresMTextrainputenc and to specify an input encoding

3802 langpackagerang3803 renewcommandDeclareCharacterInheritance[1][]3804 letMTextracontextempty3805 letMTextrainputencundefined3806 letMTinhfeatempty3807 setkeysMTinh13808 MTbegincatcodes3809 MTsetinhlist3810

MTsetinhlist No need to create an inheritance list for tracking3811 defMTsetinhlist123812 MTifemptyMTinhfeat3813 MTmapclistcMTfeatures3814 MTifstreq1trrelaxMTdeclarecharinh1123815 3816 3817 MTmapclistcMTinhfeat3818 KVspdeftempa13819 MTifemptytemparelax3820 edeftempacsname MTrbbatempaendcsname3821 MTifstreqtempatrrelax3822 MTexponenMTdeclarecharinhtempa123823 3824 3825 MTendcatcodes3826

The keys for the optional argument3827 MTmapclistcMTfeatureslong3828 definekeyMTinh1[]edefMTinhfeatMTinhfeat13829 definekeyMTinhinputencdefMTextrainputenc1

MTdeclarecharinh The lists cannot be given a name by the user3830 defMTdeclarecharinh1233831 MTedefnMT1inhname3832 MTcurrfiletheinputlineno (nameuseMTabbr1)3833 MTletcnMTcurrsetnameMT1inhname3834 MTifdefinedcTMTextrainputenc3835 MTxdefnMT1inhMTcurrsetname inputencMTextrainputenc3836 langdebugrangMTdinfo1creating inheritance list `nameuseMT1inhnamersquo3837 MTgdefnMT1inhcsname MT1inhnameendcsname33838 defMTpermutelist1inh3839 setkeysMTinh23840 MTpermute3841

Parse the second argument DeclareCharacterInheritance may also be set upfor various combinations We can reuse the key setup from the configuration lists(Set)

3842 MTdefinecodekeyencodinginh

IMPLEMENTATION Configuration 121

3843 MTdefinecodekeyfamily inh3844 MTdefinecodekeyseries inh3845 MTdefinecodekeyshape inh3846 MTdefinecodekeysize inh3847 MTdefinecodekeyfont inh

MTinhdo Now parse the third argument the inheritance lists We define the commandsMTinhlangnameranglangslotrang containing the inheriting characters They will also betranslated to slot numbers here to save some time The following will be ex-ecuted only once namely the first time this inheritance list is encountered (inMTsetlangfeaturerangcodes)

3848 defMTinhdo13849 ifxrelax1empty else3850 MTinhsplit 1==relax3851 expandafterMTinhdo3852 fi3853

MTinhsplit Only gather the inheriting characters here Their codes will actually be set inMTsetlangfeaturerangcodes

3854 langpackagerang3855 langpdftex-def|xetex-def|luatex-defrang3856 defMTinhsplit1=2=3relax3857 deftempa13858 ifxtempaempty else3859 MTgetslot3860 langpdftex-def|luatex-defrang ifnumMTchar gt mne3861 langxetex-defrang ifxMTcharemptyelse3862 letMTvalMTchar3863 MTmapclistn23864 deftempa13865 ifxtempaempty else3866 MTgetslot3867 langpdftex-def|luatex-defrang ifnumMTchar gt mne3868 langxetex-defrang ifxMTcharemptyelse3869 MTexpcsMTxaddMTinhMTlistname MTval MTchar3870 fi3871 fi3872 3873 langdebugrangMTdinfonl2children of 1 (MTval)3874 langdebugrang nameuseMTinhMTlistname MTval 3875 fi3876 fi3877 3878 langpdftex-def|xetex-def|luatex-defrang

1437 Permutation

MTpermute

MTpermute

MTpermute

MTpermute

MTpermute

Calling MTpermute will define commands for all permutations of the specified fontattributes of the form MTlanglist typeranglangencodingranglangfamilyranglangseriesranglangshaperanglang|rang tobe the expansion of MTlanglist typerangname ie the name of the currently defined listSize ranges are held in a separate macro called MTlanglist typeranglangfont axesrangsizeswhich in turn contains the respective langlist namerangs attached to the ranges So that

SetProtrusion encoding = U family = euroitceuroitcs E = 10050 SetProtrusion encoding = U family = euroitceuroitcs shape = it

IMPLEMENTATION Configuration 122

E = 100

would yield the following assignments3879 langpackagerang3880 MTgdefnMTprcUeuroitceuroitc3881 MTgdefnMTprcUeuroitcseuroitc3882 MTgdefnMTprcUeuroitciteuroitci3883 MTgdefnMTprcUeuroitcsiteuroitci3884 MTgdefnMTprceuroitcE=100503885 MTgdefnMTprceuroitciE=1003886 defMTpermute3887 letMTcntencodingne3888 MTpermute

Undefine commands for the next round3889 MTmaptlistnencodingfamilyseriesshapeMTpermutereset3890 MTgletMTtempsizeundefined3891 3892 defMTpermute3893 letMTcntfamilyne3894 MTpermute3895 MTincrementMTcntencoding3896 MTifdefinednTMTtempencodingMTcntencoding3897 MTpermute3898 3899 defMTpermute3900 letMTcntseriesne3901 MTpermute3902 MTincrementMTcntfamily3903 MTifdefinednTMTtempfamilyMTcntfamily3904 MTpermute3905 3906 defMTpermute3907 letMTcntshapene3908 MTpermute3909 MTincrementMTcntseries3910 MTifdefinednTMTtempseriesMTcntseries3911 MTpermute3912 3913 defMTpermute3914 MTpermute3915 MTincrementMTcntshape3916 MTifdefinednTMTtempshapeMTcntshape3917 MTpermute3918

MTpermute In order to save some memory we can ignore unused encodings (inside the docu-ment)

3919 defMTpermute3920 MTpermutedefineencoding3921 ifMTdocument3922 ifxMTtempencodingempty else3923 MTifdefinednTFTMTtempencodingrelax3924 expandafterexpandafterexpandaftergobble3925 fi3926 fi3927 MTpermute3928

MTpermute

3929 defMTpermute3930 MTpermutedefinefamily3931 MTpermutedefineseries3932 MTpermutedefineshape3933 edeftempaMTtempencoding

IMPLEMENTATION Configuration 123

3934 MTtempfamily3935 MTtempseries3936 MTtempshape3937 MTifdefinedcTMTtempsize

Some sanity checks an encoding must be specified (unless nothing else is)3938 MTifstreqtemparelax3939 ifxMTtempencodingempty3940 MTwarning3941 You have to specify an encoding forMessageBreak3942 nameuseMTabbrMTpermutelist list3943 `nameuseMTMTpermutelist namersquoMessageBreak3944 Ignoring it3945 else3946 MTifdefinedcTFMTtempsize

Add the list of ranges to the beginning of the current combination after checkingfor conflicts

3947 MTifdefinednTMTMTpermutelist tempaMTextracontext sizes3948 MTmaptlistcMTtempsizeMTcheckrlist3949 3950 MTexpcsMTxaddb3951 MTMTpermutelist tempaMTextracontext sizes3952 MTtempsize3953 langdebugrangMTdinfonl1initialising use list for font tempaMessageBreak3954 langdebugrang sizes csname MTMTpermutelist tempaMTextracontext3955 langdebugrang sizesendcsname3956

Only one list can apply to a given combination But we donrsquot warn if the overriddenlist is to be loaded by the current one

3957 MTifdefinednTMTMTpermutelist tempaMTextracontext3958 MTifstreqcsname MTMTpermutelist tempaMTextracontextendcsname3959 csname MTMTpermutelist csname MTMTpermutelist nameendcsname loadendcsname3960 relax3961 MTwarningnameuseMTabbrMTpermutelist list3962 `nameuseMTMTpermutelist namersquo willMessageBreak override3963 list `nameuseMTMTpermutelist tempaMTextracontextrsquo3964 for MessageBreak font `temparsquo3965 3966 3967 langdebugrangMTdinfonl1initialising use list for font tempa3968 langdebugrang ifxMTextracontextemptyelseMessageBreak3969 langdebugrang (context MTextracontext)fi3970 3971 MTxdefnMTMTpermutelist tempaMTextracontext3972 csname MTMTpermutelist nameendcsname3973 fi3974 3975

MTpermutedefine Define the commands3976 defMTpermutedefine13977 tempcnta=csname MTcnt1endcsnamerelax3978 MTifdefinednTFMTtemp1thetempcnta3979 MTedefnMTtemp1csname MTtemp1thetempcntaendcsname3980 MTletncMTtemp1empty3981

MTpermutereset Reset the commands3982 defMTpermutereset13983 tempcnta=ne3984 MTloop3985 MTletncMTtemp1thetempcntaundefined

IMPLEMENTATION Configuration 124

3986 advancetempcntane3987 MTifdefinednTFMTtemp1thetempcnta3988 iftrue3989 iffalse3990 MTrepeat3991

MTcheckrlist For every new range item in MTtempsize check whether it overlaps with rangesin the existing list

3992 defMTcheckrlist1expandafterMTcheckrlist 1

MTcheckrlist Define the current new range and 3993 defMTcheckrlist1233994 deftempb13995 deftempc23996 MTiffalse3997 MTexpcsMTmaptlistc3998 MTMTpermutelist tempaMTextracontext sizes3999 MTcheckrange4000

MTcheckrange recurse through the list of existing ranges4001 defMTcheckrange1expandafterMTcheckrange 1

MTcheckrange tempb and tempc are lower resp upper bound of the new range lang1rang and lang2rangthose of the existing range lang3rang is the list name

4002 defMTcheckrange1234003 MTifdim2=mne4004 MTifdimtempc=mne

bull Both items are simple sizes

4005 MTifdimtempb=1MTiftruerelax4006

bull Item in list is a simple size new item is a range

4007 MTifdimtempbgt1relax4008 MTifdimtempcgt14009 MTiftrue4010 edeftempb1 (with range tempbspace to tempc)4011 relax4012 4013 4014 4015 MTifdimtempc=mne

bull Item in list is a range new item is a simple size

4016 MTifdimtempblt24017 MTifdimtempblt1relaxMTiftrue4018 relax4019

bull Both items are ranges

4020 MTifdimtempblt24021 MTifdimtempcgt14022 MTiftrue4023 edeftempb1 to 2 (with range tempbspace to tempc)4024 relax4025 relax4026 4027 4028 ifMTif

IMPLEMENTATION Package options 125

4029 MTifstreq34030 csname MTMTpermutelist csname MTMTpermutelist nameendcsname loadendcsname4031 relax4032 MTwarningnameuseMTabbrMTpermutelist list4033 `nameuseMTMTpermutelist namersquo will overrideMessageBreak4034 list `3rsquo for font tempaMessageBreak size tempb4035

If wersquove already found a conflict with this item we can skip the rest of the list

4036 expandafterMTtlistbreak4037 fi4038

144 Package options1441 Declaring the options

ifMToptexpansion

ifMToptauto

ifMToptDVI

Keep track of whether the user explicitly set these options4039 newififMToptexpansion4040 newififMToptauto4041 newififMToptDVI

MToptwarnadmissible Some warnings4042 defMToptwarnadmissible124043 MTwarningnl`1rsquo is not an admissible value for optionMessageBreak4044 `2rsquo Assuming `falsersquo4045

MToptwarnnan

4046 langpackagerang4047 langpackage|letterspacerang4048 langplainrangMTrequireslatex14049 defMToptwarnnan124050 MTwarningnlValue `1rsquo for option `2rsquo is not aMessageBreak number4051 Using default value of numbernameuseMT2default4052 4053 langplainrangrelax4054 langpackage|letterspacerang4055 langpackagerang

MToptdefset

4056 defMToptdefset14057 MTifdefinednTFMTtempb setMTval4058 MTxdefnMTtempb setnameMTval4059 4060 MTxdefnMTtempb setnamenameuseMTdefaulttempb set4061 MTwarningnlThe 1 set `MTvalrsquo is undeclaredMessageBreak4062 Using set `nameuseMTtempb setnamersquo instead4063 4064

expansion and protrusion may be true false compatibility nocompatibilityandor a langset namerang

4065 MTmapclistnprotrusionexpansion4066 definekeyMT1[true]4067 csname MTopt1trueendcsname4068 MTmapclistn14069 KVspdefMTval14070 MTifemptyMTvalrelax4071 csname MT1trueendcsname4072 edeftempbcsname MTrbba1endcsname4073 MTifstreqMTvaltruerelax

IMPLEMENTATION Package options 126

4074 4075 MTifstreqMTvalfalse4076 csname MT1falseendcsname4077 4078 MTifstreqMTvalcompatibility4079 MTletncMTtempb levelne4080 4081 MTifstreqMTvalnocompatibility4082 MTletncMTtempb leveltw4083

If everything failed it should be a set name4084 MToptdefset14085 4086 4087 4088 4089 4090 4091 4092

activate is a shortcut for protrusion and expansion4093 definekeyMTactivate[true]4094 setkeysMTprotrusion=14095 setkeysMTexpansion=14096

spacing kerning and tracking do not have a compatibility level4097 MTmapclistnspacingkerningtracking4098 definekeyMT1[true]4099 MTmapclistn14100 KVspdefMTval14101 MTifemptyMTvalrelax4102 csname MT1trueendcsname4103 MTifstreqMTvaltruerelax4104 4105 MTifstreqMTvalfalse4106 csname MT1falseendcsname4107 4108 edeftempbcsname MTrbba1endcsname4109 MToptdefset14110 4111 4112 4113 4114 4115

MTdefboolopt The truefalse options draft final (may be inherited from the class options)auto selected babel DVIoutput defersetup copyfonts

4116 defMTdefboolopt124117 definekeyMT1[true]4118 deftempa14119 MTifstreqtempatruerelax4120 MTifstreqtempafalserelax4121 MToptwarnadmissible114122 deftempafalse4123 4124 4125 24126 4127

Boolean options that only set the switch

IMPLEMENTATION Package options 127

4128 MTmapclistndraftselectedbabel4129 MTdefboolopt1csname MT1tempaendcsname4130 MTdefbooloptautocsname MTautotempaendcsname MToptautotrue

The DVIoutput option will change pdfoutput immediately to minimise the risk ofconfusing other packages

4131 langpackagerang4132 langpdftex-def|luatex-def|xetex-defrang4133 langluatex-defrangMTrequiresluatex4letpdfoutputoutputmoderelax4134 MTdefbooloptDVIoutput4135 csname iftempaendcsname4136 langpdftex-def|luatex-defrang4137 ifnumpdfoutputgtz MToptDVItrue fi4138 pdfoutputz4139 else4140 ifnumpdfoutputltne MToptDVItrue fi4141 pdfoutputne4142 langpdftex-def|luatex-defrang4143 langxetex-defrang MTwarningnlIgnoring `DVIoutputrsquo option4144 fi4145 4146 langpdftex-def|luatex-def|xetex-defrang

Setting the defersetup option to false will restore the old behaviour where thesetup took place at the time when the package was loaded This is undocumentedsince I would like to learn about the cases where this is necessary

The only problem with the new deferred setup I can think of is when a boxis being constructed inside the preamble and this box contains a font that is notloaded before the box is being used

4147 langpackagerang4148 MTdefbooloptdefersetup4149 csname iftempaendcsname else4150 AtEndOfPackage4151 MTsetup4152 letMTsetupempty4153 letMTaddtosetupfirstofone4154 4155 fi4156 4157 langpackagerang

copyfonts will copy all fonts before setting them up This allows protrusion andexpansion with different parameters This options is also undocumented in the hopethat we can always find out automatically whether itrsquos required It also works withLuaTEX 030 or newer

4158 langpdftex-def|luatex-defrang4159 langpdftex-defrangMTrequirespdftex74160 MTdefbooloptcopyfonts4161 csname iftempaendcsname4162 MTgletMTcopyfontMTcopyfont4163 else4164 MTgletMTcopyfontrelax4165 fi4166 4167 langpdftex-defrang4168 langpdftex-def|luatex-defrang4169 langpdftex-def|xetex-defrang4170 MTdefbooloptcopyfonts4171 csname iftempaendcsname4172 MTerror4173 langpdftex-defrang The pdftex version you are using is too oldMessageBreak4174 langpdftex-defrang to use the `copyfontsrsquo optionUpgrade pdftex

IMPLEMENTATION Package options 128

4175 langxetex-defrang The `copyfontsrsquo option does not work with xetex4176 langxetex-defrang Use pdftex or luatex instead4177 fi4178 4179 langpdftex-defrang4180 langpdftex-def|xetex-defrang

final is the opposite to draft4181 langpackagerang4182 MTdefbooloptfinal4183 csname iftempaendcsname4184 MTdraftfalse4185 else4186 MTdrafttrue4187 fi4188

For verbose output we redefine MTvinfo4189 definekeyMTverbose[true]4190 letMTvinfoMTinfonl4191 deftempa14192 MTifstreqtempatruerelax

Take problems seriously4193 MTifstreqtempaerrors4194 letMTwarning MTwarnerr4195 letMTwarningnlMTwarnerr4196 4197 letMTvinfogobble

Cast warnings to the winds4198 MTifstreqtempasilent4199 letMTwarning MTinfo4200 letMTwarningnlMTinfonl4201 4202 MTifstreqtempafalserelaxMToptwarnadmissible1verbose4203 4204 4205 4206 4207 langpackagerang

Options with numerical keys factor stretch shrink step letterspace4208 langpackage|letterspacerang4209 langplainrangMTrequireslatex14210 MTmapclistn4211 langpackagerang stretchshrinkstep4212 letterspace4213 definekeyMT1[csname MT1defaultendcsname]4214 deftempa1

No nonsense in MTfactor et al A space terminates the number4215 MTifinttempa4216 MTedefnMT1tempa4217 MToptwarnnan114218 4219 4220 langplainrangrelax4221 langpackage|letterspacerang

factor will define the protrusion factor only4222 langpackagerang4223 definekeyMTfactor[MTfactordefault]4224 deftempa1 4225 MTifinttempa

IMPLEMENTATION Package options 129

4226 edefMTprfactortempa4227 MToptwarnnan1factor4228

Unit for protrusion codes4229 definekeyMTunit[character]4230 deftempa14231 MTifstreqtempacharacterrelax4232 MTifdimentempa4233 letMTprunittempa4234 MTwarningnl`temparsquo is not a dimensionMessageBreak4235 Ignoring it and setting values relative toMessageBreak4236 character widths4237 4238

1442 Loading the definition file

MTendinput Abort if no capable engine found4239 letMTendinputrelax

4240 ifxMTenginerelax4241 MTwarningnlYou donrsquot seem to be using pdftex luatex or xetexMessageBreak4242 `MTMTrsquo only works with these enginesMessageBreak4243 I will quit now4244 MTclearoptions4245 else

Otherwise load the engine-specific code (as strewn across this file)4246 inputmicrotype-MTengine texdef4247 fi4248 MTendinput

1443 Reading the configuration file

The package should just work if called without any options Therefore expansionwill be switched off by default if output is DVI since it isnrsquot likely that expandedfonts are available (This grows more important as modern TEX systems haveswitched to the pdfTEX engine even for DVI output so that the user might not evenbe aware of the fact that shersquos running pdfTEX)

4249 MTprotrusiontrue4250 langpackagerang4251 langpdftex-def|luatex-defrang4252 ifnumpdfoutputltne else

Also we only enable expansion by default if pdfTEX can expand the fonts automat-ically

4253 langpdftex-defrang MTrequirespdftex44254 MTexpansiontrue4255 langpdftex-defrang MTautotrue4256 langpdftex-defrang relax4257 fi4258 langluatex-defrangMTautotrue4259 langpdftex-def|luatex-defrang

The main configuration file will be loaded before processing the package optionsMTconfigfile

MTgetconfig

However the config option must of course be evaluated beforehand We also haveto define a no-op for the regular option processing later

4260 langpackagerang4261 definekeyMTconfig[]relax4262 defMTgetconfig1config=23nil

IMPLEMENTATION Package options 130

4263 MTifempty24264 defMTconfigfileMTMTcfg4265 defMTconfigfile2cfg4266 4267 expandafterexpandafterexpandafterMTgetconfig4268 csname optcurrnamecurrextendcsnameconfig=nil

Load the file4269 IfFileExistsMTconfigfile4270 MTinfonlLoading configuration file MTconfigfile4271 MTbegincatcodes4272 letMTbegincatcodesrelax4273 letMTendcatcodesrelax4274 letMTcurrfileMTconfigfile4275 inputMTconfigfile4276 endgroup4277 MTwarningnl4278 Could not find configuration file `MTconfigfilersquoMessageBreak4279 This will almost certainly cause undesired resultsMessageBreak4280 Please fix your installation4281

MTcheckactiveset We have to make sure that font sets are active If the user didnrsquot activate any weuse those sets declared by DeclareMicrotypeSetDefault (this is done at the endof the preamble)

4282 defMTcheckactiveset14283 MTifdefinednTFMT1setname4284 MTinfonlUsing nameuseMTabbr1 set `nameuseMT1setnamersquo4285 4286 MTifdefinednTFMTdefault1set4287 MTgletnnMT1setnameMTdefault1set4288 MTinfonlUsing default nameuseMTabbr1 set `nameuseMT1setnamersquo4289

If no default font set has been declared in the main configuration file we use the(empty non-existent) set lsquorsquo and issue a warning

4290 MTgdefnMT1setname4291 MTwarningnlNo nameuseMTabbr1 set chosen no default set declared4292 MessageBreak Using empty set4293 4294 4295

1444 Hook for other packages

MicrotypeHook This hook may be used by font package authors eg to declare alias fonts If itis defined it will be executed here ie after the main configuration file has beenloaded and before the package options are evaluated

This hook was needed in versions prior to 19a to overcome the situation that(1) the microtype package should be loaded after all font defaults have been setup (hence using ifpackageloaded in the font package was not viable) and(2) checking AtBeginDocument could be too late since fonts might already havebeen loaded and consequently set up in the preamble With the new deferredsetup one could live without this command however it remains here since itrsquossimpler than testing whether the package 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 packages arenrsquot overwritten Example

IMPLEMENTATION Package options 131

defMinionProMTHookDeclareMicrotypeAliasMinionPro-LFMinionProifpackageloadedmicrotype MinionProMTHook ifundefinedMicrotypeHook letMicrotypeHookMinionProMTHook gaddtomacroMicrotypeHookMinionProMTHook

MicroTypeHook with a capital T (which only existed in version 17) is providedfor compatibility reasons At some point in the future it will no longer be availablehence it should not be used

4296 MTifdefinedcTMicroTypeHookMTwarning4297 Command stringMicroTypeHookspace is deprecatedMessageBreak4298 Use stringMicrotypeHookspace insteadMicroTypeHook4299 MTifdefinedcTMicrotypeHookMicrotypeHook

1445 Changing options later

microtypesetup

MTdefineoptionX

Inside the preamble microtypesetup accepts the same options as the package (un-less defersetup=false) In the document body it accepts the options protrusionexpansion activate tracking spacing and kerning Specifying font sets is notallowed

4300 defmicrotypesetupsetkeysMT4301 MTaddtosetupdefmicrotypesetup1setkeysMTX1selectfont4302 langpackagerang4303 langpdftex-def|luatex-def|xetex-defrang4304 defMTdefineoptionX124305 definekeyMTX1[true]4306 edeftempbcsname MTrbba1endcsname4307 MTmapclistn14308 KVspdefMTval14309 MTifemptyMTvalrelax4310 tempcnta=mne4311 MTifstreqMTvaltrue

Enabling micro-typography in the middle of the document is not allowed if it hasbeen disabled in the package options since fonts might already have been loadedand hence wouldnrsquot be set up

4312 MTchecksetup14313 tempcnta=csname MTtempb levelendcsname4314 MTvinfoEnabling 14315 (level numbercsname MTtempb levelendcsname)online4316 4317 4318 MTifstreqMTvalfalse4319 tempcnta=z4320 MTvinfoDisabling 1online4321 4322 MTifstreqMTvalcompatibility4323 MTchecksetup14324 tempcnta=ne4325 MTletncMTtempb levelne4326 MTvinfoSetting 1 to level 1online4327 4328 4329 MTifstreqMTvalnocompatibility4330 MTchecksetup14331 tempcnta=tw4332 MTletncMTtempb leveltw4333 MTvinfoSetting 1 to level 2online4334 4335 MTerrorValue `MTvalrsquo for key `1rsquo not recognised

IMPLEMENTATION Package options 132

4336 Use any of `truersquo `falsersquo `compatibilityrsquo or4337 `nocompatibilityrsquo4338 4339 4340 4341 4342 ifnumtempcntagtmne4343 2tempcntarelax4344 fi4345 4346 4347 4348

MTchecksetup Test whether the feature wasnrsquot disabled in the package options4349 defMTchecksetup14350 csname ifMT1endcsname4351 expandafterfirstofone4352 else4353 MTerrorYou cannot enable 1 if it was disabledMessageBreak4354 in the package optionsLoad microtype with 1 enabled4355 expandaftergobble4356 fi4357

4358 MTdefineoptionXprotrusionMTprotrudechars4359 langpdftex-def|luatex-def|xetex-defrang4360 langpdftex-def|luatex-defrang4361 MTdefineoptionXexpansionMTadjustspacing

MTprotrudechars

MTadjustspacing 4362 langluatex-defrang4363 MTrequiresluatex44364 letpdfprotrudecharsprotrudechars4365 letpdfadjustspacingadjustspacing4366 relax4367 langluatex-defrang4368 letMTprotrudecharspdfprotrudechars4369 letMTadjustspacingpdfadjustspacing4370 langpdftex-def|luatex-defrang4371 langxetex-defrang4372 letMTprotrudecharsXeTeXprotrudechars4373 definekeyMTXexpansion[true]MTwarningIgnoring expansion setup4374 langxetex-defrang

MTdefineoptionX The same for tracking spacing and kerning which do not have a compatibilitylevel

4375 langpdftex-def|luatex-defrang4376 langpdftex-defrangMTrequirespdftex64377 langluatex-defrangMTrequiresluatex34378 defMTdefineoptionX124379 definekeyMTX1[true]4380 MTmapclistn14381 KVspdefMTval14382 MTifemptyMTvalrelax4383 tempcnta=mne4384 MTifstreqMTvaltrue4385 MTchecksetup14386 tempcnta=ne4387 MTvinfoEnabling 1online4388 4389 4390 MTifstreqMTvalfalse4391 tempcnta=z4392 MTvinfoDisabling 1online

IMPLEMENTATION Package options 133

4393 MTerrorValue `MTvalrsquo for key `1rsquo not recognised4394 Use either `truersquo or `falsersquo4395 4396 4397 ifnumtempcntagtmne4398 2relax4399 fi4400 4401 4402 4403

We cannot simply let MTtracking relax since this may select the already letter-spaced font instance

4404 MTdefineoptionXtrackingifnumtempcnta=z letMTtrackingMTsettrzero4405 else letMTtrackingMTtracking fi4406 langpdftex-defrang MTdefineoptionXspacingpdfadjustinterwordgluetempcnta4407 langpdftex-defrang MTdefineoptionXkerningpdfprependkerntempcnta4408 langpdftex-defrang pdfappendkerntempcnta4409 4410 langpdftex-def|luatex-defrang4411 langpdftex-def|luatex-def|xetex-defrang

Disable for older pdfTEX versions and for XETEX and LuaTEX4412 definekeyMTXtracking[true]MTwarningIgnoring tracking setup4413 langluatex-defrang4414 definekeyMTXkerning[true]MTwarningIgnoring kerning setup4415 definekeyMTXspacing[true]MTwarningIgnoring spacing setup4416 langpdftex-defrang4417 definekeyMTXactivate[true]4418 setkeysMTXprotrusion=14419 langpdftex-def|luatex-defrang setkeysMTXexpansion=14420 4421 langpdftex-def|luatex-def|xetex-defrang

MTsavedsetupfont Disable everything ndash may be used as a temporary work-around in case setting upfonts doesnrsquot work under certain circumstances but only until that specific problemis fixed This is undocumented as it completely deprives us of the possibility to act ndashwersquore blind and paralysed

4422 langpackagerang4423 letMTsavedsetupfontMTsetupfont

4424 definekeyMTXdisable[]4425 MTinfoInactivate `MTMTrsquo package4426 letMTsetupfontrelax4427 4428 definekeyMTXenable[]4429 MTinfoReactivate `MTMTrsquo package4430 letMTsetupfontMTsavedsetupfont4431 4432 langpackagerang

1446 Processing the options

MTProcessOptionsWithKV Parse options4433 langpackage|letterspacerang4434 langplainrangMTrequireslatex14435 defMTProcessOptionsWithKV14436 lettempcrelax4437 letMTtempempty4438 langplainrang MTrequireslatex24439 MTmapclistcclassoptionslist4440 defCurrentOption1

IMPLEMENTATION Package options 134

4441 MTifdefinednTKV1expandafterMTgetkeyCurrentOption=nil4442 edefMTtempMTtempCurrentOption4443 expandtwoargsremoveelementCurrentOption4444 unusedoptionlistunusedoptionlist4445 4446 4447 edefMTtempnoexpandsetkeys14448 MTtempptionlistcurrnamecurrext

eplain can handle package options4449 langplainrang4450 edefMTtempnoexpandsetkeys14451 csname usepkgoptionsusepkgpkgendcsname4452 langplainrang4453 MTtemp4454 MTclearoptions4455

MTgetkey For key=val in class options4456 defMTgetkey1=2nil1

4457 MTProcessOptionsWithKVMT4458 langplainrangrelax4459 langpackage|letterspacerang4460 langpackagerang

Now we can take the appropriate actions We also tell the log file which optionsthe user has chosen (in case itrsquos interested)

4461 MTaddtosetup4462 ifMTdraft

We disable most of what wersquove just defined in the 4462 lines above if we arerunning in draft mode

4463 MTwarningnl`draftrsquo option activeMessageBreak4464 Disabling all micro-typographic extensionsMessageBreak4465 This might lead to different line and page breaks4466 letMTsetupfontrelax4467 renewcommandLoadMicrotypeFile[1]4468 renewcommandmicrotypesetup[1]4469 renewcommandmicrotypecontext[1]4470 renewcommandlsstyle4471 else4472 MTsetupPDF4473 MTsetupcopies

Fix the font sets4474 MTmaptlistcMTfontsetsMTfixfontset4475 MTsetupprotrusion4476 MTsetupexpansion4477 MTsetuptracking4478 MTsetupwarntracking4479 MTsetupspacing4480 MTsetupkerning4481 MTsetupnoligatures4482 4483 langpackagerang

MTsetupPDF pdfTEX can create DVI output too However both the DVI viewer and dvips needto find actual fonts Therefore expansion will only work if the fonts for differentdegrees of expansion are readily available

Some packages depend on the value of pdfoutput and will get confused if it ischanged after they have been loaded These packages are among others colorgraphics hyperref crop contour pstricks and as a matter of course ifpdf

IMPLEMENTATION Package options 135

Instead of testing for each package (thatrsquos not our job) we only say that it wasmicrotype that changed it This must be sufficient

4484 langpdftex-def|luatex-defrang4485 defMTsetupPDF4486 MTinfonlGenerating ifnumpdfoutputltne DVI else PDF fi output4487 ifMToptDVIspace (changed by MTMT)fi4488

MTsetupcopies Working on font copies4489 defMTsetupcopies4490 ifxMTcopyfontrelaxelse MTinfonlUsing font copies for contextsfi4491 4492 langpdftex-def|luatex-defrang4493 langxetex-defrang4494 letMTsetupPDFrelax4495 letMTsetupcopiesrelax4496 langxetex-defrang

MTsetupprotrusion Protrusion4497 langpdftex-def|xetex-def|luatex-defrang4498 defMTsetupprotrusion4499 ifMTprotrusion4500 edefMTactivefeaturesMTactivefeaturespr4501 MTprotrudecharsMTprlevel4502 MTinfonlCharacter protrusion enabled (level numberMTprlevel)4503 ifnumMTprfactor=MTfactordefault elseMessageBreak4504 factor numberMTprfactorfi4505 ifxMTprunitempty elseMessageBreak unit MTprunitfi4506 MTcheckactivesetpr4507 else4508 letMTprotrusionrelax4509 MTinfonlNo character protrusion4510 fi4511 4512 langpdftex-def|xetex-def|luatex-defrang

MTsetupexpansion For DVI output the user must have explicitly passed the expansion option tothe package Under LuaTEX expansion works quite differently the glyphs willbe positioned as if they were transformed without actually being transformedSince this could still be considered a viable option we donrsquot disable the featurecompletely but issue a warning

4513 langpdftex-def|luatex-defrang4514 defMTsetupexpansion4515 ifnumpdfoutputltne4516 ifMToptexpansion4517 langluatex-defrang4518 ifMTexpansion4519 MTrequiresluatex34520 MTwarningnlFont expansion doesnrsquot work properly with luatex inMessageBreak4521 DVI mode the glyphs wonrsquot be actually transformedMessageBreak4522 but will only be shifted You might want to useMessageBreak4523 pdflatex instead Irsquoll continue anyway 4524 MTexpansionfalse4525 relax4526 fi4527 langluatex-defrang4528 else4529 MTexpansionfalse4530 fi4531 fi4532 ifMTexpansion

Set up the values for font expansion if stretch has not been specified we take the

IMPLEMENTATION Package options 136

default value of 204533 ifnumMTstretch=mne4534 letMTstretchMTstretchdefault4535 fi

If shrink has not been specified it will inherit the value from stretch4536 ifnumMTshrink=mne4537 letMTshrinkMTstretch4538 fi

If step has not been specified we will just set it to 1 for recent pdfTEX versions Mytests did not show much difference neither in compilation time (within the marginof error) nor in file size (less than 1 difference for microtypepdf with step=1compared to step=5) With older versions we set it to min(stretchshrink)5rounded off minimum value 1

4539 ifnumMTstep=mne4540 langpdftex-defrang MTrequirespdftex64541 defMTstep1 4542 langpdftex-defrang4543 4544 ifnumMTstretchgtMTshrink4545 ifnumMTshrink=z4546 tempcnta=MTstretch4547 else4548 tempcnta=MTshrink4549 fi4550 else4551 ifnumMTstretch=z4552 tempcnta=MTshrink4553 else4554 tempcnta=MTstretch4555 fi4556 fi4557 dividetempcnta 5relax4558 ifnumtempcnta=z tempcnta=ne fi4559 edefMTstepnumbertempcntaspace4560 4561 langpdftex-defrang4562 fi4563 ifnumMTstep=z4564 MTwarningnlThe expansion step cannot be set to zeroMessageBreak4565 Setting it to one4566 defMTstep1 4567 fi

MTauto Automatic expansion of the font This new feature of pdfTEX 120 makes thehz programme really usable It must be either lsquoautoexpandrsquo or empty (or lsquo1000rsquo forolder versions of pdfTEX) With LuaTEX we just leave it empty as therersquos actuallyno difference ndash non-automatic font expansion doesnrsquot work anymore In LuaTEX106 the lsquoautoexpandrsquo option seems to have been removed altogether and wouldtrigger a warning

4568 letMTautoempty4569 ifMTauto

We turn off automatic expansion if output mode is DVI4570 langpdftex-defrang4571 MTrequirespdftex44572 ifnumpdfoutputltne4573 ifMToptauto4574 MTerror4575 Automatic font expansion only works for PDF outputMessageBreak4576 However you are creating a DVI file

IMPLEMENTATION Package options 137

4577 If you have created expanded fonts instances remove `autorsquo from4578 MessageBreak the package options Otherwise you have to switch4579 off expansionMessageBreak completely4580 fi4581 MTautofalse4582 else4583 defMTautoautoexpand4584 fi

Also if pdfTEX is too old4585 4586 MTerror4587 The pdftex version you are using is too old forMessageBreak4588 automatic font expansion4589 If you have created expanded fonts instances remove `autorsquo fromMessageBreak4590 the package options Otherwise you have to switch off expansionMessageBreak4591 completely or upgrade pdftex to version 120 or newer4592 MTautofalse4593 defMTauto1000 4594 4595 langpdftex-defrang4596 langluatex-defrang MTrequiresluatex3relaxdefMTautoautoexpand4597 else4598 langpdftex-defrang

No automatic expansion4599 MTrequirespdftex4relax4600 defMTauto1000 4601 4602 langpdftex-defrang4603 langluatex-defrang4604 MTrequiresluatex34605 ifMToptauto4606 MTerrorNon-automatic font expansion does not work withMessageBreak4607 luatexRemove `auto=falsersquo from the package options or use pdftex4608 MTautotrue4609 fi4610 relax4611 langluatex-defrang4612 fi

Choose the appropriate macro for selected expansion4613 ifMTselected4614 letMTsetexcodesMTsetexcodess4615 else4616 letMTsetexcodesMTsetexcodesn4617 fi

Filter out stretch=0shrink=0 since it would result in a pdfTEX error4618 ifnumMTstretch=z4619 ifnumMTshrink=z4620 MTwarningnl4621 Both the stretch and shrink limit are set to zeroMessageBreak4622 Disabling font expansion4623 MTexpansionfalse4624 fi4625 fi4626 fi4627 ifMTexpansion4628 edefMTactivefeaturesMTactivefeaturesex4629 MTadjustspacingMTexlevel4630 MTinfonlifMTauto Aelse Non-afi utomatic font expansion enabled4631 (level numberMTexlevel)MessageBreak4632 stretch numberMTstretch shrink numberMTshrink4633 step numberMTstep ifMTselectedelse non-fi selected

IMPLEMENTATION Package options 138

MTcheckstep Check whether stretch and shrink are multiples of step4634 defMTcheckstep14635 tempcnta=csname MT1endcsname4636 dividetempcnta MTstep4637 multiplytempcnta MTstep4638 ifnumtempcnta=csname MT1endcsnameelse4639 MTwarningnlThe 1 amount is not a multiple of stepMessageBreak4640 The effective maximum 1 is thetempcntaspace4641 (step numberMTstep)4642 fi4643 4644 MTcheckstepstretch4645 MTcheckstepshrink4646 MTcheckactivesetex

showhyphens Inside showhyphens font expansion should be disabled (Since 20170110 theLATEX format contains a different version for XETEX but since expansion doesnrsquotwork with XETEX we donrsquot have to bother) Since 20191001 the command isrobust

4647 MTifdefinednTFshowhyphens 4648 defMTtemp124649 expandafterCheckCommandcsname showhyphens endcsname[1]14650 DeclareRobustCommandshowhyphens[1]24651 4652 defMTtemp124653 CheckCommandshowhyphens[1]14654 gdefshowhyphens124655 4656 MTtemp4657 setbox0vboxcolorbegingroup4658 everyparparfillskipzskip4659 hsizemaxdimennormalfontpretolerancemnetolerancemne4660 hbadnesszshowboxdepthz 1colorendgroup4661 setbox0vboxcolorbegingrouppdfadjustspacingz4662 everyparparfillskipzskip4663 hsizemaxdimennormalfontpretolerancemnetolerancemne4664 hbadnesszshowboxdepthz 1colorendgroup

4665 else4666 letMTexpansionrelax4667 MTinfonlNo font expansion4668 fi4669 4670 langpdftex-def|luatex-defrang4671 langxetex-defrang4672 defMTsetupexpansion4673 ifMTexpansion4674 ifMToptexpansion4675 MTerrorFont expansion does not work with xetex4676 Use pdftex or luatex instead4677 fi4678 fi4679 4680 langxetex-defrang

MTsetuptracking Tracking spacing and kerning4681 langpdftex-def|luatex-defrang4682 langpdftex-defrangMTrequirespdftex64683 langluatex-defrangMTrequiresluatex34684 defMTsetuptracking4685 ifMTtracking4686 edefMTactivefeaturesMTactivefeaturestr4687 MTinfonlTracking enabled4688 MTcheckactivesettr

IMPLEMENTATION Package options 139

Enable protrusion for compensation at the line edges4689 ifMTprotrusionelseMTprotrudecharsnefi4690 else4691 letMTtrackingrelax4692 MTinfonlNo adjustment of tracking4693 fi4694 4695 langpdftex-def|luatex-defrang

MTsetupspacing

4696 langpdftex-defrang4697 defMTsetupspacing4698 ifMTspacing4699 edefMTactivefeaturesMTactivefeaturessp4700 pdfadjustinterwordgluene4701 MTinfonlAdjustment of interword spacing enabled

The ragged2e package sets interword spaces to a fixed value without glue microtypersquosmodifications can therefore have undesired effects Therefore we issue a warning

4702 MTwithpackageTragged2e4703 MTwarningnlYou are using the `ragged2ersquo packageMessageBreak4704 Adjustment of interword spacing may lead toMessageBreak4705 undesired results when used with `ragged2ersquoMessageBreak4706 In this case disable the `spacingrsquo option4707 4708 MTcheckactivesetsp4709 else4710 letMTspacingrelax4711 MTinfonlNo adjustment of interword spacing4712 fi4713

MTsetupspacingcheck Warning if nonfrenchspacing is active since space factors will be ignoredwith pdfadjustinterwordglue gt0 Why 1500 Because some packages redefinefrenchspacing16

4714 defMTsetupspacingcheck4715 ifMTspacing4716 ifMTbabel else4717 ifnumsfcode` gt 15004718 MTifstreqMTspcontextnonfrenchrelax4719 MTwarningnl4720 stringnonfrenchspacingspace is active Adjustment ofMessageBreak4721 interword spacing will disable it You might wantMessageBreak4722 to add `backslashcharMTMT contextspacing=nonfrenchrsquoMessageBreak4723 to your preamble4724 4725 fi4726 fi4727 fi4728

MTsetupkerning

4729 defMTsetupkerning4730 ifMTkerning4731 edefMTactivefeaturesMTactivefeatureskn4732 pdfprependkernne4733 pdfappendkernne4734 MTinfonlAdjustment of character kerning enabled4735 MTcheckactivesetkn4736 else4737 letMTkerningrelax

16 Cf the ctt thread lsquofrenchspacing with AMS packages and babelrsquo started by Philipp Lehman on16 August 2005 MID ddtbaj$rob$1onlinede

IMPLEMENTATION Package options 140

4738 MTinfonlNo adjustment of character kerning4739 fi4740 4741 langpdftex-defrang

MTerrordoesntwork If pdfTEX is too old we disable tracking spacing and kerning and throw an errormessage We also switch the features off for LuaTEX and XETEX

4742 langpdftex-def|luatex-defrang4743 langluatex-defrang4744 defMTsetuptracking4745 ifMTtracking4746 MTerrorThe tracking feature only works with luatex 062MessageBreak4747 or newer Switching it offUpgrade luatex4748 MTtrackingfalse4749 MTletncMTtrackingrelax4750 else4751 MTinfonlNo adjustment of tracking (luatex too old)4752 fi4753 4754 4755 langluatex-defrang4756 langpdftex-def|xetex-def|luatex-defrang4757 defMTerrordoesntwork14758 csname ifMT1endcsname4759 MTerrorThe 1 feature only works with pdftex 140MessageBreak4760 or newer Switching it off4761 langpdftex-defrang Upgrade pdftex4762 langluatex-def|xetex-defrang Use pdftex instead4763 csname MT1falseendcsname4764 MTletncMT1relax4765 else4766 MTinfonlNo adjustment of 14767 langpdftex-defrang space(pdftex too old)4768 4769 fi4770 4771 langpdftex-def|xetex-defrang defMTsetuptrackingMTerrordoesntworktracking4772 defMTsetupkerning MTerrordoesntworkkerning4773 defMTsetupspacing MTerrordoesntworkspacing4774 langpdftex-defrang4775 langpdftex-def|xetex-def|luatex-defrang

MTsetupwarntracking

4776 langletterspacerangMTaddtosetup4777 langpdftex-def|luatex-defrangdefMTsetupwarntracking

MTwarntrackingDVI With pdfTEX we issue a warning when letterspacing in DVI mode since it willprobably not work We also switch on protrusion if it isnrsquot already to compensatefor the letterspacing kerns

4778 langpdftex-def|luatex-def|letterspacerang4779 4780 langpdftex-def|letterspacerang4781 ifnumpdfoutputltne4782 defMTwarntrackingDVI4783 langletterspacerang MTpdforlua4784 MTwarningnl4785 You are using trackingletterspacing in DVI modeMessageBreak4786 This will probably not work unless the post-MessageBreak4787 processing program (dvips dvipdfm(x) ) isMessageBreak4788 able to create the virtual fonts on the fly4789 langletterspacerang relax4790 MTgletMTwarntrackingDVIrelax4791 4792 else

IMPLEMENTATION Package options 141

4793 langpdftex-def|letterspacerang4794 defMTwarntrackingDVI4795 ifnumpdfprotrudecharsltne globalpdfprotrudecharsne fi4796 MTgletMTwarntrackingDVIrelax4797 4798 langpdftex-def|letterspacerang fi

4799 ifnumMTletterspace=mne4800 letMTletterspaceMTletterspacedefault4801 else4802 MTlstoolargeMTletterspace4803 fi4804 4805 langpdftex-def|luatex-def|letterspacerang4806 langxetex-defrangletMTsetupwarntrackingrelax

MTsetupnoligatures DisableLigatures is only admissible in the preamble therefore we can nowdisable the corresponding macro if it was never called

4807 langpdftex-def|luatex-defrang4808 defMTsetupnoligatures4809 langpdftex-defrang MTrequirespdftex54810 ifMTnoligatures else4811 letMTnoligaturesrelax4812 fi4813 langpdftex-defrang relax4814 4815 langpdftex-def|luatex-defrang4816 langxetex-defrangletMTsetupnoligaturesrelax

Remove the leading comma in MTactivefeatures and set the document switchto true

4817 langpackagerang4818 MTaddtosetup4819 ifxMTactivefeaturesempty else4820 edefMTactivefeaturesexpandaftergobbleMTactivefeatures4821 fi4822 MTdocumenttrue4823

MTsetbabelcontext Interaction with babel4824 defMTsetbabelcontext14825 MTifdefinednTFMTbabel14826 MTvinfo Changing to language context `1rsquoMessageBreakonline4827 expandafterMTexponenexpandaftermicrotypecontext4828 csname MTbabel1endcsname4829 4830 microtypecontextprotrusion=expansion=spacing=kerning=4831 4832

MTshorthandoff Active characters can only be switched off if babel isnrsquot loaded after microtype4833 ifpackageloadedbabel4834 defMTshorthandoff124835 MTinfonlSwitching off 1 babelrsquos active characters (2)4836 shorthandoff24837 4838 defMTshorthandoff124839 MTerrorYou must load `babelrsquo before `MTMTrsquo4840 Otherwise `MTMTrsquo cannot switch off 1 babelrsquosMessageBreak4841 active characters4842

We patch the language switching commands to enable language-dependent setup4843 MTaddtosetup4844 ifMTbabel

IMPLEMENTATION Package options 142

4845 ifpackageloadedbabel4846 MTinfonlRedefining babelrsquos language switching commands4847 letMTorigselectlanguageselectlanguage4848 defselectlanguage14849 MTorigselectlanguage14850 MTsetbabelcontext14851 4852 letMTorigforeignlanguageforeignlanguage4853 defforeignlanguage14854 MTorigforeignlanguage14855 MTsetbabelcontext14856 4857 ifMTkerning

Disable French babelrsquos active characters4858 MTiffalse4859 MTwithbabelandTfrench MTiftrue4860 MTwithbabelandTfrenchb MTiftrue4861 MTwithbabelandTfrancaisMTiftrue4862 MTwithbabelandTcanadienMTiftrue4863 MTwithbabelandTacadian MTiftrue4864 ifMTifMTshorthandoffFrenchfi

Disable Turkish babelrsquos active characters4865 MTiffalse4866 MTwithbabelandTturkish MTiftrue4867 ifMTifMTshorthandoffTurkish=fi4868 fi

In case babel was loaded before microtype4869 MTsetbabelcontextlanguagename4870 4871 MTwarningnlYou did not load the babel packageMessageBreak4872 The `babelrsquo option wonrsquot have any effect4873 4874 fi4875

Now we close the fi from ifMTdraft4876 MTaddtosetupfi

Set up the current font most likely the normal font This has to come after all ofthe setup (including anything from the preamble) has been dealt with

4877 selectfont

MTcurrfile This is the current file (hopefully with the correct extension)4878 edefMTcurrfilejobnametex4879 langpackagerang

Finally execute the setup macro at the end of the preamble and empty it (thecombine class calls it repeatedly)

4880 langpackage|letterspacerang4881 langplainrangMTrequireslatex14882 AtBeginDocumentMTsetup MTgletMTsetupempty4883 langplainrangrelax4884 langpackage|letterspacerang

Must come at the very very end4885 langpackagerangMTifdefinedcTMTsetupspacingcheck4886 langpackagerang AtBeginDocumentMTsetupspacingcheck

Restore catcodes4887 langpackage|letterspacerangMTrestorecatcodes

That was that

CONFIGURATION FILES 143

15 Configuration filesLetrsquos now write the font configuration files

4888 langconfigrang4889

151 Font setsWe first declare some sets in the main configuration file

4890 langm-trang4891 -----------------------------------------------------------------------4892 FONT SETS48934894 DeclareMicrotypeSetall4895 4896

4897 DeclareMicrotypeSetallmath4898 encoding = OT1T1T2ALY1OT4QXT5EU1EU2TUTS1OMLOMSU 48994900 DeclareMicrotypeSetalltext4901 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU 4902

4903 DeclareMicrotypeSetallmath-nott4904 encoding = OT1T1T2ALY1OT4QXT5EU1EU2TUTS1OMLOMSU4905 family = rmsf4906 49074908 DeclareMicrotypeSetalltext-nott4909 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU4910 family = rmsf4911 4912

4913 DeclareMicrotypeSetbasicmath4914 encoding = OT1T1T2ALY1OT4QXT5EU1EU2TUOMLOMS4915 family = rmsf4916 series = md4917 size = normalsizefootnotesizesmalllarge4918 49194920 DeclareMicrotypeSetbasictext4921 encoding = OT1T1T2ALY1OT4QXT5EU1EU2TU4922 family = rmsf4923 series = md4924 size = normalsizefootnotesizesmalllarge4925 4926

4927 DeclareMicrotypeSetsmallcaps4928 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU4929 shape = scsiscit4930 4931

4932 DeclareMicrotypeSetfootnotesize4933 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU4934 size = -small4935 49364937 DeclareMicrotypeSetscriptsize4938 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU

CONFIGURATION FILES Font variants and aliases 144

4939 size = -footnotesize4940 49414942 DeclareMicrotypeSetnormalfont4943 font = 4944

The default sets4945 -----------------------------------------------------------------------4946 DEFAULT SETS49474948 DeclareMicrotypeSetDefault[protrusion]alltext4949 DeclareMicrotypeSetDefault[expansion] alltext-nott4950 DeclareMicrotypeSetDefault[spacing] alltext-nott4951 DeclareMicrotypeSetDefault[kerning] alltext4952 DeclareMicrotypeSetDefault[tracking] smallcaps4953

152 Font variants and aliasesThese are the variants I happen to be using (expert encoding oldstyle numeralsswashes alternative display inferior and superior numerals) Additionally weadd the now common variants for Lining Tabular Oldstyle and Tabular Oldstylenumbers

4954 -----------------------------------------------------------------------4955 FONT VARIANTS AND ALIASES49564957 DeclareMicrotypeVariantsxjwad01-LF-TLF-OsF-TOsF

Other candidates 2 (proportional digits) e (engraved) f (Fraktur) g (small text)h (shadow) l (outline) n (informal) p (ornaments) r (roman) s (sans serif)t (typewriter) Irsquove omitted them since they seem hardly be used andor they areactually more than just a variant ie they shouldnrsquot share a file

Fonts that are lsquothe samersquo The fontspec package will set lmr as the default fontwhose declarations for EU1EU2TU encoding are in mt-LatinModernRomancfgSince 20161203 the default encoding with XETEX and LuaTEX in the LATEX formatis TU even if fontspec is not loaded

49584959 MTiffalse4960 ifxUnicodeEncodingNameundefinedelse4961 MTifstreqencodingdefaultUnicodeEncodingNameMTiftruerelax4962 fi4963 ifMTfontspecMTiftruefi4964 ifMTif4965 -- ComputerLatin Modern Roman4966 DeclareMicrotypeAliaslmrLatin Modern Roman4967 else4968 DeclareMicrotypeAliaslmrcmr lmodern4969 fi

The Latin Modern fonts the virtual fonts from the ae and zefonts and the eco andhfoldsty packages (oldstyle numerals) as well as mlmodern all inherit the (basic)settings from Computer Modern Roman Some of them are in part overwritten laterWe mustnrsquot forget the Latin Modern math fonts

4970 DeclareMicrotypeAliaslmsycmsy 4971 DeclareMicrotypeAliaslmm cmm 4972 DeclareMicrotypeAliasaer cmr ae4973 DeclareMicrotypeAliaszer cmr zefonts

CONFIGURATION FILES Font variants and aliases 145

4974 DeclareMicrotypeAliascmorcmr eco4975 DeclareMicrotypeAliashforcmr hfoldsty4976 DeclareMicrotypeAliasmlmrcmr mlmodern4977 DeclareMicrotypeAliasmlmsycmsy 4978 DeclareMicrotypeAliasmlmm cmm

Another new Computer Modern extension The newcomputermodern package loadsit by file name

4979 DeclareMicrotypeAliasNew Computer ModernLatin Modern Roman4980 DeclareMicrotypeAliasNewCM10-Bookotf Latin Modern Roman4981 DeclareMicrotypeAliasNewCM10-RegularotfLatin Modern Roman

The packages pxfonts and txfonts fonts inherit Palatino and Times settings re-spectively also the TEX Gyre fonts Pagella and Termes (formerly qfonts)

4982 -- Palatino4983 DeclareMicrotypeAliaspxr ppl pxfonts4984 DeclareMicrotypeAliasqpl ppl TeX Gyre Pagella (formerly qfontsQuasiPalatino)

The lsquoFPL Neursquo fonts a lsquore-implementationrsquo of Palatino4985 DeclareMicrotypeAliasfp9xpplx FPL Neu4986 DeclareMicrotypeAliasfp9jpplj

The newpx package a replacement for pxfonts4987 DeclareMicrotypeAliaszpllfpplx newpxtext4988 DeclareMicrotypeAliaszplosfpplj 4989 DeclareMicrotypeAliaszpltlfpplx 4990 DeclareMicrotypeAliaszpltosfpplj

The domitian package4991 DeclareMicrotypeAliasDomitian-TLF pplx domitian4992 DeclareMicrotypeAliasDomitian-TOsFpplj

The OpenType versions4993 DeclareMicrotypeAliasPalatino LinotypePalatino4994 DeclareMicrotypeAliasPalatino LT Std Palatino4995 DeclareMicrotypeAliasTeX Gyre Pagella Palatino4996 DeclareMicrotypeAliasDomitian Palatino4997 DeclareMicrotypeAliasAsana Math Palatino4998 -- Times New Roman4999 DeclareMicrotypeAliastxrptm txfonts

The newtx package a replacement for txfonts5000 DeclareMicrotypeAliasntxlfptmx newtxtext5001 DeclareMicrotypeAliasntxosfptmj 5002 DeclareMicrotypeAliasntxtlfptmx 5003 DeclareMicrotypeAliasntxtosfptmj

The tempora package5004 DeclareMicrotypeAliasTempora-TLF ptmx tempora5005 DeclareMicrotypeAliasTempora-TOsFptmj 5006 DeclareMicrotypeAliasqtmptm TeX Gyre Termes (formerly qfontsQuasiTimes)

The step package5007 DeclareMicrotypeAliasSTEP-TLF ptmx step5008 DeclareMicrotypeAliasSTEP-TOsFptmj

The stix and stix2 packages (the latter has departed a bit from being a Timesclone but still seems close enough)

5009 DeclareMicrotypeAliasstix ptm stix5010 DeclareMicrotypeAliasstix2ptm stix2

More Times variants to be checked pns mns (TimesNewRomanPS) mnt (Times-NewRomanMT TimesNRSevenMT) mtm (TimesSmallTextMT) pte (TimesEuropa)ptt (TimesTen) TimesEighteen TimesModernEF

CONFIGURATION FILES Interaction with babel 146

MicroPressrsquos Charter version (chmath)5011 -- Charter5012 DeclareMicrotypeAliaschrbch CH Math

The XCharter package extends the Charter fonts5013 DeclareMicrotypeAliasXCharter-TLF bch XCharter5014 DeclareMicrotypeAliasXCharter-TOsFbch

The mathdesign package provides math fonts matching Bitstream Charter and URWGaramond

5015 DeclareMicrotypeAliasmdbchbch mathdesignCharter5016 -- Garamond5017 DeclareMicrotypeAliasmdugmugm mathdesignURW Garamond

The garamondx package an extension of URW Garamond providing small caps andoldstyle figures

5018 DeclareMicrotypeAliaszgmxugm garamondx5019 DeclareMicrotypeAliaszgmjugm 5020 DeclareMicrotypeAliaszgmIugm 5021 DeclareMicrotypeAliaszgmqugm

Because a configuration file for Adobe Garamond wouldnrsquot be permitted for TEX Livedistribution we use EB Garamond as the base font

5022 DeclareMicrotypeAliaspad EBGaramond-LF Adobe Garamond5023 DeclareMicrotypeAliaspadxEBGaramond-TLF 5024 DeclareMicrotypeAliaspadjEBGaramond-TOsF 5025 --

URW Letter Gothic is similar enough to Bitstream Letter Gothic to share the config-uration

5026 DeclareMicrotypeAliasulgblg URW LetterGothic -gt Bitstream LetterGothic12Pitch

The eulervm package virtually extends the Euler fonts5027 DeclareMicrotypeAliaszeureur Euler VM5028 DeclareMicrotypeAliaszeuseus

Euro symbol fonts to save some files5029 DeclareMicrotypeAliaszpeus zpeu Adobe Euro sans -gt serif5030 DeclareMicrotypeAliaseurosanszpeu Adobe Euro sans -gt serif5031

153 Interaction with babel

Contexts that are to be set when switching to a language5032 -----------------------------------------------------------------------5033 INTERACTION WITH THE `babelrsquo PACKAGE50345035 DeclareMicrotypeBabelHook5036 englishUKenglishbritishUSenglishamerican5037 kerning= spacing=nonfrench50385039 DeclareMicrotypeBabelHook5040 frenchfrancaisacadiancanadien5041 kerning=french spacing=50425043 DeclareMicrotypeBabelHook5044 turkish5045 kerning=turkish spacing=5046

CONFIGURATION FILES Note on admissible characters 147

154 Note on admissible charactersAll printable ASCII characters are allowed in the settings with the followingexceptions (on the left hand side the replacements on the right)

textbackslash textbraceleft textbraceright^ textasciicircum

Comma and equal sign must be guarded with braces (lsquorsquo lsquo=rsquo) to keep keyvalhappy

Character commands are allowed as far as they have been defined in the properLATEX way that is when they have been assigned a slot in the font encoding withDeclareTextSymbol or DeclareTextComposite Characters defined via chardefare also possible

Ligatures and mathchardefrsquoed symbols have to be specified numerically Ofcourse numerical identification is possible in any other case too

8-bit characters are also admissible provided they have been declared in theinput encoding file They should however only be used in private configurationfiles where the proper input encoding is guaranteed or else in combination withthe lsquoinputencrsquo key

With XETEX or LuaTEX in contrast it is advisable to use the proper Unicodecharacters or the font-specific glyph names prefixed with lsquorsquo (cf section 16)

155 Character inheritanceFirst the lists of inheriting characters We only declare those characters that are thesame on both sides ie not Πfor O

5047 langm-trang5048 langm-t|zpeu|mvsrang5049 -----------------------------------------------------------------------5050 CHARACTER INHERITANCE50515052 langm-t|zpeu|mvsrang5053 langm-trang

1551 OT1

Glyphs that should possibly inherit settings on one side only 012 (lsquofirsquo ligature)013 (lsquoflrsquo) 014 (lsquoffirsquo) 015 (lsquofflrsquo) AElig aelig Œ œ

5054 DeclareCharacterInheritance5055 encoding = OT1 5056 f = 011 ff5057 i = i5058 j = j5059 O = O5060 o = o5061 5062

CONFIGURATION FILES Character inheritance 148

1552 T1

Candidates here 028 (lsquofirsquo) 029 (lsquoflrsquo) 030 (lsquoffirsquo) 031 (lsquofflrsquo) 156 (lsquoIJrsquo ligature sinceLATEX 20051201 accessible as IJ) 188 (lsquoijrsquo ij) AElig aelig Œ œ

5063 DeclareCharacterInheritance5064 encoding = T1 5065 A = `ArsquoA^A~AAr Ak Au A5066 a = `arsquoa^a~aar ak au a5067 C = rsquoCc Cv C5068 c = rsquocc cv c5069 D = v DDH5070 d = v ddj5071 E = `ErsquoE^EEk Ev E5072 e = `ersquoe^eek ev e5073 f = 027 ff5074 G = u G5075 g = u g5076 I = `IrsquoI^III5077 i = `irsquoi^iii5078 j = j5079 L = LrsquoLv L5080 l = lrsquolv l5081 N = rsquoN~Nv N5082 n = rsquon~nv n5083 O = O`OrsquoO^O~OOH O5084 o = o`orsquoo^o~ooH o5085 R = rsquoRv R5086 r = rsquorv r5087 S = rsquoSc Sv SSS5088 s = rsquosc sv s5089 T = c Tv T5090 t = c tv t5091 U = `UrsquoU^UUH Ur U5092 u = `ursquou^uuH ur u5093 Y = rsquoYY5094 y = rsquoyy5095 Z = rsquoZZv Z5096 z = rsquozzv z

The lsquosoft hyphenrsquo often has reduced right side bearing so that it may already beprotruded hence no inheritance

5097 - = 1275098 5099

1553 LY1

More characters 008 (lsquoflrsquo) 012 (lsquofirsquo) 014 (lsquoffirsquo) 015 (lsquofflrsquo) AElig aelig Œ œ5100 DeclareCharacterInheritance5101 encoding = LY1 5102 A = `ArsquoA^A~AAr A5103 a = `arsquoa^a~aar a5104 C = c C5105 c = c c5106 D = DH5107 E = `ErsquoE^EE5108 e = `ersquoe^ee5109 f = 011 ff5110 I = `IrsquoI^II5111 i = `irsquoi^iii5112 L = L5113 l = l5114 N = ~N

CONFIGURATION FILES Character inheritance 149

5115 n = ~n5116 O = `OrsquoO^O~OOO5117 o = `orsquoo^o~ooo5118 S = v S5119 s = v s5120 U = `UrsquoU^UU5121 u = `ursquou^uu5122 Y = rsquoYY5123 y = rsquoyy5124 Z = v Z5125 z = v z5126 5127

1554 OT4

The Polish OT1 extension More interesting characters here 009 (lsquofkrsquo) 012 (lsquofirsquo)013 (lsquoflrsquo) 014 (lsquoffirsquo) 015 (lsquofflrsquo) AElig aelig Œ œ

5128 DeclareCharacterInheritance5129 encoding = OT4 5130 A = k A5131 a = k a5132 C = rsquoC5133 c = rsquoc5134 E = k E5135 e = k e5136 f = 011 ff5137 i = i5138 j = j5139 L = L5140 l = l5141 N = rsquoN5142 n = rsquon5143 O = OrsquoO5144 o = orsquoo5145 S = rsquoS5146 s = rsquos5147 Z = rsquoZZ5148 z = rsquozz5149 textquotedblleft = FF5150 5151

1555 QX

The Central European QX encoding17 Ligatures 009 (lsquofkrsquo) 012 (lsquofirsquo) 013 (lsquoflrsquo)014 (lsquoffirsquo) 015 (lsquofflrsquo) AElig aelig Œ œ

5152 DeclareCharacterInheritance5153 encoding = QX 5154 A = `ArsquoA^A~AAk AAA5155 a = `arsquoa^a~aak aaa5156 C = rsquoCc C5157 c = rsquocc c5158 D = DH5159 E = `ErsquoE^EEk E5160 e = `ersquoe^eek e5161 f = 011 ff5162 I = `IrsquoI^IIk I5163 i = `irsquoi^iik ii5164 j = j

17 Contributed by Maciej Eder

CONFIGURATION FILES Character inheritance 150

5165 L = L5166 l = l5167 N = rsquoN~N5168 n = rsquon~n5169 O = O`OrsquoO^O~OO5170 o = o`orsquoo^o~oo

The Romanian textcommabelow accents are actually replacements for the cvariants which had previously (and erroneously18) been included in QX encodingThey are still kept for backwards compatibility

5171 S = rsquoSc Stextcommabelow Sv S5172 s = rsquosc stextcommabelow sv s5173 T = c Ttextcommabelow T5174 t = c ttextcommabelow t5175 U = `UrsquoU^UUk U5176 u = `ursquou^uuk u5177 Y = rsquoYY5178 y = rsquoyy5179 Z = rsquoZZv Z5180 z = rsquozzv z5181 = textellipsis5182 5183

1556 T5

The Vietnamese encoding T5 It is so crowded with accented and double-accentedcharacters that there is no room for any ligatures

5184 DeclareCharacterInheritance5185 encoding = T5 5186 A = `ArsquoA~Ah Ad A^Au A5187 `AcircumflexrsquoAcircumflex~AcircumflexhAcircumflexdAcircumflex5188 `AbreversquoAbreve~AbrevehAbrevedAbreve5189 a = `arsquoa~ah ad a^au a5190 `acircumflexrsquoacircumflex~acircumflexhacircumflexdacircumflex5191 `abreversquoabreve~abrevehabrevedabreve5192 D = DJ5193 d = dj5194 E = `ErsquoE~Eh Ed E^E5195 `EcircumflexrsquoEcircumflex~EcircumflexhEcircumflexdEcircumflex5196 e = `ersquoe~eh ed e^e5197 `ecircumflexrsquoecircumflex~ecircumflexhecircumflexdecircumflex5198 I = `IrsquoI~Ih Id I5199 i = `irsquoi~ih id ii5200 O = `OrsquoO~Oh Od O^Ohorn O5201 `OcircumflexrsquoOcircumflex~OcircumflexhOcircumflexdOcircumflex5202 `OhornrsquoOhorn~OhornhOhorndOhorn5203 o = `orsquoo~oh od o^ohorn o5204 `ocircumflexrsquoocircumflex~ocircumflexhocircumflexdocircumflex5205 `ohornrsquoohorn~ohornhohorndohorn5206 U = `UrsquoU~Uh Ud Uhorn U5207 `UhornrsquoUhorn~UhornhUhorndUhorn5208 u = `ursquou~uh ud uhorn u5209 `uhornrsquouhorn~uhornhuhornduhorn5210 Y = `YrsquoY~Yh Yd Y5211 y = `yrsquoy~yh yd y5212 5213

18 Cf httptugorgpipermailtex-live2008-August017204html

CONFIGURATION FILES Character inheritance 151

1557 EU1 EU2 TU

The EU1 ( XETEX) EU2 (LuaTEX) and since fontspec version 25 TU encodingsare not well-defined in the sense that they donrsquot contain a fixed number of glyphsall of which must be present OpenType fonts may contain thousands of glyphsbut we only define those that should be present in every font (basically T1) Thisinheritance list should be overridden by font-specific ones

5214 DeclareCharacterInheritance5215 encoding = TUEU1EU2 5216 A = `ArsquoA^A~AAr Ak Au A5217 a = `arsquoa^a~aar ak au a5218 C = rsquoCc Cv C5219 c = rsquocc cv c5220 D = v DDH5221 d = v ddj5222 E = `ErsquoE^EEk Ev E5223 e = `ersquoe^eek ev e5224 f = f_f sometimes f_f sometimes ff5225 G = u G5226 g = u g5227 I = `IrsquoI^III5228 i = `irsquoi^iii5229 j = j5230 L = LrsquoLv L5231 l = lrsquolv l5232 N = rsquoN~Nv N5233 n = rsquon~nv n5234 O = O`OrsquoO^O~OOH O5235 o = o`orsquoo^o~ooH o5236 R = rsquoRv R5237 r = rsquorv r5238 S = rsquoSc Sv S SS5239 s = rsquosc sv s5240 T = c Tv T5241 t = c tv t5242 U = `UrsquoU^UUH Ur U5243 u = `ursquou^uuH ur u5244 Y = rsquoYY5245 y = rsquoyy5246 Z = rsquoZZv Z5247 z = rsquozzv z5248 52495250 langm-trang

1558 Euro symbols

Make Euro symbols settings simpler5251 langzpeurang5252 DeclareCharacterInheritance5253 encoding = U5254 family = zpeuzpeuseurosans 5255 E = 128 52565257 langzpeurang5258 langmvsrang

Since 20060511 (that is one week after Irsquove added these settings after thepackage had been dormant for six years) marvosymrsquos encoding is (correctly) Uinstead of OT1

5259 DeclareCharacterInheritance5260 encoding = OT1U

CONFIGURATION FILES Tracking 152

5261 family = mvs 5262 164 = 099100101 EURhvEURcrEURtm52635264 langmvsrang

156 TrackingBy default we only disable the lsquofrsquo ligatures for those fonts that have any Thusligatures and especially kerning for all other characters will be retained

5265 langm-trang5266 -----------------------------------------------------------------------5267 TRACKINGLETTERSPACING52685269 SetTracking5270 [ name = default5271 no ligatures = f ]5272 encoding = OT1T1T2ALY1OT4QXEU2TU 5273 5274

157 Font expansionThese are Hagraven Thecirc Thagravenhrsquos original expansion settings They are used for all fonts(until somebody shows mercy and creates font-specific settings)

5275 -----------------------------------------------------------------------5276 EXPANSION52775278 SetExpansion5279 [ name = default ]5280 encoding = OT1OT4QXT1LY1 5281 5282 A = 500 a = 7005283 AE = 500 ae = 7005284 B = 700 b = 7005285 C = 700 c = 7005286 D = 500 d = 7005287 E = 700 e = 7005288 F = 7005289 G = 500 g = 7005290 H = 700 h = 7005291 K = 700 k = 7005292 M = 700 m = 7005293 N = 700 n = 7005294 O = 500 o = 7005295 OE = 500 oe = 7005296 P = 700 p = 7005297 Q = 500 q = 7005298 R = 7005299 S = 700 s = 7005300 U = 700 u = 7005301 W = 700 w = 7005302 Z = 700 z = 7005303 2 = 7005304 3 = 7005305 6 = 7005306 8 = 7005307 9 = 7005308 5309

CONFIGURATION FILES Font expansion 153

Settings for Cyrillic T2A encoding19

5310 SetExpansion5311 [ name = T2A ]5312 encoding = T2A 5313 5314 A = 500 a = 7005315 B = 700 b = 7005316 C = 700 c = 7005317 D = 500 d = 7005318 E = 700 e = 7005319 F = 7005320 G = 500 g = 7005321 H = 700 h = 7005322 K = 700 k = 7005323 M = 700 m = 7005324 N = 700 n = 7005325 O = 500 o = 7005326 P = 700 p = 7005327 Q = 500 q = 7005328 R = 7005329 S = 700 s = 7005330 U = 700 u = 7005331 W = 700 w = 7005332 Z = 700 z = 7005333 2 = 7005334 3 = 7005335 6 = 7005336 8 = 7005337 9 = 7005338 CYRA = 500 cyra = 7005339 CYRB = 700 cyrb = 7005340 CYRV = 700 cyrv = 7005341 CYRG = 700 cyrg = 7005342 CYRD = 700 cyrd = 7005343 CYRE = 700 cyre = 7005344 CYRZH = 700 cyrzh = 7005345 CYRZ = 700 cyrz = 7005346 CYRI = 700 cyri = 7005347 CYRISHRT = 700 cyrishrt = 7005348 CYRK = 700 cyrk = 7005349 CYRL = 700 cyrl = 7005350 CYRM = 700 cyrm = 7005351 CYRN = 700 cyrn = 7005352 CYRO = 500 cyro = 7005353 CYRP = 700 cyrp = 7005354 CYRR = 700 cyrr = 7005355 CYRS = 700 cyrs = 7005356 CYRT = 700 cyrt = 7005357 CYRU = 700 cyru = 7005358 CYRF = 700 cyrf = 7005359 CYRH = 700 cyrh = 7005360 CYRC = 700 cyrc = 7005361 CYRCH = 700 cyrch = 7005362 CYRSH = 700 cyrsh = 7005363 CYRSHCH = 700 cyrshch = 7005364 CYRHRDSN = 700 cyrhrdsn = 7005365 CYRERY = 700 cyrery = 7005366 CYRSFTSN = 700 cyrsftsn = 7005367 CYREREV = 700 cyrerev = 7005368 CYRYU = 700 cyryu = 7005369 CYRYA = 700 cyrya = 7005370 5371

19 Contributed by Karl Karlsson

CONFIGURATION FILES Character protrusion 154

T5 encoding does not contain AE ae OE and oe5372 SetExpansion5373 [ name = T5 ]5374 encoding = T5 5375 5376 A = 500 a = 7005377 B = 700 b = 7005378 C = 700 c = 7005379 D = 500 d = 7005380 E = 700 e = 7005381 F = 7005382 G = 500 g = 7005383 H = 700 h = 7005384 K = 700 k = 7005385 M = 700 m = 7005386 N = 700 n = 7005387 O = 500 o = 7005388 P = 700 p = 7005389 Q = 500 q = 7005390 R = 7005391 S = 700 s = 7005392 U = 700 u = 7005393 W = 700 w = 7005394 Z = 700 z = 7005395 2 = 7005396 3 = 7005397 6 = 7005398 8 = 7005399 9 = 7005400 54015402 langm-trang

158 Character protrusion5403 -----------------------------------------------------------------------5404 PROTRUSION5405

For future historians Hagraven Thecirc Thagravenhrsquos original settings (from protcodetex con-verted to microtype notation)

SetProtrusion [ name = thanh ] encoding = OT1 A = 5050 F = 50 J = 50 K = 50 L = 50 T = 5050 V = 5050 W = 5050 X = 5050 Y = 5050 k = 50 r = 50 t = 50 v = 5050 w = 5050 x = 5050 y = 5050 = 700 = 700

CONFIGURATION FILES Character protrusion 155

= 500 = 500 = 200 = 200 ( = 50 ) = 50 - = 700 textendash = 300 textemdash = 200 textquoteleft = 700 textquoteright = 700 textquotedblleft = 500 textquotedblright = 500

1581 Normal

The default settings always use the most moderate value5406 langcfg-trang5407 SetProtrusion5408 langm-trang [ name = default ]

We also create configuration files for the fonts

bull Bitstream Charter (NFSS code bch)

5409 langbchrang [ name = bch-default ]

bull Bitstream Letter Gothic (blg)

5410 langblgrang [ name = blg-default ]

bull Computer Modern Roman (cmr)

5411 langcmrrang [ name = cmr-default ]

bull EB Garamond

5412 langebgrang [ name = EBGaramond-default ]

bull Minion20 (pmnx pmnj)

5413 langpmnrang [ name = pmnj-default ]

bull Palatino (ppl pplx pplj)

5414 langpplrang [ name = ppl-default ]

bull Times (ptm ptmx ptmj)

5415 langptmrang [ name = ptm-default ]

bull URW Garamond (ugm)5416 langugmrang [ name = ugm-default ]5417 langm-t|cmr|pmnrang 5418 langbch|blg|ebg|ugmrang encoding = OT15419 langppl|ptmrang encoding = OT1OT45420 langbchrang family = bch 5421 langblgrang family = blg 5422 langebgrang family = EBGaramond-LFEBGaramond-OsFEBGaramond-TLFEBGaramond-TOsF 5423 langpplrang family = pplpplxpplj 5424 langptmrang family = ptmptmxptmj 5425 langugmrang family = ugm 5426 5427 langm-t|bch|blg|cmr|ebg|pmn|ppl|ptmrang A = 50505428 langugmrang A = 501005429 langebg|ptmrang AE = 50 5430 langugmrang AE = 150505431 langugmrang B = 505432 langbch|ebg|pmn|ugmrang C = 50

20 Contributed by Harald Harders and Karl Karlsson

CONFIGURATION FILES Character protrusion 156

5433 langbch|ebg|pmnrang D = 505434 langugmrang D = 705435 langugmrang E = 505436 langm-t|bch|cmr|ebg|pmn|ptmrang F = 505437 langugmrang F = 705438 langbch|ebg|pmnrang G = 50 5439 langugmrang G = 50505440 langblgrang I = 1501505441 langm-t|cmr|ebg|pmn|ppl|ptm|ugmrang J = 50 5442 langbch|blgrang J = 100 5443 langblgrang K = 505444 langblgrang K = 50 5445 langm-t|bch|cmr|ebg|pmn|pplrang L = 505446 langblgrang L = 1505447 langptmrang L = 805448 langugmrang L = 1205449 langbch|ebg|pmn|ugmrang O = 50505450 langebgrang OE = 50 5451 langugmrang OE = 50505452 langblgrang P = 1005453 langugmrang P = 505454 langbch|ebg|pmnrang Q = 50705455 langugmrang Q = 50505456 langbchrang R = 505457 langugmrang R = 705458 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang T = 50505459 langblgrang T = 1001005460 langugmrang T = 70705461 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang V = 50505462 langblg|ugmrang V = 70705463 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang W = 50505464 langugmrang W = 70705465 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang X = 50505466 langugmrang X = 50705467 langm-t|bch|cmr|ebg|pmn|pplrang Y = 50505468 langblg|ptm|ugmrang Y = 80805469 langugmrang Z = 50505470 langblgrang f = 1501005471 langblgrang i = 1501505472 langblgrang j = 1001005473 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang k = 505474 langugmrang k = 705475 langblgrang l = 1501505476 langpmnrang l = -505477 langebg|pplrang p = 50505478 langugmrang p = 505479 langebg|pplrang q = 50 5480 langblgrang r = 505481 langblgrang r = 100 805482 langcmr|ebg|pmnrang t = 705483 langbchrang t = 505484 langblgrang t = 150 805485 langugmrang t = 1005486 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang v = 50505487 langblgrang v = 1001005488 langugmrang v = 50705489 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang w = 50505490 langugmrang w = 50705491 langblgrang x = 50505492 langblgrang x = 1001005493 langm-t|bch|ebg|pmnrang y = 505494 langblgrang y = 501005495 langcmr|ppl|ptmrang y = 50705496 langugmrang y = 70

5497 langcmrrang 0 = 50

CONFIGURATION FILES Character protrusion 157

5498 langm-trang 1 = 50505499 langbch|blg|ebg|ptm|ugmrang 1 = 1501505500 langcmrrang 1 = 1002005501 langpmnrang 1 = 505502 langpplrang 1 = 1001005503 langbch|cmr|ebg|ugmrang 2 = 50505504 langblgrang 2 = 1005505 langbch|pmnrang 3 = 50 5506 langcmr|ebg|ugmrang 3 = 50505507 langblgrang 3 = 100 5508 langm-t|ebgrang 4 = 50505509 langbchrang 4 = 100505510 langblgrang 4 = 100 5511 langcmr|ugmrang 4 = 70705512 langpmnrang 4 = 50 5513 langptmrang 4 = 70 5514 langcmrrang 5 = 505515 langebgrang 5 = 50505516 langbchrang 6 = 50 5517 langcmrrang 6 = 505518 langebgrang 6 = 50505519 langm-trang 7 = 50505520 langbch|ebg|pmn|ugmrang 7 = 50805521 langblgrang 7 = 1001005522 langcmr|ptmrang 7 = 501005523 langpplrang 7 = 505524 langcmrrang 8 = 505525 langbch|ebgrang 9 = 50505526 langcmrrang 9 = 505527 langm-t|cmr|ebg|pmn|ppl|ptm|ugmrang = 7005528 langbchrang = 6005529 langblgrang = 4005005530 langblgrang = 5005531 langblgrang = 3004005532 langm-t|cmr|ebg|pmn|ppl|ptm|ugmrang = 5005533 langbchrang = 4005534 langblgrang = 3004005535 langm-t|bch|ebg|pmn|ptmrang = 3005536 langblgrang = 2003005537 langcmr|pplrang = 5005538 langugmrang = 4005539 langblgrang = 1005540 langblgrang = 2002005541 langm-t|ebg|pmn|ptmrang = 1005542 langbch|cmr|ppl|ugmrang = 2005543 langblgrang = 1501505544 langpmnrang = 3003005545 langm-t|bch|cmr|ebg|pmn|pplrang = 50505546 langptmrang = 1001005547 langm-t|bch|blg|cmr|ebg|pmn|ppl|ptmrang ~ = 2002505548 langugmrang ~ = 3003505549 langebg|ppl|ptmrang amp = 501005550 langugmrang amp = 1005551 langm-t|cmr|ebg|pmnrang = 50505552 langbchrang = 505553 langppl|ptmrang = 1001005554 langugmrang = 501005555 langblgrang = 1001005556 langm-t|ppl|ptm|ugmrang = 2002005557 langbch|pmnrang = 2003005558 langblgrang = 1502005559 langcmr|ebgrang = 3003005560 langm-t|cmr|ppl|ptmrang + = 2502505561 langbchrang + = 1502505562 langebgrang + = 300300

CONFIGURATION FILES Character protrusion 158

5563 langblg|pmnrang + = 1502005564 langugmrang + = 2503005565 langblg|ugmrang == 2002005566 langm-t|ebg|pmn|ptmrang ( = 100 ) = 2005567 langbch|ugmrang ( = 200 ) = 2005568 langcmr|blgrang ( = 300 ) = 3005569 langpplrang ( = 100 ) = 3005570 langbch|pmnrang [ = 100 ] = 1005571 langblgrang [ = 300100 ] = 300

5572 langm-t|ebg|pmn|ptmrang = 1002005573 langbchrang = 2005574 langblgrang = 3003005575 langcmr|pplrang = 2003005576 langugmrang = 1003005577 langm-t|ptmrang - = 5005005578 langbch|cmr|pplrang - = 4005005579 langblgrang - = 3004005580 langebgrang - = 3005005581 langpmnrang - = 2004005582 langugmrang - = 5006005583 langblgrang lt = 200100 gt = 1002005584 langblgrang _ = 1502505585 langblgrang | = 2502505586 langm-t|pmnrang textendash = 200200 textemdash = 1501505587 langbchrang textendash = 200300 textemdash = 1502505588 langcmrrang textendash = 400300 textemdash = 3002005589 langebg|ppl|ptmrang textendash = 300300 textemdash = 2002005590 langugmrang textendash = 250300 textemdash = 250250

Why settings for left and right quotes Because in some languages they might beused like that (see the csquotes package for examples)

5591 langm-t|bch|pmnrang textquoteleft = 300400 textquoteright = 3004005592 langblgrang textquoteleft = 400600 textquoteright = 4006005593 langcmrrang textquoteleft = 500700 textquoteright = 5006005594 langebg|pplrang textquoteleft = 500700 textquoteright = 5007005595 langptmrang textquoteleft = 500500 textquoteright = 3005005596 langugmrang textquoteleft = 300600 textquoteright = 3006005597 langm-t|bch|pmnrang textquotedblleft = 300300 textquotedblright = 3003005598 langblgrang textquotedblright = 3004005599 langcmrrang textquotedblleft = 500300 textquotedblright = 2006005600 langebg|ppl|ptmrang textquotedblleft = 300400 textquotedblright = 3004005601 langugmrang textquotedblleft = 400400 textquotedblright = 4004005602 5603

Greek uppercase letters are in OT1 encoding only5604 langm-t|cmr|pmnrang5605 SetProtrusion5606 langm-trang [ name = OT1-default5607 langcmrrang [ name = cmr-OT15608 langpmnrang [ name = pmnj-OT15609 langm-trang load = default ]5610 langcmrrang load = cmr-default ]5611 langpmnrang load = pmnj-default ]5612 langm-trang encoding = OT1 5613 langcmrrang encoding = OT1OT45614 langpmnrang encoding = OT15615 langcmrrang family = cmr 5616 langpmnrang family = pmnj 5617 5618 langm-t|cmrrang AE = 50 5619 langpmnrang OE = 50 5620 langcmrrang5621 00 = 150 Gamma

CONFIGURATION FILES Character protrusion 159

5622 01 = 100100 Delta5623 02 = 50 50 Theta5624 03 = 100100 Lambda5625 06 = 50 50 Sigma5626 07 = 100100 Upsilon5627 08 = 50 50 Phi5628 09 = 50 50 Psi

Remaining slots can be found in the source file5629 langcmrrang5630 56315632 langm-t|cmr|pmnrang

T1 and LY1 encodings contain some more characters The default list will be loadedfirst For XETEX (EU1) and LuaTEX (EU2) we simply use the T1 list as default (fornow)

5633 SetProtrusion5634 langm-trang [ name = T1-default5635 langbchrang [ name = bch-T15636 langblgrang [ name = blg-T15637 langcmrrang [ name = cmr-T15638 langebgrang [ name = EBGaramond-T15639 langpmnrang [ name = pmnj-T15640 langpplrang [ name = ppl-T15641 langptmrang [ name = ptm-T15642 langugmrang [ name = ugm-T15643 langm-trang load = default ]5644 langbchrang load = bch-default ]5645 langblgrang load = blg-default ]5646 langcmrrang load = cmr-default ]5647 langebgrang load = EBGaramond-default ]5648 langpmnrang load = pmnj-default ]5649 langpplrang load = ppl-default ]5650 langptmrang load = ptm-default ]5651 langugmrang load = ugm-default ]5652 langm-trang encoding = T1LY1EU1EU2TU 5653 langbch|cmr|ebg|pmn|pplrang encoding = T1LY15654 langblg|ptm|ugmrang encoding = T15655 langbchrang family = bch 5656 langblgrang family = blg 5657 langcmrrang family = cmr 5658 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF 5659 langpmnrang family = pmnj 5660 langpplrang family = pplpplxpplj 5661 langptmrang family = ptmptmxptmj 5662 langugmrang family = ugm 5663 5664 langm-t|cmrrang AE = 50 5665 langbch|pmnrang OE = 50 5666 langpmnrang TH = 505667 langblgrang v L = 2505668 langblgrang v d = 2505669 langblgrang v l = 2505670 langblgrang v t = 2505671 langblgrang 127 = 3004005672 langblgrang 156 = 100 IJ5673 langblgrang 188 = 80 80 ij5674 langm-t|bch|ebg|pmn|ppl|ptmrang _ = 1001005675 langcmrrang _ = 2002005676 langugmrang _ = 1002005677 langm-t|ebg|pmn|ptmrang textbackslash = 1002005678 langbchrang textbackslash = 1502005679 langblgrang textbackslash = 2503005680 langcmr|pplrang textbackslash = 200300

CONFIGURATION FILES Character protrusion 160

5681 langugmrang textbackslash = 1003005682 langugmrang textbar = 2002005683 langblgrang textendash = 300300 textemdash = 1501505684 langblgrang textquotedbl = 300400 textquotedblleft = 3004005685 langcmrrang textquotedbl = 300300 textquotedblleft = 200600

The EC fonts do something weird they insert an implicit kern between quote andboundary character Therefore we must override the settings from OT1

5686 langm-t|cmr|ebg|ppl|ptm|ugmrang quotesinglbase = 400400 quotedblbase = 4004005687 langblgrang quotesinglbase = 400400 quotedblbase = 3004005688 langbch|pmnrang quotesinglbase = 400400 quotedblbase = 3003005689 langm-t|bch|pmnrang guilsinglleft = 400300 guilsinglright = 3004005690 langblgrang guilsinglleft = 300500 guilsinglright = 3005005691 langcmr|ebg|ppl|ptmrang guilsinglleft = 400400 guilsinglright = 3005005692 langugmrang guilsinglleft = 400400 guilsinglright = 3006005693 langm-trang guillemotleft = 200200 guillemotright = 2002005694 langcmrrang guillemotleft = 300200 guillemotright = 1004005695 langbch|pmnrang guillemotleft = 200200 guillemotright = 1503005696 langblg|ebg|ppl|ptmrang guillemotleft = 300300 guillemotright = 2004005697 langugmrang guillemotleft = 300400 guillemotright = 3004005698 langm-t|bch|cmr|ebg|pmn|ppl|ugmrang textexclamdown = 100 textquestiondown = 100 5699 langblgrang textexclamdown = 200 textquestiondown = 100 5700 langptmrang textexclamdown = 200 textquestiondown = 200 5701 langm-t|cmr|ebg|ppl|ptm|ugmrang textbraceleft = 400200 textbraceright = 2004005702 langbch|blg|pmnrang textbraceleft = 200 textbraceright = 3005703 langm-t|bch|cmr|ebg|ppl|ptm|ugmrang textless = 200100 textgreater = 1002005704 langpmnrang textless = 100 textgreater = 1005705 langpmnrang textvisiblespace = 100100 not in LY1

5706 5707

The lmodern fonts used to restore the original settings from OT1 fonts Now theyrequire even other settings though

5708 langcmrrang5709 SetProtrusion5710 [ name = lmr-T15711 load = cmr-T1 ]5712 encoding = T1LY15713 family = lmr 5714 5715 textquotedblleft = 300400 textquotedblright = 3004005716 57175718 langcmrrang

Settings for the T2A encoding (generic Computer Modern Roman and Minion)21

5719 langm-t|cmr|pmnrang5720 SetProtrusion5721 langm-trang [ name = T2A-default5722 langcmrrang [ name = cmr-T2A5723 langpmnrang [ name = pmnj-T2A5724 langm-trang load = default ]5725 langcmrrang load = cmr-default ]5726 langpmnrang load = pmnj-default ]5727 encoding = T2A5728 langm-trang 5729 langcmrrang family = cmr 5730 langpmnrang family = pmnj 5731 5732 CYRA = 50505733 CYRG = 505734 CYRK = 50

21 Contributed by Karl Karlsson

CONFIGURATION FILES Character protrusion 161

5735 CYRT = 50505736 CYRH = 50505737 CYRU = 50505738 langpmnrang CYRS = 50 5739 langpmnrang CYRO = 50505740 cyrk = 505741 cyrg = 505742 cyrh = 50505743 langm-t|pmnrang cyru = 50505744 langcmrrang cyru = 50705745 langm-trang _ = 1001005746 langcmrrang _ = 2002005747 langm-trang textbackslash = 100200 quotedblbase = 4004005748 langcmrrang textbackslash = 200300 quotedblbase = 4004005749 langpmnrang textbackslash = 100200 quotedblbase = 3003005750 langcmrrang textquotedbl = 300300 textquotedblleft = 2006005751 langm-trang guillemotleft = 200200 guillemotright = 2002005752 langcmrrang guillemotleft = 300200 guillemotright = 1004005753 langpmnrang guillemotleft = 200200 guillemotright = 1503005754 langm-t|cmrrang textbraceleft = 400200 textbraceright = 2004005755 langpmnrang textbraceleft = 200 textbraceright = 3005756 langm-t|cmrrang textless = 200100 textgreater = 1002005757 langpmnrang textless = 100 textgreater = 1005758 57595760 langm-t|cmr|pmnrang

Settings for the QX encoding (generic and Times)22 It also includes some glyphsotherwise in TS1

5761 langm-t|ptmrang5762 SetProtrusion5763 langm-trang [ name = QX-default5764 langptmrang [ name = ptm-QX5765 langm-trang load = default ]5766 langptmrang load = ptm-default ]5767 langm-trang encoding = QX 5768 langptmrang encoding = QX5769 langptmrang family = ptmptmxptmj 5770 5771 AE = 50 5772 langptmrang = 2002005773 = = 1001005774 textunderscore = 1001005775 textbackslash = 1002005776 quotedblbase = 4004005777 langm-trang guillemotleft = 200200 guillemotright = 2002005778 langptmrang guillemotleft = 300300 guillemotright = 2004005779 textexclamdown = 100 textquestiondown = 100 5780 langm-trang textbraceleft = 400200 textbraceright = 2004005781 langptmrang textbraceleft = 200200 textbraceright = 2003005782 textless = 200100 textgreater = 1002005783 textminus = 200200 textdegree = 3003005784 langm-trang copyright = 100100 textregistered = 1001005785 langptmrang copyright = 100150 textregistered = 1001505786 langptmrang textxgeq = 100 textxleq = 100 5787 langptmrang textalpha = 50 textDelta = 70 705788 langptmrang textpi = 50 80 textSigma = 705789 langptmrang textmu = 80 texteuro = 50 505790 langptmrang textellipsis = 150200 textasciitilde = 80 805791 langptmrang textapprox = 50 50 textinfty = 1001005792 langptmrang textdagger = 150150 textdaggerdbl = 1001005793 langptmrang textdiv = 50150 textsection = 80 805794 langptmrang texttimes = 100150 textpm = 50 80

22 Contributed by Maciej Eder

CONFIGURATION FILES Character protrusion 162

5795 langptmrang textbullet = 150150 textperiodcentered = 3003005796 langptmrang textquotesingle = 500500 textquotedbl = 3003005797 langptmrang textperthousand = 505798 57995800 langm-t|ptmrang

T5 is based on OT1 it shares some but not all extra characters of T1 All accentedcharacters are already taken care of by the inheritance list

5801 langcmr|bchrang5802 SetProtrusion5803 langcmrrang [ name = cmr-T55804 langcmrrang load = cmr-default ]5805 langbchrang [ name = bch-T55806 langbchrang load = bch-default ]5807 encoding = T55808 langcmrrang family = cmr 5809 langbchrang family = bch 5810 5811 langbchrang _ = 1001005812 langbchrang textbackslash = 1502005813 langcmrrang textbackslash = 2003005814 langcmrrang textquotedblleft = 2006005815 langcmrrang textquotedbl = 3003005816 langbchrang quotesinglbase = 400400 quotedblbase = 3003005817 langcmrrang quotesinglbase = 400400 quotedblbase = 4004005818 langbchrang guilsinglleft = 400300 guilsinglright = 3004005819 langcmrrang guilsinglleft = 400400 guilsinglright = 3005005820 langbchrang guillemotleft = 200200 guillemotright = 1503005821 langcmrrang guillemotleft = 300200 guillemotright = 1004005822 langbchrang textbraceleft = 200 textbraceright = 3005823 langcmrrang textbraceleft = 400200 textbraceright = 2004005824 textless = 200100 textgreater = 1002005825 58265827 langcmr|bchrang

Minion with lining numbers5828 langpmnrang5829 SetProtrusion5830 [ name = pmnx-OT15831 load = pmnj-default ]5832 encoding = OT15833 family = pmnx 5834 5835 1 = 2301805836 58375838 SetProtrusion5839 [ name = pmnx-T15840 load = pmnj-T1 ]5841 encoding = T1LY15842 family = pmnx 5843 5844 1 = 2301805845 58465847 SetProtrusion5848 [ name = pmnx-T2A5849 load = pmnj-T2A ]5850 encoding = T2A5851 family = pmnx 5852 5853 1 = 2301805854

CONFIGURATION FILES Character protrusion 163

58555856 langpmnrang

Times is the default font for LY1 therefore we provide settings for the additionalcharacters in this encoding too

5857 langptmrang5858 SetProtrusion5859 [ name = ptm-LY15860 load = ptm-T1 ]5861 encoding = LY15862 family = ptmptmxptmj 5863 5864 _ = 1001005865 texttrademark = 1001005866 textregistered = 1001005867 textcopyright = 1001005868 textdegree = 3003005869 textminus = 2002005870 textellipsis = 1502005871 texteuro = 5872 textcent = 1001005873 textquotesingle = 5005005874 textflorin = 50 705875 textdagger = 1501505876 textdaggerdbl = 1001005877 textperthousand = 505878 textbullet = 1501505879 textonesuperior = 1001005880 texttwosuperior = 50 505881 textthreesuperior = 50 505882 textperiodcentered = 3003005883 textplusminus = 50 805884 textmultiply = 1001005885 textdivide = 50150

Remaining slots in the source file5886 58875888 langptmrang

1582 Italics

To find default settings for italic is difficult since the character shapes and theirbehaviour at the beginning or end of line may be wildly different for differentfonts In the generic settings we therefore omit the letters and only set up thepunctuation characters

The italic glyphs of Computer Modern Roman feature a lot of side bearingtherefore almost all of them have to protrude23

5889 SetProtrusion5890 langm-trang [ name = OT1-it ]5891 langbchrang [ name = bch-it ]5892 langblgrang [ name = blg-it5893 langblgrang load = blg-default ]5894 langcmrrang [ name = cmr-it ]5895 langebgrang [ name = EBGaramond-it ]5896 langpmnrang [ name = pmnj-it ]5897 langpplrang [ name = ppl-it ]5898 langptmrang [ name = ptm-it ]5899 langugmrang [ name = ugm-it ]5900 langm-t|bch|blg|ebg|ugmrang encoding = OT1

23 Settings contributed by Hendrik Vogt

CONFIGURATION FILES Character protrusion 164

5901 langppl|ptmrang encoding = OT1OT45902 langbchrang family = bch5903 langblgrang family = blg5904 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF5905 langpplrang family = pplpplxpplj5906 langptmrang family = ptmptmxptmj5907 langugmrang family = ugm5908 langm-t|bch|ebg|ppl|ptmrang shape = itsl 5909 langblg|ugmrang shape = it 5910 langcmr|pmnrang 5911 5912 langcmrrang A = 1001005913 langptmrang A = 100505914 langebg|pmnrang A = 50 5915 langugmrang A = 1505916 langpplrang A = 50505917 langptmrang AE = 100 5918 langebg|pplrang AE = 50 5919 langcmrrang B = 83-405920 langebg|ppl|ptmrang B = 50 5921 langpmnrang B = 20-505922 langbch|ppl|ptm|ugmrang C = 50 5923 langcmrrang C = 165-755924 langebgrang C = 100 5925 langpmnrang C = 50-505926 langcmrrang D = 75 -285927 langebg|ppl|ptmrang D = 50505928 langpmnrang D = 20 5929 langcmrrang E = 80-555930 langebg|ppl|ptmrang E = 50 5931 langpmnrang E = 20-505932 langcmrrang F = 85-805933 langebg|ptmrang F = 100 5934 langpmnrang F = 10 5935 langpplrang F = 50 5936 langbch|ppl|ptm|ugmrang G = 50 5937 langcmrrang G = 153-155938 langebgrang G = 100 5939 langpmnrang G = 50-505940 langcmrrang H = 73-605941 langebg|ppl|ptmrang H = 50 5942 langcmrrang I = 140-1205943 langebg|ptmrang I = 50 5944 langpmnrang I = 20-505945 langcmrrang J = 135-805946 langebgrang J = 50 5947 langpmnrang J = 20 5948 langptmrang J = 100 5949 langcmrrang K = 70-305950 langebg|ppl|ptmrang K = 50 5951 langpmnrang K = 20 5952 langcmrrang L = 87 405953 langebg|ppl|ptmrang L = 50 5954 langpmnrang L = 20505955 langugmrang L = 1005956 langcmrrang M = 67-455957 langpmnrang M = -305958 langptmrang M = 50 5959 langcmrrang N = 75-555960 langpmnrang N = -305961 langptmrang N = 50 5962 langbch|pmn|ppl|ptmrang O = 50 5963 langcmrrang O = 150-305964 langebgrang O = 100 5965 langugmrang O = 7050

CONFIGURATION FILES Character protrusion 165

5966 langppl|ptmrang OE = 50 5967 langebgrang OE = 100 5968 langcmrrang P = 82-505969 langebg|ppl|ptmrang P = 50 5970 langpmnrang P = 20-505971 langbch|pmn|ppl|ptmrang Q = 50 5972 langcmrrang Q = 150-305973 langebgrang Q = 100 5974 langugmrang Q = 70505975 langcmrrang R = 75 155976 langebg|ppl|ptmrang R = 50 5977 langpmnrang R = 20 5978 langbch|ebg|ppl|ptmrang S = 50 5979 langcmrrang S = 90-655980 langpmnrang S = 20-305981 langbch|ebg|ppl|ptmrang $ = 50 5982 langcmrrang $ = 100-205983 langpmnrang $ = 20-305984 langbch|pmn|ugmrang T = 70 5985 langcmrrang T = 220-855986 langebg|ppl|ptmrang T = 100 5987 langcmrrang U = 230-555988 langebg|ppl|ptmrang U = 50 5989 langpmnrang U = 50-505990 langcmrrang V = 260-605991 langebg|pmn|ugmrang V = 100 5992 langppl|ptmrang V = 100505993 langcmrrang W = 185-555994 langebg|pmn|ugmrang W = 100 5995 langpplrang W = 50 5996 langptmrang W = 100505997 langcmrrang X = 70-305998 langppl|ptmrang X = 50 5999 langcmrrang Y = 250-606000 langpmnrang Y = 50 6001 langpplrang Y = 100506002 langptmrang Y = 100 6003 langcmrrang Z = 90-606004 langpmnrang Z = -506005 langcmrrang a = 150-106006 langcmrrang b = 170 6007 langcmrrang c = 173-106008 langcmrrang d = 150-556009 langpmnrang d = -506010 langcmrrang e = 180 6011 langcmrrang f = -2506012 langebg|pmnrang f = -1006013 langcmrrang g = 150-106014 langcmrrang h = 100 6015 langcmrrang i = 210 6016 langpmnrang i = -306017 langcmrrang j = -406018 langpmnrang j = -306019 langcmrrang k = 110-506020 langcmrrang l = 240-1106021 langpmnrang l = -1006022 langcmrrang m = 80 6023 langcmrrang n = 115 6024 langbchrang o = 50506025 langcmrrang o = 155 6026 langbchrang p = 506027 langpmnrang p = -50 6028 langbchrang q = 50 6029 langcmrrang q = 170-406030 langcmrrang r = 155-40

CONFIGURATION FILES Character protrusion 166

6031 langpmnrang r = 506032 langcmrrang s = 130 6033 langbchrang t = 506034 langcmrrang t = 230-106035 langcmrrang u = 120 6036 langcmrrang v = 140-256037 langpmn|ugmrang v = 50 6038 langbchrang w = 506039 langcmrrang w = 98-206040 langpmn|ugmrang w = 50 6041 langcmrrang x = 65-406042 langbchrang y = 506043 langcmrrang y = 130-206044 langcmrrang z = 110-806045 langcmrrang 0 = 170-856046 langbch|ptmrang 1 = 1501006047 langcmrrang 1 = 2301106048 langebgrang 1 = 150 6049 langpmnrang 1 = 50 6050 langpplrang 1 = 100 6051 langugmrang 1 = 1501506052 langcmrrang 2 = 130-706053 langebg|ppl|ptmrang 2 = 50 6054 langpmnrang 2 = -50 6055 langbchrang 3 = 50 6056 langcmrrang 3 = 140-706057 langpmnrang 3 = -100 6058 langptmrang 3 = 100506059 langbchrang 4 = 100 6060 langcmrrang 4 = 130806061 langebgrang 4 = 150 6062 langppl|ptmrang 4 = 50 6063 langcmrrang 5 = 160 6064 langptmrang 5 = 50 6065 langbchrang 6 = 50 6066 langcmrrang 6 = 175-306067 langbch|ebg|ptmrang 7 = 100 6068 langcmrrang 7 = 250-1506069 langpmnrang 7 = 20 6070 langpplrang 7 = 50 6071 langcmrrang 8 = 130-406072 langcmrrang 9 = 155-806073 langm-t|cmr|ebg|pmn|pplrang = 5006074 langblgrang = 4006006075 langbch|ptm|ugmrang = 7006076 langblgrang = 3005006077 langm-t|ebg|pmn|pplrang = 5006078 langcmrrang = 4506079 langbch|ugmrang = 6006080 langptmrang = 7006081 langm-t|cmr|ebg|pplrang = 3006082 langbch|ugmrang = 4006083 langpmnrang = 2006084 langptmrang = 5006085 langm-t|cmr|ebg|pplrang = 3006086 langbch|ugmrang = 4006087 langpmnrang = 2006088 langptmrang = 5006089 langptmrang = 1006090 langbchrang = 2006091 langptmrang = 1006092 langpplrang = 3006093 langpmnrang = 4002006094 langm-t|ebg|pmn|ppl|ptmrang amp = 50506095 langbchrang amp = 80

CONFIGURATION FILES Character protrusion 167

6096 langcmrrang amp = 130306097 langugmrang amp = 501006098 langm-t|ebg|pmnrang = 100 6099 langcmrrang = 180506100 langbchrang = 50506101 langppl|ptmrang = 1001006102 langugmrang = 100506103 langm-t|pmn|pplrang = 2002006104 langbchrang = 3002006105 langcmrrang = 380206106 langebgrang = 5001006107 langptm|ugmrang = 4002006108 langm-t|pmn|pplrang + = 1502006109 langcmrrang + = 1802006110 langbch|ugmrang + = 2502506111 langebg|ptmrang + = 2502006112 langm-t|ebg|pmn|pplrang = 50506113 langbchrang = 80506114 langcmrrang = 180106115 langptmrang = 1501506116 langm-t|bch|ugmrang ~ = 1501506117 langcmr|ebg|pmn|ppl|ptmrang ~ = 2001506118 langugmrang == 2002006119 langm-t|bch|ebg|pmn|ppl|ptm|ugmrang ( = 200 ) = 2006120 langcmrrang ( = 300 ) = 706121 langm-t|ebg|ppl|ptm|ugmrang = 1002006122 langcmrrang = 1001006123 langbchrang = 1506124 langpmnrang = 1001506125 langm-trang - = 3003006126 langbch|ebgrang - = 3004006127 langpmnrang - = 2003006128 langcmrrang - = 5003006129 langpplrang - = 3005006130 langptmrang - = 5005006131 langugmrang - = 4007006132 langblgrang _ = 03006133 langm-t|pmnrang textendash = 200200 textemdash = 1501506134 langbchrang textendash = 200300 textemdash = 1502006135 langcmrrang textendash = 500300 textemdash = 4001706136 langebg|ppl|ptm|ugmrang textendash = 300300 textemdash = 2002006137 langm-t|bch|pmn|ugmrang textquoteleft = 400200 textquoteright = 4002006138 langblgrang textquoteleft = 400400 textquoteright = 4004006139 langcmrrang textquoteleft = 800200 textquoteright = 800-206140 langebgrang textquoteleft = 800200 textquoteright = 8002006141 langpplrang textquoteleft = 700400 textquoteright = 7004006142 langptmrang textquoteleft = 800500 textquoteright = 8005006143 langm-t|bch|pmnrang textquotedblleft = 400200 textquotedblright = 4002006144 langblgrang textquotedblright = 3003006145 langcmrrang textquotedblleft = 540100 textquotedblright = 5001006146 langebgrang textquotedblleft = 700200 textquotedblright = 7002006147 langpplrang textquotedblleft = 500300 textquotedblright = 5003006148 langptmrang textquotedblleft = 700400 textquotedblright = 7004006149 langugmrang textquotedblleft = 600200 textquotedblright = 6002006150 61516152 langcmr|pmnrang6153 SetProtrusion6154 langcmrrang [ name = cmr-it-OT16155 langpmnrang [ name = pmnj-it-OT16156 langcmrrang load = cmr-it ]6157 langpmnrang load = pmnj-it ]6158 langcmrrang encoding = OT1OT46159 langpmnrang encoding = OT16160 langcmrrang family = cmr

CONFIGURATION FILES Character protrusion 168

6161 langpmnrang family = pmnj6162 langcmrrang shape = it 6163 langpmnrang shape = itsl 6164 6165 langcmrrang AE = 100 6166 langpmnrang AE = -506167 langcmrrang OE = 100 6168 langpmnrang OE = 50 6169 langcmrrang6170 00 = 200150 Gamma6171 01 = 150100 Delta6172 02 = 150 50 Theta6173 03 = 150 50 Lambda6174 04 = 100100 Xi6175 05 = 100100 Pi6176 06 = 100 50 Sigma6177 07 = 200150 Upsilon6178 08 = 150 50 Phi6179 09 = 150100 Psi6180 0A = 50 50 Omega6181 langcmrrang6182 61836184 langcmr|pmnrang6185 SetProtrusion6186 langm-trang [ name = T1-it-default6187 langbchrang [ name = bch-it-T16188 langblgrang [ name = blg-it-T16189 langcmrrang [ name = cmr-it-T16190 langebgrang [ name = EBGaramond-it-T16191 langpmnrang [ name = pmnj-it-T16192 langpplrang [ name = ppl-it-T16193 langptmrang [ name = ptm-it-T16194 langugmrang [ name = ugm-it-T16195 langm-trang load = OT1-it ]6196 langbchrang load = bch-it ]6197 langblgrang load = blg-T1 ]6198 langcmrrang load = cmr-it ]6199 langpmnrang load = pmnj-it ]6200 langebgrang load = EBGaramond-it ]6201 langpplrang load = ppl-it ]6202 langptmrang load = ptm-it ]6203 langugmrang load = ugm-it ]6204 langm-t|bch|cmr|ebg|pmn|pplrang encoding = T1LY16205 langblg|ptm|ugmrang encoding = T16206 langbchrang family = bch6207 langblgrang family = blg6208 langcmrrang family = cmr6209 langpmnrang family = pmnj6210 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF6211 langpplrang family = pplpplxpplj6212 langptmrang family = ptmptmxptmj6213 langugmrang family = ugm6214 langm-t|bch|ebg|pmn|ppl|ptmrang shape = itsl 6215 langblg|cmr|ugmrang shape = it 6216 6217 langm-t|bch|pmnrang _ = 1006218 langblgrang _ = 03006219 langcmr|ugmrang _ = 1002006220 langebg|ppl|ptmrang _ = 1001006221 langblgrang = 4006006222 langblgrang = 3005006223 langcmrrang AE = 100 6224 langpmnrang AE = -506225 langbch|pmnrang OE = 50

CONFIGURATION FILES Character protrusion 169

6226 langcmrrang OE = 100 6227 langpmnrang 031 = -100 ffl6228 langcmr|ptmrang 156 = 100 IJ6229 langebgrang 156 = 50 IJ6230 langpmnrang 156 = 20 IJ6231 langpmnrang 188 = -30 ij6232 langpmnrang v t = 1006233 langm-t|ebg|ppl|ptmrang textbackslash = 1002006234 langcmr|ugmrang textbackslash = 3003006235 langbchrang textbackslash = 1501506236 langpmnrang textbackslash = 1001506237 langugmrang textbar = 2002006238 langcmrrang textquotedblleft = 5003006239 langblgrang textquoteleft = 400400 textquoteright = 4004006240 langblgrang textquotedbl = 300300 textquotedblleft = 3003006241 langblgrang textquotedblright = 300300 quotedblbase = 2006006242 langm-t|ptmrang quotesinglbase = 300700 quotedblbase = 4005006243 langcmrrang quotesinglbase = 300700 quotedblbase = 2006006244 langbch|pmnrang quotesinglbase = 200500 quotedblbase = 1505006245 langebg|pplrang quotesinglbase = 500500 quotedblbase = 4004006246 langugmrang quotesinglbase = 300700 quotedblbase = 3005006247 langm-t|ppl|ptmrang guilsinglleft = 400400 guilsinglright = 3005006248 langbch|pmnrang guilsinglleft = 300400 guilsinglright = 2005006249 langcmrrang guilsinglleft = 500300 guilsinglright = 4004006250 langebgrang guilsinglleft = 500400 guilsinglright = 3005006251 langugmrang guilsinglleft = 400400 guilsinglright = 3006006252 langm-t|pplrang guillemotleft = 300300 guillemotright = 3003006253 langbch|pmnrang guillemotleft = 200300 guillemotright = 1504006254 langcmrrang guillemotleft = 400100 guillemotright = 2003006255 langebgrang guillemotleft = 300300 guillemotright = 2004006256 langptmrang guillemotleft = 300400 guillemotright = 2004006257 langugmrang guillemotleft = 300400 guillemotright = 3004006258 langm-t|ebg|ppl|ugmrang textexclamdown = 100 textquestiondown = 200 6259 langcmr|ptmrang textexclamdown = 200 textquestiondown = 200 6260 langpmnrang textexclamdown = -50 textquestiondown = -50 6261 langm-t|ppl|ugmrang textbraceleft = 200100 textbraceright = 2002006262 langbch|pmnrang textbraceleft = 200 textbraceright = 2006263 langcmr|ebg|ptmrang textbraceleft = 400100 textbraceright = 2002006264 langbch|pmnrang textless = 100 textgreater = 1006265 langcmr|ebg|ppl|ptmrang textless = 300100 textgreater = 2001006266 langpmnrang textvisiblespace = 1001006267 62686269 langm-t|cmr|pmnrang6270 SetProtrusion6271 langm-trang [ name = T2A-it-default6272 langcmrrang [ name = cmr-it-T2A6273 langpmnrang [ name = pmnj-it-T2A6274 langm-trang load = OT1-it ]6275 langcmrrang load = cmr-it ]6276 langpmnrang load = pmnj-it ]6277 encoding = T2A6278 langcmrrang family = cmr6279 langpmnrang family = pmnj6280 langm-t|pmnrang shape = itsl 6281 langcmrrang shape = it 6282 6283 langcmrrang CYRA = 100506284 langpmnrang CYRA = 50 6285 langcmrrang CYRB = 50 6286 langcmrrang CYRV = 50 6287 langpmnrang CYRV = 20-506288 langcmrrang CYRG = 100 6289 langpmnrang CYRG = 10 6290 langcmrrang CYRD = 50

CONFIGURATION FILES Character protrusion 170

6291 langcmrrang CYRE = 50 6292 langpmnrang CYRE = 20-506293 langcmrrang CYRZH = 50 6294 langcmrrang CYRZ = 50 6295 langpmnrang CYRZ = 20-506296 langcmrrang CYRI = 50 6297 langpmnrang CYRI = -306298 langcmrrang CYRISHRT = 50 6299 langcmrrang CYRK = 50 6300 langpmnrang CYRK = 20 6301 langcmrrang CYRL = 50 6302 langcmrrang CYRM = 50 6303 langpmnrang CYRM = -306304 langcmrrang CYRN = 50 6305 langcmrrang CYRO = 100 6306 langpmnrang CYRO = 50 6307 langcmrrang CYRP = 50 6308 langcmrrang CYRR = 50 6309 langpmnrang CYRR = 20-506310 langcmrrang CYRS = 100 6311 langpmnrang CYRS = 50 6312 langcmrrang CYRT = 100 6313 langpmnrang CYRT = 70 6314 langcmrrang CYRU = 100 6315 langpmnrang CYRU = 50 6316 langcmrrang CYRF = 100 6317 langcmrrang CYRH = 50 6318 langcmrrang CYRC = 50 6319 langcmrrang CYRCH = 100 6320 langcmrrang CYRSH = 50 6321 langcmrrang CYRSHCH = 50 6322 langcmrrang CYRHRDSN = 100 6323 langcmrrang CYRERY = 50 6324 langcmrrang CYRSFTSN = 50 6325 langcmrrang CYREREV = 50 6326 langcmrrang CYRYU = 50 6327 langcmrrang CYRYA = 50 6328 langpmnrang CYRYA = 206329 langpmnrang cyrr = -50 6330 langm-t|pmnrang _ = 1006331 langcmrrang _ = 1002006332 langpmnrang 031 = -100 ffl6333 langpmnrang v t = 1006334 langm-trang textbackslash = 100200 quotedblbase = 4005006335 langcmrrang textbackslash = 300300 quotedblbase = 2006006336 langpmnrang textbackslash = 100150 quotedblbase = 1505006337 langm-trang guillemotleft = 300300 guillemotright = 3003006338 langcmrrang guillemotleft = 400100 guillemotright = 2003006339 langpmnrang guillemotleft = 200300 guillemotright = 1504006340 langm-trang textbraceleft = 200100 textbraceright = 2002006341 langcmrrang textbraceleft = 400100 textbraceright = 2002006342 langpmnrang textbraceleft = 200 textbraceright = 2006343 langcmrrang textquotedblleft = 5003006344 langcmrrang textless = 300100 textgreater = 2001006345 langpmnrang textless = 100 textgreater = 1006346 63476348 langm-t|cmr|pmnrang6349 langm-t|ptmrang6350 SetProtrusion6351 langm-trang [ name = QX-it-default6352 langptmrang [ name = ptm-it-QX6353 langm-trang load = OT1-it ]6354 langptmrang load = ptm-it ]6355 encoding = QX

CONFIGURATION FILES Character protrusion 171

6356 langptmrang family = ptmptmxptmj6357 shape = itsl 6358 6359 langptmrang 009 = 50 fk6360 = = 1001006361 langm-trang textunderscore = 1001006362 langptmrang textunderscore = 1001506363 textbackslash = 1002006364 quotedblbase = 3004006365 langm-trang guillemotleft = 300300 guillemotright = 3003006366 langptmrang guillemotleft = 200400 guillemotright = 2004006367 textexclamdown = 200 textquestiondown = 200 6368 textbraceleft = 200100 textbraceright = 2002006369 textless = 100100 textgreater = 1001006370 textminus = 200200 textdegree = 3001506371 langm-trang copyright = 100100 textregistered = 1001006372 langptmrang textregistered = 100150 copyright = 1001506373 langptmrang textDelta = 70 textdelta = 506374 langptmrang textpi = 50 80 textmu = 806375 langptmrang texteuro = 200 textellipsis = 1002006376 langptmrang textquoteleft = 500400 textquoteright = 5004006377 langptmrang textquotedblleft = 500300 textquotedblright = 4004006378 langptmrang textapprox = 50 50 textinfty = 1001006379 langptmrang textdagger = 150150 textdaggerdbl = 1001006380 langptmrang textdiv = 150150 textasciitilde = 80 806381 langptmrang texttimes = 100150 textpm = 50 806382 langptmrang textbullet = 300100 textperiodcentered = 3003006383 langptmrang textquotesingle = 500500 textquotedbl = 3003006384 langptmrang textperthousand = 506385 63866387 langm-t|ptmrang6388 langcmr|bchrang6389 SetProtrusion6390 langcmrrang [ name = cmr-it-T56391 langcmrrang load = cmr-it ]6392 langbchrang [ name = bch-it-T56393 langbchrang load = bch-it ]6394 encoding = T56395 langbchrang family = bch6396 langcmrrang family = cmr6397 shape = it 6398 6399 langbchrang _ = 1006400 langcmrrang _ = 1002006401 langbchrang textbackslash = 1501506402 langcmrrang textbackslash = 3003006403 langbchrang quotesinglbase = 200500 quotedblbase = 1505006404 langcmrrang quotesinglbase = 300700 quotedblbase = 2006006405 langbchrang guilsinglleft = 300400 guilsinglright = 2005006406 langcmrrang guilsinglleft = 500300 guilsinglright = 4004006407 langbchrang guillemotleft = 200300 guillemotright = 1504006408 langcmrrang guillemotleft = 400100 guillemotright = 2003006409 langbchrang textbraceleft = 200 textbraceright = 2006410 langcmrrang textbraceleft = 400100 textbraceright = 2002006411 langbchrang textless = 100 textgreater = 1006412 langcmrrang textless = 300100 textgreater = 2001006413 64146415 langcmr|bchrang

Slanted is very similar to italic6416 langcmrrang6417 SetProtrusion6418 [ name = cmr-sl

CONFIGURATION FILES Character protrusion 172

6419 load = cmr-it-OT1 ]6420 encoding = OT1OT46421 family = cmr6422 shape = sl 6423 6424 L = 506425 f = -506426 - = 300 6427 textendash = 400 textemdash = 300 6428 64296430 SetProtrusion6431 [ name = cmr-sl-T16432 load = cmr-it-T1 ]6433 encoding = T1LY16434 family = cmr6435 shape = sl 6436 6437 L = 506438 f = -506439 - = 300 6440 textendash = 400 textemdash = 300 6441 64426443 SetProtrusion6444 [ name = cmr-sl-T2A6445 load = cmr-it-T2A ]6446 encoding = T2A6447 family = cmr6448 shape = sl 6449 6450 L = 506451 f = -506452 - = 300 6453 textendash = 400 textemdash = 300 6454 64556456 SetProtrusion6457 [ name = cmr-sl-T56458 load = cmr-it-T5 ]6459 encoding = T56460 family = cmr6461 shape = sl 6462 6463 L = 506464 f = -506465 - = 300 6466 textendash = 400 textemdash = 300 6467 64686469 SetProtrusion6470 [ name = lmr-it-T16471 load = cmr-it-T1 ]6472 encoding = T1LY16473 family = lmr6474 shape = itsl 6475 6476 textquotedblleft = 200 textquotedblright = 2006477 quotesinglbase = 400 quotedblbase = 5006478 6479

Oldstyle numerals are slightly different6480 SetProtrusion6481 [ name = cmr(oldstyle)-it

CONFIGURATION FILES Character protrusion 173

6482 load = cmr-it-T1 ]6483 encoding = T16484 family = hforcmor6485 shape = itsl 6486 6487 1 = 250 506488 2 = 150-1006489 3 = 100-506490 4 = 1501506491 6 = 200 6492 7 = 200 506493 8 = 150-506494 9 = 100 506495 64966497 langcmrrang6498 langpmnrang6499 SetProtrusion6500 [ name = pmnx-it6501 load = pmnj-it ]6502 encoding = OT16503 family = pmnx6504 shape = itsl 6505 6506 1 = 1001506507 65086509 SetProtrusion6510 [ name = pmnx-it-T16511 load = pmnj-it-T1 ]6512 encoding = T1LY16513 family = pmnx6514 shape = itsl 6515 6516 1 = 1001506517 65186519 SetProtrusion6520 [ name = pmnx-it-T2A6521 load = pmnj-it-T2A ]6522 encoding = T2A6523 family = pmnx6524 shape = itsl 6525 6526 1 = 1001506527 65286529 langpmnrang6530 langptmrang6531 SetProtrusion6532 [ name = ptm-it-LY16533 load = ptm-it-T1 ]6534 encoding = LY16535 family = ptmptmxptmj6536 shape = itsl 6537 6538 _ = 1001006539 texttrademark = 1001006540 textregistered = 1001006541 textcopyright = 1001006542 textdegree = 3001006543 textminus = 2002006544 textellipsis = 1002006545 texteuro = 6546 textcent = 100100

CONFIGURATION FILES Character protrusion 174

6547 textquotesingle = 500 6548 textflorin = 100 706549 textdagger = 1501506550 textdaggerdbl = 1001006551 textbullet = 1501506552 textonesuperior = 1501006553 texttwosuperior = 150 506554 textthreesuperior = 150 506555 textparagraph = 100 6556 textperiodcentered = 5003006557 textonequarter = 50 6558 textonehalf = 50 6559 textplusminus = 1001006560 textmultiply = 1501506561 textdivide = 1501506562 65636564 langptmrang

1583 Small caps

Small caps should inherit the values from their big brothers Since values arerelative to character width we donrsquot need to adjust them any further (but we haveto reset some characters)

6565 lang(blg|ugm)rang6566 SetProtrusion6567 langm-trang [ name = OT1-sc6568 langbchrang [ name = bch-sc6569 langcmrrang [ name = cmr-sc-OT16570 langebgrang [ name = EBGaramond-sc6571 langpmnrang [ name = pmnj-sc6572 langpplrang [ name = ppl-sc6573 langptmrang [ name = ptm-sc6574 langm-trang load = default ]6575 langbchrang load = bch-default ]6576 langcmrrang load = cmr-OT1 ]6577 langebgrang load = EBGaramond-default ]6578 langpmnrang load = pmnj-default ]6579 langpplrang load = ppl-default ]6580 langptmrang load = ptm-default ]6581 langm-t|bch|ebg|pmnrang encoding = OT16582 langcmr|ppl|ptmrang encoding = OT1OT46583 langbchrang family = bch6584 langcmrrang family = cmr6585 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF6586 langpmnrang family = pmnj6587 langpplrang family = pplpplxpplj6588 langptmrang family = ptmptmxptmj6589 shape = sc 6590 6591 a = 50506592 langcmr|ebg|ppl|ptmrang ae = 50 6593 langbch|pmnrang c = 50 6594 langbch|ebg|pmnrang d = 506595 langm-t|bch|cmr|ebg|pmn|ptmrang f = 506596 langbch|ebg|pmnrang g = 50 6597 langm-t|cmr|ebg|pmn|ppl|ptmrang j = 50 6598 langbchrang j = 100 6599 langm-t|bch|cmr|ebg|pmn|pplrang l = 506600 langptmrang l = 806601 langm-t|bch|cmr|ebg|pmn|pplrang 013 = 50 fl6602 langptmrang 013 = 80 fl6603 langbch|ebg|pmnrang o = 5050

CONFIGURATION FILES Character protrusion 175

6604 langebg|pmnrang oe = 50 6605 langpplrang p = 0 06606 langbch|ebg|pmnrang q = 50706607 langpplrang q = 0 6608 langm-t|cmr|ebg|pmn|ppl|ptmrang r = 06609 t = 50506610 langm-t|bch|cmr|ebg|pmn|pplrang y = 50506611 langptmrang y = 80806612 66136614 SetProtrusion6615 langm-trang [ name = T1-sc6616 langbchrang [ name = bch-sc-T16617 langcmrrang [ name = cmr-sc-T16618 langebgrang [ name = EBGaramond-sc-T16619 langpmnrang [ name = pmnj-sc-T16620 langpplrang [ name = ppl-sc-T16621 langptmrang [ name = ptm-sc-T16622 langm-trang load = T1-default ]6623 langbchrang load = bch-T1 ]6624 langcmrrang load = cmr-T1 ]6625 langebgrang load = EBGaramond-T1 ]6626 langpmnrang load = pmnj-T1 ]6627 langpplrang load = ppl-T1 ]6628 langptmrang load = ptm-T1 ]6629 encoding = T1LY16630 langbchrang family = bch6631 langcmrrang family = cmr6632 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF6633 langpmnrang family = pmnj6634 langpplrang family = pplpplxpplj6635 langptmrang family = ptmptmxptmj6636 shape = sc 6637 6638 a = 50506639 langcmr|ebg|ppl|ptmrang ae = 50 6640 langbch|pmnrang c = 50 6641 langbch|ebg|pmnrang d = 506642 langm-t|bch|cmr|ebg|pmn|ptmrang f = 506643 langbch|ebg|pmnrang g = 50 6644 langm-t|cmr|ebg|pmn|ppl|ptmrang j = 50 6645 langbchrang j = 100 6646 langm-t|bch|cmr|ebg|pmn|pplrang l = 506647 langptmrang l = 806648 langm-t|bch|cmr|ebg|pmn|pplrang 029 = 50 fl6649 langptmrang 029 = 80 fl6650 langbch|ebg|pmnrang o = 50506651 langbch|ebg|pmnrang oe = 50 6652 langpplrang p = 0 06653 langbch|ebg|pmnrang q = 50706654 langpplrang q = 0 6655 langm-t|cmr|ebg|pmn|ppl|ptmrang r = 06656 t = 50506657 langm-t|bch|cmr|ebg|pmn|pplrang y = 50506658 langptmrang y = 80806659 66606661 lang(blg|ugm)rang6662 langm-t|cmrrang6663 SetProtrusion6664 langm-trang [ name = T2A-sc6665 langcmrrang [ name = cmr-sc-T2A6666 langm-trang load = T2A-default ]6667 langcmrrang load = cmr-T2A ]6668 encoding = T2A

CONFIGURATION FILES Character protrusion 176

6669 langcmrrang family = cmr6670 shape = sc 6671 6672 cyra = 50506673 cyrg = 506674 cyrt = 50506675 cyry = 506676 66776678 langm-t|cmrrang6679 langm-trang6680 SetProtrusion6681 [ name = QX-sc6682 load = QX-default ]6683 encoding = QX6684 shape = sc 6685 6686 a = 50506687 f = 506688 j = 50 6689 l = 506690 013 = 50 fl6691 r = 06692 t = 50506693 y = 50506694 66956696 langm-trang6697 langcmr|bchrang6698 SetProtrusion6699 langbchrang [ name = bch-sc-T56700 langbchrang load = bch-T5 ]6701 langcmrrang [ name = cmr-sc-T56702 langcmrrang load = cmr-T5 ]6703 encoding = T56704 langbchrang family = bch6705 langcmrrang family = cmr6706 shape = sc 6707 6708 a = 50506709 langbchrang c = 50 6710 langbchrang d = 506711 f = 506712 langbchrang g = 50 6713 langbchrang j = 100 6714 langcmrrang j = 50 6715 l = 506716 langbchrang o = 50506717 langbchrang q = 0 6718 langcmrrang r = 06719 t = 50506720 y = 50506721 67226723 langcmr|bchrang6724 langpmnrang6725 SetProtrusion6726 [ name = pmnx-sc6727 load = pmnj-sc ]6728 encoding = OT16729 family = pmnx6730 shape = sc 6731 6732 1 = 2301806733

CONFIGURATION FILES Character protrusion 177

67346735 SetProtrusion6736 [ name = pmnx-sc-T16737 load = pmnj-sc-T1 ]6738 encoding = T1LY16739 family = pmnx6740 shape = sc 6741 6742 1 = 2301806743 6744

1584 Italic small caps

Minion provides real small caps in italics The slantsc package calls them scitPhilipp Lehmanrsquos fontinstallationguide suggests si

6745 SetProtrusion6746 [ name = pmnj-scit6747 load = pmnj-it ]6748 encoding = OT16749 family = pmnj6750 shape = scitsi 6751 6752 a = 50 6753 ae = -506754 b = 20-506755 c = 50-506756 d = 20 06757 e = 20-506758 f = 10 06759 012 = 10-50 fi6760 013 = 10-50 fl6761 014 = 10-50 ffi6762 015 = 10-50 ffl6763 g = 50-506764 i = 20-506765 j = 20 06766 k = 20 6767 l = 20506768 m = -306769 n = -306770 o = 50 6771 oe = 50-506772 p = 20-506773 q = 50 6774 r = 20 06775 s = 20-306776 t = 70 6777 u = 50-506778 v = 100 6779 w = 100 6780 y = 50 6781 z = -506782 67836784 SetProtrusion6785 [ name = pmnj-scit-T16786 load = pmnj-it-T1 ]6787 encoding = T1LY16788 family = pmnj6789 shape = scitsi 6790 6791 a = 50 6792 ae = -50

CONFIGURATION FILES Character protrusion 178

6793 b = 20-506794 c = 50-506795 d = 20 06796 e = 20-506797 f = 10 06798 028 = 10-50 fi6799 029 = 10-50 fl6800 030 = 10-50 ffi6801 031 = 10-50 ffl6802 g = 50-506803 i = 20-506804 188 = 20 0 ij6805 j = 20 06806 k = 20 6807 l = 20506808 m = -306809 n = -306810 o = 50 6811 oe = 50-506812 p = 20-506813 q = 50 6814 r = 20 06815 s = 20-306816 t = 70 6817 u = 50-506818 v = 100 6819 w = 100 6820 y = 50 6821 z = -506822 68236824 SetProtrusion6825 [ name = pmnx-scit6826 load = pmnj-scit ]6827 encoding = OT16828 family = pmnx6829 shape = scitsi 6830 6831 1 = 1001506832 68336834 SetProtrusion6835 [ name = pmnx-scit-T16836 load = pmnj-scit-T1 ]6837 encoding = T1LY16838 family = pmnx6839 shape = scitsi 6840 6841 1 = 1001506842 68436844 langpmnrang

1585 Text companion

Finally the TS1 encoding Still quite incomplete for Times and especially PalatinoAnybody

6845 SetProtrusion6846 langm-trang [ name = textcomp ]6847 langbchrang [ name = bch-textcomp ]6848 langblgrang [ name = blg-textcomp ]6849 langcmrrang [ name = cmr-textcomp ]6850 langebgrang [ name = EBGaramond-textcomp ]6851 langpmnrang [ name = pmn-textcomp ]

CONFIGURATION FILES Character protrusion 179

6852 langpplrang [ name = ppl-textcomp ]6853 langptmrang [ name = ptm-textcomp ]6854 langugmrang [ name = ugm-textcomp ]6855 langm-trang encoding = TS1 6856 langm-trang encoding = TS16857 langbchrang family = bch 6858 langblgrang family = blg 6859 langcmrrang family = cmr 6860 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF 6861 langpmnrang family = pmnxpmnj 6862 langpplrang family = pplpplxpplj 6863 langptmrang family = ptmptmxptmj 6864 langugmrang family = ugm 6865 6866 langblgrang textquotestraightbase = 4005006867 langcmrrang textquotestraightbase = 3003006868 langebg|pmnrang textquotestraightbase = 4004006869 langblgrang textquotestraightdblbase = 3004006870 langcmr|pmnrang textquotestraightdblbase = 3003006871 langebgrang textquotestraightdblbase = 4004006872 langbch|cmr|ebg|pmn|ugmrang texttwelveudash = 2002006873 langbch|cmr|ebg|pmnrang textthreequartersemdash = 1501506874 langugmrang textthreequartersemdash = 2002006875 langblgrang textquotesingle = 5006006876 langcmr|pmnrang textquotesingle = 3004006877 langebgrang textquotesingle = 4005006878 langptmrang textquotesingle = 5005006879 langugmrang textquotesingle = 3005006880 langbch|cmr|pmnrang textasteriskcentered = 2003006881 langblgrang textasteriskcentered = 1502006882 langebgrang textasteriskcentered = 3003006883 langugmrang textasteriskcentered = 1002006884 langpmnrang textfractionsolidus = -200-2006885 langcmrrang textoneoldstyle = 1001006886 langpmnrang textoneoldstyle = 506887 langcmrrang textthreeoldstyle = 506888 langebg|pmnrang textthreeoldstyle = 50 6889 langcmrrang textfouroldstyle = 50 506890 langebg|pmnrang textfouroldstyle = 50 6891 langcmr|ebg|pmnrang textsevenoldstyle = 50 806892 langcmrrang textlangle = 400 6893 langcmrrang textrangle = 4006894 langm-t|bch|pmn|ptmrang textminus = 2002006895 langcmr|ebg|pplrang textminus = 3003006896 langblg|ugmrang textminus = 2503006897 langbch|ebg|pmnrang textlbrackdbl = 100 6898 langblgrang textlbrackdbl = 200 6899 langbch|ebg|pmnrang textrbrackdbl = 1006900 langblgrang textrbrackdbl = 2006901 langpmnrang textasciigrave = 2005006902 langbch|blg|cmr|ebg|pmnrang texttildelow = 2002506903 langpmnrang textasciibreve = 3004006904 langpmnrang textasciicaron = 3004006905 langpmnrang textacutedbl = 2003006906 langpmnrang textgravedbl = 1503006907 langbch|pmn|ugmrang textdagger = 80 806908 langblgrang textdagger = 2002006909 langcmr|ebgrang textdagger = 1001006910 langptmrang textdagger = 1501506911 langblgrang textdaggerdbl = 1501506912 langcmr|ebg|pmnrang textdaggerdbl = 80 806913 langptmrang textdaggerdbl = 1001006914 langbchrang textbardbl = 1001006915 langblg|ugmrang textbardbl = 1501506916 langbchrang textbullet = 200200

CONFIGURATION FILES Character protrusion 180

6917 langblgrang textbullet = 4005006918 langcmr|ebg|pmnrang textbullet = 1006919 langptmrang textbullet = 1501506920 langugmrang textbullet = 501006921 langbch|cmr|pmnrang textcelsius = 50 6922 langebgrang textcelsius = 80 6923 langbchrang textflorin = 50 506924 langblgrang textflorin = 1001006925 langebg|ugmrang textflorin = 1006926 langpmnrang textflorin = 501006927 langptmrang textflorin = 50 706928 langcmrrang textcolonmonetary = 506929 langebg|pmnrang textcolonmonetary = 50 6930 langpmnrang textinterrobang = 1006931 langpmnrang textinterrobangdown = 100 6932 langm-t|ebg|ptmrang texttrademark = 1001006933 langbchrang texttrademark = 1501506934 langblg|cmr|pplrang texttrademark = 2002006935 langpmnrang texttrademark = 50 506936 langugmrang texttrademark = 1001506937 langbch|ugmrang textcent = 50 6938 langptmrang textcent = 1001006939 langbchrang textsterling = 50 6940 langugmrang textsterling = 506941 langbchrang textbrokenbar = 2002006942 langblgrang textbrokenbar = 2502506943 langugmrang textbrokenbar = 2003006944 langpmnrang textasciidieresis = 3004006945 langm-t|bch|cmr|ebg|ptm|ugmrang textcopyright = 1001006946 langpmnrang textcopyright = 1001506947 langpplrang textcopyright = 2002006948 langbch|cmr|ugmrang textordfeminine = 1002006949 langebg|pmnrang textordfeminine = 2002006950 langbch|cmr|ebg|pmn|ugmrang textlnot = 200 6951 langblgrang textlnot = 2001006952 langm-t|bch|cmr|ebg|ptm|ugmrang textregistered = 1001006953 langpmnrang textregistered = 501506954 langpplrang textregistered = 2002006955 langpmnrang textasciimacron = 1502006956 langm-t|ppl|ptmrang textdegree = 3003006957 langbchrang textdegree = 1502006958 langblg|ugmrang textdegree = 2002006959 langcmr|ebgrang textdegree = 4004006960 langpmnrang textdegree = 1504006961 langbch|cmr|ebg|pmn|ugmrang textpm = 1502006962 langblgrang textpm = 1001006963 langptmrang textpm = 50 806964 langbch|blg|ugmrang texttwosuperior = 1002006965 langcmrrang texttwosuperior = 501006966 langebg|pmnrang texttwosuperior = 2002006967 langptmrang texttwosuperior = 50 506968 langbch|blg|ugmrang textthreesuperior = 1002006969 langcmrrang textthreesuperior = 501006970 langebg|pmnrang textthreesuperior = 2002006971 langptmrang textthreesuperior = 50 506972 langpmnrang textasciiacute = 3004006973 langbch|ugmrang textmu = 1006974 langbch|ebg|pmnrang textparagraph = 1006975 langbch|cmr|ebg|pmnrang textperiodcentered = 3004006976 langblgrang textperiodcentered = 4005006977 langptmrang textperiodcentered = 3003006978 langugmrang textperiodcentered = 2005006979 langbch|blg|ugmrang textonesuperior = 2003006980 langcmr|ebg|pmnrang textonesuperior = 2002006981 langptmrang textonesuperior = 100100

CONFIGURATION FILES Character protrusion 181

6982 langbch|ebg|pmn|ugmrang textordmasculine = 2002006983 langblg|cmrrang textordmasculine = 1002006984 langbch|cmr|pmnrang texteuro = 100 6985 langebgrang texteuro = 501006986 langbchrang texttimes = 2002006987 langblg|ptmrang texttimes = 1001006988 langcmrrang texttimes = 1502506989 langebgrang texttimes = 1001506990 langpmnrang texttimes = 701006991 langugmrang texttimes = 2003006992 langbch|ebg|pmnrang textdiv = 1502006993 langblgrang textdiv = 1001006994 langcmrrang textdiv = 1502506995 langptmrang textdiv = 501006996 langugmrang textdiv = 2003006997 langptmrang textperthousand = 506998 langugmrang textsection = 1006999 langugmrang textonehalf = 501007000 langugmrang textonequarter = 501007001 langugmrang textthreequarters = 501007002 langugmrang textsurd = 100

Remaining slots in the source file7003 70047005 langcmr|ebg|pmn|ugmrang7006 SetProtrusion7007 langcmrrang [ name = cmr-textcomp-it ]7008 langebgrang [ name = EBGaramond-textcomp-it ]7009 langpmnrang [ name = pmn-textcomp-it ]7010 langugmrang [ name = ugm-textcomp-it ]7011 encoding = TS17012 langcmrrang family = cmr7013 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF7014 langpmnrang family = pmnxpmnj7015 langugmrang family = ugm7016 langugmrang shape = itsl 7017 langugmrang shape = it 7018 7019 langcmrrang textquotestraightbase = 3006007020 langebg|pmnrang textquotestraightbase = 4004007021 langcmrrang textquotestraightdblbase = 3006007022 langebgrang textquotestraightdblbase = 3004007023 langpmnrang textquotestraightdblbase = 3003007024 texttwelveudash = 2002007025 langcmr|ebg|pmnrang textthreequartersemdash = 1501507026 langugmrang textthreequartersemdash = 2002007027 langcmrrang textquotesingle = 6003007028 langebgrang textquotesingle = 8001007029 langpmnrang textquotesingle = 3002007030 langugmrang textquotesingle = 5005007031 langcmrrang textasteriskcentered = 3002007032 langebgrang textasteriskcentered = 5001007033 langpmnrang textasteriskcentered = 2003007034 langugmrang textasteriskcentered = 3001507035 langpmnrang textfractionsolidus = -200-2007036 langcmrrang textoneoldstyle = 100 507037 langebgrang textoneoldstyle = 100 7038 langpmnrang textoneoldstyle = 50 7039 langebgrang texttwooldstyle = 50 7040 langpmnrang texttwooldstyle = -50 7041 langcmrrang textthreeoldstyle = 100 507042 langpmnrang textthreeoldstyle = -100 7043 langcmrrang textfouroldstyle = 50 507044 langebgrang textfouroldstyle = 50100

CONFIGURATION FILES Character protrusion 182

7045 langcmrrang textsevenoldstyle = 50 807046 langebgrang textsevenoldstyle = 50 7047 langpmnrang textsevenoldstyle = 20 7048 langcmrrang textlangle = 400 7049 langcmrrang textrangle = 4007050 langcmr|ebgrang textminus = 3003007051 langpmnrang textminus = 2002007052 langugmrang textminus = 2503007053 langebg|pmnrang textlbrackdbl = 100 7054 langebg|pmnrang textrbrackdbl = 1007055 langpmnrang textasciigrave = 3003007056 langcmr|ebg|pmnrang texttildelow = 2002507057 langpmnrang textasciibreve = 3003007058 langpmnrang textasciicaron = 3003007059 langpmnrang textacutedbl = 2003007060 langpmnrang textgravedbl = 1503007061 langcmrrang textdagger = 1001007062 langebgrang textdagger = 2001007063 langpmnrang textdagger = 80 507064 langugmrang textdagger = 80 807065 langcmr|ebgrang textdaggerdbl = 80 807066 langpmnrang textdaggerdbl = 80 507067 langugmrang textbardbl = 1501507068 langcmrrang textbullet = 2001007069 langebgrang textbullet = 300 7070 langpmnrang textbullet = 30 707071 langugmrang textbullet = 501007072 langcmrrang textcelsius = 100 7073 langebgrang textcelsius = 200 7074 langpmnrang textcelsius = 50-507075 langebgrang textflorin = 100 7076 langpmnrang textflorin = 501007077 langugmrang textflorin = 1007078 langcmrrang textcolonmonetary = 150 7079 langebgrang textcolonmonetary = 100 7080 langpmnrang textcolonmonetary = 50-507081 langcmr|ebgrang texttrademark = 200 7082 langpmnrang texttrademark = 501007083 langugmrang texttrademark = 150 507084 langugmrang textcent = 50 7085 langugmrang textsterling = 507086 langugmrang textbrokenbar = 2003007087 langpmnrang textasciidieresis = 3002007088 langcmrrang textcopyright = 100 7089 langebgrang textcopyright = 2001007090 langpmnrang textcopyright = 1001507091 langugmrang textcopyright = 300 7092 langcmrrang textordfeminine = 1001007093 langpmnrang textordfeminine = 2002007094 langugmrang textordfeminine = 1002007095 langcmr|ebgrang textlnot = 300 7096 langpmn|ugmrang textlnot = 200 7097 langcmrrang textregistered = 100 7098 langebgrang textregistered = 2001007099 langpmnrang textregistered = 501507100 langugmrang textregistered = 300 7101 langpmnrang textasciimacron = 1502007102 langcmr|ebgrang textdegree = 5001007103 langpmnrang textdegree = 1501507104 langugmrang textdegree = 3002007105 langcmrrang textpm = 1501007106 langebgrang textpm = 2001507107 langpmn|ugmrang textpm = 1502007108 langcmrrang textonesuperior = 400 7109 langebgrang textonesuperior = 300100

CONFIGURATION FILES Character protrusion 183

7110 langpmnrang textonesuperior = 2001007111 langugmrang textonesuperior = 3003007112 langcmrrang texttwosuperior = 400 7113 langebgrang texttwosuperior = 300 7114 langpmnrang texttwosuperior = 2001007115 langugmrang texttwosuperior = 3002007116 langcmrrang textthreesuperior = 400 7117 langebgrang textthreesuperior = 300 7118 langpmnrang textthreesuperior = 2001007119 langugmrang textthreesuperior = 3002007120 langugmrang textmu = 1007121 langpmnrang textasciiacute = 3002007122 langcmrrang textparagraph = 200 7123 langpmnrang textparagraph = 1007124 langcmrrang textperiodcentered = 5005007125 langebg|pmn|ugmrang textperiodcentered = 3004007126 langcmrrang textordmasculine = 1001007127 langpmnrang textordmasculine = 2002007128 langugmrang textordmasculine = 3002007129 langcmrrang texteuro = 200 7130 langebgrang texteuro = 100 7131 langpmnrang texteuro = 100-507132 langcmrrang texttimes = 2002007133 langebgrang texttimes = 2001007134 langpmnrang texttimes = 701007135 langugmrang texttimes = 2003007136 langcmr|ebgrang textdiv = 2002007137 langpmnrang textdiv = 1502007138 langugmrang textdiv = 2003007139 langugmrang textsection = 2007140 langugmrang textonehalf = 501007141 langugmrang textonequarter = 501007142 langugmrang textthreequarters = 501007143 langugmrang textsurd = 1007144 71457146 langcmr|ebg|pmn|ugmrang

1586 Computer Modern math

Now to the math symbols for Computer Modern Roman Definitions have beenextracted from fontmathltx I did not spend too much time fiddling with thesesettings so they can surely be improved

The math font lsquooperatorsrsquo (also used for the mathrm and mathbf alphabets) isOT1cmr which wersquove already set up above Itrsquos declared as

DeclareSymbolFontoperators OT1cmrm nSetSymbolFontoperatorsboldOT1cmrbxn

mathit (OT1cmrmit) is also already set upThere are (for the moment) no settings for mathsf and mathttMath font lsquolettersrsquo (also used as mathnormal) is declared as

DeclareSymbolFontletters OMLcmmmitSetSymbolFontletters boldOMLcmmbit

7147 langcmrrang7148 SetProtrusion7149 [ name = cmr-math-letters ]7150 encoding = OML7151 family = cmm7152 series = mb7153 shape = it

CONFIGURATION FILES Character protrusion 184

7154 7155 A = 100 50 mathnormal7156 B = 50 7157 C = 50 7158 D = 50 507159 E = 50 7160 F = 100 507161 G = 50 507162 H = 50 507163 I = 50 507164 J = 150 507165 K = 501007166 L = 50 507167 M = 50 7168 N = 50 7169 O = 50 7170 P = 50 7171 Q = 50 507172 R = 50 7173 S = 50 7174 T = 501007175 U = 50 507176 V = 1001007177 W = 501007178 X = 501007179 Y = 1001007180 f = 1001007181 h = 1007182 i = 507183 j = 507184 k = 507185 r = 507186 v = 507187 w = 507188 x = 507189 0B = 50100 alpha7190 0C = 50 50 beta7191 0D = 200150 gamma7192 0E = 50 50 delta7193 0F = 50 50 epsilon7194 10 = 50150 zeta7195 12 = 50 theta7196 13 = 100 iota7197 14 = 100 kappa7198 15 = 100 50 lambda7199 16 = 50 mu7200 17 = 50 nu7201 18 = 50 xi7202 19 = 50100 pi7203 1A = 50 50 rho7204 1B = 150 sigma7205 1C = 50150 tau7206 1D = 50 50 upsilon7207 1F = 50100 chi7208 20 = 50 50 psi7209 21 = 50 omega7210 22 = 50 varepsilon7211 23 = 50 vartheta7212 24 = 50 varpi7213 25 = 100 varrho7214 26 = 100100 varsigma7215 27 = 50 50 varphi7216 28 = 100100 leftharpoonup7217 29 = 100100 leftharpoondown7218 2A = 100100 rightharpoonup

CONFIGURATION FILES Character protrusion 185

7219 2B = 100100 rightharpoondown7220 2C = 300200 lhook7221 2D = 200300 rhook7222 2E = 100 triangleright7223 2F = 100 triangleleft7224 3A = 500 ldotp7225 3B = 500 7226 3C = 200100 lt7227 3D = 300400 7228 3E = 100200 gt7229 3F = 200200 star7230 5B = 100 flat7231 5E = 200200 smile7232 5F = 200200 frown7233 7C = 100 jmath7234 7D = 100 wp

Remaining slots in the source file7235 7236

Math font lsquosymbolsrsquo (also used for the mathcal alphabet) is declared as

DeclareSymbolFontsymbols OMScmsymnSetSymbolFontsymbols boldOMScmsybn

7237 SetProtrusion7238 [ name = cmr-math-symbols ]7239 encoding = OMS7240 family = cmsy7241 series = mb7242 shape = n 7243 7244 A = 150 50 mathcal7245 C = 1007246 D = 507247 F = 501507248 I = 1007249 J = 1001507250 K = 1007251 L = 100 7252 M = 50 507253 N = 501007254 P = 507255 Q = 50 7256 R = 507257 T = 501507258 V = 50 507259 W = 507260 X = 1001007261 Y = 100 7262 Z = 1001507263 00 = 300300 -7264 01 = 700 cdot cdotp7265 02 = 150250 times7266 03 = 150250 ast7267 04 = 200300 div7268 05 = 150250 diamond7269 06 = 200200 pm7270 07 = 200200 mp7271 08 = 100100 oplus7272 09 = 100100 ominus7273 0A = 100100 otimes7274 0B = 100100 oslash7275 0C = 100100 odot7276 0D = 100100 bigcirc

CONFIGURATION FILES Character protrusion 186

7277 0E = 100100 circ7278 0F = 100100 bullet7279 10 = 100100 asymp7280 11 = 100100 equiv7281 12 = 200100 subseteq7282 13 = 100200 supseteq7283 14 = 200100 leq7284 15 = 100200 geq7285 16 = 200100 preceq7286 17 = 100200 succeq7287 18 = 200200 sim7288 19 = 150150 approx7289 1A = 200100 subset7290 1B = 100200 supset7291 1C = 200100 ll7292 1D = 100200 gg7293 1E = 300100 prec7294 1F = 100300 succ7295 20 = 100200 leftarrow7296 21 = 200100 rightarrow7297 22 = 100100 uparrow7298 23 = 100100 downarrow7299 24 = 100100 leftrightarrow7300 25 = 100100 nearrow7301 26 = 100100 searrow7302 27 = 100100 simeq7303 28 = 100100 Leftarrow7304 29 = 100100 Rightarrow7305 2A = 100100 Uparrow7306 2B = 100100 Downarrow7307 2C = 100100 Leftrightarrow7308 2D = 100100 nwarrow7309 2E = 100100 swarrow7310 2F = 100 propto7311 30 = 400 prime7312 31 = 100100 infty7313 32 = 150100 in7314 33 = 100150 ni7315 34 = 100100 triangle bigtriangleup7316 35 = 100100 bigtriangledown7317 38 = 100 forall7318 39 = 100 exists7319 3A = 200 neg7320 3E = 200200 top7321 3F = 200200 bot perp7322 5E = 100200 wedge7323 5F = 100200 vee7324 60 = 300 vdash7325 61 = 300 dashv7326 62 = 100100 lfloor7327 63 = 100100 rfloor7328 64 = 100100 lceil7329 65 = 100100 rceil7330 66 = 150 lbrace7331 67 = 150 rbrace7332 68 = 400 langle7333 69 = 400 rangle7334 6C = 100100 updownarrow7335 6D = 100100 Updownarrow7336 6E = 100300 backslash setminus7337 72 = 100100 nabla7338 79 = 200200 dagger7339 7A = 100100 ddagger7340 7B = 100 mathparagraph7341 7C = 100100 clubsuit

CONFIGURATION FILES Character protrusion 187

7342 7D = 100100 diamondsuit7343 7E = 100100 heartsuit7344 7F = 100100 spadesuit

Remaining slots in the source file7345 7346

We donrsquot bother about lsquolargesymbolsrsquo since it will only be used in display mathwhere protrusion doesnrsquot work anyway Itrsquos declared as

DeclareSymbolFontlargesymbolsOMXcmexmn

7347 langcmrrang7348 langcfg-trang

1587 AMS symbols

Settings for the AMS math fonts (amssymb)7349 langcfg-urang

Symbol font lsquoarsquo7350 langmsarang7351 SetProtrusion7352 [ name = AMS-a ]7353 encoding = U7354 family = msa 7355 7356 05 = 150250 centerdot7357 06 = 100100 lozenge7358 07 = 50 50 blacklozenge7359 08 = 50 50 circlearrowright7360 09 = 50 50 circlearrowleft7361 0A = 100100 rightleftharpoons7362 0B = 100100 leftrightharpoons7363 0D = -50200 Vdash7364 0E = -50200 Vvdash7365 0F = -70150 vDash7366 10 = 100150 twoheadrightarrow7367 11 = 100150 twoheadleftarrow7368 12 = 50100 leftleftarrows7369 13 = 50 80 rightrightarrows7370 14 = 120120 upuparrows7371 15 = 120120 downdownarrows7372 16 = 200200 upharpoonright7373 17 = 200200 downharpoonright7374 18 = 200200 upharpoonleft7375 19 = 200200 downharpoonleft7376 1A = 80100 rightarrowtail7377 1B = 80100 leftarrowtail7378 1C = 50 50 leftrightarrows7379 1D = 50 50 rightleftarrows7380 1E = 250 Lsh7381 1F = 250 Rsh7382 20 = 100100 rightsquigarrow7383 21 = 100100 leftrightsquigarrow7384 22 = 100 50 looparrowleft7385 23 = 50100 looparrowright7386 24 = 50 80 circeq7387 25 = 100 succsim7388 26 = 100 gtrsim7389 27 = 100 gtrapprox7390 28 = 150 50 multimap7391 2B = 100150 doteqdot

CONFIGURATION FILES Character protrusion 188

7392 2C = 100150 triangleq7393 2D = 100 50 precsim7394 2E = 100 50 lesssim7395 2F = 50 50 lessapprox7396 30 = 100 50 eqslantless7397 31 = 50 50 eqslantgtr7398 32 = 100 50 curlyeqprec7399 33 = 50100 curlyeqsucc7400 34 = 100 50 preccurlyeq7401 36 = 50 leqslant7402 38 = 50 backprime7403 39 = 250250 dabar the dash bar in dash(leftright)arrow7404 3C = 50100 succcurlyeq7405 3E = 50 geqslant7406 40 = 50 sqsubset7407 41 = 50 sqsupset7408 42 = 150 vartriangleright rhd7409 43 = 150 vartriangleleft lhd7410 44 = 100 trianglerighteq unrhd7411 45 = 100 trianglelefteq unlhd7412 46 = 100100 bigstar7413 48 = 50 50 blacktriangledown7414 49 = 100 blacktriangleright7415 4A = 100 blacktriangleleft7416 4B = 150 dashrightarrow (the arrow)7417 4C = 150 dashleftarrow7418 4D = 50 50 vartriangle7419 4E = 50 50 blacktriangle7420 4F = 50 50 triangledown7421 50 = 50 50 eqcirc7422 56 = 150 Rrightarrow7423 57 = 150 Lleftarrow7424 58 = 100300 checkmark7425 5C = 50 50 angle7426 5D = 50 50 measuredangle7427 5E = 50 50 sphericalangle7428 5F = 50 varpropto7429 60 = 100100 smallsmile7430 61 = 100100 smallfrown7431 62 = 50 Subset7432 63 = 50 Supset7433 66 = 150150 curlywedge7434 67 = 150150 curlyvee7435 68 = 50150 leftthreetimes7436 69 = 100 50 rightthreetimes7437 6C = 50 50 bumpeq7438 6D = 50 50 Bumpeq7439 6E = 100 lll7440 6F = 100 ggg7441 70 = 50100 ulcorner7442 71 = 100 50 urcorner7443 75 = 150200 dotplus7444 76 = 50100 backsim7445 78 = 50100 llcorner7446 79 = 100 50 lrcorner7447 7C = 100100 intercal7448 7D = 50 50 circledcirc7449 7E = 50 50 circledast7450 7F = 50 50 circleddash

Remaining slots in the source file7451 74527453 langmsarang

CONFIGURATION FILES Character protrusion 189

Symbol font lsquobrsquo7454 langmsbrang7455 SetProtrusion7456 [ name = AMS-b ]7457 encoding = U7458 family = msb 7459 7460 A = 50 50 mathbb7461 C = 50 507462 G = 507463 L = 507464 P = 507465 R = 507466 T = 507467 V = 50 507468 X = 50 507469 Y = 50 507470 00 = 50 50 lvertneqq7471 01 = 50 50 gvertneqq7472 02 = 50 50 nleq7473 03 = 50 50 ngeq7474 04 = 100 50 nless7475 05 = 50150 ngtr7476 06 = 100 50 nprec7477 07 = 50150 nsucc7478 08 = 50 50 lneqq7479 09 = 50 50 gneqq7480 0A = 100100 nleqslant7481 0B = 100100 ngeqslant7482 0C = 100 50 lneq7483 0D = 50100 gneq7484 0E = 100 50 npreceq7485 0F = 50100 nsucceq7486 10 = 50 precnsim7487 11 = 50 50 succnsim7488 12 = 50 50 lnsim7489 13 = 50 50 gnsim7490 14 = 50 50 nleqq7491 15 = 50 50 ngeqq7492 16 = 50 50 precneqq7493 17 = 50 50 succneqq7494 18 = 50 50 precnapprox7495 19 = 50 50 succnapprox7496 1A = 50 50 lnapprox7497 1B = 50 50 gnapprox7498 1C = 150200 nsim7499 1D = 50 50 ncong7500 1E = 100150 diagup7501 1F = 100150 diagdown7502 20 = 100 50 varsubsetneq7503 21 = 50100 varsupsetneq7504 22 = 100 50 nsubseteqq7505 23 = 50100 nsupseteqq7506 24 = 100 50 subsetneqq7507 25 = 50100 supsetneqq7508 26 = 100 50 varsubsetneqq7509 27 = 50100 varsupsetneqq7510 28 = 100 50 subsetneq7511 29 = 50100 supsetneq7512 2A = 100 50 nsubseteq7513 2B = 50100 nsupseteq7514 2C = 50100 nparallel7515 2D = 100150 nmid7516 2E = 150150 nshortmid7517 2F = 100100 nshortparallel

CONFIGURATION FILES Character protrusion 190

7518 30 = 150 nvdash7519 31 = 150 nVdash7520 32 = 100 nvDash7521 33 = 100 nVDash7522 34 = 100 ntrianglerighteq7523 35 = 100 ntrianglelefteq7524 36 = 100 ntriangleleft7525 37 = 100 ntriangleright7526 38 = 100200 nleftarrow7527 39 = 100200 nrightarrow7528 3A = 100100 nLeftarrow7529 3B = 50100 nRightarrow7530 3C = 100100 nLeftrightarrow7531 3D = 100200 nleftrightarrow7532 3E = 50 50 divideontimes7533 3F = 50 50 varnothing7534 60 = 200 Finv7535 61 = 50 Game7536 68 = 100100 eqsim7537 69 = 50 beth7538 6A = 50 gimel7539 6B = 150 daleth7540 6C = 200 lessdot7541 6D = 200 gtrdot7542 6E = 100200 ltimes7543 6F = 150100 rtimes7544 70 = 50100 shortmid7545 71 = 50 50 shortparallel7546 72 = 200300 smallsetminus7547 73 = 100200 thicksim7548 74 = 50100 thickapprox7549 75 = 50 50 approxeq7550 76 = 50100 succapprox7551 77 = 50 50 precapprox7552 78 = 100100 curvearrowleft7553 79 = 50150 curvearrowright7554 7A = 50200 digamma7555 7B = 100 50 varkappa7556 7F = 200 backepsilon

Remaining slots in the source file7557 75587559 langmsbrang

1588 Euler

Euler Roman font (package euler)7560 langeurrang7561 SetProtrusion7562 [ name = euler ]7563 encoding = U7564 family = eur 7565 7566 01 = 1001007567 03 = 1001507568 06 = 1007569 07 = 1001507570 08 = 1001007571 0A = 1001007572 0B = 507573 0C = 1007574 0D = 1001007575 0E = 100

CONFIGURATION FILES Character protrusion 191

7576 0F = 1001007577 10 = 1001007578 13 = 1007579 14 = 1007580 15 = 507581 16 = 507582 17 = 501007583 18 = 501007584 1A = 507585 1B = 507586 1C = 501007587 1D = 501007588 1E = 501007589 1F = 501007590 20 = 507591 21 = 507592 22 = 501007593 24 = 507594 27 = 501007595 1 = 1001007596 7 = 501007597 3A = 3005007598 3B = 2004007599 3C = 2001007600 3D = 2002007601 3E = 1002007602 A = 1007603 D = 507604 J = 50 7605 K = 507606 L = 507607 Q = 507608 T = 50 7609 X = 50 507610 Y = 50 7611 h = 507612 k = 507613 7614

Extended by the eulervm package7615 SetProtrusion7616 [ name = euler-vm7617 load = euler ]7618 encoding = U7619 family = zeur 7620 7621 28 = 1002007622 29 = 1002007623 2A = 1001507624 2B = 1001507625 2C = 2003007626 2D = 2003007627 2E = 1007628 2F = 100 7629 3F = 1501507630 5B = 1007631 5E = 1001007632 5F = 1001007633 80 = 507634 81 = 2002507635 82 = 1002007636 76377638 langeurrang

CONFIGURATION FILES Character protrusion 192

Euler Script font (eucal)7639 langeusrang7640 SetProtrusion7641 [ name = euscript ]7642 encoding = U7643 family = eus 7644 7645 A = 1001007646 B = 501007647 C = 50 507648 D = 501007649 E = 501007650 F = 50 7651 G = 50 7652 H = 1007653 K = 507654 L = 1507655 M = 507656 N = 507657 O = 50 507658 P = 50 507659 T = 1007660 U = 507661 V = 50 507662 W = 50 507663 X = 50 507664 Y = 50 7665 Z = 501007666 00 = 2502507667 18 = 2002007668 3A = 2001507669 40 = 1007670 5E = 1001007671 5F = 1001007672 66 = 50 7673 67 = 507674 6E = 2002007675 76767677 SetProtrusion7678 [ name = euscript-vm7679 load = euscript ]7680 encoding = U7681 family = zeus 7682 7683 01 = 6006007684 02 = 2002007685 03 = 2002007686 04 = 2002007687 05 = 1501507688 06 = 2002007689 07 = 2002007690 08 = 1001007691 09 = 1001007692 0A = 1001007693 0B = 1001007694 0C = 1001007695 0D = 1001007696 0E = 1501507697 0F = 1001007698 10 = 1501507699 11 = 1001007700 12 = 1501007701 13 = 1001507702 14 = 150100

CONFIGURATION FILES Character protrusion 193

7703 15 = 1001507704 16 = 2001007705 17 = 1002007706 19 = 1501507707 1A = 1501007708 1B = 1001507709 1C = 1001007710 1D = 1001007711 1E = 2501007712 1F = 1002507713 20 = 1502007714 21 = 1502007715 22 = 1501507716 23 = 1501507717 24 = 1002007718 25 = 1501507719 26 = 1501507720 27 = 1001007721 28 = 1001007722 29 = 1001507723 2A = 1001007724 2B = 1001007725 2C = 1001007726 2D = 1501507727 2E = 1501507728 2F = 1001007729 30 = 1001007730 31 = 1001007731 32 = 1001007732 33 = 1001007733 34 = 1001007734 35 = 1001007735 3E = 1501507736 3F = 1501507737 60 = 2007738 61 = 200 7739 62 = 1001007740 63 = 1001007741 64 = 1001007742 65 = 1001007743 68 = 300 7744 69 = 3007745 6C = 1001007746 6D = 1001007747 6F = 1001007748 72 = 1001007749 73 = 2001007750 76 = 1007751 77 = 100 7752 78 = 50 507753 79 = 1001007754 7A = 1001007755 7D = 1501507756 7E = 1001007757 A8 = 1001007758 A9 = 1001007759 AB = 2002007760 BA = 2007761 BB = 2007762 BD = 2002007763 DE = 2002007764 77657766 langeusrang

CONFIGURATION FILES Character protrusion 194

Euler Fraktur font (eufrak)7767 langeufrang7768 SetProtrusion7769 [ name = mathfrak ]7770 encoding = U7771 family = euf 7772 7773 A = 507774 B = 507775 C = 50 507776 D = 807777 E = 50 7778 G = 507779 L = 807780 O = 507781 T = 807782 X = 80 507783 Z = 80 507784 b = 507785 c = 507786 k = 507787 p = 507788 q = 50 7789 v = 507790 w = 507791 x = 507792 1 = 1001007793 2 = 80 807794 3 = 80 507795 4 = 80 507796 7 = 50 507797 12 = 5005007798 13 = 5005007799 = 2007800 rsquo = 2003007801 ( = 200 7802 ) = 2007803 = 2002007804 + = 2002507805 - = 2002007806 = 3003007807 = 4004007808 = = 2002007809 = 2007810 = 2007811 ] = 2007812 78137814 langeufrang7815 langcfg-urang

1589 Euro symbols

Settings for various Euro symbols (Adobe Euro fonts (packages eurosans europs)ITC Euro fonts (package euroitc) and marvosym24) The euroitc settings are hiddenin the package itself (1437) for lsquofree softwarersquo compliance reasons (Not quitesure whether this is what Karl really had in mind )

7816 langcfg-erang7817 SetProtrusion7818 langzpeurang encoding = U7819 langmvsrang encoding = OT1U

24 Of course there are many more symbols in this font Feel free to contribute protrusion settings

CONFIGURATION FILES Interword spacing 195

Figure 1

Example of interwordspacing (from M SiemoneitTypographisches GestaltenFrankfurtM 1989) Thenumbers indicate thepreference for shrinking theinterword space

7820 langzpeurang family = zpeu 7821 langmvsrang family = mvs 7822 7823 langzpeurang E = 50 7824 langmvsrang 164 = 5050 EUR7825 langmvsrang 068 = 50-100 EURdig7826 78277828 langzpeurang7829 SetProtrusion7830 encoding = U7831 family = zpeu7832 shape = it 7833 7834 E = 100-507835 78367837 SetProtrusion7838 encoding = U7839 family = zpeuseurosans 7840 7841 E = 100507842 78437844 SetProtrusion7845 encoding = U7846 family = zpeuseurosans7847 shape = it 7848 7849 E = 200 7850 78517852 langzpeurang7853 langcfg-erang

159 Interword spacingDefault unit is space

7854 langm-t|cmrrang7855 -----------------------------------------------------------------------7856 INTERWORD SPACING78577858 langm-t|cmrrang7859 langm-trang7860 SetExtraSpacing7861 [ name = default ]7862 encoding = OT1T1LY1OT4QXT5 7863

These settings are only a first approximation The following reasoning is from amail from Ulrich Dirr who also provided the sample in figure 1 I do not claim tohave coped with the task

CONFIGURATION FILES Interword spacing 196

lsquoThe idea is ndash analog to the tables for expansion and protrusion ndash to havetables for optical reductionexpansion of spaces in dependence of the actualcharacter so that the distance between words is optically equal

When reducing distances the (weighting) order is

bull after commas7864 = -500500

bull in front of capitals which have optical more room on their left side eg lsquoArsquolsquoJrsquo lsquoTrsquo lsquoVrsquo lsquoWrsquo and lsquoYrsquo [this is not yet possible ndash RS]

bull in front of capitals which have circleoval shapes on their left side eg lsquoCrsquolsquoGrsquo lsquoOrsquo and lsquoQrsquo [ditto ndash RS]

bull after lsquorrsquo (because of the bigger optical room on the righthand side)7865 r = -300300

bull [before or] after lowercase characters with ascenders7866 b = -2002007867 d = -2002007868 f = -2002007869 h = -2002007870 k = -2002007871 l = -2002007872 t = -200200

bull [before or] after lowercase characters with x-height plus descender withadditional optical space eg lsquovrsquo or lsquowrsquo

7873 c = -1001007874 p = -1001007875 v = -1001007876 w = -1001007877 z = -1001007878 x = -1001007879 y = -100100

bull [before or] after lowercase characters with x-height plus descender withoutadditional optical space

7880 i = 50 -507881 m = 50 -507882 n = 50 -507883 u = 50 -50

bull after colon and semicolon7884 = 200-2007885 = 200-200

bull after punctuation which ends a sentence eg period exclamation markquestion mark

7886 = 250-2507887 = 250-2507888 = 250-250

The order has to be reversed when enlarging is neededrsquo

7889 78907891 langm-trang

Questions are

CONFIGURATION FILES Interword spacing 197

bull Is the result really better

bull Is it overdone (Try with a factor lt 1000)

bull Should the first parameter also be used (Probably)

bull What about quotation marks parentheses etc

Furthermore there seems to be a pdfTEX bug with spacing in combination witha non-zero spaceskip (reported by Axel Berger)

parfillskip0ptrightskip0pt plus 1emspaceskipfontdimen2font test testparpdfadjustinterwordglue2stbscodefont`t=-50 test testbye

Some more characters in T2A25

7892 langcmrrang7893 SetExtraSpacing7894 [ name = T2A7895 load = default ]7896 encoding = T2A7897 family = cmr 7898 7899 cyrg = -3003007900 cyrb = -2002007901 cyrk = -2002007902 cyrs = -1001007903 cyrr = -1001007904 cyrh = -1001007905 cyru = -1001007906 cyrt = 50 -507907 cyrp = 50 -507908 cyri = 50 -507909 cyrishrt = 50 -507910 7911

1591 Nonfrenchspacing

The following settings simulate nonfrenchspacing (since space factors will beignored when spacing adjustment is in effect) They may be used for Englishcontexts

From the TEXbook

lsquoIf the space factor f is different from 1000 the interword glue is computedas follows Take the normal space glue for the current font and add theextra space if f ge 2000 [ ] Then the stretch component is multiplied byf 1000 while the shrink component is multiplied by 1000 f rsquo

The lsquoextra spacersquo (fontdimen7) for Computer Modern Roman is a third offontdimen2 ie 333

7912 SetExtraSpacing7913 [ name = nonfrench-cmr7914 load = default7915 context = nonfrench ]7916 encoding = OT1T1LY1OT4QXT5

25 Contributed by Karl Karlsson

CONFIGURATION FILES Additional kerning 198

7917 family = cmr 7918

latexltx has

defnonfrenchspacing sfcode` 3000 sfcode` 3000 sfcode` 3000

7919 = 3332000-6677920 = 3332000-6677921 = 3332000-667

sfcode` 2000

7922 = 3331000-500

sfcode` 1500

7923 = 500-333

sfcode` 1250

7924 = 250-200

7925 79267927 langcmrrang

fontinst however which is also used to create the psnfss font metrics setsfontdimen7 to 240 by default Therefore the fallback settings use this value forthe first component

7928 langm-trang7929 SetExtraSpacing7930 [ name = nonfrench-default7931 load = default7932 context = nonfrench ]7933 encoding = OT1T1LY1OT4QXT5 7934 7935 = 2402000-6677936 = 2402000-6677937 = 2402000-6677938 = 2401000-5007939 = 500-3337940 = 250-2007941 7942

Empty settings to prevent spurious warnings7943 SetExtraSpacing7944 [ name = empty ]7945 encoding = TS1 7946 7947

1510 Additional kerningDefault unit is 1em

7948 -----------------------------------------------------------------------7949 ADDITIONAL KERNING7950

CONFIGURATION FILES Additional kerning 199

A dummy list to be loaded when no context is active7951 SetExtraKerning7952 [ name = empty ]7953 encoding = OT1T1T2ALY1OT4QXT5TS1 7954 7955

15101 French

The ratio of fontdimen2 to fontdimen6 varies for different fonts so that eitherthe kerning of the colon (which should be a space ie fontdimen 2) or that of theother punctuation characters (TEXrsquos thinspace ie one sixth of fontdimen6)may be inaccurate depending on which unit we choose (space or 1em) For Timesfor example a thin space would be 665 I donrsquot know whether French typographyreally wants a thin space or rather (as it happens to turn out with CMR) half aspace (Wikipedia26 claims it should be a quarter of an em which seems too muchto me then again it also says that this was a thin space in French typography)

7956 SetExtraKerning7957 [ name = french-default7958 context = french7959 unit = space ]7960 encoding = OT1T1LY1 7961 7962 = 1000 = fontdimen27963 = 500 ~ thinspace7964 = 500 7965 = 500 7966 7967

These settings have the disadvantage that a word following a left guillemet willnot be hyphenated This might be fixed in pdfTEX

7968 SetExtraKerning7969 [ name = french-guillemets7970 context = french-guillemets7971 load = french-default7972 unit = space ]7973 encoding = T1LY1 7974 7975 guillemotleft = 800 = 08fontdimen27976 guillemotright = 800 7977 79787979 SetExtraKerning7980 [ name = french-guillemets-OT17981 context = french-guillemets7982 load = french-default7983 unit = space ]7984 encoding = OT1 7985 7986

15102 Turkish7987 SetExtraKerning7988 [ name = turkish7989 context = turkish ]7990 encoding = OT1T1LY1

26 httpfrwikipediaorgwikiEspace_typographique 5 July 2007

CONFIGURATION FILES Additional kerning 200

7991 7992 = 167 = thinspace7993 = 167 7994 = = 167 7995 79967997 langm-trang7998 langconfigrang

OPENTYPE CONFIGURATION FILES 201

16 OpenType configuration filesThese are the configuration files for the following OpenType fonts27

bull Latin Modern Roman

bull Charis SIL28

bull Palatino29

The settings are typeset in the respective font

161 Character inheritanceOpenType fonts may differ considerably in how complete their arsenal of glyphs isTherefore each font family should have their own inheritance settings

79998000 -----------------------------------------------------------------------8001 INHERITANCE80028003 for xetex (EU1) and luatex (EU2) resp both (TU)8004 langLatinModernRomanrang8005 DeclareCharacterInheritance8006 encoding = EU1EU2TU8007 family = Latin Modern Roman

8008 A = AgraveAacuteAcircAtildeAumlAringĀĂĄǺȀẠẢẤẦẨẪẬẮẰẲẶ8009 Α Greek8010 AElig = Ǽ8011 B = ฿8012 Β Greek8013 C = CcedilĆĈĊČ8014 D = ETHĎĐḌḎ8015 E = EgraveEacuteEcircEumlĒĔĖĘĚȄẸẺẼỀẾỄỂỆ8016 Ε Greek8017 G = ĜĞĠĢǦǴ8018 H = ĤĦḤḦḪ8019 Η Greek8020 I = IgraveIacuteIcircIumlĨĪĬĮİȈỈỊ8021 Ι Greek8022 J = Ĵ8023 K = Ķ8024 Κ Greek8025 L = ĹĻŁḶ ĽĿḸ8026 M = Μ Greek8027 N = NtildeŃŅŇṄṆ8028 Ν Greek8029 O = OgraveOacuteOcircOtildeOumlOslashŌŎŐỌƠǪǾȌỎỐỒỔỖỘỚỜỠỞỢ8030 Ο Greek8031 P = Ρ Greek8032 R = ŔŖŘȐṚṘṜ8033 S = ŚŜŞŠȘṢ8034 T = ŢŤȚṬṮ8035 Τ Greek8036 U = UgraveUacuteUcircUumlŨŪŬŮŰŲƯȔỤỦỨỪỬỮỰ8037 W = ŴẀẂẄ8038 X = Χ Greek8039 Y = YacuteŶŸỴỶỸ

27 This is file microtype-utfdtx28 Available at httpsoftwaresilorgcharis29 These settings have been contributed by Loren B Davis

OPENTYPE CONFIGURATION FILES Character inheritance 202

8040 Z = ŹŻŽẒ8041 Ζ Greek8042 a = agraveaacuteacircatildeaumlaringāăąǻȁạảấầẩẫậắằẳẵ8043 aelig = ǽ8044 c = ccedilćĉċč8045 d = đḍḏ8046 e = egraveeacuteecirceumlēĕėęěȅẹẻẽếềểễệ8047 f = ff Unicode 64256 glyph name in Latin Modern f_f in New Computer Modern ff8048 g = ĝğġģǧǵ8049 h = ĥħḥḧḫ8050 i = igraveiacuteicirciumlĩīĭįıȉỉị8051 j = ĵ8052 k = ķ8053 l = ĺļłḷḹ ľlmiddot8054 n = ntildeńņňṅṇ8055 o = ograveoacuteocircotildeoumloslashōŏőọơǫǿȍỏốồổỗộớờỡởợ8056 r = ŕŗřȑṛṙṝ8057 s = śŝşšșṣ8058 t = ţțṭṯẗ ť8059 u = ugraveuacuteucircuumlũūŭůűųưȕụủứừửữự8060 w = ŵẁẃẅ8061 y = yacuteŷyumlỳỵỷỹ8062 z = źżžẓ8063

8064 langLatinModernRomanrang8065 langCharisSILrang8066 DeclareCharacterInheritance8067 encoding = EU1EU2TU8068 family = Charis SIL

8069 A = AgraveAacuteAcircAtildeAumlAringĀĂĄǍǞǠȦǺȀȂḀẠẢẤẦẨẪẬẮẰẲẴẶꜲ

8070 АӐӒ Cyrillic8071 AElig = Ǣ8072 ǼӔ Cyrillic8073 B = ḂḄḆ8074 В Cyr8075 C = CcedilĆĈḈĊČ8076 СҪ Cyr8077 D = ĎḊḌḎḐḒĐ

8078 E = EgraveEacuteEcircEumlĒĔĖĘĚȄȨȆḔḖḘḚḜẸẺẼẾỀỂỄỆ8079 ЕЀЁӖ Cyr8080 F = Ḟ8081 G = ĜĞĠĢǦǴḠԌ8082 H = ĤȞḢḤḦḨḪ8083 НҢҤӇӉ Cyr8084 I = IgraveIacuteIcircȈIumlĮĨỊĪİǏỈȊĬḬIuml8085 ІЇӀӏ Cyr8086 J = Ĵ8087 Ј Cyr8088 K = ĶǨḰḲḴ

8089 КЌҚҜҞҠӃԞ Cyr8090 L = ĹĻĽḶḸḺḼ Lmiddot

8091 M = ḾṀṂ8092 МӍ Cyr8093 N = NtildeŃŅŇǸṄṆṈṊ

8094 ИЙЍҊӢӤ Cyr

8095 O = OgraveOacuteOcircOtildeOumlŌŎŐǑǪǬȌȎȪȬȮȰṌṎṐṒỌỎỐỒỔỖỘỚỜỞỠƠ8096 ОѲӦӨӪ Cyr8097 Θ Greek8098 P = ṔṖ8099 РҎ Cyr8100 Q = Ԛ Cyr8101 R = ŔŖŘȐȒṘṚṜṞ

8102 S = ŚŜŞŠȘṠṢṤṦṨ

OPENTYPE CONFIGURATION FILES Character inheritance 203

8103 Ѕ Cyr8104 T = ŢŤȚṪṬṮṰ8105 ТҬ Cyr

8106 U = UgraveUacuteUcircUumlŨŪŬŮŰŲǓǕǗǙǛȔȖṲṴṶṸṺỤỦỨỪỬỮỰ8107 V = ṼṾ8108 W = ŴẀẂẄẆẈ8109 Ԝ Cyr8110 X = ẊẌ8111 ХҲӼӾ Cyr8112 Y = YacuteŶŸȲẎỲỴỶỸ8113 ҮҰ Cyr8114 Z = ŹŻŽẐẒẔ

8115 a = agraveaacuteacircatildeaumlaringāăąǎǟǡȧǻȁȃḁạảầấẩẫậắằẳẵặ aʾ8116 аӑӓ Cyr8117 aelig = ǽ8118 ӕ Cyr8119 b = ḃḅḇ8120 c = ccedilćĉċčḉ8121 сҫ Cyr8122 d = ďḋḍḏḑḓ

8123 e = egraveeacuteecirceumlēĕėęěȅȩȇḕḗḙḛḝẹẻẽềếểễệ8124 еѐёӗ Cyr8125 f = ḟff f_f8126 g = ĝğġģǧǵḡ8127 h = ĥȟḣḥḧḩḫẖ8128 Һһ Cyr8129 i = ıigraveiacuteicircȉǐiumlįīịĩḭḯỉȋĭ8130 ії Cyr8131 j = ĵǰ8132 ј Cyr8133 k = ķǩḱḳḵ

8134 l = ĺļḻḷḹḽ ľlmiddot8135 m = ḿṁṃ8136 n = ntildeńņňǹṅṇṉṋ ʼn

8137 o = ograveoacuteocircotildeoumlōŏőǒǫǭȍȏȫȭȯȱṍṏṑṓọỏồốổỗộớờởỡợ8138 оѳӧөӫ Cyr8139 p = ṕṗ8140 рҏ Cyr8141 q = ԛ Cyr8142 r = ŕŗřȑȓṙṛṝṟ8143 s = śŝşšșṡṣṥṧṩ8144 ѕ Cyr8145 t = ţțṫṭṯṱẗ ť

8146 u = ugraveuacuteucircuumlũūŭůűųǔǖǘǚǜȕȗṳṵṷṹṻụủứừửữự8147 v = ṽṿ8148 w = ŵẁẃẅẇẉẘ8149 ԝ Cyr8150 x = ẋẍ8151 хҳ Cyr8152 y = yacuteyumlŷȳẏẙỳỵỷỹ8153 уўӯӱӳ Cyr8154 z = źżžẑẓẕ8155 Cyrillic8156 Г = ЃҐҒӶӺ8157 Ж = ҖӜӁ8158 З = ӞҘ8159 Л = Ӆ8160 П = Ԥ8161 У = ЎӮӰӲ8162 Ч = ҶҸӋӴ8163 Ы = Ӹ8164 Ә = Ӛ8165 Ҽ = Ҿ8166 г = ѓґғӷӻ

OPENTYPE CONFIGURATION FILES Character inheritance 204

8167 ж = җӂӝ8168 з = ҙӟ8169 и = йѝҋӣӥ8170 к = ќқҝҟҡӄԟ8171 л = ӆ8172 м = ӎ8173 н = ңҥӈӊ8174 п = ԥ8175 т = ҭ8176 х = ӽӿ8177 ч = ҷҹӌӵ8178 ш = щ8179 ы = ӹ8180 э = ӭ8181 ҽ = ҿ8182 ә = ӛ8183 ү = ұ8184 Г = Γ Greek8185 П = Π Greek8186 81878188 missing tipa math symbols

8189 langCharisSILrang8190 langPalatinorang8191 DeclareCharacterInheritance8192 encoding = EU1EU2TU8193 family = Palatino

Unfortunately I donrsquot have a Palatino variant containing all of the following glyphsThe settings are typeset in TEX Gyre Pagella missing glyphs printed in red aretaken from Charis SIL glyphs missing even in Charis SIL appear as lsquorsquo To see thereal settings consult mt-Palatinocfg

8194 A = AgraveAacuteAcircAtildeAumlĀĂĄǍǞǠȦǺȀȂḀẠẢẤẦẨẪẬẮẰẲẴẶꜲ8195 B = ḂḄḆ8196 C = CcedilĆĈḈĊČ8197 D = ĎḊḌḎḐḒ8198 E = EgraveEacuteEcircEumlĒĔĖĘĚȄȨȆḔḖḘḚḜẸẺẼẾỀỂỄỆ8199 F = Ḟ8200 G = ĜĞĠĢǦǴḠ8201 H = ĤȞḢḤḦḨḪ8202 I = IgraveIacuteIcircȈIumlĮĨỊĪİǏỈȊĬḬIuml8203 J = Ĵ8204 K = ĶǨḰḲḴ8205 L = ĹĻĽḶḸḺḼỺĿŁ Lmiddot8206 M = ḾṀṂ8207 N = NtildeŃŅŇǸṄṆṈṊ8208 O = OgraveOacuteOcircOtildeOumlŌŎŐǑǪǬȌȎȪȬȮȰṌṎṐṒỌỎỐỒỔỖỘỚỜỞỠƠ8209 P = ṔṖ8210 R = ŔŖŘȐȒṘṚṜṞ8211 S = ŚŜŞŠȘṠṢṤṦṨ8212 T = ŢŤȚṪṬṮṰ8213 U = UgraveUacuteUcircUumlŨŪŬŮŰŲǓǕǗǙǛȔȖṲṴṶṸṺỤỦỨỪỬỮỰ8214 V = ṼṾ8215 W = ŴẀẂẄẆẈ8216 X = ẊẌ8217 Y = YacuteŶŸȲẎỲỴỶỸ8218 Z = ŹŻŽẐẒẔ8219 a = agraveaacuteacircatildeaumlaringāăąǎǟǡȧǻȁȃḁạảầấẩẫậắằẳẵặ aʾ8220 b = ḃḅḇ8221 c = ccedilćĉċčḉ8222 d = ďḋḍḏḑḓ8223 e = egraveeacuteecirceumlēĕėęěȅȩȇḕḗḙḛḝẹẻẽềếểễệ

OPENTYPE CONFIGURATION FILES Character inheritance 205

8224 f = ḟff8225 g = ĝğġģǧǵḡ8226 h = ĥȟḣḥḧḩḫẖ8227 i = ıigraveiacuteicircȉǐiumlįīịĩḭḯỉȋĭ8228 j = ĵǰ8229 k = ķǩḱḳḵ8230 l = ĺļḻḷḹḽ ľlmiddot8231 m = ḿṁṃ8232 n = ntildeńņňǹṅṇṉṋ ʼn8233 o = ograveoacuteocircotildeoumlōŏőǒǫǭȍȏȫȭȯȱṍṏṑṓọỏồốổỗộớờởỡợ8234 p = ṕṗ8235 r = ŕŗřȑȓṙṛṝṟ8236 s = śŝşšșṡṣṥṧṩ8237 t = ţțṫṭṯṱẗ ť8238 u = ugraveuacuteucircuumlũūŭůűųǔǖǘǚǜȕȗṳṵṷṹṻụủứừửữự8239 v = ṽṿ8240 w = ŵẁẃẅẇẉẘ8241 x = ẋẍ8242 y = yacuteyumlŷȳẏẙỳỵỷỹ8243 z = źżžẑẓẕ8244

8245 langPalatinorang

Less characters in the Lato font 8246 langLatorang8247 DeclareCharacterInheritance8248 encoding = TUEU1EU28249 family = Lato

8250 A = AgraveAacuteAcircAtildeAumlAringĄ

8251 a = agraveaacuteacircatildeaumlaringą

8252 C = ĆCcedil

8253 c = ćccedil

8254 D= ETH

8255 E = EgraveEacuteEcircEumlĘ

8256 e = egraveeacuteecirceumlę

8257 I = IgraveIacuteIcircIuml

8258 i = igraveiacuteicirciumlı

8259 L = Ł

8260 l = ł

8261 N= ŃNtilde

8262 n = ńntilde

8263 O= OslashOgraveOacuteOcircOtildeOuml

8264 o = oslashograveoacuteocircotildeouml

8265 S = ŚŠ

8266 s = śš

8267 U= UgraveUacuteUcircUuml

8268 u = ugraveuacuteucircuuml

8269 Y = YacuteŸ

8270 y = yacuteyuml

8271 Z = ŹŻŽ

8272 z = źżž

8273

8274 langLatorang

and even less in the self-professedly awesone Font Awesome font8275 langFontAwesomerang8276 DeclareCharacterInheritance8277 encoding = TUEU1EU28278 family = FontAwesome 8279 8280 langFontAwesomerang

OPENTYPE CONFIGURATION FILES Character protrusion 206

162 Character protrusion82818282 -----------------------------------------------------------------------8283 PROTRUSION82848285 langLatinModernRomanrang8286 SetProtrusion8287 [ name = LMR-default ]8288 encoding = EU1EU2TU8289 family = Latin Modern Roman 8290

8291 A = 50508292 AElig = 50 8293 F = 508294 J = 50 8295 K = 508296 L = 508297 T = 50508298 V = 50508299 W = 50508300 X = 50508301 Y = 50508302 k = 508303 r = 508304 t = 708305 v = 50508306 w = 50508307 x = 50508308 y = 50708309 0 = 508310 1 = 1002008311 2 = 50508312 3 = 50508313 4 = 70708314 5 = 508315 6 = 508316 7 = 501008317 8 = 508318 9 = 508319 = 7008320 = 5008321 = 5008322 = 5008323 = 1008324 = 2008325 = 50508326 ~ = 2002508327 = 50508328 = 3003008329 + = 2502508330 - = 400500 hyphen8331 ndash = 400300 endash8332 mdash = 300200 emdash8333 _ = 200200 underscore8334 = 2003008335 backslash = 2003008336 = 300400 quotesingle8337 lsquo = 500700 rsquo = 5006008338 ldquo = 500300 rdquo = 2006008339 sbquo = 400400 bdquo = 4004008340 lsaquo = 400400 rsaquo = 3005008341 laquo = 300200 raquo = 1004008342 iexcl = 100 iquest = 100 8343 ( = 300 ) = 300

OPENTYPE CONFIGURATION FILES Character protrusion 207

8344 lt = 200100 gt = 1002008345 braceleft = 400200 braceright = 2004008346 angleleft = 400 angleright = 4008347 dagger = 1001008348 Dagger = 80 808349 bull = 2002008350 middot = 400450 periodcentered8351 = 80 508352 ₡ = 508353 deg = 4004008354 trade = 1002008355 copy = 1001008356 reg = 1001008357 ordf = 1002008358 ordm = 1002008359 sup1 = 2002508360 sup2 = 501008361 sup3 = 501008362 not = 200 8363 minus = 3003008364 plusmn = 1502008365 times = 1502508366 divide = 1502508367 euro = 100 8368 oneoldstyle = 1001008369 twooldstyle = 50 508370 threeoldstyle = 30 808371 fouroldstyle = 50 508372 sevenoldstyle = 50 808373 Γ = 180 Gamma8374 Δ = 100100 Delta8375 Θ = 50 50 Theta8376 Λ = 100100 Lambda8377 Ξ = Xi8378 Π = Pi8379 Σ = 50 50 Sigma8380 Υ = 100100 Upsilon8381 Φ = 50 50 Phi8382 Ψ = 50 50 Psi8383 Ω = Omega

8384 83858386 SetProtrusion8387 [ name = LMR-it ]8388 encoding = EU1EU2TU8389 family = Latin Modern Roman8390 shape = itsl 8391

8392 A = 1251008393 AElig = 125-558394 B = 90-408395 C = 145-758396 D = 75 -288397 E = 80-558398 F = 85-808399 G = 153-158400 H = 73-608401 I = 140-1208402 IJ = 140-808403 J = 135-808404 K = 70-308405 L = 87 408406 M = 67-458407 N = 75-558408 O = 150-30

OPENTYPE CONFIGURATION FILES Character protrusion 208

8409 Π= 150-558410 P = 82-508411 Q = 150-308412 R = 75 158413 S = 90-658414 $ = 100-208415 T = 220-858416 U = 230-558417 V = 260-608418 W = 185-558419 X = 70-308420 Y = 250-608421 Z = 90-608422 a = 150-108423 b = 170 8424 c = 173-108425 d = 150-558426 e = 180 8427 f = -2508428 g = 150-108429 h = 100 8430 i = 210 8431 ij = 210-408432 j = -408433 k = 110-508434 l = 240-1108435 m = 80 8436 n = 115 8437 o = 155 8438 q = 170-408439 r = 155-408440 s = 130 8441 t = 230-108442 u = 120 8443 v = 140-258444 w = 98-208445 x = 65-408446 y = 130-208447 z = 110-808448 0 = 170-858449 1 = 2301108450 2 = 130-708451 3 = 140-708452 4 = 130808453 5 = 160 8454 6 = 175-308455 7 = 250-1508456 8 = 130-408457 9 = 155-808458 = 5008459 = 4508460 = 3008461 = 3008462 amp = 130308463 = 180508464 = 380208465 + = 1802008466 = 180108467 ~ = 2001508468 ( = 300 ) = 708469 = 1001008470 - = 500300 hyphen8471 ndash = 500300 endash8472 mdash = 400170 emdash8473 _ = 100200 underscore

OPENTYPE CONFIGURATION FILES Character protrusion 209

8474 = 300400 quotesingle8475 = 5003008476 lsquo = 800200 rsquo = 800-208477 ldquo = 540100 rdquo = 5001008478 sbquo = 300700 bdquo = 2006008479 lsaquo = 500300 rsaquo = 4004008480 laquo = 400100 raquo = 2003008481 iexcl = 200 iquest = 200 8482 lt = 300100 gt = 2001008483 backslash = 3003008484 braceleft = 400100 braceright = 2002008485 dagger = 200 808486 Dagger = 120 808487 bull = 2201008488 middot = 550300 periodcentered8489 = 170 8490 ₡ = 100 508491 para = 200 8492 deg = 5003008493 trade = 200 708494 copy = 50 708495 reg = 50 708496 ordf = 1401008497 ordm = 1401008498 sup1 = 4001508499 sup2 = 250 808500 sup3 = 250 808501 not = 250 808502 minus = 3002008503 plusmn = 1501708504 times = 2002008505 divide = 2002008506 euro = 150 8507 oneoldstyle = 1001008508 twooldstyle = 100 808509 threeoldstyle = 80 508510 fouroldstyle = 80 808511 fiveoldstyle = 50 8512 sixoldstyle = 50 8513 sevenoldstyle = 80 808514 eightoldstyle = 50 8515 Γ = 100120 Gamma8516 Δ = 120100 Delta8517 Θ = 120 50 Theta8518 Λ = 130100 Lambda8519 Ξ = 100 Xi8520 Π = 100 Pi8521 Σ = 100 50 Sigma8522 Υ = 180100 Upsilon8523 Φ = 130 70 Phi8524 Ψ = 130 50 Psi8525 Ω = 50 Omega

8526 8527 langLatinModernRomanrang8528 langCharisSILrang8529 SetProtrusion8530 [ name = Charis-default ]8531 encoding = EU1EU2TU8532 family = Charis SIL 8533

8534 A = 50508535 AElig = 50508536 C = 50 8537 D = 508538 F = 50

OPENTYPE CONFIGURATION FILES Character protrusion 210

8539 G = 50 8540 J = 100 8541 K = 508542 L = 508543 Ŀ = 1008544 O = 50508545 Œ= 50 8546 P = 508547 Q = 50708548 R = 508549 ẞ = 40 capital sharp s8550 T = 50508551 V = 50508552 W = 50508553 X = 50508554 Y = 50508555 k = 508556 ŀ = 1508557 r = 508558 t = 508559 v = 50508560 w = 50508561 x = 50508562 y = 508563 1 = 1501508564 2 = 50508565 3 = 50 8566 4 = 100508567 6 = 50 8568 7 = 50808569 9 = 50508570 = 6008571 = 5008572 = 4008573 = 3008574 = 1008575 = 2008576 = 50508577 ~ = 2002508578 = 508579 = 3003008580 += 2002508581 = 2008582 backslash = 1502008583 | = 2002008584 - = 400500 hyphen8585 ndash = 200300 endash8586 mdash= 150250 emdash8587 ―= 200200 Horizontal Bar = texttwelveudash8588 ‒ = 150150 Figure Dash = textthreequartersemdash8589 _ = 1001008590 = = 1001008591 lsquo = 300400 rsquo = 3004008592 ldquo = 300300 rdquo = 3003008593 sbquo = 400400 bdquo = 3003008594 lsaquo = 400300 rsaquo = 3004008595 laquo = 200200 raquo = 1503008596 iexcl = 100 iquest = 100 8597 ( = 200 ) = 2008598 lt= 200150 gt = 1002008599 [ = 100 ] = 1008600 braceleft = 200 braceright = 3008601 dagger = 80 808602 Dagger = 1001008603 bull = 200200

OPENTYPE CONFIGURATION FILES Character protrusion 211

8604 deg = 1502008605 trade = 1501508606 cent = 50 8607 pound = 50 8608 brvbar = 2002008609 copy = 1001008610 reg = 1001008611 ordf = 1002008612 ordm = 2002008613 not = 200 508614 micro = 1008615 para = 1008616 middot = 3004008617 sup1 = 2003008618 sup2 = 1002008619 sup3 = 1002008620 euro = 100 8621 plusmn= 1502008622 times= 2002008623 divide= 2502508624 minus = 2002008625 minus= 2002008626 Cyrillic8627 Б = 508628 Г = 1308629 Ж = 50508630 З = 30508631 Л = 50 8632 У = 50508633 Ф = 50508634 Ч = 100 8635 Ъ = 508636 Ь = 508637 Э = 50508638 Ю= 408639 Я = 50 8640 Ѵ = 50508641 Ҽ = 50 8642 Ђ = 501008643 Є = 50 8644 Љ = 50508645 Њ = 508646 Ћ = 50508647 Ԅ = 1001008648 Ԇ = 50508649 Ѣ = 508650 Ҍ = 508651 Ԉ= 50808652 Ԋ= 808653 Ԏ = 50508654 Ԓ = 50 8655 Ԕ= 50408656 Ԗ = 508657 Ԙ = 50 8658 Ԡ= 508659 Ԣ= 508660 Ԃ = 1008661 б = 50508662 г = 708663 к = 508664 л = 50 8665 т = 50508666 ф = 50508667 ч = 50 8668 ъ = 50

OPENTYPE CONFIGURATION FILES Character protrusion 212

8669 ь = 508670 э = 508671 я = 50 8672 љ = 50 8673 њ = 508674 ѣ = 508675 ѵ = 50508676 ҽ = 50 8677 ҍ = 508678 ү = 50508679 ҕ = 508680 ҧ = 508681 ԃ = 1008682 ԅ = 1001008683 ԇ = 50508684 ԉ = 50708685 ԋ = 708686 ԙ = 50308687 ԡ = 508688 ԣ = 508689 Д П Ц Ш Щ Ы Ҕ Ҧ Ҩ Ә Ҵ Џ Ӭ Ӡ Ԑ Ԁ8690 в д ж з и м н п ц ш ы ю ђ є ћ џ ә ԑ ҩ ҵ ӡ ԁ ԍ ԏ ԓ ԕ ԗ8691 Greek8692 Δ = 50508693 Ψ = 50508694 γ = 70708695 λ = 40708696 π = 40508697 ρ = 508698 σ = 508699 χ = 5050

8700 87018702 SetProtrusion8703 [ name = Charis-it ]8704 encoding = EU1EU2TU8705 family = Charis SIL8706 shape = itsl 8707

8708 C = 50 8709 G = 50 8710 J = 50 8711 L = 50508712 O = 50 8713 Œ= 50 8714 Q = 50 8715 S = 50 8716 $ = 50 8717 T = 70 8718 o = 50508719 p = 508720 q = 50 8721 t = 508722 w = 508723 y = 508724 1 = 1501008725 3 = 50 8726 4 = 100 8727 6 = 50 8728 7 = 100 8729 = 7008730 = 6008731 = 4008732 = 4008733 = 150

OPENTYPE CONFIGURATION FILES Character protrusion 213

8734 amp = 808735 = 50508736 = 3002008737 += 2502508738 = 80508739 ~ = 1501508740 = 1508741 backslash = 1501508742 - = 300400 hyphen8743 ndash = 200300 endash8744 mdash= 150200 emdash8745 _ = 1008746 = = 2002008747 plusmn= 1502008748 times= 2502508749 divide= 2502508750 deg = 1502008751 middot = 3004008752 lsquo = 400200 rsquo = 4002008753 ldquo = 300200 rdquo = 4002008754 sbquo = 200500 bdquo = 1505008755 lsaquo = 300400 rsaquo = 2005008756 laquo = 200300 raquo = 1504008757 ( = 200 ) = 2008758 lt= 200200 gt = 2002008759 braceleft = 300 braceright = 2008760 Cyrillic8761 Ж = 50308762 Л = 50 8763 У = 50308764 Ф = 50 8765 Ч = 100 8766 Ъ = 508767 Ь = 508768 Э = 50508769 Я = 50 8770 Ѵ = 50508771 Љ = 50508772 Ԅ = 1401008773 Ԇ = 70508774 Ԉ= 50808775 Ԋ= 808776 Ԏ = 50508777 г = 50508778 д = 50308779 м = 50 8780 ф = 50 8781 ч = 50 8782 ъ = 508783 ь = 508784 э = 508785 я = 50 8786 љ = 50508787 њ = 508788 ѵ = 50508789 ҍ = 508790 ԅ = 1401008791 ԇ = 70508792 ԉ = 50708793 ԋ = 708794 Greek8795 Γ = 1308796 Δ = 50508797 Ψ = 50508798 γ = 7070

OPENTYPE CONFIGURATION FILES Character protrusion 214

8799 λ = 40708800 π = 40508801 ρ = 508802 σ = 508803 χ = 5050

8804

The small caps glyph names in Charis SIL have changed with version 50 of thefont We try to get the names right both with LuaTEX (where we can simply querythe font version) and with XETEX (where we check for glyph name)

88058806 quick and dirty -- maybe wersquoll promote this to a8807 regular key some time8808 definekeyMTprccommandcsname 1endcsname88098810 glyph names have changed with version 50 of Charis SIL8811 before aSC bSC 8812 after asc bsc 8813 ifxMTluaundefined8814 gdefMTgetCHARISSC8815 test whether glyph asc exists8816 ifnumnumexprXeTeXglyphindex ascrelax gt 08817 gdefMTCHARISSCsc8818 else8819 gdefMTCHARISSCSC8820 fi8821 8822 else8823 gdefMTgetCHARISSC8824 gdefMTCHARISSCMTlua8825 check font version8826 -- why doesnrsquot this work8827 f = fontgetfont(fontcurrent())8828 i = fontloaderinfo(ffilename)8829 if (tonumber(iversion) lt 5) then8830 if (tonumber(fontloaderinfo(fontgetfont(fontcurrent())filename)version) lt 5) then8831 texprint(SC)8832 else8833 texprint(sc)8834 end8835 8836 8837 fi88388839 SetProtrusion8840 [ name = Charis-sc8841 load = Charis-default8842 command = MTgetCHARISSC ]8843 encoding = EU1EU2TU8844 family = Charis SIL8845 shape = sc 8846

8847 ᴀ = 100100 etc doesnt work with textsc8848 aMTCHARISSC = 1001008849 cMTCHARISSC = 50 8850 dMTCHARISSC = 508851 fMTCHARISSC = 508852 gMTCHARISSC = 50 8853 jMTCHARISSC = 100 8854 kMTCHARISSC = 508855 lMTCHARISSC = 508856 f_lMTCHARISSC = 508857 oMTCHARISSC = 50508858 oeMTCHARISSC = 50

OPENTYPE CONFIGURATION FILES Character protrusion 215

8859 qMTCHARISSC = 50708860 rMTCHARISSC = 508861 tMTCHARISSC = 501008862 vMTCHARISSC = 50508863 wMTCHARISSC = 50508864 xMTCHARISSC = 50508865 yMTCHARISSC = 5050

8866 8867 langCharisSILrang8868 langPalatinorang8869 SetProtrusion8870 [ name = palatino-default ]8871 encoding = EU1EU2TU8872 family = Palatino 8873

8874 A = 50508875 D = 508876 J = 50 8877 K = 508878 L = 508879 O = 25 8880 T = 50508881 V = 50508882 W = 50508883 X = 50508884 Y = 50508885 b = 258886 d = 25308887 f = 508888 g = 1008889 k = 508890 p = 508891 q = 50 8892 r = 508893 t = 50 = 50 = 508894 v = 75508895 w = 50508896 x = 50508897 y = 50708898 1 = 100508899 2 = 25508900 4 = 50 8901 6 = 50 8902 9 = 25 8903 AElig = 100 8904 Π= 25 8905 = 700 = 350 hellip = 1508906 = 5008907 = 5008908 = 5008909 = 100 = 1008910 = 200 = 2008911 = 50508912 ~ = 2002508913 amp = 501008914 = 1001008915 = 2002008916 + = 2502508917 ( = 100 ) = 3008918 = 2003008919 - = 4005008920 textendash = 300300 textemdash = 2002008921 textquoteleft = 500700 textquoteright = 5007008922 textquotedblleft = 300400 textquotedblright = 3004008923 textbackslash = 200300

OPENTYPE CONFIGURATION FILES Character protrusion 216

8924 quotesinglbase = 400400 quotedblbase = 4004008925 guilsinglleft = 400400 guilsinglright = 3005008926 guillemotleft = 300300 guillemotright = 2004008927 textexclamdown = 100 textquestiondown = 100 8928 textbraceleft = 400200 textbraceright = 2004008929 textless = 200100 textgreater = 1002008930 le = 200100 ge = 1002008931 textminus = 3003008932 texttrademark = 2002008933 textcopyright = 2002008934 textregistered = 2002008935 textdegree = 3003008936 brvbar = 450500 not = 2501508937 = 1502508938 middot = 850 7008939 para = 10008940 times = 150 3008941 ordf = 300300 ordm = 3003008942 ⁰ = 2004008943 sup1 = 400350 sup2 = 200300 sup3 = 2504008944 ⁴ = 250350 ⁵ = 200300 ⁶ = 2504008945 ⁷ = 200450 ⁸ = 250400 ⁹ = 2003508946 ₀ = 2004008947 ₁ = 400250 ₂ = 200300 ₃ = 2504008948 ₄ = 250350 ₅ = 200300 ₆ = 2504008949 ₇ = 200450 ₈ = 250400 ₉ = 2003508950 plusmn = 150100 divide = 3003008951 thorn = 258952 ₊ = 300450 ₋ = 3004508953 ⁺ = 300450 ⁻ = 3004508954 dagger = 200250 Dagger = 2002508955 π = 50 8956 ſ = 508957 = 1001508958 textservicemark = 1002008959 ‐ = 400500 ‑ = 400500 ‒ = 2003008960 ndash = 205305 mdash = 200300 ― = 501508961 bull = 1252008962 asc = 50508963 89648965 SetProtrusion8966 [ name = palatino-it ]8967 encoding = EU1EU2TU8968 family = Palatino8969 shape = itsl 8970

8971 A = 50508972 AElig = 50 8973 B = 50 8974 C = 50 8975 D = 50508976 E = 50 8977 F = 50 8978 G = 50 8979 H = 50 8980 K = 50 8981 L = 50 8982 O = 50 8983 Π= 50 8984 P = 50 8985 Q = 50 8986 R = 50 8987 S = 50 8988 $ = 50

OPENTYPE CONFIGURATION FILES Character protrusion 217

8989 T = 100 8990 U = 50 8991 V = 100508992 W = 50 8993 X = 50 8994 Y = 100508995 b = 508996 c = 25 8997 g = 75 8998 i = 25 8999 m = 509000 n = 509001 p = 259002 q = 25 9003 x = 509004 1 = 100 9005 2 = 50 9006 4 = 50 9007 7 = 50 9008 = 500 = 350 hellip = 2009009 = 5009010 = 3009011 = 3009012 = 300 = 3009013 amp = 50509014 = 1001009015 = 2002009016 + = 1502009017 = 50509018 ~ = 2001509019 ( = 200 ) = 2009020 = 1002009021 - = 3005009022 textendash = 300300 textemdash = 2002009023 textquoteleft = 700400 textquoteright = 7004009024 textquotedblleft = 500300 textquotedblright = 5003009025 _ = 1001009026 textbackslash = 1002009027 quotesinglbase = 500500 quotedblbase = 4004009028 guilsinglleft = 400400 guilsinglright = 3005009029 guillemotleft = 300300 guillemotright = 3003009030 textexclamdown = 100 textquestiondown = 200 9031 textbraceleft = 200100 textbraceright = 2002009032 textless = 300100 textgreater = 2001009033 le = 200100 ge = 1002009034 brvbar = 450500 not = 2501509035 middot = 850 7009036 para = 10009037 times = 150 3009038 ordf = 300250 deg = 300300 ordm = 3002509039 ⁰ = 3002009040 sup1 = 300150 sup2 = 350200 sup3 = 2501509041 ⁴ = 350100 ⁵ = 300 50 ⁶ = 4001009042 ⁷ = 400 50 ⁸ = 250 50 ⁹ = 300 509043 ₀ = 3003009044 ₁ = 300350 ₂ = 300150 ₃ = 2502509045 ₄ = 400200 ₅ = 300100 ₆ = 4502009046 ₇ = 450150 ₈ = 400250 ₉ = 4002009047 plusmn = 150100 divide = 3003009048 thorn = 50 9049 dagger = 250200 Dagger = 2502009050 ₊ = 300450 ₋ = 3004509051 ⁺ = 300450 ⁻ = 3004509052 ‐ = 300500 ‑ = 300500 ‒ = 1003009053 ndash = 125305 mdash = 200300 ― = 125150

OPENTYPE CONFIGURATION FILES Character protrusion 218

9054 bull = 125200

9055 90569057 SetProtrusion9058 [ name = palatino-sc9059 load = palatino-default ]9060 encoding = EU1EU2TU9061 family = Palatino9062 shape = sc 9063

9064 a = 50509065 aelig = 50 9066 b = 0 09067 d = 0 09068 f = 0 09069 g = 0 09070 j = 50 9071 l = 509072 o = 0 09073 p = 0 09074 q = 0 9075 r = 09076 t = 50509077 y = 50509078 fl = 0509079 ffl = 0509080 = 0509081 = 050

9082 9083 langPalatinorang9084 langLatorang No settings yet9085 langFontAwesomerang9086 SetProtrusion9087 [ name = empty ]9088 encoding = TUEU1EU29089 family = FontAwesome 9090 9091 langFontAwesomerang9092

AUXILIARY FILE FOR MICRO FINE TUNING 219

17 Auxiliary file for micro fine tuningThis file can be used to test protrusion and expansion settings

9093 langtestrang9094 documentclassarticle90959096 Here you can specify the font you want to test using9097 the commands fontfamily fontseries and fontshape9098 Make sure to end all lines with a comment character9099 newcommandTestFont9100 fontfamilyppl9101 fontseriesb9102 fontshapeit sc sl9103 91049105 usepackageifthen9106 usepackage[T1]fontenc9107 usepackage[latin1]inputenc9108 usepackage[verboseexpansion=alltextstretch=50]microtype91099110 pagestyleempty9111 setlengthparindent0pt9112 newcommandcrulefillcleadershbox$mkern-2musmash-mkern-2mu$hfill9113 newcommandtestprotrusion[2][]9114 ifthenelseequal1r29115 lorem ipsum dolor sit amet9116 ifthenelseequal1rcrulefillleftarrowfill 29117 ifthenelseequal1lcrulefillrightarrowfill9118 you know the rest9119 ifthenelseequal1l29120 linebreak9121 fontencodingencodingdefault9122 fontseriesseriesdefault9123 fontshapeshapedefault9124 selectfont9125 Here is the beginning of a line dotfill and here is its endlinebreak9126 9127 newcommandshowTestFontexpandafterstripprefixmeaningTestFont9128 defstripprefix1gt9129 newcountcharcount9130 begindocument91319132 microtypesetupexpansion=false91339134 centering The font in this document is called by9135 textttshowTestFontparbigskip91369137 TestFontselectfont9138 This line intentionally left emptylinebreak9139 A -- Z9140 charcount=659141 loop9142 testprotrusioncharcharcount9143 advancecharcount 19144 ifnumcharcount lt 91 repeat9145 a -- z9146 charcount=979147 loop9148 testprotrusioncharcharcount9149 advancecharcount 19150 ifnumcharcount lt 123 repeat9151 0 -- 99152 charcount=489153 loop

AUXILIARY FILE FOR MICRO FINE TUNING 220

9154 testprotrusioncharcharcount9155 advancecharcount 19156 ifnumcharcount lt 58 repeat9157 9158 testprotrusion[r]9159 testprotrusion[r]9160 testprotrusion[r]9161 testprotrusion[r]9162 testprotrusion[r]9163 testprotrusion[r]9164 testprotrusion[l]textexclamdown9165 testprotrusion[l]textquestiondown9166 testprotrusion[r])9167 testprotrusion[l](9168 testprotrusion9169 testprotrusionchar`9170 testprotrusion-9171 testprotrusiontextendash9172 testprotrusiontextemdash9173 testprotrusiontextquoteleft9174 testprotrusiontextquoteright9175 testprotrusiontextquotedblleft9176 testprotrusiontextquotedblright9177 testprotrusionquotesinglbase9178 testprotrusionquotedblbase9179 testprotrusionguilsinglleft9180 testprotrusionguilsinglright9181 testprotrusionguillemotleft9182 testprotrusionguillemotright91839184 newpage9185 The following displays the current font stretched by 59186 normal and shrunk by 591879188 bigskip9189 newlengthMTln9190 newcommandteststring9191 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567899192 settowidthMTlnteststring9193 microtypesetupexpansion=true91949195 parbox105MTlnteststringlinebreak9196 teststringparbigskip9197 parbox095MTlnteststring91989199 enddocument9200 langtestrang

Needless to say that things may always be improved For suggestions mail towmlgmxnet

THE TITLE LOGO 221

A The title logoThis is microtype-logodtx You may treat this file in three different ways

bull compile it by itself

bull input it in the body of a dtx file

bull input it in the preamble it then provides the command printlogo which will do just that

The first two cases require the style file microtype-docsty which can be generated from microtypeins with

makefilemicrotype-docstydocsty

9201 langlogorangHerersquos how the logo on the title page was created30 It has nothing to do with microtype actually but uses fontinstIt is based on an experiment I posted to the decomptexttex newsgroup31 It will show

bull the character

bull the TEX box

bull the bounding box

bull kerns

A1 MacrosTo run this file TEX needs to find the afm file (either in the TEXINPUTS path or in the current working directory)

First input fontinst

9202 input fontinststy

bboxsty is an addition to fontinst which makes dimensions of the bounding boxes available (and was writtenby Hagraven Thecirc Thagravenh by the way) These dimensions are specified in the afm file but not used by TEX which is whyfontinst will discard them otherwise

9203 input bboxsty

tempdim Allocate some dimen registers

9204 newdimentempdim

fboxrulei Frame width of the box as TEX sees it

9205 newdimenfboxrulei9206 fboxrulei=01pt

fboxruleii Frame width of the bounding box

9207 newdimenfboxruleii9208 fboxruleii=01pt

kernboxheight Height of the box indicating the kern

9209 newdimenkernboxheight9210 kernboxheight=5pt

scaletoem An auxiliary macro Return a dimension relative to the em-width of the font Requires e-TEX

9211 setcommandscaletoem1dimexpr 1 spfontdimen6font1000relax

showlogo A fontinst incantation whose sole purpose is to produce the logo Its argument is a string (letters only)

9212 fontinstcc9213 defshowlogo1

Some fonts do not specify the fontdimen6 (width of an em) in the afm file In this case use the font size which iscorrect in most cases

9214 ifdimfontdimen6font = 0pt9215 typeout~Warning~no~fontdimen~6~specified~^^J9216 ~setting~it~to~pdffontsizefont ifnumpdftexversion lt 130 ptfi~9217 fontdimen6font=pdffontsizefont ifnumpdftexversion lt 130 ptfirelax9218 fi9219 installfonts9220 input_metricslogofontmetricsprintbbs1relax

30 Note that the logo module will not be created when installing microtype Instead the source file microtype-logodtx isincluded as an attachment in the PDF file If your PDF reader supports this you can to extract it alternativelyyou may use the pdftk tool

31 Message ID 42aa3687$0$24366$9b4e6d93newsread2arcor-onlinenet

ProvidesFilemicrotype-logodtx[20090608] ^^A dont count the backslashes in this documentmakeatletterletorigstepchecksumstepchecksumletstepchecksumrelaxmakeatother sectionThe title logo labelsectitle-logo^^Aiffalse meta-comment ^^A ======================================================================== This is filemicrotype-logodtx You may treat this file in three different waysbeginitemize item compile it by itself item verb|input| it in the body of a filedtx file item verb|input| it in the preamble it then provides the command verb|printlogo| which will do just thatenditemize The first two cases require the style file filemicrotype-docsty which can be generated from filemicrotypeins withbeginverbatimmakefilemicrotype-docstydocstyendverbatim ^^A ========================================================================^^Afi beginmacrocodeltlogogt endmacrocode Heres how the logo on the title page was createdfootnote Note that the |logo| module will not be created when installing microtype Instead the source file filemicrotype-logodtx is included as an attachment in the acronymPDF file If your acronymPDF reader supports this you can textattachfile [color=002 004 048mimetype=textplain]microtype-logodtx click here to extract it alternatively you may use the |pdftk| tool It has nothing to do with microtype actually but uses pkgfontinst It is based on an experiment I posted to the urldecomptexttex newsgroupfootnote Message ID nolinkurl42aa3687$0$24366$9b4e6d93newsread2arcor-onlinenet It will showbeginitemize item the character item the TeX box item the bounding box item kernsenditemize subsectionMacros To run this file TeX needs to find the fileafm file (either in the |TEXINPUTS| path or in the current working directory) First input pkgfontinst beginmacrocodeinput fontinststy endmacrocode filebboxsty is an addition to pkgfontinst which makes dimensions of the bounding boxes available (and was written by thanh by the way) These dimensions are specified in the fileafm file but not used by TeX which is why pkgfontinst will discard them otherwise beginmacrocodeinput bboxsty endmacrocodebeginmacrotempdim Allocate some dimen registers beginmacrocodenewdimentempdim endmacrocodeendmacrobeginmacrofboxrulei Frame width of the box as TeX sees it beginmacrocodenewdimenfboxruleifboxrulei=01pt endmacrocodeendmacrobeginmacrofboxruleii Frame width of the bounding box beginmacrocodenewdimenfboxruleiifboxruleii=01pt endmacrocodeendmacrobeginmacrokernboxheight Height of the box indicating the kern beginmacrocodenewdimenkernboxheightkernboxheight=5pt endmacrocodeendmacrobeginmacroscaletoem An auxiliary macro Return a dimension relative to the |em|-width of the font Requires etex beginmacrocodesetcommandscaletoem1dimexpr 1 spfontdimen6font1000relax endmacrocodeendmacrobeginmacroshowlogo A pkgfontinst incantation whose sole purpose is to produce the logo Its argument is a string (letters only) beginmacrocodefontinstccdefshowlogo1 endmacrocode Some fonts do not specify the fontdim6 (width of an |em|) in the |afm| file In this case use the font size which is correct in most cases beginmacrocode ifdimfontdimen6font = 0pt typeout~Warning~no~fontdimen~6~specified~^^J ~setting~it~to~pdffontsizefont ifnumpdftexversion lt 130 ptfi~ fontdimen6font=pdffontsizefont ifnumpdftexversion lt 130 ptfirelax fi installfonts input_metricslogofontmetricsprintbbs1relax endinstallfontsnormalcc endmacrocodeendmacro Layers beginmacrocodemakeatletterdefmtllayer12pdfliteralOC1 BDC2pdfliteralEMCifxmtobjectsundefinedletmtobjectsemptyfiifxmtorder undefinedletmtorder emptyfixdefmtordermtorder[(Logo)letmtlresourcesemptydefmtlregister1 immediatepdfobjltlt TypeOCG Name(1) gtgt expandafterxdefcsname mtl1endcsnamethepdflastobjspace 0 R xdefmtobjectsmtobjectscsname mtl1endcsname xdefmtordermtordercsname mtl1endcsname xdefmtlresourcesmtlresources1 csname mtl1endcsnamemtlregistercanvasmtlregistercharactersmtlregisterbounding-boxesmtlregisterTeX-boxesxdefmtordermtorder]globalletmtlobjectsmtobjectsdeftogglelayer12 pdfstartlink width wdlogobox height htlogobox depth dplogobox userSubtypeLink BS ltlt TypeBorderW 0 gtgt HO A ltlt SSetOCGState State[Toggle csname mtl1endcsname] gtgt 2pdfendlink endmacrocodebeginmacroprintbbs Preparation beginmacrocodesetcommandprintbbs1 setbox0hbox1 leavevmode kern-fboxrulei endmacrocode The canvas in the natural width of the text minus protrusion in color |bgcolor| beginmacrocode mtllayercanvas getboundarychars1relax tempdim=dimexprwd0 - (scaletoemlpcodefontfirstchar+ scaletoemrpcodefontlastchar)relax kerndimexprscaletoemlpcodefontfirstcharrelax lowerdimexprdp0+005em relax vboxcolorbgcolor hrule width tempdim height dimexprdp0+ht0+015emrelax kern-tempdim endmacrocode The baseline in color |blcolor| beginmacrocode vboxcolorblcolor hrule width tempdim height fboxrulei kern-dimexprwd0 -scaletoemrpcodefontlastcharrelax endmacrocode The string beginmacrocode printbbss 1relaxrelax endmacrocodeendmacrobeginmacrogetboundarychars Get first~dots beginmacrocodedefgetboundarychars12relax deffirstchar`1 getlastchar12relax endmacrocodeendmacrobeginmacrogetlastchar dots~and last character beginmacrocodedefgetlastchar12 ifxrelax2relax deflastchar`1 else expandaftergetlastchar fi 2 endmacrocodeendmacrobeginmacroprintbbss Loop over all characters of the string beginmacrocodedefprintbbss123relax ifxrelax1relax else ifxrelax2relax printbb1 else printbb12 fi expandafterprintbbss fi 23relax endmacrocodeendmacrobeginmacroprintbb Record the kern between the current and the following character then print the character cmdkerning is a pkgfontinst command beginmacrocodesetcommandprintbb12 setbox0hboxkerning12xdefthekernnumberresult showboxes1 endmacrocode This could be another application beginmacrocode quad w thescaletoemwidth1 bb thescaletoembbleft1 thescaletoembbright1 thescaletoemnumbernumexprwidth1-bbright1relax h height1bbtop1 bbbottom1depth1par endmacrocodeendmacrobeginmacroshowboxes Print the boxes for char meta1 This wont work if meta1 isnt also the PostScript name of the glyph (eg `comma =llap `) beginmacrocodesetcommandshowboxes1 leavevmode colortexcolor endmacrocode We have to record the width of the glyph beginmacrocode setbox0hboxcolortextcolor1 globaltempdim=wd0relax kern-fboxrulei endmacrocodebeginenumerateitem textitThe TeX box Print a frame in color |texcolor| This frame shows the glyph as TeX sees it beginmacrocode mtllayerTeX-boxes hbox lowerdimexpr dp0 + fboxruleirelax hbox vbox hrule heightfboxrulei hbox vrule widthfboxrulei height dimexprht0 + 2fboxruleirelax phantomunhcopy0 vrule widthfboxrulei hrule heightfboxrulei endmacrocodeitem textitThe character Now we step back and print the actual glyph We hold it back until now so that it will be printed emphon top of its box beginmacrocode kern-wd0 mtllayercharactershboxbox0 endmacrocode Step back by the amount that the characters bounding box differs from the TeX box on the left side beginmacrocode kerndimexprscaletoembbleft1-tempdim-fboxruleiirelax endmacrocodeitem textitThe bounding box will be printed in color |bbcolor| beginmacrocode mtllayerbounding-boxes colorbbcolor hbox lowerdimexpr-scaletoembbbottom1+fboxruleiirelax hbox vbox hrule heightfboxruleii hbox to dimexprscaletoemnumexpr bbright1-bbleft1relax+2fboxruleiirelax vrule height dimexprscaletoemnumexpr bbtop1-bbbottom1relax widthfboxruleii hfill vrule widthfboxruleii hrule heightfboxruleii kern-dimexprfboxruleii+fboxruleirelax endmacrocodeitem textitThe kern We also print a small box in color |kerncolor| indicating the kerning between the current and the next character filled for negative kerns empty for positive kerns beginmacrocode kernscaletoemnumexprwidth1-bbright1relax mtllayerTeX-boxes ifnumthekernlt0 colorkerncolor kernscaletoemthekern lowerkernboxheighthboxvrule width -dimexprscaletoemthekernrelax height kernboxheight kernscaletoemthekern else colortexcolor ifnumthekern=0 else lowerkernboxheight hbox vbox hrule heightfboxrulei hbox vrule height kernboxheight widthfboxrulei kerndimexprscaletoemthekern-2fboxruleirelax vrule widthfboxrulei hrule heightfboxrulei fi fi kern-fboxrulei endmacrocodeendenumerateendmacro beginmacrocodenewboxlogoboxdefprintlogo setboxlogobox=hboxvbox MakePercentComment endmacrocode This is the Kepler MM font used in the logo beginmacrocode deflogofontpkpri9e10 transformfontlogofontreencodefont8rfromafmpkpmmri8a10 fontthelogofont=logofontspace at 82pt endmacrocode This would load the italic Palatino font instead beginmacrocodedeflogofontpplritransformfontlogofont8rreencodefont8rfromafmlogofont8aedeflogofontlogofont8rfontthelogofont=logofontspace at 78pt endmacrocode Load the font beginmacrocode thelogofont endmacrocode Protrusion values (overdone for didactic reasons) beginmacrocode lpcodefont`M=96 rpcodefont`e=46 endmacrocode Now we can generate the logo beginmacrocode pdfliteral directSXS gs showlogoMicrotype rlapnormalfontnormalsizeraisebox55ptfootnotemark[1] kern5pt[3baselineskip] longdefmakefntext1 leftskip 0pt parindent 0pt everyparparindent 0pt leavevmodehbox to 15ptthefnmarkhss1 footnotetext[1]This graphic display on a togglelayercanvascanvas the togglelayercharacterscharacters their togglelayerbounding-boxesbounding boxes and togglelayerTeX-boxesTeX boxes edeflogodimenswidth thewdlogobox height thehtlogobox depth thedplogobox immediatepdfobjltltTypeExtGState CA 06 ca 06 BMNormal gtgt immediatepdfxform attr Group ltltTypeGroup STransparency I true CSDeviceRGB gtgt resources Properties ltltmtlresourcesgtgt ExtGState ltlt SXS thepdflastobjspace 0 R gtgt logobox vskip-25baselineskip leavevmode togglelayercharacters pdfrefxformpdflastxform pdfannotlogodimens SubtypeWidget FTBtn T(Logo) F 4 why did I say this AP ltlt N thepdflastxformspace 0 R gtgt AA ltlt E ltlt SSetOCGState State[Toggle mtlcharacters] gtgt X ltlt SSetOCGState State[Toggle mtlcharacters] gtgt D ltlt SSetOCGState State[Toggle csname mtlbounding-boxesendcsname] gtgt U ltlt SSetOCGState State[Toggle csname mtlTeX-boxesendcsname] gtgt gtgt vspace3baselineskip endmacrocode Our font beginmacrocodepdfmapline+pkpmmri8r10 KeplMM-It_385_575_10_ TeXBase1Encoding ReEncodeFont lt8renc ltpkpmmri8a10pfb endmacrocode Define colours (|thered| and |thegreen| are copied from filemicrotypedtx) beginmacrocodedefmtdefinecolors definecolortheredrgb065004007 definecolorthegreenrgb006044008 colorlettexcolorthegreen50 TeX boxes colorletkerncolortexcolor negative kerns colorletbbcolorthered50 bounding box colorletbgcolorblack8 canvas colorletblcolorblack50 baseline colorlettextcolorblack40 text endmacrocode Use with filemicrotypedtx beginmacrocodeifxdocumentclasstwoclasseserror usepackage[xcdraw]xcolor mtdefinecolorselse endmacrocodesubsectionDocument Now we can start the document beginmacrocodedocumentclass[10pta4paper]ltxdocprovidecommandMakePercentCommentrelaxexpandafterdefcsname vermicrotypedtxendcsname29999999 endmacrocode Re-use the preamble from filemicrotypedtx beginmacrocodeusepackagemicrotype-docusepackageattachfilemakeatletterpdfcatalogOCProperties ltlt OCGs [mtobjects] D ltlt Order [mtorder] gtgt gtgtmakeatotherbegindocument endmacrocode You are currently reading this beginmacrocodeDocInputmicrotype-logodtxnewpage And here it isvfillbegincenter printlogo nullendcentervfillexpandafterenddocumentfi endmacrocode Thats it^^A resume counting backslashesmakeatletterletstepchecksumorigstepchecksum^^Amakeatother beginmacrocodeltlogogt endmacrocodeendinput

THE TITLE LOGO Macros 222

9221 endinstallfonts9222 9223 normalcc

Layers

9224 makeatletter9225 defmtllayer12pdfliteralOC1 BDC2pdfliteralEMC9226 ifxmtobjectsundefinedletmtobjectsemptyfi9227 ifxmtorder undefinedletmtorder emptyfi9228 xdefmtordermtorder[(Logo)9229 letmtlresourcesempty9230 defmtlregister19231 immediatepdfobjltlt TypeOCG Name(1) gtgt9232 expandafterxdefcsname mtl1endcsnamethepdflastobjspace 0 R 9233 xdefmtobjectsmtobjectscsname mtl1endcsname9234 xdefmtordermtordercsname mtl1endcsname9235 xdefmtlresourcesmtlresources1 csname mtl1endcsname9236 mtlregistercanvas9237 mtlregistercharacters9238 mtlregisterbounding-boxes9239 mtlregisterTeX-boxes9240 xdefmtordermtorder]9241 globalletmtlobjectsmtobjects9242 deftogglelayer129243 pdfstartlink width wdlogobox height htlogobox depth dplogobox9244 userSubtypeLink9245 BS ltlt TypeBorderW 0 gtgt HO9246 A ltlt SSetOCGState9247 State[Toggle csname mtl1endcsname] gtgt9248 2pdfendlink9249

printbbs Preparation

9250 setcommandprintbbs19251 setbox0hbox19252 leavevmode9253 kern-fboxrulei

The canvas in the natural width of the text minus protrusion in color bgcolor

9254 mtllayercanvas9255 getboundarychars1relax9256 tempdim=dimexprwd0 - (scaletoemlpcodefontfirstchar+9257 scaletoemrpcodefontlastchar)relax9258 kerndimexprscaletoemlpcodefontfirstcharrelax9259 lowerdimexprdp0+005em relax vboxcolorbgcolor9260 hrule width tempdim9261 height dimexprdp0+ht0+015emrelax9262 kern-tempdim

The baseline in color blcolor

9263 vboxcolorblcolor9264 hrule width tempdim9265 height fboxrulei9266 9267 kern-dimexprwd0 -scaletoemrpcodefontlastcharrelax

The string

9268 printbbss 1relaxrelax9269

getboundarychars Get first

9270 defgetboundarychars12relax9271 deffirstchar`19272 getlastchar12relax9273

getlastchar and last character

9274 defgetlastchar12

THE TITLE LOGO Macros 223

9275 ifxrelax2relax9276 deflastchar`19277 else9278 expandaftergetlastchar9279 fi 29280

printbbss Loop over all characters of the string

9281 defprintbbss123relax9282 ifxrelax1relax9283 else9284 ifxrelax2relax9285 printbb19286 else9287 printbb129288 fi9289 expandafterprintbbss9290 fi 23relax9291

printbb Record the kern between the current and the following character then print the character kerning is a fontinstcommand

9292 setcommandprintbb129293 setbox0hboxkerning12xdefthekernnumberresult9294 showboxes1

This could be another application

9295 quad9296 w thescaletoemwidth19297 bb thescaletoembbleft19298 thescaletoembbright19299 thescaletoemnumbernumexprwidth1-bbright1relax9300 h height1bbtop1 bbbottom1depth1par9301

showboxes Print the boxes for char lang1rang This wonrsquot work if lang1rang isnrsquot also the PostScript name of the glyph (eg lsquocommarsquo = lsquorsquo)

9302 setcommandshowboxes19303 leavevmode9304 colortexcolor

We have to record the width of the glyph

9305 setbox0hboxcolortextcolor19306 globaltempdim=wd0relax9307 kern-fboxrulei

1 The TEX box Print a frame in color texcolor This frame shows the glyph as TEX sees it

9308 mtllayerTeX-boxes9309 hbox9310 lowerdimexpr dp0 + fboxruleirelax9311 hbox9312 vbox9313 hrule heightfboxrulei9314 hbox9315 vrule widthfboxrulei height dimexprht0 + 2fboxruleirelax9316 phantomunhcopy09317 vrule widthfboxrulei9318 9319 hrule heightfboxrulei9320

2 The character Now we step back and print the actual glyph We hold it back until now so that it will be printedon top of its box

9321 kern-wd09322 mtllayercharactershboxbox0

Step back by the amount that the characterrsquos bounding box differs from the TEX box on the left side

9323 kerndimexprscaletoembbleft1-tempdim-fboxruleiirelax

THE TITLE LOGO Macros 224

3 The bounding box will be printed in color bbcolor

9324 mtllayerbounding-boxes9325 colorbbcolor9326 hbox9327 lowerdimexpr-scaletoembbbottom1+fboxruleiirelax9328 hbox9329 vbox9330 hrule heightfboxruleii9331 hbox to dimexprscaletoemnumexpr9332 bbright1-bbleft1relax+2fboxruleiirelax9333 vrule height dimexprscaletoemnumexpr9334 bbtop1-bbbottom1relax9335 widthfboxruleii9336 hfill9337 vrule widthfboxruleii9338 hrule heightfboxruleii9339 9340 kern-dimexprfboxruleii+fboxruleirelax9341

4 The kern We also print a small box in color kerncolor indicating the kerning between the current and the nextcharacter filled for negative kerns empty for positive kerns

9342 kernscaletoemnumexprwidth1-bbright1relax9343 mtllayerTeX-boxes9344 ifnumthekernlt09345 colorkerncolor9346 kernscaletoemthekern9347 lowerkernboxheighthboxvrule width -dimexprscaletoemthekernrelax9348 height kernboxheight9349 kernscaletoemthekern9350 else9351 colortexcolor9352 ifnumthekern=0 else9353 lowerkernboxheight9354 hbox9355 vbox9356 hrule heightfboxrulei9357 hbox9358 vrule height kernboxheight widthfboxrulei9359 kerndimexprscaletoemthekern-2fboxruleirelax9360 vrule widthfboxrulei9361 9362 hrule heightfboxrulei9363 fi9364 fi9365 9366 9367 kern-fboxrulei9368

9369 newboxlogobox9370 defprintlogo9371 setboxlogobox=hboxvbox9372 MakePercentComment

This is the Kepler MM font used in the logo

9373 deflogofontpkpri9e109374 transformfontlogofontreencodefont8rfromafmpkpmmri8a109375 fontthelogofont=logofontspace at 82pt

This would load the italic Palatino font instead

9376 deflogofontpplri9377 transformfontlogofont8rreencodefont8rfromafmlogofont8a9378 edeflogofontlogofont8r9379 fontthelogofont=logofontspace at 78pt

Load the font

THE TITLE LOGO Macros 225

9380 thelogofont

Protrusion values (overdone for didactic reasons)

9381 lpcodefont`M=969382 rpcodefont`e=46

Now we can generate the logo

9383 pdfliteral directSXS gs9384 showlogoMicrotype9385 rlapnormalfontnormalsizeraisebox55ptfootnotemark[1]9386 kern5pt[3baselineskip]9387 longdefmakefntext19388 leftskip 0pt9389 parindent 0pt9390 everyparparindent 0pt9391 leavevmodehbox to 15ptthefnmarkhss19392 footnotetext[1]This graphic display on a9393 togglelayercanvascanvas the togglelayercharacterscharacters9394 their togglelayerbounding-boxesbounding boxes9395 and togglelayerTeX-boxesTeX boxes9396 9397 edeflogodimenswidth thewdlogobox height thehtlogobox depth thedplogobox9398 immediatepdfobjltltTypeExtGState CA 06 ca 06 BMNormal gtgt9399 immediatepdfxform9400 attr Group ltltTypeGroup STransparency I true CSDeviceRGB gtgt9401 resources Properties ltltmtlresourcesgtgt9402 ExtGState ltlt SXS thepdflastobjspace 0 R gtgt 9403 logobox9404 vskip-25baselineskip9405 leavevmode9406 togglelayercharacters9407 pdfrefxformpdflastxform9408 9409 pdfannotlogodimens9410 SubtypeWidget FTBtn T(Logo)9411 F 4 why did I say this9412 AP ltlt N thepdflastxformspace 0 R gtgt9413 AA ltlt E ltlt SSetOCGState State[Toggle mtlcharacters] gtgt9414 X ltlt SSetOCGState State[Toggle mtlcharacters] gtgt9415 D ltlt SSetOCGState State[Toggle csname mtlbounding-boxesendcsname] gtgt9416 U ltlt SSetOCGState State[Toggle csname mtlTeX-boxesendcsname] gtgt9417 gtgt 9418 vspace3baselineskip9419

Our font

9420 pdfmapline+pkpmmri8r10 KeplMM-It_385_575_10_ TeXBase1Encoding ReEncodeFont lt8renc ltpkpmmri8a10pfb

Define colours (thered and thegreen are copied from microtypedtx)

9421 defmtdefinecolors9422 definecolortheredrgb0650040079423 definecolorthegreenrgb0060440089424 colorlettexcolorthegreen50 TeX boxes9425 colorletkerncolortexcolor negative kerns9426 colorletbbcolorthered50 bounding box9427 colorletbgcolorblack8 canvas9428 colorletblcolorblack50 baseline9429 colorlettextcolorblack40 text9430

Use with microtypedtx

9431 ifxdocumentclasstwoclasseserror9432 usepackage[xcdraw]xcolor9433 mtdefinecolors9434 else

THE LETTERSPACING ILLUSTRATION Document 226

A2 DocumentNow we can start the document

9435 documentclass[10pta4paper]ltxdoc9436 providecommandMakePercentCommentrelax9437 expandafterdefcsname vermicrotypedtxendcsname29999999

Re-use the preamble from microtypedtx

9438 usepackagemicrotype-doc9439 usepackageattachfile9440 makeatletter9441 pdfcatalogOCProperties ltlt OCGs [mtobjects] D ltlt Order [mtorder] gtgt gtgt9442 makeatother9443 begindocument

You are currently reading this

9444 DocInputmicrotype-logodtx9445 newpage9446 And here it is9447 vfill9448 begincenter9449 printlogo null9450 endcenter9451 vfill9452 expandafterenddocument9453 fi

Thatrsquos it

9454 langlogorang

B The letterspacing illustrationThis is microtype-lssampledtx You may treat this file in three different ways

bull compile it by itself

bull input it in the body of a dtx file

bull input it in the preamble it then provides the commands

ndash lssample prints the letterspacing illustration

ndash anchorarrow anchors an arrow for layer lang1rangndash showarrow toggles layer lang1rang or lang2rang and prints lang2rang

The first two cases require the style file microtype-docsty which can be generated from microtypeins with

makefilemicrotype-docstydocsty

9455 ifxlssampleundefined9456 langlssamplerang

Upon popular request herersquos how Irsquove created the letterspacing illustration32

B1 MacrosRule width and image height and depth

9457 makeatletter9458 newdimenlsamount9459 newdimenlsrule9460 lsrule=02pt9461 deflsheight8pt9462 deflsdepth12pt

32 Note that the lssample module will not be created when installing microtype Instead the source filemicrotype-lssampledtx is included as an attachment in the PDF file If your PDF reader supports this you can

to extract it alternatively you may use the pdftk tool

ProvidesFilemicrotype-lssampledtx[20090608] ^^A dont count the backslashes in this documentmakeatletterletorigstepchecksumstepchecksumletstepchecksumrelaxmakeatother sectionThe letterspacing illustration labelsecletterspace-ill^^Aiffalse meta-comment ^^A ======================================================================== This is filemicrotype-lssampledtx You may treat this file in three different waysbeginitemize item compile it by itself item verb|input| it in the body of a filedtx file item verb|input| it in the preamble it then provides the commands beginitemize item verb|lssample| prints the letterspacing illustration item verb|anchorarrow| anchors an arrow for layer meta1 item verb|showarrow| toggles layer meta1 or meta2 and prints meta2 enditemizeenditemize The first two cases require the style file filemicrotype-docsty which can be generated from filemicrotypeins withbeginverbatimmakefilemicrotype-docstydocstyendverbatim ^^A ========================================================================^^Afi beginmacrocodeifxlssampleundefinedltlssamplegt endmacrocode Upon popular request heres how Ive created the letterspacing illustrationfootnote Note that the |lssample| module will not be created when installing microtype Instead the source file filemicrotype-lssampledtx is included as an attachment in the acronymPDF file If your acronymPDF reader supports this you can textattachfile [color=002 004 048mimetype=textplain]microtype-lssampledtx click here to extract it alternatively you may use the |pdftk| tool subsectionMacros Rule width and image height and depth beginmacrocodemakeatletternewdimenlsamountnewdimenlsrulelsrule=02ptdeflsheight8ptdeflsdepth12pt endmacrocode Our font (Adobe Caslon) beginmacrocodedeflsfontfontfamilypacaselectfont endmacrocode Loop over all letters in meta2 letterspacing them by meta1 beginmacrocodedefdols12lsamount=1relax dolss2enddolsdefdolss12enddols ifxempty2emptydividelsamount 2fi ls1 ifxempty2emptyelse dolss2enddols fi endmacrocode One pkgtikz picture for each letter beginmacrocodedefls1 begintikzpicture[remember pictureline width=lsrule] tikzstyleevery node=[inner sep=0pt] endmacrocode The bounding box beginmacrocode mtslayerstuff node[draw=thegrey fill=theshade outer sep=lsrule anchor=base font=lsfont]phantom1 endmacrocode The letter beginmacrocode node[anchor=basefont=lsfont](1)1 endmacrocode Two auxiliary coordinates beginmacrocode path (1south west) ++(+5lsrule-5lsrule) coordinate (1L) path (1base east) ++(-5lsrule-lsdepth) coordinate (1R) mtslayerstuff endmacrocode Now draw the normal character width beginmacrocode draw[color=thered75 fill=thered30 outer sep=lsrule] (1L) rectangle (1R) ifdimlsamountgt0pt path (1base east) ++(+5lsamount-6pt) coordinate (1_ls) path (1R) ++(lsamount+lsrule+lsdepth) coordinate (1E) endmacrocode and the letter space beginmacrocode draw[color=thered fill=thered50 outer sep=lsrule] (1R) ++(+lsrule+0pt) rectangle (1E) fi endtikzpicture ignorespaces endmacrocode Draw the interword space beginmacrocodedeflssp1234 begintikzpicture[remember pictureline width=lsruleinner sep=0pt] mtslayerstuff tikzstyleevery draw=[anchor=bottom] coordinate(1space) at (22lsdepth2) coordinate(1stretch) at (2+32+0pt) coordinate(1shrink) at (2-42+0pt) draw[color=thegreenfill=thegreen50use as bounding box] (00) rectangle ++(+2+lsdepth) draw[color=thegreenfill=thegreen30] (+2-lsrule) rectangle ++(+3-4pt+lsrule) draw[color=thegreenfill=thegreen50] (+2-lsrule) rectangle ++(-4-4pt+lsrule) draw[-gtline width=03ptshorten lt=05lsrulecolor=thegreen50] (+2-2pt-5lsrule) -- ++(+3+0pt) draw[-gtline width=03ptshorten lt=05lsrulecolor=thegreen30] (+2-2pt-5lsrule) -- ++(-4+0pt) endtikzpicture ignorespaces endmacrocode Layers beginmacrocodedefmtslayer12pdfliteral pageOC1 BDC2pdfliteral pageEMCdefmtsxlayer12pdfliteral pageOCstuff BDC OC1 BDC2pdfliteral pageEMC EMCifxmtobjectsundefinedletmtobjectsemptyfiifxmtorder undefinedletmtorder emptyfixdefmtordermtorder[(Sheep)letmtsresourcesemptydefmtsregister1 immediatepdfobjltlt TypeOCG Name(1) gtgt expandafterxdefcsname mts1endcsnamethepdflastobjspace 0 R xdefmtobjectsmtobjectscsname mts1endcsname xdefmtordermtordercsname mts1endcsname xdefmtsresourcesmtsresources1 csname mts1endcsnamemtsregisterstuffmtsregistertrackingmtsregisterispacemtsregisterospacemtsregisteristretchmtsregisterishrinkmtsregisterostretchmtsregisteroshrinkmtsregisterokernmtsregisterligaturemtsregister_compatibilityxdefmtordermtorder] endmacrocode Anchor point for the arrow in the code beginmacrocodenewcommandanchorarrow[1] tikz[remember pictureoverlay]node(1_c) endmacrocode Add an arrow from code to image beginmacrocodenewcommandaddarrow[5][left] tikz[remember pictureoverlaybend angle=14looseness=075gt=latex] mtsxlayer3draw[-gtthickcolor=the2](4) to[bend 1] (5) endmacrocode Toggle layer beginmacrocodedeftogglelayer123 pdfstartlink userSubtypeLink BS ltlt TypeBorderW 0 gtgt HO BS ltlt TypeBorderW 1 SD D[4 1] gtgt C[07 07 07] HO Contents(Click to Toggle) A ltlt SSetOCGState State[Toggle csname mts1endcsname] gtgt rlap2 fboxsep=0pt fboxrule=0pt mtsxlayerstuff rlapfcolorboxwhitewhitevphantomkgcolorthe32 mtsxlayer1 fcolorboxwhitethe350vphantomkgcolorwhite2 pdfendlinknewcommandshowarrow[2][] ifxrelax1relaxdeftempa2elsedeftempa1fi togglelayertempaitshape 2 endmacrocode The environment for our illustration beginmacrocodedeflssample1 parskip 4pt parindent 0pt par vskip4pt leftskip 15pt mtpseudomargcolortheblueClick on the image to show the kerns and spacings involved Click on emphasised words in the text below to reveal the relation of image and codestrut mtlayer_compatibility mtplacerlaphskip-marginparwidth colorwhite vrule widthdimexprhsize+marginparwidthrelax heightmtunvdimen mtpseudomargcolorthered If you had a acronymPDF viewer that understands acronymPDFsmaller15 you could hide the arrows selectively vskip-mtunvdimen vskip-4pt setlengthfboxsep4pt leavevmode pdfstartlink userSubtypeLink BS ltlt TypeBorderW 0 gtgt HO A ltlt SSetOCGState State[Toggle mtsstuff] gtgt fcolorboxtheframetheshade fontsize3438selectfont 1 pdfendlink parmedskip edefxpdfpageresourcesProperties ltltmtsresourcesgtgtx endmacrocode Now define the illustration to be used in the document beginmacrocodedeflssample lssample dols0ptStop lsspo045em025em015em dols016emstealinghskip-dimexpr 008em+lsrulerelax lsspi1382pt465pt208pt dols016emsheep dols0pt endmacrocode Dont forget to add the arrows beginmacrocode vspace-baselineskip addarrowred trackinglsamount_ceasta_ls addarrowred okern okernend_ceastp_ls addarrowgreen ospace ospace_ceast ospace addarrowgreen ispace ispace_ccenterispace addarrowgreen75 istretchistretch_ceastistretchnorth addarrowgreen75 ishrink ishrink_cwest ishrinknorth addarrowgreen75 ostretchostretch_ceastostretchnorth addarrowgreen75 oshrink oshrink_ceast oshrinknorth addarrow[right]greyligaturenolig_ceast stcenterfi endmacrocode This is for use with filemicrotypedtx beginmacrocodeifxdocumentclasstwoclasseserror usepackagetikzelse endmacrocodesubsectionDocument beginmacrocodedocumentclass[10pta4paper]ltxdocexpandafterdefcsname vermicrotypedtxendcsname29999999 endmacrocode Re-use the preamble from filemicrotypedtx beginmacrocodeusepackagemicrotype-docusepackageattachfileusepackagetikzmakeatletterpdfcatalogOCProperties ltlt OCGs [mtobjects] D ltlt Order [mtorder] BaseStateOFF gtgt gtgt makeatotherbegindocument endmacrocode You are currently reading this beginmacrocodeDocInputmicrotype-lssampledtx endmacrocode Now show what we are able to do beginmacrocodenoindent Since a picture is worth a thousand words probably even more if in our case it depicts a couple of letterspaced words lets bring one to sum up these somewhat confusing options Suppose you had the following settings (which I would in no way recommend they are only for illustrative purposes)beginverbatimSetTracking [ no ligatures = anchorarrownoligf spacing = 60anchorarrowispace0 -1anchorarrowistretch00 anchorarrowishrink outer spacing = 4anchorarrowospace50 2anchorarrowostretch501anchorarrowoshrink50 outer kerning = anchorarrowokernbegin anchorarrowokernend ] encoding = 1anchorarrowlsamount60 endverbatim and then writebeginverbatimStop textlsstealing sheependverbatim this is the (typographically dubious) outcome lssamplenoindent While the word `Stop is not letterspaced the space between the letters in the other two words is expanded by the showarrow[tracking]tracking~amountred of 1601000em=allowbreak016em The showarrow[ispace]inner~spacegreen within the letterspaced text is increased by 60 while its showarrow[istretch]stretchgreen amount is decreased by 10 and the showarrow[ishrink]shrinkgreen amount is left untouched The showarrow[ospace]outer~spacegreen (of 045em) immediately before the piece of text may showarrow[ostretch]stretchgreen by 025em and showarrow[oshrink]shrinkgreen by 015em Note that there is no outer space after the text since the exclamation mark immediately follows instead the default showarrow[okern]outer~kernred of half the letterspace amount (008em) is added Furthermore one showarrowligaturegrey wasnt broken up because we neglected to specify the `|s| in the |no ligatures| keyexpandafterenddocumentfi endmacrocode^^A resume counting backslashesmakeatletterletstepchecksumorigstepchecksum^^Amakeatother beginmacrocodeltlssamplegt endmacrocodenewpageendinput

THE LETTERSPACING ILLUSTRATION Macros 227

Our font (Adobe Caslon)

9463 deflsfontfontfamilypacaselectfont

Loop over all letters in lang2rang letterspacing them by lang1rang9464 defdols12lsamount=1relax dolss2enddols9465 defdolss12enddols9466 ifxempty2emptydividelsamount 2fi9467 ls19468 ifxempty2emptyelse dolss2enddols fi9469

One tikz picture for each letter

9470 defls19471 begintikzpicture[remember pictureline width=lsrule]9472 tikzstyleevery node=[inner sep=0pt]

The bounding box

9473 mtslayerstuff9474 node[draw=thegrey9475 fill=theshade9476 outer sep=lsrule9477 anchor=base9478 font=lsfont]phantom19479

The letter

9480 node[anchor=basefont=lsfont](1)1

Two auxiliary coordinates

9481 path (1south west) ++(+5lsrule-5lsrule) coordinate (1L)9482 path (1base east) ++(-5lsrule-lsdepth) coordinate (1R)9483 mtslayerstuff

Now draw the normal character width

9484 draw[color=thered759485 fill=thered309486 outer sep=lsrule]9487 (1L) rectangle (1R)9488 ifdimlsamountgt0pt9489 path (1base east) ++(+5lsamount-6pt) coordinate (1_ls)9490 path (1R) ++(lsamount+lsrule+lsdepth) coordinate (1E)

and the letter space

9491 draw[color=thered9492 fill=thered509493 outer sep=lsrule]9494 (1R) ++(+lsrule+0pt) rectangle (1E)9495 fi9496 9497 endtikzpicture9498 ignorespaces9499

Draw the interword space

9500 deflssp12349501 begintikzpicture[remember pictureline width=lsruleinner sep=0pt]9502 mtslayerstuff9503 tikzstyleevery draw=[anchor=bottom]9504 coordinate(1space) at (22lsdepth2)9505 coordinate(1stretch) at (2+32+0pt)9506 coordinate(1shrink) at (2-42+0pt)9507 draw[color=thegreenfill=thegreen50use as bounding box]9508 (00) rectangle ++(+2+lsdepth)9509 draw[color=thegreenfill=thegreen30]9510 (+2-lsrule) rectangle ++(+3-4pt+lsrule)9511 draw[color=thegreenfill=thegreen50]9512 (+2-lsrule) rectangle ++(-4-4pt+lsrule)9513 draw[-gtline width=03ptshorten lt=05lsrulecolor=thegreen50]

THE LETTERSPACING ILLUSTRATION Macros 228

9514 (+2-2pt-5lsrule) -- ++(+3+0pt)9515 draw[-gtline width=03ptshorten lt=05lsrulecolor=thegreen30]9516 (+2-2pt-5lsrule) -- ++(-4+0pt)9517 9518 endtikzpicture9519 ignorespaces9520

Layers

9521 defmtslayer12pdfliteral pageOC1 BDC2pdfliteral pageEMC9522 defmtsxlayer12pdfliteral pageOCstuff BDC OC1 BDC2pdfliteral pageEMC EMC9523 ifxmtobjectsundefinedletmtobjectsemptyfi9524 ifxmtorder undefinedletmtorder emptyfi9525 xdefmtordermtorder[(Sheep)9526 letmtsresourcesempty9527 defmtsregister19528 immediatepdfobjltlt TypeOCG Name(1) gtgt9529 expandafterxdefcsname mts1endcsnamethepdflastobjspace 0 R 9530 xdefmtobjectsmtobjectscsname mts1endcsname9531 xdefmtordermtordercsname mts1endcsname9532 xdefmtsresourcesmtsresources1 csname mts1endcsname9533 mtsregisterstuff9534 mtsregistertracking9535 mtsregisterispace9536 mtsregisterospace9537 mtsregisteristretch9538 mtsregisterishrink9539 mtsregisterostretch9540 mtsregisteroshrink9541 mtsregisterokern9542 mtsregisterligature9543 mtsregister_compatibility9544 xdefmtordermtorder]

Anchor point for the arrow in the code

9545 newcommandanchorarrow[1]9546 tikz[remember pictureoverlay]node(1_c)

Add an arrow from code to image

9547 newcommandaddarrow[5][left]9548 tikz[remember pictureoverlaybend angle=14looseness=075gt=latex]9549 mtsxlayer3draw[-gtthickcolor=the2](4) to[bend 1] (5)9550

Toggle layer

9551 deftogglelayer1239552 pdfstartlink9553 userSubtypeLink9554 BS ltlt TypeBorderW 0 gtgt HO9555 BS ltlt TypeBorderW 1 SD D[4 1] gtgt9556 C[07 07 07] HO9557 Contents(Click to Toggle)9558 A ltlt SSetOCGState9559 State[Toggle csname mts1endcsname] gtgt 9560 rlap29561 fboxsep=0pt fboxrule=0pt9562 mtsxlayerstuff9563 rlapfcolorboxwhitewhitevphantomkgcolorthe329564 mtsxlayer19565 fcolorboxwhitethe350vphantomkgcolorwhite29566 9567 pdfendlink9568 9569 newcommandshowarrow[2][]9570 ifxrelax1relaxdeftempa2elsedeftempa1fi9571 togglelayertempaitshape 2

THE LETTERSPACING ILLUSTRATION Document 229

The environment for our illustration

9572 deflssample19573 parskip 4pt parindent 0pt9574 par9575 vskip4pt9576 leftskip 15pt9577 mtpseudomargcolortheblueClick on the image to show the kerns9578 and spacings involved Click on emphasised words in the text below9579 to reveal the relation of image and codestrut9580 mtlayer_compatibility9581 mtplacerlaphskip-marginparwidth colorwhite9582 vrule widthdimexprhsize+marginparwidthrelax heightmtunvdimen9583 mtpseudomargcolorthered9584 If you had a acronymPDF viewer that understands9585 acronymPDFsmaller15 you could hide the arrows selectively9586 vskip-mtunvdimen9587 vskip-4pt9588 setlengthfboxsep4pt9589 leavevmode9590 pdfstartlink9591 userSubtypeLink9592 BS ltlt TypeBorderW 0 gtgt HO9593 A ltlt SSetOCGState9594 State[Toggle mtsstuff] gtgt 9595 fcolorboxtheframetheshade9596 fontsize3438selectfont 19597 pdfendlink9598 parmedskip9599 9600 edefxpdfpageresourcesProperties ltltmtsresourcesgtgtx9601

Now define the illustration to be used in the document

9602 deflssample9603 lssample9604 dols0ptStop9605 lsspo045em025em015em9606 dols016emstealinghskip-dimexpr 008em+lsrulerelax9607 lsspi1382pt465pt208pt9608 dols016emsheep9609 dols0pt9610

Donrsquot forget to add the arrows

9611 vspace-baselineskip9612 addarrowred trackinglsamount_ceasta_ls9613 addarrowred okern okernend_ceastp_ls9614 addarrowgreen ospace ospace_ceast ospace9615 addarrowgreen ispace ispace_ccenterispace9616 addarrowgreen75 istretchistretch_ceastistretchnorth9617 addarrowgreen75 ishrink ishrink_cwest ishrinknorth9618 addarrowgreen75 ostretchostretch_ceastostretchnorth9619 addarrowgreen75 oshrink oshrink_ceast oshrinknorth9620 addarrow[right]greyligaturenolig_ceast stcenter9621 9622 fi

This is for use with microtypedtx

9623 ifxdocumentclasstwoclasseserror9624 usepackagetikz9625 else

B2 Document9626 documentclass[10pta4paper]ltxdoc9627 expandafterdefcsname vermicrotypedtxendcsname29999999

THE LETTERSPACING ILLUSTRATION Document 230

Re-use the preamble from microtypedtx9628 usepackagemicrotype-doc9629 usepackageattachfile9630 usepackagetikz9631 makeatletter9632 pdfcatalogOCProperties ltlt OCGs [mtobjects]9633 D ltlt Order [mtorder] BaseStateOFF gtgt gtgt 9634 makeatother9635 begindocument

You are currently reading this9636 DocInputmicrotype-lssampledtx

Now show what we are able to do9637 noindent9638 Since a picture is worth a thousand words probably even more if in our9639 case it depicts a couple of letterspaced words letrsquos bring one to sum up9640 these somewhat confusing options Suppose you had the following settings9641 (which I would in no way recommend they are only for illustrative purposes)9642 beginverbatim9643 SetTracking9644 [ no ligatures = anchorarrownoligf9645 spacing = 60anchorarrowispace09646 -1anchorarrowistretch00 anchorarrowishrink9647 outer spacing = 4anchorarrowospace509648 2anchorarrowostretch501anchorarrowoshrink509649 outer kerning = anchorarrowokernbegin9650 anchorarrowokernend ]9651 encoding = 9652 1anchorarrowlsamount60 9653 endverbatim9654 and then write9655 beginverbatim9656 Stop textlsstealing sheep9657 endverbatim9658 this is the (typographically dubious) outcome96599660 lssample96619662 noindent9663 While the word `Stoprsquo is not letterspaced the space between the letters in9664 the other two words is expanded by the showarrow[tracking]tracking~amountred9665 of 1601000em=allowbreak016em9666 The showarrow[ispace]inner~spacegreen within the letterspaced text is9667 increased by 60 while its showarrow[istretch]stretchgreen amount is9668 decreased by 10 and the showarrow[ishrink]shrinkgreen amount is left9669 untouched9670 The showarrow[ospace]outer~spacegreen (of 045em) immediately before the9671 piece of text may showarrow[ostretch]stretchgreen by 025em and9672 showarrow[oshrink]shrinkgreen by 015em9673 Note that there is no outer space after the text since the exclamation mark9674 immediately follows instead the default showarrow[okern]outer~kernred9675 of half the letterspace amount (008em) is added9676 Furthermore one showarrowligaturegrey wasnrsquot broken up because we9677 neglected to specify the `|s|rsquo in the |no ligatures| key96789679 expandafterenddocument9680 fi

9681 langlssamplerang

CHANGE HISTORY 231

C Change history

20040911 Version 10

General Initial version 1

20040921 Version 11

General configuration file names in lowercase (sug-gested by Harald Harders) 87

remove 8-bit characters from the configuration files(suggested by Harald Harders) 147

Protrusion add factors for some more characters 154settings for Adobe Minion (contributed by Harald

Harders) 155DeclareCharacterInheritance new command pos-

sibility to specify character inheritance 120MTdeclaresets remove spaces around set name 106MTfindfile fix also check whether the file for

the base font family has already been loaded 87MTgetbasefamily only remove suffixes lsquoxrsquo or lsquojrsquo 88MTgetlistname donrsquot check for empty attributes

list 89MTifempty fix use category code 12 for the percent

character (reported by Tom Kink) 45MTisnumber numbers may also be specified in

hexadecimal or octal (suggested by HaraldHarders) 94

MTpdftexno fix version check (reported by HaraldHarders) 40

MTpermute donrsquot use sets for empty encoding 121MTsetupexpansion issue an error instead of a

warning when pdfTEX version is too old forautoexpand 137

MTsplitcodes fix allow zero and negative values 63MTuseset remove spaces around set name 110

20041003 Version 12

Font aliases declare cmor as an alias of cmr 144Font sets new allmath and basicmath 143Protrusion add settings for Computer Modern Roman

and Adobe Garamond in TS1 encoding 178add settings for Computer Modern Roman math

symbols 183MTfamilyalias define alias font name as an altern-

ative not as a replacement 60MTgetbasefamily also remove lsquowrsquo (swash capit-

als) 88MTgethighlevel check whether defaults have

changed 106

MTgetinhlist fix set inheritance list globallyto empty 91

MTgetlistname alternatively check for alias fontname 89

MTgetsize additional magic to catch some errors 108MTgetsize hijack setfontsize instead of

setfontsize 108MTloop fix new macro used instead of loop 49MTmaybedo also check for alias font name 60MTpermute more sanity checks for

SetProtrusion and SetExpansion 123MTsetupfont also search for alias font file 57

fix call encupdate if necessary 57

20041027 Version 13

General fix specifying load option does no longerrequire to give a name too 116

Font aliases declare aer zer and hfor as aliases ofcmr 144

MTfixcatcode check some category codes (com-patibility with german) 35

MTloadlist check whether list exists 87

20041112 Version 14

General check for pdfcprot 54donrsquot use scratch registers in global definitions 91use pickupfont instead of definenewfont as

the hook for MTsetupfont 100use one instead of five counters 50

Protrusion tweak quote characters for cmr variants

(OT1 T1 lmr) 160microtypesetup fix set the correct levels and re-

member them warning when enabling an optiondisabled in package options 131

SetExpansion fix specifying extra options does nolonger require to give a name too 113

20041117 Version 14a

General new option final 128MTcfgcatcodes fix reset some more catcodes

when reading files (reported by Michael Hoppe) 88

CHANGE HISTORY 232

20041126 Version 14b

General fix set catcodes before reading global con-figuration file (reported by Christoph Bier) 130

optimisation use less expandafters and csnames 44Protrusion harmonise dashes in upshape and italic

(cmr pad ppl) 154slanted like italics 163

MTchecklistfamily fix donrsquot try alias familyname if encoding failed 61

MTgetbasefamily fix failed for font names of the

form abczz (reported by Georg Verweyen) 88MTgetslot donrsquot define MTchar globally (save

stack problem) 91MTifdimen donrsquot set MTcount globally (save stack

problem) 46MTsetupPDF new message if pdfoutput is

changed 134MTuseset donrsquot use undeclared font sets 110

20041215 Version 15

General defaults step 4 (suggested by Hagraven ThecircThagravenh) 128

new option selected by default false (suggestedby Hagraven Thecirc Thagravenh) 126

Documentation add lsquoShort historyrsquo 30Inheritance remove ss from T1 list add DJ 148Protrusion settings for Bitstream Charter 155DeclareMicrotypeAlias remove spaces around ar-

guments 111MTcfgcatcodes reset catcode of lsquo=rsquo (compatibility

with Turkish babel) 88MTfixcatcode reset catcode of lsquoˆrsquo (compatibility

with chemsym) 35

MTgethighlevel donrsquot test defaults if called afterbegin document 106

MTscalefactor warning for factors outside limits 66MTscaletoem donrsquot use lpcode and rpcode for

the calculation 64MTsetexcodes allow non-selected font expan-

sion 70MTsetprcodes adjust protrusion factors before

setting the inheriting characters 62MTsetupexpansion defaults calculate step as

min(stretchshrink)5 136defaults turn off expansion for DVI output 135disable automatic expansion for DVI output 136

20050124 Version 16

General defaults turn off expansion for old pdfTEXversions 129

load a font if none is selected 56new option factor by default 1000 128restructure dtx file 143test whether pickupfont has changed 102test whether numeric options receive a number 128use e-TEXrsquos ifcsname and ifdefined if defined 44

Protrusion add italic uppercase Greek letters 163improve settings for numbers (pointed out by Peter

Muthesius) 156

tune CMR math letters (OML encoding) 183MTgetcharwd use e-TEXrsquos fontcharwd if available 65MTgetinhlist correct message if selected is

false 91MTsetexcodes introduce factor option 70MTsetprcodes introduce factor option 62MTsetupexpansion disable automatic expansion

for old pdfTEX versions 137MTuseset retain current set if new set is un-

declared 110MTvinfo new macro instead of ifMTverbose 36

20050202 Version 16a

Documentation add table of fonts with tailored pro-trusion settings 21

MTgetslot completely redone hopefully morerobust (compatible with frenchpro problem

reported by Bernard Gaulle) 91MTpdftexno new macro 39MTresetefcodes only reset efcodes for older

pdfTEX versions 70

20050323 Version 17

General allow specification of size ranges (suggestedby Andreas Buumlhmann) 107

disallow automatic expansion if pdfTEX too old 119fix remove space after autoexpand 119new value for verbose option errors 128shorter command names 51warning when running in draft mode 134

Documentation add hint about compatibility 26remove table of match order (now table 4 on

page 89) 12Protrusion fix remove from OT1 add

textbackslash to T1 encoding 158LoadMicrotypeFile new command (suggested by

Andreas Buumlhmann) 112MicrotypeHook new command for font package

authors 130microtypesetup fix warning also when setting to

(no)compatibility 131MTbegincatcodes also use inside configuration

commands 88MTcfgcatcodes reset catcode of lsquorsquo (compatibility

with french packages) 88

CHANGE HISTORY 233

MTDeclareMicrotypeAlias may also be used insideconfiguration files 112

MTgetlistname use tfor (Andreas Buumlhmannrsquosidea) 89

MTgetslot remove backslash hack 91test for chardefed commands 92test whether langencodingranglangrang is defined 92

MTiflistexists donrsquot define MT1cnameglobally here and elsewhere 90

MTifdimen comparison with 1 to allow size smallerthan 1 (suggested by Andreas Buumlhmann) 46

MTincrement use e-TEXrsquos numexpr if available 50MTiscomposite new macro construct command

for composite character no uncontrolled expan-sion 97

MTscale new macro use e-TEXrsquos numexpr if avail-able 51

MTsetexcodes two versions of this macro 70MTsplitname donrsquot define MTencoding ampc

globally 60MTtestast make it simpler 106MTtryorder always check for size too (suggested

by Andreas Buumlhmann) 89fix also check for langseriesranglangshaperang (reported by

Andreas Buumlhmann) 89MTwarncodetoolarge new macro type out max-

imum protrusion factor 66MTwarnerr new macro for verbose=errors 36showhyphens modify showhyphens 138

20050623 Version 18

General SetProtrusion new key unit 118if font substitution has occurred set up the substi-

tute font not the selected one 100new option config to load a different main config-

uration file 129new option unit by default character 129

Documentation add example for factor option 13add example of how to get rid of a widow (sugges-

ted by Adam Kucharczyk) 15add hint about error messages 27

Font aliases declare pxr and txr as aliases of pplresp ptm 145

Font sets add U encoding to allmath 143Inheritance remove DJ from T1 list (itrsquos the same as

DH) 148Protrusion add LY1 characters for Times 163

settings for AMS math fonts 187verified settings for slanted Computer Modern Ro-

man 171addaccent fix disable micro-typographic setup in-

side addaccent (reported by Stephan Hennig) 102DeclareMicrotypeAlias warning when overriding

an alias font 111DeclareMicrotypeSetDefault new command set

default font set 110MTcfgcatcodes reset catcodes of the remaining

ASCII characters 88MTcheckrlist made recursive 124MTcurrlistname new macro current list type

and name 98MTdeclaresets warning when redefining a set 106MTdefinesetkey use comma lists instead of

token lists 106

MTfindfile no longer wrap names in commands 87MTfixfontdimensix new macro test whether

fontdimen6 is defined 59MTgetcharwd warning for missing (resp zero-

width) characters 65MTgetlistname made recursive 89MTgetslot fix expand active characters 91

test whether langencodingranglangrang is defined made morerobust 92

MTgetunit new macro get unit for codes 67MTinrlist made recursive 49MTisactive new macro translate inputenc-

defined characters 95MTisletter warning for non-ASCII characters 94MTledmacsetup character protrusion with ledmac 53MTmapclistn new macro used instead of for 48MTmaptlistn new macro used instead of tfor 48MToldcmd renamed commands from

MicroType to Microtype 36MTpdftexno case 5 pdfTEX 130 40MTpermute add ranges to the beginning of

the lists 123MTscale fix remove spaces in e-TEX variant (repor-

ted by Mark Rossi) 51MTsetupfonthook restore and when

hyperref is loaded 54restore csquotesrsquos active characters 54restore percent character if Spanish babel is loaded 54

MTsplitcodes get character width once only 63MTuseset fix remove braces in first line 110MTxadd simplified 47

20051028 Version 19

General DeclareMicrotypeSet new key font 109SetProtrusion value lsquorelativersquo renamed to

lsquocharacterrsquo for key unit 118allow context-specific font setup 100compatibility with TEX Live hack (reported by Her-

bert Voszlig) 39disable microtype setup inside hyperrefrsquospdfstringdef (reported by Hagraven Thecirc Thagravenh) 55

fix use true as the default value 125option unit rename value relative to character 129

Documentation add hint about verbatim environ-ment 25

add remark about Type 1 fonts required for auto-matic font expansion 8

Font aliases declare qpl and qtm (qfonts TEX Gyre)as aliases of ppl resp ptm 145

Font sets add OT4 encoding to text sets 143add T5 encoding to text sets 143

Inheritance add list for OT4 149add list for T5 (requested by Hagraven Thecirc Thagravenh) 150

CHANGE HISTORY 234

Protrusion fix remove uppercase Greek letters fromT1 encoded CMR 158

settings for OT4 encoding (Computer Modern Ro-man Palatino Times) 154

settings for T5 encoded Computer Modern Roman 154DisableLigatures new command disable ligatures

(requires pdfTEX 130) 112microtypecontext new command change setup

context in the document 103MTchecklistfamily fix add two missing

expandafters 61MTdetokenizec fix the e-TEX version 45MTexptwon new macros less expandafters 44

MTgetopt new key lsquopresetrsquo to set all characters tothe specified value before loading the lists 67

MTisactive redone use setdisplayprotect 95MTisletter using catcode should be more effi-

cient than inspecting the meaning 94MTmaybedo redone 60MTremfromclist new macro remove an item

from a comma list 48MTscalefactor generalised 66MTsetupexpansion disable expansion if both step

and shrink are zero 137warning if user requested zero step 136

MTtoks use instead of toks 42SetProtrusion (et al) new key font 113

20051205 Version 19a

General lsquolangfile nameranglangline numberrangrsquo as default listname 116

new option defersetup by default true 127remove superfluous test whether pickupfont has

changed 102Documentation add explanation for error message

in DVI mode 27add explanation for error message with non-Type 1

fonts 28Font aliases declare mdbch (mathdesign) as an alias

of bch 146Protrusion fix remove lsquo_ rsquo from OT1 encoding 159

settings for T5 encoded Charter 154microtypesetup inside the preamble accepts all

package options 131MTcheckfontcx optimise context-sensitive setup 102MTdefinesetkey donrsquot expand variables imme-

diately (requested by Georg Verweyen) 106MTgethighlevel no longer check whether defaults

have changed 106MTifdefinedcT new macros true case only 45MTifint use pdfmatch if available 45MTifstreq use pdfstrcmp if available 47MTinclist fix 48MTinfomissingchar info instead of warning

(after Michael Hoppe reported that the lsquoflrsquo ligatureis missing in Palatino SC) 65

MTisfeature new macro check for pdfTEX fea-ture 51

MTmapclistn following LATEX3 48MTpermute donrsquot define permutations for

unused encodings 122MTremfromclist fix 48MTsetup defer setup until the end of the preamble 52

20060120 Version 19b

General compatibility with listings sanitise morecatcodes (reported by Holger Uhr) 55

compatibility with the extendedchar option of thelistings package 56

Documentation activate expansion in the distributedPDF 1

add samples of micro-typographic features 4MTfeatures use throughout the package to adjust

to beta-ness 51MTifdimen use pdfmatch if available 46MTwarncodetoolarge fix calculation with

present factor 66

20060202 Version 19c

Documentation add example of how to increase pro-trusion of footnote markers (suggested by GeorgVerweyen) 22

Protrusion settings for URW Garamond 155

MTdefinecodekeyfont fix context was ignored 116MTdefinecodekeysize fix embrace

MTtempsize in csname (bug introduced inv19b) 115

20060505 Version 19d

Font sets md instead of m series in basic sets 143add QX encoding to text sets 143

Inheritance add list for QX encoding (contributed byMaciej Eder) 149

Protrusion settings for QX encoding (contributed byMaciej Eder) 161

settings for Euro symbols (Adobe ITC marvosym) 194tweak AMS settings 187

DeclareCharacterInheritance fix empty context 120MTdetokenizen new macro use detokenize if

available 45MTgetexopt fix evaluate preset 71MTgetfontdimen warning for zero fontdimen 65MTgetopt optimise donrsquot reset when preset op-

tion is set 67set list name before presetting 67

CHANGE HISTORY 235

MTisactive support for Unicode (inputencutf8) 95MTsetupfonthook restore and when tex4ht

is loaded (reported by Peter Dyballa) 54SetProtrusion (et al) optimise unify keys for

mandatory argument 113

(et al) split keys of optional and mandatory argu-ment 113

20060728 Version 19e

General fix default value for activate true 126Documentation add hint about unknown encodings 26

include LPPL 249Font aliases declare zeur and zeus (eulervm) as

aliases of eur resp eus (euler) 146Inheritance adapt to marvosymrsquos changed encoding 151Protrusion complete settings for Euler Fraktur and

Script fonts 194fix forgotten comma in mt-mvscfg adapt tomarvosymrsquos changed encoding 194

settings for Euler Roman font 190DeclareCharacterInheritance new key lsquoinputencrsquo

to set the input encoding 120MTremfromclist model after removeelement 48MTsetup empty MTsetup after use (compatibil-

ity with the combine class) 52pickupfont no tracing with trace package 101SetExpansion new key inputenc 113SetProtrusion (et al) new key inputenc 113

20060909 Version 19f

Protrusion fix euler-vm did not load euler settings 191MTcurrlistname fix MessageBreak must not be

expanded 98MTgdefn new macros global variants 44MTgetinhlist fix input encoding must be set

after the inheritance list has been parsed 91MTglet new macro 44

MTresetcontext only reset context if it has actu-ally been changed 104

MTsetinhlist fix forgotten comma in the fea-tures list 120

MTsetnamedkeys new macro set name first sim-plify parsing of optional argument 115

SetProtrusion (et al) set catcodes before parsingoptional argument 113

20070114 Version 20

General compatibility with listings set catcode ofbackslash to zero (reported by Steven Bath) 56

compatibility with soul register textls andlsstyle 56

new option babel by default false (language-dependent setup suggested by Ulrich Dirr) 126

new option letterspace by default 100 128new package letterspace a stripped-down ver-

sion containing the letterspacing commandsonly 1

option lsquobabelrsquo fix switch off French babelrsquos short-hands properly (reported by Daniel Flipo) 142

option lsquobabelrsquo switch off Turkish babelrsquos short-hands 142

option lsquounitrsquo SetProtrusion deprecate valuelsquorelativersquo completely 118

Documentation add hint about how to increasefont_max and font_mem_size 28

add hint about warning when tracking and expan-sion is applied to a font 28

add remark about lsquodraftrsquo option disablingmicrotype (noted by Michalis Miatidis) 9

qualify hint about web documents with regard toolder pdfTEX versions 25

qualify hints about expansion error messages withregard to older pdfTEX versions 27

Font sets new footnotesize and scriptsize 143

new smallcaps 143DeclareMicrotypeBabelHook new command inter-

action with babel 113lsstyle fix font switches donrsquot pose a problem

anymore 79fix letterspacing commands may be nested 79new command letterspacing 79totally redone using the new letterspacefont 79

MTdeclaresets fix empty size list when redefin-ing set 106

MTissymbol made even more robust 96MTloadinputenc sanitise catcodes before loading

input encoding (problem with listings) 68MTpdftexno case 6 pdfTEX 140 40MTsetupnoligatures maybe disable

MTnoligatures after the preamble 141MTsplitname adjust to possible letterspacing 60SetExtraKerning new command additional kern-

ing 114SetExtraSpacing new command adjustment of

interword spacing 114SetTracking new command tracking 114textls new command letterspacing 84

starred version remove spaces around text 84tracingmicrotypeinpdf new debug method mark

all fonts with PDF annotations 37

CHANGE HISTORY 236

20070121 Version 21

General compatibility with pinyin disablemicrotype in pymacron (reported by Sven Nau-mann) 56

fix letterspace package forgot to load keyval 42lslig new command protect ligatures in letter-

spaced text 79

MTgetlsbasefont redone use pdfmatch tomake it bullet-proof 79

MTorigpickupfont compatibility with CJK alsocheck for its definition 100

textls fix use hmodebgroup 84

20070714 Version 22

General disable microtype if wordcount is loaded(reported by Ross Hetherington) 52

new option copyfonts 127simplify key declarations 116use catcode trickery for e-TEX test 38

Documentation add hint about error message withpdfTEX 140 27

add hint about extra TOC leader dot (first dis-covered by Morten Hoslashgholm) 25

add overview 5logo transparency and amusement 1

Font aliases declare chr (chmath) as an alias of bch(reported by Geoff Vallis) 146

declare fp9x fp9j (FPL Neu) as aliases of ppl[xj] 145Font sets default set for tracking smallcaps 144Inheritance remove lsquo-rsquorarr lsquo127rsquo 148Protrusion settings for Bitstream Letter Gothic 155Spacing add sample 195Tracking add ligatures that are to be disabled 152DeclareMicrotypeVariants new command 111DisableLigatures new optional argument disable

selected ligatures only 112lslig always defined 79MTchecklistfont fix construct font name from

characteristics 62MTcopyfont optionally work on copies of fonts 58MTgetbasefamily redone working on font names

and suffixes of arbitrary length 88MTgetcharwd subtract letterspacing amount from

width 65MTgetlsbasefont fix again remember base font

in a macro 79MTifdimen employ LuaTEX features if available 46MTifint employ LuaTEX features if available 45MTifstreq employ LuaTEX features if available 47

fix e-TEX version shouldnrsquot use x and y (foundby Wiebke Petersen) 47

MTiscomposite more robust expand exactly once 97MTissymbol expand once more (for frenchpro) 96MTlsfont use fontname not MTfont 75MTlua (basic) support for LuaTEX 41MTpdftexno case 7 pdfTEX 1404 40MTpresetauxspace generalised 69MTsetallpr (et al) allow empty values 63MTsetinputenc only load inputenc files if neces-

sary 68MTsettrcodes disable ligatures in letterspaced

fonts manually (due to change in pdfTEX 1404) 76possibility to customise interword spacing 76

MTsetupexpansion warning if stretch or shrinkarenrsquot multiples of step 137

MTsetupfont donrsquot call encupdate anymore 57only add features that are available with the re-

spective pdfTEX 57MTsetupfonthook restore percent character if

Galician babel is loaded 54MTtheprcodetr adjust protrusion of letter-

spaced fonts 63MTtracking remember fonts that shouldnrsquot be let-

terspaced 75MTtracking fix tracking couldnrsquot be re-enabled 75MTwarntrackingDVI warning when letterspacing

in DVI mode 140MTwithbabelandT also inspect class options 52pickupfont letterspace setup inside group 101SetTracking new key lsquono ligaturesrsquo to disable

ligatures of letterspaced fonts 114new keys lsquospacingrsquo and lsquoouter spacingrsquo to adjust

interword spacing (suggested by Steven E Har-ris) 114

third argument may be empty 114textmicrotypecontext new command wrapper

around microtypecontext 104

20071223 Version 23

General disable microtypecontext in hyperrefrsquospdfstringdef 55

fix really switch off Turkish shorthands 142new value for verbose option silent (suggested

by Karl Berry) 128turned some warnings into errors 128

Documentation add kerning sample 18add letterspacing illustration 17

dosubstcorrection remember substitute font forall times (reported by Stephan Hennig) 102

lslig redone extract outer kerns from currentletterspacing amount 79

microtypecontext made robust (reported byStephan Hennig) 103

MTbegincatcodes fix donrsquot disable KVspdef 88MTdefinesetkeyfont font single asterisk

means normal font 109MTinclist donrsquot use x (reported by Peter Meier) 48MTisactive support for extended Unicode

(inputencutf8x resp ucs) ndash experimental 95MTnoligatures fix set evaluation didnrsquot work (bug

introduced in v22) 85MTplain letterspace support for eplainminiltx 38MTsetcurros adjusting spaces made more reli-

able 77

CHANGE HISTORY 237

MTsettrcodes also adjust tracking if protrusion isnot enabled and even for letterspace (reportedby Stephan Hennig) 76

possibility to customise outer kerning (suggestedby Stephan Hennig) 76

MTSetTracking sanity check for value 114MTsetuptracking enable protrusion when track-

ing is enabled 139MTtrouterl only change pre outer space if it

contains shrink 81

20080229 Version 23a

General fix test for soul under plain TEX 56Documentation add hint about babel having to be

loaded first 27add table of available and enabled features 7mention soulutf8 30

Protrusion adjust LMR quotation marks again 160MTerrordoesntwork error messages if pdfTEX is

too old for extensions 140MTfixcatcode fix catcodes earlier and also for the

letterspace package 35MTgetkey fix key=val in class options list 134MTsetcodes generalised 63MTsetupfonthook restore percent character if

Mexican babel is loaded 54

20080604 Version 23b

MTexpgcs new macro reduce save stack size 44MTfontcopy enable font copies also with protru-

sion contexts (reported by Nathan Rosenblum) 58MTgetsize grouping 108MTnoligatures fix warning messages for un-

known slots 86MTorigpickupfont compatibility with CJKutf8

also check for its definition 100MTrequireslatex new macro 38MTsettrcodes fix protrusion adjustment only

for new fonts (reported by Wolfram Schaalo) 76MTtrouterl fix only in horizontal mode 81

make spaceskip-aware (ragged2e) 81MTtrouterr additional test for horizontal mode 82

20081111 Version 23c

General LuaTEX supported by default 40Documentation add hint about spacing being exper-

imental 26add hint about partial incompatibility with CJK 27

Inheritance add textcommabelow[STst] to QX en-

coding (reported by Vasile Gaburici) 150MTdetokenizec fix remove last space only (repor-

ted by Ulrich Dirr) 45MTtrouterr additional test for horizontal mode

(reported by Sveinung Heggen) 82

20090327 Version 23d

General fix pinyin compatibility check (reported bySilas S Brown) 56

move setup to the very end (for Colin Rourke) 142ifMTinannot use pdftexcmds for debugging 37lsstyle disable for LuaTEX 79

make invalid in math mode 79microtypesetup select font after setup 131MTcheckactiveset warning for missing default

sets 130MTlua update for LuaTEX 036 41MTsettrcodes allow zero tracking 75MTsettrzero fix allow switching off tracking

(reported by Ulrich Dirr) 80MTsetupexpansion default step 1 for pdfTEX

versions ge 140 136MTtrouterr donrsquot use x (reported by Ulrich

Dirr) 82fix donrsquot adjust in math mode (reported by Chris-

toph Bier) 82fix donrsquot adjust inside discretionary (reported by

Maverick Woo) 82MTtrsetokern allow empty value for outer

kerning 84textls make math mode aware 84

20091109 Version 23e

Documentation suggest to patch verbatim insteadof verbatim 26

Expansion settings for T2A encoding (contributed byKarl Karlsson) 153

Font sets sc instead of sc in smallcaps set 143add T2A encoding 143

Protrusion settings for T2A encoding (contributed byKarl Karlsson) 160

Spacing settings for T2A encoding (contributed by

Karl Karlsson) 197MTfixfontdimensix fix gobbling settings with

tracking failed (reported by Leo) 59MTsetup make space-unaware (requested by Mar-

cin Borkowski) 52MTtikzsetup compatibility with tikz (first repor-

ted by Christian Stark) 54MTtrouterr fix set current kerning and spacing

again (found by Lars Roumlnnbaumlck) 82

CHANGE HISTORY 238

20100110 Version 24

General new file microtypelua containing the luafunctions (contributed by Eacutelie Roux) 43

Protrusion settings for T2A encoded Minion (contrib-uted by Karl Karlsson) 160

20130313 Version 25

General allow contexts for LuaTEX 117disable lsquoDVIoutputrsquo option for XETEX 127fix check whether lsquolangfileranglanglinerangrsquo list name already

exists (reported by Till A Heilmann) 116letterspacing with LuaTEX 062 75new files microtype-pdftexdefmicrotype-xetexdef microtype-luatexdefcontaining engine-specific definitions 38

protrusion with XETEX 40restore space inside listings (reported by Rolf

Dieterich) 56Documentation add hint about LuaTEX compatibility 27

add hint about spacing and ragged2e 26add hint about dtx source code 28include microtype-logodtx andmicrotype-lssampledtx 221

Font aliases declare lmsy and lmm as aliases of cmsyresp cmm (reported by Jonas Hogstrom) 144

declare zgmx etc (garamondx) as aliases of ugm 146declare Latin Modern Roman (OpenType version)

as alias of lmr when fontspec is loaded 144declare TeX Gyre Pagella Asana Math Palatino LT

Std and Palatino as aliases of Palatino Linotype(OpenType version) 145

Font sets add EU1 and EU2 encodings 143Inheritance add rudimentary list for EU1 and EU2 151Protrusion add default lists for EU1 and EU2 159

improvements to Computer Modern Roman italics(contributed by Hendrik Vogt) 163

Tracking add EU2 encoding to default list 152DeclareCharacterInheritance allow more than

one encoding 120DeclareMicrotypeAlias ignore spaces 111ifMTnofamily info if settings are not family-specific

(suggested by Hagraven Thecirc Thagravenh) 62LoadMicrotypeFile remove all spaces in font name 112lsstyle fix ensure to set up math fonts (reported

by RazorXsr) 79

MTdefinecodekeyfamily compatibility withfontspec remove its internal counter (repor-ted by Till A Heilmann) 115

MTdefinecodekeyfont scrub fontspec featurecount (found by Meho R) 116

MTdofont adapt for LuaTEX 50adapt for XETEX 50

MTgetslot adapt for LuaTEX (requested by GeorgDuffner) 92

adapt for XETEX 92MTifouternext fix conflict with amsmath (repor-

ted by Scott Pakin) 82MTinfomissingchar fix error message for XETEX

(reported by Juan Acevedo) 65MTischarx compatibility with xunicode 97MTledmacsetup fix to work with XETEX (reported

by Maiumleul Rouquette) 53MTlssetls allow formulas in optional argument

to textls (fix by Heiko Oberdiek) 84MTmicrotypecontext fix ensure to set up math

fonts (reported by RazorXsr) 104MTregistersubstfont only register substituted

font if it isnrsquot registered already (reported byGeorge Gratzer and Josep Maria Font) 102

MTregistersubstfontcx only register if it isnrsquotregistered already 103

MTscrubfeatures compatibility with fontspecremove its internal counter 60

MTsetallpr fix remove space (found byMeho R) 63

MTsetprcodes make info about generic set-tings encoding-specific (reported by SebastianSchubert) 62

MTsetupspacing warning with ragged2e (reportedby Steffen Hoffmann) 139

MTsetupfont select font with fontspec (found byGeorg Duffner) 57

MTsetupfonthook restore and whenmathastext is loaded (found by Seamus Bradley) 54

20130523 Version 25a

General use luatexbase instead of luatextra (con-tributed by Eacutelie Roux) 43

Documentation add notes on typesetting the docu-mentation 28

include OpenType configuration files 201MTafteraftergroup fix get outer kerning and

spacing of nested letterspacing right 78MTgetslot adapt to luaotfload v22 (contrib-

uted by Eacutelie Roux) 93MTledunhboxline simplified 53MTledmacsetup support for eledmac 53MTlsouterk add marker for tightly nested letter-

spacing 85MTsettrcodes fix load font for fontspec 77MTxspace fix outer spacing problem with xspace

(reported by Dave) 83

20160501 Version 26

General load luaotfload with LuaTEX 43redefine MTsetupfonthook globally for problem

with tikzposter (reported by Sam Mason) 55

Documentation add hint about partial incompatibil-ity with xeCJK and luatexja 27

missing characters printed with Charis SIL 201

CHANGE HISTORY 239

suggest to use etoolbox to patch verbatim 26Font sets add TU encoding (notified by Will

Robertson) 143add si and scit to smallcaps set (reported by uli) 143new allmath-nott and alltext-nott (suggested

by Karl Berry) 143Inheritance add TU encoding 151Protrusion add TU encoding to lists 159Tracking add TU encoding to default list 152DeclareMicrotypeSet ignore spaces 105DeclareMicrotypeSetDefault ignore spaces 110DeclareMicrotypeVariants ignore spaces 111lsstyle fix ensure to set up math fonts (reported

by kleenstar) 79microtypecontext allow activate shortcut (repor-

ted by Karl Berry) 103MTdeclaresets fix undefine lists for redefining 106MTdofont speed up for LuaTEX 50MTengine fix test with LuaTEX 085 39MTgetslot fix could fail with XETEX (reported

by Christopher Schramm) 92

MTisxchar update for fontspecrsquos TU encoding 97MTledmacsetup support for reledmac 53MTluatexno update for LuaTEX 085 (renamed

primitives) 41MTnoligatures use luaotfload function to keep

inhibit ligatures 86MTorigpickupfont (in)compatibility with

luatexja disable unknown slots warnings (re-ported by Max) 100

(in)compatibility with xeCJK disable unknownslots warnings (reported by HcN) 100

compatibility with xeCJK pretend that CJK wasnrsquotloaded 100

MTsettrcodes use luaotfloadrsquos kernfactor fea-ture if available 76

MTxspace fix outer spacing problem with (notonly) algorithm (reported by Henning and Ron-nie Marksch) 83

UseMicrotypeSet ignore spaces 110

20160514 Version 26a

General fixes for letterspace package with LuaTEX 49MTdofont fix lua function (reported by Herbert

Voszlig) 50MTlsfontspecfont fix for value of plusmn1000 78

20170707 Version 27

General drop luatexbase with recent LATEX 43warning with minimal class 52

Documentation mention that additional kerning doesnot work in math mode (discovered by lsquoDanielrsquo) 18

Font aliases declare aliases for newpx 145declare aliases for newtx 145declare aliases for tempora 145declare aliases for XCharter 146declare Latin Modern Roman as alias of lmr with

new LATEX format (reported by Ulrike Fischer) 144Protrusion automatically choose correct names for

Charis SIL small caps (reported by lsquoltcomdatarsquo) 214lsstyle fix prevent infinite loop with psnfss and

exscale packages (reported by user11126 solu-tion by Ulrike Fischer) 79

MTcheckrange donrsquot warn for override if conflict-ing list is loaded 124

MTiscomposite compatibility with LATEX20170101 (DeclareUnicodeComposite) (re-ported by Ulrike Fischer and lsquojcrrsquo) 98

MTlsfontspecfont fix for lsquofilelangfontrangrsquo spec (re-ported by Reinhard Kotucha) 78

MTpermute donrsquot warn for override if con-flicting list is loaded 123

MTresetefcodes only reset efcodes for olderLuaTEX versions 70

MTsetupexpansion donrsquot disable automatic expan-sion for DVI output with LuaTEX 136

MTtikzsetup compatibility with tikz (again) 54MTwarntrackingDVI donrsquot warn for letterspacing

in DVI mode with LuaTEX 140

20180114 Version 27a

General disallow non-automatic expansion withLuaTEX 119

MTauto remove lsquoautoexpandrsquo for LuaTEX 106 (re-ported by Ulrike Fischer) 136

with LuaTEX non-automatic font expansion is nolonger possible (as confirmed by Hans Hagen) 136

MTgethighlevel test whether default isdefined 106

MTgetslot expand active characters earlier 91MTinfonotracking defer lsquoNo trackingrsquo message 61MTisactive compatibility with newunicodechar

(reported by Nils Anders Danielsson) 95

20190228 Version 27b

General update lua function microtypeinfo afterchanges in luaotfload (reported by Moritz Wem-heuer and Ulrike Fischer) 43

Documentation update hint about non-7-bit charac-ters (notified by Frank Mittelbach) 26

Inheritance add textquotedblleft ligature to OT4

(reported by Franz Wexler) 149MTinfomissingchar fix message for glyphs spe-

cified as names in XETEX (reported by Paolo Ney) 65MTsetupfont always select current font with XETEX

and LuaTEX (reported by Paolo Ney solution byUlrike Fischer) 57

CHANGE HISTORY 240

20191010 Version 27c

General turn warning into info when overwriting thekeepligature function (reported by Andy N) 86

MTisactive compatibility with LATEX 20191001 95

MTissymbol take care of removetlig 96showhyphens compatibility with LATEX 20191001

(reported by Phelype Oleinik and Falk Hanisch) 138

20191118 Version 27d

MTcopyfont in LuaTEX donrsquot use the copyfontprimitive but load the font anew (reported byPaolo Polesana and Oliver Kopp) 58

MTregistersubstfont remove substitute font

from list (reported by Markus Kohm) 102

MTregistersubstfontcx remove substitute fontfrom lists 103

20201207 Version 28

General letterspace works with e-TEX only 38compatibility with soul patch for font change

(reported by Md Ayquassar) 56fix for luatexbase 43

Documentation declare DVIoutput option deprec-ated 9

squash fake news about automatic font expansionwith dvilualatex 8

Font aliases declare aliases for step and domitian(notified by Daniel Benjamin Miller) 145

declare aliases for stix and stix2 fonts 145declare New Computer Modern as an alias of Latin

Modern Roman 145Font sets default set for expansion alltext-nott 144

default set for spacing alltext-nott 144

lsstyle fix enforce math setup again 79microtypecontext fix activate shortcut 103

ignore spaces 103MTdofont fix for XETEX 50

simplify lua function 50MTfixfontdimensix try to fix zero fontdimen6 59MTifluaotffont use lua function 49MTifstreq use XETEXrsquos stringcmp 47MTsetupexpansion warning when expanding in

DVI mode with LuaTEX (reported by Daniel Ben-jamin Miller) 135

MTtrsetspace simplified 81MTtrunit fix allow unit regardless whether

letterspacing is set 78textmicrotypecontext ignore spaces 104

20210222 Version 28a

General rename mt-padcfg to mt-EBGaramondcfg(requested by Karl Berry) 143

rename mt-PalatinoLinotypecfg tomt-Palatinocfg (requested by Karl Berry) 201

Documentation reorganise table 1 for clarification(suggested by Daniel Benjamin Miller) 7

Font aliases add -LF -TLF -OsF and -TOsF as vari-ants 144

declare mlmodern fonts as aliases of Latin Modern(reported by Daniel Benjamin Miller) 144

reference New Computer Modern also by file name(reported by Canageek) 145

Inheritance specify lsquoffrsquo ligature as Unicode instead ofglyph name 201

Protrusion hide euroitc settings (requested by KarlBerry) 194

Spacing add dummy settings (reported byDORpapst) 198

DeclareCharacterInheritance skip settings fortracking 120

MTgetsize compatibility with svjour3 (repor-ted by Ekkehart Schlicht (no relation)) 108

MTglet use LuaTEXrsquos glet if available 44

20210225 Version 28b

Inheritance dummy settings for the Font Awesomefont (mt-FontAwesomecfg) 205

settings for the Lato font (mt-Latocfg) (reportedby dsedivec) 205

20210314 Version 28c

ifMTfontspec add to hook for fontspec 54MTisoptchar fix for optionally defined glyphs

(reported by Frank Mittelbach) 96

MTremovetlig fix for text commands containingconditionals (reported by Frank Mittelbach) 97

INDEX 241

D IndexNumbers in upright shape refer to the page where the corresponding entry is described (bold face) resp occursNumbers in italics refer to the code line where the corresponding entry is defined (underlined) resp used

Options DVIoutput 9activate 6auto 7babel 9config 9draft 9expansion 6factor 7final 9kerning 6

letterspace 8protrusion 6selected 8shrink 8spacing 6step 8stretch 8tracking 6unit 7verbose 9

Commands DeclareCharacterInheritance 20DeclareMicrotypeAlias 21DeclareMicrotypeBabelHook 23DeclareMicrotypeSet 10DeclareMicrotypeSet 10DeclareMicrotypeSetDefault 12DeclareMicrotypeVariants 20DeclareMicrotypeVariants 20DisableLigatures 24LoadMicrotypeFile 22SetExpansion 14SetExtraKerning 18

SetExtraSpacing 19SetProtrusion 13SetTracking 15UseMicrotypeSet 12lslig 24lsstyle 23microtypecontext 22microtypesetup 9textls 24textls 23textmicrotypecontext 22

A a0poster (package) 108activate (option) 6 126 235addaccent 2961adjustspacing 196 4365ae (package) 21 144

algorithm (package) 239amsmath (package) 238amssymb (package) 187article (package) 22auto (option) 7 8 126

B babel (option) 9 23 27 32 126 235babel (package) 2 3 5 17 23 24 27

54 88 113 141 142 146 232 233 235ndash237

C chemsym (package) 232chmath (package) 21 146 236CJK (package) 27 56 100 236 237 239CJKutf8 (package) 100 237cm-super (package) 8color (package) 134combine (package) 142 235

config (option) 9 20 32 129 233contour (package) 134copyfonts (option) 58 126 127 236crop (package) 134csquotes (package) 29 54 158 233currfontshape 2905 2907 2909 2916 2959

D DeclareCharacterInheritance 20 41 3802DeclareMicrotypeAlias 21 43 71 3394DeclareMicrotypeBabelHook 23 45 64 3460DeclareMicrotypeSet 10 32 57 59 72 3093DeclareMicrotypeSet 10 3093DeclareMicrotypeSetDefault 12 34 61 3349DeclareMicrotypeVariants 20 42 58 63 3379DeclareMicrotypeVariants 20defersetup (option) 54 126 127 131 234

definenewfont 2898 2906 2910 2920DisableLigatures 24 40 62 3433dosubstcorrection 2958docstrip (package) 34domitian (package) 21 145 240draft (option) 9 126 128 235dsfont (package) 59DVIoutput (option) 9 126 127 238 240

E eco (package) 21 144efcode 1557 1583 1584 1625 1627eledmac (package) 53 238eplain (package) 24 31 34 38 52 134 236e-TEX (engine) 33 38 40 45

50 51 64 65 82 108 221 232ndash234 236 240etoolbox (package) 26 239eucal (package) 192eufrak (package) 194

euler (package) 98 190 235eulervm (package) 21 146 191 235euroitc (package) 194 240europs (package) 194eurosans (package) 194expandglyphsinfont 1539expansion (option) 6 11 125 126 135exscale (package) 239

INDEX 242

F ffamily 2912 2913fsize 1931 2905 2907 2909 2916 2959factor (option) 7 13 33 128 232fancyvrb (package) 26final (option) 9 33 126 128 231fix-cm (package) 59font 972 1048 1833 1981fontname 111 1020 1022 1024 1026

1027 1037 1038 1823 1831 1835 18391877 1883 1888 1891 1966 1981 19931995 2000 2002 2005 2008 2011 20462097 2234 2236 2898 2906 2915 29202940 2942 2944 2960 2974 2976 2996 3001

fontcharwd 1285 1289 1295fontdimen 1052 1053

1057 1058 1061 1320 1325 1425 14281852 1853 1883 1993 2039 2040 20472048 2055 2057 2063 2078 2097 2247 2250

fontinst (package) 198 221 223fontinstallationguide (package) 177fontname 1831 1835fontspec (package) 6 25 27 30

31 43 60 78 97 107 115 144 151 238ndash240fourier (package) 59french (package) 232frenchpro (package) 96 232 236

G garamondx (package) 21 146 238german (package) 35 231glbcurrsize 1969 3035

glbsettings 1970graphics (package) 134

H hfoldsty (package) 21 144 hyperref (package) 54 55 100 134 233 236

I IEEEtran (package) 100iffontchar

731 1331 2755 2765 2767 2834 2846 2847ifMTauto 304 4569 4630ifMTbabel 304 4716 4844ifMTdo 1087 1154 1791 2281ifMTdocument 345 3921ifMTdraft 304 4462ifMTexpansion 304 4518 4532 4627 4673ifMTfontspec 850 1067 3164 3584 3610ifMTif 303

869 876 899 931 2992 4028 4864 4867ifMTinannot 99ifMTinlist 624 669 777 807 992 1121

1138 1147 1165 1183 1789 2385 23962445 2494 2975 2986 2998 3063 3075 3416

ifMTkerning 304 4730 4857

ifMTnofamily 1193 1200ifMTnoligatures 304 4810ifMTnonselected 1519 2507 2515ifMTnorest 2576 2593 2606 2620 2681ifMToptauto 4039 4573 4605ifMToptDVI 4039 4487ifMToptexpansion 4039 4516 4674ifMTprotrusion 304 814 837 4499 4689ifMTselected 304 4613 4633ifMTspacing 304 4698 4715ifMTtracking 304 4685 4745ifMTxunicode 850 2781 2838ifpdf (package) 100 134iftracingmicrotypeinpdfall 105ignoreligaturesinfont 2285inputenc (package)

14 27 32 56 68 91 95 98 233 235 236

J jurabib (package) 100

K kerning (option) 6 11 31 126keyval (package) 42 63 147 236knaccode 1740 1741 1751 1754 1760

knbccode 1733 1734 1750 1753 1759knbscode 1655 1656 1679 1683 1689

L ledmac (package) 29 32 53 100 233ledpar (package) 29leftmarginkern 820letterspace (option) 8 17 24 32 45 75 128 235letterspace (package) 1 24 31 32

34 36 38 54 76 77 79 235ndash237 239 240letterspacefont 1839lineno (package) 53listings (package) 26 55 56 68 88 234 235 238lmodern (package) 8 160LoadMicrotypeFile 22 44 74 3412 4467lpcode 1222 1258 1259 1463 1466 1866

lslig 24 54 1986 1989lsstyle 23 51 922 946

1967 2173 2179 2184 2187 2197 2201 4470luaotfload (package)

27 30 43 50 70 76 86 93 238 239LuaTEX (engine) 1 4 6ndash9 12ndash16 20

23ndash25 27 29ndash31 34 37ndash41 43ndash45 50 5357 58 70 75ndash77 83 85 86 92 117 127133 135 136 140 144 147 151 159 236ndash240

luatexbase (package) 43 238ndash240luatexja (package) 27 100 238 239luatextra (package) 238

M marvosym (package) 21 32 34 151 194 234 235mathastext (package) 54 238mathdesign (package) 21 146 234memoir (package) 23 100MicrotypeHook 130 4296microtypecontext

22 47 920 3024 3043 4469 4827 4830microtypecontext (environment) 22microtypesetup 9 46 4300 4468MiKTEX (distribution) 28miniltx (package) 24 31 34 38 52 236minimal (package) 52 56 239

MinionPro (package) 107mlmodern (package) 21 144 240MTfont 406 995 1018 1057 1059 1321

1335 1803ndash1805 1807 1810 2448 2520 2945MTabbrex 753MTabbrexc 753MTabbrexinh 753MTabbrkn 753MTabbrknc 753MTabbrkninh 753MTabbrnl 753MTabbrpr 753

INDEX 243

MTabbrprc 753MTabbrprinh 753MTabbrsp 753MTabbrspc 753MTabbrspinh 753MTabbrtr 753MTabbrtrc 753MTactivefeatures

1029 2980 2983 2995 3008 3052 30623441 4500 4628 4686 4699 4731 4819 4820

MTaddtoannot 99MTaddtosetup 798

799 880 1438 2889 3025 3026 36713689 4153 4301 4461 4776 4818 4843 4876

MTadjustspacing 4361 4362 4629MTafteraftergroup 1895 1903 1912MTauto 1529 4568 4583 4593 4596 4600MTauto 1529 1552 1597MTautofalse 306 4581 4592MTautotrue 306 4255 4258 4608MTbabelfalse 313MTbabeltrue 313MTbegincatcodes

2386 2387 2427 3024 3028 30413094 3319 3350 3381 3395 3420 34363470 3486 3508 3529 3543 3808 4271 4272

MTcat 1434 2880 2882MTcfgcatcodes 933 1456 2412 2429MTchar 1247 1248 1258 1259

1264 1265 1268 1270 1285 1286 12891463ndash1467 1583 1584 1586 1587 1625ndash1627 1655 1656 1662 1663 1669 16701673 1674 1679ndash1684 1733 1734 17401741 1744 1745 1750ndash1754 2293 22942296 2549 2565 2573 2575 2585 25872595 2596 2601 2605 2606 2611 26132619 2621 2624 2628 2632 2636 27522755 2757 2759 2761 2825 2829 28342836 2839 2841 2847 3860ndash3862 3867ndash3869

MTchar 1291 1292 1295 13301331 2549 2556 2560 2565 2614 26852687 2693 2694 2696 2709 2710 27132714 2717 2718 2722 2724 2758 27602788 2791 2795 2801 2808 2810 2837 2854

MTcharstring 2562 2757 2773 2800MTcharxstring 2803 2841MTcheckactiveset

4282 4506 4646 4688 4708 4735MTcheckfont 991 2971 3054MTcheckfontcx 2981 3054MTcheckrange 3999 4001MTcheckrange 4001 4002MTcheckrlist 3948 3992MTcheckrlist 3992 3993MTcheckstep 4634MTchecklist 1095 1114 2278MTchecklistfamily 1132MTchecklistfont 1176MTchecklistsize 1160MTchecksetup 4312 4323 4330 4349 4385MTclearoptions 163 296 788 4244 4454MTclistbreak 596 1127 1155 1171 1185MTclistfunction 596MTcntencoding 3887 3895 3896MTcntfamily 3893 3902 3903

MTcntseries 3900 3909 3910MTcntshape 3907 3915 3916MTconfigfile 4260 4269 4270 4274 4275 4278MTcontext 2470 2482 2501 2528MTcopyfont 978

1014 3667 3673 3685 3692 4162 4164 4490MTcopyfont 1014 3667 3673 3685 3692 4162MTcount 512 513

737 1277 1285 1287 1289 1293 12951298 1304 1309 1310 1314 1325 1357 1419

MTcurrfile 2390 2391 2400 24013422 3423 3641 3643 3646 3832 4274 4878

MTcurrlistname 1323 1360 1450 15932290 2371 2539 2849 2857 2862 2870 2876

MTcurrls 1874 1990 1993MTcurrsetname 3118 3120ndash

3122 3124 3127 3128 3133 3138 31423143 3152 3177 3181 3210 3238 32613267 3271 3272 3523 3599 3620 36353654 3726 3730 3737 3740 3742 37483751 3754 3766 3780 3789 3797 3833 3835

MTdeclarecharinh 3814 3822 3830MTdeclaresets 3101 3106 3119 3443MTDeclareMicrotypeAlias 3396 3398MTDeclareMicrotypeSetDefault 3351 3353MTDeclareSet 3097 3099 3115MTDeclareSetAndUseIt 3096 3114MTDeclareVariants 3383 3384 3386MTdefboolopt 4116

4129 4130 4134 4148 4160 4170 4182MTdefn 393 3089 3090MTdefaultexset 3368MTdefaultknset 3368MTdefaultprset 3368MTdefaultspset 3368MTdefaulttrset 3368MTdefinecodekey

3567 3627 3629 3630 3842 3844 3845MTdefinecodekeyfamily 3578 3628 3843MTdefinecodekeyfont 3604 3632 3847MTdefinecodekeysize 3592 3631 3846MTdefineoptkey 3633 3656ndash3659 3793ndash3795MTdefineoptionX 4300 4358 4361MTdefineoptionX 4375 4404 4406 4407MTdefinesetkey 3131 3311ndash3314MTdefinesetkeyfont 3259 3316MTdefinesetkeysize 3170 3315MTdetokenizec 436 2557 2753 2769MTdetokenizen 436 2831MTdimensix

1050 1278 1314 1357 2072 2074 2243MTdinfo 87MTdinfolist

1112 1122 1125 1130 1139 1142 11481150 1158 1166 1169 1174 1184 1187 1191

MTdinfonl 87MTDisableLigatures 3433MTdofont 704 1224 1557 1692 1761 1866MTdocumentfalse 345MTdocumenttrue 345 4822MTdofalse 1087 1099 1126 1143 1170 1188MTdofontfunction 708 719MTdotrue 1087 1090 1123 1140 1149 1167 2273MTdraftfalse 309 4184MTdrafttrue 309 4186

INDEX 244

MTedefn 395 2506 2532 30793573 3587 3643 3646 3649 3831 3979 4216

MTencoding 1064 1180 1201 1203 1206 24652477 2557 2753 2769 2830 2861 2868 2876

MTendcatcodes 2388 2431 3025 30323042 3112 3335 3366 3392 3410 34283445 3481 3505 3524 3540 3554 3825 4273

MTendinput 167 4239 4248MTengine 175

277 281 287 293 2174 2178 4240 4246MTenginetooold 175 278MTerror 76 780 883

2174 2185 2363 2376 3208 3344 33733451 3676 3702 3709 4172 4335 43534393 4574 4586 4606 4675 4746 4759 4839

MTerrordoesntwork 4742MTexcname 1511

1513 1599 1600 1611 1617 1618 1630 3489MTexcontext 1018 3046 3088MTexdoccontexts 3088MTexfactor 314 1530 1603MTexfactor 1530 1559 1564 1573 1574 1597MTexinhname 1585ndash1587MTexlevel 314 4629 4631MTexmax 326 1576 1577MTexmin 326 1579 1580MTexsetname 3337MTexsplitval 1571MTexpcs 390 393 396 399 404 1030

1032 1041 1164 1269 1344 1347 13771381 1391 1394 1397 1587 1674 17451915ndash1917 2493 2999 3009 3010 30143065 3076 3176 3598 3618 3869 3950 3997

MTexpgcs 390 394 398 400 405MTexponen 407 441 603 982

984 1042 1118 1181 1788 2395 29712974 2984 2996 3002 3020 3062 30733088 3106 3310 3329 3360 3415 3822 4827

MTexptwoc 409 427 432 442 638 981 10221024 1026 1027 1036 1834 1966 20022005 2008 2554 2561 2756 2824 2839 2840

MTexptwon 411 1136 1145 3137 3266MTexpandfont 1515 1533 1537MTexpansion 998 1502 4666MTexpansionfalse 305 4524 4529 4623MTexpansiontrue 305 4254MTextracontext 3088 3473 3489 3512

3532 3546 3613 3616 3617 3619 36603668 3674 3686 3691 3804 3947 39513954 3957 3958 3963 3968 3969 3971 3998

MTextrainputenc 3802 3829 3834 3835MTfactordefault 338 4223 4503MTfamily 982 1064

1137 1180 1201 1203 1206 2466 3406 3407MTfamilyalias

983 984 1076 1144 1146 2476 2478 3408MTfeat 1087 1250 1339 1341 1343

1344 1346 1347 1353 1355 1358 1366ndash1370 1372 1374ndash1378 1381 1382 13871391 1394 1397 1400ndash1402 1411 14121417 1435 1809 1971 2361 2363 23662367 2371 2373 2376 2502 2504 25062510 2514 2518 2519 2522 2530 25322533 2535 2542 2546 2850 2851 2880 2882

MTfeatures 773 3088 3101 3310 3324 3355 3638 3813

MTfeatureslong 773 776 781 3059 3827MTfilelist 2382

2384 2392 2395 2397 2402 2405 3415 3419MTfindfile 982 984 2382MTfixcatcode 5MTfixfontset 3160 4474MTfixfontdimensix 1050 1075MTfont 406 731 733

975 981 1036 1043 1052ndash1055 10581061 1222 1223 1258 1259 1264 12651285 1286 1289 1292 1295 1320 13251331 1425 1428 1463 1464 1466 14671542 1546 1552 1557 1583 1584 16251627 1655 1656 1662 1663 1669 16701679ndash1681 1683 1684 1689ndash1691 17331734 1740 1741 1750 1751 1753 17541759 1760 1788 1792 1872 1873 22822572 2627 2884 2940ndash2942 2944 29592960 2971 2972 2977 2984 3002 3012 3021

MTfontcopy 1018 1026 1028 1036ndash1038 1048MTfontlist

2884 2971 2972 2974 2976 2977 3053MTfontorig 1020MTfontsets 3141 3160 3270 4474MTfontspecfalse 850MTfontspectrue 850 851 855 893MTgdefn 393 3464 3480 3504 3539

3553 3742 3766 3780 3837 3880ndash3885 4290MTgetaxis 3284ndash3287 3297MTgetbasefamily 2394 2432MTgetbasefamily 2438 2441MTgetcharunit 1249 1389 1415 1507MTgetcharwd 1283 1314 1392 1415MTgetconfig 4260MTgetexopt 1506 1524 1597MTgetexopt 1605ndash1607 1609 1616MTgetfont 3265 3275MTgetfont 3276 3281 3625MTgetfontandsize 3609 3624MTgetfontdimen 1318 1395MTgethighlevel 3136 3146 3299 3572 3583MTgetinhlist 1211 1509 1642 1720 2528MTgetlistname 2447 2504 2530MTgetlistname 2447MTgetlsbasefont 1827 1992 1999MTgetopt 1209 1364 1640 1718MTgetrange 3174 3184 3596MTgetsize 3191 3196 3205 3224 3295MTgetsize 3231 3242MTgetsize 3242MTgetslot 1246 2292 2549 3859 3866MTgetslot 2566 2570MTgetspaceunit

1389 1491 1653 1660 1667 1731 1738MTgettropt 1814 1934MTgettropt 1954ndash1957 1959MTgetunit 1397 1405 1943MTgetunit 1405MTgetkey 4441 4456MTglet 387 400 894 1022 1916 2002 2033

2179 2187 2938 3035 3054ndash3057 34083667 3685 3890 4162 4164 4790 4796 4882

INDEX 245

MTgletnc 399 1059 1206 1810 2046 2234 2542

2960 3053 3124 3127 3133 3261 34973726 3730 3737 3740 3748 3751 3754 3789

MTgletnn 404 3072 4287MTiffalse 303

865 872 895 912 2989 3996 4858 4865MTiflistexists

1199 1505 1523 1639 1717 1813 2501MTifluaotffont

687 707 1829 1864 1873 2295 2308MTifouternext

2113 2128 2132 2135 2140 2145ndash2148MTiftrue 303

866ndash868 873ndash875 896ndash898 925 929 9302982 4005 4009 4017 4022 4859ndash4863 4866

MTifdefinedcT 415 869 9011267 1303 1585 1672 1743 1858 19482740 3162 3406 3834 3937 4296 4299 4885

MTifdefinedcTF 415 815 1817 1842 1845 18561990 2069 2240 2287 2288 2505 2531 3946

MTifdefinednT 415 804 1115 1133 1161 1177 12681400 1436 1586 1611 1673 1744 19381946 1960 2484 2879 3121 3401 34923650 3896 3903 3910 3916 3947 3957 4441

MTifdefinednTF 415 10761093 1116 1134 1162 1178 1201 13661374 1599 1617 1804 1914 2276 23662472 2557 3149 3338 3341 3369 36413923 3978 3987 4057 4283 4286 4647 4825

MTifdim 535 658 659 663 664 3207 32164003ndash4005 4007 4008 4015ndash4017 4020 4021

MTifdimen 497 3233 3729 3739 3753 4232MTifempty 448 1222 1223 1256 1262

1480 1481 1652 1659 1666 1689ndash16911703ndash1705 1707ndash1709 1730 1737 17591760 1776 1777 2052 2053 2061 20772209 2232 2233 2245 3064 3100 31043148 3158 3185 3186 3199 3200 32893300 3323 3327 3354 3358 3440 35193634 3640 3660 3666 3674 3684 36913764 3812 3819 4070 4101 4263 4309 4382

MTifint 461 2716 3520 3765 4215 4225MTifstreq 544 1105 1442 1609 2362 2503

2518 2789 2792 2800 2809 3019 32643608 3728 3750 3752 3814 3821 39383958 4029 4073 4075 4078 4081 41034105 4119 4120 4192 4193 4198 42024231 4311 4318 4322 4329 4384 4390 4718

MTinclist 624776 805 1118 1136 1145 1181 17882384 2395 2971 2974 2984 2996 3062 3415

MTinrlist 652 1164 2493MTinrlist 652MTinrlist 652MTintlist 640 2444 3073MTintlist 640MTinannotfalse 100MTinannottrue 100MTincrement 737 3895 3902 3909 3915MTinfo 76 91 96 1057 4199 4425 4429MTinfomissingchar 1298 1328 2623

MTinfonl 76 92 93 97 816 12021329 4190 4200 4270 4284 4288 44864490 4502 4509 4630 4667 4687 46924701 4711 4734 4738 4751 4766 4835 4846

MTinfonotracking 996 1106 1110MTinfonotracking 1106 1110MTinhdo 2541 3848MTinhfeat 3802 3812 3817 3828MTinhsplit 3850 3854MTinlistfalse 624 628 641 653 2992MTinlisttrue 624 630 648 660 665 2992MTisactive 2554 2729MTischar 2561 2756 2773MTischarx 2782 2803 2840MTiscomposite 2559 2827MTisfeature 775 3105 3328 3359MTisletter 2555 2673 2761 2836MTisnumber 2699 2704 2824MTisoptchar 2755 2765MTissymbol 2558 2751MTistlig 2759 2817MTisunicomp 2834 2846MTisxchar 2793 2799MTiterate 674MTkerning 1002 1714 4737MTkerningfalse 311MTkerningtrue 311MTkncname 1722 1724 1767 3546MTkncontext 3047 3088MTkndoccontexts 3088MTknfactor 314MTknfactor 1366MTkninhname 1743ndash1745MTknmax 326MTknmin 326MTknsetname 3337MTknsplitval 1728MTknunit 320MTknunit 1374 1770MTledunhboxline 816MTledmacsetup 810 889ndash891MTletcn 401 404 405 1077 1215

1513 1600 1646 1724 1939 1947 23612373 2498 2502 2535 2940 3228 3654 3833

MTletnc 399 1402 2154 2514 2546 29873980 3985 4079 4082 4325 4332 4749 4764

MTletnn 404 1367 1372 1375 1387 1618 1621 1961

MTletterspace 341 1817 1947 1949 1951 4799 4800 4802

MTletterspace 1233 13031304 1817 1818 1821 1824 1832 18391844 1852 1865ndash1867 1874 1883 1927ndash1930 2074 2077 2195 2210ndash2213 2246 2249

MTletterspacedefault 341 4800MTlistname 2447

2495 2498 2505 2506 2508 2510 25312532 2534 2535 2539 2542 3869 3874

MTlistnamecount 3637 3642 3644MTloadinputenc 1443 1446 1455MTloadlist 1213 1511 1644 1722 2358MTloop 674 682 730 3251 3984MTlower 3178 3184 3599MTlsadjust 1881 2206MTlsadjust 2190 2214

INDEX 246

MTlsadjustempty 2192 2206MTlsadjustrelax 2193 2206MTlsbasefont 1999 2008 2011 2012MTlsfontspeccolon 1923MTlsfontspecfont 1834 1923MTlsouterk 1884

1889 1897 2090 2104 2151 2169 2254MTlssetls 2197 2200 2206MTlstoolarge 2213 2216 4802MTlsfont 1823

1833 1839 1852 1853 1862 1866 18671872 1966 1977 2022 2024 2039 20402047 2048 2055 2057 2063 2078 2247 2250

MTltxpickupfont 918 959 964 2955 2963MTlua 192 255 356

364 485 522 568 688 709 2296 2309 2577MTluacopyfont 1047MTluacopyfont 1027 1047MTluatexno 253 354MTmapclist 596MTmapclistc 596

1029 2291 2983 2995 3008 3052 30593101 3324 3355 3638 3813 3817 3827 4439

MTmapclistn 596 1092 2275 3088 3103 3123 3134

3172 3262 3310 3326 3357 3387 34623570 3581 3594 3606 3746 3762 38634065 4068 4097 4099 4128 4210 4307 4380

MTmaptlist 614MTmaptlistc 614 643 654 1032 1269

1587 1674 1745 2451 3014 3948 3997 4474MTmaptlistn 614 2423 2775 3889MTmaxchar 2673 2696MTmaxslot 2673 2722MTmaybedo 1087 1196 1503 1637 1715 1790MTmaybegobblewithtikz 856 1913 1970MTmayberemfromlist 3014 3018MTmicrotypecontext 3024MTminus 1832 1927ndash1930MTMT 2 76 79 82 84

86 91 92 94 95 292 787 884 886 36764242 4264 4425 4429 4487 4722 4839 4840

MTMTpickupfont 961 966 2955 2965MTnextlistname 2454 2463MTnextlistname 2473 2485 2491MTnlligatures 2282 3433MTnlsetname 2274 3433MTnofamilyfalse 1193 1198MTnofamilytrue 1193 2464MTnoligatures 1006 2270 4811MTnoligatures 2022 2024 2282 2285MTnoligaturesfalse 308MTnoligaturestrue 308 3442MTnonselectedfalse 1519 1534MTnonselectedtrue 1519 1522MTnorestfalse

2682 2689 2698 2719 2789 2801 2809MTnoresttrue 2552 2682 2707MToldcmd 66 71ndash74MToptautofalse 4040MToptautotrue 4040 4130MToptdefset 4056 4084 4109MToptDVIfalse 4041MToptDVItrue 4041 4137 4140MToptexpansionfalse 4039

MToptexpansiontrue 4039MToptions 3557MToptwarnadmissible 4042 4121 4202MToptwarnnan 4046 4217 4227MTorigaddaccent 2961MTorigforeignlanguage 4852 4854MTorigpickupfont 2890 2957MTorigpymacron 956 960 965MTorigselectlanguage 4847 4849MTouterkern 1883 1887 1889 1890 1894 1902

1993 1994 1996 2151 2152 2169 2227 2266MTouterspace 1877

1878 2037 2086 2088 2089 2102 21032120 2121 2136 2137 2141 2142 2167

MTpdfannot 99MTpdforlua 180 188 290 464 687 4783MTpdftexno 212 353MTpermute 3479 3503 3517 3538 3552 3840 3879MTpermute 3879MTpermute 3879MTpermute 3879MTpermute 3879MTpermute 3914 3919MTpermute 3927 3929MTpermutedefine 3920 3930ndash3932 3976MTpermutereset 3889 3982MTpermutelist 3473 3489

3515 3532 3546 3613 3614 3619 38383942 3943 3947 3951 3954 3957ndash39593961ndash3963 3971 3972 3998 4030 4032 4033

MTpickupfont 2955MTplain 125 146MTprcname 1213 1215 1471 3473MTprcontext 1018 3046 3088MTprdoccontexts 3088MTprfactor 314 4226 4503 4504MTprfactor 1366MTprinhname 1267 1268 1270MTprlevel 314 4501 4502MTprmax 326MTprmin 326MTprsetname 3337MTprsplitval 1254MTprunit 320 4233 4505MTprunit 1374 1474MTpresetaux 1476

1478 1480 1481 1484 1772 1774 1776 1777MTpresetauxfactor 1476 1484 1703ndash1705 1772MTpresetauxspace 1478 1484 1707ndash1709 1774MTpresetex 1612 1629MTpresetkn 1765MTpresetkn 1765MTpresetpr 1469MTpresetpr 1469MTpresetsp 1696MTpresetsp 1696MTProcessOptionsWithKV 4433 4457MTprotrudechars 4358 4362 4501 4689MTprotrusion 997 1195 4508MTprotrusionfalse 304MTprotrusiontrue 304 4249MTrbbaexpansion 768MTrbbakerning 768MTrbbaprotrusion 768MTrbbaspacing 768

INDEX 247

MTrbbatracking 768MTregisterfont 1010 2972 3055MTregisterfontcx 3007 3055MTregistersubstfont 2946 2973 3056MTregistersubstfontcx 2994 3056MTremfromclist 635 1042 2977 3002 3020 3562MTremfromlist 1032 1040MTremlastspace 436MTremovetlig 2820 2823MTrepeat 674 684 733 3254 3990MTrequireslatex 145 164 796

914 1965 2888 4048 4209 4434 4438 4881MTrequiresluatex 348 387 988 1055 1231

1538 1539 1561 1608 1784 2285 37793785 4133 4363 4377 4519 4596 4604 4683

MTrequirespdftex 348463 498 545 811 977 987 1001 10051016 1230 1275 1301 1560 1636 17141783 2019 2271 3434 3664 3778 37834159 4253 4376 4540 4571 4599 4682 4809

MTresa 558 560 626 633 636 638 642 647MTresb 559 560 636ndash638 646 647MTresetcontext 3034 3038 3044 3071MTresetcontext 3044 3071MTresetefcodes 1508 1532 1560 1613MTresetefcodes 1555 1565 1569MTresetkncodes 1719 1726 1756MTresetkncodes 1756MTresetprcodes 1210 1217 1226MTresetprcodes 1226MTresetspcodes 1641 1648 1686MTresetspcodes 1686MTrestorecatcodes 5 7 8 159 165 4887MTrestoreph 847 876 931MTsavedsetupfont 4422 4430MTscale 744 1278 1340 1354 1357 1574MTscalefactor 1280 1311 1338 1486 1631MTscaletoem 1257 1263 1275 1308 1492

1654 1661 1668 1732 1739 1950 2070 2241MTscrubfeature 1068 1080 3585MTscrubfeatures 1080 3165 3611MTselectedfalse 307MTselectedtrue 307MTseries 1064 1180 2467 2479MTsetallex 1555 1632MTsetallkn 1756 1778MTsetallpr 1219 1226 1482MTsetallsp 1686 1711MTsetbabelcontext 4824 4850 4855 4869MTsetcodes 1216 1237 1514 1647 1725 2374MTsetcurrls 1874MTsetcurrok 1894 1896 1902 1905 2125 2129MTsetcurros 1876 1904 2125 2129MTsetdefaultset 3355 3360 3368MTsetexcodes 1536 4614 4616MTsetexcodesn 1519 1536 4616MTsetexcodess 1504 4614MTsetexheirs 1587 1624MTsetinhlist 3809 3811MTsetinputenc 1212 1433 1510 1643 1721 2540MTsetinputenc 1436 1438MTsetkncodes 1716MTsetknheirs 1745 1749MTsetlistname 1214

1365 1512 1598 1645 1723 1936 2849

MTsetlsbasefont 2008MTsetlsfont 1871 1964 1977MTsetnamedkeys 3475 3491 3513 3534 3548 3557MTsetprcodes 1197MTsetprheirs 1271 1461MTsetspcodes 1638MTsetspheirs 1674 1678MTsettrcodes 1800 1972 1982MTsettrzero 1819 2008 4404MTSetExpansion 3487 3489MTSetExtraKerning 3544 3546MTSetExtraSpacing 3530 3532MTSetProtrusion 3471 3473MTSetTracking 3509 3511MTsetup 794 798 4151 4152 4882MTsetupcontexts 3033 3051MTsetupcopies 4473 4489MTsetupexpansion 4476 4513MTsetupkerning 4480 4729 4772MTsetupnoligatures 4481 4807MTsetupPDF 4472 4484 4494MTsetupprotrusion 4475 4497MTsetupspacing 4479 4696 4773MTsetupspacingcheck 4714 4885 4886MTsetuptracking 4477 4681 4744 4771MTsetupwarntracking 4478 4776MTsetupfont 973 2949 4423 4426 4430 4466MTsetupfonthook 864 894 900 905 931 938 976MTshape 1064 1180 2468 2480MTshorthandoff 4833 4864 4867MTshowpdfannot 106MTshrink 323 1527

4536 4537 4544 4545 4548 4552 4619 4632MTshrink 1527 1542 1546 1552 1597MTshrinkdefault 339MTsize 659 663 664 1056 1064 1180MTsizename 652 2495MTSOULdoword 949 950MTspcname 1644 1646 1698 3532MTspcontext 3047 3088 4718MTspdoccontexts 3088MTspfactor 314MTspfactor 1366MTspinhname 1672ndash1674MTspmax 326MTspmin 326MTspsetname 3337MTspsplitval 1650MTspunit 320MTspunit 1374 1701MTspacing 1002 1635 4710MTspacingfalse 310MTspacingtrue 310MTsplitcodes 1239 1243MTsplitname 981 1064MTstep 323 1528 4539

4541 4559 4563 4566 4633 4636 4637 4641MTstep 1528 1542 1546 1552 1597MTstretch 323 1526 4533

4534 4537 4544 4546 4551 4554 4618 4632MTstretch 1526 1542 1546 1552 1597MTstretchdefault 339 4534MTstripprefix 2782 2803 2839MTtemp 1221ndash1224 1688ndash1692 1758ndash1761

2042 2046 2049 2057 2060 2117 2120

INDEX 248

2126 2130 2133 2136 2141 2149 21512157 2231 2234 2251 3283 3308 44374442 4447 4448 4450 4453 4648 4652 4656

MTtempencoding 3922 3923 3933 3939MTtempfamily 3934MTtempseries 3935MTtempshape 3936MTtempsize 3890 3937 3946 3948 3952MTtestast 2068 2239 3147 3156MTtextmicrotypecontext 3041MTtextls 49 2192 2193 2195MTtextmicrotypecontext 3041MTtheprcode 1228 1258 1264 1868MTtheprcodetr 1228 1868MTtikzsetup 856 877 954MTtlistbreak 614 649 671 2456 4036MTtoks 302

1329 1360 1593 2553 2588 2615 26872694 2744 2795 2810 2819 2854 2866 2874

MTtrcname 19381939 1946 1947 1960 1961 3514 3521

MTtrcontext 3047 3088MTtrdoccontexts 3088MTtrfactor 1937MTtrfontlist 1786MTtrispace 1842 1843 1954MTtrligatures 1858 1957 2021 2024MTtrmax 326 2217ndash2219MTtrmin 326 2221ndash2223MTtrnoligatures 1858 2018MTtrokern 1856 1956MTtrospace 1845 1846 1954MTtroutericr 2130 2159MTtroutericr 2159MTtrouterl 1879 2082MTtrouternext 2110 2114 2161MTtrouterr 1906 2110 2126 2133 2159MTtrouterr 2111 2116MTtrsetokern 1857 2227MTtrsetokern 2232 2233 2238MTtrsetspace 1848 2038MTtrsetspace 2043ndash2045 2051MTtrsetspace 2054 2059 2062 2067MTtrsetname 3337MTtrunit 1938 2069 2240MTtracking 989 1786 1972 2951 4404 4405 4691MTtracking 1786 4405MTtrackingfalse 312 4748MTtrackingtrue 312MTtryorder 2451 2459MTundefinedchar 2734 2739 2750MTupper 3178 3184 3599MTuseset 3324 3329 3337MTUseMicrotypeSet 3320 3322MTval 3064ndash3066 3068 3074 3076

3079 3135 3139 3147 3150 3153 3173ndash3175 3187 3190 3192 3195 3197 3198

3204 3206 3207 3209 3212 3214 32253228 3233ndash3235 3237 3239 3244 3263ndash3265 3268 3277ndash3279 3291 3293 32983300 3302 3304 3571 3573 3582 35853587 3595ndash3597 3607ndash3609 3615 36203862 3869 3873 3874 4057 4058 40614069 4070 4073 4075 4078 4081 41004101 4103 4105 4308 4309 4311 43184322 4329 4335 4381 4382 4384 4390 4393

MTvariants 2444 3379 3390MTvinfo 76 93 995 1107 1111 1369

1378 1382 1417 1601 1619 1803 18212299 2310 2367 2391 2401 2404 25082510 2516 3045 3068 3417 3423 41904197 4314 4320 4326 4333 4387 4392 4826

MTwarnascii 2696 2853MTwarnaxisempty 3290 3301 3306MTwarncodetoolarge 1344 1347 1351MTwarnerr 76 4194 4195MTwarnextoolarge 1577 1580 1591MTwarnmaybeinputenc 2289 2867 2875 2878MTwarnnodim 3718 3731 3741 3755MTwarnnumbertoolarge 2723 2859MTwarnpresettowidth 1475 1495 1702 1771MTwarnrest 2594 2631 2864MTwarntrackingDVI 1822 4778MTwarnunknown 2584 2600 2610 2635 2872MTwarnunknownonce 2890 2891MTwarning 67 76 94 2218 2222 2302 2519

3122 3151 3237 3307 3402 3425 35223651 3720 3768 3781 3786 3940 39614032 4194 4199 4296 4373 4412 4414 4415

MTwarningnl 76 88 95 158 279 786 790 826838 907 1321 1358 1410 1450 14961592 1806 2030 2854 2860 2865 28732922 3494 3693 4043 4050 4061 41434195 4200 4234 4241 4277 4291 44634520 4564 4620 4639 4703 4719 4784 4871

MTwhilenum 680 704 710 934ndash936MTwithbabelandT

803 866ndash868 896ndash898 4859ndash4863 4866MTwithpackageT 800 851 853

870 873ndash875 877 882 889ndash893 903 915929 930 932 954 955 2890 2891 2933 4702

MTxadd 104 580 2392 2397 24022405 2999 3010 3076 3176 3419 3598 3869

MTxaddb 588 3618 3950MTxdefn 395 3339 3342 3371 3376 3405

3521 3613 3635 3797 3835 3971 4058 4060MTxetexno 244MTxspace 2149 2164MTxspace 2164MTxunicodefalse 852MTxunicodetrue 852 853 892

N newcomputermodern (package) 145newpx (package) 21 59 145 239newtx (package) 21 59 145 239

newunicodechar (package) 95 239normalfont 972 4659 4663nullfont 972

O outputmode 194 4133

INDEX 249

P pdfadjustinterwordglue 4406 4700pdfadjustspacing 196 950 4365 4369 4661pdfappendkern 4408 4733pdfcopyfont 1026pdfcprot (package) 26 30 54 64 99 231pdffeedback 1055pdffontexpand 1539 1542 1546 1552pdffontsize 1054 1055pdfnoligatures 2285 2301 2307pdfprependkern 4407 4732pdfprotrudechars 195 4364 4368 4795pdfTEX (engine) 1 4 6ndash9 13ndash19 23ndash35 37ndash39

41ndash43 45 46 53 57ndash59 64 70 72 73

75 76 79 80 83 85 112 115 117 119129 133 134 136 137 140 197 199 231ndash237

pdftexcmds (package) 37 237pdftracingfonts 358pickupfont 2921 2923 2932 2955ndash2957pifont (package) 100pinyin (package) 56 236 237protrudechars 195 4364protrusion (option) 6 11 125 126psnfss (package) 79 198 239pstricks (package) 134pxfonts (package) 21 145

Q qfonts (package) 21 145 233

R ragged2e (package) 26 81 139 237 238reledmac (package) 53 239relsize (package) 108

removetlig 2818rightmarginkern 822rpcode 1223 1264 1265 1464 1467 1867

S selected (option) 8 14 33 69 90 126 232selectfont 1973 3037 3049 4301 4877setfontsize 3244SetExpansion 14 36 3484SetExtraKerning 18 38 3542SetExtraSpacing 19 39 3527SetProtrusion 13 35 3468SetTracking 15 37 3507sfcode 4717shapepar (package) 29 53shbscode 1669 1670 1681 1684 1691showhyphens 4647shrink (option) 8 15 33 128 136 138 234 236

slantsc (package) 177soul (package) 4 30 56 82 235 237 240soulutf8 (package) 30 237spacefactor 2093spaceskip 2094 2097spacing (option) 6 11 26 31 126 237 238stbscode 1662 1663 1680 1684 1690step (option) 8 31 33 128 136 138 232 234 236step (package) 21 145 240stix (package) 21 145 240stix2 (package) 21 145 240stretch (option) 8 15 25 33 128 135 136 138 236svjour3 (package) 108 240

T tagcode 1862 2288 2294tempora (package) 21 145 239tex4ht (package) 54 235TEX Live (distribution) 28 39 146 233textls 23 52 53 923 947 1882 1968 1985 2190textls 24textmicrotypecontext 22 48 919 3041tikz (package) 54 227 237 239tikzposter (package) 238

tipa (package) 100trace (package) 101 235tracingmicrotype 87tracingmicrotypeinpdf 98tracingmicrotypeinpdfallfalse 105tracingmicrotypeinpdfalltrue 105tracking (option) 6 11 23 31 126txfonts (package) 21 145

U ucs (package) 95 236ulgothic (package) 21UnicodeEncodingName 2832unit (option) 7 32 233 235

UseMicrotypeSet 12 33 60 73 3116 3318UTFfouroctetsnoexpand 2737UTFthreeoctetsnoexpand 2736UTFtwooctetsnoexpand 2735

V verbose (option) 9 31 32 128 232 233 236

W wordcount (package) 52 236

X XCharter (package) 21 146 239xeCJK (package) 27 100 238 239

XETEX (engine) 1 4 6 7 9 1213 20 29 31 34 38 40 50 53 57 59 8393 133 138 140 144 147 151 159 238ndash240

XeTeXcharglyph 2621XeTeXfonttype 2572XeTeXglyph 1292XeTeXglyphindex 2608

XeTeXglyphname 2627XeTeXlastfontchar 733XeTeXprotrudechars 4372xspace 2148 2149xspace (package) 83 238xspaceskip 2096 2099xunicode (package) 97 98 238xunicode-addon (package) 100

Y yfonts (package) 24

Z zefonts (package) 21 144

THE LATEX PROJECT PUBLIC LICENSE 250

E The LATEX Project Public LicenseLPPL Version 13c 2008-05-04

Copyright 1999 2002ndash2008 LATEX3 Project

Everyone is allowed to distribute verbatimcopies of this license document but modificationof it is not allowed

PreambleThe LATEX Project Public License (LPPL) is the primarylicense under which the LATEX kernel and the base LATEXpackages are distributed

You may use this license for any work of which youhold the copyright and which you wish to distribute Thislicense may be particularly suitable if your work is TEX-related (such as a LATEX package) but it is written in sucha way that you can use it even if your work is unrelatedto TEX

The section lsquoWHETHER AND HOW TO DISTRIBUTEWORKS UNDER THIS LICENSErsquo below gives instructionsexamples and recommendations for authors who are con-sidering distributing their works under this license

This license gives conditions under which a work maybe distributed and modified as well as conditions underwhich modified versions of that work may be distributed

We the LATEX3 Project believe that the conditionsbelow give you the freedom to make and distribute mod-ified versions of your work that conform with whatevertechnical specifications you wish while maintaining theavailability integrity and reliability of that work If youdo not see how to achieve your goal while meeting theseconditions then read the document lsquocfgguidetexrsquo andlsquomodguidetexrsquo in the base LATEX distribution for sugges-tions

DefinitionsIn this license document the following terms are used

Work Any work being distributed under this License

Derived Work Any work that under any applicable lawis derived from the Work

Modification Any procedure that produces a DerivedWork under any applicable law ndash for example theproduction of a file containing an original file asso-ciated with the Work or a significant portion of sucha file either verbatim or with modifications andortranslated into another language

Modify To apply any procedure that produces a DerivedWork under any applicable law

Distribution Making copies of the Work available fromone person to another in whole or in part Distri-bution includes (but is not limited to) making anyelectronic components of the Work accessible by filetransfer protocols such as FTP or HTTP or by sharedfile systems such as Sunrsquos Network File System (NFS)

Compiled Work A version of the Work that has been pro-cessed into a form where it is directly usable on a

computer system This processing may include us-ing installation facilities provided by the Work trans-formations of the Work copying of components ofthe Work or other activities Note that modificationof any installation facilities provided by the Workconstitutes modification of the Work

Current Maintainer A person or persons nominated assuch within the Work If there is no such explicit nom-ination then it is the lsquoCopyright Holderrsquo under anyapplicable law

Base Interpreter A program or process that is normallyneeded for running or interpreting a part or the wholeof the WorkA Base Interpreter may depend on external compon-ents but these are not considered part of the BaseInterpreter provided that each external componentclearly identifies itself whenever it is used interact-ively Unless explicitly specified when applying thelicense to the Work the only applicable Base Inter-preter is a lsquoLATEX-Formatrsquo or in the case of files belong-ing to the lsquoLATEX-formatrsquo a program implementing thelsquoTEX languagersquo

Conditions on Distribution and Modification1 Activities other than distribution andor modification

of the Work are not covered by this license they areoutside its scope In particular the act of running theWork is not restricted and no requirements are madeconcerning any offers of support for the Work

2 You may distribute a complete unmodified copy ofthe Work as you received it Distribution of only partof the Work is considered modification of the Workand no right to distribute such a Derived Work maybe assumed under the terms of this clause

3 You may distribute a Compiled Work that has been

generated from a complete unmodified copy of theWork as distributed under Clause 2 above as long asthat Compiled Work is distributed in such a way thatthe recipients may install the Compiled Work on theirsystem exactly as it would have been installed if theygenerated a Compiled Work directly from the Work

4 If you are the Current Maintainer of the Work youmay without restriction modify the Work thus creat-ing a Derived Work You may also distribute the De-rived Work without restriction including CompiledWorks generated from the Derived Work DerivedWorks distributed in this manner by the Current Main-

THE LATEX PROJECT PUBLIC LICENSE 251

tainer are considered to be updated versions of theWork

5 If you are not the Current Maintainer of the Workyou may modify your copy of the Work thus creatinga Derived Work based on the Work and compile thisDerived Work thus creating a Compiled Work basedon the Derived Work

6 If you are not the Current Maintainer of the Workyou may distribute a Derived Work provided the fol-lowing conditions are met for every component ofthe Work unless that component clearly states in thecopyright notice that it is exempt from that conditionOnly the Current Maintainer is allowed to add suchstatements of exemption to a component of the Work

(a) If a component of this Derived Work can be adirect replacement for a component of the Workwhen that component is used with the Base In-terpreter then wherever this component of theWork identifies itself to the user when used inter-actively with that Base Interpreter the replace-ment component of this Derived Work clearly andunambiguously identifies itself as a modified ver-sion of this component to the user when usedinteractively with that Base Interpreter

(b) Every component of the Derived Work containsprominent notices detailing the nature of thechanges to that component or a prominent refer-ence to another file that is distributed as part ofthe Derived Work and that contains a completeand accurate log of the changes

(c) No information in the Derived Work implies thatany persons including (but not limited to) the au-thors of the original version of the Work provideany support including (but not limited to) the re-porting and handling of errors to recipients of theDerived Work unless those persons have statedexplicitly that they do provide such support forthe Derived Work

(d) You distribute at least one of the following withthe Derived Work

i A complete unmodified copy of the Work ifyour distribution of a modified component ismade by offering access to copy the modifiedcomponent from a designated place then of-fering equivalent access to copy the Work from

the same or some similar place meets this con-dition even though third parties are not com-pelled to copy the Work along with the modi-fied component

ii Information that is sufficient to obtain a com-plete unmodified copy of the Work

7 If you are not the Current Maintainer of the Workyou may distribute a Compiled Work generated froma Derived Work as long as the Derived Work is dis-tributed to all recipients of the Compiled Work andas long as the conditions of Clause 6 above are metwith regard to the Derived Work

8 The conditions above are not intended to prohibitand hence do not apply to the modification byany method of any component so that it becomesidentical to an updated version of that component ofthe Work as it is distributed by the Current Maintainerunder Clause 4 above

9 Distribution of the Work or any Derived Work in analternative format where the Work or that DerivedWork (in whole or in part) is then produced by ap-plying some process to that format does not relax ornullify any sections of this license as they pertain tothe results of applying that process

10 (a) A Derived Work may be distributed under a dif-ferent license provided that license itself honorsthe conditions listed in Clause 6 above in regardto the Work though it does not have to honor therest of the conditions in this license

(b) If a Derived Work is distributed under a differentlicense that Derived Work must provide sufficientdocumentation as part of itself to allow each recip-ient of that Derived Work to honor the restrictionsin Clause 6 above concerning changes from theWork

11 This license places no restrictions on works that areunrelated to the Work nor does this license place anyrestrictions on aggregating such works with the Workby any means

12 Nothing in this license is intended to or may be usedto prevent complete compliance by all parties withall applicable laws

No WarrantyThere is no warranty for the Work Except when otherwisestated in writing the Copyright Holder provides the Worklsquoas isrsquo without warranty of any kind either expressed orimplied including but not limited to the implied war-ranties of merchantability and fitness for a particular pur-pose The entire risk as to the quality and performance ofthe Work is with you Should the Work prove defectiveyou assume the cost of all necessary servicing repair orcorrection

In no event unless required by applicable law oragreed to in writing will The Copyright Holder or any au-

thor named in the components of the Work or any otherparty who may distribute andor modify the Work as per-mitted above be liable to you for damages includingany general special incidental or consequential damagesarising out of any use of the Work or out of inability touse the Work (including but not limited to loss of datadata being rendered inaccurate or losses sustained byanyone as a result of any failure of the Work to operatewith any other programs) even if the Copyright Holderor said author or said other party has been advised of thepossibility of such damages

THE LATEX PROJECT PUBLIC LICENSE 252

Maintenance of The WorkThe Work has the status lsquoauthor-maintainedrsquo if the Copy-right Holder explicitly and prominently states near theprimary copyright notice in the Work that the Work canonly be maintained by the Copyright Holder or simplythat it is lsquoauthor-maintainedrsquo

The Work has the status lsquomaintainedrsquo if there is aCurrent Maintainer who has indicated in the Work thatthey are willing to receive error reports for the Work (forexample by supplying a valid e-mail address) It is notrequired for the Current Maintainer to acknowledge oract upon these error reports

The Work changes from status lsquomaintainedrsquo to lsquoun-maintainedrsquo if there is no Current Maintainer or the per-son stated to be Current Maintainer of the work cannotbe reached through the indicated means of communica-tion for a period of six months and there are no othersignificant signs of active maintenance

You can become the Current Maintainer of the Workby agreement with any existing Current Maintainer totake over this role

If the Work is unmaintained you can become theCurrent Maintainer of the Work through the followingsteps1 Make a reasonable attempt to trace the Current Main-

tainer (and the Copyright Holder if the two differ)through the means of an Internet or similar search

2 If this search is successful then enquire whether theWork is still maintained

(a) If it is being maintained then ask the CurrentMaintainer to update their communication datawithin one month

(b) If the search is unsuccessful or no action to re-sume active maintenance is taken by the Current

Maintainer then announce within the pertinentcommunity your intention to take over mainten-ance (If the Work is a LATEX work this could bedone for example by posting to comptexttex)

3 (a) If the Current Maintainer is reachable and agreesto pass maintenance of the Work to you then thistakes effect immediately upon announcement

(b) If the Current Maintainer is not reachable andthe Copyright Holder agrees that maintenance ofthe Work be passed to you then this takes effectimmediately upon announcement

4 If you make an lsquointention announcementrsquo as describedin 2b above and after three months your intentionis challenged neither by the Current Maintainer norby the Copyright Holder nor by other people thenyou may arrange for the Work to be changed so as toname you as the (new) Current Maintainer

5 If the previously unreachable Current Maintainer be-comes reachable once more within three months of achange completed under the terms of 3b or 4 thenthat Current Maintainer must become or remain theCurrent Maintainer upon request provided they thenupdate their communication data within one month

A change in the Current Maintainer does not of itselfalter the fact that the Work is distributed under the LPPLlicense

If you become the Current Maintainer of the Workyou should immediately provide within the Work a prom-inent and unambiguous statement of your status as Cur-rent Maintainer You should also announce your newstatus to the same pertinent community as in 2b above

Whether and How to Distribute Works under This LicenseThis section contains important instructions examplesand recommendations for authors who are consideringdistributing their works under this license These authorsare addressed as lsquoyoursquo in this section

Choosing This License or Another LicenseIf for any part of your work you want or need to use dis-tribution conditions that differ significantly from those inthis license then do not refer to this license anywherein your work but instead distribute your work under adifferent license You may use the text of this license as amodel for your own license but your license should notrefer to the LPPL or otherwise give the impression thatyour work is distributed under the LPPL

The document lsquomodguidetexrsquo in the base LATEX dis-tribution explains the motivation behind the conditionsof this license It explains for example why distributingLATEX under the GNU General Public License (GPL) wasconsidered inappropriate Even if your work is unrelatedto LATEX the discussion in lsquomodguidetexrsquo may still berelevant and authors intending to distribute their worksunder any license are encouraged to read it

A Recommendation on Modification WithoutDistributionIt is wise never to modify a component of the Work evenfor your own personal use without also meeting the aboveconditions for distributing the modified component Whileyou might intend that such modifications will never bedistributed often this will happen by accident ndash you mayforget that you have modified that component or it maynot occur to you when allowing others to access the modi-fied version that you are thus distributing it and violatingthe conditions of this license in ways that could havelegal implications and worse cause problems for thecommunity It is therefore usually in your best interest tokeep your copy of the Work identical with the public oneMany works provide ways to control the behavior of thatwork without altering any of its licensed components

How to Use This LicenseTo use this license place in each of the components ofyour work both an explicit copyright notice including yourname and the year the work was authored andor lastsubstantially modified Include also a statement that thedistribution andor modification of that component is

THE LATEX PROJECT PUBLIC LICENSE 253

constrained by the conditions in this licenseHere is an example of such a notice and statement

pigdtx Copyright 2005 M Y Name This work may be distributed andor modified under the conditions of the LaTeX Project Public License either version 13 of this license or (at your option) any later version The latest version of this license is in httpswwwlatex-projectorglppltxt and version 13 or later is part of all distributions of LaTeX version 20051201 or later This work has the LPPL maintenance status `maintained The Current Maintainer of this work is M Y Name This work consists of the files pigdtx and pigins and the derived file pigsty

Given such a notice and statement in a file the con-ditions given in this license document would apply withthe lsquoWorkrsquo referring to the three files lsquopigdtxrsquo lsquopiginsrsquoand lsquopigstyrsquo (the last being generated from lsquopigdtxrsquousing lsquopiginsrsquo) the lsquoBase Interpreterrsquo referring to anylsquoLATEX-Formatrsquo and both lsquoCopyright Holderrsquo and lsquoCurrentMaintainerrsquo referring to the person lsquoM Y Namersquo

If you do not want the Maintenance section of LPPLto apply to your Work change lsquomaintainedrsquo above intolsquoauthor-maintainedrsquo However we recommend that youuse lsquomaintainedrsquo as the Maintenance section was addedin order to ensure that your Work remains useful to thecommunity even when you can no longer maintain andsupport it yourself

Derived Works That Are Not Replacements

Several clauses of the LPPL specify means to provide reliab-ility and stability for the user community They thereforeconcern themselves with the case that a Derived Work isintended to be used as a (compatible or incompatible)replacement of the original Work If this is not the case(eg if a few lines of code are reused for a completelydifferent task) then clauses 6b and 6d shall not apply

Important Recommendations

Defining What Constitutes the WorkThe LPPL requires that distributions of the Work con-

tain all the files of the Work It is therefore important thatyou provide a way for the licensee to determine whichfiles constitute the Work This could for example beachieved by explicitly listing all the files of the Work nearthe copyright notice of each file or by using a line such as

This work consists of all files listed in manifesttxt

in that place In the absence of an unequivocal list itmight be impossible for the licensee to determine what isconsidered by you to comprise the Work and in such acase the licensee would be entitled to make reasonableconjectures as to which files comprise the Work

  • Contents
  • List of Tables
  • Micro-typography with TeX
  • Getting started
  • Options
    • Enabling the micro-typographic features
    • Character protrusion
    • Font expansion
    • Tracking
    • Miscellaneous options
    • Changing options later
      • Selecting fonts for micro-typography
      • Micro fine tuning
        • Character protrusion
        • Font expansion
        • Tracking
        • Additional kerning
        • Interword spacing
        • Character inheritance
        • Configuration files
          • Context-sensitive setup
          • Letterspacing revisited
          • Disabling ligatures
          • Hints and caveats
          • Contributions
          • Acknowledgments
          • References
          • Short history
          • Implementation
            • Preliminaries
              • Debugging
              • Requirements
              • Declarations
              • Auxiliary macros
              • Compatibility
                • Font setup
                  • Protrusion
                  • Expansion
                  • Interword spacing (glue)
                  • Additional kerning
                  • Tracking
                  • Disabling ligatures
                  • Loading the configuration
                  • Translating characters into slots
                  • Hook into LaTeXs font selection
                  • Context-sensitive setup
                    • Configuration
                      • Font sets
                      • Variants and aliases
                      • Disabling ligatures
                      • Interaction with babel
                      • Fine tuning
                      • Character inheritance
                      • Permutation
                        • Package options
                          • Declaring the options
                          • Loading the definition file
                          • Reading the configuration file
                          • Hook for other packages
                          • Changing options later
                          • Processing the options
                              • Configuration files
                                • Font sets
                                • Font variants and aliases
                                • Interaction with babel
                                • Note on admissible characters
                                • Character inheritance
                                  • OT1
                                  • T1
                                  • LY1
                                  • OT4
                                  • QX
                                  • T5
                                  • EU1 EU2 TU
                                  • Euro symbols
                                    • Tracking
                                    • Font expansion
                                    • Character protrusion
                                      • Normal
                                      • Italics
                                      • Small caps
                                      • Italic small caps
                                      • Text companion
                                      • Computer Modern math
                                      • AMS symbols
                                      • Euler
                                      • Euro symbols
                                        • Interword spacing
                                          • Nonfrenchspacing
                                            • Additional kerning
                                              • French
                                              • Turkish
                                                  • OpenType configuration files
                                                    • Character inheritance
                                                    • Character protrusion
                                                      • Auxiliary file for micro fine tuning
                                                      • The title logo
                                                        • Macros
                                                        • Document
                                                          • The letterspacing illustration
                                                            • Macros
                                                            • Document
                                                              • Change history
                                                                • 10 (20040911)
                                                                • 11 (20040921)
                                                                • 12 (20041003)
                                                                • 13 (20041027)
                                                                • 14 (20041112)
                                                                • 14a (20041117)
                                                                • 14b (20041126)
                                                                • 15 (20041215)
                                                                • 16 (20050124)
                                                                • 16a (20050202)
                                                                • 17 (20050323)
                                                                • 18 (20050623)
                                                                • 19 (20051028)
                                                                • 19a (20051205)
                                                                • 19b (20060120)
                                                                • 19c (20060202)
                                                                • 19d (20060505)
                                                                • 19e (20060728)
                                                                • 19f (20060909)
                                                                • 20 (20070114)
                                                                • 21 (20070121)
                                                                • 22 (20070714)
                                                                • 23 (20071223)
                                                                • 23a (20080229)
                                                                • 23b (20080604)
                                                                • 23c (20081111)
                                                                • 23d (20090327)
                                                                • 23e (20091109)
                                                                • 24 (20100110)
                                                                • 25 (20130313)
                                                                • 25a (20130523)
                                                                • 26 (20160501)
                                                                • 26a (20160514)
                                                                • 27 (20170707)
                                                                • 27a (20180114)
                                                                • 27b (20190228)
                                                                • 27c (20191010)
                                                                • 27d (20191118)
                                                                • 28 (20201207)
                                                                • 28a (20210222)
                                                                • 28b (20210225)
                                                                • 28c (20210314)
                                                                  • Index
                                                                    • Options
                                                                    • Commands
                                                                    • A
                                                                    • B
                                                                    • C
                                                                    • D
                                                                    • E
                                                                    • F
                                                                    • G
                                                                    • H
                                                                    • I
                                                                    • J
                                                                    • K
                                                                    • L
                                                                    • M
                                                                    • N
                                                                    • O
                                                                    • P
                                                                    • Q
                                                                    • R
                                                                    • S
                                                                    • T
                                                                    • U
                                                                    • V
                                                                    • W
                                                                    • X
                                                                    • Y
                                                                    • Z
                                                                      • The LaTeX Project Public License
Page 4: The microtype package - ctan.math.utah.edu

MICRO-TYPOGRAPHY WITH TEX 4

1 Micro-typography with TEXMicro-typography is the art of enhancing the appearance and readability of adocument while exhibiting a minimum degree of visual obtrusion It is concernedwith what happens between or at the margins of characters words or lines Whereasthe macro-typographical aspects of a document (ie its layout) are clearly visibleeven to the untrained eye micro-typographical refinements should ideally not evenbe recognisable That is you may think that a document looks beautiful but youmight not be able to tell exactly why good micro-typographic practice tries toreduce all potential irritations that might disturb a reader

Some essential micro-typographical aspects are already taken care of by TEX outof the box ndash and in an outstanding manner ndash namely hyphenation and justificationas well as kerning and ligatures Other aspects are in the userrsquos scope of responsib-ilities eg to specify the right amounts of spacing around punctuation charactersnumbers or quotation marks On top of this a number of long-standing micro-typographic techniques have been introduced to the TEX world relatively recentlywith pdfTEX and have since also propagated to LuaTEX and XETEX These featuresmake them the tool of choice not only for the creation of electronic documentsbut also of works of outstanding time-honoured typography most prominentlycharacter protrusion (also known as margin kerning) and font expansion QuotingHagraven Thecirc Thagravenh the author of pdfTEX who writes in his thesis

After you have read the texton the right you can viewthe effect of the features itdescribes by clicking on thelinks

Protrusion onoff

Expansion onoff

Both features are enabledthroughout this document

lsquoMargin kerning is the adjustments of the characters at the margins of a typeset textA simplified employment of margin kerning is hanging punctuation Margin kerningis needed for optical alignment of the margins of a typeset text because mechanicaljustification of the margins makes them look rather ragged Some characters canmake a line appear shorter to the human eye than others Shifting such charactersby an appropriate amount into the margins would greatly improve the appearanceof a typeset text

Composing with font expansion is the method to use a wider or narrower variantof a font to make interword spacing more even A font in a loose line can be substi-tuted by a wider variant so the interword spaces are stretched by a smaller amountSimilarly a font in a tight line can be replaced by a narrower variant to reducethe amount that the interword spaces are shrunk by There is certainly a potentialdanger of font distortion when using such manipulations thus they must be usedwith extreme care The potentiality to adjust a line width by font expansion can betaken into consideration while a paragraph is being broken into lines in order tochoose better breakpointsrsquo [Thagravenh 2000 p 323]

lsquoMargin kerning is the adjustments of the characters at the margins of a typeset textA simplified employment of margin kerning is hanging punctuation Margin kerningis needed for optical alignment of the margins of a typeset text because mechanicaljustification of the margins makes them look rather ragged Some characters canmake a line appear shorter to the human eye than others Shifting such charactersby an appropriate amount into the margins would greatly improve the appearanceof a typeset text

Composing with font expansion is the method to use a wider or narrower variant ofa font to make interword spacing more even A font in a loose line can be substitutedby a wider variant so the interword spaces are stretched by a smaller amountSimilarly a font in a tight line can be replaced by a narrower variant to reducethe amount that the interword spaces are shrunk by There is certainly a potentialdanger of font distortion when using such manipulations thus they must be usedwith extreme care The potentiality to adjust a line width by font expansion can betaken into consideration while a paragraph is being broken into lines in order tochoose better breakpointsrsquo [Thagravenh 2000 p 323]

lsquoMargin kerning is the adjustments of the characters at the margins of a typeset textA simplified employment of margin kerning is hanging punctuation Margin kerningis needed for optical alignment of the margins of a typeset text because mechanicaljustification of the margins makes them look rather ragged Some characters canmake a line appear shorter to the human eye than others Shifting such charactersby an appropriate amount into the margins would greatly improve the appearanceof a typeset text

Composing with font expansion is the method to use a wider or narrower variantof a font to make interword spacing more even A font in a loose line can be substi-tuted by a wider variant so the interword spaces are stretched by a smaller amountSimilarly a font in a tight line can be replaced by a narrower variant to reducethe amount that the interword spaces are shrunk by There is certainly a potentialdanger of font distortion when using such manipulations thus they must be usedwith extreme care The potentiality to adjust a line width by font expansion can betaken into consideration while a paragraph is being broken into lines in order tochoose better breakpointsrsquo [Thagravenh 2000 p 323]

If you had a PDF viewer thatunderstands PDF 15 youcould view the effect of themicro-typographic features byclicking on the links

Both features are enabledthroughout this document

lsquoMargin kerning is the adjustments of the characters at the margins of a typeset textA simplified employment of margin kerning is hanging punctuation Margin kerningis needed for optical alignment of the margins of a typeset text because mechanicaljustification of the margins makes them look rather ragged Some characters canmake a line appear shorter to the human eye than others Shifting such charactersby an appropriate amount into the margins would greatly improve the appearanceof a typeset text

Composing with font expansion is the method to use a wider or narrower variant of afont to make interword spacing more even A font in a loose line can be substituted bya wider variant so the interword spaces are stretched by a smaller amount Similarlya font in a tight line can be replaced by a narrower variant to reduce the amountthat the interword spaces are shrunk by There is certainly a potential danger of fontdistortion when using such manipulations thus they must be used with extremecare The potentiality to adjust a line width by font expansion can be taken intoconsideration while a paragraph is being broken into lines in order to choose betterbreakpointsrsquo [Thagravenh 2000 p 323]

Another micro-typographic technique which has always been extremely difficultto achieve in TEX is robust and hyphenatable letterspacing (tracking)1 Whereasletterspacing can easily be and often is abused when applying it to lowercaseletters readability may be increased by slightly letterspacing (small) capitals or bydecreasing the tracking of very large uppercase type

Setting additional kerning for individual characters is especially (but not only)useful for languages whose typographical tradition requires certain characters to beseparated by a space For example it is customary in French typography to add asmall space before question mark exclamation mark and semi-colon and a biggerspace before the colon and the guillemets Until now this could only be achieved

1 The soul package undertakes great efforts but may still fail in certain circumstances even to systemat-ically adjust the tracking of a font throughout the document remains impossible

GETTING STARTED 5

by making these characters active (as is done for example by the babel package)which may not always be a robust solution In contrast to the standard kerningbuilt into the fonts (which will of course apply as usual) this additional kerningrelates to single characters not to character pairs

Adjustment of interword spacing is based upon the idea that in order to achievea uniform greyness of the text the space between words should also depend onthe surrounding characters For example if a word ends with an lsquorrsquo the followingspace should be a tiny bit smaller than that following say an lsquomrsquo You can thinkof this concept as an extension to TEXrsquos lsquospace factorsrsquo This feature may enhancethe appearance of paragraphs even more Emphasis in the last sentence is onthe word lsquomayrsquo this extension is still highly experimental ndash in particular onlyending characters will currently influence the interword space Also the settingsshipped with microtype are but a first approximation and I would highly welcomecorrections and improvements I suggest reading the reasoning behind the settingsin section 159

The possibility finally to disable all or selected ligatures is particularly useful fortypewriter fonts

The microtype package provides an interface to all these micro-typographic exten-sions All micro-typographic aspects may be customised to your taste and needs ina straight-forward and systematic manner The next chapters present a survey ofall options and customisation possibilities Should the micro-typographic extensiondiscussed in a section work only with certain TEX engines this requirement ismarked inside a grey text box on the right

2 Getting startedThere is nothing surprising in loading this package

usepackagemicrotype

This will be sufficient in most cases and if you are not interested in fine-tuningthe micro-typographic appearance of your document (however unlikely this wouldseem since using this package is proof of your interest in typographic issues) youmay actually skip the rest of this document If this on the other hand does notsatisfy you ndash be it for theoretical or practical reasons ndash this manual will guide youon the path to the desired results along the following milestones

bull Enable the desired micro-typographic features either via the respective packageoption or with the microtypesetup command (section 3)

bull Select the fonts to which this feature should be applied by declaring and activatinglsquosets of fontsrsquo A number of sets are predefined which may be activated directly inthe package options (section 4)

bull Fine-tune the micro-typographic settings of the fonts or sets of fonts (section 5)

bull If yoursquore of the kind who always wants to march on you will certainly be interestedin the possibility of context-sensitive setup (section 6)

bull You are even countenanced to leave the path of typographic virtue and steal somesheep (section 7) or trespass in other ways (section 8)

bull Should you encounter any obstacles follow the hints and caveats (section 9)

OPTIONS 6

3 OptionsLike many other LATEX packages the microtype package accepts options in thewell-known key=value syntax In the following you will find a description of allkeys and their possible values (lsquotruersquo may be omitted multiple values whereallowed must be enclosed in braces the default value is shown on the right ndashif preceded by an asterisk this default only applies when running an up-to-datepdfTEX in PDF mode)

31 Enabling the micro-typographic featurestrue false compatibility nocompatibility langfont set namerang trueprotrusion

These are the main options to control the level of micro-typographic refinementexpansionwhich the fonts in your document should gain By default the package is moderatelygreedy character protrusion will always be enabled font expansion will only bedisabled when the fonts cannot be expanded automatically that is with pdfTEXversions older than 120 or in DVI output mode (see section 35) or with XETEX Inother words microtype will try to apply as much micro-typography as can safely beexpected to work under the respective conditions (hence it is usually not necessaryto load the package with different options eg for PDF resp DVI mode)

Protrusion and expansion may be enabled or disabled independently from eachother by setting the respective key to true resp false The activate option is aactivateshortcut for setting both options at the same time Therefore the following linesall have the same effect (when creating PDF files with a recent version of pdfTEX)

usepackage[protrusion=trueexpansion]microtype

usepackage[activate=truenocompatibility]microtype

usepackagemicrotype

With activated font expansion andor character protrusion line breaks (and con-sequently page breaks) may turn out differently If this is not desired ndash because youare re-typesetting a book whose pagination must not change ndash you may pass thevalue compatibility to the protrusion andor expansion options Typographicallyhowever the results will be suboptimal hence the default value is nocompatibility

Finally you may also specify the name of a font set to which character protrusionandor font expansion should be restricted See section 4 for a detailed discussionSpecifying a font set for a feature implicitly activates this feature

true false langfont set namerang falsetracking

This option will systematically change the tracking of the fonts specified in theactive font set (by default all small capitals) It is not available with XETEX (youmay use the lsquoLetterSpacersquo option of the fontspec package instead) With pdfTEXit is only available in PDF mode

true false langfont set namerang falsekerning

These features do not unconditionally improve the quality of the typeset text thespacingspacing feature is still considered experimental while the kerning feature onlymakes sense in special cases Therefore neither feature is enabled by default Theyare not available with XETEX or LuaTEX

OPTIONS Character protrusion 7

Table 1

Availability of micro-typographic features

TEX engine Micro-typographic features

Engine Version Output Protrusion Expansion Tracking Kerning Spacing

manual automatic

pdfTEX lt 014f DVIPDF empty empty empty empty empty emptyge 014f DVIPDF AElig empty empty empty emptyge 120 DVI AElig empty empty empty empty

PDF AElig AElig empty empty emptyge 140 DVI AElig empty empty

PDF AElig AElig

LuaTEX ge 030 DVI AElig empty empty empty emptyPDF AElig AElig empty empty empty

ge 062 DVI AElig empty ()a empty emptyPDF AElig empty AElig empty empty

XETEX ge 09997 PDF AElig empty empty empty empty empty

AElig = enabled = not enabled empty = not available a by means of variable tracking

Table 1 presents an overview of which micro-typographic features are availableand enabled by default for the relevant TEX versions and output modes

Whether ligatures should be disabled cannot be controlled via a package optionbut by using the DisableLigatures command which is explained in section 8

32 Character protrusion pdfTEX 014f | LuaTEX 030 | XETEX 09997

langintegerrang 1000factor

Using this option you can globally increase or decrease the amount by which thecharacters will be protruded While a value of 1000 means that the full protrusionas specified in the configuration (see section 51) will be used a value of 500 wouldresult in halving all protrusion factors of the configuration This might be useful ifyou are generally satisfied with the settings but prefer the margin kerning to beless or more visible (eg if you are so proud of being able to use this feature thatyou want everybody to see it or ndash to mention a motivation more in compliancewith typographical correctness ndash if you are using a large font that calls for moremodest protrusion)

character langdimensionrang characterunit

This option is described in section 51 apropos the command SetProtrusion Usewith care

33 Font expansion pdfTEX 014f | LuaTEX 030

true false trueauto

Beginning with pdfTEX version 120 (inherited by LuaTEX) the expanded instancesof the fonts may be calculated automatically and at run-time instead of the user

OPTIONS Tracking 8

having to prepare them in advance This option is true by default provided that youare using a TEX engine with this capability and the output mode is PDF2 If auto isset to false the font instances for all expansion steps must exist (with files calledlangfont namerangplusmnlangexpansion valuerang eg cmr12+10 as described in the pdfTEX manual)With recent versions of LuaTEX expansion is always automatic

When generating DVI files font expansion has to be enabled explicitly WithpdfTEX automatic font expansion will not work because the postprocessing drivers(dvips dvipdfm etc) resp the DVI viewer are not able to generate the fonts on thefly With LuaTEX on the other hand expansion in DVI mode is realised by modifyingthe inter-letter spacing (tracking) instead of the glyphs themselves which may ormay not be desired

langintegerrang 20stretch

You may specify the stretchability and shrinkability of a font ie the maximumshrinkamount that a font may be stretched or shrunk The numbers will be divided by1000 so that a stretch limit of 10 means that the font may be expanded by upto 1 The default stretch limit is 20 The shrink limit will by default be the sameas the stretch limit

langintegerrang 1step

Fonts are not expanded by arbitrary amounts but only by certain discrete stepswithin the expansion limits With recent versions of pdfTEX (140 or newer) orLuaTEX this option is by default set to 1 in order to allow trying the maximumnumber of font instances and hence to guarantee the best possible output3 OlderpdfTEX versions however had to include every font instance in the PDF file whichmay increase the file size quite dramatically Therefore in case you are using apre-140 pdfTEX version step is by default set to one fifth of the smaller value ofstretch and shrink

true false falseselected

When applying font expansion it is possible to restrict the expansion of somecharacters that are more sensitive to deformation than others (eg the lsquoOrsquo incontrast to the lsquoIrsquo) This is called selected expansion and its usage allows increasingthe stretch and shrink limits (to say 30 instead of 20) however the gain is limitedsince at the same time the average stretch variance will be decreased Thereforethis option is by default set to false so that all characters will be expanded by thesame amount See section 52 for a more detailed discussion

34 Tracking pdfTEX 140 | LuaTEX 062

langintegerrang 100letterspace

This option changes the default amount for tracking (see section 53) resp letter-spacing (see section 7) The amount is specified in thousandths of 1em admissiblevalues are in the range of minus1000 to +1000

2 With pdfTEX automatic font expansion does not work with bitmap fonts Therefore if you are using theComputer Modern Roman fonts in T1 encoding you should either install the cm-super package or usethe Latin Modern fonts (package lmodern)

3 The downside with this default is that pdfTEX may run out of memory with huge documents in thiscase read about the error messages in the lsquoHints and caveatsrsquo section (9) or try with a larger step

OPTIONS Miscellaneous options 9

35 Miscellaneous optionstrue false falsedraft

If the draft option is passed to the package all micro-typographic extensions willfinalbe disabled which may lead to different line and hence page breaks The draftand final options may also be inherited from the class options of course you canoverride them in the package options Eg if you are using the class option draftto show any overfull boxes you should load microtype with the final option

true false errors silent falseverbose

Information on the settings used for each font will be written into the log file ifyou enable the verbose option When microtype encounters a problem that is notfatal (eg an unknown character in the settings or non-existent settings) it willby default only issue a warning and try to continue Loading the package withverbose=errors will turn all warnings into errors so that you can be sure that noproblem will go unnoticed If on the other hand you have investigated all warningsand decide to ignore them you may silence microtype with verbose=silent

true false falsebabel

Loading the package with the babel option will adjust the typesetting according tothe respective selected language Read section 6 for further information

langfile namerang microtypeconfig

Various settings for this package will be loaded from a main configuration file bydefault microtypecfg (see section 57) You can have a different configuration fileloaded instead by specifying its name without the extension eg config=mycrotype

true false falseDVIoutput

pdfTEX and LuaTEX are not only able to generate PDF output but can also spit outDVI files In fact all recent TEX systems are using pdfTEX as the default enginealso for DVI output and LuaTEX too can be called in DVI mode However sincechanging the output mode inside the document may have undesired effects thisoption should be considered deprecated instead it is recommended to just callthe respective program (latex resp dvilualatex) For XETEX this option is notapplicable

36 Changing options laterlangkey = value listrangmicrotypesetup

Inside the preamble this command accepts all package options described above(except for config) In the document body this command may be used to changethe general settings of the micro-typographic extensions It then accepts all optionsfrom section 31 expansion protrusion and activate which in turn may receivethe values true false compatibility or nocompatibility and tracking kerningand spacing with the admissible values true or false Passing the name of a fontset is not allowed Using this command you could for instance temporarily disablefont expansion by saying

microtypesetupexpansion=false

SELECTING FONTS FOR MICRO-TYPOGRAPHY 10

4 Selecting fonts for micro-typographyBy default character protrusion will be applied to all text fonts used in the docu-ment and a basic set of fonts will be subject to font expansion You may want tocustomise which fonts should get the benefit of micro-typographic treatment Thiscan be achieved by declaring and activating lsquofont setsrsquo these font sets are specifiedvia font attributes that have to match

[langfeaturesrang] langset namerang langset of fontsrangDeclareMicrotypeSet

This command declares a new set of fonts to which the micro-typographic exten-DeclareMicrotypeSetsions should be applied The optional argument may contain a comma-separatedlist of features to which this set should be restricted The starred version of thecommand declares and activates the font set at the same time

The set of fonts is specified by assigning values to the NFSS font attributes encod-ing family series shape and size (cf LATEX 2ε font selection) Letrsquos start with anexample In the main configuration file microtypecfg a font set called lsquobasictextrsquois defined as follows

DeclareMicrotypeSetbasictext encoding = OT1T1T2ALY1OT4QXT5EU1EU2TU family = rmsf series = md size = normalsizefootnotesizesmalllarge

If you now call

UseMicrotypeSet[protrusion]basictext

in the documentrsquos preamble only fonts in the text encodings roman or sansserif families normal (or lsquomediumrsquo) series and in sizes called by normalsizefootnotesize small or large will be protruded Math fonts on the other handwill not since they are in another encoding Neither will fonts in bold face or hugefonts Etc

If an attribute list is empty or missing ndash like the lsquoshapersquo attribute in the aboveexample ndash it does not constitute a restriction In other words this is equivalentto specifying all possible values for that attribute Therefore the predefined setlsquoalltextrsquo which is declared as

DeclareMicrotypeSetalltext encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU

is far less restrictive The only condition here is that the encoding must matchIf a value is followed by an asterisk (like lsquormrsquo and lsquosfrsquo in the first example)

it does not designate an NFSS code but will be translated into the documentrsquoslangvaluerangdefault eg rmdefault4 A single asterisk means langattributerangdefaulteg encodingdefault respectively normalsize for the size axis Sizes may eitherbe specified as a dimension (lsquo10rsquo or lsquo10ptrsquo) or as a size selection command withoutthe backslash You may also specify ranges (eg lsquosmall-Largersquo) while the lower

4 These translations will take place AtBeginDocument which means that changes to the defaults inside thepreamble will also be taken into account Only in cases where you change font defaults AtBeginDocumentyourself you need to load microtype after these changes

SELECTING FONTS FOR MICRO-TYPOGRAPHY 11

Table 2

Predefined font sets

Set name Font attributes

Encoding Family Series Shape Size

all empty empty empty empty empty

alltext(allmath)

Text encodings TS1(OML OMS U)

empty empty empty empty

alltext-nott(allmath-nott)

Text encodings TS1(OML OMS U)

rmsf

empty empty empty

basictext(basicmath)

Text encodings(OML OMS)

rmsf

md empty normalsizefootnotesizesmall large

smallcaps Text encodings empty empty scsiscit empty

footnotesize Text encodings TS1 empty empty empty -small

scriptsize Text encodings TS1 empty empty empty -footnotesize

normalfont encoding family series shape normalsize

lsquoText encodingsrsquo = OT1 T1 T2A LY1 OT4 QX T5 EU1 EU2 TU lsquo rsquo = lsquo defaultrsquo

boundary is included in the range the upper boundary is not Thus lsquo12-16rsquo wouldmatch 12 pt 135 pt and 15999 pt for example but not 16 pt You are allowed toomit the lower or upper bound (lsquo-10rsquo lsquolarge-rsquo)

Additionally to this declaration scheme you can add single fonts to a set usingthe lsquofontrsquo key which expects the concatenation of all font attributes separated byforward slashes ie lsquofont = langencodingranglangfamilyranglangseriesranglangshaperanglangsizerangrsquo This allowsyou to add fonts to the set that are otherwise disjunct from it For instance if youwanted to have the roman family in all sizes protruded but only the normal sizedpossibly italic typewriter font (in contrast to say the small one) this is how youcould declare the set

DeclareMicrotypeSet[protrusion] myset encoding = T1 family = rm font = T1ttmn T1ttmit

As you can tell from the example the asterisk notation is also permitted for thefont key A single asterisk is equivalent to lsquorsquo ie the normal font Sizeselection commands are possible too however ranges are not allowed

Table 2 lists the eleven predefined font sets They may also be activated by passingtheir name to the feature options protrusion expansion tracking kerning andspacing when loading the package for example

usepackage[protrusion=allmathtracking=smallcaps]microtype

MICRO FINE TUNING 12

[langfeaturesrang] langset namerangUseMicrotypeSet

This command activates a font set previously declared by DeclareMicrotypeSetUsing the optional argument you can limit the application of the set to one ormore features This command only has an effect if the feature was activated in thepackage options

[langfeaturesrang] langset namerangDeclareMicrotypeSetDefault

If a feature is enabled but no font set has been chosen explicitly the sets declared bythis command will be activated By default the lsquoalltextrsquo font set will be activatedfor character protrusion and additional kerning the lsquoalltext-nottrsquo set for fontexpansion and interword spacing and the lsquosmallcapsrsquo set for tracking

These commands may only be used in the preamble or in the main configuration fileTheir scope is global to the document Only one set per feature may be activated

5 Micro fine tuningEvery character asks for a particular protrusion kerning or spacing amount Itmay also be desirable to restrict the maximum expansion of certain charactersFurthermore since every font looks different settings have to be specific to afont or set of fonts This package offers flexible and straight-forward methods ofcustomising these finer aspects of micro-typography

All fine-tuning commands follow basically the same syntax they all take threearguments the first one is optional and may contain additional options in thesecond argument you specify the set of fonts to which the settings should apply thethird argument contains the actual settings Here as in all configuration commandsall spaces are ignored

The set of fonts to which the settings should apply is declared using the samesyntax of langfont axisrang = langvalue listrang pairs as for the command DeclareMicrotypeSet(see section 4) with the only difference that values including asterisks (which asyou may recall stand for the respective default) will be translated immediatelyinstead of at the end of the preamble To find the matching settings for a givenfont the package will try all combinations of font encoding family series shapeand size with decreasing significance in this order For instance if settings exist forboth the current family (say T1cmr) and for italic fonts in the normal weight(T1mit) the settings for the cmr family would apply The encoding must alwaysmatch

The characters may be specified either as a single letter (A) as a text sym-bol command (textquoteleft) or as a slot number (resp Unicode number forLuaTEX or XETEX) three or more digits for decimal notation prefixed with forhexadecimal with rsquo for octal numerals (eg the lsquoflrsquo ligature in T1 encoding 0291D rsquo35) 8-bit (and even UTF-8) characters may be entered directly or in LATEXrsquostraditional 7-bit notation both A and Auml are valid provided the character is ac-tually declared in both the input and the font encoding With LuaTEX or XETEXyou may additionally specify a (font-specific) glyph name prefixed with lsquorsquo (egthe lsquoflrsquo ligature as f_l) Note that you also have the possibility to declare lists ofcharacters that should inherit settings (see section 56)

MICRO FINE TUNING Character protrusion 13

51 Character protrusion pdfTEX 014f | LuaTEX 030 | XETEX 09997

[langoptionsrang] langset of fontsrang langprotrusion settingsrangSetProtrusion

Using this command you can set the protrusion factors for each character of a fontor a set of fonts A very incomplete example would be the following

SetProtrusion encoding = T1 family = cmr A = 5050 textquoteleft = 700

which would result in the character lsquoArsquo being protruded by 5 of its width onboth sides and the left quote character by 70 of its width into the left marginThis would apply to all font shapes series and sizes of the T1 encoded ComputerModern Roman family

The protrusion settings consist of langcharacterrang = langprotrusion factorsrang pairs The pro-trusion factors designate the amount that a character should be protruded intothe left margin (first value) respectively into the right margin (second value) Bydefault the values are relative to the character widths so that a value of 1000means that the character should be shifted fully into the margin while for examplewith a value of 50 it would be protruded by 5 of its width Negative values areadmitted as well as numbers larger than 1000 (but effectively not more than 1emof the font) You may omit either number if the character should not be protrudedon that side but must not drop the separating comma

Options

name You may assign a name to the protrusion settings so that you are able toload it by another list

load You can load another list (provided you assigned a name to it) before thecurrent list will be loaded so that the fonts will inherit the values from the loadedlist

In this way the configuration may be simplified considerably You can for instancecreate a default list for a font settings for other shapes or series can then load thesesettings and extend or overwrite them (since the value that comes last will take pre-cedence) Font settings will be loaded recursively The following options will affectall loaded lists in other words any options from the loaded lists will be ignored

factor This option can be used to influence all protrusion factors of the listoverriding any global factor setting (see section 32) For instance if you wantfonts in larger sizes to be protruded less you could load the normal lists just witha different factor applied to them

SetProtrusion [ factor = 700 load = cmr-T1 ] encoding = T1 family = cmr size = large-

MICRO FINE TUNING Font expansion 14

unit By default the protrusion factors are relative to the respective characterrsquoswidth The unit option may be used to override this and make microtype regardall values in the list as thousandths of the specified width Issuing for instancelsquounit=1emrsquo would have the effect that a value of say 50 now results in the characterbeing protruded by 5 of an em of the font (thus simulating the internal measuringof pdfTEXrsquos lpcode and rpcode primitives) The default behaviour can be restoredwith unit=character5

preset Presets the protrusion codes of all characters to the specified values(=langleftranglangrightrang) possibly scaled by a factor A unit setting will only be takeninto account if it is not =character

inputenc Selects an input encoding that should apply to this list regardless ofwhat the documentrsquos input encoding is You may specify any encoding that can beloaded via the inputenc package eg ansinew koi8-r utf8

context The scope of the list may be limited to a certain context For furtherdetails see section 6

52 Font expansion pdfTEX 014f | LuaTEX 030

[langoptionsrang] langset of fontsrang langexpansion settingsrangSetExpansion

By default all characters of a font are allowed to be stretched or shrunk by the sameamount However it is also possible to limit the expansion of certain characters ifthey are more sensitive to deformation This is the purpose of the SetExpansioncommand Note that it will only have an effect if the package has been loadedwith the selected option (cf section 33) Otherwise the expansion settings willbe ignored ndash unlike the options in the optional first argument which will still beevaluated If the selected option has been set to true and settings for a font donrsquotexist font expansion will not be applied to this font at all Should the extraordinarysituation arise that you want to employ selected expansion in general but for aparticular font (set) all characters should be expanded or shrunk by the sameamount you would have to declare an empty list for these fonts

The expansion settings consist of langcharacterrang = langexpansion factorrang pairs You mayspecify one number for each character which determines the amount that a charac-ter may be expanded The numbers denominate thousandths of the full expansionFor example if you set the expansion factor for the character lsquoOrsquo to 500 it will onlybe expanded or shrunk by one half of the amount that the rest of the characterswill be expanded or shrunk While the default value for character protrusion is 0 ndashthat is if you didnrsquot specify any characters none would be protruded ndash the defaultvalue for expansion is 1000 which means that all characters would be expandedby the same amount

Options

name load preset inputenc context Analogous to SetProtrusion the optionalargument may be used to assign a name to the list to load another list to preset

5 The unit option can even be passed globally to the package (cf section 32) However all providedsettings are created under the assumption that the values are relative to the character width Thereforeyou should only change it if you are certain that the default settings will not be used in your document

MICRO FINE TUNING Tracking 15

all expansion factors to set the input encoding or to determine the context of thelist (expansion contexts are only possible with pdfTEX version 1404 or newer)

auto stretch shrink step These keys can be used to override the global set-tings from the package options (see section 33) If you donrsquot specify either one ofstretch shrink and step their respective global value will be used (that is nocalculation will take place)

As a practical example suppose you have a paragraph containing a widow thatcould be avoided by shrinking the font a bit more In conjunction with the contextoption (see section 6 for further details) you could thus allow for more expansionin this particular paragraph

SetExpansion [ context = sloppy stretch = 30 shrink = 60 step = 5 ] encoding = OT1T1TS1 END PREAMBLEmicrotypecontextexpansion=sloppy This paragraph contains a `fussy widow

This method of employing contexts to temporarily apply different expansion para-meters only works with pdfTEX version 1404 or later6 or with LuaTEX Also notethat both pdfTEX and LuaTEX prohibit the use of fonts with different expansionlimits or steps (even of different fonts) within one paragraph hence the sloppycontext would have to be applied to complete paragraphs

factor This option provides a different method to alter expansion settings forcertain fonts working around the restriction just mentioned The factor optioninfluences the expansion factors of all characters (in contrast to the overall stretch-ability) of the font For instance if you want the italic shape to be expanded lessyou could declare

SetExpansion [ factor = 500 ] encoding = shape = it

The factor option can only be used to decrease the stretchability of the charactersthat is it may only receive values smaller than 1000 Also it can only be used forsingle fonts or font sets setting it globally in the package options wouldnrsquot makemuch sense ndash to this end you use the packagersquos stretch and shrink options

53 Tracking pdfTEX 140 | LuaTEX 062

[langoptionsrang] langset of fontsrang langtracking amountrangSetTracking

An important typographic technique ndash which was missing in TEX for a long time ndash isthe adjustment of tracking ie the uniform addition or subtraction of letter space

6 For older versions a dirty trick is laid out in section 142 on page 59

MICRO FINE TUNING Tracking 16

tofrom all the characters in a font For example it is good typographic practiceto slightly space out text set in all capitals or small capitals (as in this document)Legibility may also be improved by minimally increasing the tracking of smallerand decreasing that of larger type7 The SetTracking command allows specifyingthe tracking amount for different fonts or font sets It will also be evaluated by thetextls command which may be used for letterspacing shorter pieces of text (seesection 7)

The tracking amount is specified in thousandths of 1em (or the given unit)negative values are allowed too

Options

name unit context These options serve the same functions as in the previousconfiguration commands The unit may be any dimension default is 1em

spacing When the inter-letter spacing is altered the inter-word spacing probablyalso needs to be adjusted This option expects three numbers for interword spacestretch and shrink respectively which are given in thousandths of 1em (or of thecurrent unit) If a value is followed by an asterisk it denotes thousandths of therespective font dimension which will be added to it For instance with

SetTracking[ spacing = 25166 ] encoding = shape = sc 25

the interword space will be increased by 25 the stretch amount will be set to0166em while the shrink amount will be left untouched If you donrsquot specifythe spacing option the interword space will be scaled by the current letterspaceamount (as in the above example) while stretch and shrink will not be changed

outer spacing If an interword space immediately precedes or follows letter-spaced text it will by default be equal to that within the text With this optionwhich accepts the same values as spacing it may be adjusted independently

outer kerning If on the other hand no interword space precedes or followsyou may still want to slightly set off the first and last letter from adjoining lettersThis option expects the kerning amounts for left and right hand side separated bya comma in thousandths of 1em (or the current unit) If a value is followed byan asterisk it denotes thousandths of the current letterspacing amount A singleasterisk means lsquo500rsquo this is also the default ie the sum of the outer kerns is bydefault equal to the current letterspace amount To remove kerning on both sidesyou would write lsquoouter kerning=00rsquo

no ligatures By default ligatures in letterspaced fonts will be constructed asusual which may be advisable when changing the tracking by only a small amountFor larger letterspacing amounts on the other hand the normal letter space withinligatures would have displeasing e ff e c t s This key expects a comma-separatedlist of characters for which ligatures should be disabled only the character thatbegins a ligature must be specified If the key is given without a value all ligaturesof the font will be disabled With pdfTEX this is not recommended however sinceit entails that kerning will be switched off too With LuaTEX there is no suchlimitation The default settings disable ligatures for the character lsquofrsquo only ie lsquoffrsquo

7 With full-featured fonts like Computer Modern this is usually not necessary though since they come inoptical sizes and the tracking of the small-capitals font is already adjusted

MICRO FINE TUNING Tracking 17

lsquofirsquo ffirsquo etc8 In exceptional situations you can manually break up a ligature byinserting lsquokern0ptrsquo resp babelrsquos | shortcut or protect it by enclosing it inlslig (see section 7)

Since a picture is worth a thousand words probably even more if in our case itdepicts a couple of letterspaced words letrsquos bring one to sum up these somewhatconfusing options Suppose you had the following settings (which are in no wayrecommended they only serve illustrative purposes)

SetTracking [ no ligatures = f spacing = 600-100 outer spacing = 450250150 outer kerning = ] encoding = 160

and then write

Stop textlsstealing sheep

this would be the (typographically dubious) outcomeClick on the image to show thekerns and spacings involvedClick on emphasised words inthe text below to reveal therelation of image and code

If you had a PDF viewer thatunderstands PDF 15 youcould hide the arrows select-ively

Stop T e a l i n g s h e e pWhile the word lsquoStoprsquo is not letterspaced the space between the letters in the othertwo words is expanded by the tracking amounttracking amounttracking amount of 1601000em = 016em Theinner spaceinner spaceinner space within the letterspaced text is increased by 60 while its stretchstretchstretch amountis decreased by 10 and the shrinkshrinkshrink amount is left untouched The outer spaceouter spaceouter space (of045em) immediately before the piece of text may stretchstretchstretch by 025em and shrinkshrinkshrinkby 015em Note that there is no outer space after the text since the exclamationmark immediately follows instead the default outer kernouter kernouter kern of half the letterspaceamount (008em) is added Furthermore one ligatureligatureligature wasnrsquot broken up becausewe neglected to specify the lsquosrsquo in the no ligatures key

As another more realistic example suppose you want to space out all small capitalsby 501000em fonts smaller than small by 002em and to decrease the trackingof large type by 002em This could be achieved with the following settings

usepackage[tracking=true]microtypeDeclareMicrotypeSet[tracking]my encoding = size = -smallLarge- font = sc SetTracking[ no ligatures = f ] encoding = shape = sc 50 SetTracking encoding = size = -small 20 SetTracking encoding = size = Large- -20

Letterspaced fonts for which settings donrsquot exist will be spaced out by the default of01em (adjustable with the package option letterspace see section 35) Suppose

8 With pdfTEX versions older than 1404 all ligatures and hence all kerning will be disabled It istherefore recommended to use at least version 1404

MICRO FINE TUNING Additional kerning 18

your editor wants you to shorten your 1000-pages chef-drsquoœuvre by a handful ofpages you could load microtype with (fingers crossed)

usepackage[tracking=alltextletterspace=-40]microtype

54 Additional kerning pdfTEX 140

[langoptionsrang] langset of fontsrang langkerning settingsrangSetExtraKerning

With this command you can fine tune the extra kerning In contrast to standardkerning which is always associated with a pair of characters and to trackingwhich specifies the space between all characters of a font the extra kerning relatesto single characters that is whenever a particular character appears in the textthe specified kerning will be inserted regardless of which character precedes respfollows it (Put differently this feature allows modifying the left or right sidebearingsof specific glyphs)

It should not be neglected to mention a limitation of this feature words imme-diately following such a kern (not separated by a space) will not be hyphenatedunless you insert the breakpoints manually eg for kerning after the apostrophelsquolrsquoapos-trophersquo Furthermore additional kerning will not be applied in mathmode These restrictions of pdfTEX will hopefully be lifted some time

The kerning settings are specified as pairs of langcharacterrang = langkerning valuesrang wherethe latter consist of two values the kerning added before the character and thekerning appended after the respective character Once again either value may beomitted but not the separating comma

Options

name load factor preset inputenc These options serve the same function asin the previous configuration commands

unit Admissible values are space character and a langdimensionrang By default thevalues denote thousandths of 1em

context When it comes to kerning settings this option is especially useful sinceit allows applying settings depending on the current language

For example you can find the following settings intended to be used for documentswritten in French in the main configuration file

SetExtraKerning [ name = french-default context = french unit = space ] encoding = OT1T1LY1 = 1000 = fontdimen2 = 500 ~ thinspace = 500 = 500

What is the result of these settings If they are active like in the current paragrapha thin space will be inserted in front of each question mark exclamation mark and

MICRO FINE TUNING Interword spacing 19

semicolon a normal space in front of the colon Read section 6 to learn how toactivate these settings This paragraph was input like this

beginmicrotypecontextkerning=french What is the result of these settings If they are active like in the current paragraph a thin space will be inserted in front of each question mark exclamation mark and semicolon a normal space in front of the colon Read section~refseccontext to learn how to activate these settings This paragraph was input like thisendmicrotypecontext

55 Interword spacing pdfTEX 140

[langoptionsrang] langset of fontsrang langspacing settingsrangSetExtraSpacing

This command allows you to fine tune the interword spacing (also known as glue)A preliminary remark on what a lsquospacersquo is may be in order between two wordsTEX will insert a so called glue which is characterised by three parameters ndash thenormal distance between two words the maximum amount of space that may beadded to it and the maximum amount that may be subtracted The latter twoparameters come into effect whenever TEX tries to break a paragraph into lines anddoes not succeed it can then stretch or shrink the spaces between words Thesethree parameters are specific to each font

On top of these glue dimensions TEX has the concept of lsquospace factorsrsquo Theymay be used to increase the space after certain characters most prominently thepunctuation characters pdfTEXrsquos additional spacing adjustment may be consideredas an extension to space factors with much finer control while space factorswill influence all three parameters of interword space (or glue) by the sameamount ndash the kerning the maximum amount that the space may be stretched andthe maximum amount that it may be shrunk ndash you may modify these parametersindependently from one another Furthermore the values may be set differentlyfor each font And probably most importantly the parameters may not only beincreased but also decreased Note that when interword spacing adjustment is ineffect space factors are ignored

The spacing settings are declared as pairs of langcharacterrang = langspacing factorsrang wherethe latter consist of three numbers first the additional kern inserted after thischaracter if it appears before an interword space second the additional stretchamount and third the additional shrink amount All values may also be negativein which case the dimensions will be decreased Not all values have to be specifiedbut the settings must always contain the two separating commas

Options

name load factor preset inputenc context These options serve the same func-tion as in the previous configuration commands

unit You can specify the unit by which the specified numbers are measuredPossible values are character a langdimensionrang and additionally space The latterwill measure the values in thousandths of the respective space dimension set bythe font By default the unit is measured by the space dimensions For examplewith the following (nonsensical) settings

MICRO FINE TUNING Character inheritance 20

SetExtraSpacing [ unit = space ] default font = = 100010001000

the space inserted after a full stop would be doubled (technically speaking 2 timesfontdimen 2) as would the maximum stretch and shrink amounts of the interwordspace (fontdimen3 and 4) Conversely setting all three values to minus1000 wouldcompletely cancel a space after the respective character

56 Character inheritance[langfeaturesrang] langset of fontsrang langinheritance listsrangDeclareCharacterInheritance

In most cases accented characters should inherit the settings from the respectivebase character For example all of the characters Agrave Aacute Acirc Atilde Auml Aring and A shouldprobably be protruded by the same (absolute) amount as the character A Usingthe command DeclareCharacterInheritance you may declare such classes ofcharacters so that you then only have to set up the respective base character Withthe optional argument which may contain a comma-separated list of featuresyou can confine the scope of the list Additionally it accepts the inputenc key toset the input encoding for this list The font set can be declared in the usual wayThe inheritance lists are declared as pairs of langbase characterrang = langlist of inheritingcharactersrang Unless you are using a different encoding or a very peculiarly shapedfont there should be no need to change the default character inheritance settings

The situation is different with LuaTEX and XETEX however the default inherit-ance settings only contain those glyhps that can safely be assumed to exist in anyfont but since OpenType fonts may contain many more glyphs for different scripts(languages) it is quite probable that font-specific settings are necessary whichshould be specified in the fontrsquos configuration file (see next section)

57 Configuration filesThe default configuration consisting of inheritance settings declarations of font setsand alias fonts and generic protrusion expansion spacing and kerning settings willbe loaded from the file microtypecfg You may extend this file with custom settings(or load a different configuration file with the lsquoconfigrsquo option see section 35)

If you embark on creating new settings for a font family you should put theminto a separate file whose name must be lsquomt-langfont familyrangcfgrsquo (eg lsquomt-cmrcfgrsquoany spaces in the font name should be removed eg lsquomt-MinionProcfgrsquo) andmay contain all commands described in the current section 5 These files will beloaded automatically if you are actually using the respective fonts This packageships with configuration files for a number of font families Table 3 lists them all

langlist of suffixesrangDeclareMicrotypeVariants

On its search for a configuration file the package will also try to remove fromDeclareMicrotypeVariantsthe font name a suffix of one or more letters that denotes a lsquovariantrsquo of the basefont (cf Karl Berryrsquos Fontname) It is thus possible to put settings for eg thefonts pplx (expert set) pplj (oldstyle numerals) and ppl (plain) into one and the

MICRO FINE TUNING Configuration files 21

Table 3

Fonts with tailored protru-sion settings

Font family (NFSS code) Features

Type 1 fonts Encodings Shapes

Generic OT1 T1 T2A LY1 QX (TS1)a n (it sl sc)a

Computer Modern Roman (cmr)b OT1 OT4 T1 T2A T5 LY1 TS1 n it sl sc

Bitstream Charter (bch)c OT1 T1 T5 LY1 TS1 n it (sl)d sc

EB Garamonde OT1 T1 LY1 TS1 n it (sl)d sc

URW Garamond (ugm)f OT1 T1 TS1 n it

Bitstream Letter Gothic (blg)g OT1 T1 TS1 n it

Adobe Minion (pmnx pmnj) OT1 T1 T2A LY1 TS1 n it (sl)d sc si

Palatino (ppl pplx pplj)h OT1 OT4 T1 LY1 (TS1)a n it (sl)d sc

Times (ptm ptmx ptmj)i OT1 OT4 T1 LY1 QX (TS1)a n it (sl)d sc

Computer Modern math (cmsy cmm)j OMLOMS nit

AMS symbols (msa msb) U n

Euler (eur eus euf)k U n

Euro symbols (Adobe ITC marvosym) UOT1 n it

OpenType fonts Scripts Shapes

Generic Latin n (it sl sc)a

Latin Modern Romanl Latin Greek n it (sl)d

Charis SIL Latin Cyrillic Greek n it sc

Palatinom Latin n it sc

a Incompleteb Aliases Latin Modern Roman (lmr) ae (aer) zefonts (zer) eco (cmor) hfoldsty (hfor)

mlmodern (mlmr)c Aliases mathdesignCharter (mdbch) MicroPressrsquos chmath (chr) XCharterd Settings inherited from italic shapee Alias Adobe Garamond (pad padx padj)f Aliases mathdesignURW Garamond (mdugm) garamondx (zgmx zgmj)g Alias ulgothic (ulg)h Aliases pxfonts (pxr) qfontsQuasiPalatino TEX Gyre Pagella (qpl) newpx FPL Neu (fp9x fp9j)

domitiani Aliases txfonts (txr) qfontsQuasiTimes TEX Gyre Termes (qtm) newtx tempora step

stixstix2j Aliases Latin Modern (lmsy lmm) mlmodern (mlmsy mlmm)k Alias eulervm (zeur zeus)l Alias New Computer Modernm Aliases Palatino Linotype Palatino LT Std TEX Gyre Pagella Domitian

same file mt-pplcfg This command expects a comma-separated list of variantsuffixes The starred version appends the suffix(es) to the existing list The defaultdeclaration in microtypecfg is

DeclareMicrotypeVariantsxjwad01-LF-TLF-OsF-TOsF

langfont namerang langalias fontrangDeclareMicrotypeAlias

This command may be used for fonts that are very similar or actually the same (forinstance if you did not stick to the Berry naming scheme when installing a font)An example would be the Latin Modern fonts which are derived from ComputerModern so that it is not necessary to create new settings for them ndash you could say

CONTEXT-SENSITIVE SETUP 22

DeclareMicrotypeAliaslmrcmr

which would make the package whenever it encounters the font lmr and does notfind settings for it also try the font cmr In fact you will find this very line alongwith some others in the default configuration file

langfont namerangLoadMicrotypeFile

In rare cases it might be necessary to load a font configuration file manually forinstance from within another configuration file or to be able to extend settingsdefined in a file that would otherwise not be loaded automatically or would beloaded too late9 This command will load the file lsquomt-langfont namerangcfgrsquo

6 Context-sensitive setupThe microtype package also allows applying different micro-typographic settingsto the fonts depending on the context in which they occur This opens up the spacefor infinite possibilities of tweaking the documentrsquos appearance

langcontext assignmentsrangmicrotypecontext

This command may be used anywhere in the document (also in the preamble)to change the micro-typographic context in the current group To each feature(protrusion expansion (or activate as a shortcut for both) tracking spacingand kerning) one context may be assigned Consequently only settings with thecorresponding lsquocontextrsquo keyword will be applied

langcontext assignmentsrangbeginmicrotypecontext

endmicrotypecontext Like many LATEX commands it is also available in the form of an environment

langcontext assignmentsrang langgeneral textrangtextmicrotypecontext

As another possibility the command textmicrotypecontext sets the context(s)for the text given in the second argument

Suppose you want the footnote markers in the text to be protruded by a largeramount You could define settings for the numbers

SetProtrusion [ context = footnote ] font = scriptsize adapt if necessary 1 = 650 2 = 400 3 = 400 4 = 400 5 = 400 6 = 400 7 = 500 8 = 400 9 = 400 0 = 400

and have the context changed in the footnote marker command This commanddiffers among the various classes for the base classes eg article it would be

newcommandnewmakefnmarkhboxtextsuperscriptnormalfont microtypecontextprotrusion=footnotethefnmarkrenewcommandfootnotemark leavevmode ifhmodeedefxsfthespacefactornobreakfi newmakefnmark ifhmodespacefactorxsffi relax

9 Font package authors might also want to have a look at the hook MicrotypeHook described in theimplementation part section 1444

LETTERSPACING REVISITED 23

For the memoir class you would additionally have to disable auto-detection ofmultiple footnotes which prevents protrusion

renewcommandmakefnmarkhboxtextsuperscriptnormalfont microtypecontextprotrusion=footnotethefnmarkletmmmfpreparerelaxletmmmfcheckrelax

Another possibility would be to employ contexts for a language-dependent setupFor instance if you are writing a text in French you could add

microtypecontextkerning=french

to the preamble This would have the effect that kerning settings for the Frenchcontext would be applied to the document Should parts of the document be inEnglish you could write

textmicrotypecontextkerning=English text

to reset the context so that the punctuation characters in these parts will notreceive any extra kerning

Instead of adding these commands manually to your document you may alsoload microtype with the babel option (see section 35) The current language willthen be automatically detected and the contexts set accordingly

langlist of babel languagesrang langcontext listrangDeclareMicrotypeBabelHook

Naturally microtype does not know about the typographic specialties of everylanguage This command is a means of teaching it how to adjust the context when aparticular language is selected The main configuration file contains among othersthe following declaration

DeclareMicrotypeBabelHook frenchfrancaisacadiancanadien kerning=french spacing=

Consequently whenever you switch to the French language the kerning contextwill be changed to lsquofrenchrsquo and the spacing context will be reset This hook onlyhas an effect if the package was loaded with the babel option Currently microtypesupports French and Turkish kerning and English spacing (aka nonfrenchspacing)For unknown languages all contexts will be reset

7 Letterspacing revisited pdfTEX 140 | LuaTEX 062

[langamountrang] langgeneral textrangtextls

While the tracking feature described in section 53 will apply to sets of fontsyou may also want to letterspace shorter pieces of text regardless of the font inwhich they are typeset10 For such ad-hoc letterspacing microtype introduces twocommands that can be used (independently of whether the tracking option isenabled) in the same way as LATEXrsquos text commands textls ndash which also worksin math mode ndash expects the text in the mandatory argument while lsstyle willlsstyle

10 Letterspacing should be used cautiously in particular letterspacing lowercase text is held in abhorrenceby honourable typographers Unless you know what you are doing you should probably only letterspacecapitals or small capitals Another just cause may be emphasis in texts typeset in Fraktur fonts

DISABLING LIGATURES 24

switch on letterspacing for all subsequent fonts until the end of the current groupThe starred version of textls does not add any extra kerning before or aftertextlsthe text which may be useful eg for section titles By default each characterwill be spaced out by 1001000em = 01em this amount may be altered in theoptional argument to textls using the SetTracking command or globally withthe letterspace package option with decreasing significance in this order

langligatureranglslig

Since the commands textls and lsstyle will also evaluate the lsquono ligaturesrsquokey for the respective font you need not worry about protecting or breakingligatures with most fonts However in certain situations there may be a conflict ofligatures beginning with the same letter where some of them should be inhibitedwhile others should not When letterspacing text typeset in Fraktur fonts forexample the ligatures lsquochrsquo lsquockrsquo lsquotzrsquo and lsquoszrsquo (lsquoszligrsquo) should never be broken up youalso usually see the lsquostrsquo (lsquopermilrsquo) ligature in letterspaced text Furthermore at least theyfonts package realises the short s (lsquosrsquo) as the ligature lsquosrsquo On the other handthe lsquoctrsquo ligature and the other lsquolong srsquo ligatures often found in Fraktur fonts shouldbe suppressed There are two ways of solving this problem either donrsquot disablethe lsquosrsquo andor lsquocrsquo ligatures and break those that need to be broken up by insertinglsquokern0ptrsquo or babelrsquos | shortcut or disable them and protect those ligatures thatneed to be protected by enclosing them in the lslig command So the followingtwo solutions have the same result (namely lsquoAu s s i iexcl t s l o s i g k e i t rsquo with ligaturesshown in green inhibited ligatures in red)

SetTracking[no ligatures=f]encoding = LY family = yfrak120textfraklsstyle Ausskern0ptichtsloskern0ptigkeit

SetTracking[no ligatures=fsc]encoding = LY family = yfrak120textfraklsstyle Aulsligssilsligchtlsligslosigkeit

These three commands (plus the letterspace option described in section 34) areletterspacestyalso available with the alternative letterspace package which is in fact a muchstripped-down version of microtype omitting support for all the other extensions(and also omitting the possibilities of the SetTracking command ndash all lsquofrsquo ligatureswill be disabled inner and outer spacing and outer kerning will be set to the defaultvalues described in section 53) If you prefer to forgo microtypersquos specialties youmay load the letterspace package instead Both packages should not be used atthe same time

In contrast to microtype which requires LATEX the letterspace package alsoworks with eplain or even only miniltx for use with eplain load the packagewith usepackage inside the beginpackages endpackages environment withminiltx (which does not support package options) simply input letterspacesty

8 Disabling ligatures pdfTEX 130 | LuaTEX 030

[langcharactersrang] langset of fontsrangDisableLigatures

While completely disabling all ligatures of a font (which will also switch off kerningfor this font) purposely lowers the micro-typographic quality instead of raising

HINTS AND CAVEATS 25

it it is especially useful for typewriter fonts so that eg in a T1 encoded fontlsquotexttt--rsquo will indeed be printed as lsquo--rsquo not as lsquo-rsquo DisableLigatures maybe used to specify in the usual way a set of fonts for which ligatures should bedisabled for example of the typewriter font in T1 encoding

DisableLigaturesencoding = T1 family = tt

It is also possible to disable selected ligatures only The optional argument maycontain a comma-separated list of characters for which the ligature mechanismshould be inhibited

DisableLigatures[]encoding = T1 inhibit lsquo and lsquo but not fi ndash raquo etc

Only the character that begins the ligature(s) should be specified This commandmay only be used in the preamble and only once11

9 Hints and caveatsUse settings that match your font Although the default settings should give reas-onable results for most fonts the particular font you happen to be using may havedifferent character shapes that necessitate more or less protrusion In particularitalic letter shapes may differ wildly in different fonts hence I have decided againstproviding default protrusion settings for them The file test-microtypetex mightbe of some help when adjusting the protrusion settings for a font

Donrsquot use too large a value for expansion Font expansion is a feature that issupposed to enhance the typographic quality of your document by producing amore uniform greyness of the text block (and potentially reducing the number ofnecessary hyphenations) When expanding or shrinking a font too much the effectwill be turned into the opposite Expanding the fonts by more than 2 ie settinga stretch limit of more than 20 should be justified by a typographically trainedeye If you are so lucky as to be in the possession of multiple instances of a MultipleMaster font you may set expansion limits to up to 4

Donrsquot use font expansion for web documents (with older pdfTEX versions) WithpdfTEX versions older than 140 each expanded instance of the font will beembedded in the PDF file hence the file size may increase by quite a large factor(depending on expansion limits and step) Therefore courtesy and thriftiness ofbandwidth command it not to enable font expansion when creating files to bedistributed electronically With pdfTEX 140 and LuaTEX which use a differenttechnique of expansion the increase of file size can be neglected

You might want to disable protrusion in the Table of Contents In unfortunatesituations enabled protrusion might internally alter the line length in the TOC andsimilar lists in such a way that an excess leader dot will fit in The solution is totemporarily disable protrusion for the TOC

microtypesetupprotrusion=falsetableofcontentsmicrotypesetupprotrusion=true

11 With LuaTEX you have to load the fonts with the fontspec option lsquoRenderer=Basicrsquo

HINTS AND CAVEATS 26

You might want to disable protrusion in verbatim environments As you know bynow microtype will by default activate character protrusion for all fonts containedin the font set lsquoalltextrsquo This also includes the typewriter font Although it doesmake sense to protrude the typewriter font if it appears in running text (likefor example in this manual) this is probably not desirable inside the verbatimenvironment However microtype has no knowledge about the context that a fontappears in but will solely decide by examining its attributes Therefore you haveto take care of disabling protrusion in verbatim environments for yourself (thatis if you donrsquot want to disable protrusion for the typewriter font altogether byactivating say the font set lsquoalltext-nottrsquo) While the microtypesetup commandhas of course been designed for cases like this you may find it tiresome to repeat itevery time if you are using the verbatim environment frequently The followingline (which requires the etoolbox package) added to the documentrsquos preamblewould serve the same purpose

AtBeginEnvironmentverbatimmicrotypesetupactivate=false

If you are using the fancyvrb or the listings package this is not necessary sincetheir implementation of the corresponding environments will inhibit protrusionanyway

Settings for GreekThaiArmenian etc encodings are not yet included The defaultsets of fonts for which the micro-typographic features will be enabled (see table 2)only contain those encodings for which configurations exist Therefore if you areusing any other encoding (eg LGR T2B etc) microtype will not apply to thesefonts You have to define and activate a new font set including the encoding(s) youare using (for details see section 4) For protrusion at least you would also haveto create settings for the fonts in question (see section 51) It goes without sayingthat contributions for these encodings are more than welcome

Only employ kerning adjustment if it is customary in the languagersquos typographictradition In contrast to protrusion and expansion additional kerning does notunconditionally improve the micro-typographical quality of your document Youshould only switch it on if you are writing a document in a language whosetypographic tradition warrants such kerning If you are for example writing anEnglish text your readers would probably be rather confused by additional spacesbefore the punctuation characters

Adjustment of interword spacing is still experimental The implementation of thisfeature in pdfTEX is not complete and may not yield the positive effects on thetypographical quality you might expect ndash in certain situations there may even beundesired side effects in particular when used together with the ragged2e packageTherefore the spacing option should not be chosen blindly it is also recommendedto experiment with the settings in order to understand the workings of this feature

Compatibility and interaction with other packages The microtype package is sup-posed to work happily together with all other LATEX packages (except for pdfcprot)However life isnrsquot perfect so problems are to be expected Currently I am aware ofthe following issues

bull Even though all configuration files are still provided in legacy (7-bit) format usingmulti-byte (Unicode) characters in the settings should run smoothly with an up-to-

HINTS AND CAVEATS 27

date LATEX system For older systems or documents in legacy encodings in contrastthis requires loading the inputenc package first Furthermore when using multipleinput encodings in a document 8-bit characters in the settings will only workreliably if you specify the inputenc key

bull When loading the package with the babel option you must load the babel packagebefore microtype

bull Before this package was fully compatible with LuaTEX the following method ofenabling expansion and protrusion with the fontspec package was most oftenfound to be recommended

newfontfeatureMicrotypeprotrusion=defaultexpansion=defaultdefaultfontfeaturesMicrotype

This code should not be used with this package as it will basically override all ofthe settings made by microtype ndash despite the naming the above lines have nothingto do with this package12

bull With pdfTEX it is currently not possible to create character-specific settings forChineseJapaneseKorean fonts Therefore the only micro-typographic extensionthat can be made to work with CJK fonts is (non-selected) font expansion

bull When used with the xeCJK package or the luatexja package text commands (egrsquoA textless) in the configuration will not be understood You therefore haveto ensure that microtype will encounter none of them This requires firstly thatthe glyphs be specified only as single (possibly Unicode) characters as numbersor as glyph names (cf section 5) and secondly if you are using a font for whichpre-defined settings do not exist that you create these settings yourself (becauseotherwise the default settings will be loaded which do contain text commands)Furthermore you should load microtype late

Possible error messages and how to get rid of them (specs may differ)

bull Font csnameendcsname=cmr10+20 at 100pt not loadable Metric (TFM) file not found

This error message will occur if you are trying to employ font expansion whilecreating DVI output Remember that automatic font expansion only works whenrunning pdfTEX or LuaTEX in PDF mode Although expansion is also possible in DVImode with pdfTEX it requires that all instances of the expanded fonts exist on yourTEX system

bull pdfTeX error (font expansion) auto expansion is only possible with scalable fonts

Automatic font expansion has been improved in pdfTEX 140 in that it now notonly works with Type 1 fonts but also with TrueType OpenType and even non-embedded fonts The above error message indicates either that you are trying toapply expansion to a bitmap (pk) font which is still not possible or that the fontisnrsquot found at all eg because of missing map entries

bull Warning pdflatex font ptmr8r cannot be expanded (not an included Type1 font)

and the PDF viewer complains about a missing font eg Adobe Reader thuslyCould not find a font in the Resources dictionary - using Helvetica instead

With pdfTEX versions older than 140 font expansion can only be applied if thefont is actually embedded in the PDF file If you get the above error message your

12 They make use of features provided by luaotfload (via fontspec)

ACKNOWLEDGMENTS 28

TEX system is not set up to embed (or lsquodownloadrsquo) the base PostScript fonts (egTimes Helvetica Courier) In most TEX distributions this can be changed in thefile updmapcfg by setting pdftexDownloadBase14 to true

bull Warning pdflatex (file ecrm1000+20) Font ecrm1000+20 at 1200 not found

Furthermore pdfTEX versions older than 140 require Type 1 fonts for automaticfont expansion When you receive a message like the above you are probably tryingto apply font expansion to a bitmap or TrueType font With older pdfTEX versionsthis is only possible if you manually create expanded instances of the fonts

bull Font T1cmrmn10=ecrm1000 at 100pt not loaded Not enough room left

Memory parameter lsquofont_mem_sizersquo too small

bull TeX capacity exceeded sorry [maximum internal font number (font_max)=2000]

Memory parameter lsquofont_maxrsquo too small

bull TeX capacity exceeded sorry [PDF memory size (pdf_mem_size)=65536]

Memory parameter lsquopdf_mem_sizersquo too small (pdfTEX versions older than 130)

When applying micro-typographic enhancement to a large document with a lot offonts pdfTEX may be running out of some kind of memory It can be increased bysetting the respective parameter to a larger value For web2c-based systems egTEX Live change the settings in texmfcnf for MiKTEX in the file miktexini (24or older) resp pdflatexini (25 or newer)

bull pdfTeX warning (font expansion) font should be expanded before its first use

This warning will occur with pdfTEX versions older than 1404 if tracking andexpansion is applied to a font It is harmless and can be ignored

The source code of this document is freely available If you wonder how this docu-ment was created just have a look at the source code in microtypedtx which iseither already included in your TEX distribution or else can be downloaded fromCTAN For the source code of the logo on the title page and of the letterspacingsample from section 53 see the appendices A and B If you want to re-typeset thedocumentation read the comments at the end of microtypedtx

10 ContributionsI would be glad to include configuration files for more fonts Preparing suchconfigurations is quite a time-consuming task and requires a lot of patience Toalleviate this process this package also includes a test file that can be used tocheck at least the protrusion settings (test-microtypetex) If you have created aconfiguration file for another font or if you have any suggestions for enhancementsin the default configuration files I would gratefully accept them wmlgmxnet

11 AcknowledgmentsThis package would be pointless if Hagraven Thecirc Thagravenh hadnrsquot created the pdfTEXprogramme in the first place which introduced the micro-typographic extensionsand made them available to the TEX world Furthermore I thank him for helping meto improve this package and not least for promoting it in Thagravenh 2004 Thagravenh 2008

ACKNOWLEDGMENTS 29

and elsewhere I also thank him and the rest of the pdfTEX team and more recentlyalso the LuaTEX and XETEX teams for refuting the idea that TEX is dead and forfixing the bugs I find

Harald Harders has contributed protrusion settings for Adobe Minion I wouldalso like to thank him for a number of bug reports and suggestions he had to makeAndreas Buumlhmann has suggested the possibility to specify ranges of font sizes andresourcefully assisted in implementing this He also came up with some good ideasfor the management of complex configurations Ulrich Dirr has made numerous sug-gestion especially concerning the new extensions of interword spacing adjustmentand additional character kerning Georg Duffner has patiently tested microtypeunder XETEX and LuaTEX with his beautiful OpenType font EB Garamond13 Mythanks also go to Maciej Eder for contributing settings for the QX encoding aswell as to Karl Karlsson for providing settings for the Cyrillic T2A encoding andto Hendrik Vogt who made substantial improvements to the Computer ModernRoman italic settings I thank Loren B Davis for providing protrusion settings forOpenType versions of Palatino Linotype I am also very much indebted to Eacutelie Rouxwho not only contributed the lua module in the first place but also together withPhilipp Gesang took care of updating it for the developments in LuaTEX land

I thank Philipp Lehman for adding to his csquotes package the possibility torestore the original meanings of all activated characters thus allowing for thesecharacters to be used in the configuration files Peter Wilson kindly provided a hookin his ledmacledpar packages so that critical editions can finally also benefit fromcharacter protrusion Likewise Donald Arseneau patched his shapepar package toaccommodate protrusion

Additionally the following people have reported bugs made suggestions orhelped otherwise (in chronological order quotes indicate TeXSX user names)Tom Kink Herb Schulz Michael Hoppe Gary L Gray Georg Verweyen Christoph BierPeter Muthesius Bernard Gaulle Adam Kucharczyk Mark Rossi Stephan HennigMichael Zedler Herbert Voszlig Ralf Stubner Holger Uhr Peter Dyballa Morten HoslashgholmSteven Bath Daniel Flipo Michalis Miatidis Sven Naumann Ross HetheringtonWiebke Petersen Geoff Vallis Steven E Harris Karl Berry Peter Meier NathanRosenblum Wolfram Schaalo Vasile Gaburici Sveinung Heggen Axel Berger ColinRourke Maverick Woo Silas S Brown Lars Roumlnnbaumlck Christian Stark Leo MarcinBorkowski hscm George Gratzer Josep Maria Font Juan Acevedo Heiko OberdiekTill A Heilmann Rolf Dieterich Seamus Bradley Meho R Steffen Hoffmann ScottPakin Maiumleul Rouquette Jonas Hogstrom Gabriel Kerneis lsquoRazorXsrrsquo SebastianSchubert lsquoDaversquo Giuseppe Palma Stephan Stiller Christopher Schramm lsquoulirsquo SamMason lsquokleenstarrsquo lsquoHenningrsquo Ronnie Marksch David Carlisle lsquoMaxrsquo lsquoHcNrsquo WillRobertson lsquouser11126rsquo Ulrike Fischer lsquoDanielrsquo lsquoltcomdatarsquo Reinhard Kotucha lsquojcrrsquoNils Anders Danielsson Paolo Ney Frank Mittelbach Franz Wexler Moritz WemheuerlsquoAndy Nrsquo Phelype Oleinik Falk Hanisch Markus Kohm Paolo Polesana Oliver KoppHironori Kitagawa Daniel Benjamin Miller Md Ayquassar Marcel Kruumlger EkkehartSchlicht lsquoCanageekrsquo lsquodsedivecrsquo and lsquoDORpapstrsquo

13 Available from CTAN at pkgebgaramond including configuration files for microtype

SHORT HISTORY 30

12 ReferencesHagraven Thecirc Thagravenh lsquoMicro-typographic extensions to the TEX typesetting systemrsquo DissMasaryk University Brno 2000 in TUGBoat vol 21 (2000) no 4 pp 317ndash434(Online at httpwwwtugorgTUGboatArticlestb21-4tb69thanhpdf)

Hagraven Thecirc Thagravenh lsquoMicro-typographic extensions of pdfTEX in practicersquo in TUGBoatvol 25 (2004) no 1 lsquoProceedings of the Practical TEX 2004 Conferencersquo pp 35ndash38(Online at httpwwwtugorgTUGboatArticlestb25-1thanhpdf)

Hagraven Thecirc Thagravenh lsquoFont-specific issues in pdfTEXrsquo in TUGBoat vol 29 (2008) no 1lsquoEuroBachoTEX 2007 Proceedingsrsquo pp 36ndash41 (Online at httpwwwtugorgTUGboatArticlestb29-1tb91thanh-fontspdf)

Hagraven Thecirc Thagravenh Sebastian Rahtz Hans Hagen Hartmut Henkel Paweł JackowskiMartin Schroumlder Karl Berry The pdfTEX user manual 2 March 2020 (Availablefrom CTAN at systemsdocpdftexmanualpdftex-apdf)

Karl Berry Fontname Filenames for TEX fonts July 2009 (Available from CTAN atinfofontnamefontnamepdf)

LATEX3 Project Team LATEX 2ε font selection November 2020 (Available from CTANat macroslatexbasefntguidepdf)

Will Robertson The fontspec package Font selection for

XELATEX and LuaLATEX21 February 2020 (Available from CTAN at pkgfontspec)

Eacutelie Roux Khaled Hosny Philipp Gesang Ulrike Fischer Marcel Kruumlger Theluaotfload package 8 January 2021 (Available from CTAN at pkgluaotfload)

Carsten Schurig Tobias Schlemmer The pdfcprotsty package 10 June 2005(Available from CTAN at pkgpdfcprot)

Melchior Franz The soul package 17 November 2003 (Available from CTAN atpkgsoul) See also Heiko Oberdiekrsquos extension of this package soulutf8 whichadds Unicode support (Available from CTAN at pkgsoulutf8)

13 Short historyThe comprehensive list of changes can be found in appendix C The following is alist of all changes relevant in the user land bug and compatibility fixes are sweptunder the rug Numbers in brackets indicate the relevant section in this manual

28 (20201207)

bull New default font sets for expansion and spacing lsquoalltext-nottrsquo [4 table 2]

27 (20170707)

bull Allow automatic expansion and letterspacing with LuaTEX in DVI mode (akadvilualatex) [31 33 table 1]

bull Compatibility with LATEX 20170101 (fix warnings)

26 (20160501)

bull Support for LuaTEX ge 085bull Improvements for trackingletterspacing with LuaTEX (Renderer=Basic no longer

required)

SHORT HISTORY 31

bull New font sets lsquoalltext-nottrsquo lsquoallmath-nottrsquo [4 table 2]

25 (20130313)

bull Support for the fontspec package viz for OpenType fonts with LuaTEX and XETEXbull Support for protrusion with XETEX ge 09997bull Support for trackingletterspacing with LuaTEX ge 062bull Allow context-sensitive setup with LuaTEXbull Info if protrusion settings are genericbull Protrusion settings for Latin Modern Roman (OpenType)bull Protrusion settings for Charis SIL (OpenType)bull Protrusion settings for Palatino Linotype (OpenType)

24 (20100110)

bull Protrusion settings for T2A encoded Minion

23e (20091109)

bull Support for the Cyrillic T2A encoding (protrusion expansion spacing)

23d (20090327)

bull New default for expansion option lsquosteprsquo 1 if pdfTEX ge 140 [33]

23c (20081111)

bull Support for LuaTEX enabled by default

23 (20071223)

bull New key lsquoouter kerningrsquo for SetTracking to customise outer kerning [53]bull Adjust protrusion settings for tracking even if protrusion is not enabledbull New option lsquoverbose=silentrsquo to turn all warnings into mere messages [35]bull The letterspace package also works with eplain or miniltx [7]

22 (20070714)

bull Improvements to trackingletterspacing retain kerning (pdfTEX ge 1404) auto-matically adjust protrusion settings

bull New key lsquono ligaturesrsquo for SetTracking to disable selected or all ligatures (pdfTEXge 1404) [53]

bull New keys lsquospacingrsquo and lsquoouter spacingrsquo for SetTracking to customise interwordspacing [53]

bull Possibility to expand a font with different parameters (pdfTEX ge 1404) [52]bull New optional argument for DisableLigatures to disable selected ligatures [8]bull New command DeclareMicrotypeVariants to specify variant suffixes [57]bull New command textmicrotypecontext as a wrapper for microtypecontext [6]bull Protrusion settings for Bitstream Letter Gothic

21 (20070121)

bull New command lslig to protect ligatures in letterspaced text [7]

20 (20070114)

bull Support for the new extensions of pdfTEX ge 140 trackingletterspacing ad-ditional kerning and adjustment of interword spacing (glue) (new commandsSetTracking SetExtraKerning SetExtraSpacing new options lsquotrackingrsquolsquokerningrsquo lsquospacingrsquo) [53 54 55]

SHORT HISTORY 32

bull New commands textls and lsstyle for letterspacing new option lsquoletterspacersquo[34 7]

bull New option lsquobabelrsquo for automatic micro-typographic adjustment to the selectedlanguage [35 6]

bull New font sets lsquosmallcapsrsquo lsquofootnotesizersquo lsquoscriptsizersquo [4 table 2]bull New package lsquoletterspacersquo providing the commands for robust and hyphenatable

letterspacing [7]

19e (20060728)

bull New key lsquoinputencrsquo to specify the listsrsquo input encodings [5]bull Protrusion settings for Euler math fonts

19d (20060505)

bull Support for the Central European QX encoding (protrusion inheritance)bull Protrusion settings for various Euro symbol fonts (Adobe ITC marvosym)bull Support for Unicode input in the configuration (inputencutf8)

19c (20060202)

bull Protrusion settings for URW Garamond

19a (20051205)

bull Defer setup until the end of the preamblebull Inside the preamble microtypesetup accepts all package options [36]bull Protrusion settings for T5 encoded Charter

19 (20051028)

bull New command DisableLigatures to disable ligatures (pdfTEX ge 130) [8]bull New command microtypecontext to change the configuration context new key

lsquocontextrsquo for the configuration commands [6]bull New key lsquofontrsquo to add single fonts to the font sets [4]bull New key lsquopresetrsquo to set all characters to the specified value before loading the listsbull Value lsquorelativersquo renamed to lsquocharacterrsquo for lsquounitrsquo keysbull Support for the Polish OT4 encoding (protrusion expansion inheritance)bull Support for the Vietnamese T5 encoding (protrusion expansion inheritance)

18 (20050623)

bull New command DeclareMicrotypeSetDefault to declare the default font sets [4]bull New option lsquoconfigrsquo to load a different configuration file [35]bull New option lsquounitrsquo to measure protrusion factors relative to a dimension instead of

the character width [51]bull Renamed commands from MicroType to Microtypebull Protrusion settings for AMS math fontsbull Protrusion settings for Times in LY1 encoding completedbull The lsquoallmathrsquo font set also includes U encodingbull Support for protrusion with the ledmac package (pdfTEX ge 130)

17 (20050323)

bull Possibility to specify ranges of font sizes in the set declarations [4 5]bull New command LoadMicrotypeFile to load a configuration file manually [57]bull New command MicrotypeHook for font package authors [1444]bull New option lsquoverbose=errorsrsquo to turn all warnings into errors

SHORT HISTORY 33

bull Warning when running in draft mode

16 (20050124)

bull New option lsquofactorrsquo to influence protrusion resp expansion of all characters of afont or font set [32 5]

bull When pdfTEX is too old to expand fonts automatically expansion has to be enabledexplicitly automatic expansion will be disabled [31]

bull Use e-TEX extensions if available

15 (20041215)

bull When output mode is DVI font expansion has to be enabled explicitly automaticexpansion will be disabled [31]

bull New option lsquoselectedrsquo to enable selected expansion default false [33 52]bull New default for expansion option lsquosteprsquo 4 (min(stretchshrink)5) [33]bull Protrusion settings for Bitstream Charter

14 (20041112)

bull Set up fonts independently from LATEX font loadingbull New option lsquofinalrsquo [35]

12 (20041003)

bull New font sets lsquoallmathrsquo and lsquobasicmathrsquo [4 table 2]bull Protrusion settings for Computer Modern Roman math symbolsbull Protrusion settings for TS1 encoding completed for Computer Modern Roman and

Adobe Garamond

11 (20040921)

bull Protrusion settings for Adobe Minionbull New command DeclareCharacterInheritance [56]bull Characters may also be specified as octal or hexadecimal numbers [5]

10 (20040911)

bull First CTAN release

IMPLEMENTATION 34

14 ImplementationThe docstrip modules in this file are

driver The documentation driver only visible in the dtx file

package The code for the microtype package (microtypesty)

pdftex-def Definitions specific to pdfTEX (microtype-pdftexdef)

xetex-def Definitions specific to XETEX (microtype-xetexdef)

luatex-def Definitions specific to LuaTEX (microtype-luatexdef)

letterspace The code for the letterspace package (letterspacesty)

plain Code for eplain miniltx (letterspace only)

debug Code for additional output in the log fileUsed for ndash surprise ndash debugging purposes

luafile Lua functions (microtypelua)

config Surrounds all configuration modules

cfg-t Surrounds (Latin) text configurations

m-t The main configuration file (microtypecfg)bch Settings for Bitstream Charter (mt-bchcfg)blg Settings for Bitstream Letter Gothic (mt-blgcfg)cmr Settings for Computer Modern Roman (mt-cmrcfg)ebg Settings for EB Garamond (mt-EBGaramondcfg)ppl Settings for Palatino (mt-pplcfg)ptm Settings for Times (mt-ptmcfg)pmn Settings for Adobe Minion (mt-pmncfg)

Contributed by Harald Hardersugm Settings for URW Garamond (mt-ugmcfg)

cfg-u Surrounds non-text configurations (U encoding)

msa Settings for AMS lsquoarsquo symbol font (mt-msacfg)msb Settings for AMS lsquobrsquo symbol font (mt-msbcfg)euf Settings for Euler Fraktur font (mt-eufcfg)eur Settings for Euler Roman font (mt-eurcfg)eus Settings for Euler Script font (mt-euscfg)

cfg-e Surrounds Euro symbol configurations

zpeu Settings for Adobe Euro symbol fonts (mt-zpeucfg)mvs Settings for marvosym Euro symbol (mt-mvscfg)

test A helper file that may be used to create and test protrusion settings(test-microtypetex)

And now for something completely different1 langpackage|letterspacerang

IMPLEMENTATION Preliminaries 35

141 PreliminariesMTMT This is us

2 defMTMT3 langpackagerang microtype4 langletterspacerang letterspace

MTfixcatcode We have to make sure that the category codes of some characters are correct (thegerman package for instance makes active) Probably overly cautious Ceterumcenseo it should be forbidden for packages to change catcodes within the preamble

MTrestorecatcodes Polite as we are wersquoll restore them afterwards5 letMTrestorecatcodesempty

6 defMTfixcatcode127 edefMTrestorecatcodes8 MTrestorecatcodes9 catcode1=thecatcode1relax

10 11 catcode1=2relax12 13 MTfixcatcode1714 ^^Q (comment)14 MTfixcatcode24 9 ^^X (ignore)15 langpackagerangMTfixcatcode3312 16 langpackagerangMTfixcatcode3412 17 MTfixcatcode36 3 $ (math shift)18 MTfixcatcode3912 rsquo19 MTfixcatcode4212 20 MTfixcatcode4312 +21 MTfixcatcode4412 22 MTfixcatcode4512 -23 MTfixcatcode5812 24 MTfixcatcode6012 lt25 MTfixcatcode6112 =26 MTfixcatcode6212 gt27 langpackagerangMTfixcatcode6312 28 MTfixcatcode94 7 ^ (superscript)29 MTfixcatcode9612 `30 langpackagerangMTfixcatcode12412 |

These are all commands for the outside world We define them here as blankcommands so that they wonrsquot generate an error if we are not running pdfTEX

31 langpackagerang32 newcommandDeclareMicrotypeSet[3][]33 newcommandUseMicrotypeSet[2][]34 newcommandDeclareMicrotypeSetDefault[2][]35 newcommandSetProtrusion[3][]36 newcommandSetExpansion[3][]37 newcommandSetTracking[3][]38 newcommandSetExtraKerning[3][]39 newcommandSetExtraSpacing[3][]40 newcommandDisableLigatures[2][]41 newcommandDeclareCharacterInheritance[3][]42 newcommandDeclareMicrotypeVariants[1]43 newcommandDeclareMicrotypeAlias[2]44 newcommandLoadMicrotypeFile[1]45 newcommandDeclareMicrotypeBabelHook[2]46 newcommandmicrotypesetup[1]47 newcommandmicrotypecontext[1]48 newcommandtextmicrotypecontext[2]249 ifpackageloadedletterspaceletMTtextlsrelax50 langpackagerang51 newcommandlsstyle52 newcommandtextls[2][]53 deftextls1

IMPLEMENTATION Preliminaries 36

54 newcommandlslig[1]155 langpackagerang56

These commands also have a starred version57 defDeclareMicrotypeSet1gobbletwo58 defDeclareMicrotypeVariants1gobble

Set declarations are only allowed in the preamble (resp the main configurationfile) The configuration commands on the other hand must be allowed in thedocument too since they may be called inside font configuration files which inprinciple may be loaded at any time

59 onlypreambleDeclareMicrotypeSet60 onlypreambleUseMicrotypeSet61 onlypreambleDeclareMicrotypeSetDefault62 onlypreambleDisableLigatures63 onlypreambleDeclareMicrotypeVariants64 onlypreambleDeclareMicrotypeBabelHook

Donrsquot load letterspace65 expandafterletcsname verletterspacestyendcsnameempty

MToldcmd The old command names had one more hunch66 defMToldcmd1267 newcommand1MTwarning68 string1 is deprecated Please useMessageBreak69 string2 instead70 let 122

71 MToldcmdDeclareMicroTypeAliasDeclareMicrotypeAlias72 MToldcmdDeclareMicroTypeSet DeclareMicrotypeSet73 MToldcmdUseMicroTypeSet UseMicrotypeSet74 MToldcmdLoadMicroTypeFile LoadMicrotypeFile75 langpackagerang

MTwarning

MTwarningnl

MTinfo

MTinfonl

MTvinfo

MTerror

MTwarnerr

Communicate76 defMTwarningPackageWarningMTMT77 defMTwarningnl1MTwarning1gobble78 langpackagerang79 defMTinfoPackageInfoMTMT80 defMTinfonl1MTinfo1gobble81 letMTvinfogobble82 defMTerrorPackageErrorMTMT83 defMTwarnerr1MTerror184 This error message appears because you loaded the `MTMTrsquoMessageBreak85 package with the option `verbose=errorsrsquo Consult the documentationMessageBreak86 in MTMTpdf to find out what went wrong

1411 Debugging

tracingmicrotype

MTdinfo

MTdinfonl

Cases for tracingmicrotype

0 almost none

1 + sets amp lists

2 + heirs

3 + slots

4 + factors87 langdebugrang88 MTwarningnlThis is the debug version89 newcounttracingmicrotype

IMPLEMENTATION Preliminaries 37

90 tracingmicrotype=291 defMTinfo1PackageInfoMTMT1MTaddtoannot192 defMTinfonl1PackageInfoMTMT1gobbleMTaddtoannot193 letMTvinfoMTinfonl94 defMTwarning1PackageWarningMTMT1MTaddtoannotWarning 195 defMTwarningnl1PackageWarningMTMT1gobbleMTaddtoannotWarning 196 defMTdinfo12ifnumtracingmicrotypelt1 elseMTinfo2fi97 defMTdinfonl12ifnumtracingmicrotypelt1 elseMTinfonl2fi

tracingmicrotypeinpdf Another debug method font switches can be marked in the PDF file with a smallcaret an accompanying popup text box displaying all debug messages

Cases for tracingmicrotypeinpdf

1 show new fonts

2 + show known fonts98 newcounttracingmicrotypeinpdf

Letrsquos see how it works (if you donrsquot see anything special on this page your PDFviewer doesnrsquot support annotations)

tracingmicrotypeinpdf=2

MTpdfannot

MTaddtoannot

ifMTinannot

During font setup we save the text for the popup in MTpdfannot (This requirespdfTEX ge 130) The pdftexcmds package provides pdfTEXrsquos utility commands inLuaTEX too

99 RequirePackagepdftexcmds100 newififMTinannot MTinannottrue101 letMTpdfannotempty102 defMTaddtoannot1ifnumtracingmicrotypeinpdfgtz ifMTinannot103 defMessageBreak^^Jspaces104 MTxaddMTpdfannotpdfescapestring1^^Jfifi

iftracingmicrotypeinpdfall With tracingmicrotypeinpdfallfalse the PDF output is (hopefully) identicalbut some font switches will not be displayed otherwise the output is affected butall font switches are visible In the latter case we also insert a small kern so thatmultiple font switches are discernable

105 newififtracingmicrotypeinpdfall

MTshowpdfannot A red caret is shown for fonts which are actually set up by Microtype a green onemarks fonts that we have already seen The Caret annotation requires a viewerfor PDF version 15 (you could use Text if yoursquore using an older PDF viewer)

106 defMTshowpdfannot1107 ifnumtracingmicrotypeinpdflt1 else108 iftracingmicrotypeinpdfallleavevmodefi109 pdfannot height 4pt width 4pt depth 2pt 110 SubtypeCaret111 T(expandafterstringfontname)112 ifcase1or113 Subj(New font)C[1 0 0]114 else115 Subj(Known font)C[0 1 0]116 fi117 Contents(MTpdfannot)118 119 iftracingmicrotypeinpdfallkern1pt fi120 globalMTinannotfalse121 fi122 123 langdebugrang124 langpackagerang

T1blgmn10
Known font
(line 3713)
T1blgmn8
Known font
(line 3713)
T1blgmn10
Known font
(line 3714)
T1blgmn8
Known font
(line 3714)
T1blgmn10
Known font
(line 3715)
T1blgmn8
Known font
(line 3715)
T1blgmn10
Known font
(line 3716)
OT1mdbchmn10
Known font
(line 3717)
OT1mdbchmn7
Known font
(line 3717)
OT1mdbchmn5
Known font
(line 3717)
OMLmdbchmit10
Known font
(line 3717)
OMLmdbchmit7
Known font
(line 3717)
OMLmdbchmit5
Known font
(line 3717)
OMSmdbchmn10
Known font
(line 3717)
OMSmdbchmn7
Known font
(line 3717)
OMSmdbchmn5
Known font
(line 3717)
OMXmdbchmn10
Known font
(line 3717)
OMXmdbchmn7
Known font
(line 3717)
OMXmdbchmn5
Known font
(line 3717)
OMSmdbchmn10
Known font
(line 3717)
OMSmdbchmn7
Known font
(line 3717)
OMSmdbchmn5
Known font
(line 3717)
OMSmdbchmn10
Known font
(line 3717)
OMSmdbchmn7
Known font
(line 3717)
OMSmdbchmn5
Known font
(line 3717)
OMLmdbchmn10
Known font
(line 3717)
OMLmdbchmn7
Known font
(line 3717)
OMLmdbchmn5
Known font
(line 3717)
MDAmdbchmn10
Known font
(line 3717)
MDAmdbchmn7
Known font
(line 3717)
MDAmdbchmn5
Known font
(line 3717)
MDBmdbchmn10
Known font
(line 3717)
MDBmdbchmn7
Known font
(line 3717)
MDBmdbchmn5
Known font
(line 3717)
T1blgmn10
Known font
(line 3718)
T1blgmn10
Known font
(line 3720)
T1blgmn8
Known font
(line 3720)
T1blgmn8
Known font
(line 3727)
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3727)
T1SourceSansPro-TLFmn8
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3727)= substituted with T1SourceSansPro-TLFregularn7
T1blgmn10
Known font
(line 3731)
T1blgmn8
Known font
(line 3731)
T1blgmn10
Known font
(line 3732)
T1bchmn9
Known font
(line 3732)
T1bchmn9
Known font
(line 3732)Tracking font `T1bchmn9 on input line 3732trying to find tracking amount list for font `T1bchmn9trying T1bchmntrying T1bchmntrying T1bchmtrying T1bchmtrying T1bchntrying T1bchntrying T1bchtrying T1bchtrying T1mntrying T1mntrying T1mtrying T1mtrying T1ntrying T1ntrying T1trying T1 Loading tracking list `default Tracking by 60
OT1mdbchmn9
Known font
(line 3732)
OT1mdbchmn6
Known font
(line 3732)
OT1mdbchmn5
Known font
(line 3732)
OMLmdbchmit9
Known font
(line 3732)
OMLmdbchmit6
Known font
(line 3732)
OMLmdbchmit5
Known font
(line 3732)
OMSmdbchmn9
Known font
(line 3732)
OMSmdbchmn6
Known font
(line 3732)
OMSmdbchmn5
Known font
(line 3732)
OMXmdbchmn9
Known font
(line 3732)
OMXmdbchmn6
Known font
(line 3732)
OMXmdbchmn5
Known font
(line 3732)
OMSmdbchmn9
Known font
(line 3732)
OMSmdbchmn6
Known font
(line 3732)
OMSmdbchmn5
Known font
(line 3732)
OMSmdbchmn9
Known font
(line 3732)
OMSmdbchmn6
Known font
(line 3732)
OMSmdbchmn5
Known font
(line 3732)
OMLmdbchmn9
Known font
(line 3732)
OMLmdbchmn6
Known font
(line 3732)
OMLmdbchmn5
Known font
(line 3732)
MDAmdbchmn9
Known font
(line 3732)
MDAmdbchmn6
Known font
(line 3732)
MDAmdbchmn5
Known font
(line 3732)
MDBmdbchmn9
Known font
(line 3732)
MDBmdbchmn6
Known font
(line 3732)
MDBmdbchmn5
Known font
(line 3732)
T1bchmit10
Known font
(line 3734)
T1blgmn10
Known font
(line 3736)
T1blgmn8
Known font
(line 3736)
T1blgmn8
Known font
(line 3738)
T1bchmn8
Known font
(line 3738)
T1SourceSansPro-TLFmn8
Known font
(line 3738)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3738)= substituted with T1SourceSansPro-TLFregularn7
T1blgmn10
Known font
(line 3740)
T1blgmn8
Known font
(line 3740)
T1pzcmit10
New font
(line 3742) No configuration file mt-pzccfgSetting up font `T1pzcmit10 on input line 3742protrusion font list emptyprotrusion encoding `T1 in listprotrusion family `pzc not in list No protrusionexpansion font list emptyexpansion encoding `T1 in listexpansion family list emptyexpansion series list emptyexpansion shape list emptyexpansion size list emptytrying to find expansion codes list for font `T1pzcmit10trying T1pzcmittrying T1pzcmittrying T1pzcmtrying T1pzcmtrying T1pzcittrying T1pzcittrying T1pzctrying T1pzctrying T1mittrying T1mittrying T1mtrying T1mtrying T1ittrying T1ittrying T1trying T1 Applying non-selected expansion (list `default)kerning font `T1pzcmit10 not in listkerning encoding `T1 in listkerning family `pzc not in list No kerningnoligatures font list emptynoligatures encoding `T1 in listnoligatures family `pzc not in list
T1blgmn10
Known font
(line 3744)
T1bchmn9
Known font
(line 3745)
T1bchmn9
Known font
(line 3745)Tracking font `T1bchmn9 on input line 3745trying to find tracking amount list for font `T1bchmn9trying T1bchmntrying T1bchmntrying T1bchmtrying T1bchmtrying T1bchntrying T1bchntrying T1bchtrying T1bchtrying T1mntrying T1mntrying T1mtrying T1mtrying T1ntrying T1ntrying T1trying T1 Loading tracking list `default Tracking by 60
OT1mdbchmn9
Known font
(line 3745)
OT1mdbchmn6
Known font
(line 3745)
OT1mdbchmn5
Known font
(line 3745)
OMLmdbchmit9
Known font
(line 3745)
OMLmdbchmit6
Known font
(line 3745)
OMLmdbchmit5
Known font
(line 3745)
OMSmdbchmn9
Known font
(line 3745)
OMSmdbchmn6
Known font
(line 3745)
OMSmdbchmn5
Known font
(line 3745)
OMXmdbchmn9
Known font
(line 3745)
OMXmdbchmn6
Known font
(line 3745)
OMXmdbchmn5
Known font
(line 3745)
OMSmdbchmn9
Known font
(line 3745)
OMSmdbchmn6
Known font
(line 3745)
OMSmdbchmn5
Known font
(line 3745)
OMSmdbchmn9
Known font
(line 3745)
OMSmdbchmn6
Known font
(line 3745)
OMSmdbchmn5
Known font
(line 3745)
OMLmdbchmn9
Known font
(line 3745)
OMLmdbchmn6
Known font
(line 3745)
OMLmdbchmn5
Known font
(line 3745)
MDAmdbchmn9
Known font
(line 3745)
MDAmdbchmn6
Known font
(line 3745)
MDAmdbchmn5
Known font
(line 3745)
MDBmdbchmn9
Known font
(line 3745)
MDBmdbchmn6
Known font
(line 3745)
MDBmdbchmn5
Known font
(line 3745)
T1blgmn10
Known font
(line 3745)
T1bchmn9
Known font
(line 3746)
T1bchmn9
Known font
(line 3746)Tracking font `T1bchmn9 on input line 3746trying to find tracking amount list for font `T1bchmn9trying T1bchmntrying T1bchmntrying T1bchmtrying T1bchmtrying T1bchntrying T1bchntrying T1bchtrying T1bchtrying T1mntrying T1mntrying T1mtrying T1mtrying T1ntrying T1ntrying T1trying T1 Loading tracking list `default Tracking by 60
OT1mdbchmn9
Known font
(line 3746)
OT1mdbchmn6
Known font
(line 3746)
OT1mdbchmn5
Known font
(line 3746)
OMLmdbchmit9
Known font
(line 3746)
OMLmdbchmit6
Known font
(line 3746)
OMLmdbchmit5
Known font
(line 3746)
OMSmdbchmn9
Known font
(line 3746)
OMSmdbchmn6
Known font
(line 3746)
OMSmdbchmn5
Known font
(line 3746)
OMXmdbchmn9
Known font
(line 3746)
OMXmdbchmn6
Known font
(line 3746)
OMXmdbchmn5
Known font
(line 3746)
OMSmdbchmn9
Known font
(line 3746)
OMSmdbchmn6
Known font
(line 3746)
OMSmdbchmn5
Known font
(line 3746)
OMSmdbchmn9
Known font
(line 3746)
OMSmdbchmn6
Known font
(line 3746)
OMSmdbchmn5
Known font
(line 3746)
OMLmdbchmn9
Known font
(line 3746)
OMLmdbchmn6
Known font
(line 3746)
OMLmdbchmn5
Known font
(line 3746)
MDAmdbchmn9
Known font
(line 3746)
MDAmdbchmn6
Known font
(line 3746)
MDAmdbchmn5
Known font
(line 3746)
MDBmdbchmn9
Known font
(line 3746)
MDBmdbchmn6
Known font
(line 3746)
MDBmdbchmn5
Known font
(line 3746)
T1blgmn10
Known font
(line 3747)
T1blgmn8
Known font
(line 3747)
T1blgmn8
Known font
(line 3767)
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
OT1mdbchmn8
Known font
(line 3767)
OT1mdbchmn6
Known font
(line 3767)
OT1mdbchmn5
Known font
(line 3767)
OMLmdbchmit8
Known font
(line 3767)
OMLmdbchmit6
Known font
(line 3767)
OMLmdbchmit5
Known font
(line 3767)
OMSmdbchmn8
Known font
(line 3767)
OMSmdbchmn6
Known font
(line 3767)
OMSmdbchmn5
Known font
(line 3767)
OMXmdbchmn8
Known font
(line 3767)
OMXmdbchmn6
Known font
(line 3767)
OMXmdbchmn5
Known font
(line 3767)
OMSmdbchmn8
Known font
(line 3767)
OMSmdbchmn6
Known font
(line 3767)
OMSmdbchmn5
Known font
(line 3767)
OMSmdbchmn8
Known font
(line 3767)
OMSmdbchmn6
Known font
(line 3767)
OMSmdbchmn5
Known font
(line 3767)
OMLmdbchmn8
Known font
(line 3767)
OMLmdbchmn6
Known font
(line 3767)
OMLmdbchmn5
Known font
(line 3767)
MDAmdbchmn8
Known font
(line 3767)
MDAmdbchmn6
Known font
(line 3767)
MDAmdbchmn5
Known font
(line 3767)
MDBmdbchmn8
Known font
(line 3767)
MDBmdbchmn6
Known font
(line 3767)
MDBmdbchmn5
Known font
(line 3767)
T1blgmit8
Known font
(line 3767)
T1bchmn8
Known font
(line 3767)
T1SourceSansPro-TLFmn8
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn8
T1SourceSansPro-TLFmn7
Known font
(line 3767)= substituted with T1SourceSansPro-TLFregularn7
T1blgmit8
Known font
(line 3767)
T1blgmn8
Known font
(line 3767)
T1blgmn8
Known font
(line 3767)

IMPLEMENTATION Preliminaries 38

1412 Requirements

MTplain The letterspace package works with

0 miniltx

1 eplain

2 LATEX

For plain usage we have to copy some commands from latexltx125 langplainrang126 defMTplain2127 ifxdocumentclassundefined128 defMTplain1129 defhmodebgroupleavevmodebgroup130 defnfsstext1mbox1131 lettypesetprotectrelax132 ifxeplainundefined133 defMTplain0134 defPackageWarning12135 begingroup136 newlinechar=10 137 defMessageBreak^^J(1)spacesspacesspacesspaces138 immediatewrite16^^JPackage 1 Warning 2online^^J139 endgroup140 141 defonline on input line theinputlineno142 defspacesspacespacespacespace143 fi144 fi

MTrequireslatex Better use groups than plain ifs145 defMTrequireslatex1146 ifnumMTplainlt1 expandaftersecondoftwoelseexpandafterfirstoftwofi147 148 langplainrang

For definitions that depend on e-TEX features149 ifcase 0150 ifxeTeXversionundefined 1else151 ifxeTeXversionrelax 1else152 ifcaseeTeXversion 1fi153 fi154 fi155 else156 catcode`^^Q=9 catcode`^^X=14157 fi158 langletterspacerang^^QMTwarningnlThis package requires the etex extensions159 langletterspacerang^^Q MessageBreak ExitingMTrestorecatcodesendinput160 langdebugrangMTdinfonl0this is161 langdebugrang^^Q not162 langdebugrang etex

We check whether we are running pdfTEX XETEX or LuaTEX and load the appro-priate definition file

MTclearoptions If we are using neither of these engines we disable everything and exit163 defMTclearoptions164 langplainrang MTrequireslatex1165 AtEndOfPackageletunprocessedoptionsrelaxMTrestorecatcodes166 letCurrentOptionempty167 langpackagerang letMTendinputendinput168 langplainrang relax169

IMPLEMENTATION Preliminaries 39

A hack circumventing the TEX Live 2004 hack which undefines the pdfTEX primitivesin the format in order to hide the fact that pdfTEX is being run from the user Thishas been fixed in TEX Live 2005

170 ifxnormalpdftexversionundefined else171 letpdftexversion normalpdftexversion172 letpdftexrevisionnormalpdftexrevision173 letpdfoutput normalpdfoutput174 fi

MTengine

MTenginetooold

Old packages might have let pdftexversion to relax175 letMTenginerelax176 langletterspacerangdefMTenginetooold0177 ifxpdftexversionundefined else178 ifxpdftexversionrelax else179 defMTenginepdf180 langletterspacerang letMTpdforluafirstoftwo181 langletterspacerang ifnumpdftexversion gt 139 defMTenginetooold1fi182 fi183 fi184 ifxdirectluaundefined else185 ifxdirectluarelax else186 defMTenginelua

Since approx LuaTEX 080 pdftexversion is let to luatexversion so that wewould be fooled to think that pdfTEX is too old

187 langletterspacerang188 letMTpdforluasecondoftwo189 ifnumluatexversion lt 62 defMTenginetooold0190 else191 defMTenginetooold1192 letMTluadirectlua193 ifnumluatexversion gt 84194 letpdfoutputoutputmode195 letpdfprotrudecharsprotrudechars196 letpdfadjustspacingadjustspacing197 fi198 fi199 langletterspacerang200 fi201 fi202 langpackagerang203 ifxMTenginerelax204 ifxXeTeXversionundefined else205 ifxXeTeXversionrelax else206 defMTenginexe207 fi208 fi209 fi210 langpackagerang211 langpackage|letterspacerang

MTpdftexno pdfTEXrsquos features for which we provide an interface here havenrsquot always beenavailable and some specifics have changed over time Therefore we have to testwhich pdfTEX wersquore using if any MTpdftexno will be used throughout thepackage to respectively do the right thing

Currently we have to distinguish seven cases for pdfTEX

0 not running pdfTEX

1 pdfTEX (lt 014f)

2 + micro-typographic extensions (014fg)

3 + protrusion relative to 1em (ge 014h)

IMPLEMENTATION Preliminaries 40

4 + automatic font expansion protrusion no longer has to be set up first scalefactor fixed to 1000 default efcode= 1000 (ge 120)

5 + (leftright)marginkern pdfnoligatures pdfstrcmp pdfescapestring(ge 130)

6 + adjustment of interword spacing extra kerning letterspacefont pdfmatch14pdftracingfonts always e-TEX (ge 140)

7 + letterspacefont doesnrsquot disable ligatures and kerns pdfcopyfont (ge 1404)

212 langpdftex-defrang213 langdebugrangMTdinfonl0this is pdftex thepdftexversion(pdftexrevision)214 defMTpdftexno7215 ifnumpdftexversion = 140216 ifnumpdftexrevision lt 4217 defMTpdftexno6218 fi219 else220 ifnumpdftexversion lt 140221 defMTpdftexno5222 ifnumpdftexversion lt 130223 defMTpdftexno4224 ifnumpdftexversion lt 120225 defMTpdftexno3226 ifnumpdftexversion = 14227 ifnum expandafter`pdftexrevision lt `h228 defMTpdftexno2229 ifnum expandafter`pdftexrevision lt `f230 defMTpdftexno1231 fi232 fi233 else234 ifnumpdftexversion lt 14235 defMTpdftexno1236 fi237 fi238 fi239 fi240 fi241 fi242 langdebugrangMTdinfonl0pdftex no MTpdftexno243 langpdftex-defrang

MTxetexno XETEX supports character protrusion since version 09997244 langxetex-defrang245 langdebugrangMTdinfonl0this is xetex (theXeTeXversionXeTeXrevision)246 ifdim 0XeTeXrevision pt lt 09997pt247 defMTxetexno1248 else249 defMTxetexno2250 fi251 langdebugrangMTdinfonl0xetex no MTxetexno252 langxetex-defrang

MTluatexno Cases for LuaTEX (luatexversion ought to have been enabled by the format)

0 NA

1 LuaTEX (lt 036)

2 + directlua without state number (ge 036)

14 This command was actually introduced in 130 but failed on strings longer than 1023 bytes

IMPLEMENTATION Preliminaries 41

3 + letterspacefont non-automatic expansion doesnrsquot work anymore andautomatic expansion in DVI mode is realised by modifying the tracking notthe glyphs15 (ge 062)

4 + almost all of the pdfTEX primitives have been renamed (ge 085)

5 + default efcode= 1000 protrusionboundary [not yet supported] (ge 090)

6 + glet(ge 110)

Also sometime between 104 and 107 the function fontsetexpansion has beenintroduced (but wersquore not using it for now)

253 langluatex-defrang254 langdebugrangMTdinfonl0this is luatex (theluatexversion)

MTlua Communicate with lua Beginning with LuaTEX 036 directlua no longer requiresa state number

255 letMTluadirectlua256 defMTluatexno6257 ifnumluatexversionlt110258 defMTluatexno5259 ifnumluatexversionlt90260 defMTluatexno4261 ifnumluatexversionlt85262 defMTluatexno3263 ifnumluatexversionlt62264 defMTluatexno2265 ifnumluatexversionlt36266 defMTluadirectlua0267 defMTluatexno1268 fi269 fi270 fi271 fi272 fi

273 langdebugrangMTdinfonl0luatex no MTluatexno274 langluatex-defrang275 langpdftex-def|xetex-def|letterspacerang276 ifnum277 langpdftex-def|xetex-defrang csname MTMTengine texnoendcsname lt 2278 langletterspacerang MTenginetooold=z279 MTwarningnlYou280 langletterspacerang281 ifxMTenginerelax282 donrsquot seem to be using pdftex or luatexMessageBreak283 Try running `pdftexrsquo or `luatexrsquo instead ofMessageBreak284 `ifxXeTeXversionundefinedelse xefi texrsquo285 else286 langletterspacerang287 are using a MTengine tex version older than288 langpdftex-defrang 014f289 langxetex-defrang 09997290 langletterspacerang MTpdforlua140062291 MessageBreak292 `MTMTrsquo does not work with this versionMessageBreak293 Please install a newer version of MTengine tex294 langletterspacerang fi295 MessageBreak I will quit now296 MTclearoptions297 endinputfi298 langpdftex-def|xetex-def|letterspacerang

15 This may have been changed earlier but Irsquom no longer able to find out when (the last version thatactually works for me is 040)

IMPLEMENTATION Preliminaries 42

Still there Then we can begin We need the keyval package including the lsquonewrsquoKVspdef implementation

299 langpackage|letterspacerang300 RequirePackagekeyval[19971110]301 langpackagerang

MTtoks We need a token register302 newtoksMTtoks

ifMTif A scratch if303 newififMTif

1413 Declarations

ifMTprotrusion

ifMTexpansion

ifMTauto

ifMTselected

ifMTnoligatures

ifMTdraft

ifMTspacing

ifMTkerning

ifMTtracking

ifMTbabel

These are the global switches 304 newififMTprotrusion305 newififMTexpansion306 newififMTauto307 newififMTselected308 newififMTnoligatures309 newififMTdraft310 newififMTspacing311 newififMTkerning312 newififMTtracking313 newififMTbabel

[This line intentionally left blank]MTprlevel

MTexlevel

MTprfactor

MTexfactor

MTspfactor

MTknfactor

and numbers314 letMTprleveltw315 letMTexleveltw316 letMTprfactorm317 letMTexfactorm318 letMTspfactorm319 letMTknfactorm

MTprunit

MTspunit

MTknunit

Default unit for protrusion settings is character width for spacing space for kerning(and tracking) 1em

320 letMTprunitempty321 letMTspunitmne322 defMTknunit1em

MTstretch

MTshrink

MTstep

Expansion settings323 letMTstretchmne324 letMTshrink mne325 letMTstep mne

MTprmin

MTprmax

MTexmin

MTexmax

MTspmin

MTspmax

MTknmin

MTknmax

MTtrmin

MTtrmax

Minimum and maximum values allowed by pdfTEX326 defMTprmin-m327 letMTprmaxm328 letMTexminz329 letMTexmaxm330 defMTspmin-m331 letMTspmaxm332 defMTknmin-m333 letMTknmaxm334 langpackagerang335 defMTtrmin-m336 letMTtrmaxm337 langpackagerang

MTfactordefault Default factor338 defMTfactordefault1000

IMPLEMENTATION Preliminaries 43

MTstretchdefault

MTshrinkdefault

Default values for expansion339 defMTstretchdefault20 340 defMTshrinkdefault20

MTletterspace

MTletterspacedefault

Default value for letterspacing (in thousandths of 1em)341 langpackagerang342 letMTletterspacemne343 defMTletterspacedefault100344 langpackagerang

ifMTdocument Our private test whether wersquore still in the preamble345 newififMTdocument346 langpackagerang347 langpackage|letterspacerang

1414 Auxiliary macros

MTrequirespdftex

MTrequiresluatex

For definitions that depend on a particular pdfTEX resp LuaTEX version348 langpdftex-def|luatex-defrang349 def350 langpdftex-defrang MTrequirespdftex351 langluatex-defrang MTrequiresluatex352 1ifnum353 langpdftex-defrang MTpdftexno354 langluatex-defrang MTluatexno355 lt1 expandaftersecondoftwoelseexpandafterfirstoftwofi356 langluatex-defampdebugrangMTrequiresluatex4MTluatexenableprimitives(rsquopdfrsquorsquotracingfontsrsquo)relax357 langpdftex-defampdebugrangMTrequirespdftex6358 langdebugrangpdftracingfonts=1359 langpdftex-defampdebugrangrelax360 langpdftex-def|luatex-defrang

Some functions are loaded from a dedicated lua file This avoids character escapingproblems and incompatibilities between versions of LuaTEX Unless running arecent LATEX we load the luatexbase package

361 langluatex-defrang362 ifltrfmtversion20160101relaxRequirePackageluatexbase

We load luaotfload because some of its functions are required in microtypeluaThis eliminates the need for the user to load fontspec before microtype Therewill hardly be any LuaTEX documents that donrsquot load this package anyway Since20170101 it is already loaded in the format

363 ifltrfmtversion20170101relaxRequirePackageluaotfload364 MTluarequire(microtype)365 langluatex-defrang

Here it begins The module was contributed by Eacutelie Roux366 langluafilerang367368 function microtypeinfo()369 luatexbasemodule_info(microtype)370 end371372 local find = stringfind373 local match = stringmatch374 local tex_write = texwrite375376 local catpackage377 if luatexbaseregisternumber then378 catpackage = luatexbaseregisternumber(catcodetableatletter) -- LaTeX379 else

IMPLEMENTATION Preliminaries 44

380 catpackage = luatexbasecatcodetablesCatcodeTableLaTeXAtLetter -- luatexbase381 end382 function microtypesprint ()383 texsprint(catpackage )384 end385386 langluafilerang

To be continued but first back to primitivesMTglet Herersquos the forgotten one (finally implemented in LuaTEX)

387 langluatex-defrangMTrequiresluatex6letMTgletgletrelax388 langpackage|letterspacerang389 defMTgletgloballet

MTexpcs

MTexpgcs

Commands to create command sequences Those that are going to be definedglobally should be created inside a group so that the save stack wonrsquot explode

390 defMTexpcs12expandafter1csname2endcsname391 langpackagerang392 defMTexpgcs12begingroupexpandafterendgroupexpandafter1csname2endcsname

MTdefn

MTgdefn

This is namedef and global393 defMTdefnMTexpcsdef394 defMTgdefnMTexpgcsgdef

MTedefn

MTxdefn

Its expanding versions395 langpackagerang396 defMTedefnMTexpcsedef397 langpackagerang398 defMTxdefnMTexpgcsxdef

MTletnc

MTgletnc

let a csname sequence to a command399 defMTletncMTexpcslet400 defMTgletncMTexpgcsMTglet

MTletcn let a command to a csname sequence401 langpackagerang402 defMTletcn12expandafterletexpandafter1csname 2endcsname403 langpackagerang

MTletnn

MTgletnn

let a csname sequence to a csname sequence404 defMTletnnMTexpcsMTletcn405 defMTgletnnMTexpgcsglobalexpandafterMTletcn

MTfont Remove trailing space from the font name406 defMTfontexpandafterstringMTfont

MTexponen Expand the second token once and enclose it in braces407 langpackagerang408 defMTexponen12expandafter1expandafter2

MTexptwoc Expand the next two tokens after lang1rang once409 defMTexptwoc1expandafterexpandafterexpandafter1expandafter410 langpackagerang

MTexptwon Expand the next two tokens after lang1rang once and enclose them in braces411 defMTexptwon123412 expandafterexpandafterexpandafter413 1expandafterexpandafterexpandafter414 expandafter2expandafterexpandafter3

You do not wonder why MTexponec doesnrsquot exist do you

IMPLEMENTATION Preliminaries 45

MTifdefinedcT

MTifdefinedcTF

MTifdefinednT

MTifdefinednTF

Wrapper for testing whether command resp csname sequence is defined If weare running e-TEX we will use its primitives ifdefined and ifcsname whichdecreases memory use substantially

415 defMTifdefinedcT1416 ^^X ifdefined1expandafterfirstofoneelseexpandaftergobblefi417 ^^Q ifx1undefinedexpandaftergobbleelseexpandafterfirstofonefi418 419 langpackagerang420 defMTifdefinedcTF1421 ^^X ifdefined1expandafterfirstoftwoelseexpandaftersecondoftwofi422 langpackagerang^^Q ifx1undefined423 langpackagerang^^Q expandaftersecondoftwoelseexpandafterfirstoftwofi424 425 defMTifdefinednT1426 ^^X ifcsname1endcsnameexpandafterfirstofoneelseexpandaftergobblefi427 langpackagerang^^Q begingroupMTexptwocendgroupifxcsname 1endcsnamerelax428 langpackagerang^^Q expandaftergobbleelseexpandafterfirstofonefi429 430 defMTifdefinednTF1431 ^^X ifcsname1endcsnameexpandafterfirstoftwoelseexpandaftersecondoftwofi432 langpackagerang^^Q begingroupMTexptwocendgroupifxcsname 1endcsnamerelax433 langpackagerang^^Q expandaftersecondoftwoelseexpandafterfirstoftwofi434 435 langpackagerang

MTdetokenizen

MTdetokenizec

MTremlastspace

Translate a macro into a token list With e-TEX we can use detokenize We alsoneed to remove the last trailing space and only the last one ndash therefore the fiddling(and the string isnrsquot perfect of course)

436 defMTdetokenizen1437 ^^X expandafterMTremlastspacedetokenize1 nil438 ^^Q string1439 440 defMTdetokenizec1441 ^^X MTexponenMTdetokenizen1442 ^^Q MTexptwocMTremlastspacestripprefixmeaning1 nil443 444 defMTremlastspace1 21445 ifxnil2else space446 expandafterMTremlastspaceexpandafter2fi447

MTifempty Test whether argument is empty448 langpackagerang449 begingroup450 catcode`=12451 catcode`amp=14452 gdefMTifempty1amp453 if 1amp454 expandafterfirstoftwo455 else456 expandaftersecondoftwo457 fi458 459 endgroup460 langpackagerang

MTifint Test whether argument is an integer using an old trick by Mr Arseneau or thelatest and greatest from pdfTEX or LuaTEX (which also allows negative numbers asrequired by the letterspace option)

461 langpackagerang462 langpackage|letterspacerang463 langpdftex-defrangMTrequirespdftex6464 langletterspacerangMTpdforlua

IMPLEMENTATION Preliminaries 46

465 langpdftex-def|letterspacerang466 defMTifint1467 ifcasepdfmatch^-[0-9]+ $1relax468 expandaftersecondoftwo469 else470 expandafterfirstoftwo471 fi472 473 474 langpdftex-def|letterspacerang475 langpdftex-def|xetex-def|letterspacerang476 defMTifint1477 ififnum9lt11elsefi478 expandafterfirstoftwo479 else480 expandaftersecondoftwo481 fi482 483 langpdftex-def|xetex-def|letterspacerang484 langpdftex-def|letterspacerang485 langluatex-defrangdefMTifint1csnameMTluamicrotypeif_int([[1]])endcsname486 langluafilerang487 local function if_int(s)488 if find(s^-[0-9]+ $) then489 tex_write(firstoftwo)490 else491 tex_write(secondoftwo)492 end493 end494 microtypeif_int = if_int495496 langluafilerang

MTifdimen Test whether argument is dimension (or number) (nd and nc are new Didot respCicero added in pdfTEX 130 px is a pixel)

497 langpdftex-defrang498 MTrequirespdftex6499 defMTifdimen1500 ifcasepdfmatch^([0-9]+([][0-9]+)|[][0-9]+)501 (em|ex|cm|mm|in|pc|pt|dd|cc|bp|sp|nd|nc|px) $1relax502 expandaftersecondoftwo503 else504 expandafterfirstoftwo505 fi506 507 508 langpdftex-defrang509 langpdftex-def|xetex-defrang510 defMTifdimen1511 setboxz=hbox512 MTcount=11relax513 ifnumMTcount=ne514 aftergroupsecondoftwo515 else516 aftergroupfirstoftwo517 fi518 519 520 langpdftex-def|xetex-defrang521 langpdftex-defrang522 langluatex-defrangdefMTifdimen1csnameMTluamicrotypeif_dimen([[1]])endcsname523 langluafilerang524 local function if_dimen(s)525 if (find(s ^-[0-9]+(a) $) or526 find(s ^-[0-9][][0-9]+(a) $)) then

IMPLEMENTATION Preliminaries 47

527 tex_write(firstoftwo)528 else529 tex_write(secondoftwo)530 end531 end532 microtypeif_dimen = if_dimen533534 langluafilerang

MTifdim Compare floating point numbers535 langpackagerang536 defMTifdim123537 ifdim 1p 2 3p538 expandafterfirstoftwo539 else540 expandaftersecondoftwo541 fi542 543 langpackagerang

MTifstreq Test whether two strings (fully expanded) are equal544 langpdftex-def|xetex-defrang545 langpdftex-defrangMTrequirespdftex5546 defMTifstreq12547 langpdftex-defrang ifnumpdfstrcmp12=z548 langxetex-defrang ifnumstrcmp12=z549 expandafterfirstoftwo550 else551 expandaftersecondoftwo552 fi553 554 langpdftex-def|xetex-defrang555 langpdftex-defrang556 557 defMTifstreq12558 edefMTresa1559 edefMTresb2560 ifxMTresaMTresb561 expandafterfirstoftwo562 else563 expandaftersecondoftwo564 fi565 566 567 langpdftex-defrang568 langluatex-defrangdefMTifstreq12csnameMTluamicrotypeif_str_eq([[1]][[2]])endcsname569 langluafilerang570 local function if_str_eq(s1 s2)571 if s1 == s2 then572 tex_write(firstoftwo)573 else574 tex_write(secondoftwo)575 end576 end577 microtypeif_str_eq = if_str_eq578579 langluafilerang

MTxadd Add item to a list580 langpackagerang581 defMTxadd12582 ifx1relax583 xdef12584 else585 xdef112

IMPLEMENTATION Preliminaries 48

586 fi587

MTxaddb Add item to the beginning588 defMTxaddb12589 ifx1relax590 xdef12591 else592 xdef121593 fi594 595 langpackagerang

MTmapclistn

MTmapclistc

MTmapclist

MTclistfunction

MTclistbreak

Run lang2rang on all elements of the comma list lang1rang This and the following is modelledafter LATEX3 commands

596 langpackage|letterspacerang597 defMTmapclistn12598 ifxempty1else599 defMTclistfunction12600 MTmapclist1nilnnil601 fi602

603 defMTmapclistc1MTexponenMTmapclistn1604 defMTmapclist1605 ifxnil1606 expandafterMTclistbreak607 fi608 MTclistfunction1609 MTmapclist610 611 letMTclistfunctiongobble612 defMTclistbreak1nnil613 langpackagerang

MTmaptlistn

MTmaptlistc

MTmaptlist

MTtlistbreak

Execute lang2rang on all elements of the token list lang1rang MTtlistbreak can be usedto jump out of the loop

614 defMTmaptlistn12MTmaptlist21nnil615 defMTmaptlistc12expandafterMTmaptlistexpandafter21nnil616 defMTmaptlist12617 ifxnnil2else618 12619 expandafterMTmaptlist620 expandafter1621 fi622 623 defMTtlistbreak1nnilfi

ifMTinlist

MTinclist

Test whether item lang1rang is in comma list lang2rang Using pdfmatch would be slower624 newififMTinlist625 defMTinclist12626 defMTresa1123nnil627 ifx2empty628 MTinlistfalse629 else630 MTinlisttrue631 fi632 633 expandafterMTresaexpandafter21emptynnil634

MTremfromclist Remove item lang1rang from comma list lang2rang This is basically removeelement fromltcntrldtx Using pdfmatch and pdflastmatch here would be really slow

635 defMTremfromclist12

IMPLEMENTATION Preliminaries 49

636 defMTresa112MTresa12MTresb637 defMTresb1MTresb2MTresbifx1emptyelse1fi638 xdef2MTexptwocMTresbMTresaexpandafter2MTresb1MTresa639

MTintlist

MTintlist

Test whether item is in token list Since this isnrsquot too elegant I thought that at leasthere pdfmatch would be more efficient ndash however it turned out to be even slowerthan this solution

640 defMTintlist12641 MTinlistfalse642 defMTresa1643 MTmaptlistc2MTintlist644 645 defMTintlist1646 edefMTresb1647 ifxMTresaMTresb648 MTinlisttrue649 expandafterMTtlistbreak650 fi651

MTinrlist

MTinrlist

MTinrlist

MTsizename

Test whether size MTsize is in a list of ranges Store the name of the list inMTsizename

652 defMTinrlist1653 MTinlistfalse654 MTmaptlistc1MTinrlist655 656 defMTinrlist1expandafterMTinrlist1657 defMTinrlist123658 MTifdim2=mne659 MTifdim1=MTsize660 MTinlisttrue661 relax662 663 MTifdimMTsizelt1relax664 MTifdimMTsizelt2665 MTinlisttrue666 relax667 668 669 ifMTinlist670 defMTsizename3671 expandafterMTtlistbreak672 fi673

MTloop

MTiterate

MTrepeat

This is the same as LATEXrsquos loop which we mustnrsquot use since this could confuse anouter loop in the document

674 langpackagerang675 defMTloop1MTrepeat676 defMTiterate1relaxexpandafterMTiteratefi677 MTiterate letMTiteraterelax678 679 letMTrepeatfi

MTwhilenum Execute lang3rang from lang1rang up to (excluding) lang2rang (much faster than LATEXrsquos whilenum)680 defMTwhilenum123681 tempcnta1relax682 MTloop 3683 advancetempcnta ne684 ifnumtempcnta lt 2MTrepeat685 686 langpackage|letterspacerang

IMPLEMENTATION Preliminaries 50

MTifluaotffont For fonts loaded by luaotfload we query the fontrsquos table687 langletterspacerangMTpdforlualetMTifluaotffontsecondoftwo688 langluatex-def|letterspacerangdefMTifluaotffontcsnameMTlua689 langluatex-defrang microtypeif_luaotf_font()690 langluafile|letterspacerang691 langluafileranglocal function if_luaotf_font()692 local thefont = fontgetfont(fontcurrent())693 if thefont and ( thefontformat == opentype or thefontformat == truetype )694 then texwrite(firstoftwo)695 else texwrite(secondoftwo)696 end697 langluafilerangend698 langluafilerangmicrotypeif_luaotf_font = if_luaotf_font699 langluafilerang700 langluafile|letterspacerang701 langluatex-def|letterspacerang endcsname702 langluatex-def|letterspacerang703 langletterspacerang

MTdofont Execute lang1rang 256 times704 langpdftex-def|letterspacerangdefMTdofontMTwhilenumzcclvi

resp for the whole font for LuaTEX if itrsquos a Unicode font705 langluatex-defrang706 defMTdofont1707 MTifluaotffont708 defMTdofontfunction1709 MTluamicrotypedo_font()710 MTwhilenumzcclvi1711 712 langluatex-defrang

This is the lua function which is much faster than looping through all glyphsin TEX Legacy fonts (which this function should never work on) donrsquot contain avindex field

713 langluafilerang714 local function do_font()715 local thefont = fontgetfont(fontcurrent())716 if thefont then717 for iv in nextthefontcharacters do718 if vindex == nil or vindex gt 0 then719 microtypesprint([[tempcnta=]]i[[relaxMTdofontfunction]])720 end721 end722 end723 end724 microtypedo_font = do_font725726 langluafilerang

The XETEX variant (itrsquos slow )727 langxetex-defrang728 defMTdofont1729 tempcnta=z730 MTloop731 iffontcharMTfonttempcnta 1fi732 advancetempcntane733 ifnumtempcnta lt XeTeXlastfontcharMTfont MTrepeat734 735 langxetex-defrang736 langpackagerang

MTcount

MTincrement

Increment macro lang1rang by one Saves using up too many counters The e-TEX way is

IMPLEMENTATION Preliminaries 51

slightly faster737 newcountMTcount738 defMTincrement1739 ^^X edef1numbernumexpr 1 + 1relax740 ^^Q MTcount=1relax741 ^^Q advanceMTcount ne742 ^^Q edef1numberMTcount743

MTscale Multiply and divide a counter If we are using e-TEX we will use its numexprprimitive This has the advantage that it is less likely to run into arithmetic overflowThe result of the division will be rounded instead of truncated Therefore wersquoll geta different (more accurate) result in about half of the cases

744 defMTscale123745 ^^Q multiply 1 2relax746 ifnum 3 = z747 ^^X 1=numexpr 1 2relax748 else749 ^^X 1=numexpr 1 2 3relax750 ^^Q divide 1 3relax751 fi752

MTabbrpr

MTabbrex

MTabbrprc

MTabbrexc

MTabbrprinh

MTabbrexinh

MTabbrnl

MTabbrsp

MTabbrspc

MTabbrspinh

MTabbrkn

MTabbrknc

MTabbrkninh

MTabbrtr

MTabbrtrc

Some abbreviations Thus we can have short command names but full-length logoutput

753 defMTabbrprprotrusion754 defMTabbrexexpansion755 defMTabbrprcprotrusion codes756 defMTabbrexcexpansion codes757 defMTabbrprinhprotrusion inheritance758 defMTabbrexinhexpansion inheritance759 defMTabbrnlnoligatures760 defMTabbrspspacing761 defMTabbrspcinterword spacing codes762 defMTabbrspinhinterword spacing inheritance763 defMTabbrknkerning764 defMTabbrknckerning codes765 defMTabbrkninhkerning inheritance766 defMTabbrtrtracking767 defMTabbrtrctracking amount

MTrbbaprotrusion

MTrbbaexpansion

MTrbbaspacing

MTrbbakerning

MTrbbatracking

These we also need the other way round768 defMTrbbaprotrusionpr769 defMTrbbaexpansionex770 defMTrbbaspacingsp771 defMTrbbakerningkn772 defMTrbbatrackingtr

MTfeatures

MTfeatureslong

We can work on these lists to save some guards in the dtx file773 defMTfeaturesprexspkntr774 defMTfeatureslongprotrusionexpansionspacingkerningtracking

MTisfeature Whenever an optional argument accepts a list of features we can use this com-mand to check whether a feature exists in order to prevent a rather confusinglsquoMissing endcsname insertedrsquo error message The feature (long form) must be inlang1rang the type of list to ignore in lang2rang then comes the action

775 defMTisfeature12776 MTinclist1MTfeatureslong777 ifMTinlist778 expandafterfirstofone779 else780 MTerror`1rsquo is not an available micro-typographicMessageBreak

IMPLEMENTATION Preliminaries 52

781 feature Ignoring 2Available features are `MTfeatureslongrsquo782 expandaftergobble783 fi784

1415 Compatibility

For the record the following LATEX kernel commands will be modified by microtype

bull pickupfont

bull dosubstcorrection

bull addaccent (all in section 1429)

bull showhyphens (in section 1446)

The wordcount package redefines the font-switching commands which willbreak microtype Since microtype doesnrsquot have an effect on the number of wordsin the document anyway we will simply disable ourselves

785 ifladedtexwordcount786 MTwarningnlDetected the `wordcountrsquo utilityMessageBreak787 Disabling `MTMTrsquo since it wouldnrsquot work788 MTclearoptionsendinputrelax

The minimal class doesnrsquot define any size commands other than normalsize whichwill result in lots of warnings Therefore we issue a warning about the warnings

789 ifclassloadedminimal790 MTwarningnlDetected the `minimalrsquo classMessageBreak791 Expect lots of warnings and some malfunctionsMessageBreak792 You might want to use a proper class instead793 relax

MTsetup The setup is deferred until the end of the preamble This has a couple of advantagesmicrotypesetup can be used to change options later on in the preamble and fontsdonrsquot have to be set up before microtype

794 langpackagerang795 langpackage|letterspacerang796 langplainrangMTrequireslatex1797 letMTsetupempty

MTaddtosetup We use our private hook to have better control over the timing This will also workwith eplain but not with miniltx alone

798 defMTaddtosetupgaddtomacroMTsetup

Donrsquot hesitate with miniltx799 langplainrangletMTaddtosetupfirstofone

MTwithpackageT We almost never do anything if a package is not loaded800 defMTwithpackageT1ifpackageloaded1firstofonegobble801 langpackage|letterspacerang802 langpackagerang

MTwithbabelandT LATEXrsquos ifpackagewith ignores the class options803 defMTwithbabelandT1804 MTifdefinednToptbabelpkgextension805 expandtwoargsMTinclist1806 csname optbabelpkgextensionendcsnameclassoptionslist807 ifMTinlistexpandaftergobblefi808 gobble809

IMPLEMENTATION Preliminaries 53

MTledmacsetup The ledmac package first saves each paragraph in a box from which it then splitsoff the lines one by one This will destroy character protrusion (There arenrsquot anyproblems with the lineno package since it takes a different approach) mdash mdashAfter much to and fro the situation has finally settled and there is a fix Beginningwith pdfTEX version 121b together with ledpatchsty as of 20050602 (v04)character protrusion will work at last

Peter Wilson was so kind to provide the ldunhboxline hook in ledmac toallow for protrusion leftmarginkern and rightmarginkern are new primitivesof pdfTEX 121b (aka 1300) They are also part of recent XETEX The successorpackages eledmac and reledmac are also supported

810 langpackagerang811 langpdftex-defrangMTrequirespdftex5812 langpdftex-def|luatex-def|xetex-defrang813 defMTledmacsetup814 ifMTprotrusion815 MTifdefinedcTFldunhboxline

MTledunhboxline Hook816 MTinfonlPatching ((r)e)ledmac to enable character protrusion817 letMTledunhboxlineldunhboxline818 renewcommandldunhboxline[1]819 ifhbox1820 kernleftmarginkern1821 expandafterMTledunhboxlineexpandafter1expandafter822 kernrightmarginkern1823 fi824

825 826 MTwarningnl827 Character protrusion in paragraphs with lineMessageBreak828 numbering will only work if you update ledmacMessageBreak829 or use one of its successors eledmac or reledmac830 831 fi832 833 langpdftex-def|luatex-def|xetex-defrang834 langpdftex-defrang835 836 defMTledmacsetup837 ifMTprotrusion838 MTwarningnl839 The pdftex version you are using does not allowMessageBreak840 character protrusion in paragraphs with lineMessageBreak841 numbering by the `((r)e)ledmacrsquo packageMessageBreak842 Upgrade pdftex to version 130 or later843 fi844 845 846 langpdftex-defrang

The shapepar package (v22) fixes this in a similar manner by itself so we donrsquothave to bother

MTrestoreph Restore meaning of and 847 langpackage|letterspacerang848 langpackagerang849 defMTrestorephchardef` chardef`

ifMTfontspec

ifMTxunicode

Two new conditionals for use with XETEX or LuaTEX850 newififMTfontspec851 MTwithpackageTfontspecMTfontspectrue

IMPLEMENTATION Preliminaries 54

852 newififMTxunicode853 MTwithpackageTxunicodeMTxunicodetrue

We need the correct value of the former for configuration commands inside thepreamble (to get the default families right)

854 ifltrfmtversion20201001855 AddToHookpackageafterfontspecMTfontspectruerelax

MTmaybegobblewithtikz

MTtikzsetup

If tikzexpandcount is greater than zero wersquore inside or at the end of a tikznode where we donrsquot want to adjust spacing after letterspacing lest we disturbtikz This is used in MTafteraftergroup and we donrsquot need it for letterspace

856 letMTmaybegobblewithtikzfirstofone857 defMTtikzsetup858 defMTmaybegobblewithtikz859 ifnumtikzexpandcountgtz860 expandaftergobble861 else862 expandafterfirstofone863 fi

MTsetupfonthook This hook will be executed every time a font is set up (inside a group)In the preamble we check for the packages each time a font is set up Thus it

will work regardless when the packages are loadedEven for packages that donrsquot activate any characters in the preamble (like

babel and csquotes) we have to check here too in case they were loaded beforemicrotype and a font is loaded AtBeginDocument before microtype (This isno longer needed since the complete setup is now deferred until the end of thepreamble However it is still necessary for defersetup=false)

864 defMTsetupfonthook

Spanish (as well as Galician and Mexican) babel modify storing the originalmeaning in percentsign

865 MTiffalse866 MTwithbabelandTspanish MTiftrue867 MTwithbabelandTgalicianMTiftrue868 MTwithbabelandTmexican MTiftrue869 ifMTifMTifdefinedcTpercentsignletpercentsignfi

Using disablequotes we can restore the original meaning of all charactersmade active by csquotes (It would be doable for older versions too but we wonrsquotbother)

870 MTwithpackageTcsquotes871 ifpackagelatercsquotes20050511disablequotesrelax

hyperref redefines and inside a url We restore the original meanings(which we can only hope are correct) Same for tex4ht and mathastext

872 MTiffalse873 MTwithpackageThyperref MTiftrue874 MTwithpackageTtex4ht MTiftrue875 MTwithpackageTmathastextMTiftrue876 ifMTifMTrestorephfi877 MTwithpackageTtikzMTtikzsetup878

Check again at the end of the preamble879 langpackagerang880 MTaddtosetup881 langpackagerang

Our competitor the pdfcprot package must not be tolerated

IMPLEMENTATION Preliminaries 55

882 MTwithpackageTpdfcprot883 MTerrorDetected the `pdfcprotrsquo packageMessageBreak884 `MTMTrsquo and `pdfcprotrsquo may not be used together885 The `pdfcprotrsquo package provides an interface to character protrusionMessageBreak886 So does the `MTMTrsquo package Using both packages at the sameMessageBreak887 time will almost certainly lead to undesired results Have your choice888 889 MTwithpackageT ledmacMTledmacsetup890 MTwithpackageT eledmacMTledmacsetup891 MTwithpackageTreledmacMTledmacsetup892 MTwithpackageTxunicodeMTxunicodetrue893 MTwithpackageTfontspecMTfontspectrue

We can clean up MTsetupfonthook now894 MTgletMTsetupfonthookempty895 MTiffalse896 MTwithbabelandTspanish MTiftrue897 MTwithbabelandTgalicianMTiftrue898 MTwithbabelandTmexican MTiftrue899 ifMTif900 gaddtomacroMTsetupfonthook901 MTifdefinedcTpercentsignletpercentsign902 fi903 MTwithpackageTcsquotes904 ifpackagelatercsquotes20050511905 gaddtomacroMTsetupfonthookdisablequotes906 907 MTwarningnl908 Should you receive warnings about unknown slotMessageBreak909 numbers try upgrading the `csquotesrsquo package910 911

We disable microtypersquos additions inside hyperrefrsquos pdfstringdef which redefineslots of commands hyperref doesnrsquot work with plain TEX so in that case we donrsquotbother

912 MTiffalse913 langpackagerang914 langplainrang MTrequireslatex2915 MTwithpackageThyperref916 pdfstringdefDisableCommands917 langpackagerang918 MTltxpickupfont919 lettextmicrotypecontextsecondoftwo920 letmicrotypecontextgobble921 langpackagerang922 deflsstylepdfstringdefWarnlsstyle923 deftextls1pdfstringdefWarntextls924 925 langpackagerang MTiftrue926 927 langplainrang relax928 langpackagerang929 MTwithpackageTtex4htMTiftrue930 MTwithpackageTmathastextMTiftrue931 ifMTifgaddtomacroMTsetupfonthookMTrestorephfi

The listings package makes numbers and letters active932 MTwithpackageTlistings933 gaddtomacroMTcfgcatcodes934 MTwhilenum303Acatcodetempcnta=12relax935 MTwhilenum415Bcatcodetempcnta=11relax936 MTwhilenum617Bcatcodetempcnta=11relax937

IMPLEMENTATION Font setup 56

and the backslash (which would lead to problems in MTgetslot)938 gaddtomacroMTsetupfonthook939 catcode`=z

Inside a listing space is redefined940 defspace

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

941 letlstProcessLetterempty942 943

Of course using both soulrsquos and microtypersquos letterspacing mechanisms at thesame time doesnrsquot make much sense But soul can do more eg underlining Theoptional argument to textls may not be used Also we have to disable expansionwithin soulrsquos trial run Under plain TEX soul doesnrsquot register itself the LATEX wayso we just test for its main command

944 langpackagerang945 ifxSOULundefinedelse946 soulregisterlsstyle 0947 soulregistertextls 1948 ifxXeTeXrevisionundefined949 letMTSOULdowordSOULdoword950 defSOULdowordpdfadjustspacing=z MTSOULdoword951 fi952 fi953 langpackagerang954 MTwithpackageTtikzMTtikzsetup

Compatibility with the pinyin package (from CJK) disable microtype in pymacronwhich loads a different font for the accent In older versions of pinyin (pre-460)pymacron had only one argument

955 MTwithpackageTpinyin956 letMTorigpymacronpymacron957 ifpackagelaterpinyin20050811 460958 defpymacron12959 MTltxpickupfont960 MTorigpymacron12961 MTMTpickupfont962 963 defpymacron1964 MTltxpickupfont965 MTorigpymacron1966 MTMTpickupfont967 968 969 langpackagerang970 971 langpackage|letterspacerang

We need a font (the minimal class doesnrsquot load one)972 langpackagerangexpandafterifxthefontnullfontnormalfontfi

142 Font setupMTsetupfont Setting up a font entails checking for each feature whether it should be applied to

the current font (MTfont)973 langpdftex-def|xetex-def|luatex-defrang974 defMTsetupfont

IMPLEMENTATION Font setup 57

With XETEX and LuaTEX the font may not be actually loaded hence we might see awrong font (in MTgetslot) Therefore we first load the current font

975 langxetex-def|luatex-defrang MTfont

We might have to disable stuff when used together with adventurous packages976 MTsetupfonthook

This will use a copy of the font (allowing for expansion parameter variation andthe use of more than one set of protrusion factors for a font within one paragraph)

977 langpdftex-defrangMTrequirespdftex7978 langpdftex-def|luatex-defranggaddtomacroMTsetupfontMTcopyfont979 langpdftex-defrangrelax

The font properties must be extracted from MTfont since the current value offencoding and friends may be wrong

980 gaddtomacroMTsetupfont981 MTexptwocMTsplitnamestringMTfontnil

Try to find a configuration file for the current font family982 MTexponenMTfindfileMTfamily983 ifxMTfamilyaliasempty else984 MTexponenMTfindfileMTfamilyaliasfi

We have to make sure that cfencoding expands to the correct value (for later inMTgetslot) which isnrsquot the case when selectfont chooses a new encoding(this would be done a second later in selectfont anyway ndash three lines to beexact) (I think I do not need this anymore ndash however Irsquom too afraid to remove it Oops I did it Letrsquos see whether anybody complains)

985 ifxfencodingcfencodingelseencupdatefi986

Tracking has to come first since it means actually loading a different font987 langpdftex-defrangMTrequirespdftex6988 langluatex-defrangMTrequiresluatex3989 langpdftex-def|luatex-defrang gaddtomacroMTsetupfontMTtrackingrelax990 gaddtomacroMTsetupfont991 MTcheckfont992 ifMTinlist993 langdebugrangMTshowpdfannot2994 else995 MTvinfoSetting up font `MTfontrsquoonline996 MTinfonotracking

Now we can begin setting up the font for all features that the current pdfTEXprovides The following commands are let to relax if the respective feature isdisabled via package options

For versions older than 120 protrusion has to be set up first beginning with120 the order doesnrsquot matter

997 MTprotrusion998 langpdftex-def|luatex-defrang MTexpansion999

Interword spacing and kerning (pdfTEX 140)1000 langpdftex-defrang1001 MTrequirespdftex61002 gaddtomacroMTsetupfontMTspacingMTkerning1003 relax1004 langpdftex-defrang

Disable ligatures (pdfTEX 130)1005 langpdftex-defrangMTrequirespdftex5

IMPLEMENTATION Font setup 58

1006 langpdftex-def|luatex-defranggaddtomacroMTsetupfontMTnoligatures1007 langpdftex-defrangrelax1008 gaddtomacroMTsetupfont

Debugging1009 langdebugrangMTshowpdfannot1

Finally register the font so that we donrsquot set it up anew each time1010 MTregisterfont1011 fi1012 1013 langpdftex-def|xetex-def|luatex-defrang

MTcopyfont

MTcopyfont

The new (1404) pdfcopyfont command allows expanding a font with differentparameters or to use more than one set of protrusion factors for a given fontwithin one paragraph It will be used when we find a context for SetProtrusionor SetExpansion in the preamble or when the package has been loaded with thecopyfonts option

1014 langpdftex-def|luatex-defrang1015 letMTcopyfontrelax1016 langpdftex-defrangMTrequirespdftex71017 defMTcopyfont

MTfontcopy For every new protrusion and expansion context we create a new copy1018 xdefMTfontcopycsnameMTfontMTprcontextMTexcontextendcsname1019 expandafterifxMTfontcopyrelax

MTfontorig pdfTEX doesnrsquot allow copying a font that has already been copied and expandedletterspaced Hence we have to get the original

1020 edefMTfontorigcsnameexpandafterstringfontname origendcsname1021 expandafterifxMTfontorigrelax1022 MTexptwocMTgletMTfontorigfontname1023 else1024 MTexptwocletfontnameMTfontorig1025 fi1026 langpdftex-defrang globalMTexptwocpdfcopyfontMTfontcopyfontname

Even though LuaTEX also provides the primitive from pdfTEX (even renamed tocopyfont that is lsquopromotedrsquo as per the LuaTEX manual) it is seriously crippled inthat OpenType features will be lost Therefore we do not copy the font but load itanew

1027 langluatex-defrang MTexptwocMTluacopyfontmeaningfontnamenil1028 langdebugrangMTdinfo1creating new copy MTfontcopy

Since itrsquos a new font we have to remove it from the context lists1029 MTmapclistcMTactivefeatures1030 MTexpcsifxMTnameuseMTabbr1relaxelse1031 deftempa11032 MTexpcsMTmaptlistcMT1doccontextsMTremfromlist1033 fi1034 1035 fi1036 MTexptwocletMTfontMTfontcopy

We only need the font identifier for letterspacing1037 letfontnameMTfontcopy

But we have to properly substitute the font after wersquore done1038 aftergroupletaftergroupfontnameaftergroupMTfontcopy1039

MTremfromlist

IMPLEMENTATION Font setup 59

1040 defMTremfromlist11041 MTexpcsifxMTtempa 1fontlistrelaxelse1042 expandafterMTexponenexpandafterMTremfromclistexpandafter1043 MTfont csname MTtempa 1fontlistendcsname1044 fi1045 1046 langpdftex-defrangrelax

MTluacopyfont lang1rang and lang2rang are lsquoselectrsquo and lsquofontrsquo respectively lang3rang is the font spec1047 langluatex-defrangdefMTluacopyfont 1 2 3nil1048 langluatex-defrang globalexpandafterfontMTfontcopy=3relax1049 langpdftex-def|luatex-defrang

Herersquos the promised dirty trick for users of older pdfTEX versions which worksaround the problem that the use of the same font with different expansion para-meters is prohibited If you do not want to create a clone of the font setup (thiswould require duplicating the tfmvf files under a new name and writing new fdfiles and map entries) you can load a minimally larger font for the paragraph inquestion Eg for a document typeset in 10 pt

SetExpansion [ stretch = 30 shrink = 60 step = 5 ] encoding = size = 10001 newcommandexpandpar[1] fontsize10001baselineskipselectfont 1par expandparThis 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 package 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

MTfixfontdimensix

MTdimensix

If fontdimen6 is zero character protrusion spacing kerning and tracking wonrsquotwork and we could skip the settings (for example the dsfont fonts donrsquot specifythis dimension this is probably a bug ndash the fourier and newpxnewtx packageshave been fixed in the meantime) However we can fix it ourselves ndash only trackingstill doesnrsquot work (it seems that letterspacefont uses the fontdimen 6 from theoriginal font) XETEX doesnrsquot provide an equivalent to pdffontsize so we use thenominal size instead

1050 langpdftex-def|luatex-def|xetex-defrang1051 defMTfixfontdimensix1052 ifnumfontdimen6MTfont=z1053 fontdimen6MTfont=1054 langpdftex-defrang pdffontsizeMTfont1055 langluatex-defrang MTrequiresluatex4pdffeedback fontsizepdffontsizeMTfont1056 langxetex-defrang MTsize pt1057 MTinfoFixing zero stringfontdimen 6 for font `MTfontrsquoMessageBreak1058 (new value thefontdimen6MTfont)1059 MTgletncMTfont-fake6empty1060 fi1061 edefMTdimensixnumberfontdimen6MTfont1062 1063 langpdftex-def|luatex-def|xetex-defrang

IMPLEMENTATION Font setup 60

MTsplitname

MTencoding

MTfamily

MTseries

MTshape

MTsize

Split up the font name (lang6rang may be a protrusionexpansion context andor aletterspacing amount) With fontspec we also need to remove its internal instancecounter

1064 langpackagerang1065 defMTsplitname123456nil1066 defMTencoding11067 ifMTfontspec1068 edefMTfamilyMTscrubfeature2()relax1069 else1070 defMTfamily21071 fi1072 defMTseries 31073 defMTshape 41074 defMTsize 51075 MTfixfontdimensix

MTfamilyalias Alias family1076 MTifdefinednTFMTMTfamily alias1077 MTletcnMTfamilyaliasMTMTfamily alias1078 letMTfamilyaliasempty1079

MTscrubfeature

MTscrubfeatures

Remove one resp all feature counters (fontspec)1080 defMTscrubfeature1(2)3relax11081 defMTscrubfeatures1(2)3relax1082 11083 ifxrelax3relaxelse1084 MTscrubfeatures3relax1085 fi1086

ifMTdo

MTfeat

MTmaybedo

We check all features of the current font against the lists of the currently activefont set and set ifMTdo accordingly

1087 newififMTdo1088 defMTmaybedo1

(but only if the feature isnrsquot globally set to false)1089 csname ifMTcsname MTabbr1endcsnameendcsname

Begin with setting micro-typography to true for this font The MTchecklisttests will set it to false if the property is not in the list The first non-empty list thatdoes not contain a match will stop us (except for font)

1090 MTdotrue1091 edeftempacsname MT1setnameendcsname1092 MTmapclistnfontencodingfamilyseriesshapesize1093 MTifdefinednTFMTchecklist11094 csname MTchecklist1endcsname1095 MTchecklist11096 11097 1098 else1099 MTdofalse1100 fi1101 ifMTdo

MTfeat stores the current feature1102 defMTfeat11103 csname MTset1codesendcsname1104 else1105 MTifstreq1tr1106 letMTinfonotrackingMTinfonotracking1107 MTvinfo No nameuseMTabbr11108 fi

IMPLEMENTATION Font setup 61

1109

MTinfonotracking

MTinfonotracking

To defer the message to after the font has actually been logged1110 letMTinfonotrackingrelax1111 defMTinfonotrackingMTvinfo No tracking

MTdinfolist

1112 langdebugrangdefMTdinfolist123MTdinfonl1nameuseMTabbr1 21113 langdebugrang ifx3list emptyelse `nameuseMT2rsquo 3 listfi

MTchecklist The generic test (lang1rang is the axis lang2rang the feature tempa contains the set name)1114 defMTchecklist121115 langdebugrang MTifdefinednT1116 langdebugrang MTifdefinednTF1117 MT2list1tempa

Begin a (neatly masqueraded) expandafter orgy to test whether the font attributeis in the list

1118 expandafterMTexponenexpandafterMTinclist1119 csname MT1expandafterendcsname1120 csname MT2list1tempaendcsname1121 ifMTinlist1122 langdebugrangMTdinfolist21in1123 MTdotrue1124 else1125 langdebugrangMTdinfolist21not in1126 MTdofalse1127 expandafterMTclistbreak1128 fi1129

If no limitations have been specified ie the list for a font attribute has not beendefined at all the font should be set up

1130 langdebugrang MTdinfolist211131

MTchecklistfamily Also test for the alias font if the original font is not in the list1132 defMTchecklistfamily11133 langdebugrang MTifdefinednT1134 langdebugrang MTifdefinednTF1135 MT1listfamilytempa1136 MTexptwonMTinclist1137 MTfamilycsname MT1listfamilytempaendcsname1138 ifMTinlist1139 langdebugrangMTdinfolist1familyin1140 MTdotrue1141 else1142 langdebugrangMTdinfolist1familynot in1143 MTdofalse1144 ifxMTfamilyaliasempty else1145 MTexptwonMTinclist1146 MTfamilyaliascsname MT1listfamilytempaendcsname1147 ifMTinlist1148 langdebugrang MTdinfolist1family aliasin1149 MTdotrue1150 langdebugrangelseMTdinfolist1family aliasnot in1151 fi1152 fi1153 fi1154 ifMTdo else1155 expandafterMTclistbreak1156 fi1157 1158 langdebugrang MTdinfolist1family

IMPLEMENTATION Font setup 62

1159

MTchecklistsize Test whether font size is in list of size ranges1160 defMTchecklistsize11161 langdebugrang MTifdefinednT1162 langdebugrang MTifdefinednTF1163 MT1listsizetempa1164 MTexpcsMTinrlistMT1listsizetempa1165 ifMTinlist1166 langdebugrangMTdinfolist1sizein1167 MTdotrue1168 else1169 langdebugrangMTdinfolist1sizenot in1170 MTdofalse1171 expandafterMTclistbreak1172 fi1173 1174 langdebugrang MTdinfolist1size1175

MTchecklistfont If the font matches we skip the rest of the test1176 defMTchecklistfont11177 langdebugrang MTifdefinednT1178 langdebugrang MTifdefinednTF1179 MT1listfonttempa

Since MTfont may be appended with context andor letterspacing specs weconstruct the name from the font characteristics

1180 edeftempbMTencodingMTfamilyMTseriesMTshapeMTsize1181 expandafterMTexponenexpandafterMTinclistexpandafter1182 tempb csname MT1listfonttempaendcsname1183 ifMTinlist1184 langdebugrangMTdinfolist1fontin1185 expandafterMTclistbreak1186 else1187 langdebugrangMTdinfolist1fontnot in1188 MTdofalse1189 fi1190 1191 langdebugrang MTdinfolist1font1192

1421 Protrusion

ifMTnofamily Info for settings that are not family-specific (Warnings seem to be too irritating)The switch is set in MTnextlistname

1193 newififMTnofamily1194 langpackagerang

MTprotrusion Set up for protrusion1195 langpdftex-def|xetex-def|luatex-defrang1196 defMTprotrusionMTmaybedopr

MTsetprcodes This macro is called by MTsetupfont and does all the work for setting up a fontfor protrusion

1197 defMTsetprcodes1198 MTnofamilyfalse

Check whether and if which list should be applied to the current font If family-specific settings donrsquot exist we write it to the log (for each encoding)

1199 MTiflistexists1200 ifMTnofamily

IMPLEMENTATION Font setup 63

1201 MTifdefinednTFMTencoding-MTfamily-settingsrelax1202 MTinfonlLoading generic protrusion settings for font familyMessageBreak1203 `MTfamilyrsquo (encoding MTencoding)MessageBreak1204 For optimal results create family-specific settingsMessageBreak1205 See the microtype manual for details1206 MTgletncMTencoding-MTfamily-settingsempty1207 1208 fi1209 MTgetopt1210 MTresetprcodes

Get the name of the inheritance list and parse it1211 MTgetinhlist

Set an input encoding1212 MTsetinputencc

Load additional lists1213 MTloadlistMTprcname1214 MTsetlistname

Load the main list1215 MTletcntempcMTprcMTprcname1216 expandafterMTsetcodestempcrelax1217 MTresetprcodes1218

MTsetallpr Set all protrusion codes of the font1219 defMTsetallpr121220 langdebugrangMTdinfonl3-- lprp setting all to 121221 letMTtempempty1222 MTifempty1relaxgaddtomacroMTtemplpcodeMTfonttempcnta=11223 MTifempty2relaxgaddtomacroMTtemprpcodeMTfonttempcnta=21224 MTdofontMTtemp1225

MTresetprcodes

MTresetprcodes

All protrusion codes are zero for new fonts However if we have to reload the fontdue to different contexts we have to reset them This command will be changed bymicrotypecontext if necessary

1226 defMTresetprcodesMTsetallprzz1227 letMTresetprcodesrelax

MTtheprcode

MTtheprcodetr

If the font is letterspaced we have to add half the letterspacing amount to themargin kerns This will be activated in MTsettrcodes

1228 defMTtheprcodetempcntb1229 langpdftex-def|luatex-defrang1230 langpdftex-defrangMTrequirespdftex61231 langluatex-defrangMTrequiresluatex31232 defMTtheprcodetr1233 numexprtempcntb+MTletterspace2relax1234 1235 relax1236 langpdftex-def|luatex-defrang

MTsetcodes Split up the values and set the codes1237 defMTsetcodes11238 ifxrelax1emptyelse1239 MTsplitcodes 1==relax1240 expandafterMTsetcodes1241 fi1242

MTsplitcodes The keyval package would remove spaces here which we neednrsquot do sinceSetProtrusion ignores spaces in the protrusion list anyway MTgetcharunit

IMPLEMENTATION Font setup 64

may mean different things1243 defMTsplitcodes1=2=3relax1244 deftempa11245 ifxtempaempty else1246 MTgetslot1247 langpdftex-def|luatex-defrang ifnumMTchar gt mne1248 langxetex-defrang ifxMTcharempty else1249 MTgetcharunit1250 csname MTMTfeat splitvalendcsname2relax1251 fi1252 fi1253

MTprsplitval

1254 defMTprsplitval12relax1255 deftempb11256 MTifemptytempbrelax1257 MTscaletoem1258 lpcodeMTfontMTchar=MTtheprcode1259 langdebugrangMTdinfonl4 lp (MTchar) numberlpcodeMTfontMTcharspace [1]1260 1261 deftempb21262 MTifemptytempbrelax1263 MTscaletoem1264 rpcodeMTfontMTchar=MTtheprcode1265 langdebugrangMTdinfonl4 rp (MTchar) numberrpcodeMTfontMTcharspace [2]1266

Now we can set the values for the inheriting characters Their slot numbers aresaved in the macro MTinhlanglist nameranglangslot numberrang

1267 MTifdefinedcTMTprinhname1268 MTifdefinednTMTinhMTprinhname MTchar 1269 MTexpcsMTmaptlistc1270 MTinhMTprinhname MTchar 1271 MTsetprheirs1272 1273 1274

MTscaletoem Since pdfTEX version 014h we have to adjust the protrusion factors (ie convertnumbers from thousandths of character width to thousandths of an em of the font)We have to do this before setting the inheriting characters so that the latter inheritthe absolute value not the relative one if they have a differing width (eg the lsquoffrsquoligature) Unlike protcodetex and pdfcprot we do not calculate with lpcoderesp rpcode since this would disallow protrusion factors larger than the characterwidth (since [lr]pcodersquos limit is 1000) Now the maximum protrusion is 1em ofthe font

The unit is in MTcount the desired factor in tempb and the result will bereturned in tempcntb

1275 langpdftex-defrangMTrequirespdftex31276 defMTscaletoem1277 tempcntb=MTcountrelax

For really huge fonts (100 pt or so) an arithmetic overflow could occur with vanillaTEX Using e-TEX this canrsquot happen since the intermediate value is 64 bit whichcould only be reached with a character width larger than maxdimen

1278 MTscaletempcntb tempb MTdimensix1279 ifnumtempcntb=z else1280 MTscalefactor1281 fi1282

IMPLEMENTATION Font setup 65

MTgetcharwd Get the width of the character When using e-TEX we can employ fontcharwdinstead of building scratch boxes

1283 defMTgetcharwd1284 langpdftex-defrang1285 ^^X MTcount=fontcharwdMTfontMTcharrelax1286 ^^Q setboxz=hboxMTfont charMTchar1287 ^^Q MTcount=wdz1288 langpdftex-defrang1289 langluatex-defrang MTcount=fontcharwdMTfontMTcharrelax

MTchar contains a slot number (legacy fonts) a Unicode number or a glyph name(if MTchar is negative)

1290 langxetex-defrang1291 ifnumMTcharltz1292 setboxz=hboxMTfont XeTeXglyph-MTchar1293 MTcount=wdz1294 else1295 MTcount=fontcharwdMTfontMTcharrelax1296 fi1297 langxetex-defrang1298 ifnumMTcount=z MTinfomissingchar fi1299

For letterspaced fonts we have to subtract the letterspacing amount from thecharactersrsquo widths The protrusion amounts will be adjusted in MTsetprcodesThe letterspaced font is already loaded so that 1em = fontdimen6

1300 langpdftex-defrang1301 MTrequirespdftex61302 gaddtomacroMTgetcharwd1303 MTifdefinedcTMTletterspace1304 advanceMTcount -dimexprMTletterspace sp dimexpr 1em1000relax1305 1306 relax1307

No adjustment with versions 014f and 014g1308 defMTscaletoem1309 MTcount=tempbrelax1310 ifnumMTcount=z else1311 MTscalefactor1312 fi1313

We need this in MTwarncodetoolarge (neutralised)1314 defMTgetcharwdMTcount=MTdimensix1315 1316 langpdftex-defrang1317 langpdftex-def|xetex-def|luatex-defrang

MTgetfontdimen For the space unit1318 langpackagerang1319 defMTgetfontdimen11320 ifnumfontdimen1MTfont=z1321 MTwarningnlFont `MTfontrsquo does not specify itsMessageBreak1322 backslashchar fontdimen 1 (itrsquos zero)MessageBreak1323 You should use a different `unitrsquo for MTcurrlistname1324 else1325 MTcount=fontdimen1MTfont1326 fi1327

MTinfomissingchar Info about missing characters or characters with zero width1328 defMTinfomissingchar

IMPLEMENTATION Font setup 66

1329 MTinfonlCharacter `theMTtoksrsquo1330 ^^X ifnumMTcharltz is missingelse1331 ^^X iffontcharMTfontMTchar1332 has a width of 0pt1333 ^^X else is missingfifi1334 ^^Q MessageBreak (itrsquos probably missing)1335 MessageBreak in font `MTfontrsquoMessageBreak1336 Ignoring protrusion settings for this character1337

MTscalefactor Furthermore we might have to multiply with a factor1338 defMTscalefactor1339 ifnumcsname MTMTfeat factorendcsname=m else1340 expandafterMTscaleexpandafter tempcntb1341 csname MTMTfeat factorendcsname m1342 fi1343 ifnumtempcntbgtcsname MTMTfeat maxendcsnamerelax1344 MTexpcsMTwarncodetoolargeMTMTfeat max1345 else1346 ifnumtempcntbltcsname MTMTfeat minendcsnamerelax1347 MTexpcsMTwarncodetoolargeMTMTfeat min1348 fi1349 fi1350

MTwarncodetoolarge Type out a warning if a chosen protrusion factor is too large after the conversionAs a special service we also type out the maximum amount that may be specifiedin the configuration

1351 defMTwarncodetoolarge11352 tempcnta=1relax1353 ifnumcsname MTMTfeat factorendcsname=m else1354 expandafterMTscaleexpandaftertempcntaexpandafter1355 m csname MTMTfeat factorendcsname1356 fi1357 MTscaletempcnta MTdimensix MTcount1358 MTwarningnlThe nameuseMTabbrMTfeat code tempbspace1359 is too large for characterMessageBreak1360 `theMTtoksrsquo in MTcurrlistnameMessageBreak1361 Setting it to the maximum of numbertempcnta1362 tempcntb=1relax1363

MTgetopt The optional argument to the configuration commands (except for SetExpansionand SetTracking which are being dealt with in MTgetexopt and MTgettroptresp)

1364 defMTgetopt1365 MTsetlistname

MTprfactor

MTspfactor

MTknfactor

Apply a factor1366 MTifdefinednTFMTMTfeat ccsname MTMTfeat cnameendcsname factor1367 MTletnnMTMTfeat factor1368 MTMTfeat ccsname MTMTfeat cnameendcsname factor1369 MTvinfo Multiplying nameuseMTabbrMTfeat codes by1370 numbercsname MTMTfeat factorendcsname10001371 1372 MTletnnMTMTfeat factorMTMTfeat factor1373

MTprunit

MTspunit

MTknunit

The unit can only be evaluated here since it might be font-specific If itrsquos emptyitrsquos relative to character widths if itrsquos minus1 relative to space dimensions

1374 MTifdefinednTFMTMTfeat ccsname MTMTfeat cnameendcsname unit1375 MTletnnMTMTfeat unit1376 MTMTfeat ccsname MTMTfeat cnameendcsname unit

IMPLEMENTATION Font setup 67

1377 MTexpcsifxMTMTfeat unitempty1378 MTvinfo Setting nameuseMTabbrMTfeat codes1379 relative to character widths1380 else1381 MTexpcsifxMTMTfeat unitmne1382 MTvinfo Setting nameuseMTabbrMTfeat codes1383 relative to width of space1384 fi1385 fi1386 1387 MTletnnMTMTfeat unitMTMTfeat unit1388

MTgetspaceunit

MTgetcharunit

The codes are either relative to character widths or to a fixed width For spacingand kerning lists they may also be relative to the width of the interword glue Onlythe setting from the top list will be taken into account

1389 letMTgetcharunitrelax1390 letMTgetspaceunitgobble1391 MTexpcsifxMTMTfeat unitempty1392 letMTgetcharunitMTgetcharwd1393 else1394 MTexpcsifxMTMTfeat unitmne1395 letMTgetspaceunitMTgetfontdimen1396 else1397 MTexpcsMTgetunitMTMTfeat unit1398 fi1399 fi

Preset all characters If so we surely donrsquot need to reset too1400 MTifdefinednTMTMTfeat ccsname MTMTfeat cnameendcsname preset1401 csname MTpresetMTfeatendcsname1402 MTletncMTresetMTfeat codesrelax1403 1404

MTgetunit

MTgetunit

If unit contains an em or ex we use the corresponding fontdimen to obtain thereal size Simply converting the em into points might give a wrong result sincethe font probably isnrsquot set up yet so that these dimensions havenrsquot been updatedeither

1405 defMTgetunit11406 expandafterMTgetunit1 enil1407 ifxxemptyelselet1xfi1408 defaultunitstempdima1 ptrelaxnnil1409 ifdimtempdima=z1410 MTwarningnl1411 Cannot set nameuseMTabbrMTfeat factors relative to zeroMessageBreak1412 width Setting factors of list `nameuseMTMTfeat cnamersquoMessageBreak1413 relative to character widths instead1414 let1empty1415 letMTgetcharunitMTgetcharwd1416 else1417 MTvinfo Setting nameuseMTabbrMTfeat factors relative1418 to thetempdima1419 MTcount=tempdimarelax1420 fi1421 1422 defMTgetunit1e23nil1423 ifx3letxempty else1424 if m21425 edefx1fontdimen6MTfont1426 else1427 if x21428 edefx1fontdimen5MTfont1429 fi

IMPLEMENTATION Font setup 68

1430 fi1431 fi1432

MTsetinputenc The configurations may be under the regime of an input encoding1433 defMTsetinputenc1

MTcat We remember the current category (c or inh) in case of warnings later1434 defMTcat1

1435 edeftempaMTMTfeat 1csname MTMTfeat 1nameendcsname inputenc1436 MTifdefinednTtempaMTsetinputenc1437

MTsetinputenc More recent versions of inputenc remember the current encoding so that we cantest whether we really have to load the encoding file

1438 MTaddtosetup1439 ifpackageloadedinputenc1440 ifpackagelaterinputenc200602221441 defMTsetinputenc1442 MTifstreqinputencodingnamecsnametempaendcsnamerelax1443 MTloadinputenc1444 1445 1446 letMTsetinputencMTloadinputenc1447 1448 1449 defMTsetinputenc1450 MTwarningnlKey `inputencrsquo used in MTcurrlistname but the `inputencrsquo1451 MessageBreak package isnrsquot loaded Ignoring input encoding1452 1453 1454

MTloadinputenc Set up normal catcodes since eg listings would otherwise want to actuallytypeset the inputenc file when it is being loaded inside a listing

1455 defMTloadinputenc1456 MTcfgcatcodes1457 langdebugrangMTdinfonl1loading input encoding nameusetempa1458 inputencodingnameusetempa1459 1460 langpackagerang

MTsetprheirs Set the inheriting characters1461 langpdftex-def|xetex-def|luatex-defrang1462 defMTsetprheirs11463 lpcodeMTfont 1=lpcodeMTfontMTcharrelax1464 rpcodeMTfont 1=rpcodeMTfontMTcharrelax1465 langdebugrangMTdinfonl2-- heir of MTchar 11466 langdebugrangMTdinfonl4 lprp (1) numberlpcodeMTfontMTcharspace1467 langdebugrang numberrpcodeMTfontMTcharspace1468

MTpresetpr

MTpresetpr

Preset characters Presetting them relative to their widths is not allowed1469 defMTpresetpr1470 expandafterexpandafterexpandafterMTpresetpr1471 csname MTprcMTprcname presetendcsnamenil1472 1473 defMTpresetpr12nil1474 ifxMTprunitempty1475 MTwarnpresettowidthpr1476 letMTpresetauxMTpresetauxfactor1477 else1478 defMTpresetauxMTpresetauxspace21479 fi

IMPLEMENTATION Font setup 69

1480 MTifempty1lettempaemptyMTpresetaux1tempa1481 MTifempty2lettempbemptyMTpresetaux2tempb1482 MTsetallprtempatempb1483

MTpresetaux

MTpresetauxfactor

MTpresetauxspace

Auxiliary macro for presetting Store value lang1rang in macro lang2rang1484 defMTpresetauxfactor121485 tempcntb=1relax1486 MTscalefactor1487 edef2numbertempcntb1488 1489 defMTpresetauxspace1231490 deftempb21491 MTgetspaceunit11492 MTscaletoem1493 edef3numbertempcntb1494

MTwarnpresettowidth

1495 defMTwarnpresettowidth11496 MTwarningnl1497 Cannot preset characters relative to their widthsMessageBreak1498 for nameuseMTabbr1 list `nameuseMT1cnamersquo Presetting them1499 MessageBreak relative to 1em instead1500 1501 langpdftex-def|xetex-def|luatex-defrang

1422 Expansion

MTexpansion Set up for expansion1502 langpdftex-def|luatex-defrang1503 defMTexpansionMTmaybedoex

MTsetexcodess Setting up font expansion is a bit different because of the selected option Thereare two versions of this macro

If selected=true we only apply font expansion to those fonts for which a listhas been declared (ie like for protrusion)

1504 defMTsetexcodess1505 MTiflistexists1506 MTgetexopt1507 letMTgetcharunitrelax1508 MTresetefcodes1509 MTgetinhlist1510 MTsetinputencc1511 MTloadlistMTexcname1512 MTsetlistname1513 MTletcntempcMTexcMTexcname1514 expandafterMTsetcodestempcrelax1515 MTexpandfont1516 relax1517 1518 langpdftex-def|luatex-defrang

MTsetexcodesn If on the other hand all characters should be expanded by the same amount weonly take the first optional argument to SetExpansion into account

ifMTnonselected We need this boolean in MTiflistexists so that no warning for missing listswill be issued

1519 langpackagerangnewififMTnonselected1520 langpdftex-def|luatex-defrang1521 defMTsetexcodesn1522 MTnonselectedtrue

IMPLEMENTATION Font setup 70

1523 MTiflistexists1524 MTgetexopt1525 1526 letMTstretch MTstretch1527 letMTshrink MTshrink1528 letMTstep MTstep1529 letMTauto MTauto1530 letMTexfactorMTexfactor1531 1532 MTresetefcodes1533 MTexpandfont1534 MTnonselectedfalse1535

MTsetexcodes Default is non-selected It can be changed in the package options1536 letMTsetexcodesMTsetexcodesn

MTexpandfont Expand the font For some reason older LuaTEX versions freeze if the autoexpandmodifier is missing Canrsquot be bothered to find out why For newer versions we couldalso use the function fontsetexpansion or in the future luaotfloadrsquos expansionfont feature

1537 langluatex-defrang1538 MTrequiresluatex31539 MTrequiresluatex4letpdffontexpandexpandglyphsinfontrelax1540 ifnumluatexversionlt791541 defMTexpandfont1542 pdffontexpandMTfont MTstretch MTshrink MTstep autoexpandrelax1543 1544 else1545 defMTexpandfont1546 pdffontexpandMTfont MTstretch MTshrink MTsteprelax1547 1548 fi1549 1550 langluatex-defrang1551 defMTexpandfont1552 pdffontexpandMTfont MTstretch MTshrink MTstep MTautorelax1553 1554 langluatex-defrang

MTsetallex

MTresetefcodes

At first all expansion factors for the characters will be set to 1000 (respectively thefactor of this font)

1555 defMTsetallex11556 langdebugrangMTdinfonl3-- ex setting all to number11557 MTdofontefcodeMTfonttempcnta=1relax1558 1559 defMTresetefcodesMTsetallexMTexfactor

MTresetefcodes However this is only necessary for pdfTEX versions prior to 120 or LuaTEX lt 090(actually I think 087)

1560 langpdftex-defrangMTrequirespdftex41561 langluatex-defrangMTrequiresluatex51562 1563 defMTresetefcodes1564 ifnumMTexfactor=m else1565 MTresetefcodes1566 fi1567 1568 1569 letMTresetefcodesMTresetefcodes1570

MTexsplitval Therersquos only one number per character

IMPLEMENTATION Font setup 71

1571 defMTexsplitval1relax1572 tempcntb=1relax

Take an optional factor into account1573 ifnumMTexfactor=m else1574 MTscaletempcntb MTexfactor m1575 fi1576 ifnumtempcntb gt MTexmax1577 MTwarnextoolargeMTexmax1578 else1579 ifnumtempcntb lt MTexmin1580 MTwarnextoolargeMTexmin1581 fi1582 fi1583 efcodeMTfontMTchar=tempcntb1584 langdebugrangMTdinfonl4 ef (MTchar) numberefcodeMTfontMTchar [1]

Heirs heirs I love thy heirs1585 MTifdefinedcTMTexinhname1586 MTifdefinednTMTinhMTexinhname MTchar 1587 MTexpcsMTmaptlistcMTinhMTexinhname MTchar MTsetexheirs1588 1589 1590

MTwarnextoolarge

1591 defMTwarnextoolarge11592 MTwarningnlExpansion factor numbertempcntbspace too large for1593 characterMessageBreak `theMTtoksrsquo in MTcurrlistnameMessageBreak1594 Setting it to the maximum of number11595 tempcntb=1relax1596

MTgetexopt

MTexfactor

MTstretch

MTshrink

MTstep

MTauto

Apply different values to this font1597 defMTgetexopt1598 MTsetlistname1599 MTifdefinednTFMTexcMTexcname factor1600 MTletcnMTexfactorMTexcMTexcname factor1601 MTvinfo Multiplying expansion factors by numberMTexfactor10001602 1603 letMTexfactorMTexfactor1604 1605 MTgetexoptstretchSetting stretch limit to numberMTstretch1606 MTgetexoptshrink Setting shrink limit to numberMTshrink1607 MTgetexoptstep Setting expansion step to numberMTstep1608 langluatex-defrang MTrequiresluatex3relax1609 MTgetexoptautoMTifstreqMTautoautoexpandEnDisabling automatic expansion1610 langluatex-defrang 1611 MTifdefinednTMTexcMTexcname preset1612 MTpresetex1613 letMTresetefcodesrelax1614 1615

MTgetexopt

1616 defMTgetexopt121617 MTifdefinednTFMTexcMTexcname 11618 MTletnnMT1MTexcMTexcname 11619 MTvinfo 21620 1621 MTletnnMT1MT11622 1623

MTsetexheirs

IMPLEMENTATION Font setup 72

1624 defMTsetexheirs11625 efcodeMTfont1=efcodeMTfontMTchar1626 langdebugrangMTdinfonl2-- heir of MTchar 11627 langdebugrangMTdinfonl4 ef (1) numberefcodeMTfontMTchar1628

MTpresetex

1629 defMTpresetex1630 tempcntb=csname MTexcMTexcname presetendcsnamerelax1631 MTscalefactor1632 MTsetallextempcntb1633 1634 langpdftex-def|luatex-defrang

1423 Interword spacing (glue)

MTspacing Adjustment of interword spacing Only works with pdfTEX1635 langpdftex-defrang1636 MTrequirespdftex61637 defMTspacingMTmaybedosp

MTsetspcodes This is all the same1638 defMTsetspcodes1639 MTiflistexists1640 MTgetopt1641 MTresetspcodes1642 MTgetinhlist1643 MTsetinputencc1644 MTloadlistMTspcname1645 MTsetlistname1646 MTletcntempcMTspcMTspcname1647 expandafterMTsetcodestempcrelax1648 MTresetspcodes1649

MTspsplitval If unit=space MTgetspaceunit will be defined to fetch the correspondingfontdimen (2 for the first 3 for the second and 4 for the third argument)

1650 defMTspsplitval123relax1651 deftempb11652 MTifemptytempbrelax1653 MTgetspaceunit21654 MTscaletoem1655 knbscodeMTfontMTchar=tempcntb1656 langdebugrangMTdinfonl4 knbs (MTchar) numberknbscodeMTfontMTchar [1]1657 1658 deftempb21659 MTifemptytempbrelax1660 MTgetspaceunit31661 MTscaletoem1662 stbscodeMTfontMTchar=tempcntb1663 langdebugrangMTdinfonl4 stbs (MTchar) numberstbscodeMTfontMTchar [2]1664 1665 deftempb31666 MTifemptytempbrelax1667 MTgetspaceunit41668 MTscaletoem1669 shbscodeMTfontMTchar=tempcntb1670 langdebugrangMTdinfonl4 shbs (MTchar) numbershbscodeMTfontMTchar [3]1671 1672 MTifdefinedcTMTspinhname1673 MTifdefinednTMTinhMTspinhname MTchar 1674 MTexpcsMTmaptlistcMTinhMTspinhname MTchar MTsetspheirs1675

IMPLEMENTATION Font setup 73

1676 1677

MTsetspheirs

1678 defMTsetspheirs11679 knbscodeMTfont1=knbscodeMTfontMTchar1680 stbscodeMTfont1=stbscodeMTfontMTchar1681 shbscodeMTfont1=shbscodeMTfontMTchar1682 langdebugrangMTdinfonl2-- heir of MTchar 11683 langdebugrangMTdinfonl4 knbsstbsshbs (1) numberknbscodeMTfontMTchar1684 langdebugrang numberstbscodeMTfontMTcharnumbershbscodeMTfontMTchar1685

MTsetallsp

MTresetspcodes

MTresetspcodes1686 defMTsetallsp1231687 langdebugrangMTdinfonl3-- knbsstbsshbs setting all to 1231688 letMTtempempty1689 MTifempty1relaxgaddtomacroMTtempknbscodeMTfonttempcnta=1relax1690 MTifempty2relaxgaddtomacroMTtempstbscodeMTfonttempcnta=2relax1691 MTifempty3relaxgaddtomacroMTtempshbscodeMTfonttempcnta=3relax1692 MTdofontMTtemp1693 1694 defMTresetspcodesMTsetallspzzz1695 letMTresetspcodesrelax

MTpresetsp

MTpresetsp 1696 defMTpresetsp1697 expandafterexpandafterexpandafterMTpresetsp1698 csname MTspcMTspcname presetendcsnamenil1699 1700 defMTpresetsp123nil1701 ifxMTspunitempty1702 MTwarnpresettowidthsp1703 MTifempty1lettempaemptyMTpresetauxfactor1tempa1704 MTifempty2lettempcemptyMTpresetauxfactor2tempc1705 MTifempty3lettempbemptyMTpresetauxfactor3tempb1706 else1707 MTifempty1lettempaemptyMTpresetauxspace21tempa1708 MTifempty2lettempcemptyMTpresetauxspace32tempc1709 MTifempty3lettempbemptyMTpresetauxspace43tempb1710 fi1711 MTsetallsptempatempctempb1712 1713 relax

1424 Additional kerning

MTkerning Again only check for additional kerning for new versions of pdfTEX1714 MTrequirespdftex61715 defMTkerningMTmaybedokn

MTsetkncodes Itrsquos getting boring I know1716 defMTsetkncodes1717 MTiflistexists1718 MTgetopt1719 MTresetkncodes1720 MTgetinhlist1721 MTsetinputencc1722 MTloadlistMTkncname1723 MTsetlistname1724 MTletcntempcMTkncMTkncname1725 expandafterMTsetcodestempcrelax1726 MTresetkncodes

IMPLEMENTATION Font setup 74

1727

MTknsplitval Again the unit may be measured in the space dimension this time only fontdimen 21728 defMTknsplitval12relax1729 deftempb11730 MTifemptytempbrelax1731 MTgetspaceunit21732 MTscaletoem1733 knbccodeMTfontMTchar=tempcntb1734 langdebugrangMTdinfonl4 knbc (MTchar) numberknbccodeMTfontMTchar [1]1735 1736 deftempb21737 MTifemptytempbrelax1738 MTgetspaceunit21739 MTscaletoem1740 knaccodeMTfontMTchar=tempcntb1741 langdebugrangMTdinfonl4 knac (MTchar) numberknaccodeMTfontMTchar [2]1742 1743 MTifdefinedcTMTkninhname1744 MTifdefinednTMTinhMTkninhname MTchar 1745 MTexpcsMTmaptlistcMTinhMTkninhname MTchar MTsetknheirs1746 1747 1748

MTsetknheirs

1749 defMTsetknheirs11750 knbccodeMTfont1=knbccodeMTfontMTchar1751 knaccodeMTfont1=knaccodeMTfontMTchar1752 langdebugrangMTdinfonl2-- heir of MTchar 11753 langdebugrangMTdinfonl4 knbc (1) numberknbccodeMTfontMTchar1754 langdebugrang numberknaccodeMTfontMTchar1755

MTsetallkn

MTresetkncodes

MTresetkncodes1756 defMTsetallkn121757 langdebugrangMTdinfonl3-- knacknbc setting all to 121758 letMTtempempty1759 MTifempty1relaxgaddtomacroMTtempknbccodeMTfonttempcnta=1relax1760 MTifempty2relaxgaddtomacroMTtempknaccodeMTfonttempcnta=2relax1761 MTdofontMTtemp1762 1763 defMTresetkncodesMTsetallknzz1764 letMTresetkncodesrelax

MTpresetkn

MTpresetkn 1765 defMTpresetkn1766 expandafterexpandafterexpandafterMTpresetkn1767 csname MTkncMTkncname presetendcsnamenil1768 1769 defMTpresetkn12nil1770 ifxMTknunitempty1771 MTwarnpresettowidthkn1772 letMTpresetauxMTpresetauxfactor1773 else1774 defMTpresetauxMTpresetauxspace21775 fi1776 MTifempty1lettempaemptyMTpresetaux1tempa1777 MTifempty2lettempbemptyMTpresetaux2tempb1778 MTsetallkntempatempb1779 1780 relax1781 langpdftex-defrang

IMPLEMENTATION Font setup 75

1425 Tracking

This only works with pdfTEX 140 or LuaTEX 0621782 langpdftex-def|luatex-defrang1783 langpdftex-defrangMTrequirespdftex61784 langluatex-defrangMTrequiresluatex31785

MTtracking

MTtracking

MTtrfontlist

We only check whether a font should not be letterspaced at all not whether wersquovealready done that (because we have to do it again)

1786 letMTtrfontlistempty1787 defMTtracking1788 MTexponenMTinclistMTfontMTtrfontlist1789 ifMTinlistelse1790 MTmaybedotr1791 ifMTdoelse1792 xdefMTtrfontlistMTtrfontlistMTfont1793 fi1794 fi1795 1796 langpdftex-def|luatex-defrang1797 langpdftex-def|luatex-def|letterspacerangletMTtracking1798 langpdftex-def|luatex-defrang MTtracking1799 langletterspacerang relax

MTsettrcodes The tracking amount is determined by the optional argument to textls settingsfrom SetTracking or the global letterspace option in this order

Tracking wonrsquot work if the original fontrsquos fontdimen6 is zero in which casewe issue a warning (once for every font)

1800 langpdftex-def|luatex-def|letterspacerang1801 defMTsettrcodes1802 langpdftex-def|luatex-defrang1803 MTvinfoTracking font `MTfontrsquoonline1804 MTifdefinednTFMTfont-fake61805 expandafterifxcsnameMTfont-fake6endcsnameempty1806 MTwarningnl1807 Font `MTfontrsquo does not specify itsMessageBreak1808 backslashchar fontdimen 6 (width of an `emrsquo) ThereforeMessageBreak1809 nameuseMTabbrMTfeat will not work with this font1810 MTgletncMTfont-fake6relax1811 fi1812 1813 MTiflistexists1814 MTgettropt1815 relax1816 langpdftex-def|luatex-defrang1817 MTifdefinedcTFMTletterspacerelaxletMTletterspaceMTletterspace1818 ifnumMTletterspace=z

Zero tracking requires special treatment1819 MTsettrzero1820 else1821 langpdftex-def|luatex-defrang MTvinfo Tracking by numberMTletterspace

Letterspacing only works in PDF mode1822 MTwarntrackingDVI

MTlsfont The letterspaced font instances are saved in macros langfont nameranglangletterspacingamountrangls

In contrast to MTfont which may reflect the font characteristics more accur-ately (taking substitutions into account) fontname is guaranteed to correspondto an actual font identifier

IMPLEMENTATION Font setup 76

1823 xdefMTlsfontcsnameexpandafterstringfontname1824 numberMTletterspace lsendcsname1825 expandafterifxMTlsfontrelax1826 langdebugrangMTdinfonl1 new letterspacing instance

In case of nested letterspacing with different amounts we have to extract the basefont again

1827 MTgetlsbasefont

luaotfload provides the faux font feature kernfactor which we will use whendealing with non-legacy fonts as it is less problematic and faster than the pdfTEXprimitive letterspacefont

1828 langluatex-def|letterspacerang1829 MTifluaotffont1830 langluatex-defampdebugrangMTdinfonl1 luaotf font MessageBreak1831 langluatex-defampdebugrang expandafterfontnamefontname1832 ifnumMTletterspaceltzdefMTminus-elseletMTminusemptyfi1833 globalexpandafterfontMTlsfont=1834 expandafterMTexptwocexpandafterMTlsfontspecfont1835 expandafterfontnameexpandafterfontnamespace nil1836 1837 langluatex-def|letterspacerang1838 langluatex-defampdebugrangMTdinfonl1 legacy font1839 globalexpandafterletterspacefontMTlsfontfontnameMTletterspace1840 langluatex-def|letterspacerang

Scale interword spacing (not configurable in letterspace)1841 langpdftex-def|luatex-defrang1842 MTifdefinedcTFMTtrispace1843 lettempaMTtrispace1844 edeftempaMTletterspace1845 MTifdefinedcTFMTtrospace1846 edeftempatempaMTtrospace1847 edeftempatempa1848 expandafterMTtrsetspacetempa1849 langpdftex-def|luatex-defrang1850 langletterspacerang1851 spacing = ltletterspace amountgt1852 fontdimen2MTlsfont=dimexprnumexpr 1000+MTletterspacerelax sp1853 fontdimen2MTlsfont1000relax1854 langletterspacerang

Adjust outer kerning (microtype only)1855 langpdftex-def|luatex-defrang1856 MTifdefinedcTFMTtrokernlettempaMTtrokerndeftempa1857 expandafterMTtrsetokerntempa

Disable ligatures (not configurable in letterspace)1858 MTifdefinedcTMTtrligaturesMTtrnoligatures1859 langpdftex-def|luatex-defrang1860 langletterspacerang1861 no ligatures = f1862 tagcodeMTlsfont`f=mne1863 langletterspacerang

Adjust protrusion values now and maybe later (in MTprsplitval) (not forLuaTEX though where letterspacing does not interfere with protrusion)

1864 langluatex-def|letterspacerang MTifluaotffontrelax1865 langdebugrangMTdinfonl2 compensating for tracking (numberMTletterspace)1866 MTdofontlpcodeMTlsfonttempcnta=numexprMTletterspace2relax1867 rpcodeMTlsfonttempcnta=numexprMTletterspace2relax1868 letMTtheprcodeMTtheprcodetr1869 langluatex-def|letterspacerang 1870 fi

IMPLEMENTATION Font setup 77

Finally let the letterspaced font propagate With LuaTEX we also need to load1871 aftergroupMTsetlsfont1872 langpdftex-def|luatex-defrang letMTfontMTlsfont1873 langluatex-defrang MTifluaotffontMTfontrelax

MTsetcurrls

MTcurrls

We need to remember the current letterspacing amount (for lslig)1874 xdefMTsetcurrlsdefnoexpandMTcurrlsMTletterspace1875 aftergroupMTsetcurrls

Adjust surrounding spacing and kerningMTsetcurros We get the current outer spacing and adjust it then after the end of the current

outer group set the current outer spacing again and adjust1876 langpdftex-def|luatex-defrang1877 MTouterspace=csname MTouterspaceexpandafterstringfontnameendcsnamerelax1878 xdefMTsetcurrosMTouterspace=theMTouterspacerelax1879 MTtrouterl1880 langpdftex-def|luatex-defrang

If MTlsadjust is empty itrsquos the starred version of textls Use scaling to avoida lsquoDimension too largersquo

1881 ifxMTlsadjustempty1882 langletterspacerang textls outer kerning = textls outer kerning = 001883 MTouterkern=-dimexprMTletterspace sp fontdimen6fontname2000relax1884 MTlsouterk

Otherwise get the current outer kerning and adjust it for left and right side(microtype only)

1885 langpdftex-def|luatex-defrang1886 else1887 MTouterkern=expandafterexpandafterexpandafterfirstoftwo1888 csname MTouterkernexpandafterstringfontnameendcsnamerelax1889 ifdimMTouterkern=zelse MTlsouterk fi1890 MTouterkern=expandafterexpandafterexpandaftersecondoftwo1891 csname MTouterkernexpandafterstringfontnameendcsnamerelax1892 langpdftex-def|luatex-defrang1893 langletterspacerang1894 xdefMTsetcurrokMTouterkern=theMTouterkernrelax1895 MTafteraftergroup1896 MTsetcurrok1897 noexpandMTlsouterk1898 1899 langletterspacerang1900 fi1901 langpdftex-def|luatex-defrang

MTsetcurrok Carry the outer kerning amount to outside the next group then set outer spacing(which will set kerning if no space follows)

1902 xdefMTsetcurrokMTouterkern=theMTouterkernrelax

Stuff to be done after the letterspace group The letterspace package only adjuststhe kerning

1903 MTafteraftergroup1904 MTsetcurros1905 MTsetcurrok1906 noexpandMTtrouterr1907 1908 langpdftex-def|luatex-defrang1909 fi1910 langpdftex-def|luatex-defrang 1911

MTafteraftergroup This helper macro carries stuff outside of the current group to the end of the nextgroup but will then respect grouping which is crucial for nested letterspacing

IMPLEMENTATION Font setup 78

(Following an idea of Will Robertson)1912 defMTafteraftergroup11913 langletterspacerang MTmaybegobblewithtikz1914 MTifdefinednTFMTaftergroupnumbercurrentgrouplevelrelax1915 MTexpcsxdefMTaftergroupnumbercurrentgrouplevel1916 MTexpcsMTgletMTaftergroupnumbercurrentgrouplevelnoexpandundefined11917 expandafteraftergroupexpandafteraftergroupMTexpcsaftergroup1918 MTaftergroupnumbercurrentgrouplevel1919 1920 langletterspacerang 1921 1922 langpdftex-def|luatex-def|letterspacerang

MTlsfontspeccolon

MTlsfontspecfont

Add the kernfactor feature to a font loaded by fontspec (we might have to addthe colon ourselves)

1923 langluatex-def|letterspacerang1924 defMTlsfontspeccolon1234nilifx312else123fi1925 defMTlsfontspecfont1 2nil1926 MTlsfontspeccolon1relaxnil1927 kernfactor=MTminus ifnumMTletterspace=1000 1else 01928 ifnumMTminusMTletterspacelt100 0fi1929 ifnumMTminusMTletterspacelt10 0fi1930 numberMTminusMTletterspace fi1931 ifx2 at fsize ptelse2firelax1932 1933 langluatex-def|letterspacerang

MTgettropt Various settings (only for the microtype version)1934 langpdftex-def|luatex-defrang1935 defMTgettropt1936 MTsetlistname1937 letMTtrfactorm

MTtrunit Different unit (for letterspace andor (outer)spacing)1938 MTifdefinednTMTtrcMTtrcname unit1939 MTletcnMTtrunitMTtrcMTtrcname unit1940 ifdimMTtrunit=1em1941 letMTtrunitundefined1942 else1943 MTgetunitMTtrunit1944 fi1945 1946 MTifdefinednTMTtrcMTtrcname1947 MTletcnMTletterspaceMTtrcMTtrcname1948 MTifdefinedcTMTtrunit1949 lettempbMTletterspace1950 MTscaletoem1951 edefMTletterspacenumbertempcntb1952 1953

MTtrispace

MTtrospace

Adjust interword spacing1954 MTgettroptspacing ispace1955 MTgettroptouterspacingospace

MTtrokern Adjust outer kerning1956 MTgettroptouterkerningokern

MTtrligatures Which ligatures should we disable (empty means all undefined none)1957 MTgettroptnoligatures ligatures1958

MTgettropt

1959 defMTgettropt12

IMPLEMENTATION Font setup 79

1960 MTifdefinednTMTtrcMTtrcname 11961 MTletnnMTtr2MTtrcMTtrcname 11962 1963 langpdftex-def|luatex-defrang

MTsetlsfont Redefine fontname which will be called a second later (in selectfont)1964 langpdftex-def|luatex-def|letterspacerang1965 langplainrangMTrequireslatex21966 defMTsetlsfontMTexptwocletfontnameMTlsfont

lsstyle Disable the tests whether the font should be letterspaced then trigger the setupOnly 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 againSetting glbcurrsize globally to empty (our previous solution) could throw usinto an infinite loop (eg with the psnfss packages via everymathsize) sowe issue glbsettings instead However in certain situations we may still misssome math fonts so letrsquos try to also enforce it by emptying glbcurrsize fingerscrossed The overhead seems small

1967 DeclareRobustCommandlsstyle1968 notmathalphabetlsstyletextls1969 letglbcurrsizeempty1970 langpdftex-def|luatex-defrang MTmaybegobblewithtikzaftergroupglbsettings1971 langpdftex-def|luatex-defrang defMTfeattr1972 letMTtrackingMTsettrcodes1973 selectfont1974

Now the definitions for the letterspace package with plain TEX1975 langplainrang1976 1977 defMTsetlsfontMTlsfont1978 deflsstyle1979 begingroup1980 escapecharmne1981 xdeffontnamecsnameexpandafterstringthefontendcsname1982 MTsettrcodes1983 endgroup1984 1985 lettextlsundefined1986 letlsligundefined1987 1988 langplainrang

lslig For Fraktur fonts some ligatures shouldnrsquot be broken up This command willtemporarily select the base font and insert the correct kerning

1989 DeclareRobustCommandlslig[1]1990 MTifdefinedcTFMTcurrls1991 escapecharmne1992 MTgetlsbasefont1993 MTouterkern=dimexprMTcurrls sp fontdimen6fontname2000relax1994 kernMTouterkern1995 fontname 11996 kernMTouterkern1997 11998

MTlsbasefont

MTgetlsbasefont

pdfTEX cannot letterspace fonts that already are letterspaced Therefore we haveto save the base font in langfont namerangbase

The previous solution (checking the macrorsquos 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

IMPLEMENTATION Font setup 80

1999 defMTgetlsbasefont2000 xdefMTlsbasefontcsnameexpandafterstringfontname baseendcsname2001 expandafterifxMTlsbasefontrelax2002 MTexptwocMTgletMTlsbasefontfontname2003 else2004 langdebugrangMTdinfonl1 fixing base font2005 MTexptwocletfontnameMTlsbasefont2006 fi2007

MTsetlsbasefont

MTsettrzero

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

2008 defMTsetlsbasefontMTexptwocletfontnameMTlsbasefont2009 defMTsettrzero2010 langdebugrangMTdinfonl1 zero tracking2011 xdefMTlsbasefontcsnameexpandafterstringfontname baseendcsname2012 expandafterifxMTlsbasefontrelax else2013 langdebugrangMTdinfonl1 fixing base font2014 aftergroupMTsetlsbasefont2015 fi2016 2017 langpdftex-def|luatex-def|letterspacerang

MTtrnoligatures pdfTEX 1400ndash1403 disabled all ligatures in letterspaced fonts2018 langpdftex-def|luatex-defrang2019 langpdftex-defrangMTrequirespdftex72020 defMTtrnoligatures2021 ifxMTtrligaturesempty2022 MTnoligaturesMTlsfontundefined2023 else2024 MTnoligaturesMTlsfontMTtrligatures2025 fi2026 2027 langpdftex-defrang2028 2029 defMTtrnoligatures2030 MTwarningnl2031 Disabling selected ligatures is only possible sinceMessageBreak2032 pdftex 1404 Disabling all ligatures instead2033 MTgletMTtrnoligaturesrelax2034 2035 2036 langpdftex-defrang

MTouterspace A new skip for outer spacing2037 newskipMTouterspace

MTtrsetspace Adjust interword spacing (fontdimen234) for inner and outer space For innerspacing the font dimensions will be adjusted the settings for outer spacing will beremembered in a macro

2038 defMTtrsetspace1234562039 langdebugrangMTdinfonl2 orig space thefontdimen2MTlsfont2040 langdebugrang thefontdimen3MTlsfont thefontdimen4MTlsfont2041 langdebugrang MessageBreak (123) (456)2042 letMTtempempty2043 MTtrsetspace142empty2044 MTtrsetspace253plus2045 MTtrsetspace364minus2046 MTgletncMTouterspaceexpandafterstringfontnameMTtemp2047 langdebugrangMTdinfonl2 inner space thefontdimen2MTlsfont2048 langdebugrang thefontdimen3MTlsfont thefontdimen4MTlsfont2049 langdebugrangMTdinfonl2 outer space MTtemp2050

IMPLEMENTATION Font setup 81

MTtrsetspace If settings for outer spacing lang2rang donrsquot exist they will be inherited from the innerspacing settings lang1rang

2051 defMTtrsetspace12342052 MTifempty22053 MTifempty1relax2054 MTtrsetspace1310002055 fontdimen3MTlsfont=tempdima2056 2057 edefMTtempMTtemp4thefontdimen3MTlsfont2058 2059 MTtrsetspace2320002060 edefMTtempMTtemp4thetempdima2061 MTifempty1relax2062 MTtrsetspace1310002063 fontdimen3MTlsfont=tempdima2064 2065 2066

MTtrsetspace If the value is followed by an asterisk the fontdimen will be scaled by the respectiveamount otherwise the value denotes the desired dimension in the respective unit

2067 defMTtrsetspace1232068 MTtestast1nil2069 MTifdefinedcTFMTtrunit2070 edeftempb1MTscaletoem2071 tempcntb=1relax2072 tempdima=dimexprtempcntb spMTdimensix1000relax

For fontdimen2 we also have to subtract the kerning that letterspacing adds toeach side of the characters (only half if itrsquos for outer spacing)

2073 ifnum2=tw2074 advancetempdima -dimexprMTletterspace spMTdimensix3relax2075 fi2076 2077 MTifemptytempalettempaMTletterspacerelax2078 tempdima=dimexpr numexpr1000+tempa sp fontdimen2MTlsfont1000relax2079 2080 langdebugrangMTdinfonl3 font dimen 2 (1) thetempdima2081

MTtrouterl Recall the last skip (must really be an interword space not just a marker nor alsquohardrsquo space ie one that doesnrsquot contain stretch or shrink parts)

2082 defMTtrouterl2083 ifhmode2084 ifdimlastskipgt5sp2085 edefxthelastskip minus 0pt2086 setboxzhboxMTouterspace=x2087 ifdimwdzgtz2088 langdebugrangMTdinfo2[[[ adjusting pre space theMTouterspace2089 unskip hskipMTouterspacerelax

Disable left outer kerning2090 letMTlsouterkrelax2091 else

The ragged2e package sets spaceskip without glue2092 ifdimlastskip=2093 ifnumspacefactorlt20002094 spaceskip2095 else2096 ifdimxspaceskip=z2097 dimexprspaceskip+fontdimen7fontnamerelax2098 else2099 xspaceskip

IMPLEMENTATION Font setup 82

2100 fi2101 fi2102 langdebugrangMTdinfo2[[[ adjusting pre space (skip) theMTouterspace2103 unskip hskipMTouterspacerelax2104 letMTlsouterkrelax2105 fi2106 fi2107 fi2108 fi2109

MTtrouternext

MTtrouterr

microtype also adjusts spacing The following is borrowed from soul Irsquove added thecases for italic correction since tracking may also be triggered by text commands(eg textsc)

2110 defMTtrouterr2111 futureletMTtrouternextMTtrouterr2112

MTifouternext We avoid using ifx tests in case MTtrouternext is let to fi etc2113 defMTifouternext12114 ifxMTtrouternext1expandafterfirstoftwoelseexpandaftersecondoftwofi2115

MTtrouterr

2116 defMTtrouterr2117 defMTtemp

Donrsquot adjust in math mode There was a tricky bug when textls was the lastcommand in a mathchoice group

2118 ifmmode else

A similar bug occurred when adjustment would happen inside a discretionarygroup which we prevent here This only works with e-TEX (which we know isavailable)

2119 ifnumcurrentgrouptype=10 else2120 defMTtemp1ifhmodehskipMTouterspace2121 langdebugrangMTdinfo2]]] adjusting post space (1) theMTouterspace2122 fi2123 expandafterifcatexpandafternoexpandcsname MTtrouternextendcsnameegroup

2124 ifhmodeunkernfiegroup2125 MTsetcurrok MTsetcurros2126 defMTtempafterassignmentMTtrouterrletMTtemp=2127 else

If the next token is maybeic (from an enclosing text command) we gobble itread the next one feed it to maybeic (via MTtroutericr) and then callourselves again

2128 MTifouternextmaybeic2129 MTsetcurrok MTsetcurros2130 defMTtempafterassignmentMTtroutericrletMTtemp=2131

If the next token is checkicr (from an inner text command) we insert ourselvesjust before it This will then call maybeic again the next round (which howeverwill always insert an italic correction since it doesnrsquot read beyond our group)

2132 MTifouternextcheckicr2133 defMTtempaftergroupMTtrouterrcheckicrletMTtemp=2134 2135 MTifouternextsptoken2136 defMTtemp ifhmodehskipMTouterspace2137 langdebugrangMTdinfo2]]] adjusting post space (2) theMTouterspace

IMPLEMENTATION Font setup 83

2138 fi2139 2140 MTifouternext~2141 defMTtemp~nobreakhskipMTouterspace2142 langdebugrangMTdinfo2]]] adjusting post space (3) theMTouterspace2143 2144 2145 MTifouternext relax2146 MTifouternextspacerelax2147 MTifouternextxobeysprelax

xspace requires special treatment2148 MTifouternextxspace2149 defMTtempxspaceMTxspace2150

If therersquos no outer spacing there may be outer kerning2151 defMTtempifdimMTouterkern=zelseMTlsouterk2152 langdebugrangMTdinfo2--- adjusting post kern theMTouterkern2153 fi2154 MTletncMTtrouternextrelax2155 fi2156 fifi2157 MTtemp2158

MTtroutericr

MTtroutericr

Helper macros for the italic correction mess2159 defMTtroutericrafterassignmentMTtroutericrMTtrouterr2160 defMTtroutericr2161 letlettoken= MTtrouternext2162 maybeic2163

MTxspace

MTxspace

If the group is followed by xspace we first feed xspace with the next token thencheck whether it has inserted a space lettoken might be something evil so itshould be encapsulated here

2164 defMTxspacefutureletlettokenMTxspace2165 defMTxspacexspacefirsttruexspace2166 ifdimlastskipgt5sp2167 unskip hskipMTouterspace2168 else2169 ifdimMTouterkern=zelseMTlsouterk fi2170 fi2171

For older pdfTEX versions and LuaTEX throw an error2172 2173 DeclareRobustCommandlsstyle2174 MTerrorLetterspacing only works with MTengine tex version2175 langpdftex-defrang 1402176 langluatex-defrang 0622177 MessageBreak or newer2178 Upgrade MTengine tex or try the `soulrsquo package instead2179 MTgletlsstylerelax2180 2181

And for XETEX too2182 langpdftex-def|luatex-defrang2183 langxetex-defrang2184 DeclareRobustCommandlsstyle2185 MTerrorLetterspacing currently doesnrsquot work with xetex2186 Run pdftex or luatex or use the `soulrsquo package instead2187 MTgletlsstylerelax2188

IMPLEMENTATION Font setup 84

2189 langxetex-defrangtextls

MTlsadjust

This command may be used like the other text commands The starred versionremoves kerning on the sides The optional argument changes the letterspacingfactor

2190 langpackage|letterspacerang2191 DeclareRobustCommandtextls2192 ifstarletMTlsadjustMTlsadjustemptyMTtextls2193 letMTlsadjustMTlsadjustrelaxMTtextls2194

MTtextls

MTletterspace

This is now almost LATEXrsquos DeclareTextFontCommand with the difference that weadjust the outer spacing and kerning also for lsstyle while LATEXrsquos text switchesdonrsquot bother about italic correction

2195 newcommandMTtextls[2][]2196 ifmmode2197 nfsstextMTlssetls1lsstyle22198 else2199 hmodebgroup2200 MTlssetls12201 lsstyle 22202 expandafter2203 egroup2204 fi2205

MTlsadjust

MTlsadjustempty

MTlsadjustrelax

MTlssetls

Set current letterspacing amount and outer kerning This has to be done inside thesame group as the letterspacing command

2206 defMTlsadjustemptyletMTlsadjustempty2207 defMTlsadjustrelaxletMTlsadjustrelax2208 defMTlssetls12209 MTifempty12210 letMTletterspaceundefined2211 KVspdefMTletterspace12212 edefMTletterspacenumberMTletterspace2213 MTlstoolargeMTletterspace2214 MTlsadjust2215

MTlstoolarge Test whether letterspacing amount is too large2216 defMTlstoolarge12217 ifnum1gtMTtrmax2218 MTwarningMaximum for option `letterspacersquo is numberMTtrmax2219 let1MTtrmax2220 else2221 ifnum1ltMTtrmin2222 MTwarningMinimum for option `letterspacersquo is numberMTtrmin2223 let1MTtrmin2224 fi2225 fi2226

MTouterkern

MTtrsetokern

This dimen is used for the starred version of textls for lslig and for adjustedouter kerning

2227 newdimenMTouterkern2228 langpackage|letterspacerang2229 langpdftex-def|luatex-defrang2230 defMTtrsetokern122231 letMTtempempty2232 MTifempty1MTtrsetokernMTtrsetokern12233 MTifempty2MTtrsetokernMTtrsetokern22234 MTgletncMTouterkernexpandafterstringfontnameMTtemp2235 langdebugrangMTdinfonl2 outer kerning (12)

IMPLEMENTATION Font setup 85

2236 langdebugrang = nameuseMTouterkernexpandafterstringfontname2237

MTtrsetokern

2238 defMTtrsetokern12239 MTtestast1nil2240 MTifdefinedcTFMTtrunit2241 edeftempb1MTscaletoem2242 tempcntb=1relax2243 tempdima=dimexpr tempcntb sp MTdimensix1000relax2244 2245 MTifemptytempalettempamrelax2246 tempdima=dimexpr numexprtempaMTletterspace1000relax sp2247 fontdimen6MTlsfont2000relax2248 2249 advancetempdima -dimexpr MTletterspace sp2250 fontdimen6MTlsfont2000relax2251 edefMTtempMTtempthetempdima2252 2253 langpdftex-def|luatex-defrang

MTlsouterk Adjust outer kerning We additionally add a marker (kern3spkern-3sp) for casesof nested letterspacing without anything actually printed

2254 langpdftex-def|luatex-def|letterspacerang2255 defMTlsouterk2256 ifhmode2257 ifdimlastkern=-3sp unkern2258 ifdimlastkern=3sp kern-3sp2259 expandafterexpandafterexpandaftergobble2260 else unkern2261 expandafterexpandafterexpandafterfirstofone2262 fi2263 else2264 expandafterfirstofone2265 fi2266 kernMTouterkernkern3spkern-3sprelax2267 fi2268 2269 langpdftex-def|luatex-def|letterspacerang

1426 Disabling ligatures

MTnoligatures The possibility to disable ligatures is a new features of pdfTEX 130 and also workswith LuaTEX

2270 langpdftex-def|luatex-defrang2271 langpdftex-defrangMTrequirespdftex52272 defMTnoligatures2273 MTdotrue2274 lettempaMTnlsetname2275 MTmapclistnfontencodingfamilyseriesshapesize2276 MTifdefinednTFMTchecklist12277 csname MTchecklist1endcsname2278 MTchecklist12279 nl2280 2281 ifMTdo2282 MTnoligaturesMTfontMTnlligatures2283 fi2284

MTnoligatures This is also used by MTsettrcodes2285 langluatex-defrangMTrequiresluatex4letpdfnoligaturesignoreligaturesinfontrelax2286 defMTnoligatures12

IMPLEMENTATION Font setup 86

2287 MTifdefinedcTF2

Early MiKTEX versions (before 252579) didnrsquot know tagcode2288 MTifdefinedcTFtagcode

No lsquoinputencrsquo key2289 letMTwarnmaybeinputencempty2290 defMTcurrlistnamebackslashchar DisableLigatures2291 MTmapclistc22292 KVspdeftempa1MTgetslot2293 ifnumMTchargtmne2294 tagcode1MTchar=mne

With LuaTEX we additionally register the ligatures that should be inhibited in atable (used by the luaotfload function keepligature)

2295 langluatex-defrang MTifluaotffont2296 langluatex-defrang MTluamicrotypenoligatures([[1]][[MTchar]])relax2297 fi2298 2299 MTvinfo Disabling ligatures for characters 22300 2301 pdfnoligatures12302 MTwarningCannot disable selected ligatures (pdftex doesnrsquotMessageBreak2303 know backslashchar tagcode) Disabling all ligatures ofMessageBreak2304 the font instead2305 2306 2307 pdfnoligatures12308 langluatex-defrang MTifluaotffont2309 langluatex-defrang MTluamicrotypenoligatures([[1]]_all_)relax2310 MTvinfo Disabling all ligatures2311 2312 2313 langpdftex-defrangrelax2314 langpdftex-def|luatex-defrang

For each potential ligature luaotfload will call the keepligature function whichexpects the first node of the ligature to check whether they should be kept orinhibited Herersquos our concoction of this function The table microtypeligs will bepopulated in MTnoligatures

2315 langluafilerang2316 microtypeligs = microtypeligs or 23172318 local function noligatures(fontcsliga)2319 local fontcs = match(fontcs([^ ]+))2320 microtypeligs[fontcs] = microtypeligs[fontcs] or 2321 tableinsert(microtypeligs[fontcs]liga)2322 end2323 microtypenoligatures = noligatures23242325 local function keepligature(c)2326 local nodedirect = nodedirect2327 local getfield = nodedirectgetfield2328 local getfont = nodedirectgetfont2329 local fch2330 if type(c) == userdata then -- in older luaotfload versions c was a node2331 f = cfont2332 ch = ccomponentschar2333 else -- since 26 c is a (direct node) number2334 f = getfont(c)2335 ch = getfield(getfield(ccomponents)char)2336 end2337 -- if ch then -- should always be true2338 local ligs = microtypeligs[match(texfontidentifier(f)([^ ]+))]

IMPLEMENTATION Font setup 87

2339 if ligs then2340 for _lig in pairs(ligs) do2341 if lig == _all_ or tonumber(lig) == ch then2342 return false2343 end2344 end2345 end2346 return true2347 -- end2348 end23492350 if luaotfload and luaotfloadletterspace then2351 if luaotfloadletterspacekeepligature then2352 microtypeinfo(overwriting function `keepligaturersquo)2353 end2354 luaotfloadletterspacekeepligature = keepligature2355 end23562357 langluafilerang

1427 Loading the configuration

MTloadlist Recurse through the lists to be loaded2358 langpackagerang2359 defMTloadlist12360 edeftempa12361 MTletcntempbMTMTfeat ctempa load2362 MTifstreqtempatempb2363 MTerrornameuseMTabbrMTfeat list `temparsquo cannot load itself2364 2365 ifxtempbrelax else2366 MTifdefinednTFMTMTfeat ctempb2367 MTvinfo First loading nameuseMTabbrMTfeat list `tempbrsquo2368 begingroup2369 MTloadlisttempb2370 endgroup2371 edefMTcurrlistnamenameuseMTabbrMTfeat list2372 noexpandMessageBreak`tempbrsquo2373 MTletcntempcMTMTfeat ctempb2374 expandafterMTsetcodestempcrelax2375 2376 MTerrornameuseMTabbrMTfeat list `tempbrsquo undefinedMessageBreak2377 Cannot load it from list `temparsquo2378 2379 fi2380 2381

MTfindfile Micro-typographic settings may be written into a file mt-langfont familyrangcfgMTfilelist We must also record whether wersquove already loaded the file

2382 letMTfilelistempty2383 defMTfindfile1

Check for existence of the file only once2384 MTinclist1MTfilelist2385 ifMTinlist else

Donrsquot forget that because reading the files takes place inside a group all commandsthat may be used there have to be defined globally

2386 MTbegincatcodes2387 letMTbegincatcodesrelax2388 letMTendcatcodesrelax2389 InputIfFileExistsmt-1cfg

IMPLEMENTATION Font setup 88

2390 edefMTcurrfilemt-1cfg2391 MTvinfo Loading configuration file MTcurrfile2392 MTxaddMTfilelist12393 2394 MTgetbasefamily1emptyemptyemptynil2395 MTexponenMTinclisttempaMTfilelist2396 ifMTinlist2397 MTxaddMTfilelist12398 else2399 InputIfFileExistsmt-tempacfg2400 edefMTcurrfilemt-tempacfg2401 MTvinfo Loading configuration file MTcurrfile2402 MTxaddMTfilelisttempa12403 2404 MTvinfo No configuration file mt-1cfg2405 MTxaddMTfilelist12406 2407 fi2408 2409 endgroup2410 fi2411

MTcfgcatcodes We have to make sure that all characters have the correct category code Especiallynew lines and spaces should be ignored since files might be loaded in the middleof the document This is basically nfsscatcodes (from the LATEX kernel) Irsquoveadded amp (in tabulars) (french) $ _ ~ and = (Turkish babel)

OK now all printable characters up to 127 are lsquootherrsquo We hope that letters arealways letters and numbers other (listings makes them active see section 1415)

We leave ^ at catcode 7 so that stuff like lsquo^^ffrsquo remains possible2412 defMTcfgcatcodes2413 makeatletter2414 catcode`^72415 catcode` 92416 catcode`^^I92417 catcode`^^M92418 catcode`z2419 catcode`ne2420 catcode`tw2421 catcode`62422 catcode`142423 MTmaptlistn2424 $amprsquo()+-lt=gt[]_`|~2425 makeother2426

MTbegincatcodes This will be used before reading the files as well as in all configuration commandsso that catcodes are also harmless when these commands are used outside theconfiguration files

2427 defMTbegincatcodes2428 begingroup2429 MTcfgcatcodes2430

MTendcatcodes End group if outside configuration file (otherwise relax)2431 letMTendcatcodesendgroup

MTgetbasefamily The family name might have a suffix eg for expert set (x) old style numbers (j)swash capitals (w) etc We mustnrsquot simply remove the last letter as this would makefor instance cms out of cmss and cmsy (OK cmex will still become cme )

We only work on the font name if it is longer than three characters

IMPLEMENTATION Font setup 89

Table 4

Order for matching fontattributes

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Encoding bull bull bull bull bull bull bull bull bull bull bull bull bull bull bull bullFamily bull bull bull bull bull bull bull bull - - - - - - - -Series bull bull bull bull - - - - bull bull bull bull - - - -Shape bull bull - - bull bull - - bull bull - - bull bull - -Size bull - bull - bull - bull - bull - bull - bull - bull -

2432 defMTgetbasefamily1234nil2433 ifxempty42434 deftempa1232435 else2436 lettempaempty2437 edeftempb12342438 expandafterMTgetbasefamilytempbnil2439 fi2440

MTgetbasefamily This will only remove one suffix (the longest match) so that combinations of suffixeswould have be to added manually (eg DeclareMicrotypeVariantsaw) Butotherwise something like lsquopplxrsquo would be truncated to lsquoprsquo

2441 defMTgetbasefamily12nil2442 edeftempatempa12443 ifx2expandaftergobbleelseexpandafterfirstofonefi2444 MTintlist2MTvariants2445 ifMTinlistelseMTgetbasefamily2nilfi2446

MTlistname

MTgetlistname

MTgetlistname

Try all combinations of font family series shape and size to get a list for the currentfont

2447 defMTgetlistname12448 langdebugrangMTdinfonl1trying to find nameuseMTabbr1 list for font `MTfontrsquo2449 letMTlistnameundefined2450 deftempb12451 MTmaptlistcMTtryorderMTgetlistname2452 2453 defMTgetlistname12454 expandafterMTnextlistname12455 ifxMTlistnameundefined else2456 expandafterMTtlistbreak2457 fi2458

MTtryorder Beginning with version 17 we always check for the font size Since the matchingorder has become more logical now it can be described in words so that we donrsquotneed table 4 in the documentation part any longer and can cast it off here

2459 defMTtryorder2460 111111101101110010111010100110002461 011101100101010000110010000100002462

MTnextlistname The current context is added to the font attributes That is the context must match2463 defMTnextlistname12342464 ifnum1=zMTnofamilytruefi2465 edeftempaMTencoding2466 ifnum1=ne MTfamily fi2467 ifnum2=ne MTseries fi2468 ifnum3=ne MTshape fi2469 ifnum4=ne fi2470 MTcontext

IMPLEMENTATION Font setup 90

2471 langdebugrangMTdinfonl1trying tempa2472 MTifdefinednTFMTtempb tempa2473 MTnextlistname42474

Also try with an alias family2475 ifnum1=ne2476 ifxMTfamilyaliasempty else2477 edeftempaMTencoding2478 MTfamilyalias2479 ifnum2=ne MTseriesfi2480 ifnum3=ne MTshapefi2481 ifnum4=ne fi2482 MTcontext2483 langdebugrangMTdinfonl1(alias) tempa2484 MTifdefinednTMTtempb tempa2485 MTnextlistname42486 2487 fi2488 fi2489 2490

MTnextlistname If size is to be evaluated do that otherwise use the current list2491 defMTnextlistname12492 ifnum1=ne2493 MTexpcsMTinrlistMTtempb tempa sizes2494 ifMTinlist2495 letMTlistnameMTsizename2496 fi2497 else2498 MTletcnMTlistnameMTtempb tempa2499 fi2500

MTiflistexists

MTcontext 2501 defMTiflistexists2502 MTletcnMTcontextMTMTfeat context2503 MTifstreqMTcontextletMTcontextemptyrelax2504 MTgetlistnameMTfeat c2505 MTifdefinedcTFMTlistname2506 MTedefnMTMTfeat cnameMTlistname2507 ifMTnonselected2508 MTvinfo Applying non-selected expansion (list `MTlistnamersquo)2509 else2510 MTvinfo Loading nameuseMTabbrMTfeat list `MTlistnamersquo2511 fi2512 firstoftwo2513

Since the name cannot be empty this is a sound proof that no matching listexists

2514 MTletncMTMTfeat cnameempty

Donrsquot warn if selected=false2515 ifMTnonselected2516 MTvinfo Applying non-selected expansion (no list)2517 else

Tracking doesnrsquot require a list either2518 MTifstreqMTfeattrrelax2519 MTwarningI cannot find a nameuseMTabbrMTfeat list2520 for fontMessageBreak`MTfontrsquo2521 ifxMTcontextemptyelsespace(context `MTcontextrsquo)fi2522 Switching offMessageBreaknameuseMTabbrMTfeat for this font

IMPLEMENTATION Font setup 91

2523 2524 fi2525 secondoftwo2526 2527

MTgetinhlist

MTcontext

The inheritance lists are global (no context)2528 defMTgetinhlist2529 letMTcontextempty

2530 MTgetlistnameMTfeat inh2531 MTifdefinedcTFMTlistname2532 MTedefnMTMTfeat inhnameMTlistname2533 langdebugrangMTdinfonl1 Using nameuseMTabbrMTfeat inheritance list2534 langdebugrang `MTlistnamersquo2535 MTletcntempcMTMTfeat inhMTlistname

If the list is empty it has already been parsed2536 ifxtempcempty else2537 langdebugrangMTdinfonl1parsing inheritance list

The group is only required in case an input encoding is given2538 begingroup2539 edefMTcurrlistnameinheritance listnoexpandMessageBreak`MTlistnamersquo2540 MTsetinputencinh2541 expandafterMTinhdotempcrelax2542 MTgletncMTMTfeat inhMTlistnameempty2543 endgroup2544 fi2545 2546 MTletncMTMTfeat inhnameundefined2547 2548

1428 Translating characters into slots

Get the slot number of the character in the current encodingMTgetslot There are lots of possibilities how a character may be specified in the configuration

files which makes translating them into slot numbers quite expensive Also wewant to have this as robust as possible so that the user does not have to solve asphinxrsquos riddle if anything goes wrong

MTchar

MTchar

The character is in tempa we want its slot number in MTchar2549 defMTgetslot2550 escapechar`2551 letMTcharmne2552 MTnoresttrue

Save unexpanded string in case we need to issue a warning message2553 MTtoks=expandaftertempa

It might be an active character ie an 8-bit character defined by inputenc If sowe will expand it here to its LICR form

2554 MTexptwocMTisactivestringtempanil

Now letrsquos walk through (hopefully) all possible cases

bull Itrsquos a letter a character or a number

2555 expandafterMTislettertemparelaxrelax2556 ifnumMTchar lt z

IMPLEMENTATION Font setup 92

bull OK so it must be a macro We do not allow random commands but only thosedefined in LATEXrsquos idiosyncratic font encoding scheme

If langencodingranglangcommandrang (thatrsquos one command) is defined we try to extract theslot number

We must be cautious not to stumble over accented characters consisting of twocommands like lsquoi or UCYRI hence string wouldnrsquot be safe enough

2557 MTifdefinednTFMTencodingMTdetokenizectempa2558 MTissymbol

bull Now wersquoll catch the rest which hopefully is an accented character (eg a)

2559 expandafterMTiscompositetemparelaxrelax2560 ifnumMTchar lt z

bull It could also be a chardefed command (eg the percent character) This seemsthe least likely case so itrsquos last

2561 expandafterMTexptwocexpandafterMTischarexpandafter2562 meaningexpandaftertempaMTcharstringrelaxrelaxrelax2563 fi2564 fi

2565 letMTcharMTchar2566 MTgetslot2567 escapecharmne2568 2569 langpackagerang

MTgetslot

2570 langpdftex-def|luatex-def|xetex-defrang2571 defMTgetslot

If itrsquos a legacy (ie TFM) font proceed as usual2572 langxetex-defrang ifnumXeTeXfonttypeMTfont=z2573 ifnumMTchar gt mne

In LuaTEX it may also be a glyph name prefixed with lsquorsquo2574 langluatex-defrang2575 ifnumMTchar=47relax2576 ifMTnorest else2577 tempcnta=MTlua2578 local glyph = microtypename_to_slot([[expandaftergobbletempa]]true)2579 if glyph then texwrite(glyph)2580 else texwrite(-1)2581 end2582 relax2583 ifnumtempcntaltz2584 MTwarnunknown2585 letMTcharmne2586 else2587 edefMTcharthetempcnta2588 langdebugrangMTdinfonl3gt `theMTtoksrsquo is a glyph name (thetempcnta)2589 fi2590 fi2591 else2592 langluatex-defrang

If the user has specified something like lsquofirsquo or wanted to define a number butforgot to use three digits wersquoll have something left of the string In this case weissue a warning and forget the complete string

2593 ifMTnorest else

IMPLEMENTATION Font setup 93

2594 MTwarnrest2595 langpdftex-def|luatex-defrang letMTcharmne2596 langxetex-defrang letMTcharempty2597 fi2598 langluatex-defrang fi2599 else2600 MTwarnunknown2601 langxetex-defrang letMTcharempty2602 fi2603 langxetex-defrang2604 else

There are more possibilities for XETEX It may also be a glyph name (prefixedwith lsquorsquo) We indicate this to MTgetcharwd by reversing the sign of MTchar

2605 ifnumMTchar=47relax2606 ifMTnorest edefMTcharU472607 else2608 tempcnta=XeTeXglyphindexexpandaftergobbletemparelax2609 ifnumtempcnta=z2610 MTwarnunknown2611 letMTcharempty2612 else2613 edefMTchartempaspace2614 edefMTchar-thetempcnta2615 langdebugrangMTdinfonl3gt `theMTtoksrsquo is a glyph name (thetempcnta)2616 fi2617 fi2618 else2619 ifnumMTchar gt mne2620 ifMTnorest

Or itrsquos a Unicode number which we mustnrsquot translate into a glyph number sincethe latter is font-specific

2621 tempcnta=XeTeXcharglyphMTcharrelax2622 ifnumtempcnta=z2623 MTinfomissingchar2624 letMTcharempty2625 else2626 langdebugrangMTdinfonl3gt (glyph number thetempcnta2627 langdebugrang glyph name XeTeXglyphnameMTfonttempcnta)2628 edefMTcharUMTchar2629 fi2630 else2631 MTwarnrest2632 letMTcharempty2633 fi2634 else2635 MTwarnunknown2636 letMTcharempty2637 fi2638 fi2639 fi2640 langxetex-defrang2641 2642 langpdftex-def|luatex-def|xetex-defrang

This is the lua function to translate glyph name into slot number Beginning withv22 luaotfload provides this function in an API which we use if available but(for now at least) keep the old code for backward compatibility

2643 langluafilerang2644 if luaotfload and luaotfloadaux and luaotfloadauxslot_of_name then2645 local slot_of_name = luaotfloadauxslot_of_name2646 microtypename_to_slot = function(name unsafe)2647 return slot_of_name(fontcurrent() name unsafe)

IMPLEMENTATION Font setup 94

2648 end2649 else2650 -- we dig into internal structure (should be avoided)2651 local function name_to_slot(name unsafe)2652 if fonts then2653 local unicodes2654 if fontsids then -- legacy luaotfload2655 local tfmdata = fontsids[fontcurrent()]2656 if not tfmdata then return end2657 unicodes = tfmdatasharedotfdataluatexunicodes2658 else -- new location2659 local tfmdata = fontshashesidentifiers[fontcurrent()]2660 if not tfmdata then return end2661 unicodes = tfmdataresourcesunicodes2662 end2663 local unicode = unicodes[name]2664 if unicode then -- does the rsquoorrsquo branch actually exist2665 return type(unicode) == number and unicode or unicode[1]2666 end2667 end2668 end2669 microtypename_to_slot = name_to_slot2670 end26712672 langluafilerang

MTisletter Input is a letter a character or a numberMTmaxchar

MTmaxslot

Warning if resulting character or slot number is too large2673 langpdftex-def|luatex-def|xetex-defrang2674 defMTmaxchar2675 langpdftex-defrang 127 2676 langluatex-def|xetex-defrang 1114111 2677 defMTmaxslot2678 langpdftex-defrang 255 2679 langluatex-def|xetex-defrang 1114111 2680 langpdftex-def|luatex-def|xetex-defrang

ifMTnorest Test whether all of the string has been used up2681 langpackagerang2682 newififMTnorest

2683 defMTisletter12relax2684 ifcat anoexpand1relax2685 edefMTcharnumber`12686 ifx22687 langdebugrangMTdinfonl3gt `theMTtoksrsquo is a letter (MTchar)2688 else2689 MTnorestfalse2690 fi2691 else2692 ifcat noexpand1relax2693 edefMTcharnumber`12694 langdebugrangMTdinfonl3gt `theMTtoksrsquo is a character (MTchar)2695 ifx22696 ifnumMTchar gt MTmaxchar MTwarnascii fi2697 else2698 MTnorestfalse2699 expandafterMTisnumber12relaxrelax2700 fi2701 fi2702 fi2703

MTisnumber Numbers may be specified as a three-digit decimal number (029) as a hexadecimalnumber (prefixed with 1D) or as a octal number (prefixed with rsquo rsquo35) They

IMPLEMENTATION Font setup 95

must consist of at least three characters (including the prefix) that is F is notpermitted

2704 defMTisnumber123relax2705 ifxrelax3relax else2706 ifxrelax2relax else2707 MTnoresttrue2708 if1relax2709 defxuppercaseedefMTcharnumber123x2710 langdebugrangMTdinfonl3gt a hexadecimal number MTchar2711 else2712 if1rsquorelax2713 defMTcharnumber1232714 langdebugrangMTdinfonl3gt an octal number MTchar2715 else2716 MTifint1232717 defMTcharnumber1232718 langdebugrangMTdinfonl3gt a decimal number MTchar2719 MTnorestfalse2720 fi2721 fi2722 ifnumMTchar gt MTmaxslot2723 MTwarnnumbertoolargenoexpand1noexpand2noexpand32724 letMTcharmne2725 fi2726 fi2727 fi2728

MTisactive Expand an active character (This was completely broken in v17 and only workedby chance before) We setdisplayprotect to translate eg Auml into A that isto whatever it is defined in the inputenc encoding file

Unfortunately the (older) inputenc definitions prefer the protectedgenericvariants (eg copyright instead of textcopyright) which our parser wonrsquotbe able to understand (Irsquom fed up now so you have to complain if you reallyreally want to be able to write lsquocopyrsquo instead of textcopyright thus rendering yourconfiguration files unportable)

Unicode characters (inputencutf8utf8x) are also supported2729 defMTisactive12nil2730 ifnumcatcode`1 = active2731 begingroup2732 setdisplayprotect2733 letIeCfirstofone2734 letinpencundefinedMTundefinedchar

Unicode handling has changed again with LATEX 201910012735 letUTFtwooctetsnoexpandempty2736 letUTFthreeoctetsnoexpandempty2737 letUTFfouroctetsnoexpandempty

We refrain from checking whether there is a sufficient number of octets2738 defUTFviiidefined1ifx 1relax2739 MTundefinedcharutf8elseexpandafter 1fi

For ucs (utf8x) Letrsquos call it experimental 2740 MTifdefinedcTPrerenderUnicode2741 PrerenderUnicodetempaletunicodecharfilterfirstofone

The expandafter hocus-pocus should please newunicodechar2742 edefxendgroup2743 defnoexpandtempaexpandafterexpandafterexpandafteremptytempa

Append what we think the translation is to the token register we use for the log

IMPLEMENTATION Font setup 96

2744 MTtoks=theMTtoksspace(=2745 expandafterexpandafterexpandafteremptytempa)2746 2747 x2748 fi2749

MTundefinedchar For characters not defined in the current input encoding2750 defMTundefinedchar1undefined in input encoding ``1rsquorsquo

MTissymbol The symbol commands might expand to funny stuff depending on context Insteadof simply expanding langcommandrang we construct the command langencodingranglangcommandrangand see whether its meaning is charlanghex numberrang which is the case for everythingthat has been defined with DeclareTextSymbol in the encoding definition files

2751 defMTissymbol2752 expandafterdefexpandafterMTcharexpandafter2753 csnameMTencodingMTdetokenizectempaendcsname

Since recently some glyphs are defined optionally in LATEX by checking if the glyphactually exists in the font (eg textasteriskcentered)

2754 expandafterexpandafterexpandafter2755 MTisoptcharMTchariffontcharcharelsefirelax2756 expandafterMTexptwocexpandafterMTischarexpandafter2757 meaningexpandafterMTcharMTcharstringrelaxrelaxrelax2758 ifnumMTchar lt z

In TU encoding some commands (currently textquotesingle textasciigraveand textquotedbl) are defined by means of the auxiliary macro removetligwhich we take care of here

2759 expandafterexpandafterexpandafterMTistligMTcharrelaxrelax2760 ifnumMTchar lt z

Finally if it hasnrsquot been defined by DeclareTextSymbol it could be a letter (egi when using frenchpro)

2761 expandafterexpandafterexpandafterMTisletterMTcharrelaxrelax2762 fi2763 fi2764

MTisoptchar This seems adventurous but wersquore only redefining the text command within thescope of our setup

2765 defMTisoptchar1iffontchar2char3else4firelax2766 ifx12767 iffontchar22768 expandafterchardef2769 csnameMTencodingMTdetokenizectempaendcsname=3relax2770 fi2771 fi2772

MTischar

MTcharstring

A helper macro that inspects the meaning of its argument2773 begingroup2774 catcode`=z

2775 MTmaptlistnCHARLEXmakeother2776 lowercase2777 defxendgroup2778 defMTcharstringCHAR2779 defMTischar1CHAR234relax2780 ifxrelax4relax2781 ifMTxunicode2782 expandafterMTischarxMTstripprefix1gtrelaxCHAR 2783 relaxrelaxrelaxrelaxrelax

IMPLEMENTATION Font setup 97

2784 fi2785 else2786 ifxrelax1relax2787 if3relax2788 edefMTcharnumber22789 MTifstreqMTcharstring34relaxMTnorestfalse2790 else2791 edefMTcharnumber232792 MTifstreqMTcharstring4relax2793 MTisxchar23|4CHARrelax2794 fi2795 langdebugrang MTdinfonl3gt `theMTtoksrsquo is a char (MTchar)2796 fi2797 fi2798

MTisxchar With fontspecrsquos TU encoding glyph numbers may be up to four digits2799 defMTisxchar1|2CHAR34relax2800 MTifstreqMTcharstring342801 edefMTcharnumber12MTnorestfalse2802

MTcharxstring

MTstripprefix

MTischarx

For xunicode which doesnrsquot countdef but rather defs the chars2803 defMTcharxstringCHAR 2804 defMTstripprefix1gt2relax22805 defMTischarx1CHAR 23456relax2806 ifxrelax1relax2807 ifxrelax6relaxelse2808 edefMTcharnumber23452809 MTifstreqRELAX gtCHAR 6relaxMTnorestfalse2810 langdebugrang MTdinfonl3gt `theMTtoksrsquo is a xunicode char (MTchar)2811 fi2812 fi2813 2814 2815 2816 x

MTistlig This might have to change again with the next LATEX release or so I feared butit still seems to be fine

2817 defMTistlig12relax2818 ifxremovetlig12819 langdebugrang MTdinfonl3gt `theMTtoksrsquo (removing removetlig)2820 MTremovetlig2821 fi2822

MTremovetlig We remove the removetlig command and only pass on the number2823 defMTremovetlig2824 expandafterMTexptwocexpandafterMTisnumber2825 expandaftersecondoftwoMTcharrelaxrelax2826

MTiscomposite Here we are dealing with accented characters specified as two tokens2827 defMTiscomposite12relax2828 ifx2else

Again we construct a control sequence this time of the form langencodingranglangaccentrang-langcharacterrang eg T1-a which we then expand once to see if it is aletter (if it has been defined by DeclareTextComposite) This should be robustfinally especially since we also detokenize the input instead of only stringifyingit Thus we will die gracefully even on wrong Unicode input without utf8

2829 expandafterdefexpandafterMTcharexpandaftercsnameexpandafter

IMPLEMENTATION Font setup 98

2830 stringcsnameMTencodingendcsname2831 MTdetokenizen1-MTdetokenizen2endcsname

In 2017 LATEX introduced a new way of declaring accented Unicode commands(DeclareUnicodeComposite) which we take care of here (UnicodeEncodingNamehas been introduced at the same time)

2832 ifxUnicodeEncodingNameundefinedelse2833 expandafterexpandafterexpandafter2834 MTisunicompMTchariffontcharelsefirelax2835 fi2836 expandafterexpandafterexpandafterMTisletterMTcharrelaxrelax

Again xunicode2837 ifnumMTchar lt z2838 ifMTxunicode2839 edefMTcharMTexptwocMTstripprefixmeaningMTchargtrelax2840 expandafterMTexptwocexpandafterMTischarxexpandafter2841 MTcharMTcharxstringrelaxrelaxrelaxrelaxrelax2842 fi2843 fi2844 fi2845

MTisunicomp Helper for DeclareUnicodeComposite2846 defMTisunicomp1iffontchar2else3firelax2847 ifx1edefMTchariffontchar2fifi2848

[What about math Well for a moment the following looked like a solution withmtismathchar defined accordingly analogous to MTischar above to pick upthe last two tokens (the meaning of a mathchardefrsquoed command expands to itshexadecimal notation)

defMTismathchar1 ifrelaxnoexpand1 its a macro letx1 else its a character mathchardefx=mathcode`1relax fi expandafterMTexptwocexpandaftermtismathcharexpandafter meaningexpandafterxmtmathcharstringrelaxrelaxrelax

However the problem is that mathcodes and mathchardefs have global scopeTherefore if they are changed by a package that loads different math fonts thereis no guarantee whatsoever that things will still be correct (eg the minus in cmsywhen the euler package is loaded) So no way to go unfortunately]

Some warning messages for performance reasons separated hereMTcurrlistname

MTsetlistname

The type and name of the current list defined at various places2849 defMTsetlistname2850 edefMTcurrlistnamenameuseMTabbrMTfeat listnoexpandMessageBreak2851 `nameuseMTMTfeat cnamersquo2852

MTwarnascii For lsquootherrsquo characters gt 127 we issue a warning (inputenc probably hasnrsquot beenloaded) since correspondence with the slot numbers would be purely coincidental

2853 defMTwarnascii2854 MTwarningnlCharacter `theMTtoksrsquo (= MTchar)2855 is outside of ASCII rangeMessageBreak2856 You must load the `inputencrsquo package before usingMessageBreak2857 8-bit characters in MTcurrlistname2858

IMPLEMENTATION Font setup 99

MTwarnnumbertoolarge Number too large2859 defMTwarnnumbertoolarge12860 MTwarningnl2861 Number 1 in encoding `MTencodingrsquo too largeMessageBreak2862 Ignoring it in MTcurrlistname2863

MTwarnrest Not all of the string has been parsed2864 defMTwarnrest2865 MTwarningnl2866 Unknown slot number of characterMessageBreak`theMTtoksrsquo2867 MTwarnmaybeinputencMessageBreak2868 in font encoding `MTencodingrsquoMessageBreak2869 Make sure itrsquos a single characterMessageBreak2870 (or a number) in MTcurrlistname2871

MTwarnunknown No idea what went wrong2872 defMTwarnunknown2873 MTwarningnl2874 Unknown slot number of characterMessageBreak`theMTtoksrsquo2875 MTwarnmaybeinputencMessageBreak2876 in font encoding `MTencodingrsquo in MTcurrlistname2877

MTwarnmaybeinputenc In case an input encoding had been requested2878 defMTwarnmaybeinputenc2879 MTifdefinednT2880 MTMTfeat MTcat csname MTMTfeat MTcat nameendcsname inputenc2881 (input encoding `nameuse2882 MTMTfeat MTcat csname MTMTfeat MTcat nameendcsname inputencrsquo)2883

1429 Hook into LATEXrsquos font selection

We append MTsetupfont to pickupfont which is called by LATEX every time afont is selected We then check whether wersquove already seen this font and if notset it up for micro-typography This ensures that we will catch all fonts and thatwe will not set up fonts more than once The whole package really hangs on thiscommand

In contrast to the pdfcprot package it is not necessary to declare in advancewhich fonts should benefit from micro-typographic treatment Also only thosefonts that are actually being used will be set up

For my reference

bull pickupfont is called by selectfont wrongfontshape orgetanddefinefonts (for math)

bull pickupfont calls definenewfont

bull definenewfont may call (inside a group)

ndash wrongfontshape which in turn will call pickupfont and thusdefinenewfont again or

ndash extractfont

bull getexternalfont is called by extractfont by itself and by the substitutionmacros

IMPLEMENTATION Font setup 100

Up to version 13 of this package we were using definenewfont as the hookwhich is only called for new fonts and therefore seemed the natural choice How-ever this meant that we had to take special care to catch all fonts we additionallyhad to set up the default font the error font (if it wasnrsquot the default font) we hadto check for some packages that might have been loaded before microtype andwere loading fonts eg jurabib ledmac pifont (loaded by hyperref) tipa andprobably many more Furthermore we had to include a hack for the IEEEtran classwhich loads all fonts in the class file itself (to fine tune inter-word spacing) andthe memoir class too To cut this short it seemed to get out of hand and I decidedthat it would be better to use pickupfont and decide for ourselves whether wersquovealready seen that font I hope the overhead isnrsquot too large

MTfontlist

MTfont

We use a comma separated list2884 letMTfontlistempty2885 letMTfontempty

All this is done at the beginning of the document It doesnrsquot work for plain ofcourse which doesnrsquot have pickupfont

2886 langpackagerang2887 langpackage|letterspacerang2888 langplainrangMTrequireslatex22889 MTaddtosetup

MTorigpickupfont The luatexja package redefines char which will upset our parsing of text symbolsand commands instead of fixing this we wonrsquot bother at least for the moment butsimply issue a warning and disable all further warnings The fix is left to the user bynot specifying any text commands but only (Unicode) letters The xeCJK packageor rather its xunicode-addon also modifies the way text symbols are defined (likeluatexja but in a different way) Again we only issue a warning

2890 langpackagerang MTwithpackageTluatexjaMTwarnunknownonceluatexja2891 langpackagerang MTwithpackageTxeCJK MTwarnunknownoncexeCJK

microtype also works with CJK in the sense that nothing will break when bothpackages are used at the same time However since CJK has its own way of encodingit is currently not possible to create character-specific settings That is the onlyfeature available with CJK fonts is (non-selected) expansion (Tracking doesnrsquotreally work for other reasons) Like us CJK redefines pickupfont

2892 ifpackageloadedCJK

The xeCJK package in turn pretends that CJK was loaded but does not changethe definition of pickupfont With xeCJK protrusion should be possible also forCJK characters I havenrsquot tried it though

2893 ifpackageloadedxeCJKfirstofone2894 ifpackagelaterCJK20061017 4702895 defMTorigpickupfontCJKifundefinedCJKplane2896 defMTorigpickupfontifundefinedCJKplane2897 gaddtomacroMTorigpickupfont2898 expandafterifxfontnamerelaxdefinenewfontfi

CJKutf8 redefines pickupfont once more (recent versions in PDF mode asdetermined by ifpdf which CJKutf8 loads)

2899 ifpackageloadedCJKutf82900 ifpackagelaterCJKutf820080522 4802901 ifpdfexpandaftersecondoftwoelseexpandafterfirstoftwofi2902 firstoftwo2903 firstoftwo2904 gaddtomacroMTorigpickupfont2905 expandafterifxcsnamecurrfontshapefsizeCJKplaneendcsnamerelax

IMPLEMENTATION Font setup 101

2906 definenewfontelsexdeffontname2907 csname currfontshapefsizeCJKplaneendcsnamefi2908 gaddtomacroMTorigpickupfont2909 expandafterifxcsname currfontshapefsizeCJKplaneendcsnamerelax2910 definenewfontdefCJKtempv2911 ifxCJKtempCJKplane2912 expandafterifxcsname CJKcmapffamilyCJKplaneendcsnamerelax2913 elsecsname CJKcmapffamilyCJKplaneendcsnamefi2914 else CJKaddcmapCJKplane fi2915 elsexdeffontname2916 csname currfontshapefsizeCJKplaneendcsnamefi2917 gobble2918 2919 firstofone

This is the normal LATEX definition2920 defMTorigpickupfontexpandafterifxfontnamerelaxdefinenewfontfi

Check whether pickupfont is defined as expected The warning issued byCheckCommand would be a bit too generic

2921 ifxpickupfontMTorigpickupfont else2922 MTwarningnl2923 Command stringpickupfontspace is not defined as expected2924 MessageBreak Patching it anyway Some things may break2925 langpackagerang2926 MessageBreak Double-check whether micro-typography is indeed2927 MessageBreak applied to the document2928 MessageBreak (Hint Turn on `verbosersquo mode)2929 langpackagerang2930 2931 fi

pickupfont Then we append our stuff Everything is done inside a group2932 gaddtomacropickupfontbegingroup

If the trace package is loaded we turn off tracing of microtypersquos setup which isextremely noisy

2933 MTwithpackageTtracegaddtomacropickupfontconditionallytraceoff2934 gaddtomacropickupfont2935 escapecharmne2936 langpackagerang2937 langdebugrang globalMTinannottrue2938 langdebugrang MTgletMTpdfannotempty2939 langdebugrang MTaddtoannot(line numberinputlineno)

If MTfont is empty no substitution has taken place hence fontname is correctOtherwise if they are different fontname does not describe the font actuallyused This test will catch first order substitutions like bx to b but it will still fail ifthe substituting font is itself substituted

2940 MTletcnMTfontMTsubstexpandafterstringfontname2941 ifxMTfontrelax2942 letMTfontfontname2943 else2944 ifxMTfontfontname else2945 langdebugrang MTaddtoannot= substituted with MTfont2946 MTregistersubstfont2947 fi2948 fi2949 MTsetupfont2950 langpackagerang2951 langletterspacerang MTtracking2952 endgroup2953 2954 langpackagerang

IMPLEMENTATION Font setup 102

MTpickupfont

MTMTpickupfont

MTltxpickupfont

Remember the patched command because we may have to disable ourselves incertain situations

2955 letMTpickupfontpickupfont2956 defMTMTpickupfont letpickupfontMTpickupfont2957 defMTltxpickupfontletpickupfontMTorigpickupfont

dosubstcorrection Additionally we hook into dosubstcorrection which is called if a substitutionhas taken place to record the name of the ersatz font Unfortunately this will onlywork for one-level substitutions We have to remember the substitute for the rest ofthe document not just for the first time it is called since we need it every time afont is letterspaced

2958 gaddtomacrodosubstcorrection2959 edefMTfontcsnamecurrfontshapefsizeendcsname2960 MTgletncMTsubstexpandafterstringfontnameMTfont

addaccent

MTorigaddaccent

Inside addaccent we have to disable microtypersquos setup since the grouping inthe patched pickupfont would break the accent if different fonts are used forthe base character and the accent Fortunately LATEX takes care that the fonts usedfor the accent are already set up so that we cannot be overlooking them

2961 letMTorigaddaccentaddaccent2962 defaddaccent122963 MTltxpickupfont2964 MTorigaddaccent122965 MTMTpickupfont2966 2967 langpackagerang2968 2969 langplainrangrelax2970 langpackagerang

Consequently (if all goes well) we are the last ones to change these commandstherefore there is no need to check whether our definition has survived

MTcheckfont Check whether wersquove already seen the current font2971 defMTcheckfontMTexponenMTinclistMTfontMTfontlist

MTregisterfont Register the current font2972 defMTregisterfontxdefMTfontlistMTfontlistMTfont

MTregistersubstfont Register the substituted font (only if it isnrsquot registered already) Additionally wehave to remove the substitute font from the list of fonts so that we set it up again

2973 defMTregistersubstfont2974 MTexponenMTinclistfontnameMTfontlist2975 ifMTinlistelse2976 xdefMTfontlistMTfontlistfontname2977 expandafterMTremfromclistMTfontMTfontlist2978 fi2979

14210 Context-sensitive setup

Here are the variants for context-sensitive setupMTactivefeatures The activated features are stored in this command

2980 letMTactivefeaturesempty

MTcheckfontcx Every feature has its own list of fonts that have already been dealt with If thefont neednrsquot be set up for a feature we temporarily disable the correspondingsetup command This should be more efficient than book-keeping the fonts in listsassociated with the combination of contexts as wersquove done it before

IMPLEMENTATION Font setup 103

2981 defMTcheckfontcx2982 MTiftrue2983 MTmapclistcMTactivefeatures2984 expandafterMTexponenexpandafterMTinclistexpandafterMTfont2985 csname MT1csname MT1contextendcsname fontlistendcsname2986 ifMTinlist2987 MTletncMTnameuseMTabbr1relax2988 else2989 MTiffalse2990 fi2991 2992 ifMTif MTinlisttrue else MTinlistfalse fi2993

MTregistersubstfontcx Add the substituted font to each feature list and possibly remove substitute font2994 defMTregistersubstfontcx2995 MTmapclistcMTactivefeatures2996 expandafterMTexponenexpandafterMTinclistexpandafterfontname2997 csname MT1csname MT1contextendcsname fontlistendcsname2998 ifMTinlist else2999 MTexpcsMTxadd3000 MT1csname MT1contextendcsname fontlist3001 fontname3002 expandafterMTexponenexpandafterMTremfromclistexpandafterMTfont3003 csname MT1csname MT1contextendcsname fontlistendcsname3004 fi3005 3006

MTregisterfontcx For each feature add the current font to the list unless we didnrsquot set it up3007 defMTregisterfontcx3008 MTmapclistcMTactivefeatures3009 MTexpcsifxMTnameuseMTabbr1relaxelse3010 MTexpcsMTxadd3011 MT1csname MT1contextendcsname fontlist3012 MTfont3013 deftempa13014 MTexpcsMTmaptlistcMT1doccontextsMTmayberemfromlist3015 fi3016 3017

MTmayberemfromlist Recurse through all context font lists of the document and remove the font unlessitrsquos the current context

3018 defMTmayberemfromlist13019 MTifstreqtempa1tempacsname MTtempa contextendcsnamerelax3020 expandafterMTexponenexpandafterMTremfromclistexpandafter3021 MTfont csname MTtempa 1fontlistendcsname3022 3023

microtypecontext

MTmicrotypecontext

The user may change the context so that different setups are possible This isespecially useful for multi-lingual documents

Inside the preamble this command shouldnrsquot actually do anything but remem-ber itself for later

3024 defmicrotypecontextMTbegincatcodesMTmicrotypecontext3025 defMTmicrotypecontext1MTendcatcodesMTaddtosetupmicrotypecontext13026 MTaddtosetup3027 DeclareRobustCommandmicrotypecontext3028 MTbegincatcodes3029 MTmicrotypecontext3030 3031 defMTmicrotypecontext13032 MTendcatcodes

IMPLEMENTATION Font setup 104

3033 MTsetupcontexts3034 letMTresetcontextrelax

We need to ensure that math fonts are set up anew3035 MTgletglbcurrsizeempty3036 setkeysMTC13037 selectfont3038 MTresetcontext3039 3040

textmicrotypecontext

MTtextmicrotypecontext

MTtextmicrotypecontext

This is just a wrapper around microtypecontext3041 DeclareRobustCommandtextmicrotypecontextMTbegincatcodesMTtextmicrotypecontext3042 defMTtextmicrotypecontext1MTendcatcodesMTtextmicrotypecontext13043 defMTtextmicrotypecontext12microtypecontext12

MTresetcontext

MTresetcontext

We have to reset the font at the end of the group provided there actually was achange

3044 defMTresetcontext3045 MTvinfoltltlt Resetting contextsonline3046 langdebugrang MessageBreak= MTprcontextMTexcontext3047 langdebugrang MTtrcontextMTkncontextMTspcontext3048 3049 selectfont3050

MTsetupcontexts The first time microtypecontext is called we initialise the context lists andredefine the commands used in pickupfont

3051 defMTsetupcontexts3052 MTmapclistcMTactivefeatures3053 MTgletncMT1fontlistMTfontlist3054 MTgletMTcheckfontMTcheckfontcx3055 MTgletMTregisterfontMTregisterfontcx3056 MTgletMTregistersubstfontMTregistersubstfontcx3057 MTgletMTsetupcontextsrelax3058

Define context keys3059 MTmapclistcMTfeatureslong3060 definekeyMTC1[]3061 edeftempbnameuseMTrbba13062 MTexponenMTinclisttempbMTactivefeatures3063 ifMTinlist

Using an empty context is only asking for trouble therefore we choose the lsquorsquoinstead (hoping for the LATEX usersrsquo natural awe of this character)

3064 MTifempty1defMTvaldefMTval13065 MTexpcsifxMTtempb contextMTval3066 langdebugrangMTdinfo1gtgtgt no change of 1 context `MTvalrsquo3067 else3068 MTvinfogtgtgt Changing 1 context to `MTvalrsquoMessageBreakonline3069 langdebugrang space(previous `nameuseMTtempb contextrsquo)3070 3071 defMTresetcontextaftergroupMTresetcontext

The next time we see the font we have to reset all factors3072 MTgletnnMTresettempb codesMTresettempb codes

We must also keep track of all contexts in the document3073 expandafterMTexponenexpandafterMTintlistexpandafter3074 MTval csname MTtempb doccontextsendcsname3075 ifMTinlist else3076 MTexpcsMTxaddMTtempb doccontextsMTval3077 langdebugrang MTdinfo1||| added 1 context nameuseMTtempb doccontexts

IMPLEMENTATION Configuration 105

3078 fi3079 MTedefnMTtempb contextMTval3080 fi3081 fi3082 3083

We also allow the activate shortcut3084 definekeyMTCactivate[]3085 setkeysMTCprotrusion=13086 setkeysMTCexpansion=13087

MTprcontext

MTexcontext

MTtrcontext

MTspcontext

MTkncontext

MTprdoccontexts

MTexdoccontexts

MTtrdoccontexts

MTspdoccontexts

MTkndoccontexts

MTextracontext

Initialise the contexts3088 MTexponenMTmapclistnMTfeaturesnl3089 MTdefnMT1context3090 MTdefnMT1doccontexts3091 3092 letMTextracontextempty

143 Configuration1431 Font sets

DeclareMicrotypeSet

DeclareMicrotypeSet

Calling this macro will create a comma list for every font attribute of the formMTlangfeatureranglistlangattributeranglangset namerang If the optional argument is empty lists forall available features will be created

The third argument must be a list of key=value pairs If a font attribute is notspecified we define the corresponding list to relax so that it does not constitutea constraint

3093 defDeclareMicrotypeSet3094 MTbegincatcodes3095 ifstar3096 MTDeclareSetAndUseIt3097 MTDeclareSet3098

MTDeclareSet

3099 newcommandMTDeclareSet[3][]3100 MTifempty13101 MTmapclistcMTfeaturesMTdeclaresets1233102 3103 MTmapclistn13104 MTifempty1relax3105 MTisfeature1set declaration `2rsquo3106 MTexponenMTdeclaresets3107 csname MTrbba1endcsname233108 3109 3110 3111 3112 MTendcatcodes3113

MTDeclareSetAndUseIt

3114 newcommandMTDeclareSetAndUseIt[3][]3115 MTDeclareSet[1]233116 UseMicrotypeSet[1]23117

MTcurrsetname We need to remember the name of the set currently being declared3118 letMTcurrsetnameempty

IMPLEMENTATION Configuration 106

MTdeclaresets Define the current set name and parse the keys3119 defMTdeclaresets1233120 defMTcurrsetname23121 MTifdefinednTMT1setMTcurrsetname3122 MTwarningRedefining nameuseMTabbr1 set `MTcurrsetnamersquo3123 MTmapclistnfontencodingfamilyseriesshapesize3124 MTgletncMT1list1MTcurrsetnameundefined3125 3126 3127 MTgletncMT1setMTcurrsetnameempty3128 langdebugrangMTdinfo1declaring nameuseMTabbr1 set `MTcurrsetnamersquo3129 setkeysMT1set33130

MTdefinesetkey lang1rang = font axis lang2rang = feature3131 defMTdefinesetkey123132 definekeyMT2set1[]3133 MTgletncMT2list1MTcurrsetnameempty3134 MTmapclistn13135 KVspdefMTval13136 MTgethighlevel1

We do not add the expanded value to the list 3137 MTexptwongaddtomacro3138 csname MT2list1MTcurrsetnameexpandafterendcsname3139 MTval3140

but keep in mind that the list has to be expanded at the end of the preamble3141 expandaftergaddtomacroexpandafterMTfontsets3142 csname MT2list1MTcurrsetnameendcsname3143 langdebugrangMTdinfonl1-- 1 nameuseMT2list1MTcurrsetname3144 3145

MTgethighlevel Saying for instance lsquofamily=rmrsquo or lsquoshape=bfrsquo will expand to rmdefault respbfdefault

3146 defMTgethighlevel13147 expandafterMTtestastMTvalnilrelax

And lsquofamily = rsquo will become familydefault3148 MTifemptytempadeftempa1relax

Test whether the command is actually defined3149 MTifdefinednTFtempa default3150 edefMTvalexpandafternoexpandcsname tempa defaultendcsname3151 MTwarning`backslashchartempa defaultrsquo is not a defined commandMessageBreak3152 Ignoring `1 = temparsquo in font setMessageBreak`MTcurrsetnamersquo3153 letMTvalempty

In contrast to earlier versions these values will not be expanded immediately butat the end of the preamble

3154 3155

MTtestast It the last character is an asterisk execute the second argument otherwise the firstone

3156 defMTtestast12nil3157 deftempa13158 MTifempty23159

MTfontsets

MTfixfontset

Fully expand the font specification and fix catcodes for all font sets Also remove

IMPLEMENTATION Configuration 107

fontspecrsquos counters3160 letMTfontsetsempty3161 defMTfixfontset13162 MTifdefinedcT13163 xdef113164 ifMTfontspec3165 xdef1expandafterMTscrubfeatures1()relax3166 fi3167 globalonelevelsanitize13168 3169

MTdefinesetkeysize size requires special treatment3170 defMTdefinesetkeysize13171 definekeyMT1setsize[]3172 MTmapclistn13173 defMTval13174 expandafterMTgetrangeMTval--nil3175 ifxMTvalrelax else3176 MTexpcsMTxadd3177 MT1listsizeMTcurrsetname3178 MTlowerMTupperrelax3179 fi3180 3181 langdebugrangMTdinfonl1-- size nameuseMT1listsizeMTcurrsetname3182 3183

Font sizes may also be specified as ranges This has been requested by AndreasBuumlhmann who has also offered valuable help in implementing this Now it is forinstance possible to set up different lists for fonts with optical sizes (The MinionProproject does this for the OpenType version of Adobersquos Minion (Available from CTANat pkgminionpro))

MTgetrange

MTupper

MTlower

Ranges will be stored as triplets of langlower boundranglangupper boundranglanglist namerangFor simple sizes the upper boundary is minus1

3184 defMTgetrange1-2-3nil3185 MTifempty13186 MTifempty23187 letMTvalrelax3188 3189 defMTlower03190 defMTval23191 MTgetsize3192 edefMTupperMTval3193 3194 3195 defMTval13196 MTgetsize3197 ifxMTvalrelax else3198 edefMTlowerMTval3199 MTifempty23200 MTifempty33201 defMTupper-1

2048 pt is TEXrsquos maximum font size3202 defMTupper20483203 3204 defMTval23205 MTgetsize3206 ifxMTvalrelax else3207 MTifdimMTlowergtMTval3208 MTerror3209 Invalid size range (MTlowerspace gt MTval) in font set

IMPLEMENTATION Configuration 108

3210 `MTcurrsetnamersquoMessageBreak Swapping sizes3211 edefMTupperMTlower3212 edefMTlowerMTval3213 3214 edefMTupperMTval3215 3216 MTifdimMTlower=MTupper3217 defMTupper-13218 relax3219 fi3220 3221 fi3222 3223

MTgetsize Translate a size selection command and normalise it3224 defMTgetsize

A single star would mean sizedefault which doesnrsquot exist so we define it to benormalsize

3225 ifMTvalrelax3226 deftempanormalsize3227 else3228 MTletcntempaMTval3229 fi3230 ifxtemparelaxelse3231 MTgetsize3232 fi

Test whether we finally got a number or dimension so that we can strip the lsquoptrsquo(defaultunits and strippt are kernel macros)

3233 MTifdimenMTval3234 defaultunitstempdimaMTval ptrelaxnnil3235 edefMTvalstrippttempdima3236 3237 MTwarningCould not parse font size `MTvalrsquoMessageBreak3238 in font set `MTcurrsetnamersquo3239 letMTvalrelax3240 3241

MTgetsize

MTgetsize

The relsize solution of parsing setfontsize does not work with the AMSclasses among others I hope my hijacking doesnrsquot do any harm We redefinesetfontsize instead of setfontsize because some classes might define thesize selection commands by simply using fontsize (eg the a0poster class)

3242 defMTgetsize3243 begingroup3244 defsetfontsize1234nilendgroupdefMTval23245 tempanil3246

The svjour3 class defines the size commands using conditionals using e-TEXprimitives we close any leftovers here

3247 ^^Xifclassloadedsvjour33248 ^^X defMTgetsize3249 ^^X tempcnta=currentiflevel3250 ^^X MTgetsize3251 ^^X MTloop3252 ^^X ifnumnumexprcurrentiflevel-1gttempcnta3253 ^^X csname fiendcsname3254 ^^X MTrepeat3255 ^^X 3256 ^^X

IMPLEMENTATION Configuration 109

3257 letMTgetsizeMTgetsize3258 ^^X

MTdefinesetkeyfont

3259 defMTdefinesetkeyfont13260 definekeyMT1setfont[]3261 MTgletncMT1listfontMTcurrsetnameempty3262 MTmapclistn13263 defMTval13264 MTifstreqMTvaldefMTvalrelax3265 expandafterMTgetfontMTvalnil3266 MTexptwongaddtomacro3267 csname MT1listfontMTcurrsetnameexpandafterendcsname3268 MTval3269 3270 expandaftergaddtomacroexpandafterMTfontsets3271 csname MT1listfontMTcurrsetnameendcsname3272 langdebugrangMTdinfonl1-- font nameuseMT1listfontMTcurrsetname3273 3274

MTgetfont Translate any asterisks3275 defMTgetfont123456nil3276 MTgetfont1234503277 ifxMTvalrelaxdefMTval0fi3278 expandaftergaddtomacroexpandaftertempbexpandafterMTval3279 letMTvaltempb3280

MTgetfont Helper macro also used by MTgetfontandsize3281 defMTgetfont1234563282 lettempbempty3283 defMTtemp123453284 MTgetaxisencoding13285 MTgetaxisfamily 23286 MTgetaxisseries 33287 MTgetaxisshape 43288 ifnum6gtzedeftempbtempbfi3289 MTifempty53290 MTwarnaxisemptysizestringnormalsize3291 defMTval3292 3293 defMTval53294 3295 MTgetsize3296

MTgetaxis

3297 defMTgetaxis123298 defMTval23299 MTgethighlevel13300 MTifemptyMTval3301 MTwarnaxisempty1csname 1defaultendcsname3302 expandafterdefexpandafterMTvalexpandaftercsname 1defaultendcsname3303 relax3304 expandaftergaddtomacroexpandaftertempbexpandafterMTval3305

MTwarnaxisempty

3306 defMTwarnaxisempty123307 MTwarning1 axis is empty in font specificationMessageBreak3308 `MTtemprsquo Using `2rsquo instead3309

We can finally assemble all pieces to define DeclareMicrotypeSetrsquos keys They are

IMPLEMENTATION Configuration 110

also used for DisableLigatures3310 MTexponenMTmapclistnMTfeaturesnl3311 MTdefinesetkeyencoding13312 MTdefinesetkeyfamily 13313 MTdefinesetkeyseries 13314 MTdefinesetkeyshape 13315 MTdefinesetkeysize 13316 MTdefinesetkeyfont 13317

UseMicrotypeSet To use a particular set we simply redefine MTlangfeaturerangsetname If the optionalargument is empty set names for all features will be redefined

3318 defUseMicrotypeSet3319 MTbegincatcodes3320 MTUseMicrotypeSet3321

MTUseMicrotypeSet

3322 newcommandMTUseMicrotypeSet[2][]3323 MTifempty13324 MTmapclistcMTfeaturesMTuseset123325 3326 MTmapclistn13327 MTifempty1relax3328 MTisfeature1activation of set `2rsquo3329 MTexponenMTuseset3330 csname MTrbba1endcsname23331 3332 3333 3334 3335 MTendcatcodes3336

MTprsetname

MTexsetname

MTtrsetname

MTspsetname

MTknsetname

MTuseset

Only use sets that have been declared3337 defMTuseset123338 MTifdefinednTFMT1set23339 MTxdefnMT1setname23340 3341 MTifdefinednTFMT1setnamerelax3342 MTxdefnMT1setnamenameuseMTdefault1set3343 3344 MTerror3345 The nameuseMTabbr1 set `2rsquo is undeclaredMessageBreak3346 Using set `nameuseMT1setnamersquo instead3347 3348

DeclareMicrotypeSetDefault This command can be used in the main configuration file to declare the defaultfont set in case no set is specified in the package options

3349 defDeclareMicrotypeSetDefault3350 MTbegincatcodes3351 MTDeclareMicrotypeSetDefault3352

MTDeclareMicrotypeSetDefault

3353 newcommandMTDeclareMicrotypeSetDefault[2][]3354 MTifempty13355 MTmapclistcMTfeaturesMTsetdefaultset123356 3357 MTmapclistn13358 MTifempty1relax3359 MTisfeature1declaration of default set `2rsquo3360 MTexponenMTsetdefaultset

IMPLEMENTATION Configuration 111

3361 csname MTrbba1endcsname23362 3363 3364 3365 3366 MTendcatcodes3367

MTdefaultprset

MTdefaultexset

MTdefaulttrset

MTdefaultspset

MTdefaultknset

MTsetdefaultset

3368 defMTsetdefaultset123369 MTifdefinednTFMT1set23370 langdebugrangMTdinfo1declaring default nameuseMTabbr1 set `2rsquo3371 MTxdefnMTdefault1set23372 3373 MTerror3374 The nameuseMTabbr1 set `2rsquo is not declaredMessageBreak3375 Cannot make it the default set Using setMessageBreak `allrsquo instead3376 MTxdefnMTdefault1setall3377 3378

1432 Variants and aliases

DeclareMicrotypeVariants

MTvariants

Specify suffixes for variants (see fontnamevariantsmap) The starred versionappends to the list

3379 letMTvariantsempty3380 defDeclareMicrotypeVariants3381 MTbegincatcodes3382 ifstar3383 MTDeclareVariants3384 letMTvariantsemptyMTDeclareVariants3385

MTDeclareVariants

3386 defMTDeclareVariants13387 MTmapclistn13388 deftempa13389 onelevelsanitizetempa3390 xdefMTvariantsMTvariantstempa3391 3392 MTendcatcodes3393

DeclareMicrotypeAlias This can be used to set an alias name for a font so that the file and the settings forthe aliased font will be loaded

3394 defDeclareMicrotypeAlias3395 MTbegincatcodes3396 MTDeclareMicrotypeAlias3397

MTDeclareMicrotypeAlias

3398 newcommandMTDeclareMicrotypeAlias[2]3399 deftempb23400 onelevelsanitizetempb3401 MTifdefinednTMT1alias3402 MTwarningAlias font family `tempbrsquo will override3403 alias `nameuseMT1aliasrsquoMessageBreak3404 for font family `1rsquo3405 MTxdefnMT1aliastempb

If we encounter this command while a font is being set up we also set the aliasfor the current font so that if DeclareMicrotypeAlias has been issued inside a

IMPLEMENTATION Configuration 112

configuration file the configuration file for the alias font will be loaded too3406 MTifdefinedcTMTfamily3407 langdebugrangMTdinfo1Activating alias font `tempbrsquo for `MTfamilyrsquo3408 MTgletMTfamilyaliastempb3409 3410 MTendcatcodes3411

LoadMicrotypeFile May be used to load a configuration file manually3412 defLoadMicrotypeFile13413 edeftempazapspace1 empty3414 onelevelsanitizetempa3415 MTexponenMTinclisttempaMTfilelist3416 ifMTinlist3417 MTvinfo Configuration file mt-tempacfg already loaded3418 else3419 MTxaddMTfilelisttempa3420 MTbegincatcodes3421 InputIfFileExistsmt-tempacfg3422 edefMTcurrfilemt-tempacfg3423 MTvinfo Loading configuration file MTcurrfile3424 3425 MTwarningConfiguration file mt-tempacfgMessageBreak3426 does not exist3427 3428 MTendcatcodes3429 fi3430 3431 langpackagerang3432 langpackage|letterspacerang

1433 Disabling ligatures

DisableLigatures

MTDisableLigatures

MTnlsetname

MTnlligatures

This is really simple now we can re-use the set definitions of DeclareMicrotypeSetthere can only be one set which wersquoll call lsquono ligaturesrsquo

The optional argument may be used to disable selected ligatures only3433 langpdftex-def|luatex-defrang3434 langpdftex-defrangMTrequirespdftex53435 defDisableLigatures3436 MTbegincatcodes3437 MTDisableLigatures3438 3439 newcommandMTDisableLigatures[2][]3440 MTifempty1relaxgdefMTnlligatures13441 xdefMTactivefeaturesMTactivefeaturesnl3442 globalMTnoligaturestrue3443 MTdeclaresetsnlno ligatures23444 gdefMTnlsetnameno ligatures3445 MTendcatcodes3446 3447 langpdftex-defrang3448 langpdftex-def|luatex-defrang

If pdfTEX is too old we throw an error3449 langpdftex-def|xetex-defrang3450 renewcommandDisableLigatures[2][]3451 MTerrorDisabling ligatures of a font is only possibleMessageBreak3452 with pdftex version 130 or newerMessageBreak3453 Ignoring stringDisableLigatures3454 langpdftex-defrang Upgrade3455 langxetex-defrang Use3456 pdftex3457

IMPLEMENTATION Configuration 113

3458 langpdftex-defrang3459 langpdftex-def|xetex-defrang

1434 Interaction with babel

DeclareMicrotypeBabelHook Declare the context that should be loaded when a babel language is selected Thecommand will not check whether a previous declaration will be overwritten

3460 langpackagerang3461 defDeclareMicrotypeBabelHook123462 MTmapclistn13463 KVspdeftempa13464 MTgdefnMTbabeltempa23465 3466 3467 langpackagerang

1435 Fine tuning

The commands SetExpansion and SetProtrusion provide an interface for settingthe character protrusion resp expansion factors for a set of fonts

SetProtrusion This macro accepts three arguments [options] set of font attributes and list ofcharacter protrusion factors

A new macro called MTprclangnamerang will be defined to be lang3rang (ie the list ofcharacters not expanded)

3468 langpdftex-def|xetex-def|luatex-defrang3469 defSetProtrusion3470 MTbegincatcodes3471 MTSetProtrusion3472

MTSetProtrusion

MTprcname

MTextracontext

MTpermutelist

We want the catcodes to be correct even if this is called in the preamble3473 newcommandMTSetProtrusion[3][]3474 letMTextracontextempty

Parse the optional first argument We first have to know the name before we candeal with the extra options

3475 MTsetnamedkeysMTprc13476 langdebugrangMTdinfo1creating protrusion list `MTprcnamersquo3477 defMTpermutelistprc3478 setkeysMTcfg2

We have parsed the second argument and can now define macros for all permuta-tions of the font attributes to point to MTprclangnamerang

3479 MTpermute

which we can now define to be lang3rang Here as elsewhere we have to make thedefinitions global since they will occur inside a group

3480 MTgdefnMTprcMTprcname33481 MTendcatcodes3482 3483 langpdftex-def|xetex-def|luatex-defrang

SetExpansion SetExpansion only differs in that it allows some extra options (stretch shrinkstep auto)

3484 langpdftex-def|luatex-defrang3485 defSetExpansion3486 MTbegincatcodes3487 MTSetExpansion3488

IMPLEMENTATION Configuration 114

MTSetExpansion

MTexcname

MTextracontext

MTpermutelist

3489 newcommandMTSetExpansion[3][]3490 letMTextracontextempty3491 MTsetnamedkeysMTexc13492 MTifdefinednTMTexcMTexcname factor3493 ifnumcsname MTexcMTexcname factorendcsname gt m3494 MTwarningnlExpansion factor numbernameuseMTexcMTexcname factor3495 too large in listMessageBreak `MTexcnamersquo Setting it to the3496 maximum of 10003497 MTgletncMTexcMTexcname factorm3498 fi3499 3500 langdebugrangMTdinfo1creating expansion list `MTexcnamersquo3501 defMTpermutelistexc3502 setkeysMTcfg23503 MTpermute3504 MTgdefnMTexcMTexcname33505 MTendcatcodes3506

SetTracking

3507 defSetTracking3508 MTbegincatcodes3509 MTSetTracking3510

MTSetTracking Third argument may be empty3511 newcommandMTSetTracking[3][]3512 letMTextracontextempty3513 MTsetnamedkeysMTtrc13514 langdebugrangMTdinfo1creating tracking list `MTtrcnamersquo3515 defMTpermutelisttrc3516 setkeysMTcfg23517 MTpermute3518 KVspdeftempa33519 MTifemptytemparelax3520 MTifinttempa3521 MTxdefnMTtrcMTtrcnametempa3522 MTwarningValue `temparsquo is not a number inMessageBreak3523 tracking set `MTcurrsetnamersquo3524 MTendcatcodes3525 3526 langpdftex-def|luatex-defrang

SetExtraSpacing

3527 langpdftex-defrang3528 defSetExtraSpacing3529 MTbegincatcodes3530 MTSetExtraSpacing3531

MTSetExtraSpacing

MTspcname

MTextracontext

MTpermutelist

3532 newcommandMTSetExtraSpacing[3][]3533 letMTextracontextempty3534 MTsetnamedkeysMTspc13535 langdebugrangMTdinfo1creating spacing list `MTspcnamersquo3536 defMTpermutelistspc3537 setkeysMTcfg23538 MTpermute3539 MTgdefnMTspcMTspcname33540 MTendcatcodes3541

SetExtraKerning

IMPLEMENTATION Configuration 115

3542 defSetExtraKerning3543 MTbegincatcodes3544 MTSetExtraKerning3545

MTSetExtraKerning

MTkncname

MTextracontext

MTpermutelist

3546 newcommandMTSetExtraKerning[3][]3547 letMTextracontextempty3548 MTsetnamedkeysMTknc13549 langdebugrangMTdinfo1creating kerning list `MTkncnamersquo3550 defMTpermutelistknc3551 setkeysMTcfg23552 MTpermute3553 MTgdefnMTkncMTkncname33554 MTendcatcodes3555 3556 langpdftex-defrang

MTsetnamedkeys

MToptions

We first set the name (if specified) then remove it from the list and set theremaining keys

3557 langpackagerang3558 defMTsetnamedkeys123559 defx1name=23nil3560 setkeys1name=23561 gdefMToptions133562 MTremfromclistname=MToptions3563 3564 x2name=nil3565 expandtwoargssetkeys1MToptions3566

MTdefinecodekey Define the keys for the configuration lists (which are setting the codes in pdfTEXspeak)

3567 defMTdefinecodekey123568 definekeyMT21[]3569 tempcnta=ne3570 MTmapclistn13571 KVspdefMTval1

Here too we allow for something like lsquobfrsquo It will be expanded immediately3572 MTgethighlevel13573 MTedefnMTtemp1thetempcntaMTval3574 advancetempcnta ne3575 3576 3577

MTdefinecodekeyfamily Remove fontspecrsquos internal feature counter3578 defMTdefinecodekeyfamily13579 definekeyMT1family[]3580 tempcnta=ne3581 MTmapclistn13582 KVspdefMTval13583 MTgethighlevelfamily3584 ifMTfontspec3585 edefxedefnoexpandMTvalnoexpandMTscrubfeatureMTval()relaxx3586 fi3587 MTedefnMTtempfamilythetempcntaMTval3588 advancetempcnta ne3589 3590 3591

MTdefinecodekeysize MTtempsize must be in a csname so that it is at least relax not undefined

IMPLEMENTATION Configuration 116

3592 defMTdefinecodekeysize13593 definekeyMT1size[]3594 MTmapclistn13595 KVspdefMTval13596 expandafterMTgetrangeMTval--nil3597 ifxMTvalrelax else3598 MTexpcsMTxaddMTtempsize3599 MTlowerMTupperMTcurrsetname3600 fi3601 3602 3603

MTdefinecodekeyfont

3604 defMTdefinecodekeyfont13605 definekeyMT1font[]3606 MTmapclistn13607 KVspdefMTval13608 MTifstreqMTvaldefMTvalrelax3609 expandafterMTgetfontandsizeMTvalnil3610 ifMTfontspec3611 edeftempbexpandafterMTscrubfeaturestempb()relax3612 fi3613 MTxdefnMTMTpermutelist tempbMTextracontext3614 csname MTMTpermutelist nameendcsname3615 langdebugrangMTdinfonl1initialising use list for font tempb=MTval3616 langdebugrang ifxMTextracontextemptyelseMessageBreak3617 langdebugrang (context MTextracontext)fi3618 MTexpcsMTxaddb3619 MTMTpermutelist tempbMTextracontext sizes3620 MTvalmneMTcurrsetname3621 3622 3623

MTgetfontandsize Translate any asterisks and split off the size3624 defMTgetfontandsize123456nil3625 MTgetfont1234513626

3627 MTdefinecodekeyencodingcfg3628 MTdefinecodekeyfamily cfg3629 MTdefinecodekeyseries cfg3630 MTdefinecodekeyshape cfg3631 MTdefinecodekeysize cfg3632 MTdefinecodekeyfont cfg

MTdefineoptkey

3633 defMTdefineoptkey123634 definekeyMT1c2[]MTifempty1relax3635 MTxdefnMT1cMTcurrsetname 213636

MTlistnamecount The options in the optional first argument3637 newcountMTlistnamecount3638 MTmapclistcMTfeatures

Use file name and line number as the list name if the user didnrsquot bother to inventone ndash also check whether the name already exists (in case more than one unnamedlist is loaded in the same line for example AtBeginDocument)

3639 definekeyMT1cname[]3640 MTifempty13641 MTifdefinednTFMT1cMTcurrfiletheinputlineno3642 globaladvanceMTlistnamecountne3643 MTedefnMT1cnameMTcurrfiletheinputlineno

IMPLEMENTATION Configuration 117

3644 (numberMTlistnamecount)3645 3646 MTedefnMT1cnameMTcurrfiletheinputlineno3647 3648 3649 MTedefnMT1cname13650 MTifdefinednTMT1ccsname MT1cnameendcsname3651 MTwarningRedefining nameuseMTabbr1 list `nameuseMT1cnamersquo3652 3653 3654 MTletcnMTcurrsetnameMT1cname3655 3656 MTdefineoptkey1load3657 MTdefineoptkey1factor3658 MTdefineoptkey1preset3659 MTdefineoptkey1inputenc

Only one context is allowed This might change in the future3660 definekeyMT1ccontext[]MTifempty1relaxdefMTextracontext13661 3662 langpackagerang

Automatically enable font copying if we find a protrusion or expansion contextAfter the preamble check whether font copying is enabled For older pdfTEXversions disallow It also works with LuaTEX 030 or newer

3663 langpdftex-def|luatex-defrang3664 langpdftex-defrangMTrequirespdftex73665 definekeyMTexccontext[]3666 MTifempty1relax3667 MTgletMTcopyfontMTcopyfont3668 defMTextracontext13669 3670 3671 MTaddtosetup3672 definekeyMTexccontext[]3673 ifxMTcopyfontMTcopyfont3674 MTifempty1relaxdefMTextracontext13675 else3676 MTerrorMTMTspace isnrsquot set up for expansion contextsMessageBreak3677 Ignoring `contextrsquo keyonline3678 Either move the settings inside the preambleMessageBreak3679 or load the package with the `copyfontsrsquo option3680 fi3681 3682

Protrusion contexts might also work without copying the font so we donrsquot issuean error but only a warning The problem is that pdfTEX only allows one set ofprotrusion factors for a given font within one paragraph (those that are in effect atthe end of the paragraph will be in effect for the whole paragraph) When differentfonts are loaded ndash like in the example with the footnote markers ndash we donrsquot needto copy the fonts

3683 definekeyMTprccontext[]3684 MTifempty1relax3685 MTgletMTcopyfontMTcopyfont3686 defMTextracontext13687 3688 3689 MTaddtosetup3690 definekeyMTprccontext[]3691 MTifempty1relaxdefMTextracontext13692 ifxMTcopyfontMTcopyfontelse3693 MTwarningnlIf protrusion contexts donrsquot work as expected

IMPLEMENTATION Configuration 118

3694 MessageBreak load the package with the `copyfontsrsquo option3695 fi3696 3697 3698 langpdftex-def|luatex-defrang3699 langpdftex-defrang3700 3701 definekeyMTexccontext[]3702 MTerrorExpansion contexts only work with pdftex 1404MessageBreak3703 or later Ignoring `contextrsquo keyonline3704 Upgrade pdftex3705 3706 langpdftex-defrang3707 langpdftex-def|xetex-defrang3708 definekeyMTprccontext[]3709 MTerrorProtrusion contexts only work with pdftex3710 langpdftex-defrang 1404MessageBreak or later3711 langxetex-defrang MessageBreak or luatex3712 Ignoring `contextrsquo keyonline3713 langpdftex-defrang Upgrade pdftex3714 langxetex-defrang Use pdftex or luatex3715 3716 langpdftex-def|xetex-defrang3717 langpdftex-defrang

MTwarnnodim

3718 langpackagerang3719 defMTwarnnodim13720 MTwarning`temparsquo is not a dimensionMessageBreak3721 Ignoring it and setting values relative toMessageBreak 13722 3723 langpackagerang

Protrusion codes may be relative to character width or to any dimension3724 langpdftex-def|xetex-def|luatex-defrang3725 definekeyMTprcunit[character]3726 MTgletncMTprcMTcurrsetname unitempty3727 deftempa13728 MTifstreqtempacharacterrelax

Test whether itrsquos a dimension but do not translate it into its final form here sinceit may be font-specific

3729 MTifdimentempa3730 MTgletncMTprcMTcurrsetname unittempa3731 MTwarnnodimcharacter widths3732 3733 3734 langpdftex-def|xetex-def|luatex-defrang

Tracking may only be relative to a dimension3735 langpdftex-def|luatex-defrang3736 definekeyMTtrcunit[1em]3737 MTgletncMTtrcMTcurrsetname unitempty3738 deftempa13739 MTifdimentempa3740 MTgletncMTtrcMTcurrsetname unittempa3741 MTwarnnodim1em3742 MTgdefnMTtrcMTcurrsetname unit1em3743 3744 langpdftex-def|luatex-defrang

Spacing and kerning codes may additionally be relative to space dimensions3745 langpdftex-defrang3746 MTmapclistnspkn3747 definekeyMT1cunit[space]

IMPLEMENTATION Configuration 119

3748 MTgletncMT1cMTcurrsetname unitempty3749 deftempa13750 MTifstreqtempacharacterrelax3751 MTgletncMT1cMTcurrsetname unitmne3752 MTifstreqtempaspacerelax3753 MTifdimentempa3754 MTgletncMT1cMTcurrsetname unittempa3755 MTwarnnodimwidth of space3756 3757 3758 3759 3760 langpdftex-defrang

The first argument to SetExpansion accepts some more options3761 langpdftex-def|luatex-defrang3762 MTmapclistnstretchshrinkstep3763 definekeyMTexc1[]3764 MTifempty1relax3765 MTifint1

A space terminates the number3766 MTgdefnMTexcMTcurrsetname 11 3767 3768 MTwarning3769 Value `1rsquo for option `1rsquo is not a numberMessageBreak3770 Ignoring it3771 3772 3773 3774 3775 definekeyMTexcauto[true]3776 deftempa13777 csname iftempaendcsname

Donrsquot use autoexpand for pdfTEX version older than 1203778 langpdftex-defrang MTrequirespdftex43779 langluatex-defrang MTrequiresluatex3relax3780 MTgdefnMTexcMTcurrsetname autoautoexpand3781 langpdftex-defrang MTwarningpdftex too old for automatic font expansion3782 else3783 langpdftex-defrang MTrequirespdftex43784 langluatex-defrang3785 MTrequiresluatex33786 MTwarningNon-automatic font expansion doesnrsquot work withMessageBreak3787 luatex3788 langluatex-defrang3789 MTgletncMTexcMTcurrsetname autoempty3790 langpdftex-defrang relax3791 fi3792

Tracking Interword spacing and outer kerning The variant with space just in caseSetTracking is called inside an argument (eg to IfFileExists)

3793 MTdefineoptkeytrspacing3794 MTdefineoptkeytrouterspacing3795 MTdefineoptkeytrouterkerning

Which ligatures should be disabled3796 definekeyMTtrcnoligatures[]3797 MTxdefnMTtrcMTcurrsetname noligatures13798 definekeyMTtrcouter spacing[]setkeysMTtrcouterspacing=13799 definekeyMTtrcouter kerning[]setkeysMTtrcouterkerning=13800 definekeyMTtrcno ligatures[]setkeysMTtrcnoligatures=13801 langpdftex-def|luatex-defrang

IMPLEMENTATION Configuration 120

1436 Character inheritance

DeclareCharacterInheritance This macro may be used in the configuration files to declare characters that shouldinherit protrusion resp expansion values from other characters Thus there is noneed to define all accented characters (eg lsquoa rsquoa ^a ~a a ra kaua) which will make the configuration files look much nicer and easier tomaintain If a single character of an inheritance list should have a different valueone can simply override it

MTinhfeat The optional argument may be used to restrict the list to some featuresMTextrainputenc and to specify an input encoding

3802 langpackagerang3803 renewcommandDeclareCharacterInheritance[1][]3804 letMTextracontextempty3805 letMTextrainputencundefined3806 letMTinhfeatempty3807 setkeysMTinh13808 MTbegincatcodes3809 MTsetinhlist3810

MTsetinhlist No need to create an inheritance list for tracking3811 defMTsetinhlist123812 MTifemptyMTinhfeat3813 MTmapclistcMTfeatures3814 MTifstreq1trrelaxMTdeclarecharinh1123815 3816 3817 MTmapclistcMTinhfeat3818 KVspdeftempa13819 MTifemptytemparelax3820 edeftempacsname MTrbbatempaendcsname3821 MTifstreqtempatrrelax3822 MTexponenMTdeclarecharinhtempa123823 3824 3825 MTendcatcodes3826

The keys for the optional argument3827 MTmapclistcMTfeatureslong3828 definekeyMTinh1[]edefMTinhfeatMTinhfeat13829 definekeyMTinhinputencdefMTextrainputenc1

MTdeclarecharinh The lists cannot be given a name by the user3830 defMTdeclarecharinh1233831 MTedefnMT1inhname3832 MTcurrfiletheinputlineno (nameuseMTabbr1)3833 MTletcnMTcurrsetnameMT1inhname3834 MTifdefinedcTMTextrainputenc3835 MTxdefnMT1inhMTcurrsetname inputencMTextrainputenc3836 langdebugrangMTdinfo1creating inheritance list `nameuseMT1inhnamersquo3837 MTgdefnMT1inhcsname MT1inhnameendcsname33838 defMTpermutelist1inh3839 setkeysMTinh23840 MTpermute3841

Parse the second argument DeclareCharacterInheritance may also be set upfor various combinations We can reuse the key setup from the configuration lists(Set)

3842 MTdefinecodekeyencodinginh

IMPLEMENTATION Configuration 121

3843 MTdefinecodekeyfamily inh3844 MTdefinecodekeyseries inh3845 MTdefinecodekeyshape inh3846 MTdefinecodekeysize inh3847 MTdefinecodekeyfont inh

MTinhdo Now parse the third argument the inheritance lists We define the commandsMTinhlangnameranglangslotrang containing the inheriting characters They will also betranslated to slot numbers here to save some time The following will be ex-ecuted only once namely the first time this inheritance list is encountered (inMTsetlangfeaturerangcodes)

3848 defMTinhdo13849 ifxrelax1empty else3850 MTinhsplit 1==relax3851 expandafterMTinhdo3852 fi3853

MTinhsplit Only gather the inheriting characters here Their codes will actually be set inMTsetlangfeaturerangcodes

3854 langpackagerang3855 langpdftex-def|xetex-def|luatex-defrang3856 defMTinhsplit1=2=3relax3857 deftempa13858 ifxtempaempty else3859 MTgetslot3860 langpdftex-def|luatex-defrang ifnumMTchar gt mne3861 langxetex-defrang ifxMTcharemptyelse3862 letMTvalMTchar3863 MTmapclistn23864 deftempa13865 ifxtempaempty else3866 MTgetslot3867 langpdftex-def|luatex-defrang ifnumMTchar gt mne3868 langxetex-defrang ifxMTcharemptyelse3869 MTexpcsMTxaddMTinhMTlistname MTval MTchar3870 fi3871 fi3872 3873 langdebugrangMTdinfonl2children of 1 (MTval)3874 langdebugrang nameuseMTinhMTlistname MTval 3875 fi3876 fi3877 3878 langpdftex-def|xetex-def|luatex-defrang

1437 Permutation

MTpermute

MTpermute

MTpermute

MTpermute

MTpermute

Calling MTpermute will define commands for all permutations of the specified fontattributes of the form MTlanglist typeranglangencodingranglangfamilyranglangseriesranglangshaperanglang|rang tobe the expansion of MTlanglist typerangname ie the name of the currently defined listSize ranges are held in a separate macro called MTlanglist typeranglangfont axesrangsizeswhich in turn contains the respective langlist namerangs attached to the ranges So that

SetProtrusion encoding = U family = euroitceuroitcs E = 10050 SetProtrusion encoding = U family = euroitceuroitcs shape = it

IMPLEMENTATION Configuration 122

E = 100

would yield the following assignments3879 langpackagerang3880 MTgdefnMTprcUeuroitceuroitc3881 MTgdefnMTprcUeuroitcseuroitc3882 MTgdefnMTprcUeuroitciteuroitci3883 MTgdefnMTprcUeuroitcsiteuroitci3884 MTgdefnMTprceuroitcE=100503885 MTgdefnMTprceuroitciE=1003886 defMTpermute3887 letMTcntencodingne3888 MTpermute

Undefine commands for the next round3889 MTmaptlistnencodingfamilyseriesshapeMTpermutereset3890 MTgletMTtempsizeundefined3891 3892 defMTpermute3893 letMTcntfamilyne3894 MTpermute3895 MTincrementMTcntencoding3896 MTifdefinednTMTtempencodingMTcntencoding3897 MTpermute3898 3899 defMTpermute3900 letMTcntseriesne3901 MTpermute3902 MTincrementMTcntfamily3903 MTifdefinednTMTtempfamilyMTcntfamily3904 MTpermute3905 3906 defMTpermute3907 letMTcntshapene3908 MTpermute3909 MTincrementMTcntseries3910 MTifdefinednTMTtempseriesMTcntseries3911 MTpermute3912 3913 defMTpermute3914 MTpermute3915 MTincrementMTcntshape3916 MTifdefinednTMTtempshapeMTcntshape3917 MTpermute3918

MTpermute In order to save some memory we can ignore unused encodings (inside the docu-ment)

3919 defMTpermute3920 MTpermutedefineencoding3921 ifMTdocument3922 ifxMTtempencodingempty else3923 MTifdefinednTFTMTtempencodingrelax3924 expandafterexpandafterexpandaftergobble3925 fi3926 fi3927 MTpermute3928

MTpermute

3929 defMTpermute3930 MTpermutedefinefamily3931 MTpermutedefineseries3932 MTpermutedefineshape3933 edeftempaMTtempencoding

IMPLEMENTATION Configuration 123

3934 MTtempfamily3935 MTtempseries3936 MTtempshape3937 MTifdefinedcTMTtempsize

Some sanity checks an encoding must be specified (unless nothing else is)3938 MTifstreqtemparelax3939 ifxMTtempencodingempty3940 MTwarning3941 You have to specify an encoding forMessageBreak3942 nameuseMTabbrMTpermutelist list3943 `nameuseMTMTpermutelist namersquoMessageBreak3944 Ignoring it3945 else3946 MTifdefinedcTFMTtempsize

Add the list of ranges to the beginning of the current combination after checkingfor conflicts

3947 MTifdefinednTMTMTpermutelist tempaMTextracontext sizes3948 MTmaptlistcMTtempsizeMTcheckrlist3949 3950 MTexpcsMTxaddb3951 MTMTpermutelist tempaMTextracontext sizes3952 MTtempsize3953 langdebugrangMTdinfonl1initialising use list for font tempaMessageBreak3954 langdebugrang sizes csname MTMTpermutelist tempaMTextracontext3955 langdebugrang sizesendcsname3956

Only one list can apply to a given combination But we donrsquot warn if the overriddenlist is to be loaded by the current one

3957 MTifdefinednTMTMTpermutelist tempaMTextracontext3958 MTifstreqcsname MTMTpermutelist tempaMTextracontextendcsname3959 csname MTMTpermutelist csname MTMTpermutelist nameendcsname loadendcsname3960 relax3961 MTwarningnameuseMTabbrMTpermutelist list3962 `nameuseMTMTpermutelist namersquo willMessageBreak override3963 list `nameuseMTMTpermutelist tempaMTextracontextrsquo3964 for MessageBreak font `temparsquo3965 3966 3967 langdebugrangMTdinfonl1initialising use list for font tempa3968 langdebugrang ifxMTextracontextemptyelseMessageBreak3969 langdebugrang (context MTextracontext)fi3970 3971 MTxdefnMTMTpermutelist tempaMTextracontext3972 csname MTMTpermutelist nameendcsname3973 fi3974 3975

MTpermutedefine Define the commands3976 defMTpermutedefine13977 tempcnta=csname MTcnt1endcsnamerelax3978 MTifdefinednTFMTtemp1thetempcnta3979 MTedefnMTtemp1csname MTtemp1thetempcntaendcsname3980 MTletncMTtemp1empty3981

MTpermutereset Reset the commands3982 defMTpermutereset13983 tempcnta=ne3984 MTloop3985 MTletncMTtemp1thetempcntaundefined

IMPLEMENTATION Configuration 124

3986 advancetempcntane3987 MTifdefinednTFMTtemp1thetempcnta3988 iftrue3989 iffalse3990 MTrepeat3991

MTcheckrlist For every new range item in MTtempsize check whether it overlaps with rangesin the existing list

3992 defMTcheckrlist1expandafterMTcheckrlist 1

MTcheckrlist Define the current new range and 3993 defMTcheckrlist1233994 deftempb13995 deftempc23996 MTiffalse3997 MTexpcsMTmaptlistc3998 MTMTpermutelist tempaMTextracontext sizes3999 MTcheckrange4000

MTcheckrange recurse through the list of existing ranges4001 defMTcheckrange1expandafterMTcheckrange 1

MTcheckrange tempb and tempc are lower resp upper bound of the new range lang1rang and lang2rangthose of the existing range lang3rang is the list name

4002 defMTcheckrange1234003 MTifdim2=mne4004 MTifdimtempc=mne

bull Both items are simple sizes

4005 MTifdimtempb=1MTiftruerelax4006

bull Item in list is a simple size new item is a range

4007 MTifdimtempbgt1relax4008 MTifdimtempcgt14009 MTiftrue4010 edeftempb1 (with range tempbspace to tempc)4011 relax4012 4013 4014 4015 MTifdimtempc=mne

bull Item in list is a range new item is a simple size

4016 MTifdimtempblt24017 MTifdimtempblt1relaxMTiftrue4018 relax4019

bull Both items are ranges

4020 MTifdimtempblt24021 MTifdimtempcgt14022 MTiftrue4023 edeftempb1 to 2 (with range tempbspace to tempc)4024 relax4025 relax4026 4027 4028 ifMTif

IMPLEMENTATION Package options 125

4029 MTifstreq34030 csname MTMTpermutelist csname MTMTpermutelist nameendcsname loadendcsname4031 relax4032 MTwarningnameuseMTabbrMTpermutelist list4033 `nameuseMTMTpermutelist namersquo will overrideMessageBreak4034 list `3rsquo for font tempaMessageBreak size tempb4035

If wersquove already found a conflict with this item we can skip the rest of the list

4036 expandafterMTtlistbreak4037 fi4038

144 Package options1441 Declaring the options

ifMToptexpansion

ifMToptauto

ifMToptDVI

Keep track of whether the user explicitly set these options4039 newififMToptexpansion4040 newififMToptauto4041 newififMToptDVI

MToptwarnadmissible Some warnings4042 defMToptwarnadmissible124043 MTwarningnl`1rsquo is not an admissible value for optionMessageBreak4044 `2rsquo Assuming `falsersquo4045

MToptwarnnan

4046 langpackagerang4047 langpackage|letterspacerang4048 langplainrangMTrequireslatex14049 defMToptwarnnan124050 MTwarningnlValue `1rsquo for option `2rsquo is not aMessageBreak number4051 Using default value of numbernameuseMT2default4052 4053 langplainrangrelax4054 langpackage|letterspacerang4055 langpackagerang

MToptdefset

4056 defMToptdefset14057 MTifdefinednTFMTtempb setMTval4058 MTxdefnMTtempb setnameMTval4059 4060 MTxdefnMTtempb setnamenameuseMTdefaulttempb set4061 MTwarningnlThe 1 set `MTvalrsquo is undeclaredMessageBreak4062 Using set `nameuseMTtempb setnamersquo instead4063 4064

expansion and protrusion may be true false compatibility nocompatibilityandor a langset namerang

4065 MTmapclistnprotrusionexpansion4066 definekeyMT1[true]4067 csname MTopt1trueendcsname4068 MTmapclistn14069 KVspdefMTval14070 MTifemptyMTvalrelax4071 csname MT1trueendcsname4072 edeftempbcsname MTrbba1endcsname4073 MTifstreqMTvaltruerelax

IMPLEMENTATION Package options 126

4074 4075 MTifstreqMTvalfalse4076 csname MT1falseendcsname4077 4078 MTifstreqMTvalcompatibility4079 MTletncMTtempb levelne4080 4081 MTifstreqMTvalnocompatibility4082 MTletncMTtempb leveltw4083

If everything failed it should be a set name4084 MToptdefset14085 4086 4087 4088 4089 4090 4091 4092

activate is a shortcut for protrusion and expansion4093 definekeyMTactivate[true]4094 setkeysMTprotrusion=14095 setkeysMTexpansion=14096

spacing kerning and tracking do not have a compatibility level4097 MTmapclistnspacingkerningtracking4098 definekeyMT1[true]4099 MTmapclistn14100 KVspdefMTval14101 MTifemptyMTvalrelax4102 csname MT1trueendcsname4103 MTifstreqMTvaltruerelax4104 4105 MTifstreqMTvalfalse4106 csname MT1falseendcsname4107 4108 edeftempbcsname MTrbba1endcsname4109 MToptdefset14110 4111 4112 4113 4114 4115

MTdefboolopt The truefalse options draft final (may be inherited from the class options)auto selected babel DVIoutput defersetup copyfonts

4116 defMTdefboolopt124117 definekeyMT1[true]4118 deftempa14119 MTifstreqtempatruerelax4120 MTifstreqtempafalserelax4121 MToptwarnadmissible114122 deftempafalse4123 4124 4125 24126 4127

Boolean options that only set the switch

IMPLEMENTATION Package options 127

4128 MTmapclistndraftselectedbabel4129 MTdefboolopt1csname MT1tempaendcsname4130 MTdefbooloptautocsname MTautotempaendcsname MToptautotrue

The DVIoutput option will change pdfoutput immediately to minimise the risk ofconfusing other packages

4131 langpackagerang4132 langpdftex-def|luatex-def|xetex-defrang4133 langluatex-defrangMTrequiresluatex4letpdfoutputoutputmoderelax4134 MTdefbooloptDVIoutput4135 csname iftempaendcsname4136 langpdftex-def|luatex-defrang4137 ifnumpdfoutputgtz MToptDVItrue fi4138 pdfoutputz4139 else4140 ifnumpdfoutputltne MToptDVItrue fi4141 pdfoutputne4142 langpdftex-def|luatex-defrang4143 langxetex-defrang MTwarningnlIgnoring `DVIoutputrsquo option4144 fi4145 4146 langpdftex-def|luatex-def|xetex-defrang

Setting the defersetup option to false will restore the old behaviour where thesetup took place at the time when the package was loaded This is undocumentedsince I would like to learn about the cases where this is necessary

The only problem with the new deferred setup I can think of is when a boxis being constructed inside the preamble and this box contains a font that is notloaded before the box is being used

4147 langpackagerang4148 MTdefbooloptdefersetup4149 csname iftempaendcsname else4150 AtEndOfPackage4151 MTsetup4152 letMTsetupempty4153 letMTaddtosetupfirstofone4154 4155 fi4156 4157 langpackagerang

copyfonts will copy all fonts before setting them up This allows protrusion andexpansion with different parameters This options is also undocumented in the hopethat we can always find out automatically whether itrsquos required It also works withLuaTEX 030 or newer

4158 langpdftex-def|luatex-defrang4159 langpdftex-defrangMTrequirespdftex74160 MTdefbooloptcopyfonts4161 csname iftempaendcsname4162 MTgletMTcopyfontMTcopyfont4163 else4164 MTgletMTcopyfontrelax4165 fi4166 4167 langpdftex-defrang4168 langpdftex-def|luatex-defrang4169 langpdftex-def|xetex-defrang4170 MTdefbooloptcopyfonts4171 csname iftempaendcsname4172 MTerror4173 langpdftex-defrang The pdftex version you are using is too oldMessageBreak4174 langpdftex-defrang to use the `copyfontsrsquo optionUpgrade pdftex

IMPLEMENTATION Package options 128

4175 langxetex-defrang The `copyfontsrsquo option does not work with xetex4176 langxetex-defrang Use pdftex or luatex instead4177 fi4178 4179 langpdftex-defrang4180 langpdftex-def|xetex-defrang

final is the opposite to draft4181 langpackagerang4182 MTdefbooloptfinal4183 csname iftempaendcsname4184 MTdraftfalse4185 else4186 MTdrafttrue4187 fi4188

For verbose output we redefine MTvinfo4189 definekeyMTverbose[true]4190 letMTvinfoMTinfonl4191 deftempa14192 MTifstreqtempatruerelax

Take problems seriously4193 MTifstreqtempaerrors4194 letMTwarning MTwarnerr4195 letMTwarningnlMTwarnerr4196 4197 letMTvinfogobble

Cast warnings to the winds4198 MTifstreqtempasilent4199 letMTwarning MTinfo4200 letMTwarningnlMTinfonl4201 4202 MTifstreqtempafalserelaxMToptwarnadmissible1verbose4203 4204 4205 4206 4207 langpackagerang

Options with numerical keys factor stretch shrink step letterspace4208 langpackage|letterspacerang4209 langplainrangMTrequireslatex14210 MTmapclistn4211 langpackagerang stretchshrinkstep4212 letterspace4213 definekeyMT1[csname MT1defaultendcsname]4214 deftempa1

No nonsense in MTfactor et al A space terminates the number4215 MTifinttempa4216 MTedefnMT1tempa4217 MToptwarnnan114218 4219 4220 langplainrangrelax4221 langpackage|letterspacerang

factor will define the protrusion factor only4222 langpackagerang4223 definekeyMTfactor[MTfactordefault]4224 deftempa1 4225 MTifinttempa

IMPLEMENTATION Package options 129

4226 edefMTprfactortempa4227 MToptwarnnan1factor4228

Unit for protrusion codes4229 definekeyMTunit[character]4230 deftempa14231 MTifstreqtempacharacterrelax4232 MTifdimentempa4233 letMTprunittempa4234 MTwarningnl`temparsquo is not a dimensionMessageBreak4235 Ignoring it and setting values relative toMessageBreak4236 character widths4237 4238

1442 Loading the definition file

MTendinput Abort if no capable engine found4239 letMTendinputrelax

4240 ifxMTenginerelax4241 MTwarningnlYou donrsquot seem to be using pdftex luatex or xetexMessageBreak4242 `MTMTrsquo only works with these enginesMessageBreak4243 I will quit now4244 MTclearoptions4245 else

Otherwise load the engine-specific code (as strewn across this file)4246 inputmicrotype-MTengine texdef4247 fi4248 MTendinput

1443 Reading the configuration file

The package should just work if called without any options Therefore expansionwill be switched off by default if output is DVI since it isnrsquot likely that expandedfonts are available (This grows more important as modern TEX systems haveswitched to the pdfTEX engine even for DVI output so that the user might not evenbe aware of the fact that shersquos running pdfTEX)

4249 MTprotrusiontrue4250 langpackagerang4251 langpdftex-def|luatex-defrang4252 ifnumpdfoutputltne else

Also we only enable expansion by default if pdfTEX can expand the fonts automat-ically

4253 langpdftex-defrang MTrequirespdftex44254 MTexpansiontrue4255 langpdftex-defrang MTautotrue4256 langpdftex-defrang relax4257 fi4258 langluatex-defrangMTautotrue4259 langpdftex-def|luatex-defrang

The main configuration file will be loaded before processing the package optionsMTconfigfile

MTgetconfig

However the config option must of course be evaluated beforehand We also haveto define a no-op for the regular option processing later

4260 langpackagerang4261 definekeyMTconfig[]relax4262 defMTgetconfig1config=23nil

IMPLEMENTATION Package options 130

4263 MTifempty24264 defMTconfigfileMTMTcfg4265 defMTconfigfile2cfg4266 4267 expandafterexpandafterexpandafterMTgetconfig4268 csname optcurrnamecurrextendcsnameconfig=nil

Load the file4269 IfFileExistsMTconfigfile4270 MTinfonlLoading configuration file MTconfigfile4271 MTbegincatcodes4272 letMTbegincatcodesrelax4273 letMTendcatcodesrelax4274 letMTcurrfileMTconfigfile4275 inputMTconfigfile4276 endgroup4277 MTwarningnl4278 Could not find configuration file `MTconfigfilersquoMessageBreak4279 This will almost certainly cause undesired resultsMessageBreak4280 Please fix your installation4281

MTcheckactiveset We have to make sure that font sets are active If the user didnrsquot activate any weuse those sets declared by DeclareMicrotypeSetDefault (this is done at the endof the preamble)

4282 defMTcheckactiveset14283 MTifdefinednTFMT1setname4284 MTinfonlUsing nameuseMTabbr1 set `nameuseMT1setnamersquo4285 4286 MTifdefinednTFMTdefault1set4287 MTgletnnMT1setnameMTdefault1set4288 MTinfonlUsing default nameuseMTabbr1 set `nameuseMT1setnamersquo4289

If no default font set has been declared in the main configuration file we use the(empty non-existent) set lsquorsquo and issue a warning

4290 MTgdefnMT1setname4291 MTwarningnlNo nameuseMTabbr1 set chosen no default set declared4292 MessageBreak Using empty set4293 4294 4295

1444 Hook for other packages

MicrotypeHook This hook may be used by font package authors eg to declare alias fonts If itis defined it will be executed here ie after the main configuration file has beenloaded and before the package options are evaluated

This hook was needed in versions prior to 19a to overcome the situation that(1) the microtype package should be loaded after all font defaults have been setup (hence using ifpackageloaded in the font package was not viable) and(2) checking AtBeginDocument could be too late since fonts might already havebeen loaded and consequently set up in the preamble With the new deferredsetup one could live without this command however it remains here since itrsquossimpler than testing whether the package 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 packages arenrsquot overwritten Example

IMPLEMENTATION Package options 131

defMinionProMTHookDeclareMicrotypeAliasMinionPro-LFMinionProifpackageloadedmicrotype MinionProMTHook ifundefinedMicrotypeHook letMicrotypeHookMinionProMTHook gaddtomacroMicrotypeHookMinionProMTHook

MicroTypeHook with a capital T (which only existed in version 17) is providedfor compatibility reasons At some point in the future it will no longer be availablehence it should not be used

4296 MTifdefinedcTMicroTypeHookMTwarning4297 Command stringMicroTypeHookspace is deprecatedMessageBreak4298 Use stringMicrotypeHookspace insteadMicroTypeHook4299 MTifdefinedcTMicrotypeHookMicrotypeHook

1445 Changing options later

microtypesetup

MTdefineoptionX

Inside the preamble microtypesetup accepts the same options as the package (un-less defersetup=false) In the document body it accepts the options protrusionexpansion activate tracking spacing and kerning Specifying font sets is notallowed

4300 defmicrotypesetupsetkeysMT4301 MTaddtosetupdefmicrotypesetup1setkeysMTX1selectfont4302 langpackagerang4303 langpdftex-def|luatex-def|xetex-defrang4304 defMTdefineoptionX124305 definekeyMTX1[true]4306 edeftempbcsname MTrbba1endcsname4307 MTmapclistn14308 KVspdefMTval14309 MTifemptyMTvalrelax4310 tempcnta=mne4311 MTifstreqMTvaltrue

Enabling micro-typography in the middle of the document is not allowed if it hasbeen disabled in the package options since fonts might already have been loadedand hence wouldnrsquot be set up

4312 MTchecksetup14313 tempcnta=csname MTtempb levelendcsname4314 MTvinfoEnabling 14315 (level numbercsname MTtempb levelendcsname)online4316 4317 4318 MTifstreqMTvalfalse4319 tempcnta=z4320 MTvinfoDisabling 1online4321 4322 MTifstreqMTvalcompatibility4323 MTchecksetup14324 tempcnta=ne4325 MTletncMTtempb levelne4326 MTvinfoSetting 1 to level 1online4327 4328 4329 MTifstreqMTvalnocompatibility4330 MTchecksetup14331 tempcnta=tw4332 MTletncMTtempb leveltw4333 MTvinfoSetting 1 to level 2online4334 4335 MTerrorValue `MTvalrsquo for key `1rsquo not recognised

IMPLEMENTATION Package options 132

4336 Use any of `truersquo `falsersquo `compatibilityrsquo or4337 `nocompatibilityrsquo4338 4339 4340 4341 4342 ifnumtempcntagtmne4343 2tempcntarelax4344 fi4345 4346 4347 4348

MTchecksetup Test whether the feature wasnrsquot disabled in the package options4349 defMTchecksetup14350 csname ifMT1endcsname4351 expandafterfirstofone4352 else4353 MTerrorYou cannot enable 1 if it was disabledMessageBreak4354 in the package optionsLoad microtype with 1 enabled4355 expandaftergobble4356 fi4357

4358 MTdefineoptionXprotrusionMTprotrudechars4359 langpdftex-def|luatex-def|xetex-defrang4360 langpdftex-def|luatex-defrang4361 MTdefineoptionXexpansionMTadjustspacing

MTprotrudechars

MTadjustspacing 4362 langluatex-defrang4363 MTrequiresluatex44364 letpdfprotrudecharsprotrudechars4365 letpdfadjustspacingadjustspacing4366 relax4367 langluatex-defrang4368 letMTprotrudecharspdfprotrudechars4369 letMTadjustspacingpdfadjustspacing4370 langpdftex-def|luatex-defrang4371 langxetex-defrang4372 letMTprotrudecharsXeTeXprotrudechars4373 definekeyMTXexpansion[true]MTwarningIgnoring expansion setup4374 langxetex-defrang

MTdefineoptionX The same for tracking spacing and kerning which do not have a compatibilitylevel

4375 langpdftex-def|luatex-defrang4376 langpdftex-defrangMTrequirespdftex64377 langluatex-defrangMTrequiresluatex34378 defMTdefineoptionX124379 definekeyMTX1[true]4380 MTmapclistn14381 KVspdefMTval14382 MTifemptyMTvalrelax4383 tempcnta=mne4384 MTifstreqMTvaltrue4385 MTchecksetup14386 tempcnta=ne4387 MTvinfoEnabling 1online4388 4389 4390 MTifstreqMTvalfalse4391 tempcnta=z4392 MTvinfoDisabling 1online

IMPLEMENTATION Package options 133

4393 MTerrorValue `MTvalrsquo for key `1rsquo not recognised4394 Use either `truersquo or `falsersquo4395 4396 4397 ifnumtempcntagtmne4398 2relax4399 fi4400 4401 4402 4403

We cannot simply let MTtracking relax since this may select the already letter-spaced font instance

4404 MTdefineoptionXtrackingifnumtempcnta=z letMTtrackingMTsettrzero4405 else letMTtrackingMTtracking fi4406 langpdftex-defrang MTdefineoptionXspacingpdfadjustinterwordgluetempcnta4407 langpdftex-defrang MTdefineoptionXkerningpdfprependkerntempcnta4408 langpdftex-defrang pdfappendkerntempcnta4409 4410 langpdftex-def|luatex-defrang4411 langpdftex-def|luatex-def|xetex-defrang

Disable for older pdfTEX versions and for XETEX and LuaTEX4412 definekeyMTXtracking[true]MTwarningIgnoring tracking setup4413 langluatex-defrang4414 definekeyMTXkerning[true]MTwarningIgnoring kerning setup4415 definekeyMTXspacing[true]MTwarningIgnoring spacing setup4416 langpdftex-defrang4417 definekeyMTXactivate[true]4418 setkeysMTXprotrusion=14419 langpdftex-def|luatex-defrang setkeysMTXexpansion=14420 4421 langpdftex-def|luatex-def|xetex-defrang

MTsavedsetupfont Disable everything ndash may be used as a temporary work-around in case setting upfonts doesnrsquot work under certain circumstances but only until that specific problemis fixed This is undocumented as it completely deprives us of the possibility to act ndashwersquore blind and paralysed

4422 langpackagerang4423 letMTsavedsetupfontMTsetupfont

4424 definekeyMTXdisable[]4425 MTinfoInactivate `MTMTrsquo package4426 letMTsetupfontrelax4427 4428 definekeyMTXenable[]4429 MTinfoReactivate `MTMTrsquo package4430 letMTsetupfontMTsavedsetupfont4431 4432 langpackagerang

1446 Processing the options

MTProcessOptionsWithKV Parse options4433 langpackage|letterspacerang4434 langplainrangMTrequireslatex14435 defMTProcessOptionsWithKV14436 lettempcrelax4437 letMTtempempty4438 langplainrang MTrequireslatex24439 MTmapclistcclassoptionslist4440 defCurrentOption1

IMPLEMENTATION Package options 134

4441 MTifdefinednTKV1expandafterMTgetkeyCurrentOption=nil4442 edefMTtempMTtempCurrentOption4443 expandtwoargsremoveelementCurrentOption4444 unusedoptionlistunusedoptionlist4445 4446 4447 edefMTtempnoexpandsetkeys14448 MTtempptionlistcurrnamecurrext

eplain can handle package options4449 langplainrang4450 edefMTtempnoexpandsetkeys14451 csname usepkgoptionsusepkgpkgendcsname4452 langplainrang4453 MTtemp4454 MTclearoptions4455

MTgetkey For key=val in class options4456 defMTgetkey1=2nil1

4457 MTProcessOptionsWithKVMT4458 langplainrangrelax4459 langpackage|letterspacerang4460 langpackagerang

Now we can take the appropriate actions We also tell the log file which optionsthe user has chosen (in case itrsquos interested)

4461 MTaddtosetup4462 ifMTdraft

We disable most of what wersquove just defined in the 4462 lines above if we arerunning in draft mode

4463 MTwarningnl`draftrsquo option activeMessageBreak4464 Disabling all micro-typographic extensionsMessageBreak4465 This might lead to different line and page breaks4466 letMTsetupfontrelax4467 renewcommandLoadMicrotypeFile[1]4468 renewcommandmicrotypesetup[1]4469 renewcommandmicrotypecontext[1]4470 renewcommandlsstyle4471 else4472 MTsetupPDF4473 MTsetupcopies

Fix the font sets4474 MTmaptlistcMTfontsetsMTfixfontset4475 MTsetupprotrusion4476 MTsetupexpansion4477 MTsetuptracking4478 MTsetupwarntracking4479 MTsetupspacing4480 MTsetupkerning4481 MTsetupnoligatures4482 4483 langpackagerang

MTsetupPDF pdfTEX can create DVI output too However both the DVI viewer and dvips needto find actual fonts Therefore expansion will only work if the fonts for differentdegrees of expansion are readily available

Some packages depend on the value of pdfoutput and will get confused if it ischanged after they have been loaded These packages are among others colorgraphics hyperref crop contour pstricks and as a matter of course ifpdf

IMPLEMENTATION Package options 135

Instead of testing for each package (thatrsquos not our job) we only say that it wasmicrotype that changed it This must be sufficient

4484 langpdftex-def|luatex-defrang4485 defMTsetupPDF4486 MTinfonlGenerating ifnumpdfoutputltne DVI else PDF fi output4487 ifMToptDVIspace (changed by MTMT)fi4488

MTsetupcopies Working on font copies4489 defMTsetupcopies4490 ifxMTcopyfontrelaxelse MTinfonlUsing font copies for contextsfi4491 4492 langpdftex-def|luatex-defrang4493 langxetex-defrang4494 letMTsetupPDFrelax4495 letMTsetupcopiesrelax4496 langxetex-defrang

MTsetupprotrusion Protrusion4497 langpdftex-def|xetex-def|luatex-defrang4498 defMTsetupprotrusion4499 ifMTprotrusion4500 edefMTactivefeaturesMTactivefeaturespr4501 MTprotrudecharsMTprlevel4502 MTinfonlCharacter protrusion enabled (level numberMTprlevel)4503 ifnumMTprfactor=MTfactordefault elseMessageBreak4504 factor numberMTprfactorfi4505 ifxMTprunitempty elseMessageBreak unit MTprunitfi4506 MTcheckactivesetpr4507 else4508 letMTprotrusionrelax4509 MTinfonlNo character protrusion4510 fi4511 4512 langpdftex-def|xetex-def|luatex-defrang

MTsetupexpansion For DVI output the user must have explicitly passed the expansion option tothe package Under LuaTEX expansion works quite differently the glyphs willbe positioned as if they were transformed without actually being transformedSince this could still be considered a viable option we donrsquot disable the featurecompletely but issue a warning

4513 langpdftex-def|luatex-defrang4514 defMTsetupexpansion4515 ifnumpdfoutputltne4516 ifMToptexpansion4517 langluatex-defrang4518 ifMTexpansion4519 MTrequiresluatex34520 MTwarningnlFont expansion doesnrsquot work properly with luatex inMessageBreak4521 DVI mode the glyphs wonrsquot be actually transformedMessageBreak4522 but will only be shifted You might want to useMessageBreak4523 pdflatex instead Irsquoll continue anyway 4524 MTexpansionfalse4525 relax4526 fi4527 langluatex-defrang4528 else4529 MTexpansionfalse4530 fi4531 fi4532 ifMTexpansion

Set up the values for font expansion if stretch has not been specified we take the

IMPLEMENTATION Package options 136

default value of 204533 ifnumMTstretch=mne4534 letMTstretchMTstretchdefault4535 fi

If shrink has not been specified it will inherit the value from stretch4536 ifnumMTshrink=mne4537 letMTshrinkMTstretch4538 fi

If step has not been specified we will just set it to 1 for recent pdfTEX versions Mytests did not show much difference neither in compilation time (within the marginof error) nor in file size (less than 1 difference for microtypepdf with step=1compared to step=5) With older versions we set it to min(stretchshrink)5rounded off minimum value 1

4539 ifnumMTstep=mne4540 langpdftex-defrang MTrequirespdftex64541 defMTstep1 4542 langpdftex-defrang4543 4544 ifnumMTstretchgtMTshrink4545 ifnumMTshrink=z4546 tempcnta=MTstretch4547 else4548 tempcnta=MTshrink4549 fi4550 else4551 ifnumMTstretch=z4552 tempcnta=MTshrink4553 else4554 tempcnta=MTstretch4555 fi4556 fi4557 dividetempcnta 5relax4558 ifnumtempcnta=z tempcnta=ne fi4559 edefMTstepnumbertempcntaspace4560 4561 langpdftex-defrang4562 fi4563 ifnumMTstep=z4564 MTwarningnlThe expansion step cannot be set to zeroMessageBreak4565 Setting it to one4566 defMTstep1 4567 fi

MTauto Automatic expansion of the font This new feature of pdfTEX 120 makes thehz programme really usable It must be either lsquoautoexpandrsquo or empty (or lsquo1000rsquo forolder versions of pdfTEX) With LuaTEX we just leave it empty as therersquos actuallyno difference ndash non-automatic font expansion doesnrsquot work anymore In LuaTEX106 the lsquoautoexpandrsquo option seems to have been removed altogether and wouldtrigger a warning

4568 letMTautoempty4569 ifMTauto

We turn off automatic expansion if output mode is DVI4570 langpdftex-defrang4571 MTrequirespdftex44572 ifnumpdfoutputltne4573 ifMToptauto4574 MTerror4575 Automatic font expansion only works for PDF outputMessageBreak4576 However you are creating a DVI file

IMPLEMENTATION Package options 137

4577 If you have created expanded fonts instances remove `autorsquo from4578 MessageBreak the package options Otherwise you have to switch4579 off expansionMessageBreak completely4580 fi4581 MTautofalse4582 else4583 defMTautoautoexpand4584 fi

Also if pdfTEX is too old4585 4586 MTerror4587 The pdftex version you are using is too old forMessageBreak4588 automatic font expansion4589 If you have created expanded fonts instances remove `autorsquo fromMessageBreak4590 the package options Otherwise you have to switch off expansionMessageBreak4591 completely or upgrade pdftex to version 120 or newer4592 MTautofalse4593 defMTauto1000 4594 4595 langpdftex-defrang4596 langluatex-defrang MTrequiresluatex3relaxdefMTautoautoexpand4597 else4598 langpdftex-defrang

No automatic expansion4599 MTrequirespdftex4relax4600 defMTauto1000 4601 4602 langpdftex-defrang4603 langluatex-defrang4604 MTrequiresluatex34605 ifMToptauto4606 MTerrorNon-automatic font expansion does not work withMessageBreak4607 luatexRemove `auto=falsersquo from the package options or use pdftex4608 MTautotrue4609 fi4610 relax4611 langluatex-defrang4612 fi

Choose the appropriate macro for selected expansion4613 ifMTselected4614 letMTsetexcodesMTsetexcodess4615 else4616 letMTsetexcodesMTsetexcodesn4617 fi

Filter out stretch=0shrink=0 since it would result in a pdfTEX error4618 ifnumMTstretch=z4619 ifnumMTshrink=z4620 MTwarningnl4621 Both the stretch and shrink limit are set to zeroMessageBreak4622 Disabling font expansion4623 MTexpansionfalse4624 fi4625 fi4626 fi4627 ifMTexpansion4628 edefMTactivefeaturesMTactivefeaturesex4629 MTadjustspacingMTexlevel4630 MTinfonlifMTauto Aelse Non-afi utomatic font expansion enabled4631 (level numberMTexlevel)MessageBreak4632 stretch numberMTstretch shrink numberMTshrink4633 step numberMTstep ifMTselectedelse non-fi selected

IMPLEMENTATION Package options 138

MTcheckstep Check whether stretch and shrink are multiples of step4634 defMTcheckstep14635 tempcnta=csname MT1endcsname4636 dividetempcnta MTstep4637 multiplytempcnta MTstep4638 ifnumtempcnta=csname MT1endcsnameelse4639 MTwarningnlThe 1 amount is not a multiple of stepMessageBreak4640 The effective maximum 1 is thetempcntaspace4641 (step numberMTstep)4642 fi4643 4644 MTcheckstepstretch4645 MTcheckstepshrink4646 MTcheckactivesetex

showhyphens Inside showhyphens font expansion should be disabled (Since 20170110 theLATEX format contains a different version for XETEX but since expansion doesnrsquotwork with XETEX we donrsquot have to bother) Since 20191001 the command isrobust

4647 MTifdefinednTFshowhyphens 4648 defMTtemp124649 expandafterCheckCommandcsname showhyphens endcsname[1]14650 DeclareRobustCommandshowhyphens[1]24651 4652 defMTtemp124653 CheckCommandshowhyphens[1]14654 gdefshowhyphens124655 4656 MTtemp4657 setbox0vboxcolorbegingroup4658 everyparparfillskipzskip4659 hsizemaxdimennormalfontpretolerancemnetolerancemne4660 hbadnesszshowboxdepthz 1colorendgroup4661 setbox0vboxcolorbegingrouppdfadjustspacingz4662 everyparparfillskipzskip4663 hsizemaxdimennormalfontpretolerancemnetolerancemne4664 hbadnesszshowboxdepthz 1colorendgroup

4665 else4666 letMTexpansionrelax4667 MTinfonlNo font expansion4668 fi4669 4670 langpdftex-def|luatex-defrang4671 langxetex-defrang4672 defMTsetupexpansion4673 ifMTexpansion4674 ifMToptexpansion4675 MTerrorFont expansion does not work with xetex4676 Use pdftex or luatex instead4677 fi4678 fi4679 4680 langxetex-defrang

MTsetuptracking Tracking spacing and kerning4681 langpdftex-def|luatex-defrang4682 langpdftex-defrangMTrequirespdftex64683 langluatex-defrangMTrequiresluatex34684 defMTsetuptracking4685 ifMTtracking4686 edefMTactivefeaturesMTactivefeaturestr4687 MTinfonlTracking enabled4688 MTcheckactivesettr

IMPLEMENTATION Package options 139

Enable protrusion for compensation at the line edges4689 ifMTprotrusionelseMTprotrudecharsnefi4690 else4691 letMTtrackingrelax4692 MTinfonlNo adjustment of tracking4693 fi4694 4695 langpdftex-def|luatex-defrang

MTsetupspacing

4696 langpdftex-defrang4697 defMTsetupspacing4698 ifMTspacing4699 edefMTactivefeaturesMTactivefeaturessp4700 pdfadjustinterwordgluene4701 MTinfonlAdjustment of interword spacing enabled

The ragged2e package sets interword spaces to a fixed value without glue microtypersquosmodifications can therefore have undesired effects Therefore we issue a warning

4702 MTwithpackageTragged2e4703 MTwarningnlYou are using the `ragged2ersquo packageMessageBreak4704 Adjustment of interword spacing may lead toMessageBreak4705 undesired results when used with `ragged2ersquoMessageBreak4706 In this case disable the `spacingrsquo option4707 4708 MTcheckactivesetsp4709 else4710 letMTspacingrelax4711 MTinfonlNo adjustment of interword spacing4712 fi4713

MTsetupspacingcheck Warning if nonfrenchspacing is active since space factors will be ignoredwith pdfadjustinterwordglue gt0 Why 1500 Because some packages redefinefrenchspacing16

4714 defMTsetupspacingcheck4715 ifMTspacing4716 ifMTbabel else4717 ifnumsfcode` gt 15004718 MTifstreqMTspcontextnonfrenchrelax4719 MTwarningnl4720 stringnonfrenchspacingspace is active Adjustment ofMessageBreak4721 interword spacing will disable it You might wantMessageBreak4722 to add `backslashcharMTMT contextspacing=nonfrenchrsquoMessageBreak4723 to your preamble4724 4725 fi4726 fi4727 fi4728

MTsetupkerning

4729 defMTsetupkerning4730 ifMTkerning4731 edefMTactivefeaturesMTactivefeatureskn4732 pdfprependkernne4733 pdfappendkernne4734 MTinfonlAdjustment of character kerning enabled4735 MTcheckactivesetkn4736 else4737 letMTkerningrelax

16 Cf the ctt thread lsquofrenchspacing with AMS packages and babelrsquo started by Philipp Lehman on16 August 2005 MID ddtbaj$rob$1onlinede

IMPLEMENTATION Package options 140

4738 MTinfonlNo adjustment of character kerning4739 fi4740 4741 langpdftex-defrang

MTerrordoesntwork If pdfTEX is too old we disable tracking spacing and kerning and throw an errormessage We also switch the features off for LuaTEX and XETEX

4742 langpdftex-def|luatex-defrang4743 langluatex-defrang4744 defMTsetuptracking4745 ifMTtracking4746 MTerrorThe tracking feature only works with luatex 062MessageBreak4747 or newer Switching it offUpgrade luatex4748 MTtrackingfalse4749 MTletncMTtrackingrelax4750 else4751 MTinfonlNo adjustment of tracking (luatex too old)4752 fi4753 4754 4755 langluatex-defrang4756 langpdftex-def|xetex-def|luatex-defrang4757 defMTerrordoesntwork14758 csname ifMT1endcsname4759 MTerrorThe 1 feature only works with pdftex 140MessageBreak4760 or newer Switching it off4761 langpdftex-defrang Upgrade pdftex4762 langluatex-def|xetex-defrang Use pdftex instead4763 csname MT1falseendcsname4764 MTletncMT1relax4765 else4766 MTinfonlNo adjustment of 14767 langpdftex-defrang space(pdftex too old)4768 4769 fi4770 4771 langpdftex-def|xetex-defrang defMTsetuptrackingMTerrordoesntworktracking4772 defMTsetupkerning MTerrordoesntworkkerning4773 defMTsetupspacing MTerrordoesntworkspacing4774 langpdftex-defrang4775 langpdftex-def|xetex-def|luatex-defrang

MTsetupwarntracking

4776 langletterspacerangMTaddtosetup4777 langpdftex-def|luatex-defrangdefMTsetupwarntracking

MTwarntrackingDVI With pdfTEX we issue a warning when letterspacing in DVI mode since it willprobably not work We also switch on protrusion if it isnrsquot already to compensatefor the letterspacing kerns

4778 langpdftex-def|luatex-def|letterspacerang4779 4780 langpdftex-def|letterspacerang4781 ifnumpdfoutputltne4782 defMTwarntrackingDVI4783 langletterspacerang MTpdforlua4784 MTwarningnl4785 You are using trackingletterspacing in DVI modeMessageBreak4786 This will probably not work unless the post-MessageBreak4787 processing program (dvips dvipdfm(x) ) isMessageBreak4788 able to create the virtual fonts on the fly4789 langletterspacerang relax4790 MTgletMTwarntrackingDVIrelax4791 4792 else

IMPLEMENTATION Package options 141

4793 langpdftex-def|letterspacerang4794 defMTwarntrackingDVI4795 ifnumpdfprotrudecharsltne globalpdfprotrudecharsne fi4796 MTgletMTwarntrackingDVIrelax4797 4798 langpdftex-def|letterspacerang fi

4799 ifnumMTletterspace=mne4800 letMTletterspaceMTletterspacedefault4801 else4802 MTlstoolargeMTletterspace4803 fi4804 4805 langpdftex-def|luatex-def|letterspacerang4806 langxetex-defrangletMTsetupwarntrackingrelax

MTsetupnoligatures DisableLigatures is only admissible in the preamble therefore we can nowdisable the corresponding macro if it was never called

4807 langpdftex-def|luatex-defrang4808 defMTsetupnoligatures4809 langpdftex-defrang MTrequirespdftex54810 ifMTnoligatures else4811 letMTnoligaturesrelax4812 fi4813 langpdftex-defrang relax4814 4815 langpdftex-def|luatex-defrang4816 langxetex-defrangletMTsetupnoligaturesrelax

Remove the leading comma in MTactivefeatures and set the document switchto true

4817 langpackagerang4818 MTaddtosetup4819 ifxMTactivefeaturesempty else4820 edefMTactivefeaturesexpandaftergobbleMTactivefeatures4821 fi4822 MTdocumenttrue4823

MTsetbabelcontext Interaction with babel4824 defMTsetbabelcontext14825 MTifdefinednTFMTbabel14826 MTvinfo Changing to language context `1rsquoMessageBreakonline4827 expandafterMTexponenexpandaftermicrotypecontext4828 csname MTbabel1endcsname4829 4830 microtypecontextprotrusion=expansion=spacing=kerning=4831 4832

MTshorthandoff Active characters can only be switched off if babel isnrsquot loaded after microtype4833 ifpackageloadedbabel4834 defMTshorthandoff124835 MTinfonlSwitching off 1 babelrsquos active characters (2)4836 shorthandoff24837 4838 defMTshorthandoff124839 MTerrorYou must load `babelrsquo before `MTMTrsquo4840 Otherwise `MTMTrsquo cannot switch off 1 babelrsquosMessageBreak4841 active characters4842

We patch the language switching commands to enable language-dependent setup4843 MTaddtosetup4844 ifMTbabel

IMPLEMENTATION Package options 142

4845 ifpackageloadedbabel4846 MTinfonlRedefining babelrsquos language switching commands4847 letMTorigselectlanguageselectlanguage4848 defselectlanguage14849 MTorigselectlanguage14850 MTsetbabelcontext14851 4852 letMTorigforeignlanguageforeignlanguage4853 defforeignlanguage14854 MTorigforeignlanguage14855 MTsetbabelcontext14856 4857 ifMTkerning

Disable French babelrsquos active characters4858 MTiffalse4859 MTwithbabelandTfrench MTiftrue4860 MTwithbabelandTfrenchb MTiftrue4861 MTwithbabelandTfrancaisMTiftrue4862 MTwithbabelandTcanadienMTiftrue4863 MTwithbabelandTacadian MTiftrue4864 ifMTifMTshorthandoffFrenchfi

Disable Turkish babelrsquos active characters4865 MTiffalse4866 MTwithbabelandTturkish MTiftrue4867 ifMTifMTshorthandoffTurkish=fi4868 fi

In case babel was loaded before microtype4869 MTsetbabelcontextlanguagename4870 4871 MTwarningnlYou did not load the babel packageMessageBreak4872 The `babelrsquo option wonrsquot have any effect4873 4874 fi4875

Now we close the fi from ifMTdraft4876 MTaddtosetupfi

Set up the current font most likely the normal font This has to come after all ofthe setup (including anything from the preamble) has been dealt with

4877 selectfont

MTcurrfile This is the current file (hopefully with the correct extension)4878 edefMTcurrfilejobnametex4879 langpackagerang

Finally execute the setup macro at the end of the preamble and empty it (thecombine class calls it repeatedly)

4880 langpackage|letterspacerang4881 langplainrangMTrequireslatex14882 AtBeginDocumentMTsetup MTgletMTsetupempty4883 langplainrangrelax4884 langpackage|letterspacerang

Must come at the very very end4885 langpackagerangMTifdefinedcTMTsetupspacingcheck4886 langpackagerang AtBeginDocumentMTsetupspacingcheck

Restore catcodes4887 langpackage|letterspacerangMTrestorecatcodes

That was that

CONFIGURATION FILES 143

15 Configuration filesLetrsquos now write the font configuration files

4888 langconfigrang4889

151 Font setsWe first declare some sets in the main configuration file

4890 langm-trang4891 -----------------------------------------------------------------------4892 FONT SETS48934894 DeclareMicrotypeSetall4895 4896

4897 DeclareMicrotypeSetallmath4898 encoding = OT1T1T2ALY1OT4QXT5EU1EU2TUTS1OMLOMSU 48994900 DeclareMicrotypeSetalltext4901 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU 4902

4903 DeclareMicrotypeSetallmath-nott4904 encoding = OT1T1T2ALY1OT4QXT5EU1EU2TUTS1OMLOMSU4905 family = rmsf4906 49074908 DeclareMicrotypeSetalltext-nott4909 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU4910 family = rmsf4911 4912

4913 DeclareMicrotypeSetbasicmath4914 encoding = OT1T1T2ALY1OT4QXT5EU1EU2TUOMLOMS4915 family = rmsf4916 series = md4917 size = normalsizefootnotesizesmalllarge4918 49194920 DeclareMicrotypeSetbasictext4921 encoding = OT1T1T2ALY1OT4QXT5EU1EU2TU4922 family = rmsf4923 series = md4924 size = normalsizefootnotesizesmalllarge4925 4926

4927 DeclareMicrotypeSetsmallcaps4928 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU4929 shape = scsiscit4930 4931

4932 DeclareMicrotypeSetfootnotesize4933 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU4934 size = -small4935 49364937 DeclareMicrotypeSetscriptsize4938 encoding = OT1T1T2ALY1OT4QXT5TS1EU1EU2TU

CONFIGURATION FILES Font variants and aliases 144

4939 size = -footnotesize4940 49414942 DeclareMicrotypeSetnormalfont4943 font = 4944

The default sets4945 -----------------------------------------------------------------------4946 DEFAULT SETS49474948 DeclareMicrotypeSetDefault[protrusion]alltext4949 DeclareMicrotypeSetDefault[expansion] alltext-nott4950 DeclareMicrotypeSetDefault[spacing] alltext-nott4951 DeclareMicrotypeSetDefault[kerning] alltext4952 DeclareMicrotypeSetDefault[tracking] smallcaps4953

152 Font variants and aliasesThese are the variants I happen to be using (expert encoding oldstyle numeralsswashes alternative display inferior and superior numerals) Additionally weadd the now common variants for Lining Tabular Oldstyle and Tabular Oldstylenumbers

4954 -----------------------------------------------------------------------4955 FONT VARIANTS AND ALIASES49564957 DeclareMicrotypeVariantsxjwad01-LF-TLF-OsF-TOsF

Other candidates 2 (proportional digits) e (engraved) f (Fraktur) g (small text)h (shadow) l (outline) n (informal) p (ornaments) r (roman) s (sans serif)t (typewriter) Irsquove omitted them since they seem hardly be used andor they areactually more than just a variant ie they shouldnrsquot share a file

Fonts that are lsquothe samersquo The fontspec package will set lmr as the default fontwhose declarations for EU1EU2TU encoding are in mt-LatinModernRomancfgSince 20161203 the default encoding with XETEX and LuaTEX in the LATEX formatis TU even if fontspec is not loaded

49584959 MTiffalse4960 ifxUnicodeEncodingNameundefinedelse4961 MTifstreqencodingdefaultUnicodeEncodingNameMTiftruerelax4962 fi4963 ifMTfontspecMTiftruefi4964 ifMTif4965 -- ComputerLatin Modern Roman4966 DeclareMicrotypeAliaslmrLatin Modern Roman4967 else4968 DeclareMicrotypeAliaslmrcmr lmodern4969 fi

The Latin Modern fonts the virtual fonts from the ae and zefonts and the eco andhfoldsty packages (oldstyle numerals) as well as mlmodern all inherit the (basic)settings from Computer Modern Roman Some of them are in part overwritten laterWe mustnrsquot forget the Latin Modern math fonts

4970 DeclareMicrotypeAliaslmsycmsy 4971 DeclareMicrotypeAliaslmm cmm 4972 DeclareMicrotypeAliasaer cmr ae4973 DeclareMicrotypeAliaszer cmr zefonts

CONFIGURATION FILES Font variants and aliases 145

4974 DeclareMicrotypeAliascmorcmr eco4975 DeclareMicrotypeAliashforcmr hfoldsty4976 DeclareMicrotypeAliasmlmrcmr mlmodern4977 DeclareMicrotypeAliasmlmsycmsy 4978 DeclareMicrotypeAliasmlmm cmm

Another new Computer Modern extension The newcomputermodern package loadsit by file name

4979 DeclareMicrotypeAliasNew Computer ModernLatin Modern Roman4980 DeclareMicrotypeAliasNewCM10-Bookotf Latin Modern Roman4981 DeclareMicrotypeAliasNewCM10-RegularotfLatin Modern Roman

The packages pxfonts and txfonts fonts inherit Palatino and Times settings re-spectively also the TEX Gyre fonts Pagella and Termes (formerly qfonts)

4982 -- Palatino4983 DeclareMicrotypeAliaspxr ppl pxfonts4984 DeclareMicrotypeAliasqpl ppl TeX Gyre Pagella (formerly qfontsQuasiPalatino)

The lsquoFPL Neursquo fonts a lsquore-implementationrsquo of Palatino4985 DeclareMicrotypeAliasfp9xpplx FPL Neu4986 DeclareMicrotypeAliasfp9jpplj

The newpx package a replacement for pxfonts4987 DeclareMicrotypeAliaszpllfpplx newpxtext4988 DeclareMicrotypeAliaszplosfpplj 4989 DeclareMicrotypeAliaszpltlfpplx 4990 DeclareMicrotypeAliaszpltosfpplj

The domitian package4991 DeclareMicrotypeAliasDomitian-TLF pplx domitian4992 DeclareMicrotypeAliasDomitian-TOsFpplj

The OpenType versions4993 DeclareMicrotypeAliasPalatino LinotypePalatino4994 DeclareMicrotypeAliasPalatino LT Std Palatino4995 DeclareMicrotypeAliasTeX Gyre Pagella Palatino4996 DeclareMicrotypeAliasDomitian Palatino4997 DeclareMicrotypeAliasAsana Math Palatino4998 -- Times New Roman4999 DeclareMicrotypeAliastxrptm txfonts

The newtx package a replacement for txfonts5000 DeclareMicrotypeAliasntxlfptmx newtxtext5001 DeclareMicrotypeAliasntxosfptmj 5002 DeclareMicrotypeAliasntxtlfptmx 5003 DeclareMicrotypeAliasntxtosfptmj

The tempora package5004 DeclareMicrotypeAliasTempora-TLF ptmx tempora5005 DeclareMicrotypeAliasTempora-TOsFptmj 5006 DeclareMicrotypeAliasqtmptm TeX Gyre Termes (formerly qfontsQuasiTimes)

The step package5007 DeclareMicrotypeAliasSTEP-TLF ptmx step5008 DeclareMicrotypeAliasSTEP-TOsFptmj

The stix and stix2 packages (the latter has departed a bit from being a Timesclone but still seems close enough)

5009 DeclareMicrotypeAliasstix ptm stix5010 DeclareMicrotypeAliasstix2ptm stix2

More Times variants to be checked pns mns (TimesNewRomanPS) mnt (Times-NewRomanMT TimesNRSevenMT) mtm (TimesSmallTextMT) pte (TimesEuropa)ptt (TimesTen) TimesEighteen TimesModernEF

CONFIGURATION FILES Interaction with babel 146

MicroPressrsquos Charter version (chmath)5011 -- Charter5012 DeclareMicrotypeAliaschrbch CH Math

The XCharter package extends the Charter fonts5013 DeclareMicrotypeAliasXCharter-TLF bch XCharter5014 DeclareMicrotypeAliasXCharter-TOsFbch

The mathdesign package provides math fonts matching Bitstream Charter and URWGaramond

5015 DeclareMicrotypeAliasmdbchbch mathdesignCharter5016 -- Garamond5017 DeclareMicrotypeAliasmdugmugm mathdesignURW Garamond

The garamondx package an extension of URW Garamond providing small caps andoldstyle figures

5018 DeclareMicrotypeAliaszgmxugm garamondx5019 DeclareMicrotypeAliaszgmjugm 5020 DeclareMicrotypeAliaszgmIugm 5021 DeclareMicrotypeAliaszgmqugm

Because a configuration file for Adobe Garamond wouldnrsquot be permitted for TEX Livedistribution we use EB Garamond as the base font

5022 DeclareMicrotypeAliaspad EBGaramond-LF Adobe Garamond5023 DeclareMicrotypeAliaspadxEBGaramond-TLF 5024 DeclareMicrotypeAliaspadjEBGaramond-TOsF 5025 --

URW Letter Gothic is similar enough to Bitstream Letter Gothic to share the config-uration

5026 DeclareMicrotypeAliasulgblg URW LetterGothic -gt Bitstream LetterGothic12Pitch

The eulervm package virtually extends the Euler fonts5027 DeclareMicrotypeAliaszeureur Euler VM5028 DeclareMicrotypeAliaszeuseus

Euro symbol fonts to save some files5029 DeclareMicrotypeAliaszpeus zpeu Adobe Euro sans -gt serif5030 DeclareMicrotypeAliaseurosanszpeu Adobe Euro sans -gt serif5031

153 Interaction with babel

Contexts that are to be set when switching to a language5032 -----------------------------------------------------------------------5033 INTERACTION WITH THE `babelrsquo PACKAGE50345035 DeclareMicrotypeBabelHook5036 englishUKenglishbritishUSenglishamerican5037 kerning= spacing=nonfrench50385039 DeclareMicrotypeBabelHook5040 frenchfrancaisacadiancanadien5041 kerning=french spacing=50425043 DeclareMicrotypeBabelHook5044 turkish5045 kerning=turkish spacing=5046

CONFIGURATION FILES Note on admissible characters 147

154 Note on admissible charactersAll printable ASCII characters are allowed in the settings with the followingexceptions (on the left hand side the replacements on the right)

textbackslash textbraceleft textbraceright^ textasciicircum

Comma and equal sign must be guarded with braces (lsquorsquo lsquo=rsquo) to keep keyvalhappy

Character commands are allowed as far as they have been defined in the properLATEX way that is when they have been assigned a slot in the font encoding withDeclareTextSymbol or DeclareTextComposite Characters defined via chardefare also possible

Ligatures and mathchardefrsquoed symbols have to be specified numerically Ofcourse numerical identification is possible in any other case too

8-bit characters are also admissible provided they have been declared in theinput encoding file They should however only be used in private configurationfiles where the proper input encoding is guaranteed or else in combination withthe lsquoinputencrsquo key

With XETEX or LuaTEX in contrast it is advisable to use the proper Unicodecharacters or the font-specific glyph names prefixed with lsquorsquo (cf section 16)

155 Character inheritanceFirst the lists of inheriting characters We only declare those characters that are thesame on both sides ie not Πfor O

5047 langm-trang5048 langm-t|zpeu|mvsrang5049 -----------------------------------------------------------------------5050 CHARACTER INHERITANCE50515052 langm-t|zpeu|mvsrang5053 langm-trang

1551 OT1

Glyphs that should possibly inherit settings on one side only 012 (lsquofirsquo ligature)013 (lsquoflrsquo) 014 (lsquoffirsquo) 015 (lsquofflrsquo) AElig aelig Œ œ

5054 DeclareCharacterInheritance5055 encoding = OT1 5056 f = 011 ff5057 i = i5058 j = j5059 O = O5060 o = o5061 5062

CONFIGURATION FILES Character inheritance 148

1552 T1

Candidates here 028 (lsquofirsquo) 029 (lsquoflrsquo) 030 (lsquoffirsquo) 031 (lsquofflrsquo) 156 (lsquoIJrsquo ligature sinceLATEX 20051201 accessible as IJ) 188 (lsquoijrsquo ij) AElig aelig Œ œ

5063 DeclareCharacterInheritance5064 encoding = T1 5065 A = `ArsquoA^A~AAr Ak Au A5066 a = `arsquoa^a~aar ak au a5067 C = rsquoCc Cv C5068 c = rsquocc cv c5069 D = v DDH5070 d = v ddj5071 E = `ErsquoE^EEk Ev E5072 e = `ersquoe^eek ev e5073 f = 027 ff5074 G = u G5075 g = u g5076 I = `IrsquoI^III5077 i = `irsquoi^iii5078 j = j5079 L = LrsquoLv L5080 l = lrsquolv l5081 N = rsquoN~Nv N5082 n = rsquon~nv n5083 O = O`OrsquoO^O~OOH O5084 o = o`orsquoo^o~ooH o5085 R = rsquoRv R5086 r = rsquorv r5087 S = rsquoSc Sv SSS5088 s = rsquosc sv s5089 T = c Tv T5090 t = c tv t5091 U = `UrsquoU^UUH Ur U5092 u = `ursquou^uuH ur u5093 Y = rsquoYY5094 y = rsquoyy5095 Z = rsquoZZv Z5096 z = rsquozzv z

The lsquosoft hyphenrsquo often has reduced right side bearing so that it may already beprotruded hence no inheritance

5097 - = 1275098 5099

1553 LY1

More characters 008 (lsquoflrsquo) 012 (lsquofirsquo) 014 (lsquoffirsquo) 015 (lsquofflrsquo) AElig aelig Œ œ5100 DeclareCharacterInheritance5101 encoding = LY1 5102 A = `ArsquoA^A~AAr A5103 a = `arsquoa^a~aar a5104 C = c C5105 c = c c5106 D = DH5107 E = `ErsquoE^EE5108 e = `ersquoe^ee5109 f = 011 ff5110 I = `IrsquoI^II5111 i = `irsquoi^iii5112 L = L5113 l = l5114 N = ~N

CONFIGURATION FILES Character inheritance 149

5115 n = ~n5116 O = `OrsquoO^O~OOO5117 o = `orsquoo^o~ooo5118 S = v S5119 s = v s5120 U = `UrsquoU^UU5121 u = `ursquou^uu5122 Y = rsquoYY5123 y = rsquoyy5124 Z = v Z5125 z = v z5126 5127

1554 OT4

The Polish OT1 extension More interesting characters here 009 (lsquofkrsquo) 012 (lsquofirsquo)013 (lsquoflrsquo) 014 (lsquoffirsquo) 015 (lsquofflrsquo) AElig aelig Œ œ

5128 DeclareCharacterInheritance5129 encoding = OT4 5130 A = k A5131 a = k a5132 C = rsquoC5133 c = rsquoc5134 E = k E5135 e = k e5136 f = 011 ff5137 i = i5138 j = j5139 L = L5140 l = l5141 N = rsquoN5142 n = rsquon5143 O = OrsquoO5144 o = orsquoo5145 S = rsquoS5146 s = rsquos5147 Z = rsquoZZ5148 z = rsquozz5149 textquotedblleft = FF5150 5151

1555 QX

The Central European QX encoding17 Ligatures 009 (lsquofkrsquo) 012 (lsquofirsquo) 013 (lsquoflrsquo)014 (lsquoffirsquo) 015 (lsquofflrsquo) AElig aelig Œ œ

5152 DeclareCharacterInheritance5153 encoding = QX 5154 A = `ArsquoA^A~AAk AAA5155 a = `arsquoa^a~aak aaa5156 C = rsquoCc C5157 c = rsquocc c5158 D = DH5159 E = `ErsquoE^EEk E5160 e = `ersquoe^eek e5161 f = 011 ff5162 I = `IrsquoI^IIk I5163 i = `irsquoi^iik ii5164 j = j

17 Contributed by Maciej Eder

CONFIGURATION FILES Character inheritance 150

5165 L = L5166 l = l5167 N = rsquoN~N5168 n = rsquon~n5169 O = O`OrsquoO^O~OO5170 o = o`orsquoo^o~oo

The Romanian textcommabelow accents are actually replacements for the cvariants which had previously (and erroneously18) been included in QX encodingThey are still kept for backwards compatibility

5171 S = rsquoSc Stextcommabelow Sv S5172 s = rsquosc stextcommabelow sv s5173 T = c Ttextcommabelow T5174 t = c ttextcommabelow t5175 U = `UrsquoU^UUk U5176 u = `ursquou^uuk u5177 Y = rsquoYY5178 y = rsquoyy5179 Z = rsquoZZv Z5180 z = rsquozzv z5181 = textellipsis5182 5183

1556 T5

The Vietnamese encoding T5 It is so crowded with accented and double-accentedcharacters that there is no room for any ligatures

5184 DeclareCharacterInheritance5185 encoding = T5 5186 A = `ArsquoA~Ah Ad A^Au A5187 `AcircumflexrsquoAcircumflex~AcircumflexhAcircumflexdAcircumflex5188 `AbreversquoAbreve~AbrevehAbrevedAbreve5189 a = `arsquoa~ah ad a^au a5190 `acircumflexrsquoacircumflex~acircumflexhacircumflexdacircumflex5191 `abreversquoabreve~abrevehabrevedabreve5192 D = DJ5193 d = dj5194 E = `ErsquoE~Eh Ed E^E5195 `EcircumflexrsquoEcircumflex~EcircumflexhEcircumflexdEcircumflex5196 e = `ersquoe~eh ed e^e5197 `ecircumflexrsquoecircumflex~ecircumflexhecircumflexdecircumflex5198 I = `IrsquoI~Ih Id I5199 i = `irsquoi~ih id ii5200 O = `OrsquoO~Oh Od O^Ohorn O5201 `OcircumflexrsquoOcircumflex~OcircumflexhOcircumflexdOcircumflex5202 `OhornrsquoOhorn~OhornhOhorndOhorn5203 o = `orsquoo~oh od o^ohorn o5204 `ocircumflexrsquoocircumflex~ocircumflexhocircumflexdocircumflex5205 `ohornrsquoohorn~ohornhohorndohorn5206 U = `UrsquoU~Uh Ud Uhorn U5207 `UhornrsquoUhorn~UhornhUhorndUhorn5208 u = `ursquou~uh ud uhorn u5209 `uhornrsquouhorn~uhornhuhornduhorn5210 Y = `YrsquoY~Yh Yd Y5211 y = `yrsquoy~yh yd y5212 5213

18 Cf httptugorgpipermailtex-live2008-August017204html

CONFIGURATION FILES Character inheritance 151

1557 EU1 EU2 TU

The EU1 ( XETEX) EU2 (LuaTEX) and since fontspec version 25 TU encodingsare not well-defined in the sense that they donrsquot contain a fixed number of glyphsall of which must be present OpenType fonts may contain thousands of glyphsbut we only define those that should be present in every font (basically T1) Thisinheritance list should be overridden by font-specific ones

5214 DeclareCharacterInheritance5215 encoding = TUEU1EU2 5216 A = `ArsquoA^A~AAr Ak Au A5217 a = `arsquoa^a~aar ak au a5218 C = rsquoCc Cv C5219 c = rsquocc cv c5220 D = v DDH5221 d = v ddj5222 E = `ErsquoE^EEk Ev E5223 e = `ersquoe^eek ev e5224 f = f_f sometimes f_f sometimes ff5225 G = u G5226 g = u g5227 I = `IrsquoI^III5228 i = `irsquoi^iii5229 j = j5230 L = LrsquoLv L5231 l = lrsquolv l5232 N = rsquoN~Nv N5233 n = rsquon~nv n5234 O = O`OrsquoO^O~OOH O5235 o = o`orsquoo^o~ooH o5236 R = rsquoRv R5237 r = rsquorv r5238 S = rsquoSc Sv S SS5239 s = rsquosc sv s5240 T = c Tv T5241 t = c tv t5242 U = `UrsquoU^UUH Ur U5243 u = `ursquou^uuH ur u5244 Y = rsquoYY5245 y = rsquoyy5246 Z = rsquoZZv Z5247 z = rsquozzv z5248 52495250 langm-trang

1558 Euro symbols

Make Euro symbols settings simpler5251 langzpeurang5252 DeclareCharacterInheritance5253 encoding = U5254 family = zpeuzpeuseurosans 5255 E = 128 52565257 langzpeurang5258 langmvsrang

Since 20060511 (that is one week after Irsquove added these settings after thepackage had been dormant for six years) marvosymrsquos encoding is (correctly) Uinstead of OT1

5259 DeclareCharacterInheritance5260 encoding = OT1U

CONFIGURATION FILES Tracking 152

5261 family = mvs 5262 164 = 099100101 EURhvEURcrEURtm52635264 langmvsrang

156 TrackingBy default we only disable the lsquofrsquo ligatures for those fonts that have any Thusligatures and especially kerning for all other characters will be retained

5265 langm-trang5266 -----------------------------------------------------------------------5267 TRACKINGLETTERSPACING52685269 SetTracking5270 [ name = default5271 no ligatures = f ]5272 encoding = OT1T1T2ALY1OT4QXEU2TU 5273 5274

157 Font expansionThese are Hagraven Thecirc Thagravenhrsquos original expansion settings They are used for all fonts(until somebody shows mercy and creates font-specific settings)

5275 -----------------------------------------------------------------------5276 EXPANSION52775278 SetExpansion5279 [ name = default ]5280 encoding = OT1OT4QXT1LY1 5281 5282 A = 500 a = 7005283 AE = 500 ae = 7005284 B = 700 b = 7005285 C = 700 c = 7005286 D = 500 d = 7005287 E = 700 e = 7005288 F = 7005289 G = 500 g = 7005290 H = 700 h = 7005291 K = 700 k = 7005292 M = 700 m = 7005293 N = 700 n = 7005294 O = 500 o = 7005295 OE = 500 oe = 7005296 P = 700 p = 7005297 Q = 500 q = 7005298 R = 7005299 S = 700 s = 7005300 U = 700 u = 7005301 W = 700 w = 7005302 Z = 700 z = 7005303 2 = 7005304 3 = 7005305 6 = 7005306 8 = 7005307 9 = 7005308 5309

CONFIGURATION FILES Font expansion 153

Settings for Cyrillic T2A encoding19

5310 SetExpansion5311 [ name = T2A ]5312 encoding = T2A 5313 5314 A = 500 a = 7005315 B = 700 b = 7005316 C = 700 c = 7005317 D = 500 d = 7005318 E = 700 e = 7005319 F = 7005320 G = 500 g = 7005321 H = 700 h = 7005322 K = 700 k = 7005323 M = 700 m = 7005324 N = 700 n = 7005325 O = 500 o = 7005326 P = 700 p = 7005327 Q = 500 q = 7005328 R = 7005329 S = 700 s = 7005330 U = 700 u = 7005331 W = 700 w = 7005332 Z = 700 z = 7005333 2 = 7005334 3 = 7005335 6 = 7005336 8 = 7005337 9 = 7005338 CYRA = 500 cyra = 7005339 CYRB = 700 cyrb = 7005340 CYRV = 700 cyrv = 7005341 CYRG = 700 cyrg = 7005342 CYRD = 700 cyrd = 7005343 CYRE = 700 cyre = 7005344 CYRZH = 700 cyrzh = 7005345 CYRZ = 700 cyrz = 7005346 CYRI = 700 cyri = 7005347 CYRISHRT = 700 cyrishrt = 7005348 CYRK = 700 cyrk = 7005349 CYRL = 700 cyrl = 7005350 CYRM = 700 cyrm = 7005351 CYRN = 700 cyrn = 7005352 CYRO = 500 cyro = 7005353 CYRP = 700 cyrp = 7005354 CYRR = 700 cyrr = 7005355 CYRS = 700 cyrs = 7005356 CYRT = 700 cyrt = 7005357 CYRU = 700 cyru = 7005358 CYRF = 700 cyrf = 7005359 CYRH = 700 cyrh = 7005360 CYRC = 700 cyrc = 7005361 CYRCH = 700 cyrch = 7005362 CYRSH = 700 cyrsh = 7005363 CYRSHCH = 700 cyrshch = 7005364 CYRHRDSN = 700 cyrhrdsn = 7005365 CYRERY = 700 cyrery = 7005366 CYRSFTSN = 700 cyrsftsn = 7005367 CYREREV = 700 cyrerev = 7005368 CYRYU = 700 cyryu = 7005369 CYRYA = 700 cyrya = 7005370 5371

19 Contributed by Karl Karlsson

CONFIGURATION FILES Character protrusion 154

T5 encoding does not contain AE ae OE and oe5372 SetExpansion5373 [ name = T5 ]5374 encoding = T5 5375 5376 A = 500 a = 7005377 B = 700 b = 7005378 C = 700 c = 7005379 D = 500 d = 7005380 E = 700 e = 7005381 F = 7005382 G = 500 g = 7005383 H = 700 h = 7005384 K = 700 k = 7005385 M = 700 m = 7005386 N = 700 n = 7005387 O = 500 o = 7005388 P = 700 p = 7005389 Q = 500 q = 7005390 R = 7005391 S = 700 s = 7005392 U = 700 u = 7005393 W = 700 w = 7005394 Z = 700 z = 7005395 2 = 7005396 3 = 7005397 6 = 7005398 8 = 7005399 9 = 7005400 54015402 langm-trang

158 Character protrusion5403 -----------------------------------------------------------------------5404 PROTRUSION5405

For future historians Hagraven Thecirc Thagravenhrsquos original settings (from protcodetex con-verted to microtype notation)

SetProtrusion [ name = thanh ] encoding = OT1 A = 5050 F = 50 J = 50 K = 50 L = 50 T = 5050 V = 5050 W = 5050 X = 5050 Y = 5050 k = 50 r = 50 t = 50 v = 5050 w = 5050 x = 5050 y = 5050 = 700 = 700

CONFIGURATION FILES Character protrusion 155

= 500 = 500 = 200 = 200 ( = 50 ) = 50 - = 700 textendash = 300 textemdash = 200 textquoteleft = 700 textquoteright = 700 textquotedblleft = 500 textquotedblright = 500

1581 Normal

The default settings always use the most moderate value5406 langcfg-trang5407 SetProtrusion5408 langm-trang [ name = default ]

We also create configuration files for the fonts

bull Bitstream Charter (NFSS code bch)

5409 langbchrang [ name = bch-default ]

bull Bitstream Letter Gothic (blg)

5410 langblgrang [ name = blg-default ]

bull Computer Modern Roman (cmr)

5411 langcmrrang [ name = cmr-default ]

bull EB Garamond

5412 langebgrang [ name = EBGaramond-default ]

bull Minion20 (pmnx pmnj)

5413 langpmnrang [ name = pmnj-default ]

bull Palatino (ppl pplx pplj)

5414 langpplrang [ name = ppl-default ]

bull Times (ptm ptmx ptmj)

5415 langptmrang [ name = ptm-default ]

bull URW Garamond (ugm)5416 langugmrang [ name = ugm-default ]5417 langm-t|cmr|pmnrang 5418 langbch|blg|ebg|ugmrang encoding = OT15419 langppl|ptmrang encoding = OT1OT45420 langbchrang family = bch 5421 langblgrang family = blg 5422 langebgrang family = EBGaramond-LFEBGaramond-OsFEBGaramond-TLFEBGaramond-TOsF 5423 langpplrang family = pplpplxpplj 5424 langptmrang family = ptmptmxptmj 5425 langugmrang family = ugm 5426 5427 langm-t|bch|blg|cmr|ebg|pmn|ppl|ptmrang A = 50505428 langugmrang A = 501005429 langebg|ptmrang AE = 50 5430 langugmrang AE = 150505431 langugmrang B = 505432 langbch|ebg|pmn|ugmrang C = 50

20 Contributed by Harald Harders and Karl Karlsson

CONFIGURATION FILES Character protrusion 156

5433 langbch|ebg|pmnrang D = 505434 langugmrang D = 705435 langugmrang E = 505436 langm-t|bch|cmr|ebg|pmn|ptmrang F = 505437 langugmrang F = 705438 langbch|ebg|pmnrang G = 50 5439 langugmrang G = 50505440 langblgrang I = 1501505441 langm-t|cmr|ebg|pmn|ppl|ptm|ugmrang J = 50 5442 langbch|blgrang J = 100 5443 langblgrang K = 505444 langblgrang K = 50 5445 langm-t|bch|cmr|ebg|pmn|pplrang L = 505446 langblgrang L = 1505447 langptmrang L = 805448 langugmrang L = 1205449 langbch|ebg|pmn|ugmrang O = 50505450 langebgrang OE = 50 5451 langugmrang OE = 50505452 langblgrang P = 1005453 langugmrang P = 505454 langbch|ebg|pmnrang Q = 50705455 langugmrang Q = 50505456 langbchrang R = 505457 langugmrang R = 705458 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang T = 50505459 langblgrang T = 1001005460 langugmrang T = 70705461 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang V = 50505462 langblg|ugmrang V = 70705463 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang W = 50505464 langugmrang W = 70705465 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang X = 50505466 langugmrang X = 50705467 langm-t|bch|cmr|ebg|pmn|pplrang Y = 50505468 langblg|ptm|ugmrang Y = 80805469 langugmrang Z = 50505470 langblgrang f = 1501005471 langblgrang i = 1501505472 langblgrang j = 1001005473 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang k = 505474 langugmrang k = 705475 langblgrang l = 1501505476 langpmnrang l = -505477 langebg|pplrang p = 50505478 langugmrang p = 505479 langebg|pplrang q = 50 5480 langblgrang r = 505481 langblgrang r = 100 805482 langcmr|ebg|pmnrang t = 705483 langbchrang t = 505484 langblgrang t = 150 805485 langugmrang t = 1005486 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang v = 50505487 langblgrang v = 1001005488 langugmrang v = 50705489 langm-t|bch|cmr|ebg|pmn|ppl|ptmrang w = 50505490 langugmrang w = 50705491 langblgrang x = 50505492 langblgrang x = 1001005493 langm-t|bch|ebg|pmnrang y = 505494 langblgrang y = 501005495 langcmr|ppl|ptmrang y = 50705496 langugmrang y = 70

5497 langcmrrang 0 = 50

CONFIGURATION FILES Character protrusion 157

5498 langm-trang 1 = 50505499 langbch|blg|ebg|ptm|ugmrang 1 = 1501505500 langcmrrang 1 = 1002005501 langpmnrang 1 = 505502 langpplrang 1 = 1001005503 langbch|cmr|ebg|ugmrang 2 = 50505504 langblgrang 2 = 1005505 langbch|pmnrang 3 = 50 5506 langcmr|ebg|ugmrang 3 = 50505507 langblgrang 3 = 100 5508 langm-t|ebgrang 4 = 50505509 langbchrang 4 = 100505510 langblgrang 4 = 100 5511 langcmr|ugmrang 4 = 70705512 langpmnrang 4 = 50 5513 langptmrang 4 = 70 5514 langcmrrang 5 = 505515 langebgrang 5 = 50505516 langbchrang 6 = 50 5517 langcmrrang 6 = 505518 langebgrang 6 = 50505519 langm-trang 7 = 50505520 langbch|ebg|pmn|ugmrang 7 = 50805521 langblgrang 7 = 1001005522 langcmr|ptmrang 7 = 501005523 langpplrang 7 = 505524 langcmrrang 8 = 505525 langbch|ebgrang 9 = 50505526 langcmrrang 9 = 505527 langm-t|cmr|ebg|pmn|ppl|ptm|ugmrang = 7005528 langbchrang = 6005529 langblgrang = 4005005530 langblgrang = 5005531 langblgrang = 3004005532 langm-t|cmr|ebg|pmn|ppl|ptm|ugmrang = 5005533 langbchrang = 4005534 langblgrang = 3004005535 langm-t|bch|ebg|pmn|ptmrang = 3005536 langblgrang = 2003005537 langcmr|pplrang = 5005538 langugmrang = 4005539 langblgrang = 1005540 langblgrang = 2002005541 langm-t|ebg|pmn|ptmrang = 1005542 langbch|cmr|ppl|ugmrang = 2005543 langblgrang = 1501505544 langpmnrang = 3003005545 langm-t|bch|cmr|ebg|pmn|pplrang = 50505546 langptmrang = 1001005547 langm-t|bch|blg|cmr|ebg|pmn|ppl|ptmrang ~ = 2002505548 langugmrang ~ = 3003505549 langebg|ppl|ptmrang amp = 501005550 langugmrang amp = 1005551 langm-t|cmr|ebg|pmnrang = 50505552 langbchrang = 505553 langppl|ptmrang = 1001005554 langugmrang = 501005555 langblgrang = 1001005556 langm-t|ppl|ptm|ugmrang = 2002005557 langbch|pmnrang = 2003005558 langblgrang = 1502005559 langcmr|ebgrang = 3003005560 langm-t|cmr|ppl|ptmrang + = 2502505561 langbchrang + = 1502505562 langebgrang + = 300300

CONFIGURATION FILES Character protrusion 158

5563 langblg|pmnrang + = 1502005564 langugmrang + = 2503005565 langblg|ugmrang == 2002005566 langm-t|ebg|pmn|ptmrang ( = 100 ) = 2005567 langbch|ugmrang ( = 200 ) = 2005568 langcmr|blgrang ( = 300 ) = 3005569 langpplrang ( = 100 ) = 3005570 langbch|pmnrang [ = 100 ] = 1005571 langblgrang [ = 300100 ] = 300

5572 langm-t|ebg|pmn|ptmrang = 1002005573 langbchrang = 2005574 langblgrang = 3003005575 langcmr|pplrang = 2003005576 langugmrang = 1003005577 langm-t|ptmrang - = 5005005578 langbch|cmr|pplrang - = 4005005579 langblgrang - = 3004005580 langebgrang - = 3005005581 langpmnrang - = 2004005582 langugmrang - = 5006005583 langblgrang lt = 200100 gt = 1002005584 langblgrang _ = 1502505585 langblgrang | = 2502505586 langm-t|pmnrang textendash = 200200 textemdash = 1501505587 langbchrang textendash = 200300 textemdash = 1502505588 langcmrrang textendash = 400300 textemdash = 3002005589 langebg|ppl|ptmrang textendash = 300300 textemdash = 2002005590 langugmrang textendash = 250300 textemdash = 250250

Why settings for left and right quotes Because in some languages they might beused like that (see the csquotes package for examples)

5591 langm-t|bch|pmnrang textquoteleft = 300400 textquoteright = 3004005592 langblgrang textquoteleft = 400600 textquoteright = 4006005593 langcmrrang textquoteleft = 500700 textquoteright = 5006005594 langebg|pplrang textquoteleft = 500700 textquoteright = 5007005595 langptmrang textquoteleft = 500500 textquoteright = 3005005596 langugmrang textquoteleft = 300600 textquoteright = 3006005597 langm-t|bch|pmnrang textquotedblleft = 300300 textquotedblright = 3003005598 langblgrang textquotedblright = 3004005599 langcmrrang textquotedblleft = 500300 textquotedblright = 2006005600 langebg|ppl|ptmrang textquotedblleft = 300400 textquotedblright = 3004005601 langugmrang textquotedblleft = 400400 textquotedblright = 4004005602 5603

Greek uppercase letters are in OT1 encoding only5604 langm-t|cmr|pmnrang5605 SetProtrusion5606 langm-trang [ name = OT1-default5607 langcmrrang [ name = cmr-OT15608 langpmnrang [ name = pmnj-OT15609 langm-trang load = default ]5610 langcmrrang load = cmr-default ]5611 langpmnrang load = pmnj-default ]5612 langm-trang encoding = OT1 5613 langcmrrang encoding = OT1OT45614 langpmnrang encoding = OT15615 langcmrrang family = cmr 5616 langpmnrang family = pmnj 5617 5618 langm-t|cmrrang AE = 50 5619 langpmnrang OE = 50 5620 langcmrrang5621 00 = 150 Gamma

CONFIGURATION FILES Character protrusion 159

5622 01 = 100100 Delta5623 02 = 50 50 Theta5624 03 = 100100 Lambda5625 06 = 50 50 Sigma5626 07 = 100100 Upsilon5627 08 = 50 50 Phi5628 09 = 50 50 Psi

Remaining slots can be found in the source file5629 langcmrrang5630 56315632 langm-t|cmr|pmnrang

T1 and LY1 encodings contain some more characters The default list will be loadedfirst For XETEX (EU1) and LuaTEX (EU2) we simply use the T1 list as default (fornow)

5633 SetProtrusion5634 langm-trang [ name = T1-default5635 langbchrang [ name = bch-T15636 langblgrang [ name = blg-T15637 langcmrrang [ name = cmr-T15638 langebgrang [ name = EBGaramond-T15639 langpmnrang [ name = pmnj-T15640 langpplrang [ name = ppl-T15641 langptmrang [ name = ptm-T15642 langugmrang [ name = ugm-T15643 langm-trang load = default ]5644 langbchrang load = bch-default ]5645 langblgrang load = blg-default ]5646 langcmrrang load = cmr-default ]5647 langebgrang load = EBGaramond-default ]5648 langpmnrang load = pmnj-default ]5649 langpplrang load = ppl-default ]5650 langptmrang load = ptm-default ]5651 langugmrang load = ugm-default ]5652 langm-trang encoding = T1LY1EU1EU2TU 5653 langbch|cmr|ebg|pmn|pplrang encoding = T1LY15654 langblg|ptm|ugmrang encoding = T15655 langbchrang family = bch 5656 langblgrang family = blg 5657 langcmrrang family = cmr 5658 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF 5659 langpmnrang family = pmnj 5660 langpplrang family = pplpplxpplj 5661 langptmrang family = ptmptmxptmj 5662 langugmrang family = ugm 5663 5664 langm-t|cmrrang AE = 50 5665 langbch|pmnrang OE = 50 5666 langpmnrang TH = 505667 langblgrang v L = 2505668 langblgrang v d = 2505669 langblgrang v l = 2505670 langblgrang v t = 2505671 langblgrang 127 = 3004005672 langblgrang 156 = 100 IJ5673 langblgrang 188 = 80 80 ij5674 langm-t|bch|ebg|pmn|ppl|ptmrang _ = 1001005675 langcmrrang _ = 2002005676 langugmrang _ = 1002005677 langm-t|ebg|pmn|ptmrang textbackslash = 1002005678 langbchrang textbackslash = 1502005679 langblgrang textbackslash = 2503005680 langcmr|pplrang textbackslash = 200300

CONFIGURATION FILES Character protrusion 160

5681 langugmrang textbackslash = 1003005682 langugmrang textbar = 2002005683 langblgrang textendash = 300300 textemdash = 1501505684 langblgrang textquotedbl = 300400 textquotedblleft = 3004005685 langcmrrang textquotedbl = 300300 textquotedblleft = 200600

The EC fonts do something weird they insert an implicit kern between quote andboundary character Therefore we must override the settings from OT1

5686 langm-t|cmr|ebg|ppl|ptm|ugmrang quotesinglbase = 400400 quotedblbase = 4004005687 langblgrang quotesinglbase = 400400 quotedblbase = 3004005688 langbch|pmnrang quotesinglbase = 400400 quotedblbase = 3003005689 langm-t|bch|pmnrang guilsinglleft = 400300 guilsinglright = 3004005690 langblgrang guilsinglleft = 300500 guilsinglright = 3005005691 langcmr|ebg|ppl|ptmrang guilsinglleft = 400400 guilsinglright = 3005005692 langugmrang guilsinglleft = 400400 guilsinglright = 3006005693 langm-trang guillemotleft = 200200 guillemotright = 2002005694 langcmrrang guillemotleft = 300200 guillemotright = 1004005695 langbch|pmnrang guillemotleft = 200200 guillemotright = 1503005696 langblg|ebg|ppl|ptmrang guillemotleft = 300300 guillemotright = 2004005697 langugmrang guillemotleft = 300400 guillemotright = 3004005698 langm-t|bch|cmr|ebg|pmn|ppl|ugmrang textexclamdown = 100 textquestiondown = 100 5699 langblgrang textexclamdown = 200 textquestiondown = 100 5700 langptmrang textexclamdown = 200 textquestiondown = 200 5701 langm-t|cmr|ebg|ppl|ptm|ugmrang textbraceleft = 400200 textbraceright = 2004005702 langbch|blg|pmnrang textbraceleft = 200 textbraceright = 3005703 langm-t|bch|cmr|ebg|ppl|ptm|ugmrang textless = 200100 textgreater = 1002005704 langpmnrang textless = 100 textgreater = 1005705 langpmnrang textvisiblespace = 100100 not in LY1

5706 5707

The lmodern fonts used to restore the original settings from OT1 fonts Now theyrequire even other settings though

5708 langcmrrang5709 SetProtrusion5710 [ name = lmr-T15711 load = cmr-T1 ]5712 encoding = T1LY15713 family = lmr 5714 5715 textquotedblleft = 300400 textquotedblright = 3004005716 57175718 langcmrrang

Settings for the T2A encoding (generic Computer Modern Roman and Minion)21

5719 langm-t|cmr|pmnrang5720 SetProtrusion5721 langm-trang [ name = T2A-default5722 langcmrrang [ name = cmr-T2A5723 langpmnrang [ name = pmnj-T2A5724 langm-trang load = default ]5725 langcmrrang load = cmr-default ]5726 langpmnrang load = pmnj-default ]5727 encoding = T2A5728 langm-trang 5729 langcmrrang family = cmr 5730 langpmnrang family = pmnj 5731 5732 CYRA = 50505733 CYRG = 505734 CYRK = 50

21 Contributed by Karl Karlsson

CONFIGURATION FILES Character protrusion 161

5735 CYRT = 50505736 CYRH = 50505737 CYRU = 50505738 langpmnrang CYRS = 50 5739 langpmnrang CYRO = 50505740 cyrk = 505741 cyrg = 505742 cyrh = 50505743 langm-t|pmnrang cyru = 50505744 langcmrrang cyru = 50705745 langm-trang _ = 1001005746 langcmrrang _ = 2002005747 langm-trang textbackslash = 100200 quotedblbase = 4004005748 langcmrrang textbackslash = 200300 quotedblbase = 4004005749 langpmnrang textbackslash = 100200 quotedblbase = 3003005750 langcmrrang textquotedbl = 300300 textquotedblleft = 2006005751 langm-trang guillemotleft = 200200 guillemotright = 2002005752 langcmrrang guillemotleft = 300200 guillemotright = 1004005753 langpmnrang guillemotleft = 200200 guillemotright = 1503005754 langm-t|cmrrang textbraceleft = 400200 textbraceright = 2004005755 langpmnrang textbraceleft = 200 textbraceright = 3005756 langm-t|cmrrang textless = 200100 textgreater = 1002005757 langpmnrang textless = 100 textgreater = 1005758 57595760 langm-t|cmr|pmnrang

Settings for the QX encoding (generic and Times)22 It also includes some glyphsotherwise in TS1

5761 langm-t|ptmrang5762 SetProtrusion5763 langm-trang [ name = QX-default5764 langptmrang [ name = ptm-QX5765 langm-trang load = default ]5766 langptmrang load = ptm-default ]5767 langm-trang encoding = QX 5768 langptmrang encoding = QX5769 langptmrang family = ptmptmxptmj 5770 5771 AE = 50 5772 langptmrang = 2002005773 = = 1001005774 textunderscore = 1001005775 textbackslash = 1002005776 quotedblbase = 4004005777 langm-trang guillemotleft = 200200 guillemotright = 2002005778 langptmrang guillemotleft = 300300 guillemotright = 2004005779 textexclamdown = 100 textquestiondown = 100 5780 langm-trang textbraceleft = 400200 textbraceright = 2004005781 langptmrang textbraceleft = 200200 textbraceright = 2003005782 textless = 200100 textgreater = 1002005783 textminus = 200200 textdegree = 3003005784 langm-trang copyright = 100100 textregistered = 1001005785 langptmrang copyright = 100150 textregistered = 1001505786 langptmrang textxgeq = 100 textxleq = 100 5787 langptmrang textalpha = 50 textDelta = 70 705788 langptmrang textpi = 50 80 textSigma = 705789 langptmrang textmu = 80 texteuro = 50 505790 langptmrang textellipsis = 150200 textasciitilde = 80 805791 langptmrang textapprox = 50 50 textinfty = 1001005792 langptmrang textdagger = 150150 textdaggerdbl = 1001005793 langptmrang textdiv = 50150 textsection = 80 805794 langptmrang texttimes = 100150 textpm = 50 80

22 Contributed by Maciej Eder

CONFIGURATION FILES Character protrusion 162

5795 langptmrang textbullet = 150150 textperiodcentered = 3003005796 langptmrang textquotesingle = 500500 textquotedbl = 3003005797 langptmrang textperthousand = 505798 57995800 langm-t|ptmrang

T5 is based on OT1 it shares some but not all extra characters of T1 All accentedcharacters are already taken care of by the inheritance list

5801 langcmr|bchrang5802 SetProtrusion5803 langcmrrang [ name = cmr-T55804 langcmrrang load = cmr-default ]5805 langbchrang [ name = bch-T55806 langbchrang load = bch-default ]5807 encoding = T55808 langcmrrang family = cmr 5809 langbchrang family = bch 5810 5811 langbchrang _ = 1001005812 langbchrang textbackslash = 1502005813 langcmrrang textbackslash = 2003005814 langcmrrang textquotedblleft = 2006005815 langcmrrang textquotedbl = 3003005816 langbchrang quotesinglbase = 400400 quotedblbase = 3003005817 langcmrrang quotesinglbase = 400400 quotedblbase = 4004005818 langbchrang guilsinglleft = 400300 guilsinglright = 3004005819 langcmrrang guilsinglleft = 400400 guilsinglright = 3005005820 langbchrang guillemotleft = 200200 guillemotright = 1503005821 langcmrrang guillemotleft = 300200 guillemotright = 1004005822 langbchrang textbraceleft = 200 textbraceright = 3005823 langcmrrang textbraceleft = 400200 textbraceright = 2004005824 textless = 200100 textgreater = 1002005825 58265827 langcmr|bchrang

Minion with lining numbers5828 langpmnrang5829 SetProtrusion5830 [ name = pmnx-OT15831 load = pmnj-default ]5832 encoding = OT15833 family = pmnx 5834 5835 1 = 2301805836 58375838 SetProtrusion5839 [ name = pmnx-T15840 load = pmnj-T1 ]5841 encoding = T1LY15842 family = pmnx 5843 5844 1 = 2301805845 58465847 SetProtrusion5848 [ name = pmnx-T2A5849 load = pmnj-T2A ]5850 encoding = T2A5851 family = pmnx 5852 5853 1 = 2301805854

CONFIGURATION FILES Character protrusion 163

58555856 langpmnrang

Times is the default font for LY1 therefore we provide settings for the additionalcharacters in this encoding too

5857 langptmrang5858 SetProtrusion5859 [ name = ptm-LY15860 load = ptm-T1 ]5861 encoding = LY15862 family = ptmptmxptmj 5863 5864 _ = 1001005865 texttrademark = 1001005866 textregistered = 1001005867 textcopyright = 1001005868 textdegree = 3003005869 textminus = 2002005870 textellipsis = 1502005871 texteuro = 5872 textcent = 1001005873 textquotesingle = 5005005874 textflorin = 50 705875 textdagger = 1501505876 textdaggerdbl = 1001005877 textperthousand = 505878 textbullet = 1501505879 textonesuperior = 1001005880 texttwosuperior = 50 505881 textthreesuperior = 50 505882 textperiodcentered = 3003005883 textplusminus = 50 805884 textmultiply = 1001005885 textdivide = 50150

Remaining slots in the source file5886 58875888 langptmrang

1582 Italics

To find default settings for italic is difficult since the character shapes and theirbehaviour at the beginning or end of line may be wildly different for differentfonts In the generic settings we therefore omit the letters and only set up thepunctuation characters

The italic glyphs of Computer Modern Roman feature a lot of side bearingtherefore almost all of them have to protrude23

5889 SetProtrusion5890 langm-trang [ name = OT1-it ]5891 langbchrang [ name = bch-it ]5892 langblgrang [ name = blg-it5893 langblgrang load = blg-default ]5894 langcmrrang [ name = cmr-it ]5895 langebgrang [ name = EBGaramond-it ]5896 langpmnrang [ name = pmnj-it ]5897 langpplrang [ name = ppl-it ]5898 langptmrang [ name = ptm-it ]5899 langugmrang [ name = ugm-it ]5900 langm-t|bch|blg|ebg|ugmrang encoding = OT1

23 Settings contributed by Hendrik Vogt

CONFIGURATION FILES Character protrusion 164

5901 langppl|ptmrang encoding = OT1OT45902 langbchrang family = bch5903 langblgrang family = blg5904 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF5905 langpplrang family = pplpplxpplj5906 langptmrang family = ptmptmxptmj5907 langugmrang family = ugm5908 langm-t|bch|ebg|ppl|ptmrang shape = itsl 5909 langblg|ugmrang shape = it 5910 langcmr|pmnrang 5911 5912 langcmrrang A = 1001005913 langptmrang A = 100505914 langebg|pmnrang A = 50 5915 langugmrang A = 1505916 langpplrang A = 50505917 langptmrang AE = 100 5918 langebg|pplrang AE = 50 5919 langcmrrang B = 83-405920 langebg|ppl|ptmrang B = 50 5921 langpmnrang B = 20-505922 langbch|ppl|ptm|ugmrang C = 50 5923 langcmrrang C = 165-755924 langebgrang C = 100 5925 langpmnrang C = 50-505926 langcmrrang D = 75 -285927 langebg|ppl|ptmrang D = 50505928 langpmnrang D = 20 5929 langcmrrang E = 80-555930 langebg|ppl|ptmrang E = 50 5931 langpmnrang E = 20-505932 langcmrrang F = 85-805933 langebg|ptmrang F = 100 5934 langpmnrang F = 10 5935 langpplrang F = 50 5936 langbch|ppl|ptm|ugmrang G = 50 5937 langcmrrang G = 153-155938 langebgrang G = 100 5939 langpmnrang G = 50-505940 langcmrrang H = 73-605941 langebg|ppl|ptmrang H = 50 5942 langcmrrang I = 140-1205943 langebg|ptmrang I = 50 5944 langpmnrang I = 20-505945 langcmrrang J = 135-805946 langebgrang J = 50 5947 langpmnrang J = 20 5948 langptmrang J = 100 5949 langcmrrang K = 70-305950 langebg|ppl|ptmrang K = 50 5951 langpmnrang K = 20 5952 langcmrrang L = 87 405953 langebg|ppl|ptmrang L = 50 5954 langpmnrang L = 20505955 langugmrang L = 1005956 langcmrrang M = 67-455957 langpmnrang M = -305958 langptmrang M = 50 5959 langcmrrang N = 75-555960 langpmnrang N = -305961 langptmrang N = 50 5962 langbch|pmn|ppl|ptmrang O = 50 5963 langcmrrang O = 150-305964 langebgrang O = 100 5965 langugmrang O = 7050

CONFIGURATION FILES Character protrusion 165

5966 langppl|ptmrang OE = 50 5967 langebgrang OE = 100 5968 langcmrrang P = 82-505969 langebg|ppl|ptmrang P = 50 5970 langpmnrang P = 20-505971 langbch|pmn|ppl|ptmrang Q = 50 5972 langcmrrang Q = 150-305973 langebgrang Q = 100 5974 langugmrang Q = 70505975 langcmrrang R = 75 155976 langebg|ppl|ptmrang R = 50 5977 langpmnrang R = 20 5978 langbch|ebg|ppl|ptmrang S = 50 5979 langcmrrang S = 90-655980 langpmnrang S = 20-305981 langbch|ebg|ppl|ptmrang $ = 50 5982 langcmrrang $ = 100-205983 langpmnrang $ = 20-305984 langbch|pmn|ugmrang T = 70 5985 langcmrrang T = 220-855986 langebg|ppl|ptmrang T = 100 5987 langcmrrang U = 230-555988 langebg|ppl|ptmrang U = 50 5989 langpmnrang U = 50-505990 langcmrrang V = 260-605991 langebg|pmn|ugmrang V = 100 5992 langppl|ptmrang V = 100505993 langcmrrang W = 185-555994 langebg|pmn|ugmrang W = 100 5995 langpplrang W = 50 5996 langptmrang W = 100505997 langcmrrang X = 70-305998 langppl|ptmrang X = 50 5999 langcmrrang Y = 250-606000 langpmnrang Y = 50 6001 langpplrang Y = 100506002 langptmrang Y = 100 6003 langcmrrang Z = 90-606004 langpmnrang Z = -506005 langcmrrang a = 150-106006 langcmrrang b = 170 6007 langcmrrang c = 173-106008 langcmrrang d = 150-556009 langpmnrang d = -506010 langcmrrang e = 180 6011 langcmrrang f = -2506012 langebg|pmnrang f = -1006013 langcmrrang g = 150-106014 langcmrrang h = 100 6015 langcmrrang i = 210 6016 langpmnrang i = -306017 langcmrrang j = -406018 langpmnrang j = -306019 langcmrrang k = 110-506020 langcmrrang l = 240-1106021 langpmnrang l = -1006022 langcmrrang m = 80 6023 langcmrrang n = 115 6024 langbchrang o = 50506025 langcmrrang o = 155 6026 langbchrang p = 506027 langpmnrang p = -50 6028 langbchrang q = 50 6029 langcmrrang q = 170-406030 langcmrrang r = 155-40

CONFIGURATION FILES Character protrusion 166

6031 langpmnrang r = 506032 langcmrrang s = 130 6033 langbchrang t = 506034 langcmrrang t = 230-106035 langcmrrang u = 120 6036 langcmrrang v = 140-256037 langpmn|ugmrang v = 50 6038 langbchrang w = 506039 langcmrrang w = 98-206040 langpmn|ugmrang w = 50 6041 langcmrrang x = 65-406042 langbchrang y = 506043 langcmrrang y = 130-206044 langcmrrang z = 110-806045 langcmrrang 0 = 170-856046 langbch|ptmrang 1 = 1501006047 langcmrrang 1 = 2301106048 langebgrang 1 = 150 6049 langpmnrang 1 = 50 6050 langpplrang 1 = 100 6051 langugmrang 1 = 1501506052 langcmrrang 2 = 130-706053 langebg|ppl|ptmrang 2 = 50 6054 langpmnrang 2 = -50 6055 langbchrang 3 = 50 6056 langcmrrang 3 = 140-706057 langpmnrang 3 = -100 6058 langptmrang 3 = 100506059 langbchrang 4 = 100 6060 langcmrrang 4 = 130806061 langebgrang 4 = 150 6062 langppl|ptmrang 4 = 50 6063 langcmrrang 5 = 160 6064 langptmrang 5 = 50 6065 langbchrang 6 = 50 6066 langcmrrang 6 = 175-306067 langbch|ebg|ptmrang 7 = 100 6068 langcmrrang 7 = 250-1506069 langpmnrang 7 = 20 6070 langpplrang 7 = 50 6071 langcmrrang 8 = 130-406072 langcmrrang 9 = 155-806073 langm-t|cmr|ebg|pmn|pplrang = 5006074 langblgrang = 4006006075 langbch|ptm|ugmrang = 7006076 langblgrang = 3005006077 langm-t|ebg|pmn|pplrang = 5006078 langcmrrang = 4506079 langbch|ugmrang = 6006080 langptmrang = 7006081 langm-t|cmr|ebg|pplrang = 3006082 langbch|ugmrang = 4006083 langpmnrang = 2006084 langptmrang = 5006085 langm-t|cmr|ebg|pplrang = 3006086 langbch|ugmrang = 4006087 langpmnrang = 2006088 langptmrang = 5006089 langptmrang = 1006090 langbchrang = 2006091 langptmrang = 1006092 langpplrang = 3006093 langpmnrang = 4002006094 langm-t|ebg|pmn|ppl|ptmrang amp = 50506095 langbchrang amp = 80

CONFIGURATION FILES Character protrusion 167

6096 langcmrrang amp = 130306097 langugmrang amp = 501006098 langm-t|ebg|pmnrang = 100 6099 langcmrrang = 180506100 langbchrang = 50506101 langppl|ptmrang = 1001006102 langugmrang = 100506103 langm-t|pmn|pplrang = 2002006104 langbchrang = 3002006105 langcmrrang = 380206106 langebgrang = 5001006107 langptm|ugmrang = 4002006108 langm-t|pmn|pplrang + = 1502006109 langcmrrang + = 1802006110 langbch|ugmrang + = 2502506111 langebg|ptmrang + = 2502006112 langm-t|ebg|pmn|pplrang = 50506113 langbchrang = 80506114 langcmrrang = 180106115 langptmrang = 1501506116 langm-t|bch|ugmrang ~ = 1501506117 langcmr|ebg|pmn|ppl|ptmrang ~ = 2001506118 langugmrang == 2002006119 langm-t|bch|ebg|pmn|ppl|ptm|ugmrang ( = 200 ) = 2006120 langcmrrang ( = 300 ) = 706121 langm-t|ebg|ppl|ptm|ugmrang = 1002006122 langcmrrang = 1001006123 langbchrang = 1506124 langpmnrang = 1001506125 langm-trang - = 3003006126 langbch|ebgrang - = 3004006127 langpmnrang - = 2003006128 langcmrrang - = 5003006129 langpplrang - = 3005006130 langptmrang - = 5005006131 langugmrang - = 4007006132 langblgrang _ = 03006133 langm-t|pmnrang textendash = 200200 textemdash = 1501506134 langbchrang textendash = 200300 textemdash = 1502006135 langcmrrang textendash = 500300 textemdash = 4001706136 langebg|ppl|ptm|ugmrang textendash = 300300 textemdash = 2002006137 langm-t|bch|pmn|ugmrang textquoteleft = 400200 textquoteright = 4002006138 langblgrang textquoteleft = 400400 textquoteright = 4004006139 langcmrrang textquoteleft = 800200 textquoteright = 800-206140 langebgrang textquoteleft = 800200 textquoteright = 8002006141 langpplrang textquoteleft = 700400 textquoteright = 7004006142 langptmrang textquoteleft = 800500 textquoteright = 8005006143 langm-t|bch|pmnrang textquotedblleft = 400200 textquotedblright = 4002006144 langblgrang textquotedblright = 3003006145 langcmrrang textquotedblleft = 540100 textquotedblright = 5001006146 langebgrang textquotedblleft = 700200 textquotedblright = 7002006147 langpplrang textquotedblleft = 500300 textquotedblright = 5003006148 langptmrang textquotedblleft = 700400 textquotedblright = 7004006149 langugmrang textquotedblleft = 600200 textquotedblright = 6002006150 61516152 langcmr|pmnrang6153 SetProtrusion6154 langcmrrang [ name = cmr-it-OT16155 langpmnrang [ name = pmnj-it-OT16156 langcmrrang load = cmr-it ]6157 langpmnrang load = pmnj-it ]6158 langcmrrang encoding = OT1OT46159 langpmnrang encoding = OT16160 langcmrrang family = cmr

CONFIGURATION FILES Character protrusion 168

6161 langpmnrang family = pmnj6162 langcmrrang shape = it 6163 langpmnrang shape = itsl 6164 6165 langcmrrang AE = 100 6166 langpmnrang AE = -506167 langcmrrang OE = 100 6168 langpmnrang OE = 50 6169 langcmrrang6170 00 = 200150 Gamma6171 01 = 150100 Delta6172 02 = 150 50 Theta6173 03 = 150 50 Lambda6174 04 = 100100 Xi6175 05 = 100100 Pi6176 06 = 100 50 Sigma6177 07 = 200150 Upsilon6178 08 = 150 50 Phi6179 09 = 150100 Psi6180 0A = 50 50 Omega6181 langcmrrang6182 61836184 langcmr|pmnrang6185 SetProtrusion6186 langm-trang [ name = T1-it-default6187 langbchrang [ name = bch-it-T16188 langblgrang [ name = blg-it-T16189 langcmrrang [ name = cmr-it-T16190 langebgrang [ name = EBGaramond-it-T16191 langpmnrang [ name = pmnj-it-T16192 langpplrang [ name = ppl-it-T16193 langptmrang [ name = ptm-it-T16194 langugmrang [ name = ugm-it-T16195 langm-trang load = OT1-it ]6196 langbchrang load = bch-it ]6197 langblgrang load = blg-T1 ]6198 langcmrrang load = cmr-it ]6199 langpmnrang load = pmnj-it ]6200 langebgrang load = EBGaramond-it ]6201 langpplrang load = ppl-it ]6202 langptmrang load = ptm-it ]6203 langugmrang load = ugm-it ]6204 langm-t|bch|cmr|ebg|pmn|pplrang encoding = T1LY16205 langblg|ptm|ugmrang encoding = T16206 langbchrang family = bch6207 langblgrang family = blg6208 langcmrrang family = cmr6209 langpmnrang family = pmnj6210 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF6211 langpplrang family = pplpplxpplj6212 langptmrang family = ptmptmxptmj6213 langugmrang family = ugm6214 langm-t|bch|ebg|pmn|ppl|ptmrang shape = itsl 6215 langblg|cmr|ugmrang shape = it 6216 6217 langm-t|bch|pmnrang _ = 1006218 langblgrang _ = 03006219 langcmr|ugmrang _ = 1002006220 langebg|ppl|ptmrang _ = 1001006221 langblgrang = 4006006222 langblgrang = 3005006223 langcmrrang AE = 100 6224 langpmnrang AE = -506225 langbch|pmnrang OE = 50

CONFIGURATION FILES Character protrusion 169

6226 langcmrrang OE = 100 6227 langpmnrang 031 = -100 ffl6228 langcmr|ptmrang 156 = 100 IJ6229 langebgrang 156 = 50 IJ6230 langpmnrang 156 = 20 IJ6231 langpmnrang 188 = -30 ij6232 langpmnrang v t = 1006233 langm-t|ebg|ppl|ptmrang textbackslash = 1002006234 langcmr|ugmrang textbackslash = 3003006235 langbchrang textbackslash = 1501506236 langpmnrang textbackslash = 1001506237 langugmrang textbar = 2002006238 langcmrrang textquotedblleft = 5003006239 langblgrang textquoteleft = 400400 textquoteright = 4004006240 langblgrang textquotedbl = 300300 textquotedblleft = 3003006241 langblgrang textquotedblright = 300300 quotedblbase = 2006006242 langm-t|ptmrang quotesinglbase = 300700 quotedblbase = 4005006243 langcmrrang quotesinglbase = 300700 quotedblbase = 2006006244 langbch|pmnrang quotesinglbase = 200500 quotedblbase = 1505006245 langebg|pplrang quotesinglbase = 500500 quotedblbase = 4004006246 langugmrang quotesinglbase = 300700 quotedblbase = 3005006247 langm-t|ppl|ptmrang guilsinglleft = 400400 guilsinglright = 3005006248 langbch|pmnrang guilsinglleft = 300400 guilsinglright = 2005006249 langcmrrang guilsinglleft = 500300 guilsinglright = 4004006250 langebgrang guilsinglleft = 500400 guilsinglright = 3005006251 langugmrang guilsinglleft = 400400 guilsinglright = 3006006252 langm-t|pplrang guillemotleft = 300300 guillemotright = 3003006253 langbch|pmnrang guillemotleft = 200300 guillemotright = 1504006254 langcmrrang guillemotleft = 400100 guillemotright = 2003006255 langebgrang guillemotleft = 300300 guillemotright = 2004006256 langptmrang guillemotleft = 300400 guillemotright = 2004006257 langugmrang guillemotleft = 300400 guillemotright = 3004006258 langm-t|ebg|ppl|ugmrang textexclamdown = 100 textquestiondown = 200 6259 langcmr|ptmrang textexclamdown = 200 textquestiondown = 200 6260 langpmnrang textexclamdown = -50 textquestiondown = -50 6261 langm-t|ppl|ugmrang textbraceleft = 200100 textbraceright = 2002006262 langbch|pmnrang textbraceleft = 200 textbraceright = 2006263 langcmr|ebg|ptmrang textbraceleft = 400100 textbraceright = 2002006264 langbch|pmnrang textless = 100 textgreater = 1006265 langcmr|ebg|ppl|ptmrang textless = 300100 textgreater = 2001006266 langpmnrang textvisiblespace = 1001006267 62686269 langm-t|cmr|pmnrang6270 SetProtrusion6271 langm-trang [ name = T2A-it-default6272 langcmrrang [ name = cmr-it-T2A6273 langpmnrang [ name = pmnj-it-T2A6274 langm-trang load = OT1-it ]6275 langcmrrang load = cmr-it ]6276 langpmnrang load = pmnj-it ]6277 encoding = T2A6278 langcmrrang family = cmr6279 langpmnrang family = pmnj6280 langm-t|pmnrang shape = itsl 6281 langcmrrang shape = it 6282 6283 langcmrrang CYRA = 100506284 langpmnrang CYRA = 50 6285 langcmrrang CYRB = 50 6286 langcmrrang CYRV = 50 6287 langpmnrang CYRV = 20-506288 langcmrrang CYRG = 100 6289 langpmnrang CYRG = 10 6290 langcmrrang CYRD = 50

CONFIGURATION FILES Character protrusion 170

6291 langcmrrang CYRE = 50 6292 langpmnrang CYRE = 20-506293 langcmrrang CYRZH = 50 6294 langcmrrang CYRZ = 50 6295 langpmnrang CYRZ = 20-506296 langcmrrang CYRI = 50 6297 langpmnrang CYRI = -306298 langcmrrang CYRISHRT = 50 6299 langcmrrang CYRK = 50 6300 langpmnrang CYRK = 20 6301 langcmrrang CYRL = 50 6302 langcmrrang CYRM = 50 6303 langpmnrang CYRM = -306304 langcmrrang CYRN = 50 6305 langcmrrang CYRO = 100 6306 langpmnrang CYRO = 50 6307 langcmrrang CYRP = 50 6308 langcmrrang CYRR = 50 6309 langpmnrang CYRR = 20-506310 langcmrrang CYRS = 100 6311 langpmnrang CYRS = 50 6312 langcmrrang CYRT = 100 6313 langpmnrang CYRT = 70 6314 langcmrrang CYRU = 100 6315 langpmnrang CYRU = 50 6316 langcmrrang CYRF = 100 6317 langcmrrang CYRH = 50 6318 langcmrrang CYRC = 50 6319 langcmrrang CYRCH = 100 6320 langcmrrang CYRSH = 50 6321 langcmrrang CYRSHCH = 50 6322 langcmrrang CYRHRDSN = 100 6323 langcmrrang CYRERY = 50 6324 langcmrrang CYRSFTSN = 50 6325 langcmrrang CYREREV = 50 6326 langcmrrang CYRYU = 50 6327 langcmrrang CYRYA = 50 6328 langpmnrang CYRYA = 206329 langpmnrang cyrr = -50 6330 langm-t|pmnrang _ = 1006331 langcmrrang _ = 1002006332 langpmnrang 031 = -100 ffl6333 langpmnrang v t = 1006334 langm-trang textbackslash = 100200 quotedblbase = 4005006335 langcmrrang textbackslash = 300300 quotedblbase = 2006006336 langpmnrang textbackslash = 100150 quotedblbase = 1505006337 langm-trang guillemotleft = 300300 guillemotright = 3003006338 langcmrrang guillemotleft = 400100 guillemotright = 2003006339 langpmnrang guillemotleft = 200300 guillemotright = 1504006340 langm-trang textbraceleft = 200100 textbraceright = 2002006341 langcmrrang textbraceleft = 400100 textbraceright = 2002006342 langpmnrang textbraceleft = 200 textbraceright = 2006343 langcmrrang textquotedblleft = 5003006344 langcmrrang textless = 300100 textgreater = 2001006345 langpmnrang textless = 100 textgreater = 1006346 63476348 langm-t|cmr|pmnrang6349 langm-t|ptmrang6350 SetProtrusion6351 langm-trang [ name = QX-it-default6352 langptmrang [ name = ptm-it-QX6353 langm-trang load = OT1-it ]6354 langptmrang load = ptm-it ]6355 encoding = QX

CONFIGURATION FILES Character protrusion 171

6356 langptmrang family = ptmptmxptmj6357 shape = itsl 6358 6359 langptmrang 009 = 50 fk6360 = = 1001006361 langm-trang textunderscore = 1001006362 langptmrang textunderscore = 1001506363 textbackslash = 1002006364 quotedblbase = 3004006365 langm-trang guillemotleft = 300300 guillemotright = 3003006366 langptmrang guillemotleft = 200400 guillemotright = 2004006367 textexclamdown = 200 textquestiondown = 200 6368 textbraceleft = 200100 textbraceright = 2002006369 textless = 100100 textgreater = 1001006370 textminus = 200200 textdegree = 3001506371 langm-trang copyright = 100100 textregistered = 1001006372 langptmrang textregistered = 100150 copyright = 1001506373 langptmrang textDelta = 70 textdelta = 506374 langptmrang textpi = 50 80 textmu = 806375 langptmrang texteuro = 200 textellipsis = 1002006376 langptmrang textquoteleft = 500400 textquoteright = 5004006377 langptmrang textquotedblleft = 500300 textquotedblright = 4004006378 langptmrang textapprox = 50 50 textinfty = 1001006379 langptmrang textdagger = 150150 textdaggerdbl = 1001006380 langptmrang textdiv = 150150 textasciitilde = 80 806381 langptmrang texttimes = 100150 textpm = 50 806382 langptmrang textbullet = 300100 textperiodcentered = 3003006383 langptmrang textquotesingle = 500500 textquotedbl = 3003006384 langptmrang textperthousand = 506385 63866387 langm-t|ptmrang6388 langcmr|bchrang6389 SetProtrusion6390 langcmrrang [ name = cmr-it-T56391 langcmrrang load = cmr-it ]6392 langbchrang [ name = bch-it-T56393 langbchrang load = bch-it ]6394 encoding = T56395 langbchrang family = bch6396 langcmrrang family = cmr6397 shape = it 6398 6399 langbchrang _ = 1006400 langcmrrang _ = 1002006401 langbchrang textbackslash = 1501506402 langcmrrang textbackslash = 3003006403 langbchrang quotesinglbase = 200500 quotedblbase = 1505006404 langcmrrang quotesinglbase = 300700 quotedblbase = 2006006405 langbchrang guilsinglleft = 300400 guilsinglright = 2005006406 langcmrrang guilsinglleft = 500300 guilsinglright = 4004006407 langbchrang guillemotleft = 200300 guillemotright = 1504006408 langcmrrang guillemotleft = 400100 guillemotright = 2003006409 langbchrang textbraceleft = 200 textbraceright = 2006410 langcmrrang textbraceleft = 400100 textbraceright = 2002006411 langbchrang textless = 100 textgreater = 1006412 langcmrrang textless = 300100 textgreater = 2001006413 64146415 langcmr|bchrang

Slanted is very similar to italic6416 langcmrrang6417 SetProtrusion6418 [ name = cmr-sl

CONFIGURATION FILES Character protrusion 172

6419 load = cmr-it-OT1 ]6420 encoding = OT1OT46421 family = cmr6422 shape = sl 6423 6424 L = 506425 f = -506426 - = 300 6427 textendash = 400 textemdash = 300 6428 64296430 SetProtrusion6431 [ name = cmr-sl-T16432 load = cmr-it-T1 ]6433 encoding = T1LY16434 family = cmr6435 shape = sl 6436 6437 L = 506438 f = -506439 - = 300 6440 textendash = 400 textemdash = 300 6441 64426443 SetProtrusion6444 [ name = cmr-sl-T2A6445 load = cmr-it-T2A ]6446 encoding = T2A6447 family = cmr6448 shape = sl 6449 6450 L = 506451 f = -506452 - = 300 6453 textendash = 400 textemdash = 300 6454 64556456 SetProtrusion6457 [ name = cmr-sl-T56458 load = cmr-it-T5 ]6459 encoding = T56460 family = cmr6461 shape = sl 6462 6463 L = 506464 f = -506465 - = 300 6466 textendash = 400 textemdash = 300 6467 64686469 SetProtrusion6470 [ name = lmr-it-T16471 load = cmr-it-T1 ]6472 encoding = T1LY16473 family = lmr6474 shape = itsl 6475 6476 textquotedblleft = 200 textquotedblright = 2006477 quotesinglbase = 400 quotedblbase = 5006478 6479

Oldstyle numerals are slightly different6480 SetProtrusion6481 [ name = cmr(oldstyle)-it

CONFIGURATION FILES Character protrusion 173

6482 load = cmr-it-T1 ]6483 encoding = T16484 family = hforcmor6485 shape = itsl 6486 6487 1 = 250 506488 2 = 150-1006489 3 = 100-506490 4 = 1501506491 6 = 200 6492 7 = 200 506493 8 = 150-506494 9 = 100 506495 64966497 langcmrrang6498 langpmnrang6499 SetProtrusion6500 [ name = pmnx-it6501 load = pmnj-it ]6502 encoding = OT16503 family = pmnx6504 shape = itsl 6505 6506 1 = 1001506507 65086509 SetProtrusion6510 [ name = pmnx-it-T16511 load = pmnj-it-T1 ]6512 encoding = T1LY16513 family = pmnx6514 shape = itsl 6515 6516 1 = 1001506517 65186519 SetProtrusion6520 [ name = pmnx-it-T2A6521 load = pmnj-it-T2A ]6522 encoding = T2A6523 family = pmnx6524 shape = itsl 6525 6526 1 = 1001506527 65286529 langpmnrang6530 langptmrang6531 SetProtrusion6532 [ name = ptm-it-LY16533 load = ptm-it-T1 ]6534 encoding = LY16535 family = ptmptmxptmj6536 shape = itsl 6537 6538 _ = 1001006539 texttrademark = 1001006540 textregistered = 1001006541 textcopyright = 1001006542 textdegree = 3001006543 textminus = 2002006544 textellipsis = 1002006545 texteuro = 6546 textcent = 100100

CONFIGURATION FILES Character protrusion 174

6547 textquotesingle = 500 6548 textflorin = 100 706549 textdagger = 1501506550 textdaggerdbl = 1001006551 textbullet = 1501506552 textonesuperior = 1501006553 texttwosuperior = 150 506554 textthreesuperior = 150 506555 textparagraph = 100 6556 textperiodcentered = 5003006557 textonequarter = 50 6558 textonehalf = 50 6559 textplusminus = 1001006560 textmultiply = 1501506561 textdivide = 1501506562 65636564 langptmrang

1583 Small caps

Small caps should inherit the values from their big brothers Since values arerelative to character width we donrsquot need to adjust them any further (but we haveto reset some characters)

6565 lang(blg|ugm)rang6566 SetProtrusion6567 langm-trang [ name = OT1-sc6568 langbchrang [ name = bch-sc6569 langcmrrang [ name = cmr-sc-OT16570 langebgrang [ name = EBGaramond-sc6571 langpmnrang [ name = pmnj-sc6572 langpplrang [ name = ppl-sc6573 langptmrang [ name = ptm-sc6574 langm-trang load = default ]6575 langbchrang load = bch-default ]6576 langcmrrang load = cmr-OT1 ]6577 langebgrang load = EBGaramond-default ]6578 langpmnrang load = pmnj-default ]6579 langpplrang load = ppl-default ]6580 langptmrang load = ptm-default ]6581 langm-t|bch|ebg|pmnrang encoding = OT16582 langcmr|ppl|ptmrang encoding = OT1OT46583 langbchrang family = bch6584 langcmrrang family = cmr6585 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF6586 langpmnrang family = pmnj6587 langpplrang family = pplpplxpplj6588 langptmrang family = ptmptmxptmj6589 shape = sc 6590 6591 a = 50506592 langcmr|ebg|ppl|ptmrang ae = 50 6593 langbch|pmnrang c = 50 6594 langbch|ebg|pmnrang d = 506595 langm-t|bch|cmr|ebg|pmn|ptmrang f = 506596 langbch|ebg|pmnrang g = 50 6597 langm-t|cmr|ebg|pmn|ppl|ptmrang j = 50 6598 langbchrang j = 100 6599 langm-t|bch|cmr|ebg|pmn|pplrang l = 506600 langptmrang l = 806601 langm-t|bch|cmr|ebg|pmn|pplrang 013 = 50 fl6602 langptmrang 013 = 80 fl6603 langbch|ebg|pmnrang o = 5050

CONFIGURATION FILES Character protrusion 175

6604 langebg|pmnrang oe = 50 6605 langpplrang p = 0 06606 langbch|ebg|pmnrang q = 50706607 langpplrang q = 0 6608 langm-t|cmr|ebg|pmn|ppl|ptmrang r = 06609 t = 50506610 langm-t|bch|cmr|ebg|pmn|pplrang y = 50506611 langptmrang y = 80806612 66136614 SetProtrusion6615 langm-trang [ name = T1-sc6616 langbchrang [ name = bch-sc-T16617 langcmrrang [ name = cmr-sc-T16618 langebgrang [ name = EBGaramond-sc-T16619 langpmnrang [ name = pmnj-sc-T16620 langpplrang [ name = ppl-sc-T16621 langptmrang [ name = ptm-sc-T16622 langm-trang load = T1-default ]6623 langbchrang load = bch-T1 ]6624 langcmrrang load = cmr-T1 ]6625 langebgrang load = EBGaramond-T1 ]6626 langpmnrang load = pmnj-T1 ]6627 langpplrang load = ppl-T1 ]6628 langptmrang load = ptm-T1 ]6629 encoding = T1LY16630 langbchrang family = bch6631 langcmrrang family = cmr6632 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF6633 langpmnrang family = pmnj6634 langpplrang family = pplpplxpplj6635 langptmrang family = ptmptmxptmj6636 shape = sc 6637 6638 a = 50506639 langcmr|ebg|ppl|ptmrang ae = 50 6640 langbch|pmnrang c = 50 6641 langbch|ebg|pmnrang d = 506642 langm-t|bch|cmr|ebg|pmn|ptmrang f = 506643 langbch|ebg|pmnrang g = 50 6644 langm-t|cmr|ebg|pmn|ppl|ptmrang j = 50 6645 langbchrang j = 100 6646 langm-t|bch|cmr|ebg|pmn|pplrang l = 506647 langptmrang l = 806648 langm-t|bch|cmr|ebg|pmn|pplrang 029 = 50 fl6649 langptmrang 029 = 80 fl6650 langbch|ebg|pmnrang o = 50506651 langbch|ebg|pmnrang oe = 50 6652 langpplrang p = 0 06653 langbch|ebg|pmnrang q = 50706654 langpplrang q = 0 6655 langm-t|cmr|ebg|pmn|ppl|ptmrang r = 06656 t = 50506657 langm-t|bch|cmr|ebg|pmn|pplrang y = 50506658 langptmrang y = 80806659 66606661 lang(blg|ugm)rang6662 langm-t|cmrrang6663 SetProtrusion6664 langm-trang [ name = T2A-sc6665 langcmrrang [ name = cmr-sc-T2A6666 langm-trang load = T2A-default ]6667 langcmrrang load = cmr-T2A ]6668 encoding = T2A

CONFIGURATION FILES Character protrusion 176

6669 langcmrrang family = cmr6670 shape = sc 6671 6672 cyra = 50506673 cyrg = 506674 cyrt = 50506675 cyry = 506676 66776678 langm-t|cmrrang6679 langm-trang6680 SetProtrusion6681 [ name = QX-sc6682 load = QX-default ]6683 encoding = QX6684 shape = sc 6685 6686 a = 50506687 f = 506688 j = 50 6689 l = 506690 013 = 50 fl6691 r = 06692 t = 50506693 y = 50506694 66956696 langm-trang6697 langcmr|bchrang6698 SetProtrusion6699 langbchrang [ name = bch-sc-T56700 langbchrang load = bch-T5 ]6701 langcmrrang [ name = cmr-sc-T56702 langcmrrang load = cmr-T5 ]6703 encoding = T56704 langbchrang family = bch6705 langcmrrang family = cmr6706 shape = sc 6707 6708 a = 50506709 langbchrang c = 50 6710 langbchrang d = 506711 f = 506712 langbchrang g = 50 6713 langbchrang j = 100 6714 langcmrrang j = 50 6715 l = 506716 langbchrang o = 50506717 langbchrang q = 0 6718 langcmrrang r = 06719 t = 50506720 y = 50506721 67226723 langcmr|bchrang6724 langpmnrang6725 SetProtrusion6726 [ name = pmnx-sc6727 load = pmnj-sc ]6728 encoding = OT16729 family = pmnx6730 shape = sc 6731 6732 1 = 2301806733

CONFIGURATION FILES Character protrusion 177

67346735 SetProtrusion6736 [ name = pmnx-sc-T16737 load = pmnj-sc-T1 ]6738 encoding = T1LY16739 family = pmnx6740 shape = sc 6741 6742 1 = 2301806743 6744

1584 Italic small caps

Minion provides real small caps in italics The slantsc package calls them scitPhilipp Lehmanrsquos fontinstallationguide suggests si

6745 SetProtrusion6746 [ name = pmnj-scit6747 load = pmnj-it ]6748 encoding = OT16749 family = pmnj6750 shape = scitsi 6751 6752 a = 50 6753 ae = -506754 b = 20-506755 c = 50-506756 d = 20 06757 e = 20-506758 f = 10 06759 012 = 10-50 fi6760 013 = 10-50 fl6761 014 = 10-50 ffi6762 015 = 10-50 ffl6763 g = 50-506764 i = 20-506765 j = 20 06766 k = 20 6767 l = 20506768 m = -306769 n = -306770 o = 50 6771 oe = 50-506772 p = 20-506773 q = 50 6774 r = 20 06775 s = 20-306776 t = 70 6777 u = 50-506778 v = 100 6779 w = 100 6780 y = 50 6781 z = -506782 67836784 SetProtrusion6785 [ name = pmnj-scit-T16786 load = pmnj-it-T1 ]6787 encoding = T1LY16788 family = pmnj6789 shape = scitsi 6790 6791 a = 50 6792 ae = -50

CONFIGURATION FILES Character protrusion 178

6793 b = 20-506794 c = 50-506795 d = 20 06796 e = 20-506797 f = 10 06798 028 = 10-50 fi6799 029 = 10-50 fl6800 030 = 10-50 ffi6801 031 = 10-50 ffl6802 g = 50-506803 i = 20-506804 188 = 20 0 ij6805 j = 20 06806 k = 20 6807 l = 20506808 m = -306809 n = -306810 o = 50 6811 oe = 50-506812 p = 20-506813 q = 50 6814 r = 20 06815 s = 20-306816 t = 70 6817 u = 50-506818 v = 100 6819 w = 100 6820 y = 50 6821 z = -506822 68236824 SetProtrusion6825 [ name = pmnx-scit6826 load = pmnj-scit ]6827 encoding = OT16828 family = pmnx6829 shape = scitsi 6830 6831 1 = 1001506832 68336834 SetProtrusion6835 [ name = pmnx-scit-T16836 load = pmnj-scit-T1 ]6837 encoding = T1LY16838 family = pmnx6839 shape = scitsi 6840 6841 1 = 1001506842 68436844 langpmnrang

1585 Text companion

Finally the TS1 encoding Still quite incomplete for Times and especially PalatinoAnybody

6845 SetProtrusion6846 langm-trang [ name = textcomp ]6847 langbchrang [ name = bch-textcomp ]6848 langblgrang [ name = blg-textcomp ]6849 langcmrrang [ name = cmr-textcomp ]6850 langebgrang [ name = EBGaramond-textcomp ]6851 langpmnrang [ name = pmn-textcomp ]

CONFIGURATION FILES Character protrusion 179

6852 langpplrang [ name = ppl-textcomp ]6853 langptmrang [ name = ptm-textcomp ]6854 langugmrang [ name = ugm-textcomp ]6855 langm-trang encoding = TS1 6856 langm-trang encoding = TS16857 langbchrang family = bch 6858 langblgrang family = blg 6859 langcmrrang family = cmr 6860 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF 6861 langpmnrang family = pmnxpmnj 6862 langpplrang family = pplpplxpplj 6863 langptmrang family = ptmptmxptmj 6864 langugmrang family = ugm 6865 6866 langblgrang textquotestraightbase = 4005006867 langcmrrang textquotestraightbase = 3003006868 langebg|pmnrang textquotestraightbase = 4004006869 langblgrang textquotestraightdblbase = 3004006870 langcmr|pmnrang textquotestraightdblbase = 3003006871 langebgrang textquotestraightdblbase = 4004006872 langbch|cmr|ebg|pmn|ugmrang texttwelveudash = 2002006873 langbch|cmr|ebg|pmnrang textthreequartersemdash = 1501506874 langugmrang textthreequartersemdash = 2002006875 langblgrang textquotesingle = 5006006876 langcmr|pmnrang textquotesingle = 3004006877 langebgrang textquotesingle = 4005006878 langptmrang textquotesingle = 5005006879 langugmrang textquotesingle = 3005006880 langbch|cmr|pmnrang textasteriskcentered = 2003006881 langblgrang textasteriskcentered = 1502006882 langebgrang textasteriskcentered = 3003006883 langugmrang textasteriskcentered = 1002006884 langpmnrang textfractionsolidus = -200-2006885 langcmrrang textoneoldstyle = 1001006886 langpmnrang textoneoldstyle = 506887 langcmrrang textthreeoldstyle = 506888 langebg|pmnrang textthreeoldstyle = 50 6889 langcmrrang textfouroldstyle = 50 506890 langebg|pmnrang textfouroldstyle = 50 6891 langcmr|ebg|pmnrang textsevenoldstyle = 50 806892 langcmrrang textlangle = 400 6893 langcmrrang textrangle = 4006894 langm-t|bch|pmn|ptmrang textminus = 2002006895 langcmr|ebg|pplrang textminus = 3003006896 langblg|ugmrang textminus = 2503006897 langbch|ebg|pmnrang textlbrackdbl = 100 6898 langblgrang textlbrackdbl = 200 6899 langbch|ebg|pmnrang textrbrackdbl = 1006900 langblgrang textrbrackdbl = 2006901 langpmnrang textasciigrave = 2005006902 langbch|blg|cmr|ebg|pmnrang texttildelow = 2002506903 langpmnrang textasciibreve = 3004006904 langpmnrang textasciicaron = 3004006905 langpmnrang textacutedbl = 2003006906 langpmnrang textgravedbl = 1503006907 langbch|pmn|ugmrang textdagger = 80 806908 langblgrang textdagger = 2002006909 langcmr|ebgrang textdagger = 1001006910 langptmrang textdagger = 1501506911 langblgrang textdaggerdbl = 1501506912 langcmr|ebg|pmnrang textdaggerdbl = 80 806913 langptmrang textdaggerdbl = 1001006914 langbchrang textbardbl = 1001006915 langblg|ugmrang textbardbl = 1501506916 langbchrang textbullet = 200200

CONFIGURATION FILES Character protrusion 180

6917 langblgrang textbullet = 4005006918 langcmr|ebg|pmnrang textbullet = 1006919 langptmrang textbullet = 1501506920 langugmrang textbullet = 501006921 langbch|cmr|pmnrang textcelsius = 50 6922 langebgrang textcelsius = 80 6923 langbchrang textflorin = 50 506924 langblgrang textflorin = 1001006925 langebg|ugmrang textflorin = 1006926 langpmnrang textflorin = 501006927 langptmrang textflorin = 50 706928 langcmrrang textcolonmonetary = 506929 langebg|pmnrang textcolonmonetary = 50 6930 langpmnrang textinterrobang = 1006931 langpmnrang textinterrobangdown = 100 6932 langm-t|ebg|ptmrang texttrademark = 1001006933 langbchrang texttrademark = 1501506934 langblg|cmr|pplrang texttrademark = 2002006935 langpmnrang texttrademark = 50 506936 langugmrang texttrademark = 1001506937 langbch|ugmrang textcent = 50 6938 langptmrang textcent = 1001006939 langbchrang textsterling = 50 6940 langugmrang textsterling = 506941 langbchrang textbrokenbar = 2002006942 langblgrang textbrokenbar = 2502506943 langugmrang textbrokenbar = 2003006944 langpmnrang textasciidieresis = 3004006945 langm-t|bch|cmr|ebg|ptm|ugmrang textcopyright = 1001006946 langpmnrang textcopyright = 1001506947 langpplrang textcopyright = 2002006948 langbch|cmr|ugmrang textordfeminine = 1002006949 langebg|pmnrang textordfeminine = 2002006950 langbch|cmr|ebg|pmn|ugmrang textlnot = 200 6951 langblgrang textlnot = 2001006952 langm-t|bch|cmr|ebg|ptm|ugmrang textregistered = 1001006953 langpmnrang textregistered = 501506954 langpplrang textregistered = 2002006955 langpmnrang textasciimacron = 1502006956 langm-t|ppl|ptmrang textdegree = 3003006957 langbchrang textdegree = 1502006958 langblg|ugmrang textdegree = 2002006959 langcmr|ebgrang textdegree = 4004006960 langpmnrang textdegree = 1504006961 langbch|cmr|ebg|pmn|ugmrang textpm = 1502006962 langblgrang textpm = 1001006963 langptmrang textpm = 50 806964 langbch|blg|ugmrang texttwosuperior = 1002006965 langcmrrang texttwosuperior = 501006966 langebg|pmnrang texttwosuperior = 2002006967 langptmrang texttwosuperior = 50 506968 langbch|blg|ugmrang textthreesuperior = 1002006969 langcmrrang textthreesuperior = 501006970 langebg|pmnrang textthreesuperior = 2002006971 langptmrang textthreesuperior = 50 506972 langpmnrang textasciiacute = 3004006973 langbch|ugmrang textmu = 1006974 langbch|ebg|pmnrang textparagraph = 1006975 langbch|cmr|ebg|pmnrang textperiodcentered = 3004006976 langblgrang textperiodcentered = 4005006977 langptmrang textperiodcentered = 3003006978 langugmrang textperiodcentered = 2005006979 langbch|blg|ugmrang textonesuperior = 2003006980 langcmr|ebg|pmnrang textonesuperior = 2002006981 langptmrang textonesuperior = 100100

CONFIGURATION FILES Character protrusion 181

6982 langbch|ebg|pmn|ugmrang textordmasculine = 2002006983 langblg|cmrrang textordmasculine = 1002006984 langbch|cmr|pmnrang texteuro = 100 6985 langebgrang texteuro = 501006986 langbchrang texttimes = 2002006987 langblg|ptmrang texttimes = 1001006988 langcmrrang texttimes = 1502506989 langebgrang texttimes = 1001506990 langpmnrang texttimes = 701006991 langugmrang texttimes = 2003006992 langbch|ebg|pmnrang textdiv = 1502006993 langblgrang textdiv = 1001006994 langcmrrang textdiv = 1502506995 langptmrang textdiv = 501006996 langugmrang textdiv = 2003006997 langptmrang textperthousand = 506998 langugmrang textsection = 1006999 langugmrang textonehalf = 501007000 langugmrang textonequarter = 501007001 langugmrang textthreequarters = 501007002 langugmrang textsurd = 100

Remaining slots in the source file7003 70047005 langcmr|ebg|pmn|ugmrang7006 SetProtrusion7007 langcmrrang [ name = cmr-textcomp-it ]7008 langebgrang [ name = EBGaramond-textcomp-it ]7009 langpmnrang [ name = pmn-textcomp-it ]7010 langugmrang [ name = ugm-textcomp-it ]7011 encoding = TS17012 langcmrrang family = cmr7013 langebgrang family = EBGaramond-LFEBGaramond-TLFEBGaramond-OsFEBGaramond-TOsF7014 langpmnrang family = pmnxpmnj7015 langugmrang family = ugm7016 langugmrang shape = itsl 7017 langugmrang shape = it 7018 7019 langcmrrang textquotestraightbase = 3006007020 langebg|pmnrang textquotestraightbase = 4004007021 langcmrrang textquotestraightdblbase = 3006007022 langebgrang textquotestraightdblbase = 3004007023 langpmnrang textquotestraightdblbase = 3003007024 texttwelveudash = 2002007025 langcmr|ebg|pmnrang textthreequartersemdash = 1501507026 langugmrang textthreequartersemdash = 2002007027 langcmrrang textquotesingle = 6003007028 langebgrang textquotesingle = 8001007029 langpmnrang textquotesingle = 3002007030 langugmrang textquotesingle = 5005007031 langcmrrang textasteriskcentered = 3002007032 langebgrang textasteriskcentered = 5001007033 langpmnrang textasteriskcentered = 2003007034 langugmrang textasteriskcentered = 3001507035 langpmnrang textfractionsolidus = -200-2007036 langcmrrang textoneoldstyle = 100 507037 langebgrang textoneoldstyle = 100 7038 langpmnrang textoneoldstyle = 50 7039 langebgrang texttwooldstyle = 50 7040 langpmnrang texttwooldstyle = -50 7041 langcmrrang textthreeoldstyle = 100 507042 langpmnrang textthreeoldstyle = -100 7043 langcmrrang textfouroldstyle = 50 507044 langebgrang textfouroldstyle = 50100

CONFIGURATION FILES Character protrusion 182

7045 langcmrrang textsevenoldstyle = 50 807046 langebgrang textsevenoldstyle = 50 7047 langpmnrang textsevenoldstyle = 20 7048 langcmrrang textlangle = 400 7049 langcmrrang textrangle = 4007050 langcmr|ebgrang textminus = 3003007051 langpmnrang textminus = 2002007052 langugmrang textminus = 2503007053 langebg|pmnrang textlbrackdbl = 100 7054 langebg|pmnrang textrbrackdbl = 1007055 langpmnrang textasciigrave = 3003007056 langcmr|ebg|pmnrang texttildelow = 2002507057 langpmnrang textasciibreve = 3003007058 langpmnrang textasciicaron = 3003007059 langpmnrang textacutedbl = 2003007060 langpmnrang textgravedbl = 1503007061 langcmrrang textdagger = 1001007062 langebgrang textdagger = 2001007063 langpmnrang textdagger = 80 507064 langugmrang textdagger = 80 807065 langcmr|ebgrang textdaggerdbl = 80 807066 langpmnrang textdaggerdbl = 80 507067 langugmrang textbardbl = 1501507068 langcmrrang textbullet = 2001007069 langebgrang textbullet = 300 7070 langpmnrang textbullet = 30 707071 langugmrang textbullet = 501007072 langcmrrang textcelsius = 100 7073 langebgrang textcelsius = 200 7074 langpmnrang textcelsius = 50-507075 langebgrang textflorin = 100 7076 langpmnrang textflorin = 501007077 langugmrang textflorin = 1007078 langcmrrang textcolonmonetary = 150 7079 langebgrang textcolonmonetary = 100 7080 langpmnrang textcolonmonetary = 50-507081 langcmr|ebgrang texttrademark = 200 7082 langpmnrang texttrademark = 501007083 langugmrang texttrademark = 150 507084 langugmrang textcent = 50 7085 langugmrang textsterling = 507086 langugmrang textbrokenbar = 2003007087 langpmnrang textasciidieresis = 3002007088 langcmrrang textcopyright = 100 7089 langebgrang textcopyright = 2001007090 langpmnrang textcopyright = 1001507091 langugmrang textcopyright = 300 7092 langcmrrang textordfeminine = 1001007093 langpmnrang textordfeminine = 2002007094 langugmrang textordfeminine = 1002007095 langcmr|ebgrang textlnot = 300 7096 langpmn|ugmrang textlnot = 200 7097 langcmrrang textregistered = 100 7098 langebgrang textregistered = 2001007099 langpmnrang textregistered = 501507100 langugmrang textregistered = 300 7101 langpmnrang textasciimacron = 1502007102 langcmr|ebgrang textdegree = 5001007103 langpmnrang textdegree = 1501507104 langugmrang textdegree = 3002007105 langcmrrang textpm = 1501007106 langebgrang textpm = 2001507107 langpmn|ugmrang textpm = 1502007108 langcmrrang textonesuperior = 400 7109 langebgrang textonesuperior = 300100

CONFIGURATION FILES Character protrusion 183

7110 langpmnrang textonesuperior = 2001007111 langugmrang textonesuperior = 3003007112 langcmrrang texttwosuperior = 400 7113 langebgrang texttwosuperior = 300 7114 langpmnrang texttwosuperior = 2001007115 langugmrang texttwosuperior = 3002007116 langcmrrang textthreesuperior = 400 7117 langebgrang textthreesuperior = 300 7118 langpmnrang textthreesuperior = 2001007119 langugmrang textthreesuperior = 3002007120 langugmrang textmu = 1007121 langpmnrang textasciiacute = 3002007122 langcmrrang textparagraph = 200 7123 langpmnrang textparagraph = 1007124 langcmrrang textperiodcentered = 5005007125 langebg|pmn|ugmrang textperiodcentered = 3004007126 langcmrrang textordmasculine = 1001007127 langpmnrang textordmasculine = 2002007128 langugmrang textordmasculine = 3002007129 langcmrrang texteuro = 200 7130 langebgrang texteuro = 100 7131 langpmnrang texteuro = 100-507132 langcmrrang texttimes = 2002007133 langebgrang texttimes = 2001007134 langpmnrang texttimes = 701007135 langugmrang texttimes = 2003007136 langcmr|ebgrang textdiv = 2002007137 langpmnrang textdiv = 1502007138 langugmrang textdiv = 2003007139 langugmrang textsection = 2007140 langugmrang textonehalf = 501007141 langugmrang textonequarter = 501007142 langugmrang textthreequarters = 501007143 langugmrang textsurd = 1007144 71457146 langcmr|ebg|pmn|ugmrang

1586 Computer Modern math

Now to the math symbols for Computer Modern Roman Definitions have beenextracted from fontmathltx I did not spend too much time fiddling with thesesettings so they can surely be improved

The math font lsquooperatorsrsquo (also used for the mathrm and mathbf alphabets) isOT1cmr which wersquove already set up above Itrsquos declared as

DeclareSymbolFontoperators OT1cmrm nSetSymbolFontoperatorsboldOT1cmrbxn

mathit (OT1cmrmit) is also already set upThere are (for the moment) no settings for mathsf and mathttMath font lsquolettersrsquo (also used as mathnormal) is declared as

DeclareSymbolFontletters OMLcmmmitSetSymbolFontletters boldOMLcmmbit

7147 langcmrrang7148 SetProtrusion7149 [ name = cmr-math-letters ]7150 encoding = OML7151 family = cmm7152 series = mb7153 shape = it

CONFIGURATION FILES Character protrusion 184

7154 7155 A = 100 50 mathnormal7156 B = 50 7157 C = 50 7158 D = 50 507159 E = 50 7160 F = 100 507161 G = 50 507162 H = 50 507163 I = 50 507164 J = 150 507165 K = 501007166 L = 50 507167 M = 50 7168 N = 50 7169 O = 50 7170 P = 50 7171 Q = 50 507172 R = 50 7173 S = 50 7174 T = 501007175 U = 50 507176 V = 1001007177 W = 501007178 X = 501007179 Y = 1001007180 f = 1001007181 h = 1007182 i = 507183 j = 507184 k = 507185 r = 507186 v = 507187 w = 507188 x = 507189 0B = 50100 alpha7190 0C = 50 50 beta7191 0D = 200150 gamma7192 0E = 50 50 delta7193 0F = 50 50 epsilon7194 10 = 50150 zeta7195 12 = 50 theta7196 13 = 100 iota7197 14 = 100 kappa7198 15 = 100 50 lambda7199 16 = 50 mu7200 17 = 50 nu7201 18 = 50 xi7202 19 = 50100 pi7203 1A = 50 50 rho7204 1B = 150 sigma7205 1C = 50150 tau7206 1D = 50 50 upsilon7207 1F = 50100 chi7208 20 = 50 50 psi7209 21 = 50 omega7210 22 = 50 varepsilon7211 23 = 50 vartheta7212 24 = 50 varpi7213 25 = 100 varrho7214 26 = 100100 varsigma7215 27 = 50 50 varphi7216 28 = 100100 leftharpoonup7217 29 = 100100 leftharpoondown7218 2A = 100100 rightharpoonup

CONFIGURATION FILES Character protrusion 185

7219 2B = 100100 rightharpoondown7220 2C = 300200 lhook7221 2D = 200300 rhook7222 2E = 100 triangleright7223 2F = 100 triangleleft7224 3A = 500 ldotp7225 3B = 500 7226 3C = 200100 lt7227 3D = 300400 7228 3E = 100200 gt7229 3F = 200200 star7230 5B = 100 flat7231 5E = 200200 smile7232 5F = 200200 frown7233 7C = 100 jmath7234 7D = 100 wp

Remaining slots in the source file7235 7236

Math font lsquosymbolsrsquo (also used for the mathcal alphabet) is declared as

DeclareSymbolFontsymbols OMScmsymnSetSymbolFontsymbols boldOMScmsybn

7237 SetProtrusion7238 [ name = cmr-math-symbols ]7239 encoding = OMS7240 family = cmsy7241 series = mb7242 shape = n 7243 7244 A = 150 50 mathcal7245 C = 1007246 D = 507247 F = 501507248 I = 1007249 J = 1001507250 K = 1007251 L = 100 7252 M = 50 507253 N = 501007254 P = 507255 Q = 50 7256 R = 507257 T = 501507258 V = 50 507259 W = 507260 X = 1001007261 Y = 100 7262 Z = 1001507263 00 = 300300 -7264 01 = 700 cdot cdotp7265 02 = 150250 times7266 03 = 150250 ast7267 04 = 200300 div7268 05 = 150250 diamond7269 06 = 200200 pm7270 07 = 200200 mp7271 08 = 100100 oplus7272 09 = 100100 ominus7273 0A = 100100 otimes7274 0B = 100100 oslash7275 0C = 100100 odot7276 0D = 100100 bigcirc

CONFIGURATION FILES Character protrusion 186

7277 0E = 100100 circ7278 0F = 100100 bullet7279 10 = 100100 asymp7280 11 = 100100 equiv7281 12 = 200100 subseteq7282 13 = 100200 supseteq7283 14 = 200100 leq7284 15 = 100200 geq7285 16 = 200100 preceq7286 17 = 100200 succeq7287 18 = 200200 sim7288 19 = 150150 approx7289 1A = 200100 subset7290 1B = 100200 supset7291 1C = 200100 ll7292 1D = 100200 gg7293 1E = 300100 prec7294 1F = 100300 succ7295 20 = 100200 leftarrow7296 21 = 200100 rightarrow7297 22 = 100100 uparrow7298 23 = 100100 downarrow7299 24 = 100100 leftrightarrow7300 25 = 100100 nearrow7301 26 = 100100 searrow7302 27 = 100100 simeq7303 28 = 100100 Leftarrow7304 29 = 100100 Rightarrow7305 2A = 100100 Uparrow7306 2B = 100100 Downarrow7307 2C = 100100 Leftrightarrow7308 2D = 100100 nwarrow7309 2E = 100100 swarrow7310 2F = 100 propto7311 30 = 400 prime7312 31 = 100100 infty7313 32 = 150100 in7314 33 = 100150 ni7315 34 = 100100 triangle bigtriangleup7316 35 = 100100 bigtriangledown7317 38 = 100 forall7318 39 = 100 exists7319 3A = 200 neg7320 3E = 200200 top7321 3F = 200200 bot perp7322 5E = 100200 wedge7323 5F = 100200 vee7324 60 = 300 vdash7325 61 = 300 dashv7326 62 = 100100 lfloor7327 63 = 100100 rfloor7328 64 = 100100 lceil7329 65 = 100100 rceil7330 66 = 150 lbrace7331 67 = 150 rbrace7332 68 = 400 langle7333 69 = 400 rangle7334 6C = 100100 updownarrow7335 6D = 100100 Updownarrow7336 6E = 100300 backslash setminus7337 72 = 100100 nabla7338 79 = 200200 dagger7339 7A = 100100 ddagger7340 7B = 100 mathparagraph7341 7C = 100100 clubsuit

CONFIGURATION FILES Character protrusion 187

7342 7D = 100100 diamondsuit7343 7E = 100100 heartsuit7344 7F = 100100 spadesuit

Remaining slots in the source file7345 7346

We donrsquot bother about lsquolargesymbolsrsquo since it will only be used in display mathwhere protrusion doesnrsquot work anyway Itrsquos declared as

DeclareSymbolFontlargesymbolsOMXcmexmn

7347 langcmrrang7348 langcfg-trang

1587 AMS symbols

Settings for the AMS math fonts (amssymb)7349 langcfg-urang

Symbol font lsquoarsquo7350 langmsarang7351 SetProtrusion7352 [ name = AMS-a ]7353 encoding = U7354 family = msa 7355 7356 05 = 150250 centerdot7357 06 = 100100 lozenge7358 07 = 50 50 blacklozenge7359 08 = 50 50 circlearrowright7360 09 = 50 50 circlearrowleft7361 0A = 100100 rightleftharpoons7362 0B = 100100 leftrightharpoons7363 0D = -50200 Vdash7364 0E = -50200 Vvdash7365 0F = -70150 vDash7366 10 = 100150 twoheadrightarrow7367 11 = 100150 twoheadleftarrow7368 12 = 50100 leftleftarrows7369 13 = 50 80 rightrightarrows7370 14 = 120120 upuparrows7371 15 = 120120 downdownarrows7372 16 = 200200 upharpoonright7373 17 = 200200 downharpoonright7374 18 = 200200 upharpoonleft7375 19 = 200200 downharpoonleft7376 1A = 80100 rightarrowtail7377 1B = 80100 leftarrowtail7378 1C = 50 50 leftrightarrows7379 1D = 50 50 rightleftarrows7380 1E = 250 Lsh7381 1F = 250 Rsh7382 20 = 100100 rightsquigarrow7383 21 = 100100 leftrightsquigarrow7384 22 = 100 50 looparrowleft7385 23 = 50100 looparrowright7386 24 = 50 80 circeq7387 25 = 100 succsim7388 26 = 100 gtrsim7389 27 = 100 gtrapprox7390 28 = 150 50 multimap7391 2B = 100150 doteqdot

CONFIGURATION FILES Character protrusion 188

7392 2C = 100150 triangleq7393 2D = 100 50 precsim7394 2E = 100 50 lesssim7395 2F = 50 50 lessapprox7396 30 = 100 50 eqslantless7397 31 = 50 50 eqslantgtr7398 32 = 100 50 curlyeqprec7399 33 = 50100 curlyeqsucc7400 34 = 100 50 preccurlyeq7401 36 = 50 leqslant7402 38 = 50 backprime7403 39 = 250250 dabar the dash bar in dash(leftright)arrow7404 3C = 50100 succcurlyeq7405 3E = 50 geqslant7406 40 = 50 sqsubset7407 41 = 50 sqsupset7408 42 = 150 vartriangleright rhd7409 43 = 150 vartriangleleft lhd7410 44 = 100 trianglerighteq unrhd7411 45 = 100 trianglelefteq unlhd7412 46 = 100100 bigstar7413 48 = 50 50 blacktriangledown7414 49 = 100 blacktriangleright7415 4A = 100 blacktriangleleft7416 4B = 150 dashrightarrow (the arrow)7417 4C = 150 dashleftarrow7418 4D = 50 50 vartriangle7419 4E = 50 50 blacktriangle7420 4F = 50 50 triangledown7421 50 = 50 50 eqcirc7422 56 = 150 Rrightarrow7423 57 = 150 Lleftarrow7424 58 = 100300 checkmark7425 5C = 50 50 angle7426 5D = 50 50 measuredangle7427 5E = 50 50 sphericalangle7428 5F = 50 varpropto7429 60 = 100100 smallsmile7430 61 = 100100 smallfrown7431 62 = 50 Subset7432 63 = 50 Supset7433 66 = 150150 curlywedge7434 67 = 150150 curlyvee7435 68 = 50150 leftthreetimes7436 69 = 100 50 rightthreetimes7437 6C = 50 50 bumpeq7438 6D = 50 50 Bumpeq7439 6E = 100 lll7440 6F = 100 ggg7441 70 = 50100 ulcorner7442 71 = 100 50 urcorner7443 75 = 150200 dotplus7444 76 = 50100 backsim7445 78 = 50100 llcorner7446 79 = 100 50 lrcorner7447 7C = 100100 intercal7448 7D = 50 50 circledcirc7449 7E = 50 50 circledast7450 7F = 50 50 circleddash

Remaining slots in the source file7451 74527453 langmsarang

CONFIGURATION FILES Character protrusion 189

Symbol font lsquobrsquo7454 langmsbrang7455 SetProtrusion7456 [ name = AMS-b ]7457 encoding = U7458 family = msb 7459 7460 A = 50 50 mathbb7461 C = 50 507462 G = 507463 L = 507464 P = 507465 R = 507466 T = 507467 V = 50 507468 X = 50 507469 Y = 50 507470 00 = 50 50 lvertneqq7471 01 = 50 50 gvertneqq7472 02 = 50 50 nleq7473 03 = 50 50 ngeq7474 04 = 100 50 nless7475 05 = 50150 ngtr7476 06 = 100 50 nprec7477 07 = 50150 nsucc7478 08 = 50 50 lneqq7479 09 = 50 50 gneqq7480 0A = 100100 nleqslant7481 0B = 100100 ngeqslant7482 0C = 100 50 lneq7483 0D = 50100 gneq7484 0E = 100 50 npreceq7485 0F = 50100 nsucceq7486 10 = 50 precnsim7487 11 = 50 50 succnsim7488 12 = 50 50 lnsim7489 13 = 50 50 gnsim7490 14 = 50 50 nleqq7491 15 = 50 50 ngeqq7492 16 = 50 50 precneqq7493 17 = 50 50 succneqq7494 18 = 50 50 precnapprox7495 19 = 50 50 succnapprox7496 1A = 50 50 lnapprox7497 1B = 50 50 gnapprox7498 1C = 150200 nsim7499 1D = 50 50 ncong7500 1E = 100150 diagup7501 1F = 100150 diagdown7502 20 = 100 50 varsubsetneq7503 21 = 50100 varsupsetneq7504 22 = 100 50 nsubseteqq7505 23 = 50100 nsupseteqq7506 24 = 100 50 subsetneqq7507 25 = 50100 supsetneqq7508 26 = 100 50 varsubsetneqq7509 27 = 50100 varsupsetneqq7510 28 = 100 50 subsetneq7511 29 = 50100 supsetneq7512 2A = 100 50 nsubseteq7513 2B = 50100 nsupseteq7514 2C = 50100 nparallel7515 2D = 100150 nmid7516 2E = 150150 nshortmid7517 2F = 100100 nshortparallel

CONFIGURATION FILES Character protrusion 190

7518 30 = 150 nvdash7519 31 = 150 nVdash7520 32 = 100 nvDash7521 33 = 100 nVDash7522 34 = 100 ntrianglerighteq7523 35 = 100 ntrianglelefteq7524 36 = 100 ntriangleleft7525 37 = 100 ntriangleright7526 38 = 100200 nleftarrow7527 39 = 100200 nrightarrow7528 3A = 100100 nLeftarrow7529 3B = 50100 nRightarrow7530 3C = 100100 nLeftrightarrow7531 3D = 100200 nleftrightarrow7532 3E = 50 50 divideontimes7533 3F = 50 50 varnothing7534 60 = 200 Finv7535 61 = 50 Game7536 68 = 100100 eqsim7537 69 = 50 beth7538 6A = 50 gimel7539 6B = 150 daleth7540 6C = 200 lessdot7541 6D = 200 gtrdot7542 6E = 100200 ltimes7543 6F = 150100 rtimes7544 70 = 50100 shortmid7545 71 = 50 50 shortparallel7546 72 = 200300 smallsetminus7547 73 = 100200 thicksim7548 74 = 50100 thickapprox7549 75 = 50 50 approxeq7550 76 = 50100 succapprox7551 77 = 50 50 precapprox7552 78 = 100100 curvearrowleft7553 79 = 50150 curvearrowright7554 7A = 50200 digamma7555 7B = 100 50 varkappa7556 7F = 200 backepsilon

Remaining slots in the source file7557 75587559 langmsbrang

1588 Euler

Euler Roman font (package euler)7560 langeurrang7561 SetProtrusion7562 [ name = euler ]7563 encoding = U7564 family = eur 7565 7566 01 = 1001007567 03 = 1001507568 06 = 1007569 07 = 1001507570 08 = 1001007571 0A = 1001007572 0B = 507573 0C = 1007574 0D = 1001007575 0E = 100

CONFIGURATION FILES Character protrusion 191

7576 0F = 1001007577 10 = 1001007578 13 = 1007579 14 = 1007580 15 = 507581 16 = 507582 17 = 501007583 18 = 501007584 1A = 507585 1B = 507586 1C = 501007587 1D = 501007588 1E = 501007589 1F = 501007590 20 = 507591 21 = 507592 22 = 501007593 24 = 507594 27 = 501007595 1 = 1001007596 7 = 501007597 3A = 3005007598 3B = 2004007599 3C = 2001007600 3D = 2002007601 3E = 1002007602 A = 1007603 D = 507604 J = 50 7605 K = 507606 L = 507607 Q = 507608 T = 50 7609 X = 50 507610 Y = 50 7611 h = 507612 k = 507613 7614

Extended by the eulervm package7615 SetProtrusion7616 [ name = euler-vm7617 load = euler ]7618 encoding = U7619 family = zeur 7620 7621 28 = 1002007622 29 = 1002007623 2A = 1001507624 2B = 1001507625 2C = 2003007626 2D = 2003007627 2E = 1007628 2F = 100 7629 3F = 1501507630 5B = 1007631 5E = 1001007632 5F = 1001007633 80 = 507634 81 = 2002507635 82 = 1002007636 76377638 langeurrang

CONFIGURATION FILES Character protrusion 192

Euler Script font (eucal)7639 langeusrang7640 SetProtrusion7641 [ name = euscript ]7642 encoding = U7643 family = eus 7644 7645 A = 1001007646 B = 501007647 C = 50 507648 D = 501007649 E = 501007650 F = 50 7651 G = 50 7652 H = 1007653 K = 507654 L = 1507655 M = 507656 N = 507657 O = 50 507658 P = 50 507659 T = 1007660 U = 507661 V = 50 507662 W = 50 507663 X = 50 507664 Y = 50 7665 Z = 501007666 00 = 2502507667 18 = 2002007668 3A = 2001507669 40 = 1007670 5E = 1001007671 5F = 1001007672 66 = 50 7673 67 = 507674 6E = 2002007675 76767677 SetProtrusion7678 [ name = euscript-vm7679 load = euscript ]7680 encoding = U7681 family = zeus 7682 7683 01 = 6006007684 02 = 2002007685 03 = 2002007686 04 = 2002007687 05 = 1501507688 06 = 2002007689 07 = 2002007690 08 = 1001007691 09 = 1001007692 0A = 1001007693 0B = 1001007694 0C = 1001007695 0D = 1001007696 0E = 1501507697 0F = 1001007698 10 = 1501507699 11 = 1001007700 12 = 1501007701 13 = 1001507702 14 = 150100

CONFIGURATION FILES Character protrusion 193

7703 15 = 1001507704 16 = 2001007705 17 = 1002007706 19 = 1501507707 1A = 1501007708 1B = 1001507709 1C = 1001007710 1D = 1001007711 1E = 2501007712 1F = 1002507713 20 = 1502007714 21 = 1502007715 22 = 1501507716 23 = 1501507717 24 = 1002007718 25 = 1501507719 26 = 1501507720 27 = 1001007721 28 = 1001007722 29 = 1001507723 2A = 1001007724 2B = 1001007725 2C = 1001007726 2D = 1501507727 2E = 1501507728 2F = 1001007729 30 = 1001007730 31 = 1001007731 32 = 1001007732 33 = 1001007733 34 = 1001007734 35 = 1001007735 3E = 1501507736 3F = 1501507737 60 = 2007738 61 = 200 7739 62 = 1001007740 63 = 1001007741 64 = 1001007742 65 = 1001007743 68 = 300 7744 69 = 3007745 6C = 1001007746 6D = 1001007747 6F = 1001007748 72 = 1001007749 73 = 2001007750 76 = 1007751 77 = 100 7752 78 = 50 507753 79 = 1001007754 7A = 1001007755 7D = 1501507756 7E = 1001007757 A8 = 1001007758 A9 = 1001007759 AB = 2002007760 BA = 2007761 BB = 2007762 BD = 2002007763 DE = 2002007764 77657766 langeusrang

CONFIGURATION FILES Character protrusion 194

Euler Fraktur font (eufrak)7767 langeufrang7768 SetProtrusion7769 [ name = mathfrak ]7770 encoding = U7771 family = euf 7772 7773 A = 507774 B = 507775 C = 50 507776 D = 807777 E = 50 7778 G = 507779 L = 807780 O = 507781 T = 807782 X = 80 507783 Z = 80 507784 b = 507785 c = 507786 k = 507787 p = 507788 q = 50 7789 v = 507790 w = 507791 x = 507792 1 = 1001007793 2 = 80 807794 3 = 80 507795 4 = 80 507796 7 = 50 507797 12 = 5005007798 13 = 5005007799 = 2007800 rsquo = 2003007801 ( = 200 7802 ) = 2007803 = 2002007804 + = 2002507805 - = 2002007806 = 3003007807 = 4004007808 = = 2002007809 = 2007810 = 2007811 ] = 2007812 78137814 langeufrang7815 langcfg-urang

1589 Euro symbols

Settings for various Euro symbols (Adobe Euro fonts (packages eurosans europs)ITC Euro fonts (package euroitc) and marvosym24) The euroitc settings are hiddenin the package itself (1437) for lsquofree softwarersquo compliance reasons (Not quitesure whether this is what Karl really had in mind )

7816 langcfg-erang7817 SetProtrusion7818 langzpeurang encoding = U7819 langmvsrang encoding = OT1U

24 Of course there are many more symbols in this font Feel free to contribute protrusion settings

CONFIGURATION FILES Interword spacing 195

Figure 1

Example of interwordspacing (from M SiemoneitTypographisches GestaltenFrankfurtM 1989) Thenumbers indicate thepreference for shrinking theinterword space

7820 langzpeurang family = zpeu 7821 langmvsrang family = mvs 7822 7823 langzpeurang E = 50 7824 langmvsrang 164 = 5050 EUR7825 langmvsrang 068 = 50-100 EURdig7826 78277828 langzpeurang7829 SetProtrusion7830 encoding = U7831 family = zpeu7832 shape = it 7833 7834 E = 100-507835 78367837 SetProtrusion7838 encoding = U7839 family = zpeuseurosans 7840 7841 E = 100507842 78437844 SetProtrusion7845 encoding = U7846 family = zpeuseurosans7847 shape = it 7848 7849 E = 200 7850 78517852 langzpeurang7853 langcfg-erang

159 Interword spacingDefault unit is space

7854 langm-t|cmrrang7855 -----------------------------------------------------------------------7856 INTERWORD SPACING78577858 langm-t|cmrrang7859 langm-trang7860 SetExtraSpacing7861 [ name = default ]7862 encoding = OT1T1LY1OT4QXT5 7863

These settings are only a first approximation The following reasoning is from amail from Ulrich Dirr who also provided the sample in figure 1 I do not claim tohave coped with the task

CONFIGURATION FILES Interword spacing 196

lsquoThe idea is ndash analog to the tables for expansion and protrusion ndash to havetables for optical reductionexpansion of spaces in dependence of the actualcharacter so that the distance between words is optically equal

When reducing distances the (weighting) order is

bull after commas7864 = -500500

bull in front of capitals which have optical more room on their left side eg lsquoArsquolsquoJrsquo lsquoTrsquo lsquoVrsquo lsquoWrsquo and lsquoYrsquo [this is not yet possible ndash RS]

bull in front of capitals which have circleoval shapes on their left side eg lsquoCrsquolsquoGrsquo lsquoOrsquo and lsquoQrsquo [ditto ndash RS]

bull after lsquorrsquo (because of the bigger optical room on the righthand side)7865 r = -300300

bull [before or] after lowercase characters with ascenders7866 b = -2002007867 d = -2002007868 f = -2002007869 h = -2002007870 k = -2002007871 l = -2002007872 t = -200200

bull [before or] after lowercase characters with x-height plus descender withadditional optical space eg lsquovrsquo or lsquowrsquo

7873 c = -1001007874 p = -1001007875 v = -1001007876 w = -1001007877 z = -1001007878 x = -1001007879 y = -100100

bull [before or] after lowercase characters with x-height plus descender withoutadditional optical space

7880 i = 50 -507881 m = 50 -507882 n = 50 -507883 u = 50 -50

bull after colon and semicolon7884 = 200-2007885 = 200-200

bull after punctuation which ends a sentence eg period exclamation markquestion mark

7886 = 250-2507887 = 250-2507888 = 250-250

The order has to be reversed when enlarging is neededrsquo

7889 78907891 langm-trang

Questions are

CONFIGURATION FILES Interword spacing 197

bull Is the result really better

bull Is it overdone (Try with a factor lt 1000)

bull Should the first parameter also be used (Probably)

bull What about quotation marks parentheses etc

Furthermore there seems to be a pdfTEX bug with spacing in combination witha non-zero spaceskip (reported by Axel Berger)

parfillskip0ptrightskip0pt plus 1emspaceskipfontdimen2font test testparpdfadjustinterwordglue2stbscodefont`t=-50 test testbye

Some more characters in T2A25

7892 langcmrrang7893 SetExtraSpacing7894 [ name = T2A7895 load = default ]7896 encoding = T2A7897 family = cmr 7898 7899 cyrg = -3003007900 cyrb = -2002007901 cyrk = -2002007902 cyrs = -1001007903 cyrr = -1001007904 cyrh = -1001007905 cyru = -1001007906 cyrt = 50 -507907 cyrp = 50 -507908 cyri = 50 -507909 cyrishrt = 50 -507910 7911

1591 Nonfrenchspacing

The following settings simulate nonfrenchspacing (since space factors will beignored when spacing adjustment is in effect) They may be used for Englishcontexts

From the TEXbook

lsquoIf the space factor f is different from 1000 the interword glue is computedas follows Take the normal space glue for the current font and add theextra space if f ge 2000 [ ] Then the stretch component is multiplied byf 1000 while the shrink component is multiplied by 1000 f rsquo

The lsquoextra spacersquo (fontdimen7) for Computer Modern Roman is a third offontdimen2 ie 333

7912 SetExtraSpacing7913 [ name = nonfrench-cmr7914 load = default7915 context = nonfrench ]7916 encoding = OT1T1LY1OT4QXT5

25 Contributed by Karl Karlsson

CONFIGURATION FILES Additional kerning 198

7917 family = cmr 7918

latexltx has

defnonfrenchspacing sfcode` 3000 sfcode` 3000 sfcode` 3000

7919 = 3332000-6677920 = 3332000-6677921 = 3332000-667

sfcode` 2000

7922 = 3331000-500

sfcode` 1500

7923 = 500-333

sfcode` 1250

7924 = 250-200

7925 79267927 langcmrrang

fontinst however which is also used to create the psnfss font metrics setsfontdimen7 to 240 by default Therefore the fallback settings use this value forthe first component

7928 langm-trang7929 SetExtraSpacing7930 [ name = nonfrench-default7931 load = default7932 context = nonfrench ]7933 encoding = OT1T1LY1OT4QXT5 7934 7935 = 2402000-6677936 = 2402000-6677937 = 2402000-6677938 = 2401000-5007939 = 500-3337940 = 250-2007941 7942

Empty settings to prevent spurious warnings7943 SetExtraSpacing7944 [ name = empty ]7945 encoding = TS1 7946 7947

1510 Additional kerningDefault unit is 1em

7948 -----------------------------------------------------------------------7949 ADDITIONAL KERNING7950

CONFIGURATION FILES Additional kerning 199

A dummy list to be loaded when no context is active7951 SetExtraKerning7952 [ name = empty ]7953 encoding = OT1T1T2ALY1OT4QXT5TS1 7954 7955

15101 French

The ratio of fontdimen2 to fontdimen6 varies for different fonts so that eitherthe kerning of the colon (which should be a space ie fontdimen 2) or that of theother punctuation characters (TEXrsquos thinspace ie one sixth of fontdimen6)may be inaccurate depending on which unit we choose (space or 1em) For Timesfor example a thin space would be 665 I donrsquot know whether French typographyreally wants a thin space or rather (as it happens to turn out with CMR) half aspace (Wikipedia26 claims it should be a quarter of an em which seems too muchto me then again it also says that this was a thin space in French typography)

7956 SetExtraKerning7957 [ name = french-default7958 context = french7959 unit = space ]7960 encoding = OT1T1LY1 7961 7962 = 1000 = fontdimen27963 = 500 ~ thinspace7964 = 500 7965 = 500 7966 7967

These settings have the disadvantage that a word following a left guillemet willnot be hyphenated This might be fixed in pdfTEX

7968 SetExtraKerning7969 [ name = french-guillemets7970 context = french-guillemets7971 load = french-default7972 unit = space ]7973 encoding = T1LY1 7974 7975 guillemotleft = 800 = 08fontdimen27976 guillemotright = 800 7977 79787979 SetExtraKerning7980 [ name = french-guillemets-OT17981 context = french-guillemets7982 load = french-default7983 unit = space ]7984 encoding = OT1 7985 7986

15102 Turkish7987 SetExtraKerning7988 [ name = turkish7989 context = turkish ]7990 encoding = OT1T1LY1

26 httpfrwikipediaorgwikiEspace_typographique 5 July 2007

CONFIGURATION FILES Additional kerning 200

7991 7992 = 167 = thinspace7993 = 167 7994 = = 167 7995 79967997 langm-trang7998 langconfigrang

OPENTYPE CONFIGURATION FILES 201

16 OpenType configuration filesThese are the configuration files for the following OpenType fonts27

bull Latin Modern Roman

bull Charis SIL28

bull Palatino29

The settings are typeset in the respective font

161 Character inheritanceOpenType fonts may differ considerably in how complete their arsenal of glyphs isTherefore each font family should have their own inheritance settings

79998000 -----------------------------------------------------------------------8001 INHERITANCE80028003 for xetex (EU1) and luatex (EU2) resp both (TU)8004 langLatinModernRomanrang8005 DeclareCharacterInheritance8006 encoding = EU1EU2TU8007 family = Latin Modern Roman

8008 A = AgraveAacuteAcircAtildeAumlAringĀĂĄǺȀẠẢẤẦẨẪẬẮẰẲẶ8009 Α Greek8010 AElig = Ǽ8011 B = ฿8012 Β Greek8013 C = CcedilĆĈĊČ8014 D = ETHĎĐḌḎ8015 E = EgraveEacuteEcircEumlĒĔĖĘĚȄẸẺẼỀẾỄỂỆ8016 Ε Greek8017 G = ĜĞĠĢǦǴ8018 H = ĤĦḤḦḪ8019 Η Greek8020 I = IgraveIacuteIcircIumlĨĪĬĮİȈỈỊ8021 Ι Greek8022 J = Ĵ8023 K = Ķ8024 Κ Greek8025 L = ĹĻŁḶ ĽĿḸ8026 M = Μ Greek8027 N = NtildeŃŅŇṄṆ8028 Ν Greek8029 O = OgraveOacuteOcircOtildeOumlOslashŌŎŐỌƠǪǾȌỎỐỒỔỖỘỚỜỠỞỢ8030 Ο Greek8031 P = Ρ Greek8032 R = ŔŖŘȐṚṘṜ8033 S = ŚŜŞŠȘṢ8034 T = ŢŤȚṬṮ8035 Τ Greek8036 U = UgraveUacuteUcircUumlŨŪŬŮŰŲƯȔỤỦỨỪỬỮỰ8037 W = ŴẀẂẄ8038 X = Χ Greek8039 Y = YacuteŶŸỴỶỸ

27 This is file microtype-utfdtx28 Available at httpsoftwaresilorgcharis29 These settings have been contributed by Loren B Davis

OPENTYPE CONFIGURATION FILES Character inheritance 202

8040 Z = ŹŻŽẒ8041 Ζ Greek8042 a = agraveaacuteacircatildeaumlaringāăąǻȁạảấầẩẫậắằẳẵ8043 aelig = ǽ8044 c = ccedilćĉċč8045 d = đḍḏ8046 e = egraveeacuteecirceumlēĕėęěȅẹẻẽếềểễệ8047 f = ff Unicode 64256 glyph name in Latin Modern f_f in New Computer Modern ff8048 g = ĝğġģǧǵ8049 h = ĥħḥḧḫ8050 i = igraveiacuteicirciumlĩīĭįıȉỉị8051 j = ĵ8052 k = ķ8053 l = ĺļłḷḹ ľlmiddot8054 n = ntildeńņňṅṇ8055 o = ograveoacuteocircotildeoumloslashōŏőọơǫǿȍỏốồổỗộớờỡởợ8056 r = ŕŗřȑṛṙṝ8057 s = śŝşšșṣ8058 t = ţțṭṯẗ ť8059 u = ugraveuacuteucircuumlũūŭůűųưȕụủứừửữự8060 w = ŵẁẃẅ8061 y = yacuteŷyumlỳỵỷỹ8062 z = źżžẓ8063

8064 langLatinModernRomanrang8065 langCharisSILrang8066 DeclareCharacterInheritance8067 encoding = EU1EU2TU8068 family = Charis SIL

8069 A = AgraveAacuteAcircAtildeAumlAringĀĂĄǍǞǠȦǺȀȂḀẠẢẤẦẨẪẬẮẰẲẴẶꜲ

8070 АӐӒ Cyrillic8071 AElig = Ǣ8072 ǼӔ Cyrillic8073 B = ḂḄḆ8074 В Cyr8075 C = CcedilĆĈḈĊČ8076 СҪ Cyr8077 D = ĎḊḌḎḐḒĐ

8078 E = EgraveEacuteEcircEumlĒĔĖĘĚȄȨȆḔḖḘḚḜẸẺẼẾỀỂỄỆ8079 ЕЀЁӖ Cyr8080 F = Ḟ8081 G = ĜĞĠĢǦǴḠԌ8082 H = ĤȞḢḤḦḨḪ8083 НҢҤӇӉ Cyr8084 I = IgraveIacuteIcircȈIumlĮĨỊĪİǏỈȊĬḬIuml8085 ІЇӀӏ Cyr8086 J = Ĵ8087 Ј Cyr8088 K = ĶǨḰḲḴ

8089 КЌҚҜҞҠӃԞ Cyr8090 L = ĹĻĽḶḸḺḼ Lmiddot

8091 M = ḾṀṂ8092 МӍ Cyr8093 N = NtildeŃŅŇǸṄṆṈṊ

8094 ИЙЍҊӢӤ Cyr

8095 O = OgraveOacuteOcircOtildeOumlŌŎŐǑǪǬȌȎȪȬȮȰṌṎṐṒỌỎỐỒỔỖỘỚỜỞỠƠ8096 ОѲӦӨӪ Cyr8097 Θ Greek8098 P = ṔṖ8099 РҎ Cyr8100 Q = Ԛ Cyr8101 R = ŔŖŘȐȒṘṚṜṞ

8102 S = ŚŜŞŠȘṠṢṤṦṨ

OPENTYPE CONFIGURATION FILES Character inheritance 203

8103 Ѕ Cyr8104 T = ŢŤȚṪṬṮṰ8105 ТҬ Cyr

8106 U = UgraveUacuteUcircUumlŨŪŬŮŰŲǓǕǗǙǛȔȖṲṴṶṸṺỤỦỨỪỬỮỰ8107 V = ṼṾ8108 W = ŴẀẂẄẆẈ8109 Ԝ Cyr8110 X = ẊẌ8111 ХҲӼӾ Cyr8112 Y = YacuteŶŸȲẎỲỴỶỸ8113 ҮҰ Cyr8114 Z = ŹŻŽẐẒẔ

8115 a = agraveaacuteacircatildeaumlaringāăąǎǟǡȧǻȁȃḁạảầấẩẫậắằẳẵặ aʾ8116 аӑӓ Cyr8117 aelig = ǽ8118 ӕ Cyr8119 b = ḃḅḇ8120 c = ccedilćĉċčḉ8121 сҫ Cyr8122 d = ďḋḍḏḑḓ

8123 e = egraveeacuteecirceumlēĕėęěȅȩȇḕḗḙḛḝẹẻẽềếểễệ8124 еѐёӗ Cyr8125 f = ḟff f_f8126 g = ĝğġģǧǵḡ8127 h = ĥȟḣḥḧḩḫẖ8128 Һһ Cyr8129 i = ıigraveiacuteicircȉǐiumlįīịĩḭḯỉȋĭ8130 ії Cyr8131 j = ĵǰ8132 ј Cyr8133 k = ķǩḱḳḵ

8134 l = ĺļḻḷḹḽ ľlmiddot8135 m = ḿṁṃ8136 n = ntildeńņňǹṅṇṉṋ ʼn

8137 o = ograveoacuteocircotildeoumlōŏőǒǫǭȍȏȫȭȯȱṍṏṑṓọỏồốổỗộớờởỡợ8138 оѳӧөӫ Cyr8139 p = ṕṗ8140 рҏ Cyr8141 q = ԛ Cyr8142 r = ŕŗřȑȓṙṛṝṟ8143 s = śŝşšșṡṣṥṧṩ8144 ѕ Cyr8145 t = ţțṫṭṯṱẗ ť

8146 u = ugraveuacuteucircuumlũūŭůűųǔǖǘǚǜȕȗṳṵṷṹṻụủứừửữự8147 v = ṽṿ8148 w = ŵẁẃẅẇẉẘ8149 ԝ Cyr8150 x = ẋẍ8151 хҳ Cyr8152 y = yacuteyumlŷȳẏẙỳỵỷỹ8153 уўӯӱӳ Cyr8154 z = źżžẑẓẕ8155 Cyrillic8156 Г = ЃҐҒӶӺ8157 Ж = ҖӜӁ8158 З = ӞҘ8159 Л = Ӆ8160 П = Ԥ8161 У = ЎӮӰӲ8162 Ч = ҶҸӋӴ8163 Ы = Ӹ8164 Ә = Ӛ8165 Ҽ = Ҿ8166 г = ѓґғӷӻ

OPENTYPE CONFIGURATION FILES Character inheritance 204

8167 ж = җӂӝ8168 з = ҙӟ8169 и = йѝҋӣӥ8170 к = ќқҝҟҡӄԟ8171 л = ӆ8172 м = ӎ8173 н = ңҥӈӊ8174 п = ԥ8175 т = ҭ8176 х = ӽӿ8177 ч = ҷҹӌӵ8178 ш = щ8179 ы = ӹ8180 э = ӭ8181 ҽ = ҿ8182 ә = ӛ8183 ү = ұ8184 Г = Γ Greek8185 П = Π Greek8186 81878188 missing tipa math symbols

8189 langCharisSILrang8190 langPalatinorang8191 DeclareCharacterInheritance8192 encoding = EU1EU2TU8193 family = Palatino

Unfortunately I donrsquot have a Palatino variant containing all of the following glyphsThe settings are typeset in TEX Gyre Pagella missing glyphs printed in red aretaken from Charis SIL glyphs missing even in Charis SIL appear as lsquorsquo To see thereal settings consult mt-Palatinocfg

8194 A = AgraveAacuteAcircAtildeAumlĀĂĄǍǞǠȦǺȀȂḀẠẢẤẦẨẪẬẮẰẲẴẶꜲ8195 B = ḂḄḆ8196 C = CcedilĆĈḈĊČ8197 D = ĎḊḌḎḐḒ8198 E = EgraveEacuteEcircEumlĒĔĖĘĚȄȨȆḔḖḘḚḜẸẺẼẾỀỂỄỆ8199 F = Ḟ8200 G = ĜĞĠĢǦǴḠ8201 H = ĤȞḢḤḦḨḪ8202 I = IgraveIacuteIcircȈIumlĮĨỊĪİǏỈȊĬḬIuml8203 J = Ĵ8204 K = ĶǨḰḲḴ8205 L = ĹĻĽḶḸḺḼỺĿŁ Lmiddot8206 M = ḾṀṂ8207 N = NtildeŃŅŇǸṄṆṈṊ8208 O = OgraveOacuteOcircOtildeOumlŌŎŐǑǪǬȌȎȪȬȮȰṌṎṐṒỌỎỐỒỔỖỘỚỜỞỠƠ8209 P = ṔṖ8210 R = ŔŖŘȐȒṘṚṜṞ8211 S = ŚŜŞŠȘṠṢṤṦṨ8212 T = ŢŤȚṪṬṮṰ8213 U = UgraveUacuteUcircUumlŨŪŬŮŰŲǓǕǗǙǛȔȖṲṴṶṸṺỤỦỨỪỬỮỰ8214 V = ṼṾ8215 W = ŴẀẂẄẆẈ8216 X = ẊẌ8217 Y = YacuteŶŸȲẎỲỴỶỸ8218 Z = ŹŻŽẐẒẔ8219 a = agraveaacuteacircatildeaumlaringāăąǎǟǡȧǻȁȃḁạảầấẩẫậắằẳẵặ aʾ8220 b = ḃḅḇ8221 c = ccedilćĉċčḉ8222 d = ďḋḍḏḑḓ8223 e = egraveeacuteecirceumlēĕėęěȅȩȇḕḗḙḛḝẹẻẽềếểễệ

OPENTYPE CONFIGURATION FILES Character inheritance 205

8224 f = ḟff8225 g = ĝğġģǧǵḡ8226 h = ĥȟḣḥḧḩḫẖ8227 i = ıigraveiacuteicircȉǐiumlįīịĩḭḯỉȋĭ8228 j = ĵǰ8229 k = ķǩḱḳḵ8230 l = ĺļḻḷḹḽ ľlmiddot8231 m = ḿṁṃ8232 n = ntildeńņňǹṅṇṉṋ ʼn8233 o = ograveoacuteocircotildeoumlōŏőǒǫǭȍȏȫȭȯȱṍṏṑṓọỏồốổỗộớờởỡợ8234 p = ṕṗ8235 r = ŕŗřȑȓṙṛṝṟ8236 s = śŝşšșṡṣṥṧṩ8237 t = ţțṫṭṯṱẗ ť8238 u = ugraveuacuteucircuumlũūŭůűųǔǖǘǚǜȕȗṳṵṷṹṻụủứừửữự8239 v = ṽṿ8240 w = ŵẁẃẅẇẉẘ8241 x = ẋẍ8242 y = yacuteyumlŷȳẏẙỳỵỷỹ8243 z = źżžẑẓẕ8244

8245 langPalatinorang

Less characters in the Lato font 8246 langLatorang8247 DeclareCharacterInheritance8248 encoding = TUEU1EU28249 family = Lato

8250 A = AgraveAacuteAcircAtildeAumlAringĄ

8251 a = agraveaacuteacircatildeaumlaringą

8252 C = ĆCcedil

8253 c = ćccedil

8254 D= ETH

8255 E = EgraveEacuteEcircEumlĘ

8256 e = egraveeacuteecirceumlę

8257 I = IgraveIacuteIcircIuml

8258 i = igraveiacuteicirciumlı

8259 L = Ł

8260 l = ł

8261 N= ŃNtilde

8262 n = ńntilde

8263 O= OslashOgraveOacuteOcircOtildeOuml

8264 o = oslashograveoacuteocircotildeouml

8265 S = ŚŠ

8266 s = śš

8267 U= UgraveUacuteUcircUuml

8268 u = ugraveuacuteucircuuml

8269 Y = YacuteŸ

8270 y = yacuteyuml

8271 Z = ŹŻŽ

8272 z = źżž

8273

8274 langLatorang

and even less in the self-professedly awesone Font Awesome font8275 langFontAwesomerang8276 DeclareCharacterInheritance8277 encoding = TUEU1EU28278 family = FontAwesome 8279 8280 langFontAwesomerang

OPENTYPE CONFIGURATION FILES Character protrusion 206

162 Character protrusion82818282 -----------------------------------------------------------------------8283 PROTRUSION82848285 langLatinModernRomanrang8286 SetProtrusion8287 [ name = LMR-default ]8288 encoding = EU1EU2TU8289 family = Latin Modern Roman 8290

8291 A = 50508292 AElig = 50 8293 F = 508294 J = 50 8295 K = 508296 L = 508297 T = 50508298 V = 50508299 W = 50508300 X = 50508301 Y = 50508302 k = 508303 r = 508304 t = 708305 v = 50508306 w = 50508307 x = 50508308 y = 50708309 0 = 508310 1 = 1002008311 2 = 50508312 3 = 50508313 4 = 70708314 5 = 508315 6 = 508316 7 = 501008317 8 = 508318 9 = 508319 = 7008320 = 5008321 = 5008322 = 5008323 = 1008324 = 2008325 = 50508326 ~ = 2002508327 = 50508328 = 3003008329 + = 2502508330 - = 400500 hyphen8331 ndash = 400300 endash8332 mdash = 300200 emdash8333 _ = 200200 underscore8334 = 2003008335 backslash = 2003008336 = 300400 quotesingle8337 lsquo = 500700 rsquo = 5006008338 ldquo = 500300 rdquo = 2006008339 sbquo = 400400 bdquo = 4004008340 lsaquo = 400400 rsaquo = 3005008341 laquo = 300200 raquo = 1004008342 iexcl = 100 iquest = 100 8343 ( = 300 ) = 300

OPENTYPE CONFIGURATION FILES Character protrusion 207

8344 lt = 200100 gt = 1002008345 braceleft = 400200 braceright = 2004008346 angleleft = 400 angleright = 4008347 dagger = 1001008348 Dagger = 80 808349 bull = 2002008350 middot = 400450 periodcentered8351 = 80 508352 ₡ = 508353 deg = 4004008354 trade = 1002008355 copy = 1001008356 reg = 1001008357 ordf = 1002008358 ordm = 1002008359 sup1 = 2002508360 sup2 = 501008361 sup3 = 501008362 not = 200 8363 minus = 3003008364 plusmn = 1502008365 times = 1502508366 divide = 1502508367 euro = 100 8368 oneoldstyle = 1001008369 twooldstyle = 50 508370 threeoldstyle = 30 808371 fouroldstyle = 50 508372 sevenoldstyle = 50 808373 Γ = 180 Gamma8374 Δ = 100100 Delta8375 Θ = 50 50 Theta8376 Λ = 100100 Lambda8377 Ξ = Xi8378 Π = Pi8379 Σ = 50 50 Sigma8380 Υ = 100100 Upsilon8381 Φ = 50 50 Phi8382 Ψ = 50 50 Psi8383 Ω = Omega

8384 83858386 SetProtrusion8387 [ name = LMR-it ]8388 encoding = EU1EU2TU8389 family = Latin Modern Roman8390 shape = itsl 8391

8392 A = 1251008393 AElig = 125-558394 B = 90-408395 C = 145-758396 D = 75 -288397 E = 80-558398 F = 85-808399 G = 153-158400 H = 73-608401 I = 140-1208402 IJ = 140-808403 J = 135-808404 K = 70-308405 L = 87 408406 M = 67-458407 N = 75-558408 O = 150-30

OPENTYPE CONFIGURATION FILES Character protrusion 208

8409 Π= 150-558410 P = 82-508411 Q = 150-308412 R = 75 158413 S = 90-658414 $ = 100-208415 T = 220-858416 U = 230-558417 V = 260-608418 W = 185-558419 X = 70-308420 Y = 250-608421 Z = 90-608422 a = 150-108423 b = 170 8424 c = 173-108425 d = 150-558426 e = 180 8427 f = -2508428 g = 150-108429 h = 100 8430 i = 210 8431 ij = 210-408432 j = -408433 k = 110-508434 l = 240-1108435 m = 80 8436 n = 115 8437 o = 155 8438 q = 170-408439 r = 155-408440 s = 130 8441 t = 230-108442 u = 120 8443 v = 140-258444 w = 98-208445 x = 65-408446 y = 130-208447 z = 110-808448 0 = 170-858449 1 = 2301108450 2 = 130-708451 3 = 140-708452 4 = 130808453 5 = 160 8454 6 = 175-308455 7 = 250-1508456 8 = 130-408457 9 = 155-808458 = 5008459 = 4508460 = 3008461 = 3008462 amp = 130308463 = 180508464 = 380208465 + = 1802008466 = 180108467 ~ = 2001508468 ( = 300 ) = 708469 = 1001008470 - = 500300 hyphen8471 ndash = 500300 endash8472 mdash = 400170 emdash8473 _ = 100200 underscore

OPENTYPE CONFIGURATION FILES Character protrusion 209

8474 = 300400 quotesingle8475 = 5003008476 lsquo = 800200 rsquo = 800-208477 ldquo = 540100 rdquo = 5001008478 sbquo = 300700 bdquo = 2006008479 lsaquo = 500300 rsaquo = 4004008480 laquo = 400100 raquo = 2003008481 iexcl = 200 iquest = 200 8482 lt = 300100 gt = 2001008483 backslash = 3003008484 braceleft = 400100 braceright = 2002008485 dagger = 200 808486 Dagger = 120 808487 bull = 2201008488 middot = 550300 periodcentered8489 = 170 8490 ₡ = 100 508491 para = 200 8492 deg = 5003008493 trade = 200 708494 copy = 50 708495 reg = 50 708496 ordf = 1401008497 ordm = 1401008498 sup1 = 4001508499 sup2 = 250 808500 sup3 = 250 808501 not = 250 808502 minus = 3002008503 plusmn = 1501708504 times = 2002008505 divide = 2002008506 euro = 150 8507 oneoldstyle = 1001008508 twooldstyle = 100 808509 threeoldstyle = 80 508510 fouroldstyle = 80 808511 fiveoldstyle = 50 8512 sixoldstyle = 50 8513 sevenoldstyle = 80 808514 eightoldstyle = 50 8515 Γ = 100120 Gamma8516 Δ = 120100 Delta8517 Θ = 120 50 Theta8518 Λ = 130100 Lambda8519 Ξ = 100 Xi8520 Π = 100 Pi8521 Σ = 100 50 Sigma8522 Υ = 180100 Upsilon8523 Φ = 130 70 Phi8524 Ψ = 130 50 Psi8525 Ω = 50 Omega

8526 8527 langLatinModernRomanrang8528 langCharisSILrang8529 SetProtrusion8530 [ name = Charis-default ]8531 encoding = EU1EU2TU8532 family = Charis SIL 8533

8534 A = 50508535 AElig = 50508536 C = 50 8537 D = 508538 F = 50

OPENTYPE CONFIGURATION FILES Character protrusion 210

8539 G = 50 8540 J = 100 8541 K = 508542 L = 508543 Ŀ = 1008544 O = 50508545 Œ= 50 8546 P = 508547 Q = 50708548 R = 508549 ẞ = 40 capital sharp s8550 T = 50508551 V = 50508552 W = 50508553 X = 50508554 Y = 50508555 k = 508556 ŀ = 1508557 r = 508558 t = 508559 v = 50508560 w = 50508561 x = 50508562 y = 508563 1 = 1501508564 2 = 50508565 3 = 50 8566 4 = 100508567 6 = 50 8568 7 = 50808569 9 = 50508570 = 6008571 = 5008572 = 4008573 = 3008574 = 1008575 = 2008576 = 50508577 ~ = 2002508578 = 508579 = 3003008580 += 2002508581 = 2008582 backslash = 1502008583 | = 2002008584 - = 400500 hyphen8585 ndash = 200300 endash8586 mdash= 150250 emdash8587 ―= 200200 Horizontal Bar = texttwelveudash8588 ‒ = 150150 Figure Dash = textthreequartersemdash8589 _ = 1001008590 = = 1001008591 lsquo = 300400 rsquo = 3004008592 ldquo = 300300 rdquo = 3003008593 sbquo = 400400 bdquo = 3003008594 lsaquo = 400300 rsaquo = 3004008595 laquo = 200200 raquo = 1503008596 iexcl = 100 iquest = 100 8597 ( = 200 ) = 2008598 lt= 200150 gt = 1002008599 [ = 100 ] = 1008600 braceleft = 200 braceright = 3008601 dagger = 80 808602 Dagger = 1001008603 bull = 200200

OPENTYPE CONFIGURATION FILES Character protrusion 211

8604 deg = 1502008605 trade = 1501508606 cent = 50 8607 pound = 50 8608 brvbar = 2002008609 copy = 1001008610 reg = 1001008611 ordf = 1002008612 ordm = 2002008613 not = 200 508614 micro = 1008615 para = 1008616 middot = 3004008617 sup1 = 2003008618 sup2 = 1002008619 sup3 = 1002008620 euro = 100 8621 plusmn= 1502008622 times= 2002008623 divide= 2502508624 minus = 2002008625 minus= 2002008626 Cyrillic8627 Б = 508628 Г = 1308629 Ж = 50508630 З = 30508631 Л = 50 8632 У = 50508633 Ф = 50508634 Ч = 100 8635 Ъ = 508636 Ь = 508637 Э = 50508638 Ю= 408639 Я = 50 8640 Ѵ = 50508641 Ҽ = 50 8642 Ђ = 501008643 Є = 50 8644 Љ = 50508645 Њ = 508646 Ћ = 50508647 Ԅ = 1001008648 Ԇ = 50508649 Ѣ = 508650 Ҍ = 508651 Ԉ= 50808652 Ԋ= 808653 Ԏ = 50508654 Ԓ = 50 8655 Ԕ= 50408656 Ԗ = 508657 Ԙ = 50 8658 Ԡ= 508659 Ԣ= 508660 Ԃ = 1008661 б = 50508662 г = 708663 к = 508664 л = 50 8665 т = 50508666 ф = 50508667 ч = 50 8668 ъ = 50

OPENTYPE CONFIGURATION FILES Character protrusion 212

8669 ь = 508670 э = 508671 я = 50 8672 љ = 50 8673 њ = 508674 ѣ = 508675 ѵ = 50508676 ҽ = 50 8677 ҍ = 508678 ү = 50508679 ҕ = 508680 ҧ = 508681 ԃ = 1008682 ԅ = 1001008683 ԇ = 50508684 ԉ = 50708685 ԋ = 708686 ԙ = 50308687 ԡ = 508688 ԣ = 508689 Д П Ц Ш Щ Ы Ҕ Ҧ Ҩ Ә Ҵ Џ Ӭ Ӡ Ԑ Ԁ8690 в д ж з и м н п ц ш ы ю ђ є ћ џ ә ԑ ҩ ҵ ӡ ԁ ԍ ԏ ԓ ԕ ԗ8691 Greek8692 Δ = 50508693 Ψ = 50508694 γ = 70708695 λ = 40708696 π = 40508697 ρ = 508698 σ = 508699 χ = 5050

8700 87018702 SetProtrusion8703 [ name = Charis-it ]8704 encoding = EU1EU2TU8705 family = Charis SIL8706 shape = itsl 8707

8708 C = 50 8709 G = 50 8710 J = 50 8711 L = 50508712 O = 50 8713 Œ= 50 8714 Q = 50 8715 S = 50 8716 $ = 50 8717 T = 70 8718 o = 50508719 p = 508720 q = 50 8721 t = 508722 w = 508723 y = 508724 1 = 1501008725 3 = 50 8726 4 = 100 8727 6 = 50 8728 7 = 100 8729 = 7008730 = 6008731 = 4008732 = 4008733 = 150

OPENTYPE CONFIGURATION FILES Character protrusion 213

8734 amp = 808735 = 50508736 = 3002008737 += 2502508738 = 80508739 ~ = 1501508740 = 1508741 backslash = 1501508742 - = 300400 hyphen8743 ndash = 200300 endash8744 mdash= 150200 emdash8745 _ = 1008746 = = 2002008747 plusmn= 1502008748 times= 2502508749 divide= 2502508750 deg = 1502008751 middot = 3004008752 lsquo = 400200 rsquo = 4002008753 ldquo = 300200 rdquo = 4002008754 sbquo = 200500 bdquo = 1505008755 lsaquo = 300400 rsaquo = 2005008756 laquo = 200300 raquo = 1504008757 ( = 200 ) = 2008758 lt= 200200 gt = 2002008759 braceleft = 300 braceright = 2008760 Cyrillic8761 Ж = 50308762 Л = 50 8763 У = 50308764 Ф = 50 8765 Ч = 100 8766 Ъ = 508767 Ь = 508768 Э = 50508769 Я = 50 8770 Ѵ = 50508771 Љ = 50508772 Ԅ = 1401008773 Ԇ = 70508774 Ԉ= 50808775 Ԋ= 808776 Ԏ = 50508777 г = 50508778 д = 50308779 м = 50 8780 ф = 50 8781 ч = 50 8782 ъ = 508783 ь = 508784 э = 508785 я = 50 8786 љ = 50508787 њ = 508788 ѵ = 50508789 ҍ = 508790 ԅ = 1401008791 ԇ = 70508792 ԉ = 50708793 ԋ = 708794 Greek8795 Γ = 1308796 Δ = 50508797 Ψ = 50508798 γ = 7070

OPENTYPE CONFIGURATION FILES Character protrusion 214

8799 λ = 40708800 π = 40508801 ρ = 508802 σ = 508803 χ = 5050

8804

The small caps glyph names in Charis SIL have changed with version 50 of thefont We try to get the names right both with LuaTEX (where we can simply querythe font version) and with XETEX (where we check for glyph name)

88058806 quick and dirty -- maybe wersquoll promote this to a8807 regular key some time8808 definekeyMTprccommandcsname 1endcsname88098810 glyph names have changed with version 50 of Charis SIL8811 before aSC bSC 8812 after asc bsc 8813 ifxMTluaundefined8814 gdefMTgetCHARISSC8815 test whether glyph asc exists8816 ifnumnumexprXeTeXglyphindex ascrelax gt 08817 gdefMTCHARISSCsc8818 else8819 gdefMTCHARISSCSC8820 fi8821 8822 else8823 gdefMTgetCHARISSC8824 gdefMTCHARISSCMTlua8825 check font version8826 -- why doesnrsquot this work8827 f = fontgetfont(fontcurrent())8828 i = fontloaderinfo(ffilename)8829 if (tonumber(iversion) lt 5) then8830 if (tonumber(fontloaderinfo(fontgetfont(fontcurrent())filename)version) lt 5) then8831 texprint(SC)8832 else8833 texprint(sc)8834 end8835 8836 8837 fi88388839 SetProtrusion8840 [ name = Charis-sc8841 load = Charis-default8842 command = MTgetCHARISSC ]8843 encoding = EU1EU2TU8844 family = Charis SIL8845 shape = sc 8846

8847 ᴀ = 100100 etc doesnt work with textsc8848 aMTCHARISSC = 1001008849 cMTCHARISSC = 50 8850 dMTCHARISSC = 508851 fMTCHARISSC = 508852 gMTCHARISSC = 50 8853 jMTCHARISSC = 100 8854 kMTCHARISSC = 508855 lMTCHARISSC = 508856 f_lMTCHARISSC = 508857 oMTCHARISSC = 50508858 oeMTCHARISSC = 50

OPENTYPE CONFIGURATION FILES Character protrusion 215

8859 qMTCHARISSC = 50708860 rMTCHARISSC = 508861 tMTCHARISSC = 501008862 vMTCHARISSC = 50508863 wMTCHARISSC = 50508864 xMTCHARISSC = 50508865 yMTCHARISSC = 5050

8866 8867 langCharisSILrang8868 langPalatinorang8869 SetProtrusion8870 [ name = palatino-default ]8871 encoding = EU1EU2TU8872 family = Palatino 8873

8874 A = 50508875 D = 508876 J = 50 8877 K = 508878 L = 508879 O = 25 8880 T = 50508881 V = 50508882 W = 50508883 X = 50508884 Y = 50508885 b = 258886 d = 25308887 f = 508888 g = 1008889 k = 508890 p = 508891 q = 50 8892 r = 508893 t = 50 = 50 = 508894 v = 75508895 w = 50508896 x = 50508897 y = 50708898 1 = 100508899 2 = 25508900 4 = 50 8901 6 = 50 8902 9 = 25 8903 AElig = 100 8904 Π= 25 8905 = 700 = 350 hellip = 1508906 = 5008907 = 5008908 = 5008909 = 100 = 1008910 = 200 = 2008911 = 50508912 ~ = 2002508913 amp = 501008914 = 1001008915 = 2002008916 + = 2502508917 ( = 100 ) = 3008918 = 2003008919 - = 4005008920 textendash = 300300 textemdash = 2002008921 textquoteleft = 500700 textquoteright = 5007008922 textquotedblleft = 300400 textquotedblright = 3004008923 textbackslash = 200300

OPENTYPE CONFIGURATION FILES Character protrusion 216

8924 quotesinglbase = 400400 quotedblbase = 4004008925 guilsinglleft = 400400 guilsinglright = 3005008926 guillemotleft = 300300 guillemotright = 2004008927 textexclamdown = 100 textquestiondown = 100 8928 textbraceleft = 400200 textbraceright = 2004008929 textless = 200100 textgreater = 1002008930 le = 200100 ge = 1002008931 textminus = 3003008932 texttrademark = 2002008933 textcopyright = 2002008934 textregistered = 2002008935 textdegree = 3003008936 brvbar = 450500 not = 2501508937 = 1502508938 middot = 850 7008939 para = 10008940 times = 150 3008941 ordf = 300300 ordm = 3003008942 ⁰ = 2004008943 sup1 = 400350 sup2 = 200300 sup3 = 2504008944 ⁴ = 250350 ⁵ = 200300 ⁶ = 2504008945 ⁷ = 200450 ⁸ = 250400 ⁹ = 2003508946 ₀ = 2004008947 ₁ = 400250 ₂ = 200300 ₃ = 2504008948 ₄ = 250350 ₅ = 200300 ₆ = 2504008949 ₇ = 200450 ₈ = 250400 ₉ = 2003508950 plusmn = 150100 divide = 3003008951 thorn = 258952 ₊ = 300450 ₋ = 3004508953 ⁺ = 300450 ⁻ = 3004508954 dagger = 200250 Dagger = 2002508955 π = 50 8956 ſ = 508957 = 1001508958 textservicemark = 1002008959 ‐ = 400500 ‑ = 400500 ‒ = 2003008960 ndash = 205305 mdash = 200300 ― = 501508961 bull = 1252008962 asc = 50508963 89648965 SetProtrusion8966 [ name = palatino-it ]8967 encoding = EU1EU2TU8968 family = Palatino8969 shape = itsl 8970

8971 A = 50508972 AElig = 50 8973 B = 50 8974 C = 50 8975 D = 50508976 E = 50 8977 F = 50 8978 G = 50 8979 H = 50 8980 K = 50 8981 L = 50 8982 O = 50 8983 Π= 50 8984 P = 50 8985 Q = 50 8986 R = 50 8987 S = 50 8988 $ = 50

OPENTYPE CONFIGURATION FILES Character protrusion 217

8989 T = 100 8990 U = 50 8991 V = 100508992 W = 50 8993 X = 50 8994 Y = 100508995 b = 508996 c = 25 8997 g = 75 8998 i = 25 8999 m = 509000 n = 509001 p = 259002 q = 25 9003 x = 509004 1 = 100 9005 2 = 50 9006 4 = 50 9007 7 = 50 9008 = 500 = 350 hellip = 2009009 = 5009010 = 3009011 = 3009012 = 300 = 3009013 amp = 50509014 = 1001009015 = 2002009016 + = 1502009017 = 50509018 ~ = 2001509019 ( = 200 ) = 2009020 = 1002009021 - = 3005009022 textendash = 300300 textemdash = 2002009023 textquoteleft = 700400 textquoteright = 7004009024 textquotedblleft = 500300 textquotedblright = 5003009025 _ = 1001009026 textbackslash = 1002009027 quotesinglbase = 500500 quotedblbase = 4004009028 guilsinglleft = 400400 guilsinglright = 3005009029 guillemotleft = 300300 guillemotright = 3003009030 textexclamdown = 100 textquestiondown = 200 9031 textbraceleft = 200100 textbraceright = 2002009032 textless = 300100 textgreater = 2001009033 le = 200100 ge = 1002009034 brvbar = 450500 not = 2501509035 middot = 850 7009036 para = 10009037 times = 150 3009038 ordf = 300250 deg = 300300 ordm = 3002509039 ⁰ = 3002009040 sup1 = 300150 sup2 = 350200 sup3 = 2501509041 ⁴ = 350100 ⁵ = 300 50 ⁶ = 4001009042 ⁷ = 400 50 ⁸ = 250 50 ⁹ = 300 509043 ₀ = 3003009044 ₁ = 300350 ₂ = 300150 ₃ = 2502509045 ₄ = 400200 ₅ = 300100 ₆ = 4502009046 ₇ = 450150 ₈ = 400250 ₉ = 4002009047 plusmn = 150100 divide = 3003009048 thorn = 50 9049 dagger = 250200 Dagger = 2502009050 ₊ = 300450 ₋ = 3004509051 ⁺ = 300450 ⁻ = 3004509052 ‐ = 300500 ‑ = 300500 ‒ = 1003009053 ndash = 125305 mdash = 200300 ― = 125150

OPENTYPE CONFIGURATION FILES Character protrusion 218

9054 bull = 125200

9055 90569057 SetProtrusion9058 [ name = palatino-sc9059 load = palatino-default ]9060 encoding = EU1EU2TU9061 family = Palatino9062 shape = sc 9063

9064 a = 50509065 aelig = 50 9066 b = 0 09067 d = 0 09068 f = 0 09069 g = 0 09070 j = 50 9071 l = 509072 o = 0 09073 p = 0 09074 q = 0 9075 r = 09076 t = 50509077 y = 50509078 fl = 0509079 ffl = 0509080 = 0509081 = 050

9082 9083 langPalatinorang9084 langLatorang No settings yet9085 langFontAwesomerang9086 SetProtrusion9087 [ name = empty ]9088 encoding = TUEU1EU29089 family = FontAwesome 9090 9091 langFontAwesomerang9092

AUXILIARY FILE FOR MICRO FINE TUNING 219

17 Auxiliary file for micro fine tuningThis file can be used to test protrusion and expansion settings

9093 langtestrang9094 documentclassarticle90959096 Here you can specify the font you want to test using9097 the commands fontfamily fontseries and fontshape9098 Make sure to end all lines with a comment character9099 newcommandTestFont9100 fontfamilyppl9101 fontseriesb9102 fontshapeit sc sl9103 91049105 usepackageifthen9106 usepackage[T1]fontenc9107 usepackage[latin1]inputenc9108 usepackage[verboseexpansion=alltextstretch=50]microtype91099110 pagestyleempty9111 setlengthparindent0pt9112 newcommandcrulefillcleadershbox$mkern-2musmash-mkern-2mu$hfill9113 newcommandtestprotrusion[2][]9114 ifthenelseequal1r29115 lorem ipsum dolor sit amet9116 ifthenelseequal1rcrulefillleftarrowfill 29117 ifthenelseequal1lcrulefillrightarrowfill9118 you know the rest9119 ifthenelseequal1l29120 linebreak9121 fontencodingencodingdefault9122 fontseriesseriesdefault9123 fontshapeshapedefault9124 selectfont9125 Here is the beginning of a line dotfill and here is its endlinebreak9126 9127 newcommandshowTestFontexpandafterstripprefixmeaningTestFont9128 defstripprefix1gt9129 newcountcharcount9130 begindocument91319132 microtypesetupexpansion=false91339134 centering The font in this document is called by9135 textttshowTestFontparbigskip91369137 TestFontselectfont9138 This line intentionally left emptylinebreak9139 A -- Z9140 charcount=659141 loop9142 testprotrusioncharcharcount9143 advancecharcount 19144 ifnumcharcount lt 91 repeat9145 a -- z9146 charcount=979147 loop9148 testprotrusioncharcharcount9149 advancecharcount 19150 ifnumcharcount lt 123 repeat9151 0 -- 99152 charcount=489153 loop

AUXILIARY FILE FOR MICRO FINE TUNING 220

9154 testprotrusioncharcharcount9155 advancecharcount 19156 ifnumcharcount lt 58 repeat9157 9158 testprotrusion[r]9159 testprotrusion[r]9160 testprotrusion[r]9161 testprotrusion[r]9162 testprotrusion[r]9163 testprotrusion[r]9164 testprotrusion[l]textexclamdown9165 testprotrusion[l]textquestiondown9166 testprotrusion[r])9167 testprotrusion[l](9168 testprotrusion9169 testprotrusionchar`9170 testprotrusion-9171 testprotrusiontextendash9172 testprotrusiontextemdash9173 testprotrusiontextquoteleft9174 testprotrusiontextquoteright9175 testprotrusiontextquotedblleft9176 testprotrusiontextquotedblright9177 testprotrusionquotesinglbase9178 testprotrusionquotedblbase9179 testprotrusionguilsinglleft9180 testprotrusionguilsinglright9181 testprotrusionguillemotleft9182 testprotrusionguillemotright91839184 newpage9185 The following displays the current font stretched by 59186 normal and shrunk by 591879188 bigskip9189 newlengthMTln9190 newcommandteststring9191 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567899192 settowidthMTlnteststring9193 microtypesetupexpansion=true91949195 parbox105MTlnteststringlinebreak9196 teststringparbigskip9197 parbox095MTlnteststring91989199 enddocument9200 langtestrang

Needless to say that things may always be improved For suggestions mail towmlgmxnet

THE TITLE LOGO 221

A The title logoThis is microtype-logodtx You may treat this file in three different ways

bull compile it by itself

bull input it in the body of a dtx file

bull input it in the preamble it then provides the command printlogo which will do just that

The first two cases require the style file microtype-docsty which can be generated from microtypeins with

makefilemicrotype-docstydocsty

9201 langlogorangHerersquos how the logo on the title page was created30 It has nothing to do with microtype actually but uses fontinstIt is based on an experiment I posted to the decomptexttex newsgroup31 It will show

bull the character

bull the TEX box

bull the bounding box

bull kerns

A1 MacrosTo run this file TEX needs to find the afm file (either in the TEXINPUTS path or in the current working directory)

First input fontinst

9202 input fontinststy

bboxsty is an addition to fontinst which makes dimensions of the bounding boxes available (and was writtenby Hagraven Thecirc Thagravenh by the way) These dimensions are specified in the afm file but not used by TEX which is whyfontinst will discard them otherwise

9203 input bboxsty

tempdim Allocate some dimen registers

9204 newdimentempdim

fboxrulei Frame width of the box as TEX sees it

9205 newdimenfboxrulei9206 fboxrulei=01pt

fboxruleii Frame width of the bounding box

9207 newdimenfboxruleii9208 fboxruleii=01pt

kernboxheight Height of the box indicating the kern

9209 newdimenkernboxheight9210 kernboxheight=5pt

scaletoem An auxiliary macro Return a dimension relative to the em-width of the font Requires e-TEX

9211 setcommandscaletoem1dimexpr 1 spfontdimen6font1000relax

showlogo A fontinst incantation whose sole purpose is to produce the logo Its argument is a string (letters only)

9212 fontinstcc9213 defshowlogo1

Some fonts do not specify the fontdimen6 (width of an em) in the afm file In this case use the font size which iscorrect in most cases

9214 ifdimfontdimen6font = 0pt9215 typeout~Warning~no~fontdimen~6~specified~^^J9216 ~setting~it~to~pdffontsizefont ifnumpdftexversion lt 130 ptfi~9217 fontdimen6font=pdffontsizefont ifnumpdftexversion lt 130 ptfirelax9218 fi9219 installfonts9220 input_metricslogofontmetricsprintbbs1relax

30 Note that the logo module will not be created when installing microtype Instead the source file microtype-logodtx isincluded as an attachment in the PDF file If your PDF reader supports this you can to extract it alternativelyyou may use the pdftk tool

31 Message ID 42aa3687$0$24366$9b4e6d93newsread2arcor-onlinenet

ProvidesFilemicrotype-logodtx[20090608] ^^A dont count the backslashes in this documentmakeatletterletorigstepchecksumstepchecksumletstepchecksumrelaxmakeatother sectionThe title logo labelsectitle-logo^^Aiffalse meta-comment ^^A ======================================================================== This is filemicrotype-logodtx You may treat this file in three different waysbeginitemize item compile it by itself item verb|input| it in the body of a filedtx file item verb|input| it in the preamble it then provides the command verb|printlogo| which will do just thatenditemize The first two cases require the style file filemicrotype-docsty which can be generated from filemicrotypeins withbeginverbatimmakefilemicrotype-docstydocstyendverbatim ^^A ========================================================================^^Afi beginmacrocodeltlogogt endmacrocode Heres how the logo on the title page was createdfootnote Note that the |logo| module will not be created when installing microtype Instead the source file filemicrotype-logodtx is included as an attachment in the acronymPDF file If your acronymPDF reader supports this you can textattachfile [color=002 004 048mimetype=textplain]microtype-logodtx click here to extract it alternatively you may use the |pdftk| tool It has nothing to do with microtype actually but uses pkgfontinst It is based on an experiment I posted to the urldecomptexttex newsgroupfootnote Message ID nolinkurl42aa3687$0$24366$9b4e6d93newsread2arcor-onlinenet It will showbeginitemize item the character item the TeX box item the bounding box item kernsenditemize subsectionMacros To run this file TeX needs to find the fileafm file (either in the |TEXINPUTS| path or in the current working directory) First input pkgfontinst beginmacrocodeinput fontinststy endmacrocode filebboxsty is an addition to pkgfontinst which makes dimensions of the bounding boxes available (and was written by thanh by the way) These dimensions are specified in the fileafm file but not used by TeX which is why pkgfontinst will discard them otherwise beginmacrocodeinput bboxsty endmacrocodebeginmacrotempdim Allocate some dimen registers beginmacrocodenewdimentempdim endmacrocodeendmacrobeginmacrofboxrulei Frame width of the box as TeX sees it beginmacrocodenewdimenfboxruleifboxrulei=01pt endmacrocodeendmacrobeginmacrofboxruleii Frame width of the bounding box beginmacrocodenewdimenfboxruleiifboxruleii=01pt endmacrocodeendmacrobeginmacrokernboxheight Height of the box indicating the kern beginmacrocodenewdimenkernboxheightkernboxheight=5pt endmacrocodeendmacrobeginmacroscaletoem An auxiliary macro Return a dimension relative to the |em|-width of the font Requires etex beginmacrocodesetcommandscaletoem1dimexpr 1 spfontdimen6font1000relax endmacrocodeendmacrobeginmacroshowlogo A pkgfontinst incantation whose sole purpose is to produce the logo Its argument is a string (letters only) beginmacrocodefontinstccdefshowlogo1 endmacrocode Some fonts do not specify the fontdim6 (width of an |em|) in the |afm| file In this case use the font size which is correct in most cases beginmacrocode ifdimfontdimen6font = 0pt typeout~Warning~no~fontdimen~6~specified~^^J ~setting~it~to~pdffontsizefont ifnumpdftexversion lt 130 ptfi~ fontdimen6font=pdffontsizefont ifnumpdftexversion lt 130 ptfirelax fi installfonts input_metricslogofontmetricsprintbbs1relax endinstallfontsnormalcc endmacrocodeendmacro Layers beginmacrocodemakeatletterdefmtllayer12pdfliteralOC1 BDC2pdfliteralEMCifxmtobjectsundefinedletmtobjectsemptyfiifxmtorder undefinedletmtorder emptyfixdefmtordermtorder[(Logo)letmtlresourcesemptydefmtlregister1 immediatepdfobjltlt TypeOCG Name(1) gtgt expandafterxdefcsname mtl1endcsnamethepdflastobjspace 0 R xdefmtobjectsmtobjectscsname mtl1endcsname xdefmtordermtordercsname mtl1endcsname xdefmtlresourcesmtlresources1 csname mtl1endcsnamemtlregistercanvasmtlregistercharactersmtlregisterbounding-boxesmtlregisterTeX-boxesxdefmtordermtorder]globalletmtlobjectsmtobjectsdeftogglelayer12 pdfstartlink width wdlogobox height htlogobox depth dplogobox userSubtypeLink BS ltlt TypeBorderW 0 gtgt HO A ltlt SSetOCGState State[Toggle csname mtl1endcsname] gtgt 2pdfendlink endmacrocodebeginmacroprintbbs Preparation beginmacrocodesetcommandprintbbs1 setbox0hbox1 leavevmode kern-fboxrulei endmacrocode The canvas in the natural width of the text minus protrusion in color |bgcolor| beginmacrocode mtllayercanvas getboundarychars1relax tempdim=dimexprwd0 - (scaletoemlpcodefontfirstchar+ scaletoemrpcodefontlastchar)relax kerndimexprscaletoemlpcodefontfirstcharrelax lowerdimexprdp0+005em relax vboxcolorbgcolor hrule width tempdim height dimexprdp0+ht0+015emrelax kern-tempdim endmacrocode The baseline in color |blcolor| beginmacrocode vboxcolorblcolor hrule width tempdim height fboxrulei kern-dimexprwd0 -scaletoemrpcodefontlastcharrelax endmacrocode The string beginmacrocode printbbss 1relaxrelax endmacrocodeendmacrobeginmacrogetboundarychars Get first~dots beginmacrocodedefgetboundarychars12relax deffirstchar`1 getlastchar12relax endmacrocodeendmacrobeginmacrogetlastchar dots~and last character beginmacrocodedefgetlastchar12 ifxrelax2relax deflastchar`1 else expandaftergetlastchar fi 2 endmacrocodeendmacrobeginmacroprintbbss Loop over all characters of the string beginmacrocodedefprintbbss123relax ifxrelax1relax else ifxrelax2relax printbb1 else printbb12 fi expandafterprintbbss fi 23relax endmacrocodeendmacrobeginmacroprintbb Record the kern between the current and the following character then print the character cmdkerning is a pkgfontinst command beginmacrocodesetcommandprintbb12 setbox0hboxkerning12xdefthekernnumberresult showboxes1 endmacrocode This could be another application beginmacrocode quad w thescaletoemwidth1 bb thescaletoembbleft1 thescaletoembbright1 thescaletoemnumbernumexprwidth1-bbright1relax h height1bbtop1 bbbottom1depth1par endmacrocodeendmacrobeginmacroshowboxes Print the boxes for char meta1 This wont work if meta1 isnt also the PostScript name of the glyph (eg `comma =llap `) beginmacrocodesetcommandshowboxes1 leavevmode colortexcolor endmacrocode We have to record the width of the glyph beginmacrocode setbox0hboxcolortextcolor1 globaltempdim=wd0relax kern-fboxrulei endmacrocodebeginenumerateitem textitThe TeX box Print a frame in color |texcolor| This frame shows the glyph as TeX sees it beginmacrocode mtllayerTeX-boxes hbox lowerdimexpr dp0 + fboxruleirelax hbox vbox hrule heightfboxrulei hbox vrule widthfboxrulei height dimexprht0 + 2fboxruleirelax phantomunhcopy0 vrule widthfboxrulei hrule heightfboxrulei endmacrocodeitem textitThe character Now we step back and print the actual glyph We hold it back until now so that it will be printed emphon top of its box beginmacrocode kern-wd0 mtllayercharactershboxbox0 endmacrocode Step back by the amount that the characters bounding box differs from the TeX box on the left side beginmacrocode kerndimexprscaletoembbleft1-tempdim-fboxruleiirelax endmacrocodeitem textitThe bounding box will be printed in color |bbcolor| beginmacrocode mtllayerbounding-boxes colorbbcolor hbox lowerdimexpr-scaletoembbbottom1+fboxruleiirelax hbox vbox hrule heightfboxruleii hbox to dimexprscaletoemnumexpr bbright1-bbleft1relax+2fboxruleiirelax vrule height dimexprscaletoemnumexpr bbtop1-bbbottom1relax widthfboxruleii hfill vrule widthfboxruleii hrule heightfboxruleii kern-dimexprfboxruleii+fboxruleirelax endmacrocodeitem textitThe kern We also print a small box in color |kerncolor| indicating the kerning between the current and the next character filled for negative kerns empty for positive kerns beginmacrocode kernscaletoemnumexprwidth1-bbright1relax mtllayerTeX-boxes ifnumthekernlt0 colorkerncolor kernscaletoemthekern lowerkernboxheighthboxvrule width -dimexprscaletoemthekernrelax height kernboxheight kernscaletoemthekern else colortexcolor ifnumthekern=0 else lowerkernboxheight hbox vbox hrule heightfboxrulei hbox vrule height kernboxheight widthfboxrulei kerndimexprscaletoemthekern-2fboxruleirelax vrule widthfboxrulei hrule heightfboxrulei fi fi kern-fboxrulei endmacrocodeendenumerateendmacro beginmacrocodenewboxlogoboxdefprintlogo setboxlogobox=hboxvbox MakePercentComment endmacrocode This is the Kepler MM font used in the logo beginmacrocode deflogofontpkpri9e10 transformfontlogofontreencodefont8rfromafmpkpmmri8a10 fontthelogofont=logofontspace at 82pt endmacrocode This would load the italic Palatino font instead beginmacrocodedeflogofontpplritransformfontlogofont8rreencodefont8rfromafmlogofont8aedeflogofontlogofont8rfontthelogofont=logofontspace at 78pt endmacrocode Load the font beginmacrocode thelogofont endmacrocode Protrusion values (overdone for didactic reasons) beginmacrocode lpcodefont`M=96 rpcodefont`e=46 endmacrocode Now we can generate the logo beginmacrocode pdfliteral directSXS gs showlogoMicrotype rlapnormalfontnormalsizeraisebox55ptfootnotemark[1] kern5pt[3baselineskip] longdefmakefntext1 leftskip 0pt parindent 0pt everyparparindent 0pt leavevmodehbox to 15ptthefnmarkhss1 footnotetext[1]This graphic display on a togglelayercanvascanvas the togglelayercharacterscharacters their togglelayerbounding-boxesbounding boxes and togglelayerTeX-boxesTeX boxes edeflogodimenswidth thewdlogobox height thehtlogobox depth thedplogobox immediatepdfobjltltTypeExtGState CA 06 ca 06 BMNormal gtgt immediatepdfxform attr Group ltltTypeGroup STransparency I true CSDeviceRGB gtgt resources Properties ltltmtlresourcesgtgt ExtGState ltlt SXS thepdflastobjspace 0 R gtgt logobox vskip-25baselineskip leavevmode togglelayercharacters pdfrefxformpdflastxform pdfannotlogodimens SubtypeWidget FTBtn T(Logo) F 4 why did I say this AP ltlt N thepdflastxformspace 0 R gtgt AA ltlt E ltlt SSetOCGState State[Toggle mtlcharacters] gtgt X ltlt SSetOCGState State[Toggle mtlcharacters] gtgt D ltlt SSetOCGState State[Toggle csname mtlbounding-boxesendcsname] gtgt U ltlt SSetOCGState State[Toggle csname mtlTeX-boxesendcsname] gtgt gtgt vspace3baselineskip endmacrocode Our font beginmacrocodepdfmapline+pkpmmri8r10 KeplMM-It_385_575_10_ TeXBase1Encoding ReEncodeFont lt8renc ltpkpmmri8a10pfb endmacrocode Define colours (|thered| and |thegreen| are copied from filemicrotypedtx) beginmacrocodedefmtdefinecolors definecolortheredrgb065004007 definecolorthegreenrgb006044008 colorlettexcolorthegreen50 TeX boxes colorletkerncolortexcolor negative kerns colorletbbcolorthered50 bounding box colorletbgcolorblack8 canvas colorletblcolorblack50 baseline colorlettextcolorblack40 text endmacrocode Use with filemicrotypedtx beginmacrocodeifxdocumentclasstwoclasseserror usepackage[xcdraw]xcolor mtdefinecolorselse endmacrocodesubsectionDocument Now we can start the document beginmacrocodedocumentclass[10pta4paper]ltxdocprovidecommandMakePercentCommentrelaxexpandafterdefcsname vermicrotypedtxendcsname29999999 endmacrocode Re-use the preamble from filemicrotypedtx beginmacrocodeusepackagemicrotype-docusepackageattachfilemakeatletterpdfcatalogOCProperties ltlt OCGs [mtobjects] D ltlt Order [mtorder] gtgt gtgtmakeatotherbegindocument endmacrocode You are currently reading this beginmacrocodeDocInputmicrotype-logodtxnewpage And here it isvfillbegincenter printlogo nullendcentervfillexpandafterenddocumentfi endmacrocode Thats it^^A resume counting backslashesmakeatletterletstepchecksumorigstepchecksum^^Amakeatother beginmacrocodeltlogogt endmacrocodeendinput

THE TITLE LOGO Macros 222

9221 endinstallfonts9222 9223 normalcc

Layers

9224 makeatletter9225 defmtllayer12pdfliteralOC1 BDC2pdfliteralEMC9226 ifxmtobjectsundefinedletmtobjectsemptyfi9227 ifxmtorder undefinedletmtorder emptyfi9228 xdefmtordermtorder[(Logo)9229 letmtlresourcesempty9230 defmtlregister19231 immediatepdfobjltlt TypeOCG Name(1) gtgt9232 expandafterxdefcsname mtl1endcsnamethepdflastobjspace 0 R 9233 xdefmtobjectsmtobjectscsname mtl1endcsname9234 xdefmtordermtordercsname mtl1endcsname9235 xdefmtlresourcesmtlresources1 csname mtl1endcsname9236 mtlregistercanvas9237 mtlregistercharacters9238 mtlregisterbounding-boxes9239 mtlregisterTeX-boxes9240 xdefmtordermtorder]9241 globalletmtlobjectsmtobjects9242 deftogglelayer129243 pdfstartlink width wdlogobox height htlogobox depth dplogobox9244 userSubtypeLink9245 BS ltlt TypeBorderW 0 gtgt HO9246 A ltlt SSetOCGState9247 State[Toggle csname mtl1endcsname] gtgt9248 2pdfendlink9249

printbbs Preparation

9250 setcommandprintbbs19251 setbox0hbox19252 leavevmode9253 kern-fboxrulei

The canvas in the natural width of the text minus protrusion in color bgcolor

9254 mtllayercanvas9255 getboundarychars1relax9256 tempdim=dimexprwd0 - (scaletoemlpcodefontfirstchar+9257 scaletoemrpcodefontlastchar)relax9258 kerndimexprscaletoemlpcodefontfirstcharrelax9259 lowerdimexprdp0+005em relax vboxcolorbgcolor9260 hrule width tempdim9261 height dimexprdp0+ht0+015emrelax9262 kern-tempdim

The baseline in color blcolor

9263 vboxcolorblcolor9264 hrule width tempdim9265 height fboxrulei9266 9267 kern-dimexprwd0 -scaletoemrpcodefontlastcharrelax

The string

9268 printbbss 1relaxrelax9269

getboundarychars Get first

9270 defgetboundarychars12relax9271 deffirstchar`19272 getlastchar12relax9273

getlastchar and last character

9274 defgetlastchar12

THE TITLE LOGO Macros 223

9275 ifxrelax2relax9276 deflastchar`19277 else9278 expandaftergetlastchar9279 fi 29280

printbbss Loop over all characters of the string

9281 defprintbbss123relax9282 ifxrelax1relax9283 else9284 ifxrelax2relax9285 printbb19286 else9287 printbb129288 fi9289 expandafterprintbbss9290 fi 23relax9291

printbb Record the kern between the current and the following character then print the character kerning is a fontinstcommand

9292 setcommandprintbb129293 setbox0hboxkerning12xdefthekernnumberresult9294 showboxes1

This could be another application

9295 quad9296 w thescaletoemwidth19297 bb thescaletoembbleft19298 thescaletoembbright19299 thescaletoemnumbernumexprwidth1-bbright1relax9300 h height1bbtop1 bbbottom1depth1par9301

showboxes Print the boxes for char lang1rang This wonrsquot work if lang1rang isnrsquot also the PostScript name of the glyph (eg lsquocommarsquo = lsquorsquo)

9302 setcommandshowboxes19303 leavevmode9304 colortexcolor

We have to record the width of the glyph

9305 setbox0hboxcolortextcolor19306 globaltempdim=wd0relax9307 kern-fboxrulei

1 The TEX box Print a frame in color texcolor This frame shows the glyph as TEX sees it

9308 mtllayerTeX-boxes9309 hbox9310 lowerdimexpr dp0 + fboxruleirelax9311 hbox9312 vbox9313 hrule heightfboxrulei9314 hbox9315 vrule widthfboxrulei height dimexprht0 + 2fboxruleirelax9316 phantomunhcopy09317 vrule widthfboxrulei9318 9319 hrule heightfboxrulei9320

2 The character Now we step back and print the actual glyph We hold it back until now so that it will be printedon top of its box

9321 kern-wd09322 mtllayercharactershboxbox0

Step back by the amount that the characterrsquos bounding box differs from the TEX box on the left side

9323 kerndimexprscaletoembbleft1-tempdim-fboxruleiirelax

THE TITLE LOGO Macros 224

3 The bounding box will be printed in color bbcolor

9324 mtllayerbounding-boxes9325 colorbbcolor9326 hbox9327 lowerdimexpr-scaletoembbbottom1+fboxruleiirelax9328 hbox9329 vbox9330 hrule heightfboxruleii9331 hbox to dimexprscaletoemnumexpr9332 bbright1-bbleft1relax+2fboxruleiirelax9333 vrule height dimexprscaletoemnumexpr9334 bbtop1-bbbottom1relax9335 widthfboxruleii9336 hfill9337 vrule widthfboxruleii9338 hrule heightfboxruleii9339 9340 kern-dimexprfboxruleii+fboxruleirelax9341

4 The kern We also print a small box in color kerncolor indicating the kerning between the current and the nextcharacter filled for negative kerns empty for positive kerns

9342 kernscaletoemnumexprwidth1-bbright1relax9343 mtllayerTeX-boxes9344 ifnumthekernlt09345 colorkerncolor9346 kernscaletoemthekern9347 lowerkernboxheighthboxvrule width -dimexprscaletoemthekernrelax9348 height kernboxheight9349 kernscaletoemthekern9350 else9351 colortexcolor9352 ifnumthekern=0 else9353 lowerkernboxheight9354 hbox9355 vbox9356 hrule heightfboxrulei9357 hbox9358 vrule height kernboxheight widthfboxrulei9359 kerndimexprscaletoemthekern-2fboxruleirelax9360 vrule widthfboxrulei9361 9362 hrule heightfboxrulei9363 fi9364 fi9365 9366 9367 kern-fboxrulei9368

9369 newboxlogobox9370 defprintlogo9371 setboxlogobox=hboxvbox9372 MakePercentComment

This is the Kepler MM font used in the logo

9373 deflogofontpkpri9e109374 transformfontlogofontreencodefont8rfromafmpkpmmri8a109375 fontthelogofont=logofontspace at 82pt

This would load the italic Palatino font instead

9376 deflogofontpplri9377 transformfontlogofont8rreencodefont8rfromafmlogofont8a9378 edeflogofontlogofont8r9379 fontthelogofont=logofontspace at 78pt

Load the font

THE TITLE LOGO Macros 225

9380 thelogofont

Protrusion values (overdone for didactic reasons)

9381 lpcodefont`M=969382 rpcodefont`e=46

Now we can generate the logo

9383 pdfliteral directSXS gs9384 showlogoMicrotype9385 rlapnormalfontnormalsizeraisebox55ptfootnotemark[1]9386 kern5pt[3baselineskip]9387 longdefmakefntext19388 leftskip 0pt9389 parindent 0pt9390 everyparparindent 0pt9391 leavevmodehbox to 15ptthefnmarkhss19392 footnotetext[1]This graphic display on a9393 togglelayercanvascanvas the togglelayercharacterscharacters9394 their togglelayerbounding-boxesbounding boxes9395 and togglelayerTeX-boxesTeX boxes9396 9397 edeflogodimenswidth thewdlogobox height thehtlogobox depth thedplogobox9398 immediatepdfobjltltTypeExtGState CA 06 ca 06 BMNormal gtgt9399 immediatepdfxform9400 attr Group ltltTypeGroup STransparency I true CSDeviceRGB gtgt9401 resources Properties ltltmtlresourcesgtgt9402 ExtGState ltlt SXS thepdflastobjspace 0 R gtgt 9403 logobox9404 vskip-25baselineskip9405 leavevmode9406 togglelayercharacters9407 pdfrefxformpdflastxform9408 9409 pdfannotlogodimens9410 SubtypeWidget FTBtn T(Logo)9411 F 4 why did I say this9412 AP ltlt N thepdflastxformspace 0 R gtgt9413 AA ltlt E ltlt SSetOCGState State[Toggle mtlcharacters] gtgt9414 X ltlt SSetOCGState State[Toggle mtlcharacters] gtgt9415 D ltlt SSetOCGState State[Toggle csname mtlbounding-boxesendcsname] gtgt9416 U ltlt SSetOCGState State[Toggle csname mtlTeX-boxesendcsname] gtgt9417 gtgt 9418 vspace3baselineskip9419

Our font

9420 pdfmapline+pkpmmri8r10 KeplMM-It_385_575_10_ TeXBase1Encoding ReEncodeFont lt8renc ltpkpmmri8a10pfb

Define colours (thered and thegreen are copied from microtypedtx)

9421 defmtdefinecolors9422 definecolortheredrgb0650040079423 definecolorthegreenrgb0060440089424 colorlettexcolorthegreen50 TeX boxes9425 colorletkerncolortexcolor negative kerns9426 colorletbbcolorthered50 bounding box9427 colorletbgcolorblack8 canvas9428 colorletblcolorblack50 baseline9429 colorlettextcolorblack40 text9430

Use with microtypedtx

9431 ifxdocumentclasstwoclasseserror9432 usepackage[xcdraw]xcolor9433 mtdefinecolors9434 else

THE LETTERSPACING ILLUSTRATION Document 226

A2 DocumentNow we can start the document

9435 documentclass[10pta4paper]ltxdoc9436 providecommandMakePercentCommentrelax9437 expandafterdefcsname vermicrotypedtxendcsname29999999

Re-use the preamble from microtypedtx

9438 usepackagemicrotype-doc9439 usepackageattachfile9440 makeatletter9441 pdfcatalogOCProperties ltlt OCGs [mtobjects] D ltlt Order [mtorder] gtgt gtgt9442 makeatother9443 begindocument

You are currently reading this

9444 DocInputmicrotype-logodtx9445 newpage9446 And here it is9447 vfill9448 begincenter9449 printlogo null9450 endcenter9451 vfill9452 expandafterenddocument9453 fi

Thatrsquos it

9454 langlogorang

B The letterspacing illustrationThis is microtype-lssampledtx You may treat this file in three different ways

bull compile it by itself

bull input it in the body of a dtx file

bull input it in the preamble it then provides the commands

ndash lssample prints the letterspacing illustration

ndash anchorarrow anchors an arrow for layer lang1rangndash showarrow toggles layer lang1rang or lang2rang and prints lang2rang

The first two cases require the style file microtype-docsty which can be generated from microtypeins with

makefilemicrotype-docstydocsty

9455 ifxlssampleundefined9456 langlssamplerang

Upon popular request herersquos how Irsquove created the letterspacing illustration32

B1 MacrosRule width and image height and depth

9457 makeatletter9458 newdimenlsamount9459 newdimenlsrule9460 lsrule=02pt9461 deflsheight8pt9462 deflsdepth12pt

32 Note that the lssample module will not be created when installing microtype Instead the source filemicrotype-lssampledtx is included as an attachment in the PDF file If your PDF reader supports this you can

to extract it alternatively you may use the pdftk tool

ProvidesFilemicrotype-lssampledtx[20090608] ^^A dont count the backslashes in this documentmakeatletterletorigstepchecksumstepchecksumletstepchecksumrelaxmakeatother sectionThe letterspacing illustration labelsecletterspace-ill^^Aiffalse meta-comment ^^A ======================================================================== This is filemicrotype-lssampledtx You may treat this file in three different waysbeginitemize item compile it by itself item verb|input| it in the body of a filedtx file item verb|input| it in the preamble it then provides the commands beginitemize item verb|lssample| prints the letterspacing illustration item verb|anchorarrow| anchors an arrow for layer meta1 item verb|showarrow| toggles layer meta1 or meta2 and prints meta2 enditemizeenditemize The first two cases require the style file filemicrotype-docsty which can be generated from filemicrotypeins withbeginverbatimmakefilemicrotype-docstydocstyendverbatim ^^A ========================================================================^^Afi beginmacrocodeifxlssampleundefinedltlssamplegt endmacrocode Upon popular request heres how Ive created the letterspacing illustrationfootnote Note that the |lssample| module will not be created when installing microtype Instead the source file filemicrotype-lssampledtx is included as an attachment in the acronymPDF file If your acronymPDF reader supports this you can textattachfile [color=002 004 048mimetype=textplain]microtype-lssampledtx click here to extract it alternatively you may use the |pdftk| tool subsectionMacros Rule width and image height and depth beginmacrocodemakeatletternewdimenlsamountnewdimenlsrulelsrule=02ptdeflsheight8ptdeflsdepth12pt endmacrocode Our font (Adobe Caslon) beginmacrocodedeflsfontfontfamilypacaselectfont endmacrocode Loop over all letters in meta2 letterspacing them by meta1 beginmacrocodedefdols12lsamount=1relax dolss2enddolsdefdolss12enddols ifxempty2emptydividelsamount 2fi ls1 ifxempty2emptyelse dolss2enddols fi endmacrocode One pkgtikz picture for each letter beginmacrocodedefls1 begintikzpicture[remember pictureline width=lsrule] tikzstyleevery node=[inner sep=0pt] endmacrocode The bounding box beginmacrocode mtslayerstuff node[draw=thegrey fill=theshade outer sep=lsrule anchor=base font=lsfont]phantom1 endmacrocode The letter beginmacrocode node[anchor=basefont=lsfont](1)1 endmacrocode Two auxiliary coordinates beginmacrocode path (1south west) ++(+5lsrule-5lsrule) coordinate (1L) path (1base east) ++(-5lsrule-lsdepth) coordinate (1R) mtslayerstuff endmacrocode Now draw the normal character width beginmacrocode draw[color=thered75 fill=thered30 outer sep=lsrule] (1L) rectangle (1R) ifdimlsamountgt0pt path (1base east) ++(+5lsamount-6pt) coordinate (1_ls) path (1R) ++(lsamount+lsrule+lsdepth) coordinate (1E) endmacrocode and the letter space beginmacrocode draw[color=thered fill=thered50 outer sep=lsrule] (1R) ++(+lsrule+0pt) rectangle (1E) fi endtikzpicture ignorespaces endmacrocode Draw the interword space beginmacrocodedeflssp1234 begintikzpicture[remember pictureline width=lsruleinner sep=0pt] mtslayerstuff tikzstyleevery draw=[anchor=bottom] coordinate(1space) at (22lsdepth2) coordinate(1stretch) at (2+32+0pt) coordinate(1shrink) at (2-42+0pt) draw[color=thegreenfill=thegreen50use as bounding box] (00) rectangle ++(+2+lsdepth) draw[color=thegreenfill=thegreen30] (+2-lsrule) rectangle ++(+3-4pt+lsrule) draw[color=thegreenfill=thegreen50] (+2-lsrule) rectangle ++(-4-4pt+lsrule) draw[-gtline width=03ptshorten lt=05lsrulecolor=thegreen50] (+2-2pt-5lsrule) -- ++(+3+0pt) draw[-gtline width=03ptshorten lt=05lsrulecolor=thegreen30] (+2-2pt-5lsrule) -- ++(-4+0pt) endtikzpicture ignorespaces endmacrocode Layers beginmacrocodedefmtslayer12pdfliteral pageOC1 BDC2pdfliteral pageEMCdefmtsxlayer12pdfliteral pageOCstuff BDC OC1 BDC2pdfliteral pageEMC EMCifxmtobjectsundefinedletmtobjectsemptyfiifxmtorder undefinedletmtorder emptyfixdefmtordermtorder[(Sheep)letmtsresourcesemptydefmtsregister1 immediatepdfobjltlt TypeOCG Name(1) gtgt expandafterxdefcsname mts1endcsnamethepdflastobjspace 0 R xdefmtobjectsmtobjectscsname mts1endcsname xdefmtordermtordercsname mts1endcsname xdefmtsresourcesmtsresources1 csname mts1endcsnamemtsregisterstuffmtsregistertrackingmtsregisterispacemtsregisterospacemtsregisteristretchmtsregisterishrinkmtsregisterostretchmtsregisteroshrinkmtsregisterokernmtsregisterligaturemtsregister_compatibilityxdefmtordermtorder] endmacrocode Anchor point for the arrow in the code beginmacrocodenewcommandanchorarrow[1] tikz[remember pictureoverlay]node(1_c) endmacrocode Add an arrow from code to image beginmacrocodenewcommandaddarrow[5][left] tikz[remember pictureoverlaybend angle=14looseness=075gt=latex] mtsxlayer3draw[-gtthickcolor=the2](4) to[bend 1] (5) endmacrocode Toggle layer beginmacrocodedeftogglelayer123 pdfstartlink userSubtypeLink BS ltlt TypeBorderW 0 gtgt HO BS ltlt TypeBorderW 1 SD D[4 1] gtgt C[07 07 07] HO Contents(Click to Toggle) A ltlt SSetOCGState State[Toggle csname mts1endcsname] gtgt rlap2 fboxsep=0pt fboxrule=0pt mtsxlayerstuff rlapfcolorboxwhitewhitevphantomkgcolorthe32 mtsxlayer1 fcolorboxwhitethe350vphantomkgcolorwhite2 pdfendlinknewcommandshowarrow[2][] ifxrelax1relaxdeftempa2elsedeftempa1fi togglelayertempaitshape 2 endmacrocode The environment for our illustration beginmacrocodedeflssample1 parskip 4pt parindent 0pt par vskip4pt leftskip 15pt mtpseudomargcolortheblueClick on the image to show the kerns and spacings involved Click on emphasised words in the text below to reveal the relation of image and codestrut mtlayer_compatibility mtplacerlaphskip-marginparwidth colorwhite vrule widthdimexprhsize+marginparwidthrelax heightmtunvdimen mtpseudomargcolorthered If you had a acronymPDF viewer that understands acronymPDFsmaller15 you could hide the arrows selectively vskip-mtunvdimen vskip-4pt setlengthfboxsep4pt leavevmode pdfstartlink userSubtypeLink BS ltlt TypeBorderW 0 gtgt HO A ltlt SSetOCGState State[Toggle mtsstuff] gtgt fcolorboxtheframetheshade fontsize3438selectfont 1 pdfendlink parmedskip edefxpdfpageresourcesProperties ltltmtsresourcesgtgtx endmacrocode Now define the illustration to be used in the document beginmacrocodedeflssample lssample dols0ptStop lsspo045em025em015em dols016emstealinghskip-dimexpr 008em+lsrulerelax lsspi1382pt465pt208pt dols016emsheep dols0pt endmacrocode Dont forget to add the arrows beginmacrocode vspace-baselineskip addarrowred trackinglsamount_ceasta_ls addarrowred okern okernend_ceastp_ls addarrowgreen ospace ospace_ceast ospace addarrowgreen ispace ispace_ccenterispace addarrowgreen75 istretchistretch_ceastistretchnorth addarrowgreen75 ishrink ishrink_cwest ishrinknorth addarrowgreen75 ostretchostretch_ceastostretchnorth addarrowgreen75 oshrink oshrink_ceast oshrinknorth addarrow[right]greyligaturenolig_ceast stcenterfi endmacrocode This is for use with filemicrotypedtx beginmacrocodeifxdocumentclasstwoclasseserror usepackagetikzelse endmacrocodesubsectionDocument beginmacrocodedocumentclass[10pta4paper]ltxdocexpandafterdefcsname vermicrotypedtxendcsname29999999 endmacrocode Re-use the preamble from filemicrotypedtx beginmacrocodeusepackagemicrotype-docusepackageattachfileusepackagetikzmakeatletterpdfcatalogOCProperties ltlt OCGs [mtobjects] D ltlt Order [mtorder] BaseStateOFF gtgt gtgt makeatotherbegindocument endmacrocode You are currently reading this beginmacrocodeDocInputmicrotype-lssampledtx endmacrocode Now show what we are able to do beginmacrocodenoindent Since a picture is worth a thousand words probably even more if in our case it depicts a couple of letterspaced words lets bring one to sum up these somewhat confusing options Suppose you had the following settings (which I would in no way recommend they are only for illustrative purposes)beginverbatimSetTracking [ no ligatures = anchorarrownoligf spacing = 60anchorarrowispace0 -1anchorarrowistretch00 anchorarrowishrink outer spacing = 4anchorarrowospace50 2anchorarrowostretch501anchorarrowoshrink50 outer kerning = anchorarrowokernbegin anchorarrowokernend ] encoding = 1anchorarrowlsamount60 endverbatim and then writebeginverbatimStop textlsstealing sheependverbatim this is the (typographically dubious) outcome lssamplenoindent While the word `Stop is not letterspaced the space between the letters in the other two words is expanded by the showarrow[tracking]tracking~amountred of 1601000em=allowbreak016em The showarrow[ispace]inner~spacegreen within the letterspaced text is increased by 60 while its showarrow[istretch]stretchgreen amount is decreased by 10 and the showarrow[ishrink]shrinkgreen amount is left untouched The showarrow[ospace]outer~spacegreen (of 045em) immediately before the piece of text may showarrow[ostretch]stretchgreen by 025em and showarrow[oshrink]shrinkgreen by 015em Note that there is no outer space after the text since the exclamation mark immediately follows instead the default showarrow[okern]outer~kernred of half the letterspace amount (008em) is added Furthermore one showarrowligaturegrey wasnt broken up because we neglected to specify the `|s| in the |no ligatures| keyexpandafterenddocumentfi endmacrocode^^A resume counting backslashesmakeatletterletstepchecksumorigstepchecksum^^Amakeatother beginmacrocodeltlssamplegt endmacrocodenewpageendinput

THE LETTERSPACING ILLUSTRATION Macros 227

Our font (Adobe Caslon)

9463 deflsfontfontfamilypacaselectfont

Loop over all letters in lang2rang letterspacing them by lang1rang9464 defdols12lsamount=1relax dolss2enddols9465 defdolss12enddols9466 ifxempty2emptydividelsamount 2fi9467 ls19468 ifxempty2emptyelse dolss2enddols fi9469

One tikz picture for each letter

9470 defls19471 begintikzpicture[remember pictureline width=lsrule]9472 tikzstyleevery node=[inner sep=0pt]

The bounding box

9473 mtslayerstuff9474 node[draw=thegrey9475 fill=theshade9476 outer sep=lsrule9477 anchor=base9478 font=lsfont]phantom19479

The letter

9480 node[anchor=basefont=lsfont](1)1

Two auxiliary coordinates

9481 path (1south west) ++(+5lsrule-5lsrule) coordinate (1L)9482 path (1base east) ++(-5lsrule-lsdepth) coordinate (1R)9483 mtslayerstuff

Now draw the normal character width

9484 draw[color=thered759485 fill=thered309486 outer sep=lsrule]9487 (1L) rectangle (1R)9488 ifdimlsamountgt0pt9489 path (1base east) ++(+5lsamount-6pt) coordinate (1_ls)9490 path (1R) ++(lsamount+lsrule+lsdepth) coordinate (1E)

and the letter space

9491 draw[color=thered9492 fill=thered509493 outer sep=lsrule]9494 (1R) ++(+lsrule+0pt) rectangle (1E)9495 fi9496 9497 endtikzpicture9498 ignorespaces9499

Draw the interword space

9500 deflssp12349501 begintikzpicture[remember pictureline width=lsruleinner sep=0pt]9502 mtslayerstuff9503 tikzstyleevery draw=[anchor=bottom]9504 coordinate(1space) at (22lsdepth2)9505 coordinate(1stretch) at (2+32+0pt)9506 coordinate(1shrink) at (2-42+0pt)9507 draw[color=thegreenfill=thegreen50use as bounding box]9508 (00) rectangle ++(+2+lsdepth)9509 draw[color=thegreenfill=thegreen30]9510 (+2-lsrule) rectangle ++(+3-4pt+lsrule)9511 draw[color=thegreenfill=thegreen50]9512 (+2-lsrule) rectangle ++(-4-4pt+lsrule)9513 draw[-gtline width=03ptshorten lt=05lsrulecolor=thegreen50]

THE LETTERSPACING ILLUSTRATION Macros 228

9514 (+2-2pt-5lsrule) -- ++(+3+0pt)9515 draw[-gtline width=03ptshorten lt=05lsrulecolor=thegreen30]9516 (+2-2pt-5lsrule) -- ++(-4+0pt)9517 9518 endtikzpicture9519 ignorespaces9520

Layers

9521 defmtslayer12pdfliteral pageOC1 BDC2pdfliteral pageEMC9522 defmtsxlayer12pdfliteral pageOCstuff BDC OC1 BDC2pdfliteral pageEMC EMC9523 ifxmtobjectsundefinedletmtobjectsemptyfi9524 ifxmtorder undefinedletmtorder emptyfi9525 xdefmtordermtorder[(Sheep)9526 letmtsresourcesempty9527 defmtsregister19528 immediatepdfobjltlt TypeOCG Name(1) gtgt9529 expandafterxdefcsname mts1endcsnamethepdflastobjspace 0 R 9530 xdefmtobjectsmtobjectscsname mts1endcsname9531 xdefmtordermtordercsname mts1endcsname9532 xdefmtsresourcesmtsresources1 csname mts1endcsname9533 mtsregisterstuff9534 mtsregistertracking9535 mtsregisterispace9536 mtsregisterospace9537 mtsregisteristretch9538 mtsregisterishrink9539 mtsregisterostretch9540 mtsregisteroshrink9541 mtsregisterokern9542 mtsregisterligature9543 mtsregister_compatibility9544 xdefmtordermtorder]

Anchor point for the arrow in the code

9545 newcommandanchorarrow[1]9546 tikz[remember pictureoverlay]node(1_c)

Add an arrow from code to image

9547 newcommandaddarrow[5][left]9548 tikz[remember pictureoverlaybend angle=14looseness=075gt=latex]9549 mtsxlayer3draw[-gtthickcolor=the2](4) to[bend 1] (5)9550

Toggle layer

9551 deftogglelayer1239552 pdfstartlink9553 userSubtypeLink9554 BS ltlt TypeBorderW 0 gtgt HO9555 BS ltlt TypeBorderW 1 SD D[4 1] gtgt9556 C[07 07 07] HO9557 Contents(Click to Toggle)9558 A ltlt SSetOCGState9559 State[Toggle csname mts1endcsname] gtgt 9560 rlap29561 fboxsep=0pt fboxrule=0pt9562 mtsxlayerstuff9563 rlapfcolorboxwhitewhitevphantomkgcolorthe329564 mtsxlayer19565 fcolorboxwhitethe350vphantomkgcolorwhite29566 9567 pdfendlink9568 9569 newcommandshowarrow[2][]9570 ifxrelax1relaxdeftempa2elsedeftempa1fi9571 togglelayertempaitshape 2

THE LETTERSPACING ILLUSTRATION Document 229

The environment for our illustration

9572 deflssample19573 parskip 4pt parindent 0pt9574 par9575 vskip4pt9576 leftskip 15pt9577 mtpseudomargcolortheblueClick on the image to show the kerns9578 and spacings involved Click on emphasised words in the text below9579 to reveal the relation of image and codestrut9580 mtlayer_compatibility9581 mtplacerlaphskip-marginparwidth colorwhite9582 vrule widthdimexprhsize+marginparwidthrelax heightmtunvdimen9583 mtpseudomargcolorthered9584 If you had a acronymPDF viewer that understands9585 acronymPDFsmaller15 you could hide the arrows selectively9586 vskip-mtunvdimen9587 vskip-4pt9588 setlengthfboxsep4pt9589 leavevmode9590 pdfstartlink9591 userSubtypeLink9592 BS ltlt TypeBorderW 0 gtgt HO9593 A ltlt SSetOCGState9594 State[Toggle mtsstuff] gtgt 9595 fcolorboxtheframetheshade9596 fontsize3438selectfont 19597 pdfendlink9598 parmedskip9599 9600 edefxpdfpageresourcesProperties ltltmtsresourcesgtgtx9601

Now define the illustration to be used in the document

9602 deflssample9603 lssample9604 dols0ptStop9605 lsspo045em025em015em9606 dols016emstealinghskip-dimexpr 008em+lsrulerelax9607 lsspi1382pt465pt208pt9608 dols016emsheep9609 dols0pt9610

Donrsquot forget to add the arrows

9611 vspace-baselineskip9612 addarrowred trackinglsamount_ceasta_ls9613 addarrowred okern okernend_ceastp_ls9614 addarrowgreen ospace ospace_ceast ospace9615 addarrowgreen ispace ispace_ccenterispace9616 addarrowgreen75 istretchistretch_ceastistretchnorth9617 addarrowgreen75 ishrink ishrink_cwest ishrinknorth9618 addarrowgreen75 ostretchostretch_ceastostretchnorth9619 addarrowgreen75 oshrink oshrink_ceast oshrinknorth9620 addarrow[right]greyligaturenolig_ceast stcenter9621 9622 fi

This is for use with microtypedtx

9623 ifxdocumentclasstwoclasseserror9624 usepackagetikz9625 else

B2 Document9626 documentclass[10pta4paper]ltxdoc9627 expandafterdefcsname vermicrotypedtxendcsname29999999

THE LETTERSPACING ILLUSTRATION Document 230

Re-use the preamble from microtypedtx9628 usepackagemicrotype-doc9629 usepackageattachfile9630 usepackagetikz9631 makeatletter9632 pdfcatalogOCProperties ltlt OCGs [mtobjects]9633 D ltlt Order [mtorder] BaseStateOFF gtgt gtgt 9634 makeatother9635 begindocument

You are currently reading this9636 DocInputmicrotype-lssampledtx

Now show what we are able to do9637 noindent9638 Since a picture is worth a thousand words probably even more if in our9639 case it depicts a couple of letterspaced words letrsquos bring one to sum up9640 these somewhat confusing options Suppose you had the following settings9641 (which I would in no way recommend they are only for illustrative purposes)9642 beginverbatim9643 SetTracking9644 [ no ligatures = anchorarrownoligf9645 spacing = 60anchorarrowispace09646 -1anchorarrowistretch00 anchorarrowishrink9647 outer spacing = 4anchorarrowospace509648 2anchorarrowostretch501anchorarrowoshrink509649 outer kerning = anchorarrowokernbegin9650 anchorarrowokernend ]9651 encoding = 9652 1anchorarrowlsamount60 9653 endverbatim9654 and then write9655 beginverbatim9656 Stop textlsstealing sheep9657 endverbatim9658 this is the (typographically dubious) outcome96599660 lssample96619662 noindent9663 While the word `Stoprsquo is not letterspaced the space between the letters in9664 the other two words is expanded by the showarrow[tracking]tracking~amountred9665 of 1601000em=allowbreak016em9666 The showarrow[ispace]inner~spacegreen within the letterspaced text is9667 increased by 60 while its showarrow[istretch]stretchgreen amount is9668 decreased by 10 and the showarrow[ishrink]shrinkgreen amount is left9669 untouched9670 The showarrow[ospace]outer~spacegreen (of 045em) immediately before the9671 piece of text may showarrow[ostretch]stretchgreen by 025em and9672 showarrow[oshrink]shrinkgreen by 015em9673 Note that there is no outer space after the text since the exclamation mark9674 immediately follows instead the default showarrow[okern]outer~kernred9675 of half the letterspace amount (008em) is added9676 Furthermore one showarrowligaturegrey wasnrsquot broken up because we9677 neglected to specify the `|s|rsquo in the |no ligatures| key96789679 expandafterenddocument9680 fi

9681 langlssamplerang

CHANGE HISTORY 231

C Change history

20040911 Version 10

General Initial version 1

20040921 Version 11

General configuration file names in lowercase (sug-gested by Harald Harders) 87

remove 8-bit characters from the configuration files(suggested by Harald Harders) 147

Protrusion add factors for some more characters 154settings for Adobe Minion (contributed by Harald

Harders) 155DeclareCharacterInheritance new command pos-

sibility to specify character inheritance 120MTdeclaresets remove spaces around set name 106MTfindfile fix also check whether the file for

the base font family has already been loaded 87MTgetbasefamily only remove suffixes lsquoxrsquo or lsquojrsquo 88MTgetlistname donrsquot check for empty attributes

list 89MTifempty fix use category code 12 for the percent

character (reported by Tom Kink) 45MTisnumber numbers may also be specified in

hexadecimal or octal (suggested by HaraldHarders) 94

MTpdftexno fix version check (reported by HaraldHarders) 40

MTpermute donrsquot use sets for empty encoding 121MTsetupexpansion issue an error instead of a

warning when pdfTEX version is too old forautoexpand 137

MTsplitcodes fix allow zero and negative values 63MTuseset remove spaces around set name 110

20041003 Version 12

Font aliases declare cmor as an alias of cmr 144Font sets new allmath and basicmath 143Protrusion add settings for Computer Modern Roman

and Adobe Garamond in TS1 encoding 178add settings for Computer Modern Roman math

symbols 183MTfamilyalias define alias font name as an altern-

ative not as a replacement 60MTgetbasefamily also remove lsquowrsquo (swash capit-

als) 88MTgethighlevel check whether defaults have

changed 106

MTgetinhlist fix set inheritance list globallyto empty 91

MTgetlistname alternatively check for alias fontname 89

MTgetsize additional magic to catch some errors 108MTgetsize hijack setfontsize instead of

setfontsize 108MTloop fix new macro used instead of loop 49MTmaybedo also check for alias font name 60MTpermute more sanity checks for

SetProtrusion and SetExpansion 123MTsetupfont also search for alias font file 57

fix call encupdate if necessary 57

20041027 Version 13

General fix specifying load option does no longerrequire to give a name too 116

Font aliases declare aer zer and hfor as aliases ofcmr 144

MTfixcatcode check some category codes (com-patibility with german) 35

MTloadlist check whether list exists 87

20041112 Version 14

General check for pdfcprot 54donrsquot use scratch registers in global definitions 91use pickupfont instead of definenewfont as

the hook for MTsetupfont 100use one instead of five counters 50

Protrusion tweak quote characters for cmr variants

(OT1 T1 lmr) 160microtypesetup fix set the correct levels and re-

member them warning when enabling an optiondisabled in package options 131

SetExpansion fix specifying extra options does nolonger require to give a name too 113

20041117 Version 14a

General new option final 128MTcfgcatcodes fix reset some more catcodes

when reading files (reported by Michael Hoppe) 88

CHANGE HISTORY 232

20041126 Version 14b

General fix set catcodes before reading global con-figuration file (reported by Christoph Bier) 130

optimisation use less expandafters and csnames 44Protrusion harmonise dashes in upshape and italic

(cmr pad ppl) 154slanted like italics 163

MTchecklistfamily fix donrsquot try alias familyname if encoding failed 61

MTgetbasefamily fix failed for font names of the

form abczz (reported by Georg Verweyen) 88MTgetslot donrsquot define MTchar globally (save

stack problem) 91MTifdimen donrsquot set MTcount globally (save stack

problem) 46MTsetupPDF new message if pdfoutput is

changed 134MTuseset donrsquot use undeclared font sets 110

20041215 Version 15

General defaults step 4 (suggested by Hagraven ThecircThagravenh) 128

new option selected by default false (suggestedby Hagraven Thecirc Thagravenh) 126

Documentation add lsquoShort historyrsquo 30Inheritance remove ss from T1 list add DJ 148Protrusion settings for Bitstream Charter 155DeclareMicrotypeAlias remove spaces around ar-

guments 111MTcfgcatcodes reset catcode of lsquo=rsquo (compatibility

with Turkish babel) 88MTfixcatcode reset catcode of lsquoˆrsquo (compatibility

with chemsym) 35

MTgethighlevel donrsquot test defaults if called afterbegin document 106

MTscalefactor warning for factors outside limits 66MTscaletoem donrsquot use lpcode and rpcode for

the calculation 64MTsetexcodes allow non-selected font expan-

sion 70MTsetprcodes adjust protrusion factors before

setting the inheriting characters 62MTsetupexpansion defaults calculate step as

min(stretchshrink)5 136defaults turn off expansion for DVI output 135disable automatic expansion for DVI output 136

20050124 Version 16

General defaults turn off expansion for old pdfTEXversions 129

load a font if none is selected 56new option factor by default 1000 128restructure dtx file 143test whether pickupfont has changed 102test whether numeric options receive a number 128use e-TEXrsquos ifcsname and ifdefined if defined 44

Protrusion add italic uppercase Greek letters 163improve settings for numbers (pointed out by Peter

Muthesius) 156

tune CMR math letters (OML encoding) 183MTgetcharwd use e-TEXrsquos fontcharwd if available 65MTgetinhlist correct message if selected is

false 91MTsetexcodes introduce factor option 70MTsetprcodes introduce factor option 62MTsetupexpansion disable automatic expansion

for old pdfTEX versions 137MTuseset retain current set if new set is un-

declared 110MTvinfo new macro instead of ifMTverbose 36

20050202 Version 16a

Documentation add table of fonts with tailored pro-trusion settings 21

MTgetslot completely redone hopefully morerobust (compatible with frenchpro problem

reported by Bernard Gaulle) 91MTpdftexno new macro 39MTresetefcodes only reset efcodes for older

pdfTEX versions 70

20050323 Version 17

General allow specification of size ranges (suggestedby Andreas Buumlhmann) 107

disallow automatic expansion if pdfTEX too old 119fix remove space after autoexpand 119new value for verbose option errors 128shorter command names 51warning when running in draft mode 134

Documentation add hint about compatibility 26remove table of match order (now table 4 on

page 89) 12Protrusion fix remove from OT1 add

textbackslash to T1 encoding 158LoadMicrotypeFile new command (suggested by

Andreas Buumlhmann) 112MicrotypeHook new command for font package

authors 130microtypesetup fix warning also when setting to

(no)compatibility 131MTbegincatcodes also use inside configuration

commands 88MTcfgcatcodes reset catcode of lsquorsquo (compatibility

with french packages) 88

CHANGE HISTORY 233

MTDeclareMicrotypeAlias may also be used insideconfiguration files 112

MTgetlistname use tfor (Andreas Buumlhmannrsquosidea) 89

MTgetslot remove backslash hack 91test for chardefed commands 92test whether langencodingranglangrang is defined 92

MTiflistexists donrsquot define MT1cnameglobally here and elsewhere 90

MTifdimen comparison with 1 to allow size smallerthan 1 (suggested by Andreas Buumlhmann) 46

MTincrement use e-TEXrsquos numexpr if available 50MTiscomposite new macro construct command

for composite character no uncontrolled expan-sion 97

MTscale new macro use e-TEXrsquos numexpr if avail-able 51

MTsetexcodes two versions of this macro 70MTsplitname donrsquot define MTencoding ampc

globally 60MTtestast make it simpler 106MTtryorder always check for size too (suggested

by Andreas Buumlhmann) 89fix also check for langseriesranglangshaperang (reported by

Andreas Buumlhmann) 89MTwarncodetoolarge new macro type out max-

imum protrusion factor 66MTwarnerr new macro for verbose=errors 36showhyphens modify showhyphens 138

20050623 Version 18

General SetProtrusion new key unit 118if font substitution has occurred set up the substi-

tute font not the selected one 100new option config to load a different main config-

uration file 129new option unit by default character 129

Documentation add example for factor option 13add example of how to get rid of a widow (sugges-

ted by Adam Kucharczyk) 15add hint about error messages 27

Font aliases declare pxr and txr as aliases of pplresp ptm 145

Font sets add U encoding to allmath 143Inheritance remove DJ from T1 list (itrsquos the same as

DH) 148Protrusion add LY1 characters for Times 163

settings for AMS math fonts 187verified settings for slanted Computer Modern Ro-

man 171addaccent fix disable micro-typographic setup in-

side addaccent (reported by Stephan Hennig) 102DeclareMicrotypeAlias warning when overriding

an alias font 111DeclareMicrotypeSetDefault new command set

default font set 110MTcfgcatcodes reset catcodes of the remaining

ASCII characters 88MTcheckrlist made recursive 124MTcurrlistname new macro current list type

and name 98MTdeclaresets warning when redefining a set 106MTdefinesetkey use comma lists instead of

token lists 106

MTfindfile no longer wrap names in commands 87MTfixfontdimensix new macro test whether

fontdimen6 is defined 59MTgetcharwd warning for missing (resp zero-

width) characters 65MTgetlistname made recursive 89MTgetslot fix expand active characters 91

test whether langencodingranglangrang is defined made morerobust 92

MTgetunit new macro get unit for codes 67MTinrlist made recursive 49MTisactive new macro translate inputenc-

defined characters 95MTisletter warning for non-ASCII characters 94MTledmacsetup character protrusion with ledmac 53MTmapclistn new macro used instead of for 48MTmaptlistn new macro used instead of tfor 48MToldcmd renamed commands from

MicroType to Microtype 36MTpdftexno case 5 pdfTEX 130 40MTpermute add ranges to the beginning of

the lists 123MTscale fix remove spaces in e-TEX variant (repor-

ted by Mark Rossi) 51MTsetupfonthook restore and when

hyperref is loaded 54restore csquotesrsquos active characters 54restore percent character if Spanish babel is loaded 54

MTsplitcodes get character width once only 63MTuseset fix remove braces in first line 110MTxadd simplified 47

20051028 Version 19

General DeclareMicrotypeSet new key font 109SetProtrusion value lsquorelativersquo renamed to

lsquocharacterrsquo for key unit 118allow context-specific font setup 100compatibility with TEX Live hack (reported by Her-

bert Voszlig) 39disable microtype setup inside hyperrefrsquospdfstringdef (reported by Hagraven Thecirc Thagravenh) 55

fix use true as the default value 125option unit rename value relative to character 129

Documentation add hint about verbatim environ-ment 25

add remark about Type 1 fonts required for auto-matic font expansion 8

Font aliases declare qpl and qtm (qfonts TEX Gyre)as aliases of ppl resp ptm 145

Font sets add OT4 encoding to text sets 143add T5 encoding to text sets 143

Inheritance add list for OT4 149add list for T5 (requested by Hagraven Thecirc Thagravenh) 150

CHANGE HISTORY 234

Protrusion fix remove uppercase Greek letters fromT1 encoded CMR 158

settings for OT4 encoding (Computer Modern Ro-man Palatino Times) 154

settings for T5 encoded Computer Modern Roman 154DisableLigatures new command disable ligatures

(requires pdfTEX 130) 112microtypecontext new command change setup

context in the document 103MTchecklistfamily fix add two missing

expandafters 61MTdetokenizec fix the e-TEX version 45MTexptwon new macros less expandafters 44

MTgetopt new key lsquopresetrsquo to set all characters tothe specified value before loading the lists 67

MTisactive redone use setdisplayprotect 95MTisletter using catcode should be more effi-

cient than inspecting the meaning 94MTmaybedo redone 60MTremfromclist new macro remove an item

from a comma list 48MTscalefactor generalised 66MTsetupexpansion disable expansion if both step

and shrink are zero 137warning if user requested zero step 136

MTtoks use instead of toks 42SetProtrusion (et al) new key font 113

20051205 Version 19a

General lsquolangfile nameranglangline numberrangrsquo as default listname 116

new option defersetup by default true 127remove superfluous test whether pickupfont has

changed 102Documentation add explanation for error message

in DVI mode 27add explanation for error message with non-Type 1

fonts 28Font aliases declare mdbch (mathdesign) as an alias

of bch 146Protrusion fix remove lsquo_ rsquo from OT1 encoding 159

settings for T5 encoded Charter 154microtypesetup inside the preamble accepts all

package options 131MTcheckfontcx optimise context-sensitive setup 102MTdefinesetkey donrsquot expand variables imme-

diately (requested by Georg Verweyen) 106MTgethighlevel no longer check whether defaults

have changed 106MTifdefinedcT new macros true case only 45MTifint use pdfmatch if available 45MTifstreq use pdfstrcmp if available 47MTinclist fix 48MTinfomissingchar info instead of warning

(after Michael Hoppe reported that the lsquoflrsquo ligatureis missing in Palatino SC) 65

MTisfeature new macro check for pdfTEX fea-ture 51

MTmapclistn following LATEX3 48MTpermute donrsquot define permutations for

unused encodings 122MTremfromclist fix 48MTsetup defer setup until the end of the preamble 52

20060120 Version 19b

General compatibility with listings sanitise morecatcodes (reported by Holger Uhr) 55

compatibility with the extendedchar option of thelistings package 56

Documentation activate expansion in the distributedPDF 1

add samples of micro-typographic features 4MTfeatures use throughout the package to adjust

to beta-ness 51MTifdimen use pdfmatch if available 46MTwarncodetoolarge fix calculation with

present factor 66

20060202 Version 19c

Documentation add example of how to increase pro-trusion of footnote markers (suggested by GeorgVerweyen) 22

Protrusion settings for URW Garamond 155

MTdefinecodekeyfont fix context was ignored 116MTdefinecodekeysize fix embrace

MTtempsize in csname (bug introduced inv19b) 115

20060505 Version 19d

Font sets md instead of m series in basic sets 143add QX encoding to text sets 143

Inheritance add list for QX encoding (contributed byMaciej Eder) 149

Protrusion settings for QX encoding (contributed byMaciej Eder) 161

settings for Euro symbols (Adobe ITC marvosym) 194tweak AMS settings 187

DeclareCharacterInheritance fix empty context 120MTdetokenizen new macro use detokenize if

available 45MTgetexopt fix evaluate preset 71MTgetfontdimen warning for zero fontdimen 65MTgetopt optimise donrsquot reset when preset op-

tion is set 67set list name before presetting 67

CHANGE HISTORY 235

MTisactive support for Unicode (inputencutf8) 95MTsetupfonthook restore and when tex4ht

is loaded (reported by Peter Dyballa) 54SetProtrusion (et al) optimise unify keys for

mandatory argument 113

(et al) split keys of optional and mandatory argu-ment 113

20060728 Version 19e

General fix default value for activate true 126Documentation add hint about unknown encodings 26

include LPPL 249Font aliases declare zeur and zeus (eulervm) as

aliases of eur resp eus (euler) 146Inheritance adapt to marvosymrsquos changed encoding 151Protrusion complete settings for Euler Fraktur and

Script fonts 194fix forgotten comma in mt-mvscfg adapt tomarvosymrsquos changed encoding 194

settings for Euler Roman font 190DeclareCharacterInheritance new key lsquoinputencrsquo

to set the input encoding 120MTremfromclist model after removeelement 48MTsetup empty MTsetup after use (compatibil-

ity with the combine class) 52pickupfont no tracing with trace package 101SetExpansion new key inputenc 113SetProtrusion (et al) new key inputenc 113

20060909 Version 19f

Protrusion fix euler-vm did not load euler settings 191MTcurrlistname fix MessageBreak must not be

expanded 98MTgdefn new macros global variants 44MTgetinhlist fix input encoding must be set

after the inheritance list has been parsed 91MTglet new macro 44

MTresetcontext only reset context if it has actu-ally been changed 104

MTsetinhlist fix forgotten comma in the fea-tures list 120

MTsetnamedkeys new macro set name first sim-plify parsing of optional argument 115

SetProtrusion (et al) set catcodes before parsingoptional argument 113

20070114 Version 20

General compatibility with listings set catcode ofbackslash to zero (reported by Steven Bath) 56

compatibility with soul register textls andlsstyle 56

new option babel by default false (language-dependent setup suggested by Ulrich Dirr) 126

new option letterspace by default 100 128new package letterspace a stripped-down ver-

sion containing the letterspacing commandsonly 1

option lsquobabelrsquo fix switch off French babelrsquos short-hands properly (reported by Daniel Flipo) 142

option lsquobabelrsquo switch off Turkish babelrsquos short-hands 142

option lsquounitrsquo SetProtrusion deprecate valuelsquorelativersquo completely 118

Documentation add hint about how to increasefont_max and font_mem_size 28

add hint about warning when tracking and expan-sion is applied to a font 28

add remark about lsquodraftrsquo option disablingmicrotype (noted by Michalis Miatidis) 9

qualify hint about web documents with regard toolder pdfTEX versions 25

qualify hints about expansion error messages withregard to older pdfTEX versions 27

Font sets new footnotesize and scriptsize 143

new smallcaps 143DeclareMicrotypeBabelHook new command inter-

action with babel 113lsstyle fix font switches donrsquot pose a problem

anymore 79fix letterspacing commands may be nested 79new command letterspacing 79totally redone using the new letterspacefont 79

MTdeclaresets fix empty size list when redefin-ing set 106

MTissymbol made even more robust 96MTloadinputenc sanitise catcodes before loading

input encoding (problem with listings) 68MTpdftexno case 6 pdfTEX 140 40MTsetupnoligatures maybe disable

MTnoligatures after the preamble 141MTsplitname adjust to possible letterspacing 60SetExtraKerning new command additional kern-

ing 114SetExtraSpacing new command adjustment of

interword spacing 114SetTracking new command tracking 114textls new command letterspacing 84

starred version remove spaces around text 84tracingmicrotypeinpdf new debug method mark

all fonts with PDF annotations 37

CHANGE HISTORY 236

20070121 Version 21

General compatibility with pinyin disablemicrotype in pymacron (reported by Sven Nau-mann) 56

fix letterspace package forgot to load keyval 42lslig new command protect ligatures in letter-

spaced text 79

MTgetlsbasefont redone use pdfmatch tomake it bullet-proof 79

MTorigpickupfont compatibility with CJK alsocheck for its definition 100

textls fix use hmodebgroup 84

20070714 Version 22

General disable microtype if wordcount is loaded(reported by Ross Hetherington) 52

new option copyfonts 127simplify key declarations 116use catcode trickery for e-TEX test 38

Documentation add hint about error message withpdfTEX 140 27

add hint about extra TOC leader dot (first dis-covered by Morten Hoslashgholm) 25

add overview 5logo transparency and amusement 1

Font aliases declare chr (chmath) as an alias of bch(reported by Geoff Vallis) 146

declare fp9x fp9j (FPL Neu) as aliases of ppl[xj] 145Font sets default set for tracking smallcaps 144Inheritance remove lsquo-rsquorarr lsquo127rsquo 148Protrusion settings for Bitstream Letter Gothic 155Spacing add sample 195Tracking add ligatures that are to be disabled 152DeclareMicrotypeVariants new command 111DisableLigatures new optional argument disable

selected ligatures only 112lslig always defined 79MTchecklistfont fix construct font name from

characteristics 62MTcopyfont optionally work on copies of fonts 58MTgetbasefamily redone working on font names

and suffixes of arbitrary length 88MTgetcharwd subtract letterspacing amount from

width 65MTgetlsbasefont fix again remember base font

in a macro 79MTifdimen employ LuaTEX features if available 46MTifint employ LuaTEX features if available 45MTifstreq employ LuaTEX features if available 47

fix e-TEX version shouldnrsquot use x and y (foundby Wiebke Petersen) 47

MTiscomposite more robust expand exactly once 97MTissymbol expand once more (for frenchpro) 96MTlsfont use fontname not MTfont 75MTlua (basic) support for LuaTEX 41MTpdftexno case 7 pdfTEX 1404 40MTpresetauxspace generalised 69MTsetallpr (et al) allow empty values 63MTsetinputenc only load inputenc files if neces-

sary 68MTsettrcodes disable ligatures in letterspaced

fonts manually (due to change in pdfTEX 1404) 76possibility to customise interword spacing 76

MTsetupexpansion warning if stretch or shrinkarenrsquot multiples of step 137

MTsetupfont donrsquot call encupdate anymore 57only add features that are available with the re-

spective pdfTEX 57MTsetupfonthook restore percent character if

Galician babel is loaded 54MTtheprcodetr adjust protrusion of letter-

spaced fonts 63MTtracking remember fonts that shouldnrsquot be let-

terspaced 75MTtracking fix tracking couldnrsquot be re-enabled 75MTwarntrackingDVI warning when letterspacing

in DVI mode 140MTwithbabelandT also inspect class options 52pickupfont letterspace setup inside group 101SetTracking new key lsquono ligaturesrsquo to disable

ligatures of letterspaced fonts 114new keys lsquospacingrsquo and lsquoouter spacingrsquo to adjust

interword spacing (suggested by Steven E Har-ris) 114

third argument may be empty 114textmicrotypecontext new command wrapper

around microtypecontext 104

20071223 Version 23

General disable microtypecontext in hyperrefrsquospdfstringdef 55

fix really switch off Turkish shorthands 142new value for verbose option silent (suggested

by Karl Berry) 128turned some warnings into errors 128

Documentation add kerning sample 18add letterspacing illustration 17

dosubstcorrection remember substitute font forall times (reported by Stephan Hennig) 102

lslig redone extract outer kerns from currentletterspacing amount 79

microtypecontext made robust (reported byStephan Hennig) 103

MTbegincatcodes fix donrsquot disable KVspdef 88MTdefinesetkeyfont font single asterisk

means normal font 109MTinclist donrsquot use x (reported by Peter Meier) 48MTisactive support for extended Unicode

(inputencutf8x resp ucs) ndash experimental 95MTnoligatures fix set evaluation didnrsquot work (bug

introduced in v22) 85MTplain letterspace support for eplainminiltx 38MTsetcurros adjusting spaces made more reli-

able 77

CHANGE HISTORY 237

MTsettrcodes also adjust tracking if protrusion isnot enabled and even for letterspace (reportedby Stephan Hennig) 76

possibility to customise outer kerning (suggestedby Stephan Hennig) 76

MTSetTracking sanity check for value 114MTsetuptracking enable protrusion when track-

ing is enabled 139MTtrouterl only change pre outer space if it

contains shrink 81

20080229 Version 23a

General fix test for soul under plain TEX 56Documentation add hint about babel having to be

loaded first 27add table of available and enabled features 7mention soulutf8 30

Protrusion adjust LMR quotation marks again 160MTerrordoesntwork error messages if pdfTEX is

too old for extensions 140MTfixcatcode fix catcodes earlier and also for the

letterspace package 35MTgetkey fix key=val in class options list 134MTsetcodes generalised 63MTsetupfonthook restore percent character if

Mexican babel is loaded 54

20080604 Version 23b

MTexpgcs new macro reduce save stack size 44MTfontcopy enable font copies also with protru-

sion contexts (reported by Nathan Rosenblum) 58MTgetsize grouping 108MTnoligatures fix warning messages for un-

known slots 86MTorigpickupfont compatibility with CJKutf8

also check for its definition 100MTrequireslatex new macro 38MTsettrcodes fix protrusion adjustment only

for new fonts (reported by Wolfram Schaalo) 76MTtrouterl fix only in horizontal mode 81

make spaceskip-aware (ragged2e) 81MTtrouterr additional test for horizontal mode 82

20081111 Version 23c

General LuaTEX supported by default 40Documentation add hint about spacing being exper-

imental 26add hint about partial incompatibility with CJK 27

Inheritance add textcommabelow[STst] to QX en-

coding (reported by Vasile Gaburici) 150MTdetokenizec fix remove last space only (repor-

ted by Ulrich Dirr) 45MTtrouterr additional test for horizontal mode

(reported by Sveinung Heggen) 82

20090327 Version 23d

General fix pinyin compatibility check (reported bySilas S Brown) 56

move setup to the very end (for Colin Rourke) 142ifMTinannot use pdftexcmds for debugging 37lsstyle disable for LuaTEX 79

make invalid in math mode 79microtypesetup select font after setup 131MTcheckactiveset warning for missing default

sets 130MTlua update for LuaTEX 036 41MTsettrcodes allow zero tracking 75MTsettrzero fix allow switching off tracking

(reported by Ulrich Dirr) 80MTsetupexpansion default step 1 for pdfTEX

versions ge 140 136MTtrouterr donrsquot use x (reported by Ulrich

Dirr) 82fix donrsquot adjust in math mode (reported by Chris-

toph Bier) 82fix donrsquot adjust inside discretionary (reported by

Maverick Woo) 82MTtrsetokern allow empty value for outer

kerning 84textls make math mode aware 84

20091109 Version 23e

Documentation suggest to patch verbatim insteadof verbatim 26

Expansion settings for T2A encoding (contributed byKarl Karlsson) 153

Font sets sc instead of sc in smallcaps set 143add T2A encoding 143

Protrusion settings for T2A encoding (contributed byKarl Karlsson) 160

Spacing settings for T2A encoding (contributed by

Karl Karlsson) 197MTfixfontdimensix fix gobbling settings with

tracking failed (reported by Leo) 59MTsetup make space-unaware (requested by Mar-

cin Borkowski) 52MTtikzsetup compatibility with tikz (first repor-

ted by Christian Stark) 54MTtrouterr fix set current kerning and spacing

again (found by Lars Roumlnnbaumlck) 82

CHANGE HISTORY 238

20100110 Version 24

General new file microtypelua containing the luafunctions (contributed by Eacutelie Roux) 43

Protrusion settings for T2A encoded Minion (contrib-uted by Karl Karlsson) 160

20130313 Version 25

General allow contexts for LuaTEX 117disable lsquoDVIoutputrsquo option for XETEX 127fix check whether lsquolangfileranglanglinerangrsquo list name already

exists (reported by Till A Heilmann) 116letterspacing with LuaTEX 062 75new files microtype-pdftexdefmicrotype-xetexdef microtype-luatexdefcontaining engine-specific definitions 38

protrusion with XETEX 40restore space inside listings (reported by Rolf

Dieterich) 56Documentation add hint about LuaTEX compatibility 27

add hint about spacing and ragged2e 26add hint about dtx source code 28include microtype-logodtx andmicrotype-lssampledtx 221

Font aliases declare lmsy and lmm as aliases of cmsyresp cmm (reported by Jonas Hogstrom) 144

declare zgmx etc (garamondx) as aliases of ugm 146declare Latin Modern Roman (OpenType version)

as alias of lmr when fontspec is loaded 144declare TeX Gyre Pagella Asana Math Palatino LT

Std and Palatino as aliases of Palatino Linotype(OpenType version) 145

Font sets add EU1 and EU2 encodings 143Inheritance add rudimentary list for EU1 and EU2 151Protrusion add default lists for EU1 and EU2 159

improvements to Computer Modern Roman italics(contributed by Hendrik Vogt) 163

Tracking add EU2 encoding to default list 152DeclareCharacterInheritance allow more than

one encoding 120DeclareMicrotypeAlias ignore spaces 111ifMTnofamily info if settings are not family-specific

(suggested by Hagraven Thecirc Thagravenh) 62LoadMicrotypeFile remove all spaces in font name 112lsstyle fix ensure to set up math fonts (reported

by RazorXsr) 79

MTdefinecodekeyfamily compatibility withfontspec remove its internal counter (repor-ted by Till A Heilmann) 115

MTdefinecodekeyfont scrub fontspec featurecount (found by Meho R) 116

MTdofont adapt for LuaTEX 50adapt for XETEX 50

MTgetslot adapt for LuaTEX (requested by GeorgDuffner) 92

adapt for XETEX 92MTifouternext fix conflict with amsmath (repor-

ted by Scott Pakin) 82MTinfomissingchar fix error message for XETEX

(reported by Juan Acevedo) 65MTischarx compatibility with xunicode 97MTledmacsetup fix to work with XETEX (reported

by Maiumleul Rouquette) 53MTlssetls allow formulas in optional argument

to textls (fix by Heiko Oberdiek) 84MTmicrotypecontext fix ensure to set up math

fonts (reported by RazorXsr) 104MTregistersubstfont only register substituted

font if it isnrsquot registered already (reported byGeorge Gratzer and Josep Maria Font) 102

MTregistersubstfontcx only register if it isnrsquotregistered already 103

MTscrubfeatures compatibility with fontspecremove its internal counter 60

MTsetallpr fix remove space (found byMeho R) 63

MTsetprcodes make info about generic set-tings encoding-specific (reported by SebastianSchubert) 62

MTsetupspacing warning with ragged2e (reportedby Steffen Hoffmann) 139

MTsetupfont select font with fontspec (found byGeorg Duffner) 57

MTsetupfonthook restore and whenmathastext is loaded (found by Seamus Bradley) 54

20130523 Version 25a

General use luatexbase instead of luatextra (con-tributed by Eacutelie Roux) 43

Documentation add notes on typesetting the docu-mentation 28

include OpenType configuration files 201MTafteraftergroup fix get outer kerning and

spacing of nested letterspacing right 78MTgetslot adapt to luaotfload v22 (contrib-

uted by Eacutelie Roux) 93MTledunhboxline simplified 53MTledmacsetup support for eledmac 53MTlsouterk add marker for tightly nested letter-

spacing 85MTsettrcodes fix load font for fontspec 77MTxspace fix outer spacing problem with xspace

(reported by Dave) 83

20160501 Version 26

General load luaotfload with LuaTEX 43redefine MTsetupfonthook globally for problem

with tikzposter (reported by Sam Mason) 55

Documentation add hint about partial incompatibil-ity with xeCJK and luatexja 27

missing characters printed with Charis SIL 201

CHANGE HISTORY 239

suggest to use etoolbox to patch verbatim 26Font sets add TU encoding (notified by Will

Robertson) 143add si and scit to smallcaps set (reported by uli) 143new allmath-nott and alltext-nott (suggested

by Karl Berry) 143Inheritance add TU encoding 151Protrusion add TU encoding to lists 159Tracking add TU encoding to default list 152DeclareMicrotypeSet ignore spaces 105DeclareMicrotypeSetDefault ignore spaces 110DeclareMicrotypeVariants ignore spaces 111lsstyle fix ensure to set up math fonts (reported

by kleenstar) 79microtypecontext allow activate shortcut (repor-

ted by Karl Berry) 103MTdeclaresets fix undefine lists for redefining 106MTdofont speed up for LuaTEX 50MTengine fix test with LuaTEX 085 39MTgetslot fix could fail with XETEX (reported

by Christopher Schramm) 92

MTisxchar update for fontspecrsquos TU encoding 97MTledmacsetup support for reledmac 53MTluatexno update for LuaTEX 085 (renamed

primitives) 41MTnoligatures use luaotfload function to keep

inhibit ligatures 86MTorigpickupfont (in)compatibility with

luatexja disable unknown slots warnings (re-ported by Max) 100

(in)compatibility with xeCJK disable unknownslots warnings (reported by HcN) 100

compatibility with xeCJK pretend that CJK wasnrsquotloaded 100

MTsettrcodes use luaotfloadrsquos kernfactor fea-ture if available 76

MTxspace fix outer spacing problem with (notonly) algorithm (reported by Henning and Ron-nie Marksch) 83

UseMicrotypeSet ignore spaces 110

20160514 Version 26a

General fixes for letterspace package with LuaTEX 49MTdofont fix lua function (reported by Herbert

Voszlig) 50MTlsfontspecfont fix for value of plusmn1000 78

20170707 Version 27

General drop luatexbase with recent LATEX 43warning with minimal class 52

Documentation mention that additional kerning doesnot work in math mode (discovered by lsquoDanielrsquo) 18

Font aliases declare aliases for newpx 145declare aliases for newtx 145declare aliases for tempora 145declare aliases for XCharter 146declare Latin Modern Roman as alias of lmr with

new LATEX format (reported by Ulrike Fischer) 144Protrusion automatically choose correct names for

Charis SIL small caps (reported by lsquoltcomdatarsquo) 214lsstyle fix prevent infinite loop with psnfss and

exscale packages (reported by user11126 solu-tion by Ulrike Fischer) 79

MTcheckrange donrsquot warn for override if conflict-ing list is loaded 124

MTiscomposite compatibility with LATEX20170101 (DeclareUnicodeComposite) (re-ported by Ulrike Fischer and lsquojcrrsquo) 98

MTlsfontspecfont fix for lsquofilelangfontrangrsquo spec (re-ported by Reinhard Kotucha) 78

MTpermute donrsquot warn for override if con-flicting list is loaded 123

MTresetefcodes only reset efcodes for olderLuaTEX versions 70

MTsetupexpansion donrsquot disable automatic expan-sion for DVI output with LuaTEX 136

MTtikzsetup compatibility with tikz (again) 54MTwarntrackingDVI donrsquot warn for letterspacing

in DVI mode with LuaTEX 140

20180114 Version 27a

General disallow non-automatic expansion withLuaTEX 119

MTauto remove lsquoautoexpandrsquo for LuaTEX 106 (re-ported by Ulrike Fischer) 136

with LuaTEX non-automatic font expansion is nolonger possible (as confirmed by Hans Hagen) 136

MTgethighlevel test whether default isdefined 106

MTgetslot expand active characters earlier 91MTinfonotracking defer lsquoNo trackingrsquo message 61MTisactive compatibility with newunicodechar

(reported by Nils Anders Danielsson) 95

20190228 Version 27b

General update lua function microtypeinfo afterchanges in luaotfload (reported by Moritz Wem-heuer and Ulrike Fischer) 43

Documentation update hint about non-7-bit charac-ters (notified by Frank Mittelbach) 26

Inheritance add textquotedblleft ligature to OT4

(reported by Franz Wexler) 149MTinfomissingchar fix message for glyphs spe-

cified as names in XETEX (reported by Paolo Ney) 65MTsetupfont always select current font with XETEX

and LuaTEX (reported by Paolo Ney solution byUlrike Fischer) 57

CHANGE HISTORY 240

20191010 Version 27c

General turn warning into info when overwriting thekeepligature function (reported by Andy N) 86

MTisactive compatibility with LATEX 20191001 95

MTissymbol take care of removetlig 96showhyphens compatibility with LATEX 20191001

(reported by Phelype Oleinik and Falk Hanisch) 138

20191118 Version 27d

MTcopyfont in LuaTEX donrsquot use the copyfontprimitive but load the font anew (reported byPaolo Polesana and Oliver Kopp) 58

MTregistersubstfont remove substitute font

from list (reported by Markus Kohm) 102

MTregistersubstfontcx remove substitute fontfrom lists 103

20201207 Version 28

General letterspace works with e-TEX only 38compatibility with soul patch for font change

(reported by Md Ayquassar) 56fix for luatexbase 43

Documentation declare DVIoutput option deprec-ated 9

squash fake news about automatic font expansionwith dvilualatex 8

Font aliases declare aliases for step and domitian(notified by Daniel Benjamin Miller) 145

declare aliases for stix and stix2 fonts 145declare New Computer Modern as an alias of Latin

Modern Roman 145Font sets default set for expansion alltext-nott 144

default set for spacing alltext-nott 144

lsstyle fix enforce math setup again 79microtypecontext fix activate shortcut 103

ignore spaces 103MTdofont fix for XETEX 50

simplify lua function 50MTfixfontdimensix try to fix zero fontdimen6 59MTifluaotffont use lua function 49MTifstreq use XETEXrsquos stringcmp 47MTsetupexpansion warning when expanding in

DVI mode with LuaTEX (reported by Daniel Ben-jamin Miller) 135

MTtrsetspace simplified 81MTtrunit fix allow unit regardless whether

letterspacing is set 78textmicrotypecontext ignore spaces 104

20210222 Version 28a

General rename mt-padcfg to mt-EBGaramondcfg(requested by Karl Berry) 143

rename mt-PalatinoLinotypecfg tomt-Palatinocfg (requested by Karl Berry) 201

Documentation reorganise table 1 for clarification(suggested by Daniel Benjamin Miller) 7

Font aliases add -LF -TLF -OsF and -TOsF as vari-ants 144

declare mlmodern fonts as aliases of Latin Modern(reported by Daniel Benjamin Miller) 144

reference New Computer Modern also by file name(reported by Canageek) 145

Inheritance specify lsquoffrsquo ligature as Unicode instead ofglyph name 201

Protrusion hide euroitc settings (requested by KarlBerry) 194

Spacing add dummy settings (reported byDORpapst) 198

DeclareCharacterInheritance skip settings fortracking 120

MTgetsize compatibility with svjour3 (repor-ted by Ekkehart Schlicht (no relation)) 108

MTglet use LuaTEXrsquos glet if available 44

20210225 Version 28b

Inheritance dummy settings for the Font Awesomefont (mt-FontAwesomecfg) 205

settings for the Lato font (mt-Latocfg) (reportedby dsedivec) 205

20210314 Version 28c

ifMTfontspec add to hook for fontspec 54MTisoptchar fix for optionally defined glyphs

(reported by Frank Mittelbach) 96

MTremovetlig fix for text commands containingconditionals (reported by Frank Mittelbach) 97

INDEX 241

D IndexNumbers in upright shape refer to the page where the corresponding entry is described (bold face) resp occursNumbers in italics refer to the code line where the corresponding entry is defined (underlined) resp used

Options DVIoutput 9activate 6auto 7babel 9config 9draft 9expansion 6factor 7final 9kerning 6

letterspace 8protrusion 6selected 8shrink 8spacing 6step 8stretch 8tracking 6unit 7verbose 9

Commands DeclareCharacterInheritance 20DeclareMicrotypeAlias 21DeclareMicrotypeBabelHook 23DeclareMicrotypeSet 10DeclareMicrotypeSet 10DeclareMicrotypeSetDefault 12DeclareMicrotypeVariants 20DeclareMicrotypeVariants 20DisableLigatures 24LoadMicrotypeFile 22SetExpansion 14SetExtraKerning 18

SetExtraSpacing 19SetProtrusion 13SetTracking 15UseMicrotypeSet 12lslig 24lsstyle 23microtypecontext 22microtypesetup 9textls 24textls 23textmicrotypecontext 22

A a0poster (package) 108activate (option) 6 126 235addaccent 2961adjustspacing 196 4365ae (package) 21 144

algorithm (package) 239amsmath (package) 238amssymb (package) 187article (package) 22auto (option) 7 8 126

B babel (option) 9 23 27 32 126 235babel (package) 2 3 5 17 23 24 27

54 88 113 141 142 146 232 233 235ndash237

C chemsym (package) 232chmath (package) 21 146 236CJK (package) 27 56 100 236 237 239CJKutf8 (package) 100 237cm-super (package) 8color (package) 134combine (package) 142 235

config (option) 9 20 32 129 233contour (package) 134copyfonts (option) 58 126 127 236crop (package) 134csquotes (package) 29 54 158 233currfontshape 2905 2907 2909 2916 2959

D DeclareCharacterInheritance 20 41 3802DeclareMicrotypeAlias 21 43 71 3394DeclareMicrotypeBabelHook 23 45 64 3460DeclareMicrotypeSet 10 32 57 59 72 3093DeclareMicrotypeSet 10 3093DeclareMicrotypeSetDefault 12 34 61 3349DeclareMicrotypeVariants 20 42 58 63 3379DeclareMicrotypeVariants 20defersetup (option) 54 126 127 131 234

definenewfont 2898 2906 2910 2920DisableLigatures 24 40 62 3433dosubstcorrection 2958docstrip (package) 34domitian (package) 21 145 240draft (option) 9 126 128 235dsfont (package) 59DVIoutput (option) 9 126 127 238 240

E eco (package) 21 144efcode 1557 1583 1584 1625 1627eledmac (package) 53 238eplain (package) 24 31 34 38 52 134 236e-TEX (engine) 33 38 40 45

50 51 64 65 82 108 221 232ndash234 236 240etoolbox (package) 26 239eucal (package) 192eufrak (package) 194

euler (package) 98 190 235eulervm (package) 21 146 191 235euroitc (package) 194 240europs (package) 194eurosans (package) 194expandglyphsinfont 1539expansion (option) 6 11 125 126 135exscale (package) 239

INDEX 242

F ffamily 2912 2913fsize 1931 2905 2907 2909 2916 2959factor (option) 7 13 33 128 232fancyvrb (package) 26final (option) 9 33 126 128 231fix-cm (package) 59font 972 1048 1833 1981fontname 111 1020 1022 1024 1026

1027 1037 1038 1823 1831 1835 18391877 1883 1888 1891 1966 1981 19931995 2000 2002 2005 2008 2011 20462097 2234 2236 2898 2906 2915 29202940 2942 2944 2960 2974 2976 2996 3001

fontcharwd 1285 1289 1295fontdimen 1052 1053

1057 1058 1061 1320 1325 1425 14281852 1853 1883 1993 2039 2040 20472048 2055 2057 2063 2078 2097 2247 2250

fontinst (package) 198 221 223fontinstallationguide (package) 177fontname 1831 1835fontspec (package) 6 25 27 30

31 43 60 78 97 107 115 144 151 238ndash240fourier (package) 59french (package) 232frenchpro (package) 96 232 236

G garamondx (package) 21 146 238german (package) 35 231glbcurrsize 1969 3035

glbsettings 1970graphics (package) 134

H hfoldsty (package) 21 144 hyperref (package) 54 55 100 134 233 236

I IEEEtran (package) 100iffontchar

731 1331 2755 2765 2767 2834 2846 2847ifMTauto 304 4569 4630ifMTbabel 304 4716 4844ifMTdo 1087 1154 1791 2281ifMTdocument 345 3921ifMTdraft 304 4462ifMTexpansion 304 4518 4532 4627 4673ifMTfontspec 850 1067 3164 3584 3610ifMTif 303

869 876 899 931 2992 4028 4864 4867ifMTinannot 99ifMTinlist 624 669 777 807 992 1121

1138 1147 1165 1183 1789 2385 23962445 2494 2975 2986 2998 3063 3075 3416

ifMTkerning 304 4730 4857

ifMTnofamily 1193 1200ifMTnoligatures 304 4810ifMTnonselected 1519 2507 2515ifMTnorest 2576 2593 2606 2620 2681ifMToptauto 4039 4573 4605ifMToptDVI 4039 4487ifMToptexpansion 4039 4516 4674ifMTprotrusion 304 814 837 4499 4689ifMTselected 304 4613 4633ifMTspacing 304 4698 4715ifMTtracking 304 4685 4745ifMTxunicode 850 2781 2838ifpdf (package) 100 134iftracingmicrotypeinpdfall 105ignoreligaturesinfont 2285inputenc (package)

14 27 32 56 68 91 95 98 233 235 236

J jurabib (package) 100

K kerning (option) 6 11 31 126keyval (package) 42 63 147 236knaccode 1740 1741 1751 1754 1760

knbccode 1733 1734 1750 1753 1759knbscode 1655 1656 1679 1683 1689

L ledmac (package) 29 32 53 100 233ledpar (package) 29leftmarginkern 820letterspace (option) 8 17 24 32 45 75 128 235letterspace (package) 1 24 31 32

34 36 38 54 76 77 79 235ndash237 239 240letterspacefont 1839lineno (package) 53listings (package) 26 55 56 68 88 234 235 238lmodern (package) 8 160LoadMicrotypeFile 22 44 74 3412 4467lpcode 1222 1258 1259 1463 1466 1866

lslig 24 54 1986 1989lsstyle 23 51 922 946

1967 2173 2179 2184 2187 2197 2201 4470luaotfload (package)

27 30 43 50 70 76 86 93 238 239LuaTEX (engine) 1 4 6ndash9 12ndash16 20

23ndash25 27 29ndash31 34 37ndash41 43ndash45 50 5357 58 70 75ndash77 83 85 86 92 117 127133 135 136 140 144 147 151 159 236ndash240

luatexbase (package) 43 238ndash240luatexja (package) 27 100 238 239luatextra (package) 238

M marvosym (package) 21 32 34 151 194 234 235mathastext (package) 54 238mathdesign (package) 21 146 234memoir (package) 23 100MicrotypeHook 130 4296microtypecontext

22 47 920 3024 3043 4469 4827 4830microtypecontext (environment) 22microtypesetup 9 46 4300 4468MiKTEX (distribution) 28miniltx (package) 24 31 34 38 52 236minimal (package) 52 56 239

MinionPro (package) 107mlmodern (package) 21 144 240MTfont 406 995 1018 1057 1059 1321

1335 1803ndash1805 1807 1810 2448 2520 2945MTabbrex 753MTabbrexc 753MTabbrexinh 753MTabbrkn 753MTabbrknc 753MTabbrkninh 753MTabbrnl 753MTabbrpr 753

INDEX 243

MTabbrprc 753MTabbrprinh 753MTabbrsp 753MTabbrspc 753MTabbrspinh 753MTabbrtr 753MTabbrtrc 753MTactivefeatures

1029 2980 2983 2995 3008 3052 30623441 4500 4628 4686 4699 4731 4819 4820

MTaddtoannot 99MTaddtosetup 798

799 880 1438 2889 3025 3026 36713689 4153 4301 4461 4776 4818 4843 4876

MTadjustspacing 4361 4362 4629MTafteraftergroup 1895 1903 1912MTauto 1529 4568 4583 4593 4596 4600MTauto 1529 1552 1597MTautofalse 306 4581 4592MTautotrue 306 4255 4258 4608MTbabelfalse 313MTbabeltrue 313MTbegincatcodes

2386 2387 2427 3024 3028 30413094 3319 3350 3381 3395 3420 34363470 3486 3508 3529 3543 3808 4271 4272

MTcat 1434 2880 2882MTcfgcatcodes 933 1456 2412 2429MTchar 1247 1248 1258 1259

1264 1265 1268 1270 1285 1286 12891463ndash1467 1583 1584 1586 1587 1625ndash1627 1655 1656 1662 1663 1669 16701673 1674 1679ndash1684 1733 1734 17401741 1744 1745 1750ndash1754 2293 22942296 2549 2565 2573 2575 2585 25872595 2596 2601 2605 2606 2611 26132619 2621 2624 2628 2632 2636 27522755 2757 2759 2761 2825 2829 28342836 2839 2841 2847 3860ndash3862 3867ndash3869

MTchar 1291 1292 1295 13301331 2549 2556 2560 2565 2614 26852687 2693 2694 2696 2709 2710 27132714 2717 2718 2722 2724 2758 27602788 2791 2795 2801 2808 2810 2837 2854

MTcharstring 2562 2757 2773 2800MTcharxstring 2803 2841MTcheckactiveset

4282 4506 4646 4688 4708 4735MTcheckfont 991 2971 3054MTcheckfontcx 2981 3054MTcheckrange 3999 4001MTcheckrange 4001 4002MTcheckrlist 3948 3992MTcheckrlist 3992 3993MTcheckstep 4634MTchecklist 1095 1114 2278MTchecklistfamily 1132MTchecklistfont 1176MTchecklistsize 1160MTchecksetup 4312 4323 4330 4349 4385MTclearoptions 163 296 788 4244 4454MTclistbreak 596 1127 1155 1171 1185MTclistfunction 596MTcntencoding 3887 3895 3896MTcntfamily 3893 3902 3903

MTcntseries 3900 3909 3910MTcntshape 3907 3915 3916MTconfigfile 4260 4269 4270 4274 4275 4278MTcontext 2470 2482 2501 2528MTcopyfont 978

1014 3667 3673 3685 3692 4162 4164 4490MTcopyfont 1014 3667 3673 3685 3692 4162MTcount 512 513

737 1277 1285 1287 1289 1293 12951298 1304 1309 1310 1314 1325 1357 1419

MTcurrfile 2390 2391 2400 24013422 3423 3641 3643 3646 3832 4274 4878

MTcurrlistname 1323 1360 1450 15932290 2371 2539 2849 2857 2862 2870 2876

MTcurrls 1874 1990 1993MTcurrsetname 3118 3120ndash

3122 3124 3127 3128 3133 3138 31423143 3152 3177 3181 3210 3238 32613267 3271 3272 3523 3599 3620 36353654 3726 3730 3737 3740 3742 37483751 3754 3766 3780 3789 3797 3833 3835

MTdeclarecharinh 3814 3822 3830MTdeclaresets 3101 3106 3119 3443MTDeclareMicrotypeAlias 3396 3398MTDeclareMicrotypeSetDefault 3351 3353MTDeclareSet 3097 3099 3115MTDeclareSetAndUseIt 3096 3114MTDeclareVariants 3383 3384 3386MTdefboolopt 4116

4129 4130 4134 4148 4160 4170 4182MTdefn 393 3089 3090MTdefaultexset 3368MTdefaultknset 3368MTdefaultprset 3368MTdefaultspset 3368MTdefaulttrset 3368MTdefinecodekey

3567 3627 3629 3630 3842 3844 3845MTdefinecodekeyfamily 3578 3628 3843MTdefinecodekeyfont 3604 3632 3847MTdefinecodekeysize 3592 3631 3846MTdefineoptkey 3633 3656ndash3659 3793ndash3795MTdefineoptionX 4300 4358 4361MTdefineoptionX 4375 4404 4406 4407MTdefinesetkey 3131 3311ndash3314MTdefinesetkeyfont 3259 3316MTdefinesetkeysize 3170 3315MTdetokenizec 436 2557 2753 2769MTdetokenizen 436 2831MTdimensix

1050 1278 1314 1357 2072 2074 2243MTdinfo 87MTdinfolist

1112 1122 1125 1130 1139 1142 11481150 1158 1166 1169 1174 1184 1187 1191

MTdinfonl 87MTDisableLigatures 3433MTdofont 704 1224 1557 1692 1761 1866MTdocumentfalse 345MTdocumenttrue 345 4822MTdofalse 1087 1099 1126 1143 1170 1188MTdofontfunction 708 719MTdotrue 1087 1090 1123 1140 1149 1167 2273MTdraftfalse 309 4184MTdrafttrue 309 4186

INDEX 244

MTedefn 395 2506 2532 30793573 3587 3643 3646 3649 3831 3979 4216

MTencoding 1064 1180 1201 1203 1206 24652477 2557 2753 2769 2830 2861 2868 2876

MTendcatcodes 2388 2431 3025 30323042 3112 3335 3366 3392 3410 34283445 3481 3505 3524 3540 3554 3825 4273

MTendinput 167 4239 4248MTengine 175

277 281 287 293 2174 2178 4240 4246MTenginetooold 175 278MTerror 76 780 883

2174 2185 2363 2376 3208 3344 33733451 3676 3702 3709 4172 4335 43534393 4574 4586 4606 4675 4746 4759 4839

MTerrordoesntwork 4742MTexcname 1511

1513 1599 1600 1611 1617 1618 1630 3489MTexcontext 1018 3046 3088MTexdoccontexts 3088MTexfactor 314 1530 1603MTexfactor 1530 1559 1564 1573 1574 1597MTexinhname 1585ndash1587MTexlevel 314 4629 4631MTexmax 326 1576 1577MTexmin 326 1579 1580MTexsetname 3337MTexsplitval 1571MTexpcs 390 393 396 399 404 1030

1032 1041 1164 1269 1344 1347 13771381 1391 1394 1397 1587 1674 17451915ndash1917 2493 2999 3009 3010 30143065 3076 3176 3598 3618 3869 3950 3997

MTexpgcs 390 394 398 400 405MTexponen 407 441 603 982

984 1042 1118 1181 1788 2395 29712974 2984 2996 3002 3020 3062 30733088 3106 3310 3329 3360 3415 3822 4827

MTexptwoc 409 427 432 442 638 981 10221024 1026 1027 1036 1834 1966 20022005 2008 2554 2561 2756 2824 2839 2840

MTexptwon 411 1136 1145 3137 3266MTexpandfont 1515 1533 1537MTexpansion 998 1502 4666MTexpansionfalse 305 4524 4529 4623MTexpansiontrue 305 4254MTextracontext 3088 3473 3489 3512

3532 3546 3613 3616 3617 3619 36603668 3674 3686 3691 3804 3947 39513954 3957 3958 3963 3968 3969 3971 3998

MTextrainputenc 3802 3829 3834 3835MTfactordefault 338 4223 4503MTfamily 982 1064

1137 1180 1201 1203 1206 2466 3406 3407MTfamilyalias

983 984 1076 1144 1146 2476 2478 3408MTfeat 1087 1250 1339 1341 1343

1344 1346 1347 1353 1355 1358 1366ndash1370 1372 1374ndash1378 1381 1382 13871391 1394 1397 1400ndash1402 1411 14121417 1435 1809 1971 2361 2363 23662367 2371 2373 2376 2502 2504 25062510 2514 2518 2519 2522 2530 25322533 2535 2542 2546 2850 2851 2880 2882

MTfeatures 773 3088 3101 3310 3324 3355 3638 3813

MTfeatureslong 773 776 781 3059 3827MTfilelist 2382

2384 2392 2395 2397 2402 2405 3415 3419MTfindfile 982 984 2382MTfixcatcode 5MTfixfontset 3160 4474MTfixfontdimensix 1050 1075MTfont 406 731 733

975 981 1036 1043 1052ndash1055 10581061 1222 1223 1258 1259 1264 12651285 1286 1289 1292 1295 1320 13251331 1425 1428 1463 1464 1466 14671542 1546 1552 1557 1583 1584 16251627 1655 1656 1662 1663 1669 16701679ndash1681 1683 1684 1689ndash1691 17331734 1740 1741 1750 1751 1753 17541759 1760 1788 1792 1872 1873 22822572 2627 2884 2940ndash2942 2944 29592960 2971 2972 2977 2984 3002 3012 3021

MTfontcopy 1018 1026 1028 1036ndash1038 1048MTfontlist

2884 2971 2972 2974 2976 2977 3053MTfontorig 1020MTfontsets 3141 3160 3270 4474MTfontspecfalse 850MTfontspectrue 850 851 855 893MTgdefn 393 3464 3480 3504 3539

3553 3742 3766 3780 3837 3880ndash3885 4290MTgetaxis 3284ndash3287 3297MTgetbasefamily 2394 2432MTgetbasefamily 2438 2441MTgetcharunit 1249 1389 1415 1507MTgetcharwd 1283 1314 1392 1415MTgetconfig 4260MTgetexopt 1506 1524 1597MTgetexopt 1605ndash1607 1609 1616MTgetfont 3265 3275MTgetfont 3276 3281 3625MTgetfontandsize 3609 3624MTgetfontdimen 1318 1395MTgethighlevel 3136 3146 3299 3572 3583MTgetinhlist 1211 1509 1642 1720 2528MTgetlistname 2447 2504 2530MTgetlistname 2447MTgetlsbasefont 1827 1992 1999MTgetopt 1209 1364 1640 1718MTgetrange 3174 3184 3596MTgetsize 3191 3196 3205 3224 3295MTgetsize 3231 3242MTgetsize 3242MTgetslot 1246 2292 2549 3859 3866MTgetslot 2566 2570MTgetspaceunit

1389 1491 1653 1660 1667 1731 1738MTgettropt 1814 1934MTgettropt 1954ndash1957 1959MTgetunit 1397 1405 1943MTgetunit 1405MTgetkey 4441 4456MTglet 387 400 894 1022 1916 2002 2033

2179 2187 2938 3035 3054ndash3057 34083667 3685 3890 4162 4164 4790 4796 4882

INDEX 245

MTgletnc 399 1059 1206 1810 2046 2234 2542

2960 3053 3124 3127 3133 3261 34973726 3730 3737 3740 3748 3751 3754 3789

MTgletnn 404 3072 4287MTiffalse 303

865 872 895 912 2989 3996 4858 4865MTiflistexists

1199 1505 1523 1639 1717 1813 2501MTifluaotffont

687 707 1829 1864 1873 2295 2308MTifouternext

2113 2128 2132 2135 2140 2145ndash2148MTiftrue 303

866ndash868 873ndash875 896ndash898 925 929 9302982 4005 4009 4017 4022 4859ndash4863 4866

MTifdefinedcT 415 869 9011267 1303 1585 1672 1743 1858 19482740 3162 3406 3834 3937 4296 4299 4885

MTifdefinedcTF 415 815 1817 1842 1845 18561990 2069 2240 2287 2288 2505 2531 3946

MTifdefinednT 415 804 1115 1133 1161 1177 12681400 1436 1586 1611 1673 1744 19381946 1960 2484 2879 3121 3401 34923650 3896 3903 3910 3916 3947 3957 4441

MTifdefinednTF 415 10761093 1116 1134 1162 1178 1201 13661374 1599 1617 1804 1914 2276 23662472 2557 3149 3338 3341 3369 36413923 3978 3987 4057 4283 4286 4647 4825

MTifdim 535 658 659 663 664 3207 32164003ndash4005 4007 4008 4015ndash4017 4020 4021

MTifdimen 497 3233 3729 3739 3753 4232MTifempty 448 1222 1223 1256 1262

1480 1481 1652 1659 1666 1689ndash16911703ndash1705 1707ndash1709 1730 1737 17591760 1776 1777 2052 2053 2061 20772209 2232 2233 2245 3064 3100 31043148 3158 3185 3186 3199 3200 32893300 3323 3327 3354 3358 3440 35193634 3640 3660 3666 3674 3684 36913764 3812 3819 4070 4101 4263 4309 4382

MTifint 461 2716 3520 3765 4215 4225MTifstreq 544 1105 1442 1609 2362 2503

2518 2789 2792 2800 2809 3019 32643608 3728 3750 3752 3814 3821 39383958 4029 4073 4075 4078 4081 41034105 4119 4120 4192 4193 4198 42024231 4311 4318 4322 4329 4384 4390 4718

MTinclist 624776 805 1118 1136 1145 1181 17882384 2395 2971 2974 2984 2996 3062 3415

MTinrlist 652 1164 2493MTinrlist 652MTinrlist 652MTintlist 640 2444 3073MTintlist 640MTinannotfalse 100MTinannottrue 100MTincrement 737 3895 3902 3909 3915MTinfo 76 91 96 1057 4199 4425 4429MTinfomissingchar 1298 1328 2623

MTinfonl 76 92 93 97 816 12021329 4190 4200 4270 4284 4288 44864490 4502 4509 4630 4667 4687 46924701 4711 4734 4738 4751 4766 4835 4846

MTinfonotracking 996 1106 1110MTinfonotracking 1106 1110MTinhdo 2541 3848MTinhfeat 3802 3812 3817 3828MTinhsplit 3850 3854MTinlistfalse 624 628 641 653 2992MTinlisttrue 624 630 648 660 665 2992MTisactive 2554 2729MTischar 2561 2756 2773MTischarx 2782 2803 2840MTiscomposite 2559 2827MTisfeature 775 3105 3328 3359MTisletter 2555 2673 2761 2836MTisnumber 2699 2704 2824MTisoptchar 2755 2765MTissymbol 2558 2751MTistlig 2759 2817MTisunicomp 2834 2846MTisxchar 2793 2799MTiterate 674MTkerning 1002 1714 4737MTkerningfalse 311MTkerningtrue 311MTkncname 1722 1724 1767 3546MTkncontext 3047 3088MTkndoccontexts 3088MTknfactor 314MTknfactor 1366MTkninhname 1743ndash1745MTknmax 326MTknmin 326MTknsetname 3337MTknsplitval 1728MTknunit 320MTknunit 1374 1770MTledunhboxline 816MTledmacsetup 810 889ndash891MTletcn 401 404 405 1077 1215

1513 1600 1646 1724 1939 1947 23612373 2498 2502 2535 2940 3228 3654 3833

MTletnc 399 1402 2154 2514 2546 29873980 3985 4079 4082 4325 4332 4749 4764

MTletnn 404 1367 1372 1375 1387 1618 1621 1961

MTletterspace 341 1817 1947 1949 1951 4799 4800 4802

MTletterspace 1233 13031304 1817 1818 1821 1824 1832 18391844 1852 1865ndash1867 1874 1883 1927ndash1930 2074 2077 2195 2210ndash2213 2246 2249

MTletterspacedefault 341 4800MTlistname 2447

2495 2498 2505 2506 2508 2510 25312532 2534 2535 2539 2542 3869 3874

MTlistnamecount 3637 3642 3644MTloadinputenc 1443 1446 1455MTloadlist 1213 1511 1644 1722 2358MTloop 674 682 730 3251 3984MTlower 3178 3184 3599MTlsadjust 1881 2206MTlsadjust 2190 2214

INDEX 246

MTlsadjustempty 2192 2206MTlsadjustrelax 2193 2206MTlsbasefont 1999 2008 2011 2012MTlsfontspeccolon 1923MTlsfontspecfont 1834 1923MTlsouterk 1884

1889 1897 2090 2104 2151 2169 2254MTlssetls 2197 2200 2206MTlstoolarge 2213 2216 4802MTlsfont 1823

1833 1839 1852 1853 1862 1866 18671872 1966 1977 2022 2024 2039 20402047 2048 2055 2057 2063 2078 2247 2250

MTltxpickupfont 918 959 964 2955 2963MTlua 192 255 356

364 485 522 568 688 709 2296 2309 2577MTluacopyfont 1047MTluacopyfont 1027 1047MTluatexno 253 354MTmapclist 596MTmapclistc 596

1029 2291 2983 2995 3008 3052 30593101 3324 3355 3638 3813 3817 3827 4439

MTmapclistn 596 1092 2275 3088 3103 3123 3134

3172 3262 3310 3326 3357 3387 34623570 3581 3594 3606 3746 3762 38634065 4068 4097 4099 4128 4210 4307 4380

MTmaptlist 614MTmaptlistc 614 643 654 1032 1269

1587 1674 1745 2451 3014 3948 3997 4474MTmaptlistn 614 2423 2775 3889MTmaxchar 2673 2696MTmaxslot 2673 2722MTmaybedo 1087 1196 1503 1637 1715 1790MTmaybegobblewithtikz 856 1913 1970MTmayberemfromlist 3014 3018MTmicrotypecontext 3024MTminus 1832 1927ndash1930MTMT 2 76 79 82 84

86 91 92 94 95 292 787 884 886 36764242 4264 4425 4429 4487 4722 4839 4840

MTMTpickupfont 961 966 2955 2965MTnextlistname 2454 2463MTnextlistname 2473 2485 2491MTnlligatures 2282 3433MTnlsetname 2274 3433MTnofamilyfalse 1193 1198MTnofamilytrue 1193 2464MTnoligatures 1006 2270 4811MTnoligatures 2022 2024 2282 2285MTnoligaturesfalse 308MTnoligaturestrue 308 3442MTnonselectedfalse 1519 1534MTnonselectedtrue 1519 1522MTnorestfalse

2682 2689 2698 2719 2789 2801 2809MTnoresttrue 2552 2682 2707MToldcmd 66 71ndash74MToptautofalse 4040MToptautotrue 4040 4130MToptdefset 4056 4084 4109MToptDVIfalse 4041MToptDVItrue 4041 4137 4140MToptexpansionfalse 4039

MToptexpansiontrue 4039MToptions 3557MToptwarnadmissible 4042 4121 4202MToptwarnnan 4046 4217 4227MTorigaddaccent 2961MTorigforeignlanguage 4852 4854MTorigpickupfont 2890 2957MTorigpymacron 956 960 965MTorigselectlanguage 4847 4849MTouterkern 1883 1887 1889 1890 1894 1902

1993 1994 1996 2151 2152 2169 2227 2266MTouterspace 1877

1878 2037 2086 2088 2089 2102 21032120 2121 2136 2137 2141 2142 2167

MTpdfannot 99MTpdforlua 180 188 290 464 687 4783MTpdftexno 212 353MTpermute 3479 3503 3517 3538 3552 3840 3879MTpermute 3879MTpermute 3879MTpermute 3879MTpermute 3879MTpermute 3914 3919MTpermute 3927 3929MTpermutedefine 3920 3930ndash3932 3976MTpermutereset 3889 3982MTpermutelist 3473 3489

3515 3532 3546 3613 3614 3619 38383942 3943 3947 3951 3954 3957ndash39593961ndash3963 3971 3972 3998 4030 4032 4033

MTpickupfont 2955MTplain 125 146MTprcname 1213 1215 1471 3473MTprcontext 1018 3046 3088MTprdoccontexts 3088MTprfactor 314 4226 4503 4504MTprfactor 1366MTprinhname 1267 1268 1270MTprlevel 314 4501 4502MTprmax 326MTprmin 326MTprsetname 3337MTprsplitval 1254MTprunit 320 4233 4505MTprunit 1374 1474MTpresetaux 1476

1478 1480 1481 1484 1772 1774 1776 1777MTpresetauxfactor 1476 1484 1703ndash1705 1772MTpresetauxspace 1478 1484 1707ndash1709 1774MTpresetex 1612 1629MTpresetkn 1765MTpresetkn 1765MTpresetpr 1469MTpresetpr 1469MTpresetsp 1696MTpresetsp 1696MTProcessOptionsWithKV 4433 4457MTprotrudechars 4358 4362 4501 4689MTprotrusion 997 1195 4508MTprotrusionfalse 304MTprotrusiontrue 304 4249MTrbbaexpansion 768MTrbbakerning 768MTrbbaprotrusion 768MTrbbaspacing 768

INDEX 247

MTrbbatracking 768MTregisterfont 1010 2972 3055MTregisterfontcx 3007 3055MTregistersubstfont 2946 2973 3056MTregistersubstfontcx 2994 3056MTremfromclist 635 1042 2977 3002 3020 3562MTremfromlist 1032 1040MTremlastspace 436MTremovetlig 2820 2823MTrepeat 674 684 733 3254 3990MTrequireslatex 145 164 796

914 1965 2888 4048 4209 4434 4438 4881MTrequiresluatex 348 387 988 1055 1231

1538 1539 1561 1608 1784 2285 37793785 4133 4363 4377 4519 4596 4604 4683

MTrequirespdftex 348463 498 545 811 977 987 1001 10051016 1230 1275 1301 1560 1636 17141783 2019 2271 3434 3664 3778 37834159 4253 4376 4540 4571 4599 4682 4809

MTresa 558 560 626 633 636 638 642 647MTresb 559 560 636ndash638 646 647MTresetcontext 3034 3038 3044 3071MTresetcontext 3044 3071MTresetefcodes 1508 1532 1560 1613MTresetefcodes 1555 1565 1569MTresetkncodes 1719 1726 1756MTresetkncodes 1756MTresetprcodes 1210 1217 1226MTresetprcodes 1226MTresetspcodes 1641 1648 1686MTresetspcodes 1686MTrestorecatcodes 5 7 8 159 165 4887MTrestoreph 847 876 931MTsavedsetupfont 4422 4430MTscale 744 1278 1340 1354 1357 1574MTscalefactor 1280 1311 1338 1486 1631MTscaletoem 1257 1263 1275 1308 1492

1654 1661 1668 1732 1739 1950 2070 2241MTscrubfeature 1068 1080 3585MTscrubfeatures 1080 3165 3611MTselectedfalse 307MTselectedtrue 307MTseries 1064 1180 2467 2479MTsetallex 1555 1632MTsetallkn 1756 1778MTsetallpr 1219 1226 1482MTsetallsp 1686 1711MTsetbabelcontext 4824 4850 4855 4869MTsetcodes 1216 1237 1514 1647 1725 2374MTsetcurrls 1874MTsetcurrok 1894 1896 1902 1905 2125 2129MTsetcurros 1876 1904 2125 2129MTsetdefaultset 3355 3360 3368MTsetexcodes 1536 4614 4616MTsetexcodesn 1519 1536 4616MTsetexcodess 1504 4614MTsetexheirs 1587 1624MTsetinhlist 3809 3811MTsetinputenc 1212 1433 1510 1643 1721 2540MTsetinputenc 1436 1438MTsetkncodes 1716MTsetknheirs 1745 1749MTsetlistname 1214

1365 1512 1598 1645 1723 1936 2849

MTsetlsbasefont 2008MTsetlsfont 1871 1964 1977MTsetnamedkeys 3475 3491 3513 3534 3548 3557MTsetprcodes 1197MTsetprheirs 1271 1461MTsetspcodes 1638MTsetspheirs 1674 1678MTsettrcodes 1800 1972 1982MTsettrzero 1819 2008 4404MTSetExpansion 3487 3489MTSetExtraKerning 3544 3546MTSetExtraSpacing 3530 3532MTSetProtrusion 3471 3473MTSetTracking 3509 3511MTsetup 794 798 4151 4152 4882MTsetupcontexts 3033 3051MTsetupcopies 4473 4489MTsetupexpansion 4476 4513MTsetupkerning 4480 4729 4772MTsetupnoligatures 4481 4807MTsetupPDF 4472 4484 4494MTsetupprotrusion 4475 4497MTsetupspacing 4479 4696 4773MTsetupspacingcheck 4714 4885 4886MTsetuptracking 4477 4681 4744 4771MTsetupwarntracking 4478 4776MTsetupfont 973 2949 4423 4426 4430 4466MTsetupfonthook 864 894 900 905 931 938 976MTshape 1064 1180 2468 2480MTshorthandoff 4833 4864 4867MTshowpdfannot 106MTshrink 323 1527

4536 4537 4544 4545 4548 4552 4619 4632MTshrink 1527 1542 1546 1552 1597MTshrinkdefault 339MTsize 659 663 664 1056 1064 1180MTsizename 652 2495MTSOULdoword 949 950MTspcname 1644 1646 1698 3532MTspcontext 3047 3088 4718MTspdoccontexts 3088MTspfactor 314MTspfactor 1366MTspinhname 1672ndash1674MTspmax 326MTspmin 326MTspsetname 3337MTspsplitval 1650MTspunit 320MTspunit 1374 1701MTspacing 1002 1635 4710MTspacingfalse 310MTspacingtrue 310MTsplitcodes 1239 1243MTsplitname 981 1064MTstep 323 1528 4539

4541 4559 4563 4566 4633 4636 4637 4641MTstep 1528 1542 1546 1552 1597MTstretch 323 1526 4533

4534 4537 4544 4546 4551 4554 4618 4632MTstretch 1526 1542 1546 1552 1597MTstretchdefault 339 4534MTstripprefix 2782 2803 2839MTtemp 1221ndash1224 1688ndash1692 1758ndash1761

2042 2046 2049 2057 2060 2117 2120

INDEX 248

2126 2130 2133 2136 2141 2149 21512157 2231 2234 2251 3283 3308 44374442 4447 4448 4450 4453 4648 4652 4656

MTtempencoding 3922 3923 3933 3939MTtempfamily 3934MTtempseries 3935MTtempshape 3936MTtempsize 3890 3937 3946 3948 3952MTtestast 2068 2239 3147 3156MTtextmicrotypecontext 3041MTtextls 49 2192 2193 2195MTtextmicrotypecontext 3041MTtheprcode 1228 1258 1264 1868MTtheprcodetr 1228 1868MTtikzsetup 856 877 954MTtlistbreak 614 649 671 2456 4036MTtoks 302

1329 1360 1593 2553 2588 2615 26872694 2744 2795 2810 2819 2854 2866 2874

MTtrcname 19381939 1946 1947 1960 1961 3514 3521

MTtrcontext 3047 3088MTtrdoccontexts 3088MTtrfactor 1937MTtrfontlist 1786MTtrispace 1842 1843 1954MTtrligatures 1858 1957 2021 2024MTtrmax 326 2217ndash2219MTtrmin 326 2221ndash2223MTtrnoligatures 1858 2018MTtrokern 1856 1956MTtrospace 1845 1846 1954MTtroutericr 2130 2159MTtroutericr 2159MTtrouterl 1879 2082MTtrouternext 2110 2114 2161MTtrouterr 1906 2110 2126 2133 2159MTtrouterr 2111 2116MTtrsetokern 1857 2227MTtrsetokern 2232 2233 2238MTtrsetspace 1848 2038MTtrsetspace 2043ndash2045 2051MTtrsetspace 2054 2059 2062 2067MTtrsetname 3337MTtrunit 1938 2069 2240MTtracking 989 1786 1972 2951 4404 4405 4691MTtracking 1786 4405MTtrackingfalse 312 4748MTtrackingtrue 312MTtryorder 2451 2459MTundefinedchar 2734 2739 2750MTupper 3178 3184 3599MTuseset 3324 3329 3337MTUseMicrotypeSet 3320 3322MTval 3064ndash3066 3068 3074 3076

3079 3135 3139 3147 3150 3153 3173ndash3175 3187 3190 3192 3195 3197 3198

3204 3206 3207 3209 3212 3214 32253228 3233ndash3235 3237 3239 3244 3263ndash3265 3268 3277ndash3279 3291 3293 32983300 3302 3304 3571 3573 3582 35853587 3595ndash3597 3607ndash3609 3615 36203862 3869 3873 3874 4057 4058 40614069 4070 4073 4075 4078 4081 41004101 4103 4105 4308 4309 4311 43184322 4329 4335 4381 4382 4384 4390 4393

MTvariants 2444 3379 3390MTvinfo 76 93 995 1107 1111 1369

1378 1382 1417 1601 1619 1803 18212299 2310 2367 2391 2401 2404 25082510 2516 3045 3068 3417 3423 41904197 4314 4320 4326 4333 4387 4392 4826

MTwarnascii 2696 2853MTwarnaxisempty 3290 3301 3306MTwarncodetoolarge 1344 1347 1351MTwarnerr 76 4194 4195MTwarnextoolarge 1577 1580 1591MTwarnmaybeinputenc 2289 2867 2875 2878MTwarnnodim 3718 3731 3741 3755MTwarnnumbertoolarge 2723 2859MTwarnpresettowidth 1475 1495 1702 1771MTwarnrest 2594 2631 2864MTwarntrackingDVI 1822 4778MTwarnunknown 2584 2600 2610 2635 2872MTwarnunknownonce 2890 2891MTwarning 67 76 94 2218 2222 2302 2519

3122 3151 3237 3307 3402 3425 35223651 3720 3768 3781 3786 3940 39614032 4194 4199 4296 4373 4412 4414 4415

MTwarningnl 76 88 95 158 279 786 790 826838 907 1321 1358 1410 1450 14961592 1806 2030 2854 2860 2865 28732922 3494 3693 4043 4050 4061 41434195 4200 4234 4241 4277 4291 44634520 4564 4620 4639 4703 4719 4784 4871

MTwhilenum 680 704 710 934ndash936MTwithbabelandT

803 866ndash868 896ndash898 4859ndash4863 4866MTwithpackageT 800 851 853

870 873ndash875 877 882 889ndash893 903 915929 930 932 954 955 2890 2891 2933 4702

MTxadd 104 580 2392 2397 24022405 2999 3010 3076 3176 3419 3598 3869

MTxaddb 588 3618 3950MTxdefn 395 3339 3342 3371 3376 3405

3521 3613 3635 3797 3835 3971 4058 4060MTxetexno 244MTxspace 2149 2164MTxspace 2164MTxunicodefalse 852MTxunicodetrue 852 853 892

N newcomputermodern (package) 145newpx (package) 21 59 145 239newtx (package) 21 59 145 239

newunicodechar (package) 95 239normalfont 972 4659 4663nullfont 972

O outputmode 194 4133

INDEX 249

P pdfadjustinterwordglue 4406 4700pdfadjustspacing 196 950 4365 4369 4661pdfappendkern 4408 4733pdfcopyfont 1026pdfcprot (package) 26 30 54 64 99 231pdffeedback 1055pdffontexpand 1539 1542 1546 1552pdffontsize 1054 1055pdfnoligatures 2285 2301 2307pdfprependkern 4407 4732pdfprotrudechars 195 4364 4368 4795pdfTEX (engine) 1 4 6ndash9 13ndash19 23ndash35 37ndash39

41ndash43 45 46 53 57ndash59 64 70 72 73

75 76 79 80 83 85 112 115 117 119129 133 134 136 137 140 197 199 231ndash237

pdftexcmds (package) 37 237pdftracingfonts 358pickupfont 2921 2923 2932 2955ndash2957pifont (package) 100pinyin (package) 56 236 237protrudechars 195 4364protrusion (option) 6 11 125 126psnfss (package) 79 198 239pstricks (package) 134pxfonts (package) 21 145

Q qfonts (package) 21 145 233

R ragged2e (package) 26 81 139 237 238reledmac (package) 53 239relsize (package) 108

removetlig 2818rightmarginkern 822rpcode 1223 1264 1265 1464 1467 1867

S selected (option) 8 14 33 69 90 126 232selectfont 1973 3037 3049 4301 4877setfontsize 3244SetExpansion 14 36 3484SetExtraKerning 18 38 3542SetExtraSpacing 19 39 3527SetProtrusion 13 35 3468SetTracking 15 37 3507sfcode 4717shapepar (package) 29 53shbscode 1669 1670 1681 1684 1691showhyphens 4647shrink (option) 8 15 33 128 136 138 234 236

slantsc (package) 177soul (package) 4 30 56 82 235 237 240soulutf8 (package) 30 237spacefactor 2093spaceskip 2094 2097spacing (option) 6 11 26 31 126 237 238stbscode 1662 1663 1680 1684 1690step (option) 8 31 33 128 136 138 232 234 236step (package) 21 145 240stix (package) 21 145 240stix2 (package) 21 145 240stretch (option) 8 15 25 33 128 135 136 138 236svjour3 (package) 108 240

T tagcode 1862 2288 2294tempora (package) 21 145 239tex4ht (package) 54 235TEX Live (distribution) 28 39 146 233textls 23 52 53 923 947 1882 1968 1985 2190textls 24textmicrotypecontext 22 48 919 3041tikz (package) 54 227 237 239tikzposter (package) 238

tipa (package) 100trace (package) 101 235tracingmicrotype 87tracingmicrotypeinpdf 98tracingmicrotypeinpdfallfalse 105tracingmicrotypeinpdfalltrue 105tracking (option) 6 11 23 31 126txfonts (package) 21 145

U ucs (package) 95 236ulgothic (package) 21UnicodeEncodingName 2832unit (option) 7 32 233 235

UseMicrotypeSet 12 33 60 73 3116 3318UTFfouroctetsnoexpand 2737UTFthreeoctetsnoexpand 2736UTFtwooctetsnoexpand 2735

V verbose (option) 9 31 32 128 232 233 236

W wordcount (package) 52 236

X XCharter (package) 21 146 239xeCJK (package) 27 100 238 239

XETEX (engine) 1 4 6 7 9 1213 20 29 31 34 38 40 50 53 57 59 8393 133 138 140 144 147 151 159 238ndash240

XeTeXcharglyph 2621XeTeXfonttype 2572XeTeXglyph 1292XeTeXglyphindex 2608

XeTeXglyphname 2627XeTeXlastfontchar 733XeTeXprotrudechars 4372xspace 2148 2149xspace (package) 83 238xspaceskip 2096 2099xunicode (package) 97 98 238xunicode-addon (package) 100

Y yfonts (package) 24

Z zefonts (package) 21 144

THE LATEX PROJECT PUBLIC LICENSE 250

E The LATEX Project Public LicenseLPPL Version 13c 2008-05-04

Copyright 1999 2002ndash2008 LATEX3 Project

Everyone is allowed to distribute verbatimcopies of this license document but modificationof it is not allowed

PreambleThe LATEX Project Public License (LPPL) is the primarylicense under which the LATEX kernel and the base LATEXpackages are distributed

You may use this license for any work of which youhold the copyright and which you wish to distribute Thislicense may be particularly suitable if your work is TEX-related (such as a LATEX package) but it is written in sucha way that you can use it even if your work is unrelatedto TEX

The section lsquoWHETHER AND HOW TO DISTRIBUTEWORKS UNDER THIS LICENSErsquo below gives instructionsexamples and recommendations for authors who are con-sidering distributing their works under this license

This license gives conditions under which a work maybe distributed and modified as well as conditions underwhich modified versions of that work may be distributed

We the LATEX3 Project believe that the conditionsbelow give you the freedom to make and distribute mod-ified versions of your work that conform with whatevertechnical specifications you wish while maintaining theavailability integrity and reliability of that work If youdo not see how to achieve your goal while meeting theseconditions then read the document lsquocfgguidetexrsquo andlsquomodguidetexrsquo in the base LATEX distribution for sugges-tions

DefinitionsIn this license document the following terms are used

Work Any work being distributed under this License

Derived Work Any work that under any applicable lawis derived from the Work

Modification Any procedure that produces a DerivedWork under any applicable law ndash for example theproduction of a file containing an original file asso-ciated with the Work or a significant portion of sucha file either verbatim or with modifications andortranslated into another language

Modify To apply any procedure that produces a DerivedWork under any applicable law

Distribution Making copies of the Work available fromone person to another in whole or in part Distri-bution includes (but is not limited to) making anyelectronic components of the Work accessible by filetransfer protocols such as FTP or HTTP or by sharedfile systems such as Sunrsquos Network File System (NFS)

Compiled Work A version of the Work that has been pro-cessed into a form where it is directly usable on a

computer system This processing may include us-ing installation facilities provided by the Work trans-formations of the Work copying of components ofthe Work or other activities Note that modificationof any installation facilities provided by the Workconstitutes modification of the Work

Current Maintainer A person or persons nominated assuch within the Work If there is no such explicit nom-ination then it is the lsquoCopyright Holderrsquo under anyapplicable law

Base Interpreter A program or process that is normallyneeded for running or interpreting a part or the wholeof the WorkA Base Interpreter may depend on external compon-ents but these are not considered part of the BaseInterpreter provided that each external componentclearly identifies itself whenever it is used interact-ively Unless explicitly specified when applying thelicense to the Work the only applicable Base Inter-preter is a lsquoLATEX-Formatrsquo or in the case of files belong-ing to the lsquoLATEX-formatrsquo a program implementing thelsquoTEX languagersquo

Conditions on Distribution and Modification1 Activities other than distribution andor modification

of the Work are not covered by this license they areoutside its scope In particular the act of running theWork is not restricted and no requirements are madeconcerning any offers of support for the Work

2 You may distribute a complete unmodified copy ofthe Work as you received it Distribution of only partof the Work is considered modification of the Workand no right to distribute such a Derived Work maybe assumed under the terms of this clause

3 You may distribute a Compiled Work that has been

generated from a complete unmodified copy of theWork as distributed under Clause 2 above as long asthat Compiled Work is distributed in such a way thatthe recipients may install the Compiled Work on theirsystem exactly as it would have been installed if theygenerated a Compiled Work directly from the Work

4 If you are the Current Maintainer of the Work youmay without restriction modify the Work thus creat-ing a Derived Work You may also distribute the De-rived Work without restriction including CompiledWorks generated from the Derived Work DerivedWorks distributed in this manner by the Current Main-

THE LATEX PROJECT PUBLIC LICENSE 251

tainer are considered to be updated versions of theWork

5 If you are not the Current Maintainer of the Workyou may modify your copy of the Work thus creatinga Derived Work based on the Work and compile thisDerived Work thus creating a Compiled Work basedon the Derived Work

6 If you are not the Current Maintainer of the Workyou may distribute a Derived Work provided the fol-lowing conditions are met for every component ofthe Work unless that component clearly states in thecopyright notice that it is exempt from that conditionOnly the Current Maintainer is allowed to add suchstatements of exemption to a component of the Work

(a) If a component of this Derived Work can be adirect replacement for a component of the Workwhen that component is used with the Base In-terpreter then wherever this component of theWork identifies itself to the user when used inter-actively with that Base Interpreter the replace-ment component of this Derived Work clearly andunambiguously identifies itself as a modified ver-sion of this component to the user when usedinteractively with that Base Interpreter

(b) Every component of the Derived Work containsprominent notices detailing the nature of thechanges to that component or a prominent refer-ence to another file that is distributed as part ofthe Derived Work and that contains a completeand accurate log of the changes

(c) No information in the Derived Work implies thatany persons including (but not limited to) the au-thors of the original version of the Work provideany support including (but not limited to) the re-porting and handling of errors to recipients of theDerived Work unless those persons have statedexplicitly that they do provide such support forthe Derived Work

(d) You distribute at least one of the following withthe Derived Work

i A complete unmodified copy of the Work ifyour distribution of a modified component ismade by offering access to copy the modifiedcomponent from a designated place then of-fering equivalent access to copy the Work from

the same or some similar place meets this con-dition even though third parties are not com-pelled to copy the Work along with the modi-fied component

ii Information that is sufficient to obtain a com-plete unmodified copy of the Work

7 If you are not the Current Maintainer of the Workyou may distribute a Compiled Work generated froma Derived Work as long as the Derived Work is dis-tributed to all recipients of the Compiled Work andas long as the conditions of Clause 6 above are metwith regard to the Derived Work

8 The conditions above are not intended to prohibitand hence do not apply to the modification byany method of any component so that it becomesidentical to an updated version of that component ofthe Work as it is distributed by the Current Maintainerunder Clause 4 above

9 Distribution of the Work or any Derived Work in analternative format where the Work or that DerivedWork (in whole or in part) is then produced by ap-plying some process to that format does not relax ornullify any sections of this license as they pertain tothe results of applying that process

10 (a) A Derived Work may be distributed under a dif-ferent license provided that license itself honorsthe conditions listed in Clause 6 above in regardto the Work though it does not have to honor therest of the conditions in this license

(b) If a Derived Work is distributed under a differentlicense that Derived Work must provide sufficientdocumentation as part of itself to allow each recip-ient of that Derived Work to honor the restrictionsin Clause 6 above concerning changes from theWork

11 This license places no restrictions on works that areunrelated to the Work nor does this license place anyrestrictions on aggregating such works with the Workby any means

12 Nothing in this license is intended to or may be usedto prevent complete compliance by all parties withall applicable laws

No WarrantyThere is no warranty for the Work Except when otherwisestated in writing the Copyright Holder provides the Worklsquoas isrsquo without warranty of any kind either expressed orimplied including but not limited to the implied war-ranties of merchantability and fitness for a particular pur-pose The entire risk as to the quality and performance ofthe Work is with you Should the Work prove defectiveyou assume the cost of all necessary servicing repair orcorrection

In no event unless required by applicable law oragreed to in writing will The Copyright Holder or any au-

thor named in the components of the Work or any otherparty who may distribute andor modify the Work as per-mitted above be liable to you for damages includingany general special incidental or consequential damagesarising out of any use of the Work or out of inability touse the Work (including but not limited to loss of datadata being rendered inaccurate or losses sustained byanyone as a result of any failure of the Work to operatewith any other programs) even if the Copyright Holderor said author or said other party has been advised of thepossibility of such damages

THE LATEX PROJECT PUBLIC LICENSE 252

Maintenance of The WorkThe Work has the status lsquoauthor-maintainedrsquo if the Copy-right Holder explicitly and prominently states near theprimary copyright notice in the Work that the Work canonly be maintained by the Copyright Holder or simplythat it is lsquoauthor-maintainedrsquo

The Work has the status lsquomaintainedrsquo if there is aCurrent Maintainer who has indicated in the Work thatthey are willing to receive error reports for the Work (forexample by supplying a valid e-mail address) It is notrequired for the Current Maintainer to acknowledge oract upon these error reports

The Work changes from status lsquomaintainedrsquo to lsquoun-maintainedrsquo if there is no Current Maintainer or the per-son stated to be Current Maintainer of the work cannotbe reached through the indicated means of communica-tion for a period of six months and there are no othersignificant signs of active maintenance

You can become the Current Maintainer of the Workby agreement with any existing Current Maintainer totake over this role

If the Work is unmaintained you can become theCurrent Maintainer of the Work through the followingsteps1 Make a reasonable attempt to trace the Current Main-

tainer (and the Copyright Holder if the two differ)through the means of an Internet or similar search

2 If this search is successful then enquire whether theWork is still maintained

(a) If it is being maintained then ask the CurrentMaintainer to update their communication datawithin one month

(b) If the search is unsuccessful or no action to re-sume active maintenance is taken by the Current

Maintainer then announce within the pertinentcommunity your intention to take over mainten-ance (If the Work is a LATEX work this could bedone for example by posting to comptexttex)

3 (a) If the Current Maintainer is reachable and agreesto pass maintenance of the Work to you then thistakes effect immediately upon announcement

(b) If the Current Maintainer is not reachable andthe Copyright Holder agrees that maintenance ofthe Work be passed to you then this takes effectimmediately upon announcement

4 If you make an lsquointention announcementrsquo as describedin 2b above and after three months your intentionis challenged neither by the Current Maintainer norby the Copyright Holder nor by other people thenyou may arrange for the Work to be changed so as toname you as the (new) Current Maintainer

5 If the previously unreachable Current Maintainer be-comes reachable once more within three months of achange completed under the terms of 3b or 4 thenthat Current Maintainer must become or remain theCurrent Maintainer upon request provided they thenupdate their communication data within one month

A change in the Current Maintainer does not of itselfalter the fact that the Work is distributed under the LPPLlicense

If you become the Current Maintainer of the Workyou should immediately provide within the Work a prom-inent and unambiguous statement of your status as Cur-rent Maintainer You should also announce your newstatus to the same pertinent community as in 2b above

Whether and How to Distribute Works under This LicenseThis section contains important instructions examplesand recommendations for authors who are consideringdistributing their works under this license These authorsare addressed as lsquoyoursquo in this section

Choosing This License or Another LicenseIf for any part of your work you want or need to use dis-tribution conditions that differ significantly from those inthis license then do not refer to this license anywherein your work but instead distribute your work under adifferent license You may use the text of this license as amodel for your own license but your license should notrefer to the LPPL or otherwise give the impression thatyour work is distributed under the LPPL

The document lsquomodguidetexrsquo in the base LATEX dis-tribution explains the motivation behind the conditionsof this license It explains for example why distributingLATEX under the GNU General Public License (GPL) wasconsidered inappropriate Even if your work is unrelatedto LATEX the discussion in lsquomodguidetexrsquo may still berelevant and authors intending to distribute their worksunder any license are encouraged to read it

A Recommendation on Modification WithoutDistributionIt is wise never to modify a component of the Work evenfor your own personal use without also meeting the aboveconditions for distributing the modified component Whileyou might intend that such modifications will never bedistributed often this will happen by accident ndash you mayforget that you have modified that component or it maynot occur to you when allowing others to access the modi-fied version that you are thus distributing it and violatingthe conditions of this license in ways that could havelegal implications and worse cause problems for thecommunity It is therefore usually in your best interest tokeep your copy of the Work identical with the public oneMany works provide ways to control the behavior of thatwork without altering any of its licensed components

How to Use This LicenseTo use this license place in each of the components ofyour work both an explicit copyright notice including yourname and the year the work was authored andor lastsubstantially modified Include also a statement that thedistribution andor modification of that component is

THE LATEX PROJECT PUBLIC LICENSE 253

constrained by the conditions in this licenseHere is an example of such a notice and statement

pigdtx Copyright 2005 M Y Name This work may be distributed andor modified under the conditions of the LaTeX Project Public License either version 13 of this license or (at your option) any later version The latest version of this license is in httpswwwlatex-projectorglppltxt and version 13 or later is part of all distributions of LaTeX version 20051201 or later This work has the LPPL maintenance status `maintained The Current Maintainer of this work is M Y Name This work consists of the files pigdtx and pigins and the derived file pigsty

Given such a notice and statement in a file the con-ditions given in this license document would apply withthe lsquoWorkrsquo referring to the three files lsquopigdtxrsquo lsquopiginsrsquoand lsquopigstyrsquo (the last being generated from lsquopigdtxrsquousing lsquopiginsrsquo) the lsquoBase Interpreterrsquo referring to anylsquoLATEX-Formatrsquo and both lsquoCopyright Holderrsquo and lsquoCurrentMaintainerrsquo referring to the person lsquoM Y Namersquo

If you do not want the Maintenance section of LPPLto apply to your Work change lsquomaintainedrsquo above intolsquoauthor-maintainedrsquo However we recommend that youuse lsquomaintainedrsquo as the Maintenance section was addedin order to ensure that your Work remains useful to thecommunity even when you can no longer maintain andsupport it yourself

Derived Works That Are Not Replacements

Several clauses of the LPPL specify means to provide reliab-ility and stability for the user community They thereforeconcern themselves with the case that a Derived Work isintended to be used as a (compatible or incompatible)replacement of the original Work If this is not the case(eg if a few lines of code are reused for a completelydifferent task) then clauses 6b and 6d shall not apply

Important Recommendations

Defining What Constitutes the WorkThe LPPL requires that distributions of the Work con-

tain all the files of the Work It is therefore important thatyou provide a way for the licensee to determine whichfiles constitute the Work This could for example beachieved by explicitly listing all the files of the Work nearthe copyright notice of each file or by using a line such as

This work consists of all files listed in manifesttxt

in that place In the absence of an unequivocal list itmight be impossible for the licensee to determine what isconsidered by you to comprise the Work and in such acase the licensee would be entitled to make reasonableconjectures as to which files comprise the Work

  • Contents
  • List of Tables
  • Micro-typography with TeX
  • Getting started
  • Options
    • Enabling the micro-typographic features
    • Character protrusion
    • Font expansion
    • Tracking
    • Miscellaneous options
    • Changing options later
      • Selecting fonts for micro-typography
      • Micro fine tuning
        • Character protrusion
        • Font expansion
        • Tracking
        • Additional kerning
        • Interword spacing
        • Character inheritance
        • Configuration files
          • Context-sensitive setup
          • Letterspacing revisited
          • Disabling ligatures
          • Hints and caveats
          • Contributions
          • Acknowledgments
          • References
          • Short history
          • Implementation
            • Preliminaries
              • Debugging
              • Requirements
              • Declarations
              • Auxiliary macros
              • Compatibility
                • Font setup
                  • Protrusion
                  • Expansion
                  • Interword spacing (glue)
                  • Additional kerning
                  • Tracking
                  • Disabling ligatures
                  • Loading the configuration
                  • Translating characters into slots
                  • Hook into LaTeXs font selection
                  • Context-sensitive setup
                    • Configuration
                      • Font sets
                      • Variants and aliases
                      • Disabling ligatures
                      • Interaction with babel
                      • Fine tuning
                      • Character inheritance
                      • Permutation
                        • Package options
                          • Declaring the options
                          • Loading the definition file
                          • Reading the configuration file
                          • Hook for other packages
                          • Changing options later
                          • Processing the options
                              • Configuration files
                                • Font sets
                                • Font variants and aliases
                                • Interaction with babel
                                • Note on admissible characters
                                • Character inheritance
                                  • OT1
                                  • T1
                                  • LY1
                                  • OT4
                                  • QX
                                  • T5
                                  • EU1 EU2 TU
                                  • Euro symbols
                                    • Tracking
                                    • Font expansion
                                    • Character protrusion
                                      • Normal
                                      • Italics
                                      • Small caps
                                      • Italic small caps
                                      • Text companion
                                      • Computer Modern math
                                      • AMS symbols
                                      • Euler
                                      • Euro symbols
                                        • Interword spacing
                                          • Nonfrenchspacing
                                            • Additional kerning
                                              • French
                                              • Turkish
                                                  • OpenType configuration files
                                                    • Character inheritance
                                                    • Character protrusion
                                                      • Auxiliary file for micro fine tuning
                                                      • The title logo
                                                        • Macros
                                                        • Document
                                                          • The letterspacing illustration
                                                            • Macros
                                                            • Document
                                                              • Change history
                                                                • 10 (20040911)
                                                                • 11 (20040921)
                                                                • 12 (20041003)
                                                                • 13 (20041027)
                                                                • 14 (20041112)
                                                                • 14a (20041117)
                                                                • 14b (20041126)
                                                                • 15 (20041215)
                                                                • 16 (20050124)
                                                                • 16a (20050202)
                                                                • 17 (20050323)
                                                                • 18 (20050623)
                                                                • 19 (20051028)
                                                                • 19a (20051205)
                                                                • 19b (20060120)
                                                                • 19c (20060202)
                                                                • 19d (20060505)
                                                                • 19e (20060728)
                                                                • 19f (20060909)
                                                                • 20 (20070114)
                                                                • 21 (20070121)
                                                                • 22 (20070714)
                                                                • 23 (20071223)
                                                                • 23a (20080229)
                                                                • 23b (20080604)
                                                                • 23c (20081111)
                                                                • 23d (20090327)
                                                                • 23e (20091109)
                                                                • 24 (20100110)
                                                                • 25 (20130313)
                                                                • 25a (20130523)
                                                                • 26 (20160501)
                                                                • 26a (20160514)
                                                                • 27 (20170707)
                                                                • 27a (20180114)
                                                                • 27b (20190228)
                                                                • 27c (20191010)
                                                                • 27d (20191118)
                                                                • 28 (20201207)
                                                                • 28a (20210222)
                                                                • 28b (20210225)
                                                                • 28c (20210314)
                                                                  • Index
                                                                    • Options
                                                                    • Commands
                                                                    • A
                                                                    • B
                                                                    • C
                                                                    • D
                                                                    • E
                                                                    • F
                                                                    • G
                                                                    • H
                                                                    • I
                                                                    • J
                                                                    • K
                                                                    • L
                                                                    • M
                                                                    • N
                                                                    • O
                                                                    • P
                                                                    • Q
                                                                    • R
                                                                    • S
                                                                    • T
                                                                    • U
                                                                    • V
                                                                    • W
                                                                    • X
                                                                    • Y
                                                                    • Z
                                                                      • The LaTeX Project Public License
Page 5: The microtype package - ctan.math.utah.edu
Page 6: The microtype package - ctan.math.utah.edu
Page 7: The microtype package - ctan.math.utah.edu
Page 8: The microtype package - ctan.math.utah.edu
Page 9: The microtype package - ctan.math.utah.edu
Page 10: The microtype package - ctan.math.utah.edu
Page 11: The microtype package - ctan.math.utah.edu
Page 12: The microtype package - ctan.math.utah.edu
Page 13: The microtype package - ctan.math.utah.edu
Page 14: The microtype package - ctan.math.utah.edu
Page 15: The microtype package - ctan.math.utah.edu
Page 16: The microtype package - ctan.math.utah.edu
Page 17: The microtype package - ctan.math.utah.edu
Page 18: The microtype package - ctan.math.utah.edu
Page 19: The microtype package - ctan.math.utah.edu
Page 20: The microtype package - ctan.math.utah.edu
Page 21: The microtype package - ctan.math.utah.edu
Page 22: The microtype package - ctan.math.utah.edu
Page 23: The microtype package - ctan.math.utah.edu
Page 24: The microtype package - ctan.math.utah.edu
Page 25: The microtype package - ctan.math.utah.edu
Page 26: The microtype package - ctan.math.utah.edu
Page 27: The microtype package - ctan.math.utah.edu
Page 28: The microtype package - ctan.math.utah.edu
Page 29: The microtype package - ctan.math.utah.edu
Page 30: The microtype package - ctan.math.utah.edu
Page 31: The microtype package - ctan.math.utah.edu
Page 32: The microtype package - ctan.math.utah.edu
Page 33: The microtype package - ctan.math.utah.edu
Page 34: The microtype package - ctan.math.utah.edu
Page 35: The microtype package - ctan.math.utah.edu
Page 36: The microtype package - ctan.math.utah.edu
Page 37: The microtype package - ctan.math.utah.edu
Page 38: The microtype package - ctan.math.utah.edu
Page 39: The microtype package - ctan.math.utah.edu
Page 40: The microtype package - ctan.math.utah.edu
Page 41: The microtype package - ctan.math.utah.edu
Page 42: The microtype package - ctan.math.utah.edu
Page 43: The microtype package - ctan.math.utah.edu
Page 44: The microtype package - ctan.math.utah.edu
Page 45: The microtype package - ctan.math.utah.edu
Page 46: The microtype package - ctan.math.utah.edu
Page 47: The microtype package - ctan.math.utah.edu
Page 48: The microtype package - ctan.math.utah.edu
Page 49: The microtype package - ctan.math.utah.edu
Page 50: The microtype package - ctan.math.utah.edu
Page 51: The microtype package - ctan.math.utah.edu
Page 52: The microtype package - ctan.math.utah.edu
Page 53: The microtype package - ctan.math.utah.edu
Page 54: The microtype package - ctan.math.utah.edu
Page 55: The microtype package - ctan.math.utah.edu
Page 56: The microtype package - ctan.math.utah.edu
Page 57: The microtype package - ctan.math.utah.edu
Page 58: The microtype package - ctan.math.utah.edu
Page 59: The microtype package - ctan.math.utah.edu
Page 60: The microtype package - ctan.math.utah.edu
Page 61: The microtype package - ctan.math.utah.edu
Page 62: The microtype package - ctan.math.utah.edu
Page 63: The microtype package - ctan.math.utah.edu
Page 64: The microtype package - ctan.math.utah.edu
Page 65: The microtype package - ctan.math.utah.edu
Page 66: The microtype package - ctan.math.utah.edu
Page 67: The microtype package - ctan.math.utah.edu
Page 68: The microtype package - ctan.math.utah.edu
Page 69: The microtype package - ctan.math.utah.edu
Page 70: The microtype package - ctan.math.utah.edu
Page 71: The microtype package - ctan.math.utah.edu
Page 72: The microtype package - ctan.math.utah.edu
Page 73: The microtype package - ctan.math.utah.edu
Page 74: The microtype package - ctan.math.utah.edu
Page 75: The microtype package - ctan.math.utah.edu
Page 76: The microtype package - ctan.math.utah.edu
Page 77: The microtype package - ctan.math.utah.edu
Page 78: The microtype package - ctan.math.utah.edu
Page 79: The microtype package - ctan.math.utah.edu
Page 80: The microtype package - ctan.math.utah.edu
Page 81: The microtype package - ctan.math.utah.edu
Page 82: The microtype package - ctan.math.utah.edu
Page 83: The microtype package - ctan.math.utah.edu
Page 84: The microtype package - ctan.math.utah.edu
Page 85: The microtype package - ctan.math.utah.edu
Page 86: The microtype package - ctan.math.utah.edu
Page 87: The microtype package - ctan.math.utah.edu
Page 88: The microtype package - ctan.math.utah.edu
Page 89: The microtype package - ctan.math.utah.edu
Page 90: The microtype package - ctan.math.utah.edu
Page 91: The microtype package - ctan.math.utah.edu
Page 92: The microtype package - ctan.math.utah.edu
Page 93: The microtype package - ctan.math.utah.edu
Page 94: The microtype package - ctan.math.utah.edu
Page 95: The microtype package - ctan.math.utah.edu
Page 96: The microtype package - ctan.math.utah.edu
Page 97: The microtype package - ctan.math.utah.edu
Page 98: The microtype package - ctan.math.utah.edu
Page 99: The microtype package - ctan.math.utah.edu
Page 100: The microtype package - ctan.math.utah.edu
Page 101: The microtype package - ctan.math.utah.edu
Page 102: The microtype package - ctan.math.utah.edu
Page 103: The microtype package - ctan.math.utah.edu
Page 104: The microtype package - ctan.math.utah.edu
Page 105: The microtype package - ctan.math.utah.edu
Page 106: The microtype package - ctan.math.utah.edu
Page 107: The microtype package - ctan.math.utah.edu
Page 108: The microtype package - ctan.math.utah.edu
Page 109: The microtype package - ctan.math.utah.edu
Page 110: The microtype package - ctan.math.utah.edu
Page 111: The microtype package - ctan.math.utah.edu
Page 112: The microtype package - ctan.math.utah.edu
Page 113: The microtype package - ctan.math.utah.edu
Page 114: The microtype package - ctan.math.utah.edu
Page 115: The microtype package - ctan.math.utah.edu
Page 116: The microtype package - ctan.math.utah.edu
Page 117: The microtype package - ctan.math.utah.edu
Page 118: The microtype package - ctan.math.utah.edu
Page 119: The microtype package - ctan.math.utah.edu
Page 120: The microtype package - ctan.math.utah.edu
Page 121: The microtype package - ctan.math.utah.edu
Page 122: The microtype package - ctan.math.utah.edu
Page 123: The microtype package - ctan.math.utah.edu
Page 124: The microtype package - ctan.math.utah.edu
Page 125: The microtype package - ctan.math.utah.edu
Page 126: The microtype package - ctan.math.utah.edu
Page 127: The microtype package - ctan.math.utah.edu
Page 128: The microtype package - ctan.math.utah.edu
Page 129: The microtype package - ctan.math.utah.edu
Page 130: The microtype package - ctan.math.utah.edu
Page 131: The microtype package - ctan.math.utah.edu
Page 132: The microtype package - ctan.math.utah.edu
Page 133: The microtype package - ctan.math.utah.edu
Page 134: The microtype package - ctan.math.utah.edu
Page 135: The microtype package - ctan.math.utah.edu
Page 136: The microtype package - ctan.math.utah.edu
Page 137: The microtype package - ctan.math.utah.edu
Page 138: The microtype package - ctan.math.utah.edu
Page 139: The microtype package - ctan.math.utah.edu
Page 140: The microtype package - ctan.math.utah.edu
Page 141: The microtype package - ctan.math.utah.edu
Page 142: The microtype package - ctan.math.utah.edu
Page 143: The microtype package - ctan.math.utah.edu
Page 144: The microtype package - ctan.math.utah.edu
Page 145: The microtype package - ctan.math.utah.edu
Page 146: The microtype package - ctan.math.utah.edu
Page 147: The microtype package - ctan.math.utah.edu
Page 148: The microtype package - ctan.math.utah.edu
Page 149: The microtype package - ctan.math.utah.edu
Page 150: The microtype package - ctan.math.utah.edu
Page 151: The microtype package - ctan.math.utah.edu
Page 152: The microtype package - ctan.math.utah.edu
Page 153: The microtype package - ctan.math.utah.edu
Page 154: The microtype package - ctan.math.utah.edu
Page 155: The microtype package - ctan.math.utah.edu
Page 156: The microtype package - ctan.math.utah.edu
Page 157: The microtype package - ctan.math.utah.edu
Page 158: The microtype package - ctan.math.utah.edu
Page 159: The microtype package - ctan.math.utah.edu
Page 160: The microtype package - ctan.math.utah.edu
Page 161: The microtype package - ctan.math.utah.edu
Page 162: The microtype package - ctan.math.utah.edu
Page 163: The microtype package - ctan.math.utah.edu
Page 164: The microtype package - ctan.math.utah.edu
Page 165: The microtype package - ctan.math.utah.edu
Page 166: The microtype package - ctan.math.utah.edu
Page 167: The microtype package - ctan.math.utah.edu
Page 168: The microtype package - ctan.math.utah.edu
Page 169: The microtype package - ctan.math.utah.edu
Page 170: The microtype package - ctan.math.utah.edu
Page 171: The microtype package - ctan.math.utah.edu
Page 172: The microtype package - ctan.math.utah.edu
Page 173: The microtype package - ctan.math.utah.edu
Page 174: The microtype package - ctan.math.utah.edu
Page 175: The microtype package - ctan.math.utah.edu
Page 176: The microtype package - ctan.math.utah.edu
Page 177: The microtype package - ctan.math.utah.edu
Page 178: The microtype package - ctan.math.utah.edu
Page 179: The microtype package - ctan.math.utah.edu
Page 180: The microtype package - ctan.math.utah.edu
Page 181: The microtype package - ctan.math.utah.edu
Page 182: The microtype package - ctan.math.utah.edu
Page 183: The microtype package - ctan.math.utah.edu
Page 184: The microtype package - ctan.math.utah.edu
Page 185: The microtype package - ctan.math.utah.edu
Page 186: The microtype package - ctan.math.utah.edu
Page 187: The microtype package - ctan.math.utah.edu
Page 188: The microtype package - ctan.math.utah.edu
Page 189: The microtype package - ctan.math.utah.edu
Page 190: The microtype package - ctan.math.utah.edu
Page 191: The microtype package - ctan.math.utah.edu
Page 192: The microtype package - ctan.math.utah.edu
Page 193: The microtype package - ctan.math.utah.edu
Page 194: The microtype package - ctan.math.utah.edu
Page 195: The microtype package - ctan.math.utah.edu
Page 196: The microtype package - ctan.math.utah.edu
Page 197: The microtype package - ctan.math.utah.edu
Page 198: The microtype package - ctan.math.utah.edu
Page 199: The microtype package - ctan.math.utah.edu
Page 200: The microtype package - ctan.math.utah.edu
Page 201: The microtype package - ctan.math.utah.edu
Page 202: The microtype package - ctan.math.utah.edu
Page 203: The microtype package - ctan.math.utah.edu
Page 204: The microtype package - ctan.math.utah.edu
Page 205: The microtype package - ctan.math.utah.edu
Page 206: The microtype package - ctan.math.utah.edu
Page 207: The microtype package - ctan.math.utah.edu
Page 208: The microtype package - ctan.math.utah.edu
Page 209: The microtype package - ctan.math.utah.edu
Page 210: The microtype package - ctan.math.utah.edu
Page 211: The microtype package - ctan.math.utah.edu
Page 212: The microtype package - ctan.math.utah.edu
Page 213: The microtype package - ctan.math.utah.edu
Page 214: The microtype package - ctan.math.utah.edu
Page 215: The microtype package - ctan.math.utah.edu
Page 216: The microtype package - ctan.math.utah.edu
Page 217: The microtype package - ctan.math.utah.edu
Page 218: The microtype package - ctan.math.utah.edu
Page 219: The microtype package - ctan.math.utah.edu
Page 220: The microtype package - ctan.math.utah.edu
Page 221: The microtype package - ctan.math.utah.edu
Page 222: The microtype package - ctan.math.utah.edu
Page 223: The microtype package - ctan.math.utah.edu
Page 224: The microtype package - ctan.math.utah.edu
Page 225: The microtype package - ctan.math.utah.edu
Page 226: The microtype package - ctan.math.utah.edu
Page 227: The microtype package - ctan.math.utah.edu
Page 228: The microtype package - ctan.math.utah.edu
Page 229: The microtype package - ctan.math.utah.edu
Page 230: The microtype package - ctan.math.utah.edu
Page 231: The microtype package - ctan.math.utah.edu
Page 232: The microtype package - ctan.math.utah.edu
Page 233: The microtype package - ctan.math.utah.edu
Page 234: The microtype package - ctan.math.utah.edu
Page 235: The microtype package - ctan.math.utah.edu
Page 236: The microtype package - ctan.math.utah.edu
Page 237: The microtype package - ctan.math.utah.edu
Page 238: The microtype package - ctan.math.utah.edu
Page 239: The microtype package - ctan.math.utah.edu
Page 240: The microtype package - ctan.math.utah.edu
Page 241: The microtype package - ctan.math.utah.edu
Page 242: The microtype package - ctan.math.utah.edu
Page 243: The microtype package - ctan.math.utah.edu
Page 244: The microtype package - ctan.math.utah.edu
Page 245: The microtype package - ctan.math.utah.edu
Page 246: The microtype package - ctan.math.utah.edu
Page 247: The microtype package - ctan.math.utah.edu
Page 248: The microtype package - ctan.math.utah.edu
Page 249: The microtype package - ctan.math.utah.edu
Page 250: The microtype package - ctan.math.utah.edu
Page 251: The microtype package - ctan.math.utah.edu
Page 252: The microtype package - ctan.math.utah.edu
Page 253: The microtype package - ctan.math.utah.edu