10.07.2015 Views

The microtype package

The microtype package

The microtype package

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

<strong>The</strong> <strong>microtype</strong> <strong>package</strong>Subliminal refinements towards typographical perfectionR Schlichtw.m.l@gmx.netv2.5a2013/05/23<strong>The</strong> <strong>microtype</strong> <strong>package</strong> provides a L A TEX interface to the micro-typographic extensionsthat were introduced by pdfTEX and have since also propagated to TEX andLuaTEX: 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. <strong>The</strong>sefeatures 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 0.14f or later), LuaTEX, orTEX (at least version 0.9997). Font expansion works with pdfTEX (version 1.20 forautomatic expansion) or LuaTEX. <strong>The</strong> <strong>package</strong> will by default enable protrusion andexpansion if they can safely be assumed to work. Disabling ligatures requires pdfTEX(≥ 1.30) or LuaTEX, while the adjustment of interword spacing and of kerning onlyworks with pdfTEX (≥ 1.40). Letterspacing is available with pdfTEX (≥ 1.40) orLuaTEX (≥ 0.62).<strong>The</strong> alternative <strong>package</strong> letterspace, which also works with plain TEX, providesthe user commands for letterspacing only, omitting support for all other extensions(see section 7).EXEXThis <strong>package</strong> is copyright © 2004–2013 R Schlicht. It may be distributed and/ormodified under the conditions of the L A TEX Project Public License, either version 1.3cof this license or (at your option) any later version. This work has the LPPL maintenancestatus ‘author-maintained’.


CONTENTS 2Contents1 Micro-typography with TEX 42 Getting started 53 Options 63.1 Enabling the micro-typographic features . . . . . . . . . . . . . . . . . . 63.2 Character protrusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.3 Font expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.4 Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.5 Miscellaneous options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.6 Changing options later . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Selecting fonts for micro-typography 105 Micro fine tuning 125.1 Character protrusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125.2 Font expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145.3 Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.4 Additional kerning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185.5 Interword spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.6 Character inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205.7 Configuration files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 Context-sensitive setup 227 Letterspacing revisited 238 Disabling ligatures 249 Hints and caveats 2510 Contributions 2811 Acknowledgments 2812 References 2913 Short history 2914 Implementation 3314.1 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Debugging [35] Requirements [37] Declarations [40] Auxiliary macros [41]Compatibility [49]14.2 Font setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54Protrusion [59] Expansion [66] Interword spacing (glue) [68] Additional kerning[70] Tracking [71] Disabling ligatures [81] Loading the configuration [82]Translating characters into slots [86] Hook into L A TEX’s font selection [93]Context-sensitive setup [96]14.3 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Font sets [98] Variants and aliases [104] Disabling ligatures [105] Interactionwith babel [105] Fine tuning [105] Character inheritance [112] Permutation[114]


LIST OF TABLES 314.4 Package options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117Declaring the options [117] Loading the definition file [121] Reading theconfiguration file [121] Hook for other <strong>package</strong>s [122] Changing optionslater [123] Processing the options [125]15 Configuration files 13415.1 Font sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13415.2 Font variants and aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . 13515.3 Interaction with babel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13615.4 Note on admissible characters . . . . . . . . . . . . . . . . . . . . . . . . 13715.5 Character inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137OT1 [137] T1 [138] LY1 [138] OT4 [139] QX [139] T5 [140] EU1, EU2 [141] Eurosymbols [141]15.6 Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14215.7 Font expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14215.8 Character protrusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144Normal [145] Italics [153] Small caps [164] Italic small caps [167] Textcompanion [168] Computer Modern math [173] AMS symbols [177] Euler [180]Euro symbols [184]15.9 Interword spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185Nonfrenchspacing [187]15.10 Additional kerning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188French [189] Turkish [189]16 OpenType configuration files 19016.1 Character inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19016.2 Character protrusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19517 Auxiliary file for micro fine tuning 210A <strong>The</strong> title logo 212A.1 Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212A.2 Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217B <strong>The</strong> letterspacing illustration 217B.1 Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217B.2 Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220C Change history 222D Index 230E <strong>The</strong> L A TEX Project Public License 238List of Tables1 Availability of micro-typographic features . . . . . . . . . . . . . . . . . . . . . 72 Predefined font sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Fonts with tailored protrusion settings . . . . . . . . . . . . . . . . . . . . . . . 214 Order for matching font attributes . . . . . . . . . . . . . . . . . . . . . . . . . . 84


MICRO-TYPOGRAPHY WITH TEX 41 Micro-typography with TEXAfter If you you hadhavea PDF read viewer the text thaton understands the right, PDF you1.5, canyouviewthe could effect viewofthe theeffect features of the itdescribes micro-typographic by clicking features on thebylinks: clicking on the links.ProtrusionExpansionon offon offBoth features are enabledthroughout this document.Micro-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 (i.e., 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 – and in an outstanding manner – namely, hyphenation and justification,as well as kerning and ligatures. Other aspects are in the user’s scope of responsibilities,e.g., to specify the right amounts of spacing around punctuation characters,numbers, or quotation marks. On top of this, a number of long-standing microtypographictechniques have been introduced to the TEX world relatively recentlywith pdfTEX, and have since also propagated to LuaTEX and TEX. <strong>The</strong>se featuresmake them the tool of choice not only for the creation of electronic documentsbut also of works of outstanding time-honoured typography: most prominently,character protrusion (also known as margin kerning) and font expansion. QuotingHàn Thê´ Thành, the author of pdfTEX, who writes in his thesis:‘Margin kerning is the adjustments of the characters at the margins of a typeset text.A 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 is the the method to to to use use aawider a wider or ornarrower narrower variant variant of of aaof font font a font to to make to make interword interword spacing spacing more more more even. even. Aeven. font A font Ain font in a loose a in loose aline loose line can can line be be substituted can be substituteda wider a wider byvariant a wider variant so variant the sointerword the the interword spaces spaces are spaces stretched are are stretched by a smaller by bya amount. smallerSimilarly,amount.Similarly, a font in a atight font line aa tight can be line replaced can can be be by replaced a narrower by by a narrowera variant to variant reduce variant tothe reduce toamountreducethethe amount thatamount the interword that the interword the spaces interword are spaces shrunk spaces areby. shrunk are <strong>The</strong>re shrunk by. is certainly <strong>The</strong>re by. <strong>The</strong>re is acertainly potential is certainly a danger potential a potential of dan-fontdanger distortion of font of font when distortion distortion using when such when using manipulations, using such such manipulations, thus they musthus they be used they mustwith be used extreme be usedwithwith extreme care. extreme <strong>The</strong> care. potentiality care. <strong>The</strong> <strong>The</strong>topotentiality adjust toa adjust line to adjust width a linea width byline font width byexpansion font expansion fontcan expansion be can taken becan taken into betaken into consideration into consideration while while a paragraph awhile paragraph aisparagraph being being broken is broken being into lines, broken into lines, order into inlines, to order choose in toorder choose better tochoose better breakpoints.’ breakpoints.’ better[Thành breakpoints.’ [Thành 2000, [Thành p. 2000, 323]p. 2000, 323] p.byby323]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 characters of a font is especially useful for languageswhose typographical tradition requires certain characters to be separatedby a space. For example, it is customary in French typography to add a small spacebefore question mark, exclamation mark and semi-colon, and a bigger space beforethe colon and the guillemets. Until now, this could only be achieved by makingEX1 <strong>The</strong> soul <strong>package</strong> undertook great efforts, but could still fail in certain circumstances; even to systematicallyadjust the tracking of a font throughout the document remained impossible.


GETTING STARTED 5these characters active (for example by the babel <strong>package</strong>), which may not alwaysbe a robust solution. In contrast to the standard kerning built into the fonts (whichwill of course apply as usual), this additional kerning relates 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 ‘r’, the followingspace should be a tiny bit smaller than that following, say, an ‘m’. You can thinkof this concept as an extension to TEX’s ‘space factors’. This feature may enhancethe appearance of paragraphs even more. Emphasis in the last sentence is onthe word ‘may’: this extension is still highly experimental – in particular, onlyending characters will currently influence the interword space. Also, the settingsshipped with <strong>microtype</strong> are but a first approximation, and I would highly welcomecorrections and improvements. I suggest reading the reasoning behind the settingsin section 15.9.<strong>The</strong> possibility, finally, to disable all ligatures of a font may be useful for typewriterfonts.<strong>The</strong> <strong>microtype</strong> <strong>package</strong> provides an interface to all these micro-typographic extensions.All micro-typographic aspects may be customised to your taste and needs ina straight-forward and systematic manner. <strong>The</strong> 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 started<strong>The</strong>re is nothing surprising in loading this <strong>package</strong>:\use<strong>package</strong>{<strong>microtype</strong>}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 <strong>package</strong> 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 – be it for theoretical or practical reasons – this manual will guide youon the path to the desired results along the following milestones:• Enable the respective micro-typographic feature, either via the respective <strong>package</strong>option or with the \<strong>microtype</strong>setup command (section 3).• Select the fonts to which this feature should be applied by declaring and activating‘sets of fonts’. Some sets are predefined, which may be activated directly in the<strong>package</strong> options (section 4).• Fine-tune the micro-typographic settings of the fonts or sets of fonts (section 5).• If you’re of the kind who always wants to march on, you will certainly be interestedin the possibility of context-sensitive setup (section 6).• You are even countenanced to leave the path of typographic virtue and steal somesheep (section 7) or trespass in other ways (section 8).• Should you encounter any obstacles, follow the hints and caveats (section 9).


OPTIONS 63 OptionsLike many other L A TEX <strong>package</strong>s, the <strong>microtype</strong> <strong>package</strong> accepts options in the wellknown key=value syntax. In the following, you will find a description of all keysand their possible values (‘true’ may be omitted; multiple values, where allowed,must be enclosed in braces; the default value is shown on the right, preceded byan asterisk if it is contingent on the TEX engine, version and/or the output mode).3.1 Enabling the micro-typographic featuresprotrusionexpansionactivatetrue, false, compatibility, nocompatibility, 〈font set name〉* true<strong>The</strong>se are the main options to control the level of micro-typographic refinementwhich the fonts in your document should gain. By default, the <strong>package</strong> 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 1.20, in DVI output mode (see section 3.5), or with TEX. Inother words, <strong>microtype</strong> 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 <strong>package</strong> with different options 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. <strong>The</strong> activate option is ashortcut for setting both options at the same time. <strong>The</strong>refore, the following linesall have the same effect (when creating PDF files with a recent version of pdfTEX):\use<strong>package</strong>[protrusion=true,expansion]{<strong>microtype</strong>}EX\use<strong>package</strong>[activate={true,nocompatibility}]{<strong>microtype</strong>}\use<strong>package</strong>{<strong>microtype</strong>}With activated font expansion and/or character protrusion, line breaks (and consequently,page breaks) may turn out differently. If this is not desired – because youare re-typesetting a book whose pagination must not change – you may pass thevalue compatibility to the protrusion and/or expansion options. Typographically,however, 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 protrusionand/or font expansion should be restricted. See section 4 for a detailed discussion.Specifying a font set for a feature implicitly activates this feature.trackingkerningspacingtrue, false, 〈font set name〉falseThis option will systematically change the tracking of the fonts specified in theactive font set (by default, all small capitals). It is not available with TEX (youmay use the ‘LetterSpace’ option of the fontspec <strong>package</strong> instead). With LuaTEX,you need to load the fonts with the fontspec option ‘Renderer=Basic‘. See thefontspec manual for details.true, false, 〈font set name〉EXfalse<strong>The</strong>se features do not unconditionally improve the quality of the typeset text: the‘spacing’ feature is still considered experimental, while the ‘kerning’ feature onlymakes sense in special cases. <strong>The</strong>refore, neither feature is enabled by default. <strong>The</strong>yare not available with TEX or LuaTEX.EX


OPTIONS: Character protrusion 7Table 1:TEX engineMicro-typographic featuresAvailability of microtypographicfeaturesEngine Version Output Protrusion Expansion (= auto) Kerning Spacing TrackingpdfTEX < 0.14f DVI/PDF ∅ ∅ ∅ ∅ ∅ ∅≥ 0.14f DVI/PDF ★ ⊠ ∅ ∅ ∅ ∅≥ 1.20 DVI ★ ⊠ ∅ ∅ ∅ ∅PDF ★ ★ ★ ∅ ∅ ∅≥ 1.40 DVI ★ ⊠ ∅ ⊠ ⊠ ∅PDF ★ ★ ★ ⊠ ⊠ ⊠ aLuaTEX ≥ 0.30 DVI ★ ⊠ ∅ ∅ ∅ ∅PDF ★ ★ ★ ∅ ∅ ∅≥ 0.62 DVI ★ ⊠ ∅ ∅ ∅ ∅PDF ★ ★ ★ ∅ ∅ ⊠TEX ≥ 0.9997 PDF ★ ∅ ∅ ∅ ∅ ∅EX★ = enabled ⊠ = not enabled ∅ = not available a ≥ 1.40.4 recommendedIn table 1, you find 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 <strong>package</strong> optionbut by using the \DisableLigatures command, which is explained in section 8.3.2 Character protrusion pdfTEX 0.14f | LuaTEX 0.30 |TEX 0.9997EXfactorunit〈integer〉 1000Using 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 5.1) 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 (e.g., if you are so proud of being able to use this feature thatyou want everybody to see it, or – to mention a motivation more in compliancewith typographical correctness – if you are using a large font that calls for moremodest protrusion).character, 〈dimension〉characterThis option is described in section 5.1, apropos the command \SetProtrusion. Usewith care.3.3 Font expansion pdfTEX 0.14f | LuaTEX 0.30autotrue, false* trueBeginning with version pdfTEX 1.20 (and with LuaTEX), the expanded instancesof the fonts may be calculated automatically and at run-time instead of the userhaving to prepare the instances in advance. This option is true by default providedthat you are using a TEX engine with this capability and the output mode is PDF;


OPTIONS: Tracking 8otherwise, it will be disabled. If auto is set to false, the fonts for all expansionsteps must exist (with files called 〈font name〉±〈expansion value〉, e.g., cmr12+10, asdescribed in the pdfTEX manual).Automatic font expansion does not work with bitmap fonts. <strong>The</strong>refore, if youare using the Computer Modern Roman fonts in T1 encoding, you should eitherinstall the cm-super fonts or use the Latin Modern fonts (<strong>package</strong> lmodern).stretchshrinkstepselected〈integer〉 20You may specify the stretchability and shrinkability of a font, i.e., the maximumamount that a font may be stretched or shrunk. <strong>The</strong> numbers will be divided by1000, so that a stretch limit of 10 means that the font may be expanded by upto 1%. <strong>The</strong> default stretch limit is 20. <strong>The</strong> shrink limit will by default be the sameas the stretch limit.〈integer〉 * 1Fonts are not expanded by arbitrary amounts but only by certain discrete stepswithin the expansion limits. With recent versions of pdfTEX (1.40 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 output. 2 OlderpdfTEX versions, however, had to include every font instance in the PDF file, whichmay increase the file size quite dramatically. <strong>The</strong>refore, in case you are using apre-1.40 pdfTEX version, step is by default set to one fifth of the smaller value ofstretch and shrink.true, falsefalseWhen applying font expansion, it is possible to restrict the expansion of somecharacters that are more sensitive to deformation than others (e.g., the ‘O’, incontrast to the ‘I’). 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. <strong>The</strong>refore,this option is by default set to false, so that all characters will be expanded by thesame amount. See section 5.2 for a more detailed discussion.3.4 Tracking pdfTEX 1.40 | LuaTEX 0.62letterspace〈integer〉 100This option changes the default amount for tracking (see section 5.3) resp. letterspacing(see section 7). <strong>The</strong> amount is specified in thousandths of 1em; admissiblevalues are in the range of −1000 to +1000.3.5 Miscellaneous optionsDVIoutputtrue, false* falsepdfTEX and LuaTEX are not only able to generate PDF output but can also spit outDVI files. 3 <strong>The</strong> latter can be ordered with the option DVIoutput, which will set\pdfoutput to zero. For TEX, this option is not applicable.EX2 <strong>The</strong> downside with this default is that pdfTEX may run out of memory with huge documents; in thiscase, read about the error messages in the ‘Hints and caveats’ section (9), or try with a larger step.3 Recent TEX systems are using pdfTEX as the default engine even for DVI output.


OPTIONS: Changing options later 9Note that this will confuse <strong>package</strong>s that depend on the value of \pdfoutputif they were loaded earlier, as they had been made believe that they were calledto generate PDF output where they actually weren’t. <strong>The</strong>se <strong>package</strong>s are, amongothers: graphics, color, hyperref, pstricks and, obviously, ifpdf. Either loadthese <strong>package</strong>s after <strong>microtype</strong> or else issue the command \pdfoutput=0 earlier –in the latter case, the DVIoutput option is redundant.When generating DVI files, font expansion has to be enabled explicitly. Neitherletterspacing nor automatic font expansion will work because the postprocessingdrivers (dvips, dvipdfm, etc.) resp. the DVI viewer are not able to generate thefonts on the fly.draftfinalverbosebabelconfigtrue, falsefalseIf the draft option is passed to the <strong>package</strong>, all micro-typographic extensions willbe disabled, which may lead to different line, and hence page, breaks. <strong>The</strong> draftand final options may also be inherited from the class options; of course, you canoverride them in the <strong>package</strong> options. E.g., if you are using the class option draftto show any overfull boxes, you should load <strong>microtype</strong> with the final option.true, false, errors, silentfalseInformation on the settings used for each font will be written into the log file ifyou enable the verbose option. When <strong>microtype</strong> encounters a problem that is notfatal (e.g., an unknown character in the settings, or non-existent settings), it willby default only issue a warning and try to continue. Loading the <strong>package</strong> 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 <strong>microtype</strong> with verbose=silent.true, falsefalseLoading the <strong>package</strong> with the babel option will adjust the typesetting according tothe respective selected language. Read section 6 for further information.〈file name〉<strong>microtype</strong>Various settings for this <strong>package</strong> will be loaded from a main configuration file, bydefault <strong>microtype</strong>.cfg (see section 5.7). You can have a different configuration fileloaded instead by specifying its name without the extension, e.g., config=mycrotype.3.6 Changing options later\<strong>microtype</strong>setup{〈key = value list〉}Inside the preamble, this command accepts all <strong>package</strong> 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 3.1: 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:\<strong>microtype</strong>setup{expansion=false}


SELECTING FONTS FOR MICRO-TYPOGRAPHY 104 Selecting fonts for micro-typographyBy default, character protrusion will be applied to all text fonts used in the document,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 ‘font sets’; these font sets are specifiedvia font attributes that have to match.\DeclareMicrotypeSet\DeclareMicrotypeSet*[〈features〉] {〈set name〉} {〈set of fonts〉}This command declares a new set of fonts to which the micro-typographic extensionsshould be applied. <strong>The</strong> optional argument may contain a comma-separatedlist of features to which this set should be restricted. <strong>The</strong> starred version of thecommand declares and activates the font set at the same time.<strong>The</strong> set of fonts is specified by assigning values to the NFSS font attributes: encoding,family, series, shape and size (cf. L A TEX 2ɛ font selection). Let’s start with anexample. This <strong>package</strong> defines a font set called ‘basictext’ in the main configurationfile as follows:\DeclareMicrotypeSet{basictext}{ encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,EU1,EU2},family = {rm*,sf*},series = {md*},size = {normalsize,footnotesize,small,large}}If you now call\UseMicrotypeSet[protrusion]{basictext}in the document’s preamble, only fonts in the text encodings, roman or sansserif families, normal (or ‘medium’) series, and in sizes called by \normalsize,\footnotesize, \small or \large, will be protruded. Math fonts, on the other hand,will not, since they are in another encoding. Neither will fonts in bold face, or hugefonts. Etc.If an attribute list is empty or missing – like the ‘shape’ attribute in the aboveexample – it does not constitute a restriction. In other words, this is equivalentto specifying all possible values for that attribute. <strong>The</strong>refore, the predefined set‘alltext’, which is declared as:\DeclareMicrotypeSet{alltext}{ encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2} }is far less restrictive. <strong>The</strong> only condition here is that the encoding must match.If a value is followed by an asterisk (like ‘rm*’ and ‘sf*’ in the first example),it does not designate an NFSS code, but will be translated into the document’s\〈value〉default, e.g., \rmdefault. 4 A single asterisk means \〈attribute〉default,e.g., \encodingdefault, respectively \normalsize for the size axis. Sizes may eitherbe specified as a dimension (‘10’ or ‘10pt’), or as a size selection command withoutthe backslash. You may also specify ranges (e.g., ‘small-Large’); while the lower4 <strong>The</strong>se 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 <strong>microtype</strong> after these changes.


SELECTING FONTS FOR MICRO-TYPOGRAPHY 11Table 2:Predefined font setsSet nameFont attributesEncoding Family Series Shape Sizeall ∅ ∅ ∅ ∅ ∅alltext(allmath)Text encodings, TS1(OML, OMS, U)∅ ∅ ∅ ∅basictext(basicmath)Text encodings(OML, OMS)\rm*,\sf*\md* ∅ \normalsize,\footnotesize,\small, \largesmallcaps Text encodings ∅ ∅ \sc* ∅footnotesize Text encodings, TS1 ∅ ∅ ∅ -\smallscriptsize Text encodings, TS1 ∅ ∅ ∅ -\footnotesizenormalfont \encoding* \family* \series* \shape* \normalsize‘Text encodings’ = OT1, T1, T2A, LY1, OT4, QX, T5, EU1, EU2‘\ . . . *’ = ‘\ . . . default’boundary is included in the range, the upper boundary is not. Thus, ‘12-16’ wouldmatch 12 pt, 13.5 pt and 15.999 pt, for example, but not 16 pt. You are allowed toomit the lower or upper bound (‘-10’, ‘large-’).Additionally to this declaration scheme, you can add single fonts to a set usingthe ‘font’ key, which expects the concatenation of all font attributes, separatedby forward slashes, i.e., ‘font = 〈encoding〉/〈family〉/〈series〉/〈shape〉/〈size〉’. Thisallows you to add fonts to the set that are otherwise disjunct from it. For instance,if you wanted to have the roman family in all sizes protruded, but only the normalsized, possibly italic, typewriter font (in contrast to, say, the small one), this is howyou could declare the set:\DeclareMicrotypeSet[protrusion]{ myset }{ encoding = T1,family = rm*,font = {T1/tt*/m/n/*,T1/tt*/m/it/*} }As you can tell from the example, the asterisk notation is also permitted for thefont key. A single asterisk is equivalent to ‘*/*/*/*/*’, i.e., the normal font. Sizeselection commands are possible, too, however, ranges are not allowed.Table 2 lists the nine predefined font sets. <strong>The</strong>y may also be activated by passingtheir name to the feature options protrusion, expansion, tracking, kerning andspacing when loading the <strong>package</strong>, for example:\use<strong>package</strong>[protrusion=allmath,tracking=smallcaps]{<strong>microtype</strong>}\UseMicrotypeSet[〈features〉] {〈set name〉}This command activates a font set previously declared by \DeclareMicrotypeSet.Using the optional argument, you can limit the application of the set to one or


MICRO FINE TUNING 12more features. This command only has an effect if the feature was activated in the<strong>package</strong> options.\DeclareMicrotypeSetDefault[〈features〉] {〈set name〉}If a feature is enabled but no font set has been chosen explicitly, the sets declaredby this command will be activated. By default, the ‘alltext’ font set will be used forcharacter protrusion and additional kerning, the ‘basictext’ set for font expansionand interword spacing, and the ‘smallcaps’ set for tracking.<strong>The</strong>se commands may only be used in the preamble or in the main configuration file.<strong>The</strong>ir 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 characters.Furthermore, since every font looks different, settings have to be specific to afont or set of fonts. This <strong>package</strong> 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;the third argument contains the actual settings.<strong>The</strong> set of fonts to which the settings should apply is declared using the samesyntax of 〈font axis〉 = 〈value list〉 pairs as for the command \DeclareMicrotypeSet(see section 4). Values with an asterisk will be translated immediately insteadof at the end of the preamble. To find the matching settings for a given font the<strong>package</strong> will try all combinations of font encoding, family, series, shape and size,with decreasing significance in this order. For instance, if both settings for thecurrent family (say, T1/cmr///) and settings for italic fonts in the normal weight(T1//m/it/) exist, those for the cmr family would apply. <strong>The</strong> encoding must alwaysmatch.5.1 Character protrusion pdfTEX 0.14f | LuaTEX 0.30 |TEX 0.9997EX\SetProtrusion[〈options〉] {〈set of fonts〉} {〈protrusion settings〉}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 = {50,50},\textquoteleft = {700, } }which would result in the character ‘A’ being protruded by 5% of its width onboth sides, and the left quote character by 70% of its width into the left margin.This would apply to all font shapes, series and sizes of the T1 encoded ComputerModern Roman family.


MICRO FINE TUNING: Character protrusion 13<strong>The</strong> protrusion settings consist of 〈character〉 = 〈protrusion factors〉 pairs.<strong>The</strong> characters may be specified either as a single character (A), as a textsymbol command (\textquoteleft), or as a slot number (resp. Unicode numberfor LuaTEX or TEX): three or more digits for decimal notation, prefixed with " forhexadecimal, with ’ for octal (e.g., the ‘fl’ ligature in T1 encoding: 029, "1D, ’35).8-bit (and even UTF-8) characters may be entered directly or in L A TEX’s traditional7-bit notation: both \"A and Ä are valid, provided the character is actually declaredin both the input and the font encoding. With LuaTEX or TEX, you may additionallyspecify a (font-specific) glyph name, prefixed with ‘/’ (e.g., the ‘fl’ ligature as /f _ l).Note that you also have the possibility to declare lists of characters that shouldinherit settings (see section 5.6).<strong>The</strong> protrusion factors designate the amount that a character should be protrudedinto the left margin (first value) respectively into the right margin (secondvalue). By default, the values are relative to the character widths, so that a value of1000 means that the character should be shifted fully into the margin, while, forexample, with a value of 50 it would be protruded by 5% of its width. Negativevalues are admitted, as well as numbers larger than 1000 (but effectively not morethan 1em of the font). You can omit either number if the character should not beprotruded on that side, but must not drop the separating comma.Options:EXname 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 previously assigned a name to it)before the current list will be loaded, so that the fonts will inherit the values fromthe loaded list.Thus, the configuration may be simplified considerably. You can for instance createa 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 takeprecedence). Font settings will be loaded recursively. <strong>The</strong> following options willaffect all loaded lists, in other words, any options from the loaded lists will beignored:factor This option can be used to influence all protrusion factors of the list,overriding any global factor setting (see section 3.2). 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- }{ }unit By default, the protrusion factors are relative to the respective character’swidth. <strong>The</strong> unit option may be used to override this and make <strong>microtype</strong> regardall values in the list as thousandths of the specified width. Issuing, for instance,‘unit=1em’ would have the effect that a value of, say, 50 now results in the characterEX


MICRO FINE TUNING: Font expansion 14being protruded by 5% of an em of the font (thus simulating the internal measuringof pdfTEX’s \lpcode and \rpcode primitives). <strong>The</strong> default behaviour can be restoredwith unit=character. 5preset Presets the protrusion codes of all characters to the specified values(={〈left〉,〈right〉}), 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 document’s input encoding is. You may specify any encoding that can beloaded via the inputenc <strong>package</strong>, e.g., ansinew, koi8-r, utf8.context <strong>The</strong> scope of the list may be limited to a certain context. For furtherdetails, see section 6.5.2 Font expansion pdfTEX 0.14f | LuaTEX 0.30\SetExpansion[〈options〉] {〈set of fonts〉} {〈expansion settings〉}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 <strong>package</strong> has been loadedwith the selected option (cf. section 3.3). Otherwise, the expansion settings willbe ignored – 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 don’texist, 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 that allcharacters of a particular font (set) should be expanded or shrunk by the sameamount, you would have to declare an empty list for these fonts.<strong>The</strong> expansion settings consist of 〈character〉 = 〈expansion factor〉 pairs. You mayspecify one number for each character, which determines the amount that a charactermay be expanded. <strong>The</strong> numbers denominate thousandths of the full expansion.For example, if you set the expansion factor for the character ‘O’ 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 –that is, if you didn’t specify any characters, none would be protruded – 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 presetall expansion factors, to set the input encoding, or to determine the context of thelist (expansion contexts are only possible with pdfTEX version 1.40.4 or newer).auto, stretch, shrink, step <strong>The</strong>se keys can be used to override the global settingsfrom the <strong>package</strong> options (see section 3.3). If you don’t specify either one of5 <strong>The</strong> unit option can even be passed globally to the <strong>package</strong> (cf. section 3.2). However, all providedsettings are created under the assumption that the values are relative to the character width. <strong>The</strong>refore,you should only change it if you are certain that the default settings will not be used in your document.


MICRO FINE TUNING: Tracking 15stretch, 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 easily be avoided by shrinking the font a little bit more. In conjunction withthe context option (see section 6 for further details), you could thus allow formore expansion in this particular paragraph:\SetExpansion[ context = sloppy,stretch = 30,shrink = 60,step = 5 ]{ encoding = {OT1,T1,TS1} }{ }% ... END PREAMBLE{\<strong>microtype</strong>context{expansion=sloppy}%This paragraph contains an `unnecessary' widow.}This method of employing contexts to temporarily apply different expansion parametersonly works with pdfTEX version 1.40.4 or later (for older versions, a dirtytrick is laid out in section 14.2 on page 56). Also note that pdfTEX prohibits theuse of fonts with different expansion limits or steps (even of different fonts) withinone paragraph, hence the sloppy context has 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. <strong>The</strong> factor optioninfluences the expansion factors of all characters (in contrast to the overall stretchability)of the font. For instance, if you want the italic shape to be expanded less,you could declare:\SetExpansion[ factor = 500 ]{ encoding = * ,shape = it }{ }<strong>The</strong> factor option can only be used to decrease the stretchability of the characters,that 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 <strong>package</strong> options wouldn’t makemuch sense – to this end, you use the <strong>package</strong>’s stretch and shrink options.5.3 Tracking pdfTEX 1.40 | LuaTEX 0.62\SetTracking[〈options〉] {〈set of fonts〉} {〈tracking amount〉}An important typographic technique – which was missing in TEX for a long time – isthe adjustment of tracking, i.e., the uniform addition or subtraction of letter spaceto/from 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 type. 6 <strong>The</strong> \SetTracking command allows specifying6 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 16the tracking amount for different fonts or font sets. It will also be evaluated by the\textls command, which may be used for letterspacing shorter pieces of text (seesection 7).<strong>The</strong> tracking amount is specified in thousandths of 1em (or the given unit);negative values are allowed, too.Options:name, unit, context <strong>The</strong>se options serve the same functions as in the previousconfiguration commands. <strong>The</strong> 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 space,stretch 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 = {25*,166, } ]{ encoding = * , shape = sc }{ 25 }the interword space will be increased by 2.5%, the stretch amount will be set to0.166em, while the shrink amount will be left untouched. If you don’t 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 letterspacedtext, it will by default be equal to that within the text. With this option,which accepts the same values as spacing, it may be adjusted independently.outer kerning If, on the other hand, no interword space precedes of follows, youmay still want to slightly set off the first and last letter from adjoining letters. Thisoption expects the kerning amounts for left and right hand side, separated by acomma, 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 ‘500*’; this is also the default, i.e., the sum of the outer kerns is bydefault equal to the current letterspace amount. To remove kerning on both sides,you would write ‘outer kerning={0,0}’.no ligatures As far as pdfTEX is concerned, ligatures in letterspaced fonts wouldbe constructed as usual, which may be advisable when changing the trackingby only a small amount. For larger letterspacing amounts, on the other hand,the normal letter space within ligatures would have displeasing e ff e c t s. Thiskey expects a comma-separated list of characters for which ligatures should bedisabled; only the character that begins a ligature must be specified. If the keyis given without a value, all ligatures of the font will be disabled. This is notrecommended, however, since it also entails that kerning will be switched off. 7<strong>The</strong> default settings disable ligatures for the character ‘f’ only, i.e., ‘ff’, ‘fi’, ffi’,etc. 8 In exceptional situations, you can manually break up a ligature by inserting‘{\kern0pt}’ resp. babel’s "| shortcut, or protect it by enclosing it in \lslig (seesection 7).7 <strong>The</strong> inseparable connexion of ligatures and kerns is a limitation of TEX that will not be lifted before theadvent of LuaTEX.8 With pdfTEX versions older than 1.40.4, all ligatures, and hence all kerning, will be disabled. It istherefore recommended to use at least version 1.40.4.


MICRO FINE TUNING: Tracking 17Since a picture is worth a thousand words, probably even more if, in our case, itdepicts a couple of letterspaced words, let’s bring one to sum up these somewhatconfusing options. Suppose you had the following settings (which I would in noway recommend; they are only for illustrative purposes):\SetTracking[ no ligatures = {f},spacing = {600*,-100*, },outer spacing = {450,250,150},outer kerning = {*,*} ]{ encoding = * }{ 160 }and then write:Stop \textls{stealing sheep}!Click If youonhad theaimage PDF viewer to showthatthekerns understands spacings PDF 1.5, involved. youClick couldon hide emphasised the arrows words selectively.text below to reveal theinStoptherelation of image and code.this would be the (typographically dubious) outcome:st e a l i n g s h e e p!While the word ‘Stop’ is not letterspaced, the space between the letters in the othertwo words is expanded by the tracking amount of 160/1000em = 0.16em. <strong>The</strong>inner space within the letterspaced text is increased by 60%, while its stretch amountis decreased by 10% and the shrink amount is left untouched. <strong>The</strong> outer space (of0.45em) immediately before the piece of text may stretch by 0.25em and shrinkby 0.15em. Note that there is no outer space after the text, since the exclamationmark immediately follows; instead, the default outer kern of half the letterspaceamount (0.08em) is added. Furthermore, one ligature wasn’t broken up, becausewe neglected to specify the ‘s’ in the no ligatures key.As another, more realistic example, suppose you want to space out all small capitalsby 50/1000em, fonts smaller than \small by 0.02em, and to decrease the trackingof large type by 0.02em. You can achieve this with the following settings:\use<strong>package</strong>[tracking=true]{<strong>microtype</strong>}\DeclareMicrotypeSet*[tracking]{my}{ encoding = * ,size = {-small,Large-},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 don’t exist will be spaced out by the default of0.1em (adjustable with the <strong>package</strong> option letterspace, see section 3.5). Supposeyour editor wants you to shorten your 1000-pages chef-d’œuvre by a handful ofpages, you could load <strong>microtype</strong> with (fingers crossed):\use<strong>package</strong>[tracking=alltext,letterspace=-40]{<strong>microtype</strong>}


MICRO FINE TUNING: Additional kerning 185.4 Additional kerning pdfTEX 1.40\SetExtraKerning[〈options〉] {〈set of fonts〉} {〈kerning settings〉}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 tracking,which specifies the space between all characters of a font, the extra kerning relatesto single characters, that is, whenever a particular character appears in the text,the specified kerning will be inserted, regardless of which character precedes resp.follows it.I should not neglect to mention a limitation of this additional kerning: wordsimmediately following such a kern (not separated by a space) will not be hyphenated,unless you insert the breakpoints manually, e.g., for kerning after the apostrophe,‘l’apos\-trophe’. This restriction of pdfTEX will hopefully be lifted soon.<strong>The</strong> kerning settings are specified as pairs of 〈character〉 = 〈kerning values〉, 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 <strong>The</strong>se options serve the same function asin the previous configuration commands.unit Admissible values are: space, character and a 〈dimension〉. 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 = {OT1,T1,LY1} }{: = {1000,}, % = \fontdimen2; = {500, }, % ~ \thinspace! = {500, },? = {500, }}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 andsemicolon ; a normal space in front of the colon. Read section 6 to learn how toactivate these settings ! This paragraph was input like this :\begin{<strong>microtype</strong>context}{kerning=french}What is the result of these settings? If they are active, like in thecurrent paragraph, a thin space will be inserted in front of eachquestion mark, exclamation mark and semicolon; a normal space in frontof the colon. Read section~\ref{sec:context} to learn how to activate


MICRO FINE TUNING: Interword spacing 19these settings! This paragraph was input like this:\end{<strong>microtype</strong>context}5.5 Interword spacing pdfTEX 1.40\SetExtraSpacing[〈options〉] {〈set of fonts〉} {〈spacing settings〉}This command allows you to fine tune the interword spacing (also known as glue).A preliminary remark on what a ‘space’ is may be in order: between two words,TEX will insert a so called glue, which is characterised by three parameters – thenormal distance between two words, the maximum amount of space that may beadded to it, and the maximum amount that may be subtracted. <strong>The</strong> 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. <strong>The</strong>sethree parameters are specific to each font.On top of these glue dimensions, TEX has the concept of ‘space factors’. <strong>The</strong>ymay be used to increase the space after certain characters, most prominently thepunctuation characters. pdfTEX’s 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 – the kerning, the maximum amount that the space may be stretched andthe maximum amount that it may be shrunk – 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.<strong>The</strong> spacing settings are declared as pairs of 〈character〉 = 〈spacing factors〉, 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 negative,in which case the dimensions will be decreased. Not all values have to be specified,however, the settings must contain the two separating commas.Options:name, load, factor, preset, inputenc, context <strong>The</strong>se options serve the same functionas in the previous configuration commands.unit You can specify the unit by which the specified numbers are measured.Possible values are: character, a 〈dimension〉 and, additionally, space. <strong>The</strong> 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 example,with these (nonsensical) settings:\SetExtraSpacing[ unit = space ] % default{ font = * /*/*/*/* }{. = {1000,1000,1000},}


MICRO FINE TUNING: Character inheritance 20the space inserted after a full stop would be doubled (technically speaking: 2 ×\fontdimen 2), as would the maximum stretch and shrink amounts of the interwordspace (\fontdimen 3 and 4). Conversely, setting all three values to −1000 wouldcompletely cancel a space after the respective character.5.6 Character inheritance\DeclareCharacterInheritance[〈features〉] {〈set of fonts〉} {〈inheritance lists〉}In most cases, accented characters should inherit the settings from the respectivebase character. For example, all of the characters À, Á, Â, Ã, Ä, Å and Ă 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 features,you can confine the scope of the list. Additionally, it accepts the inputenc key toset the input encoding for this list. <strong>The</strong> font set can be declared in the usual way.<strong>The</strong> inheritance lists are declared as pairs of 〈base character〉 = 〈list of inheritingcharacters〉. Unless you are using a different encoding or a very peculiarly shapedfont, there should be no need to change the default character inheritance settings.<strong>The</strong> situation is different with LuaTEX and TEX, however: the default inheritancesettings 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 font’s configuration file (see next section).EX5.7 Configuration files<strong>The</strong> 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 <strong>microtype</strong>.cfg. You may extend this file with custom settings(or load a different configuration file with the ‘config’ option, see section 3.5).If you embark on creating new settings for a font family, you should put theminto a separate file, whose name must be: ‘mt-〈font family〉.cfg’ (e.g., ‘mt-cmr.cfg’;any spaces in the font name should be removed, e.g., ‘mt-MinionPro.cfg’), andmay contain all commands described in the current section 5. <strong>The</strong>se files will beloaded automatically if you are actually using the respective fonts. This <strong>package</strong>ships with configuration files for a number of font families. Table 3 lists them all.\DeclareMicrotypeVariants\DeclareMicrotypeVariants*{〈list of suffixes〉}On its search for a configuration file, the <strong>package</strong> will also try to remove from thefont name a suffix of one or more letters that denotes a ‘variant’ of the base font (cf.Karl Berry’s Fontname). It is thus possible to put settings for, e.g., the fonts padx(expert set), padj (oldstyle numerals) and pad (plain) into one and the same filemt-pad.cfg. This command expects a comma-separated list of variant suffixes. <strong>The</strong>starred version appends the suffix(es) to the existing list. <strong>The</strong> default declarationin <strong>microtype</strong>.cfg is:\DeclareMicrotypeVariants{x,j,w,a,d,0,1}


MICRO FINE TUNING: Configuration files 21Table 3:Font family (NFSS code)FeaturesFonts with tailored protrusionsettingsEncodingsShapesGeneric OT1, T1, T2A, LY1, QX, (TS1) a n, (it, sl, sc) aComputer Modern Roman (cmr) b OT1, OT4, T1, T2A, T5, LY1, TS1 n, it, sl, scBitstream Charter (bch) c OT1, T1, T5, LY1, TS1 n, it, (sl) d , scAdobe Garamond (pad, padx, padj) OT1, T1, LY1, TS1 n, it, (sl) d , scURW Garamond (ugm) e OT1, T1, TS1 n, itBitstream Letter Gothic (blg) f OT1, T1, TS1 n, itAdobe Minion (pmnx, pmnj) OT1, T1, T2A, LY1, TS1 n, it, (sl) d , sc, siPalatino (ppl, pplx, pplj) g OT1, OT4, T1, LY1, (TS1) a n, it, (sl) d , scTimes (ptm, ptmx, ptmj) h OT1, OT4, T1, LY1, QX, (TS1) a n, it, (sl) d , scLatin Modern Roman EU1, EU2 [Latin, Greek] n, it, (sl) dCharis SIL EU1, EU2 [Latin, Cyrillic, Greek] n, it, scPalatino Linotype i EU1, EU2 [Latin] n, it, scComputer Modern math (cmsy, cmm) j OML/OMS n/itAMS symbols (msa, msb) U nEuler (eur, eus, euf) k U nEuro symbols (Adobe, ITC, marvosym) U/OT1 n, itabcdefghijkIncompleteAliases: Latin Modern (lmr), ae (aer), zefonts (zer), eco (cmor), hfoldsty (hfor)Aliases: mathdesign/Charter (mdbch), MicroPress’s chmath (chr)Settings inherited from italic shapeAliases: mathdesign/URW Garamond (mdugm), garamondx (zgmx, zgmj)Alias: ulgothic (ulg)Aliases: pxfonts (pxr), qfonts/QuasiPalatino, TEX Gyre Pagella (qpl), FPL Neu (fp9x, fp9j)Aliases: txfonts (txr), qfonts/QuasiTimes, TEX Gyre Termes (qtm)Alias: TEX Gyre Pagella, Palatino LT Std, PalatinoAliases: Latin Modern (lmsy, lmm)Alias: eulervm (zeur, zeus)\DeclareMicrotypeAlias{〈font name〉} {〈alias font〉}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 – you could say:\DeclareMicrotypeAlias{lmr}{cmr}which would make the <strong>package</strong>, 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.\LoadMicrotypeFile{〈font name〉}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 late. 9 This command will load the file ‘mt-〈font name〉.cfg’.9 Font <strong>package</strong> authors might also want to have a look at the hook \Microtype@Hook, described in theimplementation part, section 14.4.4.


CONTEXT-SENSITIVE SETUP 226 Context-sensitive setup<strong>The</strong> <strong>microtype</strong> <strong>package</strong> 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 document’s appearance. 10\<strong>microtype</strong>context\begin{<strong>microtype</strong>context}\end{<strong>microtype</strong>context}\text<strong>microtype</strong>context{〈context assignments〉}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, tracking, spacing and kerning), one context may beassigned. Consequently, only settings with the corresponding ‘context’ keywordwill be applied.{〈context assignments〉}Like many L A TEX commands, it is also available in the form of an environment.{〈context assignments〉} {〈general text〉}As another possibility, the command \text<strong>microtype</strong>context 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, e.g., article, it would be:\newcommand*\new@makefnmark{\hbox{\@textsuperscript{\normalfont\<strong>microtype</strong>context{protrusion=footnote}\@thefnmark}}}\renewcommand*\@footnotemark{%\leavevmode \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi\new@makefnmark \ifhmode\spacefactor\@x@sf\fi \relax}For the memoir class, you would additionally have to disable auto-detection ofmultiple footnotes, which prevents protrusion:\renewcommand*\@makefnmark{\hbox{\@textsuperscript{\normalfont\<strong>microtype</strong>context{protrusion=footnote}\@thefnmark}}}\let\m@mmf@prepare\relax\let\m@mmf@check\relaxAnother possibility would be to employ contexts for a language-dependent setup.For instance, if you are writing a text in French, you could add:\<strong>microtype</strong>context{kerning=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:10 With LuaTEX, you have to load the fonts with the fontspec option ‘Renderer=Basic’.


LETTERSPACING REVISITED 23\text<strong>microtype</strong>context{kerning=}{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 <strong>microtype</strong> with the babel option (see section 3.5). <strong>The</strong> current language willthen be automatically detected and the contexts set accordingly.\DeclareMicrotypeBabelHook{〈list of babel languages〉} {〈context list〉}Naturally, <strong>microtype</strong> 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. <strong>The</strong> main configuration file contains among othersthe following declaration:\DeclareMicrotypeBabelHook{french,francais,acadian,canadien}{kerning=french, spacing=}Consequently, whenever you switch to the French language, the kerning contextwill be changed to ‘french’ and the spacing context will be reset. This hook onlyhas an effect if the <strong>package</strong> was loaded with the babel option. Currently, <strong>microtype</strong>supports French and Turkish kerning and English spacing (aka. \nonfrenchspacing).For unknown languages, all contexts will be reset.7 Letterspacing revisited pdfTEX 1.40 | LuaTEX 0.62\textls\lsstyle\textls*\lslig[〈amount〉] {〈general text〉}While the tracking feature, described in section 5.3, will apply to sets of fonts,you may also want to letterspace shorter pieces of text, regardless of the font inwhich they are typeset. 11 For such ad-hoc letterspacing, <strong>microtype</strong> introduces twocommands that can be used (independently of whether the tracking option isenabled) in the same way as L A TEX’s text commands: \textls – which also worksin math mode – expects the text in the mandatory argument, while \lsstyle willswitch on letterspacing for all subsequent fonts until the end of the current group.<strong>The</strong> starred version of \textls does not add any extra kerning before or afterthe text, which may be useful, e.g., for section titles. By default, each characterwill be spaced out by 100/1000em = 0.1em; this amount may be altered in theoptional argument to \textls, using the \SetTracking command, or globally withthe letterspace <strong>package</strong> option, with decreasing significance in this order.{〈ligature〉}Since the commands \textls and \lsstyle will also evaluate the ‘no ligatures’key 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 inhibited,while others should not. When letterspacing text typeset in Fraktur fonts, for11 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 24example, the ligatures ‘ch’, ‘ck’, ‘tz’ and ‘sz’ (‘ß’) should never be broken up; youalso usually see the ‘st’ (‘‰’) ligature in letterspaced text. Furthermore, at least theyfonts <strong>package</strong> realises the short s (‘s’) as the ligature ‘s:’. On the other hand,the ‘ct’ ligature and the other ‘long s’ ligatures often found in Fraktur fonts shouldbe suppressed. <strong>The</strong>re are two ways to solve this problem: either don’t disable the‘s’ and/or ‘c’ ligatures and break those that need to be broken up by inserting‘{\kern0pt}’ or babel’s "| 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, ‘Aussi¡tslosigkeit’, ligatures shownin red, inhibited ligatures in green).\SetTracking[no ligatures={f}]{encoding = LY, family = yfrak}{100}\textfrak{\lsstyle Aus:s{\kern0pt}ichts:los{\kern0pt}igkeit}\SetTracking[no ligatures={f,s,c}]{encoding = LY, family = yfrak}{100}\textfrak{\lsstyle Au\lslig{s:}si\lslig{ch}t\lslig{s:}losigkeit}letterspace.sty<strong>The</strong>se three commands (plus the letterspace option, described in section 3.4) arealso available with the alternative letterspace <strong>package</strong>, which is in fact a muchstripped-down version of <strong>microtype</strong>, omitting support for all the other extensions(and also omitting the possibilities of the \SetTracking command – all ‘f’ ligatureswill be disabled, inner and outer spacing and outer kerning will be set to the defaultvalues described in section 5.3). If you prefer to forgo <strong>microtype</strong>’s specialties, youmay load the letterspace <strong>package</strong> instead. Both <strong>package</strong>s should not be used atthe same time.In contrast to <strong>microtype</strong>, which requires L A TEX, the letterspace <strong>package</strong> alsoworks with eplain or even only miniltx: for use with eplain, load the <strong>package</strong>with \use<strong>package</strong> inside the \begin<strong>package</strong>s . . . \end<strong>package</strong>s environment; withminiltx (which does not support <strong>package</strong> options) simply \input letterspace.sty.\DisableLigatures8 Disabling ligatures pdfTEX 1.30 | LuaTEX 0.30[〈characters〉] {〈set of fonts〉}While completely disabling all ligatures of a font (which will also switch off kerningfor this font), purposely lowers the micro-typographic quality instead of raisingit, it is especially useful for typewriter fonts, so that, e.g., in a T1 encoded font,‘\texttt{--}’ will indeed be printed as ‘--’, not as ‘-’. \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:\DisableLigatures{encoding = T1, family = tt* }It is also possible to disable selected ligatures only. <strong>The</strong> optional argument maycontain a comma-separated list of characters for which the ligature mechanismshould be inhibited:\DisableLigatures[?,!]{encoding = T1} % inhibit ?‘ and !‘, but not fi, –, », etc.Only the character that begins the ligature(s) should be specified. This commandmay only be used in the preamble, and only once. 1212 With LuaTEX, you have to load the fonts with the fontspec option ‘Renderer=Basic’.


HINTS AND CAVEATS 259 Hints and caveatsUse settings that match your font. Although the default settings should give reasonableresults for most fonts, the particular font you happen to be using may havedifferent character shapes that necessitate more or less protrusion. In particular,italic letter shapes may differ wildly in different fonts, hence I have decided againstproviding default protrusion settings for them. <strong>The</strong> file test-<strong>microtype</strong>.tex mightbe of some help when adjusting the protrusion settings for a font.Don’t 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%, i.e., 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%.Don’t use font expansion for web documents (with older pdfTEX versions). WithpdfTEX versions older than 1.40, each expanded instance of the font will be embeddedin the PDF file, hence the file size may increase by quite large a factor(depending on expansion limits and step). <strong>The</strong>refore, courtesy and thriftiness ofbandwidth command it not to enable font expansion when creating files to bedistributed electronically. With pdfTEX 1.40, which uses a different technique ofexpansion, the file size increase 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. <strong>The</strong> solution is totemporarily disable protrusion for the TOC:\<strong>microtype</strong>setup{protrusion=false}\tableofcontents\<strong>microtype</strong>setup{protrusion=true}You might want to disable protrusion in verbatim environments. As you know bynow, <strong>microtype</strong> will by default activate character protrusion for all fonts containedin the font set ‘alltext’. This also includes the typewriter font. Although it doesmake sense to protrude the typewriter font if it appears in running text (like,for example, in this manual), this is probably not desirable inside the verbatimenvironment. However, <strong>microtype</strong> has no knowledge about the context that a fontappears in but will solely decide by examining its attributes. <strong>The</strong>refore, you haveto take care of disabling protrusion in verbatim environments for yourself (thatis, if you don’t want to disable protrusion for the typewriter font altogether, bychoosing a different font set). While the \<strong>microtype</strong>setup command has of coursebeen designed for cases like this, you might find it tiresome to repeat it every timeif you are using the verbatim environment frequently. <strong>The</strong> following line, added tothe document’s preamble, would serve the same purpose:\g@addto@macro\@verbatim{\<strong>microtype</strong>setup{activate=false}}


HINTS AND CAVEATS 26If you are using the fancyvrb or the listings <strong>package</strong>, this is not necessary, sincetheir implementation of the corresponding environments will inhibit protrusionanyway.Settings for Greek/Thai/Armenian etc. encodings are not yet included. <strong>The</strong> defaultsets of fonts for which the micro-typographic features will be enabled (see table 2)only contain those encodings for which configurations exist. <strong>The</strong>refore, if you areusing any other encoding (e.g., LGR, T2B, etc.), <strong>microtype</strong> 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 5.1). It goes without sayingthat contributions for these encodings are more than welcome.Only employ kerning adjustment if it is customary in the language’s 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. <strong>The</strong> implementation of thisfeature in pdfTEX is not complete, and may not yield the positive effects on thetypographical quality you might expect – in certain situations, there may even beundesired side effects, in particular, when used together with the ragged2e <strong>package</strong>.<strong>The</strong>refore, 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 <strong>package</strong>s: <strong>The</strong> <strong>microtype</strong> <strong>package</strong> is supposedto work happily together with all other L A TEX <strong>package</strong>s (except for pdfcprot).However, life isn’t perfect, so problems are to be expected. Currently, I am aware ofthe following issues:• If you want to use 8-bit characters in the configuration, you have to load theinputenc <strong>package</strong> first. Unicode input is also supported (when loading inputencwith the utf8 or the utf8x option, or out of the box with TEX and LuaTEX). Whenusing multiple input encodings in a document, 8-bit characters in the settings willonly work reliably if you specify the inputenc key.• When loading the <strong>package</strong> with the babel option, you must load the babel <strong>package</strong>before <strong>microtype</strong>.• Before this <strong>package</strong> was fully compatible with LuaTEX, the following method ofenabling expansion and protrusion with the fontspec <strong>package</strong> was most oftenfound to be recommended:\newfontfeature{Microtype}{protrusion=default;expansion=default}\defaultfontfeatures{Microtype}This code should not be used with this <strong>package</strong>, as it will basically override all ofthe settings made by <strong>microtype</strong> – despite the naming, the above lines have nothingto do with this <strong>package</strong>. 1313 <strong>The</strong>y make use of features provided by luaotfload (via fontspec).EX


HINTS AND CAVEATS 27• With LuaTEX, load fontspec before <strong>microtype</strong>.• It is currently not possible to create character-specific settings for Chinese/Japanese/Korean fonts. <strong>The</strong>refore, the only micro-typographic extension that can be made towork with the CJK <strong>package</strong> is font expansion.Possible error messages and how to get rid of them:• ! Font csnameendcsname=cmr10+20 at 10.0pt 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, it requires that all instances of the expanded fonts exist on your TEX system.• ! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts.Automatic font expansion has been improved in pdfTEX 1.40, in that it now notonly works with Type 1 fonts but also with TrueType, OpenType and even nonembeddedfonts. <strong>The</strong> above error message indicates either that you are trying toapply expansion to a bitmap (pk) font, which is still not possible, or that the fontisn’t found at all, e.g., because of missing map entries.• Warning: pdflatex: font ptmr8r cannot be expanded (not an included Type1 font)and the PDF viewer complains about a missing font, e.g., Adobe Reader thusly:Could not find a font in the Resources dictionary - using Helvetica instead.With pdfTEX versions older than 1.40, font expansion can only be applied if thefont is actually embedded in the PDF file. If you get the above error message, yourTEX system is not set up to embed (or ‘download’) the base PostScript fonts (e.g.,Times, Helvetica, Courier). In most TEX distributions, this can be changed in thefile updmap.cfg by setting pdftexDownloadBase14 to true.• Warning: pdflatex (file ecrm1000+20): Font ecrm1000+20 at 1200 not foundFurthermore, pdfTEX versions older than 1.40 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 versions,this is only possible if you manually create expanded instances of the fonts.• ! Font T1/cmr/m/n/10=ecrm1000 at 10.0pt not loaded: Not enough room left.Memory parameter ‘font _ mem _ size’ too small.• ! TeX capacity exceeded, sorry [maximum internal font number (font _ max)=2000].Memory parameter ‘font _ max’ too small.• ! TeX capacity exceeded, sorry [PDF memory size (pdf _ mem _ size)=65536].Memory parameter ‘pdf _ mem _ size’ too small (pdfTEX versions older than 1.30).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, e.g.,TEX Live, change the settings in texmf.cnf, for MiKTEX, in the file miktex.ini (2.4or older) resp. pdflatex.ini (2.5 or newer).• pdfTeX warning (font expansion): font should be expanded before its first useThis warning will occur with pdfTEX versions older than 1.40.4, if tracking andexpansion is applied to a font. It is harmless and can be ignored.


ACKNOWLEDGMENTS 28<strong>The</strong> source code of this document is freely available. If you wonder how this documentwas created, just have a look at the source code in <strong>microtype</strong>.dtx, 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 5.3, see appendix A and B. If you want to re-typeset thedocumentation, read the comments at the end of <strong>microtype</strong>.dtx.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 <strong>package</strong> also includes a test file that can be used tocheck at least the protrusion settings (test-<strong>microtype</strong>.tex). 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: w.m.l@gmx.net.11 AcknowledgmentsThis <strong>package</strong> would be pointless if Hàn Thê´ Thành hadn’t 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 <strong>package</strong>, and not least for promoting it in Thành 2004, Thành 2008and elsewhere. I also thank him and the rest of the pdfTEX team, and more recentlyalso of the LuaTEX team, for refuting the idea that TEX is dead, and for fixing thebugs 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 make.Andreas Bühmann 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 suggestion,especially concerning the new extensions of interword spacing adjustmentand additional character kerning. Georg Duffner has patiently tested <strong>microtype</strong>under TEX and LuaTEX with his beautiful OpenType font EB Garamond 14 . 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 Élie Roux,who 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 <strong>package</strong> 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 ledmac/ledpar <strong>package</strong>s, so that critical editions can finally also benefit fromcharacter protrusion.EX14 Available from CTAN at /fonts/ebgaramond, including configuration files for <strong>microtype</strong>.


SHORT HISTORY 29Additionally, the following people have reported bugs, made suggestions orhelped otherwise (in chronological order): Tom Kink, Herb Schulz, Michael Hoppe,Gary L. Gray, Georg Verweyen, Christoph Bier, Peter Muthesius, Bernard Gaulle †,Adam Kucharczyk, Mark Rossi, Stephan Hennig, Michael Zedler, Herbert Voß, RalfStubner, Holger Uhr, Peter Dyballa, Morten Høgholm, Steven Bath, Daniel Flipo,Michalis Miatidis, Sven Naumann, Ross Hetherington, Geoff Vallis, Steven E. Harris,Karl Berry, Peter Meier, Nathan Rosenblum, Wolfram Schaalo, Vasile Gaburici,Sveinung Heggen, Colin Rourke, Maverick Woo, Silas S. Brown, Christian Stark,Marcin Borkowski, George Gratzer, Josep Maria Font, Juan Acevedo, Heiko Oberdiek,Till A. Heilmann, Rolf Dieterich, Seamus Bradley, Meho R, Steffen Hoffmann, ScottPakin, Loren B. Davis, Maïeul Rouquette, Jonas Hogstrom, Gabriel Kerneis, RazorXsr,Dave and Giuseppe Palma.12 ReferencesHàn Thê´ Thành, ‘Micro-typographic extensions to the TEX typesetting system’, Diss.Masaryk University Brno 2000, in: TUGBoat, vol. 21 (2000), no. 4, pp. 317–434.(Online at http://www.tug.org/TUGboat/Articles/tb21-4/tb69thanh.pdf)Hàn Thê´ Thành, ‘Micro-typographic extensions of pdfTEX in practice’, in: TUGBoat,vol. 25 (2004), no. 1: ‘Proceedings of the Practical TEX 2004 Conference’, pp. 35–38.(Online at http://www.tug.org/TUGboat/Articles/tb25-1/thanh.pdf)Hàn Thê´ Thành, ‘Font-specific issues in pdfTEX’, in: TUGBoat, vol. 29 (2008), no. 1:‘EuroBachoTEX 2007 Proceedings’, pp. 36–41. (Online at http://www.tug.org/TUGboat/Articles/tb29-1/tb91thanh-fonts.pdf)Hàn Thê´ Thành, Sebastian Rahtz, Hans Hagen, Hartmut Henkel, Paweł Jackowski,Martin Schröder, <strong>The</strong> pdfTEX user manual, 23 November 2010. (Available from CTANat /systems/pdftex/; latest version at http://sarovar.org/projects/pdftex/)Karl Berry, Fontname. Filenames for TEX fonts, July 2009. (Available from CTAN at/info/fontname/fontname.pdf)L A TEX3 Project Team, L A TEX 2ɛ font selection, 27 November 2005. (Available fromCTAN at /macros/latex/doc/fntguide.pdf)Carsten Schurig, Tobias Schlemmer, <strong>The</strong> pdfcprot.sty <strong>package</strong>, 10 June 2005.(Available from CTAN at /macros/latex/contrib/pdfcprot/)Melchior Franz, <strong>The</strong> soul <strong>package</strong>, 17 November 2003. (Available from CTANat /macros/latex/contrib/soul/). See also Heiko Oberdiek’s extension of this<strong>package</strong>, soulutf8, which adds Unicode support. (Available from CTAN at /macros/latex/contrib/oberdiek/)Will Robertson, Khaled Hosny, <strong>The</strong> fontspec <strong>package</strong>, 16 March 2013. (Availablefrom CTAN at /macros/latex/contrib/fontspec/)13 Short history<strong>The</strong> comprehensive list of changes can be found in appendix C. <strong>The</strong> 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.


SHORT HISTORY 302.5 (2013/03/13)• Support for the fontspec <strong>package</strong>, viz. for OpenType fonts with LuaTEX and• Support for protrusion with TEX ≥ 0.9997• Support for tracking/letterspacing with LuaTEX ≥ 0.62• Allow context-sensitive setup with LuaTEX• Info if protrusion settings are generic• Protrusion settings for Latin Modern Roman (OpenType)• Protrusion settings for Charis SIL (OpenType)• Protrusion settings for Palatino Linotype (OpenType)2.4 (2010/01/10)• Protrusion settings for T2A encoded Minion2.3e (2009/11/09)TEXEXEX• Support for the Cyrillic T2A encoding (protrusion, expansion, spacing)2.3d (2009/03/27)• New default for expansion option ‘step’: 1, if pdfTEX ≥ 1.40 [3.3]2.3c (2008/11/11)• Support for LuaTEX enabled by default2.3 (2007/12/23)• New key ‘outer kerning’ for \SetTracking to customise outer kerning [5.3]• Adjust protrusion settings for tracking even if protrusion is not enabled• New option ‘verbose=silent’ to turn all warnings into mere messages [3.5]• <strong>The</strong> letterspace <strong>package</strong> also works with eplain or miniltx [7]2.2 (2007/07/14)• Improvements to tracking/letterspacing: retain kerning (pdfTEX ≥ 1.40.4); automaticallyadjust protrusion settings• New key ‘no ligatures’ for \SetTracking to disable selected or all ligatures (pdfTEX≥ 1.40.4) [5.3]• New keys ‘spacing’ and ‘outer spacing’ for \SetTracking to customise interwordspacing [5.3]• Possibility to expand a font with different parameters (pdfTEX ≥ 1.40.4) [5.2]• New optional argument for \DisableLigatures to disable selected ligatures [8]• New command \DeclareMicrotypeVariants to specify variant suffixes [5.7]• New command \text<strong>microtype</strong>context as a wrapper for \<strong>microtype</strong>context [6]• Protrusion settings for Bitstream Letter Gothic2.1 (2007/01/21)• New command \lslig to protect ligatures in letterspaced text [7]2.0 (2007/01/14)• Support for the new extensions of pdfTEX ≥ 1.40: tracking/letterspacing, additionalkerning, and adjustment of interword spacing (glue) (new commands\SetTracking, \SetExtraKerning, \SetExtraSpacing; new options ‘tracking’,‘kerning’, ‘spacing’) [5.3, 5.4, 5.5]• New commands \textls and \lsstyle for letterspacing, new option ‘letterspace’[3.4, 7]


SHORT HISTORY 31• New option ‘babel’ for automatic micro-typographic adjustment to the selectedlanguage [3.5, 6]• New font sets: ‘smallcaps’, ‘footnotesize’, ‘scriptsize’ [4, table 2]• New <strong>package</strong> ‘letterspace’ providing the commands for robust and hyphenatableletterspacing [7]1.9e (2006/07/28)• New key ‘inputenc’ to specify the lists’ input encodings [5]• Protrusion settings for Euler math fonts1.9d (2006/05/05)• Support for the Central European QX encoding (protrusion, inheritance)• Protrusion settings for various Euro symbol fonts (Adobe, ITC, marvosym)• Support for Unicode input in the configuration (inputenc/utf8)1.9c (2006/02/02)• Protrusion settings for URW Garamond1.9a (2005/12/05)• Defer setup until the end of the preamble• Inside the preamble, \<strong>microtype</strong>setup accepts all <strong>package</strong> options [3.6]• Protrusion settings for T5 encoded Charter1.9 (2005/10/28)• New command \DisableLigatures to disable ligatures (pdfTEX ≥ 1.30) [8]• New command \<strong>microtype</strong>context to change the configuration context; new key‘context’ for the configuration commands [6]• New key ‘font’ to add single fonts to the font sets [4]• New key ‘preset’ to set all characters to the specified value before loading the lists• Value ‘relative’ renamed to ‘character’ for ‘unit’ keys• Support for the Polish OT4 encoding (protrusion, expansion, inheritance)• Support for the Vietnamese T5 encoding (protrusion, expansion, inheritance)1.8 (2005/06/23)• New command \DeclareMicrotypeSetDefault to declare the default font sets [4]• New option ‘config’ to load a different configuration file [3.5]• New option ‘unit’ to measure protrusion factors relative to a dimension instead ofthe character width [5.1]• Renamed commands from \..MicroType.. to \..Microtype..• Protrusion settings for AMS math fonts• Protrusion settings for Times in LY1 encoding completed• <strong>The</strong> ‘allmath’ font set also includes U encoding• Support for protrusion with the ledmac <strong>package</strong> (pdfTEX ≥ 1.30)1.7 (2005/03/23)• Possibility to specify ranges of font sizes in the set declarations [4, 5]• New command \LoadMicrotypeFile to load a configuration file manually [5.7]• Hook \Microtype@Hook for font <strong>package</strong> authors [14.4.4]• New option ‘verbose=errors’ to turn all warnings into errors• Warning when running in draft mode


SHORT HISTORY 321.6 (2005/01/24)• New option ‘factor’ to influence protrusion resp. expansion of all characters of afont or font set [3.2, 5]• When pdfTEX is too old to expand fonts automatically, expansion has to be enabledexplicitly, automatic expansion will be disabled [3.1]• Use e-TEX extensions, if available1.5 (2004/12/15)• When output mode is DVI, font expansion has to be enabled explicitly, automaticexpansion will be disabled [3.1]• New option ‘selected’ to enable selected expansion, default: false [3.3, 5.2]• New default for expansion option ‘step’: 4 (min(stretch,shrink)/5) [3.3]• Protrusion settings for Bitstream Charter1.4 (2004/11/12)• Set up fonts independently from L A TEX font loading• New option: ‘final’ [3.5]1.2 (2004/10/03)• New font sets: ‘allmath’ and ‘basicmath’ [4, table 2]• Protrusion settings for Computer Modern Roman math symbols• Protrusion settings for TS1 encoding completed for Computer Modern Roman andAdobe Garamond1.1 (2004/09/21)• Protrusion settings for Adobe Minion• New command: \DeclareCharacterInheritance [5.6]• Characters may also be specified as octal or hexadecimal numbers [5]1.0 (2004/09/11)• First CTAN release


IMPLEMENTATION 3314 Implementation<strong>The</strong> docstrip modules in this file are:driver: <strong>The</strong> documentation driver, only visible in the dtx file.<strong>package</strong>: <strong>The</strong> code for the <strong>microtype</strong> <strong>package</strong> (<strong>microtype</strong>.sty).pdftex-def: Definitions specific to pdfTEX (<strong>microtype</strong>-pdftex.def).xetex-def: Definitions specific toTEX (<strong>microtype</strong>-xetex.def).luatex-def: Definitions specific to LuaTEX (<strong>microtype</strong>-luatex.def).letterspace: <strong>The</strong> code for the letterspace <strong>package</strong> (letterspace.sty).plain: Code for eplain, miniltx (letterspace only).debug: Code for additional output in the log file.Used for – surprise! – debugging purposes.luafile: Lua functions (<strong>microtype</strong>.lua).config: Surrounds all configuration modules.cfg-t: Surrounds (Latin) text configurations.m-t: <strong>The</strong> main configuration file (<strong>microtype</strong>.cfg).bch: Settings for Bitstream Charter (mt-bch.cfg).blg: Settings for Bitstream Letter Gothic (mt-blg.cfg).cmr: Settings for Computer Modern Roman (mt-cmr.cfg).pad: Settings for Adobe Garamond (mt-pad.cfg).ppl: Settings for Palatino (mt-ppl.cfg).ptm: Settings for Times (mt-ptm.cfg).pmn: Settings for Adobe Minion (mt-pmn.cfg).Contributed by Harald Harders.ugm: Settings for URW Garamond (mt-ugm.cfg).cfg-u: Surrounds non-text configurations (U encoding).msa: Settings for AMS ‘a’ symbol font (mt-msa.cfg).msb: Settings for AMS ‘b’ symbol font (mt-msb.cfg).euf: Settings for Euler Fraktur font (mt-euf.cfg).eur: Settings for Euler Roman font (mt-eur.cfg).eus: Settings for Euler Script font (mt-eus.cfg).cfg-e: Surrounds Euro symbol configurations.zpeu: Settings for Adobe Euro symbol fonts (mt-zpeu.cfg).EXeuroitc: Settings for ITC Euro symbol fonts (mt-euroitc.cfg).mvs: Settings for marvosym Euro symbol (mt-mvs.cfg).test: A helper file that may be used to create and test protrusion settings(test-<strong>microtype</strong>.tex).And now for something completely different.1


IMPLEMENTATION: Preliminaries 3414.1 Preliminaries\MT@MT\MT@fix@catcode\MT@restore@catcodesThis is us.2 \def\MT@MT3 {<strong>microtype</strong>}4 {letterspace}We have to make sure that the category codes of some characters are correct (thegerman <strong>package</strong>, for instance, makes " active). Probably overly cautious. Ceterumcenseo: it should be forbidden for <strong>package</strong>s to change catcodes within the preamble.Polite as we are, we’ll restore them afterwards.5 \let\MT@restore@catcodes\@empty6 \def\MT@fix@catcode#1#2{%7 \edef\MT@restore@catcodes{%8 \MT@restore@catcodes9 \catcode#1 \the\catcode#1\relax10 }%11 \catcode#1 #2\relax12 }13 \MT@fix@catcode{17}{14}% ^^Q (comment)14 \MT@fix@catcode{24} {9}% ^^X (ignore)15 \MT@fix@catcode{33}{12}% !16 \MT@fix@catcode{34}{12}% "17 \MT@fix@catcode{36} {3}% $ (math shift)18 \MT@fix@catcode{39}{12}% ’19 \MT@fix@catcode{42}{12}% *20 \MT@fix@catcode{43}{12}% +21 \MT@fix@catcode{44}{12}% ,22 \MT@fix@catcode{45}{12}% -23 \MT@fix@catcode{58}{12}% :24 \MT@fix@catcode{60}{12}% 27 \MT@fix@catcode{63}{12}% ?28 \MT@fix@catcode{94} {7}% ^ (superscript)29 \MT@fix@catcode{96}{12}% `30 \MT@fix@catcode{124}{12}% |<strong>The</strong>se are all commands for the outside world. We define them here as blankcommands, so that they won’t generate an error if we are not running pdfTEX.31 32 \newcommand*\DeclareMicrotypeSet[3][]{}33 \newcommand*\UseMicrotypeSet[2][]{}34 \newcommand*\DeclareMicrotypeSetDefault[2][]{}35 \newcommand*\SetProtrusion[3][]{}36 \newcommand*\SetExpansion[3][]{}37 \newcommand*\SetTracking[3][]{}38 \newcommand*\SetExtraKerning[3][]{}39 \newcommand*\SetExtraSpacing[3][]{}40 \newcommand*\DisableLigatures[2][]{}41 \newcommand*\DeclareCharacterInheritance[3][]{}42 \newcommand*\DeclareMicrotypeVariants[1]{}43 \newcommand*\DeclareMicrotypeAlias[2]{}44 \newcommand*\LoadMicrotypeFile[1]{}45 \newcommand*\DeclareMicrotypeBabelHook[2]{}46 \newcommand*\<strong>microtype</strong>setup[1]{}47 \newcommand*\<strong>microtype</strong>context[1]{}48 \newcommand*\text<strong>microtype</strong>context[2]{#2}49 \@if<strong>package</strong>loaded{letterspace}{\let\MT@textls\relax}{%50 51 \newcommand*\lsstyle{}52 \newcommand\textls[2][]{}53 \def\textls#1#{}


IMPLEMENTATION: Preliminaries 35\MT@old@cmd\MT@warning\MT@warning@nl\MT@info\MT@info@nl\MT@vinfo\MT@error\MT@warn@err54 \newcommand*\lslig[1]{#1}55 56 }<strong>The</strong>se commands also have a starred version.57 \def\DeclareMicrotypeSet#1#{\@gobbletwo}58 \def\DeclareMicrotypeVariants#1#{\@gobble}Set declarations are only allowed in the preamble (resp. the main configurationfile). <strong>The</strong> 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 \@onlypreamble\DeclareMicrotypeSet60 \@onlypreamble\UseMicrotypeSet61 \@onlypreamble\DeclareMicrotypeSetDefault62 \@onlypreamble\DisableLigatures63 \@onlypreamble\DeclareMicrotypeVariants64 \@onlypreamble\DeclareMicrotypeBabelHookDon’t load letterspace.65 \expandafter\let\csname ver@letterspace.sty\endcsname\@empty<strong>The</strong> old command names had one more hunch.66 \def\MT@old@cmd#1#2{%67 \newcommand*#1{\MT@warning{%68 \string#1 is deprecated. Please use\MessageBreak69 \string#2 instead}%70 \let #1#2#2}}71 \MT@old@cmd\DeclareMicroTypeAlias\DeclareMicrotypeAlias72 \MT@old@cmd\DeclareMicroTypeSet \DeclareMicrotypeSet73 \MT@old@cmd\UseMicroTypeSet \UseMicrotypeSet74 \MT@old@cmd\LoadMicroTypeFile \LoadMicrotypeFile75 Communicate.76 \def\MT@warning{\PackageWarning\MT@MT}77 \def\MT@warning@nl#1{\MT@warning{#1\@gobble}}78 79 \def\MT@info{\PackageInfo\MT@MT}80 \def\MT@info@nl#1{\MT@info{#1\@gobble}}81 \let\MT@vinfo\@gobble82 \def\MT@error{\PackageError\MT@MT}83 \def\MT@warn@err#1{\MT@error{#1}{%84 This error message appears because you loaded the `\MT@MT’\MessageBreak85 <strong>package</strong> with the option `verbose=errors’. Consult the documentation\MessageBreak86 in \MT@MT.pdf to find out what went wrong.}}14.1.1 Debugging\tracing<strong>microtype</strong>\MT@dinfo\MT@dinfo@nlCases for \tracing<strong>microtype</strong>:0: almost none1: + sets & lists2: + heirs3: + slots4: + factors87 88 \MT@warning@nl{This is the debug version}89 \newcount\tracing<strong>microtype</strong>


IMPLEMENTATION: Preliminaries 3690 \tracing<strong>microtype</strong>=291 \def\MT@info#1{\PackageInfo\MT@MT{#1}\MT@addto@annot{#1}}92 \def\MT@info@nl#1{\PackageInfo\MT@MT{#1\@gobble}\MT@addto@annot{#1}}93 \let\MT@vinfo\MT@info@nl94 \def\MT@warning#1{\PackageWarning\MT@MT{#1}\MT@addto@annot{Warning: #1}}95 \def\MT@warning@nl#1{\PackageWarning\MT@MT{#1\@gobble}\MT@addto@annot{Warning: #1}}96 \def\MT@dinfo#1#2{\ifnum\tracing<strong>microtype</strong>


IMPLEMENTATION: Preliminaries 3714.1.2 Requirements\MT@plain\MT@requires@latex\MT@maybe@etex\MT@clear@options<strong>The</strong> letterspace <strong>package</strong> works with:0: miniltx1: eplain2: L A TEXFor plain usage, we have to copy some commands from latex.ltx.125 126 \def\MT@plain{2}127 \ifx\documentclass\@undefined128 \def\MT@plain{1}129 \def\hmode@bgroup{\leavevmode\bgroup}130 \def\nfss@text#1{{\mbox{#1}}}131 \let\@typeset@protect\relax132 \ifx\eplain\@undefined133 \def\MT@plain{0}134 \def\PackageWarning#1#2{%135 \begingroup136 \newlinechar=10 %137 \def\MessageBreak{^^J(#1)\@spaces\@spaces\@spaces\@spaces}%138 \immediate\write16{^^JPackage #1 Warning: #2\on@line.^^J}%139 \endgroup140 }141 \def\on@line{ on input line \the\inputlineno}142 \def\@spaces{\space\space\space\space}143 \fi144 \fiBetter use groups than plain ifs.145 \def\MT@requires@latex#1{%146 \ifnum\MT@plain


IMPLEMENTATION: Preliminaries 38\MT@engine\MT@engine@tooold\MT@pdftex@nouser. This has been fixed in TEX Live 2005.168 \ifx\normalpdftexversion\@undefined \else169 \let\pdftexversion \normalpdftexversion170 \let\pdftexrevision\normalpdftexrevision171 \let\pdfoutput \normalpdfoutput172 \fiOld <strong>package</strong>s might have let \pdftexversion to \relax.173 \let\MT@engine\relax174 \def\MT@engine@tooold{0}175 \ifx\pdftexversion\@undefined \else176 \ifx\pdftexversion\relax \else177 \def\MT@engine{pdf}178 \let\MT@pdf@or@lua\@firstoftwo179 \ifnum\pdftexversion > 139 \def\MT@engine@tooold{1}\fi180 \ifx\directlua\@undefined \else181 \ifx\directlua\relax \else182 \def\MT@engine{lua}183 \let\MT@pdf@or@lua\@secondoftwo184 \ifnum\luatexversion < 62 \def\MT@engine@tooold{0}\fi185 \fi186 \fi187 \fi188 \fi189 190 \ifx\MT@engine\relax191 \ifx\XeTeXversion\@undefined \else192 \ifx\XeTeXversion\relax \else193 \def\MT@engine{xe}194 \fi195 \fi196 \fi197 198 pdfTEX’s features for which we provide an interface here haven’t always beenavailable, and some specifics have changed over time. <strong>The</strong>refore, we have to testwhich pdfTEX we’re using, if any. \MT@pdftex@no will be used throughout the<strong>package</strong> to respectively do the right thing.Currently, we have to distinguish seven cases for pdfTEX:0: not running pdfTEX1: pdfTEX (< 0.14f)2: + micro-typographic extensions (0.14f,g)3: + protrusion relative to 1em (≥ 0.14h)4: + automatic font expansion; protrusion no longer has to be set up first; scalefactor fixed to 1000; default \efcode = 1000 (≥ 1.20)5: + \(left,right)marginkern; \pdfnoligatures; \pdfstrcmp; \pdfescapestring(≥ 1.30)6: + adjustment of interword spacing; extra kerning; \letterspacefont; \pdfmatch 15 ;\pdftracingfonts; always e-TEX (≥ 1.40)7: + \letterspacefont doesn’t disable ligatures and kerns; \pdfcopyfont (≥ 1.40.4)199 200 \MT@dinfo@nl{0}{this is pdftex \the\pdftexversion(\pdftexrevision)}201 \def\MT@pdftex@no{7}15 This command was actually introduced in 1.30, but failed on strings longer than 1023 bytes.


IMPLEMENTATION: Preliminaries 39202 \ifnum\pdftexversion = 140203 \ifnum\pdftexrevision < 4204 \def\MT@pdftex@no{6}205 \fi206 \else207 \ifnum\pdftexversion < 140208 \def\MT@pdftex@no{5}209 \ifnum\pdftexversion < 130210 \def\MT@pdftex@no{4}211 \ifnum\pdftexversion < 120212 \def\MT@pdftex@no{3}213 \ifnum\pdftexversion = 14214 \ifnum \expandafter`\pdftexrevision < `h215 \def\MT@pdftex@no{2}216 \ifnum \expandafter`\pdftexrevision < `f217 \def\MT@pdftex@no{1}218 \fi219 \fi220 \else221 \ifnum\pdftexversion < 14222 \def\MT@pdftex@no{1}223 \fi224 \fi225 \fi226 \fi227 \fi228 \fi229 \MT@dinfo@nl{0}{pdftex no.: \MT@pdftex@no}230 \MT@xetex@no\MT@luatex@noTEX supports character protrusion since version 0.9997.EX231 232 \MT@dinfo@nl{0}{this is xetex (\the\XeTeXversion\XeTeXrevision)}233 \ifdim 0\XeTeXrevision pt < 0.9997pt234 \def\MT@xetex@no{1}235 \else236 \def\MT@xetex@no{2}237 \fi238 \MT@dinfo@nl{0}{xetex no.: \MT@xetex@no}239 Cases for LuaTEX (\luatexversion ought to have been enabled by the format):0: N/A1: LuaTEX (< 0.36)2: + \directlua without state number (≥ 0.36)3: + \letterspacefont (≥ 0.62).240 241 \MT@dinfo@nl0{this is luatex (\the\luatexversion)}\MT@luaCommunicate with lua. Beginning with LuaTEX 0.36, \directlua no longer requiresa state number.242 \def\MT@lua{\directlua}243 \def\MT@luatex@no{3}244 \ifnum\luatexversion


IMPLEMENTATION: Preliminaries 40251 \MT@dinfo@nl{0}{luatex no.: \MT@luatex@no}252 253 254 \ifnum255 \csname MT@\MT@engine tex@no\endcsname < 2256 \MT@engine@tooold=\z@257 \MT@warning@nl{You258 259 \ifx\MT@engine\relax260 don’t seem to be using pdftex or luatex.\MessageBreak261 Try running `pdftex’ or `luatex’ instead of\MessageBreak262 `\ifx\XeTeXversion\@undefined\else xe\fi tex’%263 \else264 265 are using a \MT@engine tex version older than266 0.14f%267 0.9997%268 \MT@pdf@or@lua{1.40}{0.62}%269 .\MessageBreak270 `\MT@MT’ does not work with this version.\MessageBreak271 Please install a newer version of \MT@engine tex%272 \fi273 .\MessageBreak I will quit now}274 \MT@clear@options275 \endinput\fi276 \MT@toks\ifMT@if@Still there? <strong>The</strong>n we can begin: We need the keyval <strong>package</strong>, including the ‘new’\KV@@sp@def implementation.277 278 \RequirePackage{keyval}[1997/11/10]279 We need a token register.280 \newtoks\MT@toksA scratch if.281 \newif\ifMT@if@14.1.3 Declarations\ifMT@protrusion\ifMT@expansion\ifMT@auto\ifMT@selected\ifMT@noligatures\ifMT@draft\ifMT@spacing\ifMT@kerning\ifMT@tracking\MT@pr@level\ifMT@babel\MT@ex@level\MT@pr@factor\MT@ex@factor\MT@sp@factor\MT@kn@factor<strong>The</strong>se are the global switches . . .282 \newif\ifMT@protrusion283 \newif\ifMT@expansion284 \newif\ifMT@auto285 \newif\ifMT@selected286 \newif\ifMT@noligatures287 \newif\ifMT@draft288 \newif\ifMT@spacing289 \newif\ifMT@kerning290 \newif\ifMT@tracking291 \newif\ifMT@babel. . . and numbers.292 \let\MT@pr@level\tw@293 \let\MT@ex@level\tw@294 \let\MT@pr@factor\@m295 \let\MT@ex@factor\@m296 \let\MT@sp@factor\@m297 \let\MT@kn@factor\@m


IMPLEMENTATION: Preliminaries 41\MT@pr@unit\MT@sp@unit\MT@kn@unit\MT@stretch\MT@shrink\MT@step\MT@pr@min\MT@pr@max\MT@ex@min\MT@ex@max\MT@sp@min\MT@sp@max\MT@kn@min\MT@kn@max\MT@tr@min\MT@tr@max\MT@factor@default\MT@stretch@default\MT@shrink@default\MT@letterspace\MT@letterspace@default\ifMT@documentDefault unit for protrusion settings is character width, for spacing space, for kerning(and tracking) 1em.298 \let\MT@pr@unit\@empty299 \let\MT@sp@unit\m@ne300 \def\MT@kn@unit{1em}Expansion settings.301 \let\MT@stretch\m@ne302 \let\MT@shrink \m@ne303 \let\MT@step \m@neMinimum and maximum values allowed by pdfTEX.304 \def\MT@pr@min{-\@m}305 \let\MT@pr@max\@m306 \let\MT@ex@min\z@307 \let\MT@ex@max\@m308 \def\MT@sp@min{-\@m}309 \let\MT@sp@max\@m310 \def\MT@kn@min{-\@m}311 \let\MT@kn@max\@m312 313 \def\MT@tr@min{-\@m}314 \let\MT@tr@max\@m315 Default factor.316 \def\MT@factor@default{1000 }Default values for expansion.317 \def\MT@stretch@default{20 }318 \def\MT@shrink@default{20 }Default value for letterspacing (in thousandths of 1em).319 320 \let\MT@letterspace\m@ne321 \def\MT@letterspace@default{100}322 Our private test whether we’re still in the preamble.323 \newif\ifMT@document324 325 14.1.4 Auxiliary macros\MT@requires@pdftex\MT@requires@luatexFor definitions that depend on a particular pdfTEX resp. LuaTEX version.326 327 \def328 \MT@requires@pdftex%329 \MT@requires@luatex%330 #1{\ifnum331 \MT@pdftex@no332 \MT@luatex@no333


IMPLEMENTATION: Preliminaries 42\MT@glet\MT@exp@cs\MT@exp@gcs\MT@def@n\MT@gdef@n\MT@edef@n\MT@xdef@n\MT@let@nc\MT@glet@nc\MT@let@cn\MT@let@nn\MT@glet@nn\MT@@font338 339 \RequirePackage{luatexbase}340 \RequireLuaModule{<strong>microtype</strong>}341 Here it begins. <strong>The</strong> module was contributed by Élie Roux.342 343 <strong>microtype</strong> = <strong>microtype</strong> or {}344 local <strong>microtype</strong> = <strong>microtype</strong>345346 local <strong>microtype</strong> _ module = {347 name = "<strong>microtype</strong>",348 version = 2.5,349 date = "2013/05/15",350 description = "<strong>microtype</strong> module.",351 author = "E. Roux, R. Schlicht and P. Gesang",352 copyright = "E. Roux, R. Schlicht and P. Gesang",353 license = "LPPL",354 }355356 if luatexbase and luatexbase.provides _ module then357 luatexbase.provides _ module(<strong>microtype</strong> _ module)358 end359360 local find = string.find361 local tex _ write = tex.write362363 To be continued, but first back to primitives.Here’s the forgotten one.364 365 \def\MT@glet{\global\let}Commands to create command sequences. Those that are going to be definedglobally should be created inside a group so that the save stack won’t explode.366 \def\MT@exp@cs#1#2{\expandafter#1\csname#2\endcsname}367 368 \def\MT@exp@gcs#1#2{\begingroup\expandafter\endgroup\expandafter#1\csname#2\endcsname}This is \@namedef and global.369 \def\MT@def@n{\MT@exp@cs\def}370 \def\MT@gdef@n{\MT@exp@gcs\gdef}Its expanding versions.371 372 \def\MT@edef@n{\MT@exp@cs\edef}373 374 \def\MT@xdef@n{\MT@exp@gcs\xdef}\let a \csname sequence to a command.375 \def\MT@let@nc{\MT@exp@cs\let}376 \def\MT@glet@nc{\MT@exp@gcs\MT@glet}\let a command to a \csname sequence.377 \def\MT@let@cn#1#2{\expandafter\let\expandafter#1\csname #2\endcsname}\let a \csname sequence to a \csname sequence.378 \def\MT@let@nn{\MT@exp@cs\MT@let@cn}379 \def\MT@glet@nn{\MT@exp@gcs{\global\expandafter\MT@let@cn}}Remove trailing space from the font name.380 \def\MT@@font{\expandafter\string\MT@font}


IMPLEMENTATION: Preliminaries 43\MT@exp@one@n\MT@exp@two@c\MT@exp@two@n\MT@ifdefined@c@T\MT@ifdefined@c@TF\MT@ifdefined@n@T\MT@ifdefined@n@TF\MT@detokenize@n\MT@detokenize@c\MT@rem@last@space\MT@ifemptyExpand the second token once and enclose it in braces.381 382 \def\MT@exp@one@n#1#2{\expandafter#1\expandafter{#2}}Expand the next two tokens after 〈#1〉 once.383 \def\MT@exp@two@c#1{\expandafter\expandafter\expandafter#1\expandafter}384 Expand the next two tokens after 〈#1〉 once and enclose them in braces.385 \def\MT@exp@two@n#1#2#3{%386 \expandafter\expandafter\expandafter387 #1\expandafter\expandafter\expandafter388 {\expandafter#2\expandafter}\expandafter{#3}}You do not wonder why \MT@exp@one@c doesn’t exist, do you?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.389 \def\MT@ifdefined@c@T#1{%390 ^^X \ifdefined#1\expandafter\@firstofone\else\expandafter\@gobble\fi391 ^^Q \ifx#1\@undefined\expandafter\@gobble\else\expandafter\@firstofone\fi392 }393 394 \def\MT@ifdefined@c@TF#1{%395 ^^X \ifdefined#1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi396 ^^Q \ifx#1\@undefined397 ^^Q \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi398 }399 \def\MT@ifdefined@n@T#1{%400 ^^X \ifcsname#1\endcsname\expandafter\@firstofone\else\expandafter\@gobble\fi401 ^^Q \begingroup\MT@exp@two@c\endgroup\ifx\csname #1\endcsname\relax402 ^^Q \expandafter\@gobble\else\expandafter\@firstofone\fi403 }404 \def\MT@ifdefined@n@TF#1{%405 ^^X \ifcsname#1\endcsname\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi406 ^^Q \begingroup\MT@exp@two@c\endgroup\ifx\csname #1\endcsname\relax407 ^^Q \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi408 }409 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 – therefore the fiddling(and the \string isn’t perfect, of course).410 \def\MT@detokenize@n#1{%411 ^^X \expandafter\MT@rem@last@space\detokenize{#1} \@nil412 ^^Q \string#1%413 }414 \def\MT@detokenize@c#1{%415 ^^X \MT@exp@one@n\MT@detokenize@n#1%416 ^^Q \MT@exp@two@c\MT@rem@last@space\strip@prefix\meaning#1 \@nil417 }418 \def\MT@rem@last@space#1 #2{#1%419 \ifx\@nil#2\else \space420 \expandafter\MT@rem@last@space\expandafter#2\fi421 }Test whether argument is empty.422 423 \begingroup424 \catcode`\%=12425 \catcode`\&=14426 \gdef\MT@ifempty#1{&427 \if %#1%&


IMPLEMENTATION: Preliminaries 44\MT@ifint\MT@ifdimen428 \expandafter\@firstoftwo429 \else430 \expandafter\@secondoftwo431 \fi432 }433 \endgroup434 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).435 436 437 \MT@requires@pdftex6{438 \MT@pdf@or@lua{439 440 \def\MT@ifint#1{%441 \ifcase\pdfmatch{^-*[0-9]+ *$}{#1}\relax442 \expandafter\@secondoftwo443 \else444 \expandafter\@firstoftwo445 \fi446 }447 }{448 449 450 \def\MT@ifint#1{%451 \if!\ifnum9


IMPLEMENTATION: Preliminaries 45\MT@ifdim\MT@ifstreq485 \setbox\z@=\hbox{%486 \MT@count=1#1\relax487 \ifnum\MT@count=\@ne488 \aftergroup\@secondoftwo489 \else490 \aftergroup\@firstoftwo491 \fi492 }%493 }494 495 }496 \def\MT@ifdimen#1{\csname\MT@lua{<strong>microtype</strong>.if _ dimen([[#1]])}\endcsname}497 498 local function if _ dimen(s)499 if (find(s, "^-*[0-9]+(%a*) *$") or500 find(s, "^-*[0-9]*[.,][0-9]+(%a*) *$")) then501 tex _ write("@firstoftwo")502 else503 tex _ write("@secondoftwo")504 end505 end506 <strong>microtype</strong>.if _ dimen = if _ dimen507508 Test floating point numbers.509 510 \def\MT@ifdim#1#2#3{%511 \ifdim #1\p@ #2 #3\p@512 \expandafter\@firstoftwo513 \else514 \expandafter\@secondoftwo515 \fi516 }517 Test whether two strings (fully expanded) are equal.518 519 \MT@requires@pdftex5{520 \def\MT@ifstreq#1#2{%521 \ifcase\pdfstrcmp{#1}{#2}\relax522 \expandafter\@firstoftwo523 \else524 \expandafter\@secondoftwo525 \fi526 }527 }{528 529 530 \def\MT@ifstreq#1#2{%531 \edef\MT@res@a{#1}%532 \edef\MT@res@b{#2}%533 \ifx\MT@res@a\MT@res@b534 \expandafter\@firstoftwo535 \else536 \expandafter\@secondoftwo537 \fi538 }539 540 }541 \def\MT@ifstreq#1#2{\csname\MT@lua{<strong>microtype</strong>.if _ str _ eq([[#1]],[[#2]])}\endcsname}542 543 local function if _ str _ eq(s1, s2)544 if s1 == s2 then545 tex _ write("@firstoftwo")


IMPLEMENTATION: Preliminaries 46\MT@xadd\MT@xaddb\MT@map@clist@n\MT@map@clist@c\MT@map@clist@\MT@clist@function\MT@clist@break\MT@map@tlist@n\MT@map@tlist@c\MT@map@tlist@\MT@tlist@break\ifMT@inlist@\MT@in@clist546 else547 tex _ write("@secondoftwo")548 end549 end550 <strong>microtype</strong>.if _ str _ eq = if _ str _ eq551552 Add item to a list.553 554 \def\MT@xadd#1#2{%555 \ifx#1\relax556 \xdef#1{#2}%557 \else558 \xdef#1{#1#2}%559 \fi560 }Add item to the beginning.561 \def\MT@xaddb#1#2{%562 \ifx#1\relax563 \xdef#1{#2}%564 \else565 \xdef#1{#2#1}%566 \fi567 }568 Run 〈#2〉 on all elements of the comma list 〈#1〉. This and the following is modelledafter L A TEX3 commands.569 570 \def\MT@map@clist@n#1#2{%571 \ifx\@empty#1\else572 \def\MT@clist@function##1{#2}%573 \MT@map@clist@#1,\@nil,\@nnil574 \fi575 }576 \def\MT@map@clist@c#1{\MT@exp@one@n\MT@map@clist@n#1}577 \def\MT@map@clist@#1,{%578 \ifx\@nil#1%579 \expandafter\MT@clist@break580 \fi581 \MT@clist@function{#1}%582 \MT@map@clist@583 }584 \let\MT@clist@function\@gobble585 \def\MT@clist@break#1\@nnil{}586 Execute 〈#2〉 on all elements of the token list 〈#1〉. \MT@tlist@break can be usedto jump out of the loop.587 \def\MT@map@tlist@n#1#2{\MT@map@tlist@#2#1\@nnil}588 \def\MT@map@tlist@c#1#2{\expandafter\MT@map@tlist@\expandafter#2#1\@nnil}589 \def\MT@map@tlist@#1#2{%590 \ifx\@nnil#2\else591 #1{#2}%592 \expandafter\MT@map@tlist@593 \expandafter#1%594 \fi595 }596 \def\MT@tlist@break#1\@nnil{\fi}Test whether item 〈#1〉 is in comma list 〈#2〉. Using \pdfmatch would be slower.597 \newif\ifMT@inlist@


IMPLEMENTATION: Preliminaries 47\MT@rem@from@clist\MT@in@tlist\MT@in@tlist@\MT@in@rlist\MT@in@rlist@\MT@in@rlist@@\MT@size@name\MT@loop\MT@iterate\MT@repeat598 \def\MT@in@clist#1#2{%599 \def\MT@res@a##1,#1,##2##3\@nnil{%600 \ifx##2\@empty601 \MT@inlist@false602 \else603 \MT@inlist@true604 \fi605 }%606 \expandafter\MT@res@a\expandafter,#2,#1,\@empty\@nnil607 }Remove item 〈#1〉 from comma list 〈#2〉. This is basically \@removeelement fromltcntrl.dtx. Using \pdfmatch and \pdflastmatch here would be really slow!608 \def\MT@rem@from@clist#1#2{%609 \def\MT@res@a##1,#1,##2\MT@res@a{##1,##2\MT@res@b}%610 \def\MT@res@b##1,\MT@res@b##2\MT@res@b{\ifx,##1\@empty\else##1\fi}%611 \xdef#2{\MT@exp@two@c\MT@res@b\MT@res@a\expandafter,#2,\MT@res@b,#1,\MT@res@a}%612 }Test whether item is in token list. Since this isn’t too elegant, I thought that at leasthere, \pdfmatch would be more efficient – however, it turned out to be even slowerthan this solution.613 \def\MT@in@tlist#1#2{%614 \MT@inlist@false615 \def\MT@res@a{#1}%616 \MT@map@tlist@c#2\MT@in@tlist@617 }618 \def\MT@in@tlist@#1{%619 \edef\MT@res@b{#1}%620 \ifx\MT@res@a\MT@res@b621 \MT@inlist@true622 \expandafter\MT@tlist@break623 \fi624 }Test whether size \MT@size is in a list of ranges. Store the name of the list in\MT@size@name625 \def\MT@in@rlist#1{%626 \MT@inlist@false627 \MT@map@tlist@c#1\MT@in@rlist@628 }629 \def\MT@in@rlist@#1{\expandafter\MT@in@rlist@@#1}630 \def\MT@in@rlist@@#1#2#3{%631 \MT@ifdim{#2}=\m@ne{%632 \MT@ifdim{#1}=\MT@size633 \MT@inlist@true634 \relax635 }{%636 \MT@ifdim\MT@size


IMPLEMENTATION: Preliminaries 48\MT@while@num\MT@do@font\MT@count\MT@increment\MT@scale\MT@abbr@pr\MT@abbr@ex\MT@abbr@pr@c\MT@abbr@ex@c\MT@abbr@pr@inh\MT@abbr@ex@inh\MT@abbr@nl\MT@abbr@sp\MT@abbr@sp@c\MT@abbr@sp@inh649 \def\MT@iterate{#1\relax\expandafter\MT@iterate\fi}%650 \MT@iterate \let\MT@iterate\relax651 }652 \let\MT@repeat\fiExecute 〈#3〉 from 〈#1〉 up to (excluding) 〈#2〉 (much faster than L A TEX’s \@whilenum).653 \def\MT@while@num#1#2#3{%654 \@tempcnta#1\relax655 \MT@loop #3%656 \advance\@tempcnta \@ne657 \ifnum\@tempcnta < #2\MT@repeat658 }Execute 〈#1〉 256 times,659 660 661 \def\MT@do@font{\MT@while@num\z@662 \@cclviresp. 1114111 times for LuaTEX (this is going to be slow, but LuaTEX is slow anyway– still, there ought to be a better way!)663 \MT@max@slot664 }665 resp. for the whole font.666 667 \def\MT@do@font#1{%668 \@tempcnta=\z@669 \MT@loop #1%670 \advance\@tempcnta \@ne671 \ifnum\@tempcnta < \XeTeXcountglyphs\MT@font \MT@repeat672 }673 674 Increment macro 〈#1〉 by one. Saves using up too many counters. <strong>The</strong> e-TEX way isslightly faster.675 \newcount\MT@count676 \def\MT@increment#1{%677 ^^X \edef#1{\number\numexpr #1 + 1\relax}%678 ^^Q \MT@count=#1\relax679 ^^Q \advance\MT@count \@ne680 ^^Q \edef#1{\number\MT@count}%681 }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 overflow.<strong>The</strong> result of the division will be rounded instead of truncated. <strong>The</strong>refore, we’ll geta different (more accurate) result in about half of the cases.682 \def\MT@scale#1#2#3{%683 ^^Q \multiply #1 #2\relax684 \ifnum #3 = \z@685 ^^X #1=\numexpr #1 * #2\relax686 \else687 ^^X #1=\numexpr #1 * #2 / #3\relax688 ^^Q \divide #1 #3\relax689 \fi690 }Some abbreviations. Thus, we can have short command names but full-length logoutput.691 \def\MT@abbr@pr{protrusion}


IMPLEMENTATION: Preliminaries 49\MT@rbba@protrusion\MT@rbba@expansion\MT@rbba@spacing\MT@rbba@kerning\MT@rbba@tracking\MT@features\MT@features@long\MT@is@feature692 \def\MT@abbr@ex{expansion}693 \def\MT@abbr@pr@c{protrusion codes}694 \def\MT@abbr@ex@c{expansion codes}695 \def\MT@abbr@pr@inh{protrusion inheritance}696 \def\MT@abbr@ex@inh{expansion inheritance}697 \def\MT@abbr@nl{noligatures}698 \def\MT@abbr@sp{spacing}699 \def\MT@abbr@sp@c{interword spacing codes}700 \def\MT@abbr@sp@inh{interword spacing inheritance}701 \def\MT@abbr@kn{kerning}702 \def\MT@abbr@kn@c{kerning codes}703 \def\MT@abbr@kn@inh{kerning inheritance}704 \def\MT@abbr@tr{tracking}705 \def\MT@abbr@tr@c{tracking amount}<strong>The</strong>se we also need the other way round.706 \def\MT@rbba@protrusion{pr}707 \def\MT@rbba@expansion{ex}708 \def\MT@rbba@spacing{sp}709 \def\MT@rbba@kerning{kn}710 \def\MT@rbba@tracking{tr}We can work on these lists to save some guards in the dtx file.711 \def\MT@features{pr,ex,sp,kn,tr}712 \def\MT@features@long{protrusion,expansion,spacing,kerning,tracking}Whenever an optional argument accepts a list of features, we can use this commandto check whether a feature exists in order to prevent a rather confusing‘Missing \endcsname inserted’ error message. <strong>The</strong> feature (long form) must be in\@tempa, the type of list to ignore in 〈#1〉, then comes the action.713 \def\MT@is@feature#1{%714 \MT@exp@one@n\MT@in@clist\@tempa\MT@features@long715 \ifMT@inlist@716 \expandafter\@firstofone717 \else718 \MT@error{`\@tempa’ is not an available micro-typographic\MessageBreak719 feature. Ignoring #1}{Available features are: `\MT@features@long’.}%720 \expandafter\@gobble721 \fi722 }14.1.5 CompatibilityFor the record, the following L A TEX kernel commands will be modified by <strong>microtype</strong>:• \pickup@font• \do@subst@correction• \add@accent (all in section 14.2.9)• \showhyphens (in section 14.4.6)\MT@setup@<strong>The</strong> wordcount <strong>package</strong> redefines the font-switching commands, which willbreak <strong>microtype</strong>. Since <strong>microtype</strong> doesn’t have an effect on the number of wordsin the document anyway, we will simply disable ourselves.723 \@ifl@aded{tex}{wordcount}{%724 \MT@warning@nl{Detected the `wordcount’ utility.\MessageBreak725 Disabling `\MT@MT’, since it wouldn’t work}%726 \MT@clear@options\endinput}\relax<strong>The</strong> setup is deferred until the end of the preamble. This has a couple of advantages:\<strong>microtype</strong>setup can be used to change options later on in the preamble, and fonts


IMPLEMENTATION: Preliminaries 50\MT@addto@setup\MT@with@<strong>package</strong>@T\MT@with@babel@and@T\MT@ledmac@setup\MT@led@unhbox@linedon’t have to be set up before <strong>microtype</strong>.727 728 729 \MT@requires@latex1{730 \let\MT@setup@\@emptyWe use our private hook to have better control over the timing. This will also workwith eplain, but not with miniltx alone.731 \def\MT@addto@setup{\g@addto@macro\MT@setup@}Don’t hesitate with miniltx.732 }{\let\MT@addto@setup\@firstofone}We almost never do anything if a <strong>package</strong> is not loaded.733 \def\MT@with@<strong>package</strong>@T#1{\@if<strong>package</strong>loaded{#1}\@firstofone\@gobble}734 735 L A TEX’s \@if<strong>package</strong>with ignores the class options.736 \def\MT@with@babel@and@T#1{%737 \MT@ifdefined@n@T{opt@babel.\@pkgextension}{%738 \@expandtwoargs\MT@in@clist{#1}739 {\csname opt@babel.\@pkgextension\endcsname,\@classoptionslist}%740 \ifMT@inlist@\expandafter\@gobble\fi741 }\@gobble742 }<strong>The</strong> ledmac <strong>package</strong> first saves each paragraph in a box, from which it then splitsoff the lines one by one. This will destroy character protrusion. (<strong>The</strong>re aren’t anyproblems with the lineno <strong>package</strong>, since it takes a different approach.) — . . . —After much to and fro, the situation has finally settled and there is a fix. Beginningwith pdfTEX version 1.21b together with ledpatch.sty as of 2005/06/02 (v0.4),character protrusion will work at last.Peter Wilson was so kind to provide the \l@dunhbox@line hook in ledmac toallow for protrusion. \leftmarginkern and \rightmarginkern are new primitivesof pdfTEX 1.21b (aka. 1.30.0). <strong>The</strong>y are also part of recent TEX. <strong>The</strong> successor<strong>package</strong> eledmac is also supported.743 744 \MT@requires@pdftex5{745 746 \def\MT@ledmac@setup{%747 \ifMT@protrusion748 \MT@ifdefined@c@TF\l@dunhbox@line{%Hook.749 \MT@info@nl{Patching (e)ledmac to enable character protrusion}%750 \let\MT@led@unhbox@line\l@dunhbox@line751 \renewcommand*{\l@dunhbox@line}[1]{%752 \ifhbox##1%753 \kern\leftmarginkern##1%754 \expandafter\MT@led@unhbox@line\expandafter##1\expandafter755 \kern\rightmarginkern##1%756 \fi757 }%758 }{%759 \MT@warning@nl{%760 Character protrusion in paragraphs with line\MessageBreak761 numbering will only work if you update ledmac}%762 }%763 \fi764 }EX


IMPLEMENTATION: Preliminaries 51765 766 767 }{768 \def\MT@ledmac@setup{%769 \ifMT@protrusion770 \MT@warning@nl{%771 <strong>The</strong> pdftex version you are using does not allow\MessageBreak772 character protrusion in paragraphs with line\MessageBreak773 numbering by the `ledmac’ <strong>package</strong>.\MessageBreak774 Upgrade pdftex to version 1.30 or later}%775 \fi776 }777 }778 \MT@restore@p@h Restore meaning of \% and \#.\ifMT@xunicode\ifMT@fontspec\MT@setupfont@hook779 780 781 \def\MT@restore@p@h{\chardef\%`\% \chardef\#`\# }Two new conditionals for use with782 \newif\ifMT@xunicode783 \newif\ifMT@fontspec784 \MT@with@<strong>package</strong>@T{xunicode}\MT@xunicodetrue785 \MT@with@<strong>package</strong>@T{fontspec}\MT@fontspectrueTEX or LuaTEX.EXThis hook will be executed every time a font is set up (inside a group).In the preamble, we check for the <strong>package</strong>s each time a font is set up. Thus, itwill work regardless when the <strong>package</strong>s are loaded.Even for <strong>package</strong>s that don’t activate any characters in the preamble (likebabel and csquotes), we have to check here, too, in case they were loaded before<strong>microtype</strong>, and a font is loaded \AtBeginDocument, before <strong>microtype</strong>. (This isno longer needed, since the complete setup is now deferred until the end of thepreamble. However, it is still necessary for defersetup=false.)786 \def\MT@setupfont@hook{%When a font is defined via \fontspec, the font is not actually loaded, hence TEXresp. LuaTEX would see a wrong font (in \MT@get@slot). <strong>The</strong>refore, we load thecurrent font.787 \ifMT@fontspec\MT@font\fiSpanish (as well as Galician and Mexican) babel modify \%, storing the originalmeaning in \percentsign.788 \MT@if@false789 \MT@with@babel@and@T{spanish} \MT@if@true790 \MT@with@babel@and@T{galician}\MT@if@true791 \MT@with@babel@and@T{mexican} \MT@if@true792 \ifMT@if@\MT@ifdefined@c@T\percentsign{\let\%\percentsign}\fiUsing \@disablequotes, we can restore the original meaning of all charactersmade active by csquotes. (It would be doable for older versions, too, but we won’tbother.)793 \MT@with@<strong>package</strong>@T{csquotes}{%794 \@if<strong>package</strong>later{csquotes}{2005/05/11}\@disablequotes\relax}%hyperref redefines \% and \# inside a \url. We restore the original meanings(which we can only hope are correct). Same for tex4ht and mathastext.795 \MT@if@false796 \MT@with@<strong>package</strong>@T{hyperref} \MT@if@true797 \MT@with@<strong>package</strong>@T{tex4ht} \MT@if@trueEX


IMPLEMENTATION: Preliminaries 52798 \MT@with@<strong>package</strong>@T{mathastext}\MT@if@true799 \ifMT@if@\MT@restore@p@h\fi800 }Check again at the end of the preamble.801 802 \MT@addto@setup{%803 Our competitor, the pdfcprot <strong>package</strong>, must not be tolerated!804 \MT@with@<strong>package</strong>@T{pdfcprot}{%805 \MT@error{Detected the `pdfcprot’ <strong>package</strong>!\MessageBreak806 `\MT@MT’ and `pdfcprot’ may not be used together}{%807 <strong>The</strong> `pdfcprot’ <strong>package</strong> provides an interface to character protrusion.\MessageBreak808 So does the `\MT@MT’ <strong>package</strong>. Using both <strong>package</strong>s at the same\MessageBreak809 time will almost certainly lead to undesired results. Have your choice!}%810 }%811 \MT@with@<strong>package</strong>@T{ledmac}\MT@ledmac@setup812 \MT@with@<strong>package</strong>@T{eledmac}\MT@ledmac@setup813 \MT@with@<strong>package</strong>@T{xunicode}\MT@xunicodetrue814 \MT@with@<strong>package</strong>@T{fontspec}\MT@fontspectrueWe can clean up \MT@setupfont@hook now.815 \let\MT@setupfont@hook\@empty816 \ifMT@fontspec817 \g@addto@macro\MT@setupfont@hook{\MT@font}%818 \fi819 \MT@if@false820 \MT@with@babel@and@T{spanish} \MT@if@true821 \MT@with@babel@and@T{galician}\MT@if@true822 \MT@with@babel@and@T{mexican} \MT@if@true823 \ifMT@if@824 \g@addto@macro\MT@setupfont@hook{%825 \MT@ifdefined@c@T\percentsign{\let\%\percentsign}}%826 \fi827 \MT@with@<strong>package</strong>@T{csquotes}{%828 \@if<strong>package</strong>later{csquotes}{2005/05/11}{%829 \g@addto@macro\MT@setupfont@hook\@disablequotes830 }{%831 \MT@warning@nl{%832 Should you receive warnings about unknown slot\MessageBreak833 numbers, try upgrading the `csquotes’ <strong>package</strong>}%834 }%835 }%We disable <strong>microtype</strong>’s additions inside hyperref’s \pdfstringdef, which redefineslots of commands. hyperref doesn’t work with plain TEX, so in that case we don’tbother.836 \MT@if@false837 838 \MT@requires@latex2{839 \MT@with@<strong>package</strong>@T{hyperref}{%840 \pdfstringdefDisableCommands{%841 842 \let\pickup@font\MT@orig@pickupfont843 \let\text<strong>microtype</strong>context\@secondoftwo844 \let\<strong>microtype</strong>context\@gobble845 846 \def\lsstyle{\pdfstringdefWarn\lsstyle}%847 \def\textls#1#{\pdfstringdefWarn\textls}%848 }%849 \MT@if@true850 }%851 }\relax852


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


IMPLEMENTATION: Font setup 54895 896 }897 We need a font (the minimal class doesn’t load one).898 \expandafter\ifx\the\font\nullfont\normalfont\fi14.2 Font setup\MT@setupfontSetting up a font entails checking for each feature whether it should be applied tothe current font (\MT@font). But first, we might have to disable stuff when usedtogether with adventurous <strong>package</strong>s.899 900 \def\MT@setupfont{\MT@setupfont@hook}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).901 \MT@requires@pdftex7{902 \g@addto@macro\MT@setupfont\MT@copy@font903 }\relax<strong>The</strong> font properties must be extracted from \MT@font, since the current value of\f@encoding and friends may be wrong!904 \g@addto@macro\MT@setupfont{%905 \MT@exp@two@c\MT@split@name\string\MT@font/\@nilTry to find a configuration file for the current font family.906 \MT@exp@one@n\MT@find@file\MT@family907 \ifx\MT@familyalias\@empty \else908 \MT@exp@one@n\MT@find@file\MT@familyalias\fiWe have to make sure that \cf@encoding expands to the correct value (for later, in\MT@get@slot), which isn’t the case when \selectfont chooses a new encoding(this would be done a second later in \selectfont, anyway – three lines, to beexact). (I think, I do not need this anymore – however, I’m too afraid to remove it.. . . Oops, I did it. Let’s see whether anybody complains.)909 % \ifx\f@encoding\cf@encoding\else\@@enc@update\fi910 }Tracking has to come first, since it means actually loading a different font.911 \MT@requires@pdftex6912 \MT@requires@luatex3913 {\g@addto@macro\MT@setupfont\MT@tracking}\relax914 \g@addto@macro\MT@setupfont{%915 \MT@check@font916 \ifMT@inlist@917 \MT@show@pdfannot2%918 \else919 \MT@vinfo{Setting up font `\MT@@font’\on@line}%Now we can begin setting up the font for all features that the current pdfTEXprovides. <strong>The</strong> following commands are \let to \relax if the respective feature isdisabled via <strong>package</strong> options.For versions older than 1.20, protrusion has to be set up first, beginning with1.20, the order doesn’t matter.920 \MT@protrusion921 \MT@expansion922 }Interword spacing and kerning (pdfTEX 1.40).


IMPLEMENTATION: Font setup 55\MT@copy@font\MT@copy@font@\MT@font@copy\MT@font@orig923 924 \MT@requires@pdftex6{925 \g@addto@macro\MT@setupfont{\MT@spacing\MT@kerning}926 }\relax927 Disable ligatures (pdfTEX 1.30).928 \MT@requires@pdftex5{929 \g@addto@macro\MT@setupfont\MT@noligatures930 }\relax931 \g@addto@macro\MT@setupfont{%Debugging.932 \MT@show@pdfannot1%Finally, register the font so that we don’t set it up anew each time.933 \MT@register@font934 \fi935 }936 <strong>The</strong> new (1.40.4) \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 <strong>package</strong> has been loaded with thecopyfonts option.937 938 \let\MT@copy@font\relax939 \MT@requires@pdftex7{940 \def\MT@copy@font@{%For every new protrusion and expansion context, we create a new copy.941 \xdef\MT@font@copy{\csname\MT@@font/\MT@pr@context/\MT@ex@context\endcsname}%pdfTEX doesn’t allow copying a font that has already been copied and expanded/letterspaced. Hence, we have to get the original.942 \expandafter\ifx\MT@font@copy\relax943 \edef\MT@font@orig{\csname\expandafter\string\font@name @orig\endcsname}%944 \expandafter\ifx\MT@font@orig\relax945 \MT@exp@two@c\MT@glet\MT@font@orig\font@name946 \else947 \MT@exp@two@c\let\font@name\MT@font@orig948 \fi949 \global\MT@exp@two@c\pdfcopyfont\MT@font@copy\font@name950 \MT@dinfo1{creating new copy: \MT@font@copy}%Since it’s a new font, we have to remove it from the context lists.951 \MT@map@clist@c\MT@active@features{%952 \MT@exp@cs\ifx{MT@\@nameuse{MT@abbr@##1}}\relax\else953 \def\@tempa{##1}%954 \MT@exp@cs\MT@map@tlist@c{MT@##1@doc@contexts}\MT@rem@from@list955 \fi956 }%957 \fi958 \MT@exp@two@c\let\MT@font\MT@font@copyWe only need the font identifier for letterspacing.959 \let\font@name\MT@font@copyBut we have to properly substitute the font after we’re done.960 \aftergroup\let\aftergroup\font@name\aftergroup\MT@font@copy961 }


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


IMPLEMENTATION: Font setup 57\ifMT@do\MT@feat\MT@maybe@do\MT@dinfo@list\MT@checklist@989 \MT@scrubfeatures#3\relax990 \fi991 }We check all features of the current font against the lists of the currently activefont set, and set \ifMT@do accordingly.992 \newif\ifMT@do993 \def\MT@maybe@do#1{%(but only if the feature isn’t globally set to false)994 \csname ifMT@\csname MT@abbr@#1\endcsname\endcsnameBegin with setting micro-typography to true for this font. <strong>The</strong> \MT@checklist@...tests will set it to false if the property is not in the list. <strong>The</strong> first non-empty list thatdoes not contain a match will stop us (except for font).995 \MT@dotrue996 \edef\@tempa{\csname MT@#1@setname\endcsname}%997 \MT@map@clist@n{font,encoding,family,series,shape,size}{%998 \MT@ifdefined@n@TF{MT@checklist@##1}%999 {\csname MT@checklist@##1\endcsname}%1000 {\MT@checklist@{##1}}%1001 {#1}%1002 }%1003 \else1004 \MT@dofalse1005 \fi1006 \ifMT@do\MT@feat stores the current feature.1007 \def\MT@feat{#1}%1008 \csname MT@set@#1@codes\endcsname1009 \else1010 \MT@vinfo{... No \@nameuse{MT@abbr@#1}}%1011 \fi1012 }1013 \def\MT@dinfo@list#1#2#3{\MT@dinfo@nl{1}{\@nameuse{MT@abbr@#1}: #21014 \ifx\\#3\\list empty\else `\@nameuse{MT@#2}’ #3 list\fi}}<strong>The</strong> generic test (〈#1〉 is the axis, 〈#2〉 the feature, \@tempa contains the set name).1015 \def\MT@checklist@#1#2{%1016 \MT@ifdefined@n@T1017 \MT@ifdefined@n@TF1018 {MT@#2list@#1@\@tempa}{%Begin a (neatly masqueraded) \expandafter orgy to test whether the font attributeis in the list.1019 \expandafter\MT@exp@one@n\expandafter\MT@in@clist1020 \csname MT@#1\expandafter\endcsname1021 \csname MT@#2list@#1@\@tempa\endcsname1022 \ifMT@inlist@1023 \MT@dinfo@list{#2}{#1}{in}%1024 \MT@dotrue1025 \else1026 \MT@dinfo@list{#2}{#1}{not in}%1027 \MT@dofalse1028 \expandafter\MT@clist@break1029 \fi1030 }%If no limitations have been specified, i.e., the list for a font attribute has not beendefined at all, the font should be set up.


IMPLEMENTATION: Font setup 58\MT@checklist@family\MT@checklist@size\MT@checklist@font1031 {\MT@dinfo@list{#2}{#1}{}}%1032 }Also test for the alias font, if the original font is not in the list.1033 \def\MT@checklist@family#1{%1034 \MT@ifdefined@n@T1035 \MT@ifdefined@n@TF1036 {MT@#1list@family@\@tempa}{%1037 \MT@exp@two@n\MT@in@clist1038 \MT@family{\csname MT@#1list@family@\@tempa\endcsname}%1039 \ifMT@inlist@1040 \MT@dinfo@list{#1}{family}{in}%1041 \MT@dotrue1042 \else1043 \MT@dinfo@list{#1}{family}{not in}%1044 \MT@dofalse1045 \ifx\MT@familyalias\@empty \else1046 \MT@exp@two@n\MT@in@clist1047 \MT@familyalias{\csname MT@#1list@family@\@tempa\endcsname}%1048 \ifMT@inlist@1049 \MT@dinfo@list{#1}{family alias}{in}%1050 \MT@dotrue1051 \else\MT@dinfo@list{#1}{family alias}{not in}%1052 \fi1053 \fi1054 \fi1055 \ifMT@do \else1056 \expandafter\MT@clist@break1057 \fi1058 }%1059 {\MT@dinfo@list{#1}{family}{}}%1060 }Test whether font size is in list of size ranges.1061 \def\MT@checklist@size#1{%1062 \MT@ifdefined@n@T1063 \MT@ifdefined@n@TF1064 {MT@#1list@size@\@tempa}{%1065 \MT@exp@cs\MT@in@rlist{MT@#1list@size@\@tempa}%1066 \ifMT@inlist@1067 \MT@dinfo@list{#1}{size}{in}%1068 \MT@dotrue1069 \else1070 \MT@dinfo@list{#1}{size}{not in}%1071 \MT@dofalse1072 \expandafter\MT@clist@break1073 \fi1074 }%1075 {\MT@dinfo@list{#1}{size}{}}%1076 }If the font matches, we skip the rest of the test.1077 \def\MT@checklist@font#1{%1078 \MT@ifdefined@n@T1079 \MT@ifdefined@n@TF1080 {MT@#1list@font@\@tempa}{%Since \MT@font may be appended with context and/or letterspacing specs, weconstruct the name from the font characteristics.1081 \edef\@tempb{\MT@encoding/\MT@family/\MT@series/\MT@shape/\MT@size}%1082 \expandafter\MT@exp@one@n\expandafter\MT@in@clist\expandafter1083 \@tempb \csname MT@#1list@font@\@tempa\endcsname1084 \ifMT@inlist@1085 \MT@dinfo@list{#1}{font}{in}%1086 \expandafter\MT@clist@break


IMPLEMENTATION: Font setup 591087 \else1088 \MT@dinfo@list{#1}{font}{not in}%1089 \MT@dofalse1090 \fi1091 }%1092 {\MT@dinfo@list{#1}{font}{}}%1093 }\ifMT@nofamily\MT@protrusion\MT@set@pr@codes\MT@get@font@dimen@six\MT@dimen@six14.2.1 ProtrusionInfo for settings that are not family-specific. (Warnings seem to be too irritating.)<strong>The</strong> switch is set in \MT@next@listname.1094 \newif\ifMT@nofamily1095 Set up for protrusion?1096 1097 \def\MT@protrusion{\MT@maybe@do{pr}}This macro is called by \MT@setupfont, and does all the work for setting up a fontfor protrusion.1098 \def\MT@set@pr@codes{%1099 \MT@nofamilyfalseCheck whether and if, which list should be applied to the current font. If familyspecificsettings don’t exist, we write it to the log (for each encoding).1100 \MT@if@list@exists{%1101 \ifMT@nofamily1102 \MT@ifdefined@n@TF{\MT@encoding-\MT@family-settings}\relax{%1103 \MT@info@nl{Loading generic settings for font family\MessageBreak1104 `\MT@family’ (encoding: \MT@encoding).\MessageBreak1105 For optimal results, create family-specific settings.\MessageBreak1106 See the <strong>microtype</strong> manual for details}%1107 \MT@glet@nc{\MT@encoding-\MT@family-settings}\@empty1108 }%1109 \fi1110 \MT@get@font@dimen@six{%1111 \MT@get@opt1112 \MT@reset@pr@codesGet the name of the inheritance list and parse it.1113 \MT@get@inh@listSet an input encoding?1114 \MT@set@inputenc{c}%Load additional lists?1115 \MT@load@list\MT@pr@c@name1116 \MT@set@listnameLoad the main list.1117 \MT@let@cn\@tempc{MT@pr@c@\MT@pr@c@name}%1118 \expandafter\MT@set@codes\@tempc,\relax,}%1119 }\MT@reset@pr@codes1120 }If \fontdimen 6 is zero, character protrusion, spacing, kerning and tracking won’twork, and we can skip the settings (for example, the dsfont and fourier fontsdon’t specify this dimension; this is probably a bug in the fonts).1121 \def\MT@get@font@dimen@six{%1122 \ifnum\fontdimen6\MT@font=\z@1123 \MT@warning@nl{%


IMPLEMENTATION: Font setup 60\MT@set@all@pr\MT@reset@pr@codes@\MT@reset@pr@codes\MT@the@pr@code\MT@the@pr@code@tr\MT@set@codes\MT@split@codes\MT@pr@split@val1124 Font `\MT@@font’ does not specify its\MessageBreak1125 \@backslashchar fontdimen 6 (width of an `em’)! <strong>The</strong>refore,\MessageBreak1126 \@nameuse{MT@abbr@\MT@feat} will not work with this font}%1127 \expandafter\@gobble1128 \else1129 \edef\MT@dimen@six{\number\fontdimen6\MT@font}%1130 \expandafter\@firstofone1131 \fi1132 }Set all protrusion codes of the font.1133 \def\MT@set@all@pr#1#2{%1134 \MT@dinfo@nl{3}{-- lp/rp: setting all to #1/#2}%1135 \let\MT@temp\@empty1136 \MT@ifempty{#1}\relax{\g@addto@macro\MT@temp{\lpcode\MT@font\@tempcnta=#1}}%1137 \MT@ifempty{#2}\relax{\g@addto@macro\MT@temp{\rpcode\MT@font\@tempcnta=#2}}%1138 \MT@do@font\MT@temp1139 }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 by\<strong>microtype</strong>context if necessary.1140 \def\MT@reset@pr@codes@{\MT@set@all@pr\z@\z@}1141 \let\MT@reset@pr@codes\relaxIf the font is letterspaced, we have to add half the letterspacing amount to themargin kerns. This will be activated in \MT@set@tr@codes.1142 \def\MT@the@pr@code{\@tempcntb}1143 1144 \MT@requires@pdftex61145 \MT@requires@luatex31146 {\def\MT@the@pr@code@tr{%1147 \numexpr\@tempcntb+\MT@letterspace@/2\relax1148 }1149 }\relax1150 Split up the values and set the codes.1151 \def\MT@set@codes#1,{%1152 \ifx\relax#1\@empty\else1153 \MT@split@codes #1==\relax1154 \expandafter\MT@set@codes1155 \fi1156 }<strong>The</strong> keyval <strong>package</strong> would remove spaces here, which we needn’t do since\SetProtrusion ignores spaces in the protrusion list anyway. \MT@get@char@unitmay mean different things.1157 \def\MT@split@codes#1=#2=#3\relax{%1158 \def\@tempa{#1}%1159 \ifx\@tempa\@empty \else1160 \MT@get@slot1161 \ifnum\MT@char > \m@ne1162 \ifx\MT@char\@empty \else1163 \MT@get@char@unit1164 \csname MT@\MT@feat @split@val\endcsname#2\relax1165 \fi1166 \fi1167 }1168 \def\MT@pr@split@val#1,#2\relax{%1169 \def\@tempb{#1}%


IMPLEMENTATION: Font setup 61\MT@scale@to@em\MT@get@charwd1170 \MT@ifempty\@tempb\relax{%1171 \MT@scale@to@em1172 \lpcode\MT@font\MT@char=\MT@the@pr@code1173 \MT@dinfo@nl{4}{;;; lp (\MT@char): \number\lpcode\MT@font\MT@char\space: [#1]}%1174 }%1175 \def\@tempb{#2}%1176 \MT@ifempty\@tempb\relax{%1177 \MT@scale@to@em1178 \rpcode\MT@font\MT@char=\MT@the@pr@code1179 \MT@dinfo@nl{4}{;;; rp (\MT@char): \number\rpcode\MT@font\MT@char\space: [#2]}%1180 }%Now we can set the values for the inheriting characters. <strong>The</strong>ir slot numbers aresaved in the macro \MT@inh@〈list name〉@〈slot number〉@.1181 \MT@ifdefined@c@T\MT@pr@inh@name{%1182 \MT@ifdefined@n@T{MT@inh@\MT@pr@inh@name @\MT@char @}{%1183 \MT@exp@cs\MT@map@tlist@c1184 {MT@inh@\MT@pr@inh@name @\MT@char @}%1185 \MT@set@pr@heirs1186 }%1187 }%1188 }Since pdfTEX version 0.14h, we have to adjust the protrusion factors (i.e., 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 (e.g., the ‘ff’ligature). Unlike protcode.tex and pdfcprot, we do not calculate with \lpcoderesp. \rpcode, since this would disallow protrusion factors larger than the characterwidth (since \[lr]pcode’s limit is 1000). Now, the maximum protrusion is 1em ofthe font.<strong>The</strong> unit is in \MT@count, the desired factor in \@tempb, and the result will bereturned in \@tempcntb.1189 \MT@requires@pdftex3{1190 \def\MT@scale@to@em{%1191 \@tempcntb=\MT@count\relaxFor really huge fonts (100 pt or so), an arithmetic overflow could occur with vanillaTEX. Using e-TEX, this can’t happen, since the intermediate value is 64 bit, whichcould only be reached with a character width larger than \maxdimen.1192 \MT@scale\@tempcntb \@tempb \MT@dimen@six1193 \ifnum\@tempcntb=\z@ \else1194 \MT@scale@factor1195 \fi1196 }Get the width of the character. When using e-TEX, we can employ \fontcharwdinstead of building scratch boxes.1197 \def\MT@get@charwd{%1198 1199 ^^X \MT@count=\fontcharwd\MT@font\MT@char\relax1200 ^^Q \setbox\z@=\hbox{\MT@font \char\MT@char}%1201 ^^Q \MT@count=\wd\z@1202 1203 \MT@count=\fontcharwd\MT@font\MT@char\relax\MT@char contains a slot number (legacy fonts), a Unicode number, or a glyph name(if \MT@char@ is negative).1204 1205 \ifnum\MT@char@


IMPLEMENTATION: Font setup 62\MT@get@font@dimen\MT@info@missing@char\MT@scale@factor1207 \MT@count=\wd\z@1208 \else1209 \MT@count=\fontcharwd\MT@font\MT@char@\relax1210 \fi1211 1212 \ifnum\MT@count=\z@ \MT@info@missing@char \fi1213 }For letterspaced fonts, we have to subtract the letterspacing amount from thecharacters’ widths. <strong>The</strong> protrusion amounts will be adjusted in \MT@set@pr@codes.<strong>The</strong> letterspaced font is already loaded so that 1em = \fontdimen 6.1214 1215 \MT@requires@pdftex6{1216 \g@addto@macro\MT@get@charwd{%1217 \MT@ifdefined@c@T\MT@letterspace@1218 {\advance\MT@count -\dimexpr\MT@letterspace@ sp *\dimexpr 1em/1000\relax}%1219 }1220 }\relax1221 }{No adjustment with versions 0.14f and 0.14g.1222 \def\MT@scale@to@em{%1223 \MT@count=\@tempb\relax1224 \ifnum\MT@count=\z@ \else1225 \MT@scale@factor1226 \fi1227 }We need this in \MT@warn@code@too@large (neutralised).1228 \def\MT@get@charwd{\MT@count=\MT@dimen@six}1229 }1230 1231 For the space unit.1232 1233 \def\MT@get@font@dimen#1{%1234 \ifnum\fontdimen#1\MT@font=\z@1235 \MT@warning@nl{Font `\MT@@font’ does not specify its\MessageBreak1236 \@backslashchar fontdimen #1 (it’s zero)!\MessageBreak1237 You should use a different `unit’ for \MT@curr@list@name}%1238 \else1239 \MT@count=\fontdimen#1\MT@font1240 \fi1241 }Info about missing characters, or characters with zero width.1242 \def\MT@info@missing@char{%1243 \MT@info@nl{Character `\the\MT@toks’1244 ^^X \iffontchar\MT@font\MT@char@1245 has a width of 0pt1246 ^^X \else is missing\fi1247 ^^Q \MessageBreak (it’s probably missing)1248 \MessageBreak in font `\MT@@font’.\MessageBreak1249 Ignoring protrusion settings for this character}%1250 }Furthermore, we might have to multiply with a factor.1251 \def\MT@scale@factor{%1252 \ifnum\csname MT@\MT@feat @factor@\endcsname=\@m \else1253 \expandafter\MT@scale\expandafter \@tempcntb1254 \csname MT@\MT@feat @factor@\endcsname \@m1255 \fi1256 \ifnum\@tempcntb>\csname MT@\MT@feat @max\endcsname\relax


IMPLEMENTATION: Font setup 63\MT@warn@code@too@large\MT@get@opt\MT@pr@factor@\MT@sp@factor@\MT@kn@factor@\MT@pr@unit@\MT@sp@unit@\MT@kn@unit@\MT@get@space@unit\MT@get@char@unit1257 \MT@exp@cs\MT@warn@code@too@large{MT@\MT@feat @max}%1258 \else1259 \ifnum\@tempcntb


IMPLEMENTATION: Font setup 64\MT@get@unit\MT@get@unit@\MT@set@inputenc\MT@cat\MT@set@inputenc@1304 \MT@exp@cs\ifx{MT@\MT@feat @unit@}\@empty1305 \let\MT@get@char@unit\MT@get@charwd1306 \else1307 \MT@exp@cs\ifx{MT@\MT@feat @unit@}\m@ne1308 \let\MT@get@space@unit\MT@get@font@dimen1309 \else1310 \MT@exp@cs\MT@get@unit{MT@\MT@feat @unit@}%1311 \fi1312 \fiPreset all characters? If so, we surely don’t need to reset, too.1313 \MT@ifdefined@n@T{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @preset}{%1314 \csname MT@preset@\MT@feat\endcsname1315 \MT@let@nc{MT@reset@\MT@feat @codes}\relax1316 }%1317 }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 isn’t set up yet, so that these dimensions haven’t been updated,either.1318 \def\MT@get@unit#1{%1319 \expandafter\MT@get@unit@#1 e!\@nil1320 \ifx\x\@empty\else\let#1\x\fi1321 \@defaultunits\@tempdima#1 pt\relax\@nnil1322 \ifdim\@tempdima=\z@1323 \MT@warning@nl{%1324 Cannot set \@nameuse{MT@abbr@\MT@feat} factors relative to zero\MessageBreak1325 width. Setting factors of list `\@nameuse{MT@\MT@feat @c@name}’\MessageBreak1326 relative to character widths instead}%1327 \let#1\@empty1328 \let\MT@get@char@unit\MT@get@charwd1329 \else1330 \MT@vinfo{... : Setting \@nameuse{MT@abbr@\MT@feat} factors relative1331 to \the\@tempdima}%1332 \MT@count=\@tempdima\relax1333 \fi1334 }1335 \def\MT@get@unit@#1e#2#3\@nil{%1336 \ifx\\#3\\\let\x\@empty \else1337 \if m#2%1338 \edef\x{#1\fontdimen6\MT@font}%1339 \else1340 \if x#2%1341 \edef\x{#1\fontdimen5\MT@font}%1342 \fi1343 \fi1344 \fi1345 }<strong>The</strong> configurations may be under the regime of an input encoding.1346 \def\MT@set@inputenc#1{%We remember the current category (c or inh), in case of warnings later.1347 \def\MT@cat{#1}%1348 \edef\@tempa{MT@\MT@feat @#1@\csname MT@\MT@feat @#1@name\endcsname @inputenc}%1349 \MT@ifdefined@n@T\@tempa\MT@set@inputenc@1350 }More recent versions of inputenc remember the current encoding, so that we cantest whether we really have to load the encoding file.1351 \MT@addto@setup{%1352 \@if<strong>package</strong>loaded{inputenc}{%


IMPLEMENTATION: Font setup 65\MT@load@inputenc\MT@set@pr@heirs\MT@preset@pr\MT@preset@pr@\MT@preset@aux\MT@preset@aux@factor\MT@preset@aux@space1353 \@if<strong>package</strong>later{inputenc}{2006/02/22}{%1354 \def\MT@set@inputenc@{%1355 \MT@ifstreq\inputencodingname{\csname\@tempa\endcsname}\relax1356 \MT@load@inputenc1357 }%1358 }{%1359 \let\MT@set@inputenc@\MT@load@inputenc1360 }%1361 }{%1362 \def\MT@set@inputenc@{%1363 \MT@warning@nl{Key `inputenc’ used in \MT@curr@list@name, but the `inputenc’1364 \MessageBreak <strong>package</strong> isn’t loaded. Ignoring input encoding}%1365 }%1366 }%1367 }Set up normal catcodes, since, e.g., listings would otherwise want to actuallytypeset the inputenc file when it is being loaded inside a listing.1368 \def\MT@load@inputenc{%1369 \MT@cfg@catcodes1370 \MT@dinfo@nl{1}{loading input encoding: \@nameuse{\@tempa}}%1371 \inputencoding{\@nameuse{\@tempa}}%1372 }1373 Set the inheriting characters.1374 1375 \def\MT@set@pr@heirs#1{%1376 \lpcode\MT@font #1 =\lpcode\MT@font\MT@char\relax1377 \rpcode\MT@font #1 =\rpcode\MT@font\MT@char\relax1378 \MT@dinfo@nl{2}{-- heir of \MT@char: #1}%1379 \MT@dinfo@nl{4}{;;; lp/rp (#1): \number\lpcode\MT@font\MT@char\space/%1380 \number\rpcode\MT@font\MT@char\space}%1381 }Preset characters. Presetting them relative to their widths is not allowed.1382 \def\MT@preset@pr{%1383 \expandafter\expandafter\expandafter\MT@preset@pr@1384 \csname MT@pr@c@\MT@pr@c@name @preset\endcsname\@nil1385 }1386 \def\MT@preset@pr@#1,#2\@nil{%1387 \ifx\MT@pr@unit@\@empty1388 \MT@warn@preset@towidth{pr}%1389 \let\MT@preset@aux\MT@preset@aux@factor1390 \else1391 \def\MT@preset@aux{\MT@preset@aux@space2}%1392 \fi1393 \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux{#1}\@tempa}%1394 \MT@ifempty{#2}{\let\@tempb\@empty}{\MT@preset@aux{#2}\@tempb}%1395 \MT@set@all@pr\@tempa\@tempb1396 }Auxiliary macro for presetting. Store value 〈#1〉 in macro 〈#2〉.1397 \def\MT@preset@aux@factor#1#2{%1398 \@tempcntb=#1\relax1399 \MT@scale@factor1400 \edef#2{\number\@tempcntb}%1401 }1402 \def\MT@preset@aux@space#1#2#3{%1403 \def\@tempb{#2}%1404 \MT@get@space@unit#1%1405 \MT@scale@to@em1406 \edef#3{\number\@tempcntb}%1407 }


IMPLEMENTATION: Font setup 66\MT@warn@preset@towidth1408 \def\MT@warn@preset@towidth#1{%1409 \MT@warning@nl{%1410 Cannot preset characters relative to their widths\MessageBreak1411 for \@nameuse{MT@abbr@#1} list `\@nameuse{MT@#1@c@name}’. Presetting them%1412 \MessageBreak relative to 1em instead}%1413 }1414 \MT@expansion\MT@set@ex@codes@s\MT@set@ex@codes@n\ifMT@nonselected\MT@set@ex@codes14.2.2 ExpansionSet up for expansion?1415 1416 \def\MT@expansion{\MT@maybe@do{ex}}Setting up font expansion is a bit different because of the selected option. <strong>The</strong>reare two versions of this macro.If selected=true, we only apply font expansion to those fonts for which a listhas been declared (i.e., like for protrusion).1417 \def\MT@set@ex@codes@s{%1418 \MT@if@list@exists{%1419 \MT@get@ex@opt1420 \let\MT@get@char@unit\relax1421 \MT@reset@ef@codes1422 \MT@get@inh@list1423 \MT@set@inputenc{c}%1424 \MT@load@list\MT@ex@c@name1425 \MT@set@listname1426 \MT@let@cn\@tempc{MT@ex@c@\MT@ex@c@name}%1427 \expandafter\MT@set@codes\@tempc,\relax,%1428 \MT@expandfont1429 }\relax1430 }1431 If, on the other hand, all characters should be expanded by the same amount, weonly take the first optional argument to \SetExpansion into account.We need this boolean in \MT@if@list@exists so that no warning for missing listswill be issued.1432 \newif\ifMT@nonselected1433 1434 \def\MT@set@ex@codes@n{%1435 \MT@nonselectedtrue1436 \MT@if@list@exists1437 \MT@get@ex@opt1438 {%1439 \let\MT@stretch@ \MT@stretch1440 \let\MT@shrink@ \MT@shrink1441 \let\MT@step@ \MT@step1442 \let\MT@auto@ \MT@auto1443 \let\MT@ex@factor@\MT@ex@factor1444 }%1445 \MT@reset@ef@codes1446 \MT@expandfont1447 \MT@nonselectedfalse1448 }Default is non-selected. It can be changed in the <strong>package</strong> options.1449 \let\MT@set@ex@codes\MT@set@ex@codes@n


IMPLEMENTATION: Font setup 67\MT@expandfont\MT@set@all@ex\MT@reset@ef@codes@Expand the font.1450 \def\MT@expandfont{%1451 \pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@ \MT@auto@\relax1452 }At first, all expansion factors for the characters will be set to 1000 (respectively thefactor of this font).1453 \def\MT@set@all@ex#1{%1454 \MT@dinfo@nl{3}{-- ex: setting all to \number#1}%1455 \MT@do@font{\efcode\MT@font\@tempcnta=#1\relax}%1456 }1457 \def\MT@reset@ef@codes@{\MT@set@all@ex\MT@ex@factor@}\MT@reset@ef@codes However, this is only necessary for versions prior to 1.20.\MT@ex@split@val\MT@warn@ex@too@large\MT@get@ex@opt\MT@ex@factor@\MT@stretch@\MT@shrink@\MT@step@\MT@auto@1458 1459 \MT@requires@pdftex4{1460 \def\MT@reset@ef@codes{%1461 \ifnum\MT@ex@factor@=\@m \else1462 \MT@reset@ef@codes@1463 \fi1464 }1465 }{1466 1467 \let\MT@reset@ef@codes\MT@reset@ef@codes@1468 }<strong>The</strong>re’s only one number per character.1469 \def\MT@ex@split@val#1\relax{%1470 \@tempcntb=#1\relaxTake an optional factor into account.1471 \ifnum\MT@ex@factor@=\@m \else1472 \MT@scale\@tempcntb \MT@ex@factor@ \@m1473 \fi1474 \ifnum\@tempcntb > \MT@ex@max1475 \MT@warn@ex@too@large\MT@ex@max1476 \else1477 \ifnum\@tempcntb < \MT@ex@min1478 \MT@warn@ex@too@large\MT@ex@min1479 \fi1480 \fi1481 \efcode\MT@font\MT@char=\@tempcntb1482 \MT@dinfo@nl{4}{::: ef (\MT@char): \number\efcode\MT@font\MT@char: [#1]}%Heirs, heirs, I love thy heirs.1483 \MT@ifdefined@c@T\MT@ex@inh@name{%1484 \MT@ifdefined@n@T{MT@inh@\MT@ex@inh@name @\MT@char @}{%1485 \MT@exp@cs\MT@map@tlist@c{MT@inh@\MT@ex@inh@name @\MT@char @}\MT@set@ex@heirs1486 }%1487 }%1488 }1489 \def\MT@warn@ex@too@large#1{%1490 \MT@warning@nl{Expansion factor \number\@tempcntb\space too large for1491 character\MessageBreak `\the\MT@toks’ in \MT@curr@list@name.\MessageBreak1492 Setting it to the maximum of \number#1}%1493 \@tempcntb=#1\relax1494 }Apply different values to this font?1495 \def\MT@get@ex@opt{%1496 \MT@set@listname


IMPLEMENTATION: Font setup 68\MT@get@ex@opt@\MT@set@ex@heirs\MT@preset@ex1497 \MT@ifdefined@n@TF{MT@ex@c@\MT@ex@c@name @factor}{%1498 \MT@let@cn\MT@ex@factor@{MT@ex@c@\MT@ex@c@name @factor}%1499 \MT@vinfo{... : Multiplying expansion factors by \number\MT@ex@factor@/1000}%1500 }{%1501 \let\MT@ex@factor@\MT@ex@factor1502 }%1503 \MT@get@ex@opt@{stretch}{Setting stretch limit to \number\MT@stretch@}%1504 \MT@get@ex@opt@{shrink} {Setting shrink limit to \number\MT@shrink@}%1505 \MT@get@ex@opt@{step} {Setting expansion step to \number\MT@step@}%1506 \def\@tempa{autoexpand}%1507 \MT@get@ex@opt@{auto}{\ifx\@tempa\MT@auto@ En\else Dis\fi abling automatic expansion}%1508 \MT@ifdefined@n@T{MT@ex@c@\MT@ex@c@name @preset}{%1509 \MT@preset@ex1510 \let\MT@reset@ef@codes\relax1511 }%1512 }1513 \def\MT@get@ex@opt@#1#2{%1514 \MT@ifdefined@n@TF{MT@ex@c@\MT@ex@c@name @#1}{%1515 \MT@let@nn{MT@#1@}{MT@ex@c@\MT@ex@c@name @#1}%1516 \MT@vinfo{... : #2}%1517 }{%1518 \MT@let@nn{MT@#1@}{MT@#1}%1519 }%1520 }1521 \def\MT@set@ex@heirs#1{%1522 \efcode\MT@font#1=\efcode\MT@font\MT@char1523 \MT@dinfo@nl{2}{-- heir of \MT@char: #1}%1524 \MT@dinfo@nl{4}{::: ef (#1) \number\efcode\MT@font\MT@char}%1525 }1526 \def\MT@preset@ex{%1527 \@tempcntb=\csname MT@ex@c@\MT@ex@c@name @preset\endcsname\relax1528 \MT@scale@factor1529 \MT@set@all@ex\@tempcntb1530 }1531 \MT@spacing\MT@set@sp@codes14.2.3 Interword spacing (glue)Adjustment of interword spacing? Only works with pdfTEX.1532 1533 \MT@requires@pdftex6{1534 \def\MT@spacing{\MT@maybe@do{sp}}This is all the same.1535 \def\MT@set@sp@codes{%1536 \MT@if@list@exists{%1537 \MT@get@font@dimen@six{%1538 \MT@get@opt1539 \MT@reset@sp@codes1540 \MT@get@inh@list1541 \MT@set@inputenc{c}%1542 \MT@load@list\MT@sp@c@name1543 \MT@set@listname1544 \MT@let@cn\@tempc{MT@sp@c@\MT@sp@c@name}%1545 \expandafter\MT@set@codes\@tempc,\relax,}%1546 }\MT@reset@sp@codes1547 }


IMPLEMENTATION: Font setup 69\MT@sp@split@val\MT@set@sp@heirs\MT@set@all@sp\MT@reset@sp@codes\MT@reset@sp@codes@\MT@preset@spIf unit=space, \MT@get@space@unit will be defined to fetch the correspondingfontdimen (2 for the first, 3 for the second and 4 for the third argument).1548 \def\MT@sp@split@val#1,#2,#3\relax{%1549 \def\@tempb{#1}%1550 \MT@ifempty\@tempb\relax{%1551 \MT@get@space@unit2%1552 \MT@scale@to@em1553 \knbscode\MT@font\MT@char=\@tempcntb1554 \MT@dinfo@nl{4}{;;; knbs (\MT@char): \number\knbscode\MT@font\MT@char: [#1]}%1555 }%1556 \def\@tempb{#2}%1557 \MT@ifempty\@tempb\relax{%1558 \MT@get@space@unit3%1559 \MT@scale@to@em1560 \stbscode\MT@font\MT@char=\@tempcntb1561 \MT@dinfo@nl{4}{;;; stbs (\MT@char): \number\stbscode\MT@font\MT@char: [#2]}%1562 }%1563 \def\@tempb{#3}%1564 \MT@ifempty\@tempb\relax{%1565 \MT@get@space@unit4%1566 \MT@scale@to@em1567 \shbscode\MT@font\MT@char=\@tempcntb1568 \MT@dinfo@nl{4}{;;; shbs (\MT@char): \number\shbscode\MT@font\MT@char: [#3]}%1569 }%1570 \MT@ifdefined@c@T\MT@sp@inh@name{%1571 \MT@ifdefined@n@T{MT@inh@\MT@sp@inh@name @\MT@char @}{%1572 \MT@exp@cs\MT@map@tlist@c{MT@inh@\MT@sp@inh@name @\MT@char @}\MT@set@sp@heirs1573 }%1574 }%1575 }1576 \def\MT@set@sp@heirs#1{%1577 \knbscode\MT@font#1=\knbscode\MT@font\MT@char1578 \stbscode\MT@font#1=\stbscode\MT@font\MT@char1579 \shbscode\MT@font#1=\shbscode\MT@font\MT@char1580 \MT@dinfo@nl{2}{-- heir of \MT@char: #1}%1581 \MT@dinfo@nl{4}{;;; knbs/stbs/shbs (#1): \number\knbscode\MT@font\MT@char/%1582 \number\stbscode\MT@font\MT@char/\number\shbscode\MT@font\MT@char}%1583 }1584 \def\MT@set@all@sp#1#2#3{%1585 \MT@dinfo@nl{3}{-- knbs/stbs/shbs: setting all to #1/#2/#3}%1586 \let\MT@temp\@empty1587 \MT@ifempty{#1}\relax{\g@addto@macro\MT@temp{\knbscode\MT@font\@tempcnta=#1\relax}}%1588 \MT@ifempty{#2}\relax{\g@addto@macro\MT@temp{\stbscode\MT@font\@tempcnta=#2\relax}}%1589 \MT@ifempty{#3}\relax{\g@addto@macro\MT@temp{\shbscode\MT@font\@tempcnta=#3\relax}}%1590 \MT@do@font\MT@temp1591 }1592 \def\MT@reset@sp@codes@{\MT@set@all@sp\z@\z@\z@}1593 \let\MT@reset@sp@codes\relax\MT@preset@sp@ 1594 \def\MT@preset@sp{%1595 \expandafter\expandafter\expandafter\MT@preset@sp@1596 \csname MT@sp@c@\MT@sp@c@name @preset\endcsname\@nil1597 }1598 \def\MT@preset@sp@#1,#2,#3\@nil{%1599 \ifx\MT@sp@unit@\@empty1600 \MT@warn@preset@towidth{sp}%1601 \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux@factor{#1}\@tempa}%1602 \MT@ifempty{#2}{\let\@tempc\@empty}{\MT@preset@aux@factor{#2}\@tempc}%1603 \MT@ifempty{#3}{\let\@tempb\@empty}{\MT@preset@aux@factor{#3}\@tempb}%


IMPLEMENTATION: Font setup 701604 \else1605 \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux@space2{#1}\@tempa}%1606 \MT@ifempty{#2}{\let\@tempc\@empty}{\MT@preset@aux@space3{#2}\@tempc}%1607 \MT@ifempty{#3}{\let\@tempb\@empty}{\MT@preset@aux@space4{#3}\@tempb}%1608 \fi1609 \MT@set@all@sp\@tempa\@tempc\@tempb1610 }1611 }\relax\MT@kerning\MT@set@kn@codes14.2.4 Additional kerningAgain, only check for additional kerning for new versions of pdfTEX.1612 \MT@requires@pdftex6{1613 \def\MT@kerning{\MT@maybe@do{kn}}It’s getting boring, I know.1614 \def\MT@set@kn@codes{%1615 \MT@if@list@exists{%1616 \MT@get@font@dimen@six{%1617 \MT@get@opt1618 \MT@reset@kn@codes1619 \MT@get@inh@list1620 \MT@set@inputenc{c}%1621 \MT@load@list\MT@kn@c@name1622 \MT@set@listname1623 \MT@let@cn\@tempc{MT@kn@c@\MT@kn@c@name}%1624 \expandafter\MT@set@codes\@tempc,\relax,}%1625 }\MT@reset@kn@codes1626 }\MT@kn@split@val Again, the unit may be measured in the space dimension; this time only \fontdimen 2.\MT@set@kn@heirs\MT@set@all@kn\MT@reset@kn@codes\MT@reset@kn@codes@1627 \def\MT@kn@split@val#1,#2\relax{%1628 \def\@tempb{#1}%1629 \MT@ifempty\@tempb\relax{%1630 \MT@get@space@unit2%1631 \MT@scale@to@em1632 \knbccode\MT@font\MT@char=\@tempcntb1633 \MT@dinfo@nl{4}{;;; knbc (\MT@char): \number\knbccode\MT@font\MT@char: [#1]}%1634 }%1635 \def\@tempb{#2}%1636 \MT@ifempty\@tempb\relax{%1637 \MT@get@space@unit2%1638 \MT@scale@to@em1639 \knaccode\MT@font\MT@char=\@tempcntb1640 \MT@dinfo@nl{4}{;;; knac (\MT@char): \number\knaccode\MT@font\MT@char: [#2]}%1641 }%1642 \MT@ifdefined@c@T\MT@kn@inh@name{%1643 \MT@ifdefined@n@T{MT@inh@\MT@kn@inh@name @\MT@char @}{%1644 \MT@exp@cs\MT@map@tlist@c{MT@inh@\MT@kn@inh@name @\MT@char @}\MT@set@kn@heirs1645 }%1646 }%1647 }1648 \def\MT@set@kn@heirs#1{%1649 \knbccode\MT@font#1=\knbccode\MT@font\MT@char1650 \knaccode\MT@font#1=\knaccode\MT@font\MT@char1651 \MT@dinfo@nl{2}{-- heir of \MT@char: #1}%1652 \MT@dinfo@nl{4}{;;; knbc (#1): \number\knbccode\MT@font\MT@char/%1653 \number\knaccode\MT@font\MT@char}%1654 }


IMPLEMENTATION: Font setup 71\MT@preset@kn1655 \def\MT@set@all@kn#1#2{%1656 \MT@dinfo@nl{3}{-- knac/knbc: setting all to #1/#2}%1657 \let\MT@temp\@empty1658 \MT@ifempty{#1}\relax{\g@addto@macro\MT@temp{\knbccode\MT@font\@tempcnta=#1\relax}}%1659 \MT@ifempty{#2}\relax{\g@addto@macro\MT@temp{\knaccode\MT@font\@tempcnta=#2\relax}}%1660 \MT@do@font\MT@temp1661 }1662 \def\MT@reset@kn@codes@{\MT@set@all@kn\z@\z@}1663 \let\MT@reset@kn@codes\relax\MT@preset@kn@ 1664 \def\MT@preset@kn{%1665 \expandafter\expandafter\expandafter\MT@preset@kn@1666 \csname MT@kn@c@\MT@kn@c@name @preset\endcsname\@nil1667 }1668 \def\MT@preset@kn@#1,#2\@nil{%1669 \ifx\MT@kn@unit@\@empty1670 \MT@warn@preset@towidth{kn}%1671 \let\MT@preset@aux\MT@preset@aux@factor1672 \else1673 \def\MT@preset@aux{\MT@preset@aux@space2}%1674 \fi1675 \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux{#1}\@tempa}%1676 \MT@ifempty{#2}{\let\@tempb\@empty}{\MT@preset@aux{#2}\@tempb}%1677 \MT@set@all@kn\@tempa\@tempb1678 }1679 }\relax1680 \MT@tracking\MT@tracking@\MT@tr@font@list\MT@set@tr@codes14.2.5 TrackingThis only works with pdfTEX 1.40 or LuaTEX 0.62.1681 1682 \MT@requires@pdftex61683 \MT@requires@luatex31684 {We only check whether a font should not be letterspaced at all, not whether we’vealready done that (because we have to do it again).1685 \let\MT@tr@font@list\@empty1686 \def\MT@tracking@{%1687 \MT@exp@one@n\MT@in@clist\MT@font\MT@tr@font@list1688 \ifMT@inlist@\else1689 \MT@maybe@do{tr}%1690 \ifMT@do\else1691 \xdef\MT@tr@font@list{\MT@tr@font@list\MT@font,}%1692 \fi1693 \fi1694 }1695 1696 \let\MT@tracking1697 \MT@tracking@1698 \relax<strong>The</strong> tracking amount is determined by the optional argument to \textls, settingsfrom \SetTracking, or the global letterspace option, in this order.1699 1700 \def\MT@set@tr@codes{%1701 1702 \MT@vinfo{Tracking font `\MT@@font’\on@line}%1703 \MT@get@font@dimen@six{%1704 \MT@if@list@exists1705 \MT@get@tr@opt


IMPLEMENTATION: Font setup 72\MT@lsfont1706 \relax1707 1708 \MT@ifdefined@c@TF\MT@letterspace@\relax{\let\MT@letterspace@\MT@letterspace}%1709 \ifnum\MT@letterspace@=\z@Zero tracking requires special treatment.1710 \MT@set@tr@zero1711 \else1712 \MT@vinfo{... Tracking by \number\MT@letterspace@}%Letterspacing only works in PDF mode.1713 \MT@warn@tracking@DVI<strong>The</strong> letterspaced font instances are saved in macros \〈font name〉/〈letterspacingamount〉ls.In contrast to \MT@font, which may reflect the font characteristics more accurately(taking substitutions into account), \font@name is guaranteed to correspondto an actual font identifier.1714 \xdef\MT@lsfont{\csname\expandafter\string\font@name1715 /\number\MT@letterspace@ ls\endcsname}%1716 \expandafter\ifx\MT@lsfont\relax1717 \MT@dinfo@nl{1}{... new letterspacing instance}%In case of nested letterspacing with different amounts, we have to extract the basefont again.1718 \MT@get@ls@basefont1719 \global\expandafter\letterspacefont\MT@lsfont\font@name\MT@letterspace@Scale interword spacing (not configurable in letterspace).1720 1721 \MT@ifdefined@c@TF\MT@tr@ispace1722 {\let\@tempa\MT@tr@ispace}%1723 {\edef\@tempa{\MT@letterspace@*,,}}%1724 \MT@ifdefined@c@TF\MT@tr@ospace1725 {\edef\@tempa{\@tempa,\MT@tr@ospace}}%1726 {\edef\@tempa{\@tempa,,,}}%1727 \expandafter\MT@tr@set@space\@tempa,%1728 1729 1730 % spacing = {*,,}1731 \fontdimen2\MT@lsfont=\dimexpr\numexpr 1000+\MT@letterspace@\relax sp1732 * \fontdimen2\MT@lsfont/1000\relax1733 Adjust outer kerning (<strong>microtype</strong> only).1734 1735 \MT@ifdefined@c@TF\MT@tr@okern{\let\@tempa\MT@tr@okern}{\def\@tempa{*,*}}%1736 \expandafter\MT@tr@set@okern\@tempa,%Disable ligatures (not configurable in letterspace).1737 \MT@ifdefined@c@T\MT@tr@ligatures\MT@tr@noligatures1738 1739 1740 % no ligatures = {f}1741 \tagcode\MT@lsfont`f=\m@ne1742 Adjust protrusion values now, and maybe later (in \MT@pr@split@val) (not forLuaTEX, though, where the letterspaced font inherits the protrusion values fromthe base font).1743 \MT@dinfo@nl{2}{... compensating for tracking (\number\MT@letterspace@)}%1744 \MT@do@font{\lpcode\MT@lsfont\@tempcnta=\numexpr\MT@letterspace@/2\relax1745 \rpcode\MT@lsfont\@tempcnta=\numexpr\MT@letterspace@/2\relax}%


IMPLEMENTATION: Font setup 73\MT@set@curr@ls\MT@curr@ls\MT@set@curr@os\MT@set@curr@ok1746 \let\MT@the@pr@code\MT@the@pr@code@tr1747 \fiFinally, let the letterspaced font propagate. With LuaTEX, we also need to load.1748 \aftergroup\MT@set@lsfont1749 \let\MT@font\MT@lsfont1750 \ifMT@fontspec\MT@font\fiWe need to remember the current letterspacing amount (for \lslig).1751 \xdef\MT@set@curr@ls{\def\noexpand\MT@curr@ls{\MT@letterspace@}}%1752 \aftergroup\MT@set@curr@lsAdjust surrounding spacing and kerning.We get the current outer spacing and adjust it, then, after the end of the currentouter group, set the current outer spacing, again, and adjust.1753 1754 \MT@outer@space=\csname MT@outer@space\expandafter\string\font@name\endcsname\relax1755 \xdef\MT@set@curr@os{\MT@outer@space=\the\MT@outer@space\relax}%1756 \MT@tr@outer@l1757 If \MT@ls@adjust is empty, it’s the starred version of \textls. Use scaling to avoida ‘Dimension too large’.1758 \ifx\MT@ls@adjust\@empty1759 % \textls : outer kerning = {*,*} ; \textls* : outer kerning = {0,0}1760 \MT@outer@kern=-\dimexpr\MT@letterspace@ sp * \fontdimen6\font@name/2000\relax1761 \MT@ls@outer@kOtherwise, get the current outer kerning and adjust it, for left and right side(<strong>microtype</strong> only).1762 1763 \else1764 \MT@outer@kern=\expandafter\expandafter\expandafter\@firstoftwo1765 \csname MT@outer@kern\expandafter\string\font@name\endcsname\relax1766 \ifdim\MT@outer@kern=\z@\else \MT@ls@outer@k \fi1767 \MT@outer@kern=\expandafter\expandafter\expandafter\@secondoftwo1768 \csname MT@outer@kern\expandafter\string\font@name\endcsname\relax1769 1770 1771 \xdef\MT@set@curr@ok{\MT@outer@kern=\the\MT@outer@kern\relax}%1772 \MT@afteraftergroup{%1773 \MT@set@curr@ok1774 \noexpand\MT@ls@outer@k1775 }%1776 1777 \fi1778 Carry the outer kerning amount to outside the next group, then set outer spacing(which will set kerning, if no space follows).1779 \xdef\MT@set@curr@ok{\MT@outer@kern=\the\MT@outer@kern\relax}%Stuff to be done after the letterspace group. <strong>The</strong> letterspace <strong>package</strong> only adjuststhe kerning.1780 \MT@afteraftergroup{%1781 \MT@set@curr@os1782 \MT@set@curr@ok1783 \noexpand\MT@tr@outer@r1784 }%1785 1786 \fiSince protrusion values are inherited in LuaTEX, we switch off the setup for this


IMPLEMENTATION: Font setup 74\MT@afteraftergroup\MT@get@tr@opt\MT@tr@unit@\MT@tr@ispace\MT@tr@ospace\MT@tr@okern\MT@tr@ligatures\MT@get@tr@opt@\MT@set@lsfontfont.1787 \MT@protrusionfalse1788 }%1789 }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.(Following an idea of Will Robertson.)1790 \def\MT@afteraftergroup#1{%1791 \MT@ifdefined@n@TF{MT@aftergroup@\number\currentgrouplevel}\relax{%1792 \MT@exp@cs\xdef{MT@aftergroup@\number\currentgrouplevel}%1793 {\MT@exp@cs\MT@glet{MT@aftergroup@\number\currentgrouplevel}\noexpand\@undefined#1}%1794 \expandafter\aftergroup\expandafter\aftergroup\MT@exp@cs\aftergroup1795 {MT@aftergroup@\number\currentgrouplevel}%1796 }%1797 }1798 Various settings (only for the <strong>microtype</strong> version).1799 1800 \def\MT@get@tr@opt{%1801 \MT@set@listname1802 \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name}{%1803 \MT@let@cn\MT@letterspace{MT@tr@c@\MT@tr@c@name}%Different unit?1804 \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name @unit}{%1805 \MT@let@cn\MT@tr@unit@{MT@tr@c@\MT@tr@c@name @unit}%1806 \ifdim\MT@tr@unit@=1em1807 \let\MT@tr@unit@\@undefined1808 \else1809 \MT@let@cn\@tempb{MT@tr@c@\MT@tr@c@name}%1810 \MT@get@unit\MT@tr@unit@1811 \let\MT@tr@factor@\@m1812 \MT@scale@to@em1813 \edef\MT@letterspace{\number\@tempcntb}%1814 \fi1815 }%1816 }%Adjust interword spacing.1817 \MT@get@tr@opt@{spacing} {ispace}%1818 \MT@get@tr@opt@{outerspacing}{ospace}%Adjust outer kerning.1819 \MT@get@tr@opt@{outerkerning}{okern}%Which ligatures should we disable (empty means all, undefined none)?1820 \MT@get@tr@opt@{noligatures} {ligatures}%1821 }1822 \def\MT@get@tr@opt@#1#2{%1823 \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name @#1}%1824 {\MT@let@nn{MT@tr@#2}{MT@tr@c@\MT@tr@c@name @#1}}%1825 }1826 Redefine \font@name, which will be called a second later (in \selectfont).1827 1828 \MT@requires@latex2{1829 \def\MT@set@lsfont{\MT@exp@two@c\let\font@name\MT@lsfont}


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


IMPLEMENTATION: Font setup 76\MT@tr@noligatures\MT@outer@space\MT@tr@set@space\MT@tr@set@space@1875 \MT@dinfo@nl{1}{... fixing base font}%1876 \aftergroup\MT@set@lsbasefont1877 \fi1878 }1879 pdfTEX 1.40.0–1.40.3 disabled all ligatures in letterspaced fonts.1880 1881 \MT@requires@pdftex7{1882 \def\MT@tr@noligatures{%1883 \ifx\MT@tr@ligatures\@empty1884 \MT@noligatures@\MT@lsfont\@undefined1885 \else1886 \MT@noligatures@\MT@lsfont\MT@tr@ligatures1887 \fi1888 }1889 1890 }{1891 \def\MT@tr@noligatures{%1892 \MT@warning@nl{%1893 Disabling selected ligatures is only possible since\MessageBreak1894 pdftex 1.40.4. Disabling all ligatures instead}%1895 \MT@glet\MT@tr@noligatures\relax1896 }1897 }1898 A new skip for outer spacing.1899 \newskip\MT@outer@spaceAdjust interword spacing (\fontdimen 2–4) for inner and outer space. For innerspacing, the font dimensions will be adjusted, the settings for outer spacing will beremembered in a macro.1900 \def\MT@tr@set@space#1,#2,#3,#4,#5,#6,{%1901 \MT@dinfo@nl2{... orig. space: \the\fontdimen2\MT@lsfont,1902 \the\fontdimen3\MT@lsfont, \the\fontdimen4\MT@lsfont1903 \MessageBreak... (#1,#2,#3) (#4,#5,#6)}%1904 \let\MT@temp\@empty1905 \MT@tr@set@space@{#1}{#4}{2}\@empty1906 \MT@tr@set@space@{#2}{#5}{3}\@plus1907 \MT@tr@set@space@{#3}{#6}{4}\@minus1908 \MT@glet@nc{MT@outer@space\expandafter\string\font@name}\MT@temp1909 \MT@dinfo@nl2{... inner space: \the\fontdimen2\MT@lsfont,1910 \the\fontdimen3\MT@lsfont, \the\fontdimen4\MT@lsfont}%1911 \MT@dinfo@nl2{... outer space: \MT@temp}%1912 }If settings for outer spacing 〈#2〉 don’t exist, they will be inherited from the innerspacing settings 〈#1〉.1913 \def\MT@tr@set@space@#1#2#3#4{%1914 \MT@ifempty{#2}{%1915 \MT@ifempty{#1}{%1916 \edef\MT@temp{\MT@temp#4\the\fontdimen#3\MT@lsfont}%1917 }{%1918 \MT@tr@set@space@@{#1}{#3}{1000}%1919 \edef\MT@temp{\MT@temp#4\the\@tempdima}%1920 \fontdimen#3\MT@lsfont=\@tempdima1921 }%1922 }{%1923 \MT@tr@set@space@@{#2}{#3}{2000}%1924 \edef\MT@temp{\MT@temp#4\the\@tempdima}%1925 \MT@ifempty{#1}\relax{%1926 \MT@tr@set@space@@{#1}{#3}{1000}%1927 \fontdimen#3\MT@lsfont=\@tempdima


IMPLEMENTATION: Font setup 77\MT@tr@set@space@@\MT@tr@outer@l\MT@tr@outer@r1928 }%1929 }%1930 }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.1931 \def\MT@tr@set@space@@#1#2#3{%1932 \MT@test@ast#1*\@nil{%1933 \MT@ifdefined@c@TF\MT@tr@unit@1934 {\edef\@tempb{#1}\MT@scale@to@em}1935 {\@tempcntb=#1\relax}%1936 \@tempdima=\dimexpr \dimexpr\@tempcntb sp*\MT@dimen@six/1000\relax1937 -\fontdimen#2\MT@lsfont\relaxFor \fontdimen 2, we also have to subtract the kerning that letterspacing adds toeach side of the characters (only half if it’s for outer spacing).1938 \ifnum#2=\tw@1939 \advance\@tempdima -\dimexpr\MT@letterspace@ sp*\MT@dimen@six/#3\relax1940 \fi1941 \@tempdima=\dimexpr \fontdimen#2\MT@lsfont+\@tempdima\relax1942 }{%1943 \MT@ifempty\@tempa{\let\@tempa\MT@letterspace@}\relax1944 \@tempdima=\dimexpr \numexpr1000+\@tempa sp *\fontdimen#2\MT@lsfont/1000\relax1945 }%1946 \MT@dinfo@nl3{... : font dimen #2 (#1): \the\@tempdima}%1947 }Recall the last skip (must really be an interword space, not just a marker, nor a‘hard’ space, i.e., one that doesn’t contain stretch or shrink parts).1948 \def\MT@tr@outer@l{%1949 \ifhmode1950 \ifdim\lastskip>5sp1951 \edef\x{\the\lastskip minus 0pt}%1952 \setbox\z@\hbox{\MT@outer@space=\x}%1953 \ifdim\wd\z@>\z@1954 \MT@dinfo2{[[[ adjusting pre space: \the\MT@outer@space}%1955 \unskip \hskip\MT@outer@space\relaxDisable left outer kerning.1956 \let\MT@ls@outer@k\relax1957 \else<strong>The</strong> ragged2e <strong>package</strong> sets \spaceskip without glue.1958 \ifdim\lastskip=%1959 \ifnum\spacefactor


IMPLEMENTATION: Font setup 78\MT@tr@outer@next\MT@tr@outer@r@\MT@if@outer@next\MT@tr@outer@r@@disturb tikz.1976 \MT@addto@setup{%1977 \@if<strong>package</strong>loaded{tikz}1978 {\def\MT@tr@outer@r{%1979 \ifnum\tikz@expandcount>\z@ \else1980 \expandafter\MT@tr@outer@r@\fi}}1981 {\let\MT@tr@outer@r\MT@tr@outer@r@}}<strong>The</strong> following is borrowed from soul. I’ve added the cases for italic correction,since tracking may also be triggered by text commands (e.g., \textsc).1982 \def\MT@tr@outer@r@{%1983 \futurelet\MT@tr@outer@next\MT@tr@outer@r@@1984 }We avoid using \ifx tests, in case \MT@tr@outer@next is \let to \fi etc.1985 \def\MT@if@outer@next#1{%1986 \ifx\MT@tr@outer@next#1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi1987 }1988 \def\MT@tr@outer@r@@{%1989 \def\MT@temp*{}%Don’t adjust in math mode. <strong>The</strong>re was a tricky bug when \textls was the lastcommand in a \mathchoice group.1990 \ifmmode \elseA similar bug occurred when adjustment would happen inside a discretionarygroup, which we prevent here. This only works with e-TEX (which we know isavailable).1991 \ifnum\currentgrouptype=10 \else1992 \def\MT@temp*##1{\ifhmode\hskip\MT@outer@space1993 \MT@dinfo2{]]] adjusting post space (1): \the\MT@outer@space}%1994 \fi}%1995 \expandafter\ifcat\expandafter\noexpand\csname MT@tr@outer@next\endcsname\egroup1996 \ifhmode\unkern\fi\egroup1997 \MT@set@curr@ok \MT@set@curr@os1998 \def\MT@temp*{\afterassignment\MT@tr@outer@r@\let\MT@temp=}%1999 \elseIf the next token is \maybe@ic (from an enclosing text command), we gobble it,read the next one, feed it to \maybe@ic@ (via \MT@tr@outer@icr) and then callourselves again.2000 \MT@if@outer@next\maybe@ic{%2001 \MT@set@curr@ok \MT@set@curr@os2002 \def\MT@temp*{\afterassignment\MT@tr@outer@icr\let\MT@temp=}%2003 }{%If the next token is \check@icr (from an inner text command), we insert ourselvesjust before it. This will then call \maybe@ic again the next round (which howeverwill always insert an italic correction, since it doesn’t read beyond our group).2004 \MT@if@outer@next\check@icr{%2005 \def\MT@temp*{\aftergroup\MT@tr@outer@r@\check@icr\let\MT@temp=}%2006 }{%2007 \MT@if@outer@next\@sptoken{%2008 \def\MT@temp* {\ifhmode\hskip\MT@outer@space2009 \MT@dinfo2{]]] adjusting post space (2): \the\MT@outer@space}%2010 \fi}%2011 }{%2012 \MT@if@outer@next~{%2013 \def\MT@temp*~{\nobreak\hskip\MT@outer@space


IMPLEMENTATION: Font setup 79\MT@tr@outer@icr\MT@tr@outer@icr@\MT@xspace\textls\MT@ls@adjust@2014 \MT@dinfo2{]]] adjusting post space (3): \the\MT@outer@space}%2015 }%2016 }{%2017 \MT@if@outer@next\ \relax{%2018 \MT@if@outer@next\space\relax{%2019 \MT@if@outer@next\@xobeysp\relax{%xspace requires special treatment.2020 \MT@if@outer@next\xspace{%2021 \def\MT@temp*\xspace{\futurelet\@let@token\MT@xspace}%2022 }{%If there’s no outer spacing, there may be outer kerning.2023 \def\MT@temp*{\ifdim\MT@outer@kern=\z@\else\MT@ls@outer@k2024 \MT@dinfo2{--- adjusting post kern: \the\MT@outer@kern}%2025 \fi}%2026 \MT@let@nc{MT@tr@outer@next}\relax2027 }}}}}}}}\fi2028 \fi\fi2029 \MT@temp*%2030 }Helper macros for the italic correction mess.2031 \def\MT@tr@outer@icr{\afterassignment\MT@tr@outer@icr@\MT@tr@outer@r@}2032 \def\MT@tr@outer@icr@{%2033 \let\@let@token= \MT@tr@outer@next2034 \maybe@ic@2035 }If the group is followed by \xspace, we first feed \xspace with the next token, thencheck whether it has inserted a space.2036 \def\MT@xspace{\@xspace@firsttrue\@xspace2037 \ifdim\lastskip>5sp2038 \unskip \hskip\MT@outer@space2039 \else2040 \ifdim\MT@outer@kern=\z@\else\MT@ls@outer@k \fi2041 \fi2042 }For older pdfTEX versions and LuaTEX, throw an error.2043 }{2044 \DeclareRobustCommand\lsstyle{%2045 \MT@error{Letterspacing only works with \MT@engine tex version2046 1.40%2047 0.62%2048 \MessageBreak or newer}2049 {Upgrade \MT@engine tex, or try the `soul’ <strong>package</strong> instead.}%2050 \MT@glet\lsstyle\relax2051 }2052 }And forTEX, too.EX2053 2054 2055 \DeclareRobustCommand\lsstyle{%2056 \MT@error{Letterspacing currently doesn’t work with xetex}2057 {Run pdftex or luatex, or use the `soul’ <strong>package</strong> instead.}%2058 \MT@glet\lsstyle\relax2059 }2060 This command may be used like the other text commands. <strong>The</strong> starred versionremoves kerning on the sides. <strong>The</strong> optional argument changes the letterspacingfactor.


IMPLEMENTATION: Font setup 80\MT@textls\MT@letterspace@\MT@ls@adjust\MT@ls@adjust@empty\MT@ls@adjust@relax\MT@ls@set@ls\MT@ls@too@large\MT@outer@kern\MT@tr@set@okern\MT@tr@set@okern@2061 2062 \DeclareRobustCommand\textls{%2063 \@ifstar{\let\MT@ls@adjust@\MT@ls@adjust@empty\MT@textls}%2064 {\let\MT@ls@adjust@\MT@ls@adjust@relax\MT@textls}%2065 }This is now almost L A TEX’s \DeclareTextFontCommand, with the difference that weadjust the outer spacing and kerning also for \lsstyle, while L A TEX’s text switchesdon’t bother about italic correction.2066 \newcommand\MT@textls[2][]{%2067 \ifmmode2068 \nfss@text{\MT@ls@set@ls{#1}\lsstyle#2}%2069 \else2070 \hmode@bgroup2071 \MT@ls@set@ls{#1}%2072 \lsstyle #2%2073 \expandafter2074 \egroup2075 \fi2076 }Set current letterspacing amount and outer kerning. This has to be done inside thesame group as the letterspacing command.2077 \def\MT@ls@adjust@empty{\let\MT@ls@adjust\@empty}2078 \def\MT@ls@adjust@relax{\let\MT@ls@adjust\relax}2079 \def\MT@ls@set@ls#1{%2080 \MT@ifempty{#1}%2081 {\let\MT@letterspace@\@undefined}%2082 {\KV@@sp@def\MT@letterspace@{#1}%2083 \edef\MT@letterspace@{\number\MT@letterspace@}%2084 \MT@ls@too@large\MT@letterspace@}%2085 \MT@ls@adjust@2086 }Test whether letterspacing amount is too large.2087 \def\MT@ls@too@large#1{%2088 \ifnum#1>\MT@tr@max2089 \MT@warning{Maximum for option `letterspace’ is \number\MT@tr@max}%2090 \let#1\MT@tr@max2091 \else2092 \ifnum#1


IMPLEMENTATION: Font setup 81\MT@ls@outer@k2111 \MT@ifdefined@c@TF\MT@tr@unit@2112 {\edef\@tempb{#1}\MT@scale@to@em}2113 {\@tempcntb=#1\relax}%2114 \@tempdima=\dimexpr \@tempcntb sp * \MT@dimen@six/1000\relax2115 }{%2116 \MT@ifempty\@tempa{\let\@tempa\@m}\relax2117 \@tempdima=\dimexpr \numexpr\@tempa*\MT@letterspace@/1000\relax sp2118 * \fontdimen6\MT@lsfont/2000\relax2119 }%2120 \advance\@tempdima -\dimexpr \MT@letterspace@ sp2121 * \fontdimen6\MT@lsfont/2000\relax2122 \edef\MT@temp{\MT@temp{\the\@tempdima}}%2123 }2124 Adjust outer kerning. We additionally add a marker (\kern3sp\kern-3sp) for casesof nested letterspacing without anything actually printed.2125 2126 \def\MT@ls@outer@k{%2127 \ifhmode2128 \ifdim\lastkern=-3sp \unkern2129 \ifdim\lastkern=3sp \kern-3sp2130 \expandafter\expandafter\expandafter\@gobble2131 \else \unkern2132 \expandafter\expandafter\expandafter\@firstofone2133 \fi2134 \else2135 \expandafter\@firstofone2136 \fi2137 {\kern\MT@outer@kern\kern3sp\kern-3sp\relax}%2138 \fi2139 }2140 \MT@noligatures\MT@noligatures@14.2.6 Disabling ligatures<strong>The</strong> possibility to disable ligatures is a new features of pdfTEX 1.30, and also workswith LuaTEX.2141 2142 \MT@requires@pdftex5{2143 \def\MT@noligatures{%2144 \MT@dotrue2145 \let\@tempa\MT@nl@setname2146 \MT@map@clist@n{font,encoding,family,series,shape,size}{%2147 \MT@ifdefined@n@TF{MT@checklist@##1}%2148 {\csname MT@checklist@##1\endcsname}%2149 {\MT@checklist@{##1}}%2150 {nl}%2151 }%2152 \ifMT@do2153 \MT@noligatures@\MT@font\MT@nl@ligatures2154 \fi2155 }This is also used by \MT@set@tr@codes.2156 \def\MT@noligatures@#1#2{%2157 \MT@ifdefined@c@TF#2{%Early MiKTEX versions (before 2.5.2579) didn’t know \tagcode.2158 \MT@ifdefined@c@TF\tagcode{%No ‘inputenc’ key.2159 \let\MT@warn@maybe@inputenc\@empty


IMPLEMENTATION: Font setup 822160 \def\MT@curr@list@name{\@backslashchar DisableLigatures}%2161 \MT@map@clist@c#2{%2162 \KV@@sp@def\@tempa{##1}\MT@get@slot2163 \ifnum\MT@char>\m@ne \tagcode#1\MT@char=\m@ne \fi}%2164 \MT@vinfo{... Disabling ligatures for characters: #2}%2165 }{%2166 \pdfnoligatures#1%2167 \MT@warning{Cannot disable selected ligatures (pdftex doesn’t\MessageBreak2168 know \@backslashchar tagcode). Disabling all ligatures of\MessageBreak2169 the font instead}%2170 }%2171 }{%2172 \pdfnoligatures#1%2173 \MT@vinfo{... Disabling ligatures}%2174 }%2175 }2176 }\relax2177 \MT@load@list\MT@find@file\MT@file@list14.2.7 Loading the configurationRecurse through the lists to be loaded.2178 2179 \def\MT@load@list#1{%2180 \edef\@tempa{#1}%2181 \MT@let@cn\@tempb{MT@\MT@feat @c@\@tempa @load}%2182 \MT@ifstreq\@tempa\@tempb{%2183 \MT@error{\@nameuse{MT@abbr@\MT@feat} list `\@tempa’ cannot load itself}{}%2184 }{%2185 \ifx\@tempb\relax \else2186 \MT@ifdefined@n@TF{MT@\MT@feat @c@\@tempb}{%2187 \MT@vinfo{... : First loading \@nameuse{MT@abbr@\MT@feat} list `\@tempb’}%2188 \begingroup2189 \MT@load@list\@tempb2190 \endgroup2191 \edef\MT@curr@list@name{\@nameuse{MT@abbr@\MT@feat} list2192 \noexpand\MessageBreak`\@tempb’}%2193 \MT@let@cn\@tempc{MT@\MT@feat @c@\@tempb}%2194 \expandafter\MT@set@codes\@tempc,\relax,%2195 }{%2196 \MT@error{\@nameuse{MT@abbr@\MT@feat} list `\@tempb’ undefined.\MessageBreak2197 Cannot load it from list `\@tempa’}{}%2198 }%2199 \fi2200 }%2201 }Micro-typographic settings may be written into a file mt-〈font family〉.cfg.We must also record whether we’ve already loaded the file.2202 \let\MT@file@list\@empty2203 \def\MT@find@file#1{%Check for existence of the file only once.2204 \MT@in@clist{#1}\MT@file@list2205 \ifMT@inlist@ \elseDon’t forget that because reading the files takes place inside a group, all commandsthat may be used there have to be defined globally.2206 \MT@begin@catcodes2207 \let\MT@begin@catcodes\relax2208 \let\MT@end@catcodes\relax2209 \InputIfFileExists{mt-#1.cfg}{%2210 \edef\MT@curr@file{mt-#1.cfg}%


IMPLEMENTATION: Font setup 83\MT@cfg@catcodes\MT@begin@catcodes\MT@end@catcodes\MT@get@basefamily2211 \MT@vinfo{... Loading configuration file \MT@curr@file}%2212 \MT@xadd\MT@file@list{#1,}%2213 }{%2214 \MT@get@basefamily#1\@empty\@empty\@empty\@nil2215 \MT@exp@one@n\MT@in@clist\@tempa\MT@file@list2216 \ifMT@inlist@2217 \MT@xadd\MT@file@list{#1,}%2218 \else2219 \InputIfFileExists{mt-\@tempa.cfg}{%2220 \edef\MT@curr@file{mt-\@tempa.cfg}%2221 \MT@vinfo{... Loading configuration file \MT@curr@file}%2222 \MT@xadd\MT@file@list{\@tempa,#1,}%2223 }{%2224 \MT@vinfo{... No configuration file mt-#1.cfg}%2225 \MT@xadd\MT@file@list{#1,}%2226 }%2227 \fi2228 }%2229 \endgroup2230 \fi2231 }We have to make sure that all characters have the correct category code. Especially,new lines and spaces should be ignored, since files might be loaded in the middleof the document. This is basically \nfss@catcodes (from the L A TEX kernel). I’veadded: & (in tabulars), !, ?, ;, : (french), ,, $, _ , ~, and = (Turkish babel).OK, now all printable characters up to 127 are ‘other’. We hope that letters arealways letters and numbers other. (listings makes them active, see section 14.1.5.)We leave ^ at catcode 7, so that stuff like ‘^^ff’ remains possible.2232 \def\MT@cfg@catcodes{%2233 \makeatletter2234 \catcode`\^7%2235 \catcode`\ 9%2236 \catcode`\^^I9%2237 \catcode`\^^M9%2238 \catcode`\\\z@2239 \catcode`\{\@ne2240 \catcode`\}\tw@2241 \catcode`\#6%2242 \catcode`\%14%2243 \MT@map@tlist@n2244 {\!\"\$\&\’\(\)\*\+\,\-\.\/\:\;\\?\[\]\ _ \`\|\~}%2245 \@makeother2246 }This will be used before reading the files as well as in the configuration commands\Set..., and \DeclareCharacterInheritance, so that the catcodes are alsoharmless when these commands are used outside the configuration files.2247 \def\MT@begin@catcodes{%2248 \begingroup2249 \MT@cfg@catcodes2250 }End group if outside configuration file (otherwise relax).2251 \let\MT@end@catcodes\endgroup<strong>The</strong> family name might have a suffix e.g., for expert set (x), old style numbers (j)swash capitals (w) etc. We mustn’t 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.2252 \def\MT@get@basefamily#1#2#3#4\@nil{%


IMPLEMENTATION: Font setup 84Table 4:Order for matching fontattributes1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16.Encoding • • • • • • • • • • • • • • • •Family • • • • • • • • - - - - - - - -Series • • • • - - - - • • • • - - - -Shape • • - - • • - - • • - - • • - -Size • - • - • - • - • - • - • - • -\MT@get@basefamily@\MT@listname\MT@get@listname\MT@get@listname@\MT@try@order\MT@next@listname2253 \ifx\@empty#4%2254 \def\@tempa{#1#2#3}%2255 \else2256 \let\@tempa\@empty2257 \edef\@tempb{#1#2#3#4}%2258 \expandafter\MT@get@basefamily@\@tempb\@nil2259 \fi2260 }This will only remove one suffix (the longest match), so that combinations of suffixeswould have be to added manually (e.g., \DeclareMicrotypeVariants*{aw}). Butotherwise, something like ‘padx’ would be truncated to ‘p’.2261 \def\MT@get@basefamily@#1#2\@nil{%2262 \edef\@tempa{\@tempa#1}%2263 \ifx\\#2\\\expandafter\@gobble\else\expandafter\@firstofone\fi2264 {\MT@in@tlist{#2}\MT@variants2265 \ifMT@inlist@\else\MT@get@basefamily@#2\@nil\fi}%2266 }Try all combinations of font family, series, shape and size to get a list for the currentfont.2267 \def\MT@get@listname#1{%2268 \MT@dinfo@nl{1}{trying to find \@nameuse{MT@abbr@#1} list for font `\MT@@font’}%2269 \let\MT@listname\@undefined2270 \def\@tempb{#1}%2271 \MT@map@tlist@c\MT@try@order\MT@get@listname@2272 }2273 \def\MT@get@listname@#1{%2274 \expandafter\MT@next@listname#1%2275 \ifx\MT@listname\@undefined \else2276 \expandafter\MT@tlist@break2277 \fi2278 }Beginning with version 1.7, we always check for the font size. Since the matchingorder has become more logical now, it can be described in words, so that we don’tneed table 4 in the documentation part any longer and can cast it off here.2279 \def\MT@try@order{%2280 {1111}{1110}{1101}{1100}{1011}{1010}{1001}{1000}%2281 {0111}{0110}{0101}{0100}{0011}{0010}{0001}{0000}%2282 }<strong>The</strong> current context is added to the font attributes. That is, the context must match.2283 \def\MT@next@listname#1#2#3#4{%2284 \ifnum#1=\z@\MT@nofamilytrue\fi2285 \edef\@tempa{\MT@encoding2286 /\ifnum#1=\@ne \MT@family \fi2287 /\ifnum#2=\@ne \MT@series \fi2288 /\ifnum#3=\@ne \MT@shape \fi2289 /\ifnum#4=\@ne *\fi2290 \MT@context}%2291 \MT@dinfo@nl{1}{trying \@tempa}%


IMPLEMENTATION: Font setup 85\MT@next@listname@\MT@if@list@exists2292 \MT@ifdefined@n@TF{MT@\@tempb @\@tempa}{%2293 \MT@next@listname@#4%2294 }{%Also try with an alias family.2295 \ifnum#1=\@ne2296 \ifx\MT@familyalias\@empty \else2297 \edef\@tempa{\MT@encoding2298 /\MT@familyalias2299 /\ifnum#2=\@ne \MT@series\fi2300 /\ifnum#3=\@ne \MT@shape\fi2301 /\ifnum#4=\@ne *\fi2302 \MT@context}%2303 \MT@dinfo@nl{1}{(alias) \@tempa}%2304 \MT@ifdefined@n@T{MT@\@tempb @\@tempa}{%2305 \MT@next@listname@#4%2306 }%2307 \fi2308 \fi2309 }%2310 }If size is to be evaluated, do that, otherwise use the current list.2311 \def\MT@next@listname@#1{%2312 \ifnum#1=\@ne2313 \MT@exp@cs\MT@in@rlist{MT@\@tempb @\@tempa @sizes}%2314 \ifMT@inlist@2315 \let\MT@listname\MT@size@name2316 \fi2317 \else2318 \MT@let@cn\MT@listname{MT@\@tempb @\@tempa}%2319 \fi2320 }\MT@context 2321 \def\MT@if@list@exists{%2322 \MT@let@cn\MT@context{MT@\MT@feat @context}%2323 \MT@ifstreq{@}\MT@context{\let\MT@context\@empty}\relax2324 \MT@get@listname{\MT@feat @c}%2325 \MT@ifdefined@c@TF\MT@listname{%2326 \MT@edef@n{MT@\MT@feat @c@name}{\MT@listname}%2327 \ifMT@nonselected2328 \MT@vinfo{... Applying non-selected expansion (list `\MT@listname’)}%2329 \else2330 \MT@vinfo{... Loading \@nameuse{MT@abbr@\MT@feat} list `\MT@listname’}%2331 \fi2332 \@firstoftwo2333 }{%Since the name cannot be \@empty, this is a sound proof that no matching listexists.2334 \MT@let@nc{MT@\MT@feat @c@name}\@emptyDon’t warn if selected=false.2335 \ifMT@nonselected2336 \MT@vinfo{... Applying non-selected expansion (no list)}%2337 \elseTracking doesn’t require a list, either.2338 \MT@ifstreq\MT@feat{tr}\relax{%2339 \MT@warning{I cannot find a \@nameuse{MT@abbr@\MT@feat} list2340 for font\MessageBreak`\MT@@font’%2341 \ifx\MT@context\@empty\else\space(context: `\MT@context’)\fi.2342 Switching off\MessageBreak\@nameuse{MT@abbr@\MT@feat} for this font}%2343 }%


IMPLEMENTATION: Font setup 86\MT@get@inh@list\MT@context2344 \fi2345 \@secondoftwo2346 }%2347 }<strong>The</strong> inheritance lists are global (no context).2348 \def\MT@get@inh@list{%2349 \let\MT@context\@empty2350 \MT@get@listname{\MT@feat @inh}%2351 \MT@ifdefined@c@TF\MT@listname{%2352 \MT@edef@n{MT@\MT@feat @inh@name}{\MT@listname}%2353 \MT@dinfo@nl{1}{... Using \@nameuse{MT@abbr@\MT@feat} inheritance list2354 `\MT@listname’}%2355 \MT@let@cn\@tempc{MT@\MT@feat @inh@\MT@listname}%If the list is \@empty, it has already been parsed.2356 \ifx\@tempc\@empty \else2357 \MT@dinfo@nl{1}{parsing inheritance list ...}%<strong>The</strong> group is only required in case an input encoding is given.2358 \begingroup2359 \edef\MT@curr@list@name{inheritance list\noexpand\MessageBreak`\MT@listname’}%2360 \MT@set@inputenc{inh}%2361 \expandafter\MT@inh@do\@tempc,\relax,%2362 \MT@glet@nc{MT@\MT@feat @inh@\MT@listname}\@empty2363 \endgroup2364 \fi2365 }{%2366 \MT@let@nc{MT@\MT@feat @inh@name}\@undefined2367 }%2368 }\MT@get@slot14.2.8 Translating characters into slots\MT@char\MT@char@Get the slot number of the character in the current encoding.<strong>The</strong>re are lots of possibilities how a character may be specified in the configurationfiles, 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 asphinx’s riddle if anything goes wrong.<strong>The</strong> character is in \@tempa, we want its slot number in \MT@char.2369 \def\MT@get@slot{%2370 \escapechar`\\2371 \let\MT@char@\m@ne2372 \MT@noresttrueSave unexpanded string in case we need to issue a warning message.2373 \MT@toks=\expandafter{\@tempa}%Now, let’s walk through (hopefully) all possible cases.• It’s a letter, a character or a number.2374 \expandafter\MT@is@letter\@tempa\relax\relax2375 \ifnum\MT@char@ < \z@• It might be an active character, i.e., an 8-bit character defined by inputenc. If so,we will expand it here to its LICR form.2376 \MT@exp@two@c\MT@is@active\string\@tempa\@nil


IMPLEMENTATION: Font setup 87\MT@get@slot@• OK, so it must be a macro. We do not allow random commands but only thosedefined in L A TEX’s idiosyncratic font encoding scheme:If \〈encoding〉\〈command〉 (that’s one command) is defined, we try to extract theslot number.We must be cautious not to stumble over accented characters consisting of twocommands, like \‘\i or \U\CYRI, hence, \string wouldn’t be safe enough.2377 \MT@ifdefined@n@TF{\MT@encoding\MT@detokenize@c\@tempa}%2378 \MT@is@symbol• Now, we’ll catch the rest, which hopefully is an accented character (e.g. \"a).2379 {\expandafter\MT@is@composite\@tempa\relax\relax}%2380 \ifnum\MT@char@ < \z@• It could also be a \chardefed command (e.g., the percent character). This seemsthe least likely case, so it’s last.2381 \expandafter\MT@exp@two@c\expandafter\MT@is@char\expandafter2382 \meaning\expandafter\@tempa\MT@charstring\relax\relax\relax2383 \fi2384 \fi2385 \let\MT@char\MT@char@2386 \MT@get@slot@2387 \escapechar\m@ne2388 }2389 2390 2391 \def\MT@get@slot@{%If it’s a legacy (i.e., TFM) font, proceed as usual.2392 \ifnum\XeTeXfonttype\MT@font=\z@2393 \ifnum\MT@char > \m@neIn LuaTEX, it may also be a glyph name, prefixed with ‘/’.2394 2395 \ifnum\MT@char=47\relax2396 \ifMT@norest \else2397 \@tempcnta=\MT@lua{2398 local glyph = <strong>microtype</strong>.name _ to _ slot([[\expandafter\@gobble\@tempa]],true)2399 if glyph then tex.write(glyph)2400 else tex.write(-1)2401 end2402 }\relax2403 \ifnum\@tempcnta `\the\MT@toks’ is a glyph name (\the\@tempcnta)}%2409 \fi2410 \fi2411 \else2412 If the user has specified something like ‘fi’, or wanted to define a number butforgot to use three digits, we’ll have something left of the string. In this case, weissue a warning and forget the complete string.2413 \ifMT@norest \else


IMPLEMENTATION: Font setup 882414 \MT@warn@rest2415 \let\MT@char\m@ne2416 \let\MT@char\@empty2417 \fi2418 \fi2419 \else2420 \MT@warn@unknown2421 \fi2422 2423 \else<strong>The</strong>re are more possibilities for TEX: It may also be a glyph name (prefixedwith ‘/’). We indicate this to \MT@get@charwd by reversing the sign of \MT@char@.2424 \ifnum\MT@char=47\relax2425 \ifMT@norest \edef\MT@char{U47}%2426 \else2427 \@tempcnta=\XeTeXglyphindex"\expandafter\@gobble\@tempa"\relax2428 \ifnum\@tempcnta=\z@2429 \MT@warn@unknown2430 \let\MT@char\@empty2431 \else2432 \edef\MT@char{\@tempa\space}%2433 \edef\MT@char@{-\the\@tempcnta}%2434 \MT@dinfo@nl{3}{> `\the\MT@toks’ is a glyph name (\the\@tempcnta)}%2435 \fi2436 \fi2437 \else2438 \ifnum\MT@char > \m@ne2439 \ifMT@norestEXOr, it’s a Unicode number, which we mustn’t translate into a glyph number, sincethe latter is font-specific.2440 \@tempcnta=\XeTeXcharglyph\MT@char\relax2441 \ifnum\@tempcnta=\z@2442 \MT@info@missing@char2443 \let\MT@char\@empty2444 \else2445 \MT@dinfo@nl{3}{> (glyph number: \the\@tempcnta,2446 glyph name: \XeTeXglyphname\MT@font\@tempcnta)}%2447 \edef\MT@char{U\MT@char}%2448 \fi2449 \else2450 \MT@warn@rest2451 \let\MT@char\@empty2452 \fi2453 \else2454 \MT@warn@unknown2455 \let\MT@char\@empty2456 \fi2457 \fi2458 \fi2459 2460 }2461 This is the lua function to translate glyph name into slot number. Beginning withv2.2, luaotfload provides this function in an API, which we use if available, but(for now, at least) keep the old code for backward compatibility.2462 2463 if luaotfload and luaotfload.aux and luaotfload.aux.slot _ of _ name then2464 local slot _ of _ name = luaotfload.aux.slot _ of _ name2465 <strong>microtype</strong>.name _ to _ slot = function(name, unsafe)2466 return slot _ of _ name(font.current(), name, unsafe)2467 end


IMPLEMENTATION: Font setup 89\MT@is@letter\MT@max@char\MT@max@slot\ifMT@norest\MT@is@number2468 else2469 -- we dig into internal structure (should be avoided)2470 local function name _ to _ slot(name, unsafe)2471 if fonts then2472 local unicodes2473 if fonts.ids then --- legacy luaotfload2474 local tfmdata = fonts.ids[font.current()]2475 if not tfmdata then return end2476 unicodes = tfmdata.shared.otfdata.luatex.unicodes2477 else --- new location2478 local tfmdata = fonts.hashes.identifiers[font.current()]2479 if not tfmdata then return end2480 unicodes = tfmdata.resources.unicodes2481 end2482 local unicode = unicodes[name]2483 if unicode then --- does the ’or’ branch actually exist?2484 return type(unicode) == "number" and unicode or unicode[1]2485 end2486 end2487 end2488 <strong>microtype</strong>.name _ to _ slot = name _ to _ slot2489 end24902491 Input is a letter, a character or a number.Warning if resulting character or slot number is too large.2492 2493 \def\MT@max@char2494 {127 }2495 {1114111 }2496 \def\MT@max@slot2497 {255 }2498 {1114111 }2499 Test whether all of the string has been used up.2500 2501 \newif\ifMT@norest2502 \def\MT@is@letter#1#2\relax{%2503 \ifcat a\noexpand#1\relax2504 \edef\MT@char@{\number`#1}%2505 \ifx\\#2\\%2506 \MT@dinfo@nl{3}{> `\the\MT@toks’ is a letter (\MT@char@)}%2507 \else2508 \MT@norestfalse2509 \fi2510 \else2511 \ifcat !\noexpand#1\relax2512 \edef\MT@char@{\number`#1}%2513 \MT@dinfo@nl{3}{> `\the\MT@toks’ is a character (\MT@char@)}%2514 \ifx\\#2\\%2515 \ifnum\MT@char@ > \MT@max@char \MT@warn@ascii \fi2516 \else2517 \MT@norestfalse2518 \expandafter\MT@is@number#1#2\relax\relax2519 \fi2520 \fi2521 \fi2522 }Numbers may be specified as a three-digit decimal number (029), as a hexadecimalnumber (prefixed with ": "1D) or as a octal number (prefixed with ’: ’35). <strong>The</strong>ymust consist of at least three characters (including the prefix), that is, "F is not


IMPLEMENTATION: Font setup 90\MT@is@active\MT@undefined@charpermitted.2523 \def\MT@is@number#1#2#3\relax{%2524 \ifx\relax#3\relax \else2525 \ifx\relax#2\relax \else2526 \MT@noresttrue2527 \if#1"\relax2528 \def\x{\uppercase{\edef\MT@char@{\number#1#2#3}}}\x2529 \MT@dinfo@nl{3}{> ... a hexadecimal number: \MT@char@}%2530 \else2531 \if#1’\relax2532 \def\MT@char@{\number#1#2#3}%2533 \MT@dinfo@nl{3}{> ... an octal number: \MT@char@}%2534 \else2535 \MT@ifint{#1#2#3}{%2536 \def\MT@char@{\number#1#2#3}%2537 \MT@dinfo@nl{3}{> ... a decimal number: \MT@char@}%2538 }\MT@norestfalse2539 \fi2540 \fi2541 \ifnum\MT@char@ > \MT@max@slot2542 \MT@warn@number@too@large{\noexpand#1\noexpand#2\noexpand#3}%2543 \let\MT@char@\m@ne2544 \fi2545 \fi2546 \fi2547 }Expand an active character. (This was completely broken in v1.7, and only workedby chance before.) We \set@display@protect to translate, e.g., Ä into \"A, that isto whatever it is defined in the inputenc encoding file.Unfortunately, the (older) inputenc definitions prefer the protected/genericvariants (e.g., \copyright instead of \textcopyright), which our parser won’tbe able to understand. (I’m fed up now, so you have to complain if you really,really want to be able to write ‘©’ instead of \textcopyright, thus rendering yourconfiguration files unportable.)Unicode characters (inputenc/utf8,utf8x) are also supported.2548 \def\MT@is@active#1#2\@nil{%2549 \ifnum\catcode`#1 = \active2550 \begingroup2551 \set@display@protect2552 \let\IeC\@firstofone2553 \let\@inpenc@undefined@\MT@undefined@charWe refrain from checking whether there is a sufficient number of octets.2554 \def\UTFviii@defined##1{\ifx ##1\relax2555 \MT@undefined@char{utf8}\else\expandafter ##1\fi}%For ucs (utf8x). Let’s call it experimental . . .2556 \MT@ifdefined@c@T\PrerenderUnicode2557 {\PrerenderUnicode{\@tempa}\let\unicode@charfilter\@firstofone}%2558 \edef\x{\endgroup2559 \def\noexpand\@tempa{\@tempa}%Append what we think the translation is to the token register we use for the log.2560 \MT@toks={\the\MT@toks\space(= \@tempa)}%2561 }%2562 \x2563 \fi2564 }For characters not defined in the current input encoding.2565 \def\MT@undefined@char#1{undefined in input encoding ``#1’’}


IMPLEMENTATION: Font setup 91\MT@is@symbol\MT@is@char\MT@charstring\MT@charxstring\MT@strip@prefix\MT@is@charx\MT@is@composite<strong>The</strong> symbol commands might expand to funny stuff, depending on context. Insteadof simply expanding \〈command〉, we construct the command \〈encoding〉\〈command〉and see whether its meaning is \char"〈hex number〉, which is the case for everythingthat has been defined with \DeclareTextSymbol in the encoding definitionfiles.2566 \def\MT@is@symbol{%2567 \expandafter\def\expandafter\MT@char\expandafter2568 {\csname\MT@encoding\MT@detokenize@c\@tempa\endcsname}%2569 \expandafter\MT@exp@two@c\expandafter\MT@is@char\expandafter2570 \meaning\expandafter\MT@char\MT@charstring\relax\relax\relax2571 \ifnum\MT@char@ < \z@. . . or, if it hasn’t been defined by \DeclareTextSymbol, a letter (e.g., \i, whenusing frenchpro).2572 \expandafter\expandafter\expandafter\MT@is@letter\MT@char\relax\relax2573 \fi2574 }A helper macro that inspects the \meaning of its argument.2575 \begingroup2576 \catcode`\/=\z@2577 /MT@map@tlist@n{/\CHARLEX}/@makeother2578 /lowercase{%2579 /def/x{/endgroup2580 /def/MT@charstring{\CHAR"}%2581 /def/MT@is@char##1\CHAR"##2##3##4/relax{%2582 /ifx/relax##4/relax2583 /ifMT@xunicode2584 /expandafter/MT@is@charx/MT@strip@prefix##1>/relax\CHAR "%2585 /relax/relax/relax/relax/relax2586 /fi2587 /else2588 /ifx/relax##1/relax2589 /if##3\/relax2590 /edef/MT@char@{/number"##2}%2591 /MT@ifstreq/MT@charstring{##3##4}/relax/MT@norestfalse2592 /else2593 /edef/MT@char@{/number"##2##3}%2594 /MT@ifstreq/MT@charstring{##4}/relax/MT@norestfalse2595 /fi2596 /MT@dinfo@nl{3}{> `/the/MT@toks’ is a \char (/MT@char@)}%2597 /fi2598 /fi2599 }%For xunicode, which doesn’t \countdef, but rather \defs the chars.2600 /def/MT@charxstring{\CHAR "}%2601 /def/MT@strip@prefix##1>##2/relax{##2}%2602 /def/MT@is@charx##1\CHAR "##2##3##4##5##6/relax{%2603 /ifx/relax##1/relax2604 /ifx/relax##6/relax/else2605 /edef/MT@char@{/number"##2##3##4##5}%2606 /MT@ifstreq{\RELAX >\CHAR "}{##6}/relax/MT@norestfalse2607 /MT@dinfo@nl{3}{> `/the/MT@toks’ is a xunicode \char (/MT@char@)}%2608 /fi2609 /fi2610 }%2611 }%2612 }2613 /xHere, we are dealing with accented characters, specified as two tokens.


IMPLEMENTATION: Font setup 92\MT@curr@list@name\MT@set@listname\MT@warn@ascii\MT@warn@number@too@large2614 \def\MT@is@composite#1#2\relax{%2615 \ifx\\#2\\\elseAgain, we construct a control sequence, this time of the form: \\〈encoding〉\〈accent〉-〈character〉, e.g., \\T1\"-a, which we then expand once to see if it is aletter (if it has been defined by \DeclareTextComposite). This should be robust,finally, especially, since we also \detokenize the input instead of only \stringifyingit. Thus, we will die gracefully even on wrong Unicode input without utf8.2616 \expandafter\def\expandafter\MT@char\expandafter{\csname\expandafter2617 \string\csname\MT@encoding\endcsname2618 \MT@detokenize@n{#1}-\MT@detokenize@n{#2}\endcsname}%2619 \expandafter\expandafter\expandafter\MT@is@letter\MT@char\relax\relaxAgain, xunicode.2620 \ifnum\MT@char@ < \z@2621 \ifMT@xunicode2622 \edef\MT@char{\MT@exp@two@c\MT@strip@prefix\meaning\MT@char>\relax}%2623 \expandafter\MT@exp@two@c\expandafter\MT@is@charx\expandafter2624 \MT@char\MT@charxstring\relax\relax\relax\relax\relax2625 \fi2626 \fi2627 \fi2628 }[What about math? Well, for a moment the following looked like a solution, with\mt@is@mathchar defined accordingly, analogous to \MT@is@char above, to pick upthe last two tokens (the \meaning of a \mathchardef’ed command expands to itshexadecimal notation):\def\MT@is@mathchar#1{%\if\relax\noexpand#1% it's a macro\let\x#1%\else % it's a character\mathchardef\x=\mathcode`#1\relax\fi\expandafter\MT@exp@two@c\expandafter\mt@is@mathchar\expandafter\meaning\expandafter\x\mt@mathcharstring\relax\relax\relax}However, the problem is that \mathcodes and \mathchardefs have global scope.<strong>The</strong>refore, if they are changed by a <strong>package</strong> that loads different math fonts, thereis no guarantee whatsoever that things will still be correct (e.g., the minus in cmsywhen the euler <strong>package</strong> is loaded). So, no way to go, unfortunately.]Some warning messages, for performance reasons separated here.<strong>The</strong> type and name of the current list, defined at various places.2629 \def\MT@set@listname{%2630 \edef\MT@curr@list@name{\@nameuse{MT@abbr@\MT@feat} list\noexpand\MessageBreak2631 `\@nameuse{MT@\MT@feat @c@name}’}%2632 }For ‘other’ characters > 127, we issue a warning (inputenc probably hasn’t beenloaded), since correspondence with the slot numbers would be purely coincidental.2633 \def\MT@warn@ascii{%2634 \MT@warning@nl{Character `\the\MT@toks’ (= \MT@char@)2635 is outside of ASCII range.\MessageBreak2636 You must load the `inputenc’ <strong>package</strong> before using\MessageBreak2637 8-bit characters in \MT@curr@list@name}%2638 }Number too large.2639 \def\MT@warn@number@too@large#1{%


IMPLEMENTATION: Font setup 93\MT@warn@rest\MT@warn@unknown\MT@warn@maybe@inputenc2640 \MT@warning@nl{%2641 Number #1 in encoding `\MT@encoding’ too large!\MessageBreak2642 Ignoring it in \MT@curr@list@name}%2643 }Not all of the string has been parsed.2644 \def\MT@warn@rest{%2645 \MT@warning@nl{%2646 Unknown slot number of character\MessageBreak`\the\MT@toks’%2647 \MT@warn@maybe@inputenc\MessageBreak2648 in font encoding `\MT@encoding’.\MessageBreak2649 Make sure it’s a single character\MessageBreak2650 (or a number) in \MT@curr@list@name}%2651 }No idea what went wrong.2652 \def\MT@warn@unknown{%2653 \MT@warning@nl{%2654 Unknown slot number of character\MessageBreak`\the\MT@toks’%2655 \MT@warn@maybe@inputenc\MessageBreak2656 in font encoding `\MT@encoding’ in \MT@curr@list@name}%2657 }In case an input encoding had been requested.2658 \def\MT@warn@maybe@inputenc{%2659 \MT@ifdefined@n@T2660 {MT@\MT@feat @\MT@cat @\csname MT@\MT@feat @\MT@cat @name\endcsname @inputenc}%2661 { (input encoding `\@nameuse2662 {MT@\MT@feat @\MT@cat @\csname MT@\MT@feat @\MT@cat @name\endcsname @inputenc}’)}%2663 }14.2.9 Hook into L A TEX’s font selectionWe append \MT@setupfont to \pickup@font, which is called by L A TEX every time afont is selected. We then check whether we’ve already seen this font, and if not,set it up for micro-typography. This ensures that we will catch all fonts, and thatwe will not set up fonts more than once. <strong>The</strong> whole <strong>package</strong> really hangs on thiscommand.In contrast to the pdfcprot <strong>package</strong>, 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:• \pickup@font is called by \selectfont, \wrong@fontshape, or\getanddefine@fonts (for math).• \pickup@font calls \define@newfont.• \define@newfont may call (inside a group!)– \wrong@fontshape, which in turn will call \pickup@font, and thus\define@newfont again, or– \extract@font.• \get@external@font is called by \extract@font, by itself, and by the substitutionmacros.Up to version 1.3 of this <strong>package</strong>, we were using \define@newfont as the hook,which is only called for new fonts, and therefore seemed the natural choice. However,this meant that we had to take special care to catch all fonts: we additionally


IMPLEMENTATION: Font setup 94\MT@font@list\MT@font\MT@orig@pickupfonthad to set up the default font, the error font (if it wasn’t the default font), we hadto check for some <strong>package</strong>s that might have been loaded before <strong>microtype</strong> andwere loading fonts, e.g., 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 \pickup@font and decide for ourselves whether we’vealready seen that font. I hope the overhead isn’t too large.We use a comma separated list.2664 \let\MT@font@list\@empty2665 \let\MT@font\@emptyAll this is done at the beginning of the document. It doesn’t work for plain, ofcourse, which doesn’t have \pickup@font.2666 2667 2668 \MT@requires@latex2{2669 \MT@addto@setup{%<strong>microtype</strong> also works with CJK in the sense that nothing will break when both<strong>package</strong>s are used at the same time. However, since CJK has its own way of encoding,it is currently not possible to create character-specific settings. That is, the onlyfeature available with CJK fonts is expansion. (Tracking doesn’t really work forother reasons.) Like us, CJK redefines \pickup@font.2670 \@if<strong>package</strong>loaded{CJK}{%2671 \@if<strong>package</strong>later{CJK}{2006/10/17}% 4.7.02672 {\def\MT@orig@pickupfont{\CJK@ifundefined\CJK@plane}}%2673 {\def\MT@orig@pickupfont{\@ifundefined{CJK@plane}}}%2674 \g@addto@macro\MT@orig@pickupfont2675 {{\expandafter\ifx\font@name\relax\define@newfont\fi}}%CJKutf8 redefines \pickup@font once more (recent versions, in PDF mode, asdetermined by ifpdf, which CJKutf8 loads).2676 \@if<strong>package</strong>loaded{CJKutf8}%2677 {\@if<strong>package</strong>later{CJKutf8}{2008/05/22}% 4.8.02678 {\ifpdf\expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi}%2679 {\@firstoftwo}}%2680 {\@firstoftwo}%2681 {\g@addto@macro\MT@orig@pickupfont{%2682 {\expandafter\ifx\csname\curr@fontshape/\f@size/\CJK@plane\endcsname\relax2683 \define@newfont\else\xdef\font@name{%2684 \csname \curr@fontshape/\f@size/\CJK@plane\endcsname}\fi}}}%2685 {\g@addto@macro\MT@orig@pickupfont{%2686 {\expandafter\ifx\csname \curr@fontshape/\f@size/\CJK@plane\endcsname\relax2687 \define@newfont\def\CJK@temp{v}%2688 \ifx\CJK@temp\CJK@plane2689 \expandafter\ifx\csname CJK@cmap@\f@family\CJK@plane\endcsname\relax2690 \else\csname CJK@cmap@\f@family\CJK@plane\endcsname\fi2691 \else \CJK@addcmap\CJK@plane \fi2692 \else\xdef\font@name{%2693 \csname \curr@fontshape/\f@size/\CJK@plane\endcsname}\fi}}}%2694 }{%2695 \def\MT@orig@pickupfont{\expandafter\ifx\font@name\relax\define@newfont\fi}%2696 }%Check whether \pickup@font is defined as expected. <strong>The</strong> warning issued by\CheckCommand* would be a bit too generic.2697 \ifx\pickup@font\MT@orig@pickupfont \else2698 \MT@warning@nl{%2699 Command \string\pickup@font\space is not defined as expected.%


IMPLEMENTATION: Font setup 95\pickup@font\MT@pickupfont\do@subst@correction\add@accent\MT@orig@add@accent2700 \MessageBreak Patching it anyway. Some things may break%2701 2702 .\MessageBreak Double-check whether micro-typography is indeed%2703 \MessageBreak applied to the document.%2704 \MessageBreak (Hint: Turn on `verbose’ mode)%2705 2706 }%2707 \fi<strong>The</strong>n we append our stuff. Everything is done inside a group.2708 \g@addto@macro\pickup@font{\begingroup}%If the trace <strong>package</strong> is loaded, we turn off tracing of <strong>microtype</strong>’s setup, which isextremely noisy.2709 \MT@with@<strong>package</strong>@T{trace}{\g@addto@macro\pickup@font{\conditionally@traceoff}}%2710 \g@addto@macro\pickup@font{%2711 \escapechar\m@ne2712 2713 \global\MT@inannottrue2714 \MT@glet\MT@pdf@annot\@empty2715 \MT@addto@annot{(line \number\inputlineno)}%If \MT@font is empty, no substitution has taken place, hence \font@name is correct.Otherwise, if they are different, \font@name 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.2716 \MT@let@cn\MT@font{MT@subst@\expandafter\string\font@name}%2717 \ifx\MT@font\relax2718 \let\MT@font\font@name2719 \else2720 \ifx\MT@font\font@name \else2721 \MT@addto@annot{= substituted with \MT@@font}%2722 \MT@register@subst@font2723 \fi2724 \fi2725 \MT@setupfont2726 2727 \MT@tracking2728 \endgroup2729 }%2730 Remember the patched command for later.2731 \let\MT@pickupfont\pickup@fontAdditionally, we hook into \do@subst@correction, 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.2732 \g@addto@macro\do@subst@correction2733 {\edef\MT@font{\csname\curr@fontshape/\f@size\endcsname}%2734 \MT@glet@nc{MT@subst@\expandafter\string\font@name}\MT@font}%Inside \add@accent, we have to disable <strong>microtype</strong>’s setup, since the grouping inthe patched \pickup@font would break the accent if different fonts are used forthe base character and the accent. Fortunately, L A TEX takes care that the fonts usedfor the \accent are already set up, so that we cannot be overlooking them.2735 \let\MT@orig@add@accent\add@accent2736 \def\add@accent#1#2{%2737 \let\pickup@font\MT@orig@pickupfont


IMPLEMENTATION: Font setup 96\MT@check@font\MT@register@font\MT@register@subst@font2738 \MT@orig@add@accent{#1}{#2}%2739 \let\pickup@font\MT@pickupfont2740 }%2741 2742 }2743 }\relax2744 Consequently (if all goes well), we are the last ones to change these commands,therefore there is no need to check whether our definition has survived.Check whether we’ve already seen the current font.2745 \def\MT@check@font{\MT@exp@one@n\MT@in@clist\MT@font\MT@font@list}Register the current font.2746 \def\MT@register@font{\xdef\MT@font@list{\MT@font@list\MT@font,}}Register the substituted font (only if it isn’t registered already).2747 \def\MT@register@subst@font{\MT@exp@one@n\MT@in@clist\font@name\MT@font@list2748 \ifMT@inlist@\else\xdef\MT@font@list{\MT@font@list\font@name,}\fi}\MT@active@features\MT@check@font@cx\MT@register@subst@font@cx\MT@register@font@cx14.2.10 Context-sensitive setupHere are the variants for context-sensitive setup.<strong>The</strong> activated features are stored in this command.2749 \let\MT@active@features\@emptyEvery feature has its own list of fonts that have already been dealt with. If thefont needn’t 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 we’ve done it before.2750 \def\MT@check@font@cx{%2751 \MT@if@true2752 \MT@map@clist@c\MT@active@features{%2753 \expandafter\MT@exp@one@n\expandafter\MT@in@clist\expandafter\MT@font2754 \csname MT@##1@\csname MT@##1@context\endcsname font@list\endcsname2755 \ifMT@inlist@2756 \MT@let@nc{MT@\@nameuse{MT@abbr@##1}}\relax2757 \else2758 \MT@if@false2759 \fi2760 }%2761 \ifMT@if@ \MT@inlist@true \else \MT@inlist@false \fi2762 }Add the substituted font to each feature list.2763 \def\MT@register@subst@font@cx{%2764 \MT@map@clist@c\MT@active@features{%2765 \expandafter\MT@exp@one@n\expandafter\MT@in@clist\expandafter\font@name2766 \csname MT@##1@\csname MT@##1@context\endcsname font@list\endcsname2767 \ifMT@inlist@ \else2768 \MT@exp@cs\MT@xadd2769 {MT@##1@\csname MT@##1@context\endcsname font@list}%2770 {\font@name,}%2771 \fi2772 }%2773 }For each feature, add the current font to the list, unless we didn’t set it up.2774 \def\MT@register@font@cx{%2775 \MT@map@clist@c\MT@active@features{%2776 \MT@exp@cs\ifx{MT@\@nameuse{MT@abbr@##1}}\relax\else


IMPLEMENTATION: Font setup 97\MT@maybe@rem@from@list\<strong>microtype</strong>context\text<strong>microtype</strong>context\MT@reset@context\MT@reset@context@\MT@setup@contexts2777 \MT@exp@cs\MT@xadd2778 {MT@##1@\csname MT@##1@context\endcsname font@list}%2779 {\MT@font,}%2780 \def\@tempa{##1}%2781 \MT@exp@cs\MT@map@tlist@c{MT@##1@doc@contexts}\MT@maybe@rem@from@list2782 \fi2783 }%2784 }Recurse through all context font lists of the document and remove the font, unlessit’s the current context.2785 \def\MT@maybe@rem@from@list#1{%2786 \MT@ifstreq{\@tempa/#1}{\@tempa/\csname MT@\@tempa @context\endcsname}\relax{%2787 \expandafter\MT@exp@one@n\expandafter\MT@rem@from@clist\expandafter2788 \MT@font \csname MT@\@tempa @#1font@list\endcsname2789 }%2790 }<strong>The</strong> user may change the context, so that different setups are possible. This isespecially useful for multi-lingual documents.Inside the preamble, it shouldn’t actually do anything but remember it for later.2791 \def\<strong>microtype</strong>context#1{\MT@addto@setup{\<strong>microtype</strong>context{#1}}}2792 \MT@addto@setup{%2793 \DeclareRobustCommand\<strong>microtype</strong>context[1]{%2794 \MT@setup@contexts2795 \let\MT@reset@context\relaxWe need to ensure that math fonts are set up anew.2796 \let\glb@currsize\@empty2797 \setkeys{MTC}{#1}%2798 \selectfont2799 \MT@reset@context2800 }%2801 }This is just a wrapper around \<strong>microtype</strong>context.2802 \DeclareRobustCommand\text<strong>microtype</strong>context[2]{{\<strong>microtype</strong>context{#1}#2}}We have to reset the font at the end of the group, provided there actually was achange.2803 \def\MT@reset@context@{%2804 \MT@vinfo{


IMPLEMENTATION: Configuration 98\MT@pr@context\MT@ex@context\MT@tr@context\MT@sp@context\MT@kn@context\MT@pr@doc@contexts\MT@ex@doc@contexts\MT@tr@doc@contexts\MT@sp@doc@contexts\MT@kn@doc@contexts\DeclareMicrotypeSet\MT@extra@context\DeclareMicrotypeSet*\MT@DeclareSet2822 \ifMT@inlist@Using an empty context is only asking for trouble, therefore we choose the ‘@’instead (hoping for the L A TEX users’ natural awe of this character).2823 \MT@ifempty{##1}{\def\MT@val{@}}{\def\MT@val{##1}}%2824 \MT@exp@cs\ifx{MT@\@tempb @context}\MT@val2825 \MT@dinfo{1}{>>> no change of #1 context: `\MT@val’}%2826 \else2827 \MT@vinfo{>>> Changing #1 context to `\MT@val’\MessageBreak\on@line2828 \space(previous: `\@nameuse{MT@\@tempb @context}’)%2829 }%2830 \def\MT@reset@context{\aftergroup\MT@reset@context@}%<strong>The</strong> next time we see the font, we have to reset all factors.2831 \MT@glet@nn{MT@reset@\@tempb @codes}{MT@reset@\@tempb @codes@}%We must also keep track of all contexts in the document.2832 \expandafter\MT@exp@one@n\expandafter\MT@in@tlist\expandafter2833 \MT@val \csname MT@\@tempb @doc@contexts\endcsname2834 \ifMT@inlist@ \else2835 \MT@exp@cs\MT@xadd{MT@\@tempb @doc@contexts}{{\MT@val}}%2836 \MT@dinfo{1}{||| added #1 context: \@nameuse{MT@\@tempb @doc@contexts}}%2837 \fi2838 \MT@edef@n{MT@\@tempb @context}{\MT@val}%2839 \fi2840 \fi2841 }%2842 }Initialise the contexts.2843 \MT@exp@one@n\MT@map@clist@n{\MT@features,nl}{%2844 \MT@def@n{MT@#1@context}{@}%2845 \MT@def@n{MT@#1@doc@contexts}{{@}}%2846 }2847 \let\MT@extra@context\@empty14.3 Configuration14.3.1 Font setsCalling this macro will create a comma list for every font attribute of the form:\MT〈feature〉list@〈attribute〉@〈set name〉. If the optional argument is empty, lists forall available features will be created.<strong>The</strong> 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.2848 \def\DeclareMicrotypeSet{%2849 \@ifstar2850 \MT@DeclareSetAndUseIt2851 \MT@DeclareSet2852 }2853 \newcommand\MT@DeclareSet[3][]{%2854 \KV@@sp@def\@tempa{#1}%2855 \MT@ifempty\@tempa{%2856 \MT@map@clist@c\MT@features{{\MT@declare@sets{##1}{#2}{#3}}}%2857 }{%2858 \MT@map@clist@c\@tempa{{%2859 \KV@@sp@def\@tempa{##1}%2860 \MT@ifempty\@tempa\relax{%2861 \MT@is@feature{set declaration `#2’}{%


IMPLEMENTATION: Configuration 99\MT@DeclareSetAndUseIt\MT@curr@set@name\MT@declare@sets\MT@define@set@key@\MT@get@highlevel2862 \MT@exp@one@n\MT@declare@sets2863 {\csname MT@rbba@\@tempa\endcsname}{#2}{#3}%2864 }%2865 }%2866 }}%2867 }%2868 }2869 \newcommand\MT@DeclareSetAndUseIt[3][]{%2870 \MT@DeclareSet[#1]{#2}{#3}%2871 \UseMicrotypeSet[#1]{#2}%2872 }We need to remember the name of the set currently being declared.2873 \let\MT@curr@set@name\@emptyDefine the current set name and parse the keys.2874 \def\MT@declare@sets#1#2#3{%2875 \KV@@sp@def\MT@curr@set@name{#2}%2876 \MT@ifdefined@n@T{MT@#1@set@@\MT@curr@set@name}{%2877 \MT@warning{Redefining \@nameuse{MT@abbr@#1} set `\MT@curr@set@name’}%2878 \MT@glet@nc{MT@#1list@size@\MT@curr@set@name}\@empty2879 }%2880 \MT@glet@nc{MT@#1@set@@\MT@curr@set@name}\@empty2881 \MT@dinfo{1}{declaring \@nameuse{MT@abbr@#1} set `\MT@curr@set@name’}%2882 \setkeys{MT@#1@set}{#3}%2883 }〈#1〉 = font axis, 〈#2〉 = feature.2884 \def\MT@define@set@key@#1#2{%2885 \define@key{MT@#2@set}{#1}[]{%2886 \MT@glet@nc{MT@#2list@#1@\MT@curr@set@name}\@empty2887 \MT@map@clist@n{##1}{%2888 \KV@@sp@def\MT@val{####1}%2889 \MT@get@highlevel{#1}%We do not add the expanded value to the list . . .2890 \MT@exp@two@n\g@addto@macro2891 {\csname MT@#2list@#1@\MT@curr@set@name\expandafter\endcsname}%2892 {\MT@val,}%2893 }%. . . but keep in mind that the list has to be expanded at the end of the preamble.2894 \expandafter\g@addto@macro\expandafter\MT@font@sets2895 \csname MT@#2list@#1@\MT@curr@set@name\endcsname2896 \MT@dinfo@nl{1}{-- #1: \@nameuse{MT@#2list@#1@\MT@curr@set@name}}%2897 }%2898 }Saying, for instance, ‘family=rm*’ or ‘shape=bf*’ will expand to \rmdefault resp.\bfdefault.2899 \def\MT@get@highlevel#1{%2900 \expandafter\MT@test@ast\MT@val*\@nil\relax{%And ‘family = *’ will become \familydefault.2901 \MT@ifempty\@tempa{\def\@tempa{#1}}\relax2902 \edef\MT@val{\expandafter\noexpand\csname \@tempa default\endcsname}%In contrast to earlier version, these values will not be expanded immediately but atthe end of the preamble.2903 }%2904 }


IMPLEMENTATION: Configuration 100\MT@test@ast\MT@font@sets\MT@fix@font@set\MT@define@set@key@size\MT@get@range\MT@upper\MT@lowerIt the last character is an asterisk, execute the second argument, otherwise the firstone.2905 \def\MT@test@ast#1*#2\@nil{%2906 \def\@tempa{#1}%2907 \MT@ifempty{#2}%2908 }Fully expand the font specification and fix catcodes for all font sets. Also removefontspec’s counters.2909 \let\MT@font@sets\@empty2910 \def\MT@fix@font@set#1{%2911 \xdef#1{#1}%2912 \ifMT@fontspec2913 \xdef#1{\expandafter\MT@scrubfeatures#1()\relax}%2914 \fi2915 \global\@onelevel@sanitize#1%2916 }size requires special treatment.2917 \def\MT@define@set@key@size#1{%2918 \define@key{MT@#1@set}{size}[]{%2919 \MT@map@clist@n{##1}{%2920 \KV@@sp@def\MT@val{####1}%2921 \expandafter\MT@get@range\MT@val--\@nil2922 \ifx\MT@val\relax \else2923 \MT@exp@cs\MT@xadd2924 {MT@#1list@size@\MT@curr@set@name}%2925 {{{\MT@lower}{\MT@upper}\relax}}%2926 \fi2927 }%2928 \MT@dinfo@nl{1}{-- size: \@nameuse{MT@#1list@size@\MT@curr@set@name}}%2929 }%2930 }Font sizes may also be specified as ranges. This has been requested by AndreasBühmann, who has also offered valuable help in implementing this. Now, it isfor instance possible to set up different lists for fonts with optical sizes. (<strong>The</strong>MinionPro project is trying to do this for the OpenType version of Adobe’s Minion.See http://developer.berlios.de/projects/minionpro/.)Ranges will be stored as triplets of {〈lower bound〉}{〈upper bound〉}{〈list name〉}.For simple sizes, the upper boundary is −1.2931 \def\MT@get@range#1-#2-#3\@nil{%2932 \MT@ifempty{#1}{%2933 \MT@ifempty{#2}{%2934 \let\MT@val\relax2935 }{%2936 \def\MT@lower{0}%2937 \def\MT@val{#2}%2938 \MT@get@size2939 \edef\MT@upper{\MT@val}%2940 }%2941 }{%2942 \def\MT@val{#1}%2943 \MT@get@size2944 \ifx\MT@val\relax \else2945 \edef\MT@lower{\MT@val}%2946 \MT@ifempty{#2}{%2947 \MT@ifempty{#3}%2948 {\def\MT@upper{-1}}%2048 pt is TEX’s maximum font size.2949 {\def\MT@upper{2048}}%


IMPLEMENTATION: Configuration 101\MT@get@size\MT@define@set@key@font2950 }{%2951 \def\MT@val{#2}%2952 \MT@get@size2953 \ifx\MT@val\relax \else2954 \MT@ifdim\MT@lower>\MT@val{%2955 \MT@error{%2956 Invalid size range (\MT@lower\space > \MT@val) in font set2957 `\MT@curr@set@name’.\MessageBreak Swapping sizes}{}%2958 \edef\MT@upper{\MT@lower}%2959 \edef\MT@lower{\MT@val}%2960 }{%2961 \edef\MT@upper{\MT@val}%2962 }%2963 \MT@ifdim\MT@lower=\MT@upper2964 {\def\MT@upper{-1}}%2965 \relax2966 \fi2967 }%2968 \fi2969 }%2970 }Translate a size selection command and normalise it.2971 \def\MT@get@size{%A single star would mean \sizedefault, which doesn’t exist, so we define it to be\normalsize.2972 \if*\MT@val\relax2973 \def\@tempa{\normalsize}%2974 \else2975 \MT@let@cn\@tempa{\MT@val}%2976 \fi2977 \ifx\@tempa\relax \else<strong>The</strong> relsize solution of parsing \@setfontsize does not work with the AMSclasses, among others. I hope my hijacking doesn’t do any harm. We redefine\set@fontsize, and not \@setfontsize because some classes might define the sizeselection commands by simply using \fontsize (e.g., the a0poster class).2978 \begingroup2979 \def\set@fontsize##1##2##3##4\@nil{\endgroup\def\MT@val{##2}}%2980 \@tempa\@nil2981 \fiTest whether we finally got a number or dimension so that we can strip the ‘pt’(\@defaultunits and \strip@pt are kernel macros).2982 \MT@ifdimen\MT@val{%2983 \@defaultunits\@tempdima\MT@val pt\relax\@nnil2984 \edef\MT@val{\strip@pt\@tempdima}%2985 }{%2986 \MT@warning{Could not parse font size `\MT@val’\MessageBreak2987 in font set `\MT@curr@set@name’}%2988 \let\MT@val\relax2989 }%2990 }2991 \def\MT@define@set@key@font#1{%2992 \define@key{MT@#1@set}{font}[]{%2993 \MT@glet@nc{MT@#1list@font@\MT@curr@set@name}\@empty2994 \MT@map@clist@n{##1}{%2995 \KV@@sp@def\MT@val{####1}%2996 \MT@ifstreq\MT@val*{\def\MT@val{*/*/*/*/*}}\relax2997 \expandafter\MT@get@font\MT@val/////\@nil


IMPLEMENTATION: Configuration 102\MT@get@font\MT@get@font@\MT@get@axis\MT@warn@axis@empty\UseMicrotypeSet2998 \MT@exp@two@n\g@addto@macro2999 {\csname MT@#1list@font@\MT@curr@set@name\expandafter\endcsname}%3000 {\MT@val,}%3001 }%3002 \expandafter\g@addto@macro\expandafter\MT@font@sets3003 \csname MT@#1list@font@\MT@curr@set@name\endcsname3004 \MT@dinfo@nl{1}{-- font: \@nameuse{MT@#1list@font@\MT@curr@set@name}}%3005 }%3006 }Translate any asterisks.3007 \def\MT@get@font#1/#2/#3/#4/#5/#6\@nil{%3008 \MT@get@font@{#1}{#2}{#3}{#4}{#5}{0}%3009 \ifx\MT@val\relax\def\MT@val{0}\fi3010 \expandafter\g@addto@macro\expandafter\@tempb\expandafter{\MT@val}%3011 \let\MT@val\@tempb3012 }Helper macro, also used by \MT@get@font@and@size.3013 \def\MT@get@font@#1#2#3#4#5#6{%3014 \let\@tempb\@empty3015 \def\MT@temp{#1/#2/#3/#4/#5}%3016 \MT@get@axis{encoding}{#1}%3017 \MT@get@axis{family} {#2}%3018 \MT@get@axis{series} {#3}%3019 \MT@get@axis{shape} {#4}%3020 \ifnum#6>\z@\edef\@tempb{\@tempb*}\fi3021 \MT@ifempty{#5}{%3022 \MT@warn@axis@empty{size}{\string\normalsize}%3023 \def\MT@val{*}%3024 }{%3025 \def\MT@val{#5}%3026 }%3027 \MT@get@size3028 }3029 \def\MT@get@axis#1#2{%3030 \def\MT@val{#2}%3031 \MT@get@highlevel{#1}%3032 \MT@ifempty\MT@val{%3033 \MT@warn@axis@empty{#1}{\csname #1default\endcsname}%3034 \expandafter\def\expandafter\MT@val\expandafter{\csname #1default\endcsname}%3035 }\relax3036 \expandafter\g@addto@macro\expandafter\@tempb\expandafter{\MT@val/}%3037 }3038 \def\MT@warn@axis@empty#1#2{%3039 \MT@warning{#1 axis is empty in font specification\MessageBreak3040 `\MT@temp’. Using `#2’ instead}%3041 }We can finally assemble all pieces to define \DeclareMicrotypeSet’s keys. <strong>The</strong>y arealso used for \DisableLigatures.3042 \MT@exp@one@n\MT@map@clist@n{\MT@features,nl}{%3043 \MT@define@set@key@{encoding}{#1}%3044 \MT@define@set@key@{family} {#1}%3045 \MT@define@set@key@{series} {#1}%3046 \MT@define@set@key@{shape} {#1}%3047 \MT@define@set@key@size {#1}%3048 \MT@define@set@key@font {#1}%3049 }To use a particular set we simply redefine MT@〈feature〉@setname. If the optional


IMPLEMENTATION: Configuration 103\MT@pr@setname\MT@ex@setname\MT@tr@setname\MT@sp@setname\MT@kn@setname\MT@use@set\DeclareMicrotypeSetDefault\MT@default@pr@set\MT@default@ex@set\MT@default@tr@set\MT@default@sp@set\MT@default@kn@set\MT@set@default@setargument is empty, set names for all features will be redefined.3050 \renewcommand*\UseMicrotypeSet[2][]{%3051 \KV@@sp@def\@tempa{#1}%3052 \MT@ifempty\@tempa{%3053 \MT@map@clist@c\MT@features{{\MT@use@set{##1}{#2}}}%3054 }{%3055 \MT@map@clist@c\@tempa{{%3056 \KV@@sp@def\@tempa{##1}%3057 \MT@ifempty\@tempa\relax{%3058 \MT@is@feature{activation of set `#2’}{%3059 \MT@exp@one@n\MT@use@set3060 {\csname MT@rbba@\@tempa\endcsname}{#2}%3061 }%3062 }%3063 }}%3064 }%3065 }Only use sets that have been declared.3066 \def\MT@use@set#1#2{%3067 \KV@@sp@def\@tempa{#2}%3068 \MT@ifdefined@n@TF{MT@#1@set@@\@tempa}{%3069 \MT@xdef@n{MT@#1@setname}{\@tempa}%3070 }{%3071 \MT@ifdefined@n@TF{MT@#1@setname}\relax{%3072 \MT@xdef@n{MT@#1@setname}{\@nameuse{MT@default@#1@set}}%3073 }%3074 \MT@error{%3075 <strong>The</strong> \@nameuse{MT@abbr@#1} set `\@tempa’ is undeclared.\MessageBreak3076 Using set `\@nameuse{MT@#1@setname}’ instead}{}%3077 }%3078 }This command can be used in the main configuration file to declare the defaultfont set, in case no set is specified in the <strong>package</strong> options.3079 \renewcommand*\DeclareMicrotypeSetDefault[2][]{%3080 \KV@@sp@def\@tempa{#1}%3081 \MT@ifempty\@tempa{%3082 \MT@map@clist@c\MT@features{{\MT@set@default@set{##1}{#2}}}%3083 }{%3084 \MT@map@clist@c\@tempa{{%3085 \KV@@sp@def\@tempa{##1}%3086 \MT@ifempty\@tempa\relax{%3087 \MT@is@feature{declaration of default set `#2’}{%3088 \MT@exp@one@n\MT@set@default@set3089 {\csname MT@rbba@\@tempa\endcsname}{#2}%3090 }%3091 }%3092 }}%3093 }%3094 }3095 \def\MT@set@default@set#1#2{%3096 \KV@@sp@def\@tempa{#2}%3097 \MT@ifdefined@n@TF{MT@#1@set@@\@tempa}{%3098 \MT@dinfo{1}{declaring default \@nameuse{MT@abbr@#1} set `\@tempa’}%3099 \MT@xdef@n{MT@default@#1@set}{\@tempa}%3100 }{%3101 \MT@error{%3102 <strong>The</strong> \@nameuse{MT@abbr@#1} set `\@tempa’ is not declared.\MessageBreak3103 Cannot make it the default set. Using set\MessageBreak `all’ instead}{}%3104 \MT@xdef@n{MT@default@#1@set}{all}%3105 }%


IMPLEMENTATION: Configuration 1043106 }\DeclareMicrotypeVariants\MT@variants\MT@DeclareVariants\DeclareMicrotypeAlias\LoadMicrotypeFile14.3.2 Variants and aliasesSpecify suffixes for variants (see fontname/variants.map). <strong>The</strong> starred versionappends to the list.3107 \let\MT@variants\@empty3108 \def\DeclareMicrotypeVariants{%3109 \@ifstar3110 \MT@DeclareVariants3111 {\let\MT@variants\@empty\MT@DeclareVariants}%3112 }3113 \def\MT@DeclareVariants#1{%3114 \MT@map@clist@n{#1}{%3115 \KV@@sp@def\@tempa{##1}%3116 \@onelevel@sanitize\@tempa3117 \xdef\MT@variants{\MT@variants{\@tempa}}%3118 }%3119 }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.3120 \renewcommand*\DeclareMicrotypeAlias[2]{%3121 \edef\@tempa{\zap@space#1 \@empty}%3122 \edef\@tempb{\zap@space#2 \@empty}%3123 \@onelevel@sanitize\@tempb3124 \MT@ifdefined@n@T{MT@\@tempa @alias}{%3125 \MT@warning{Alias font family `\@tempb’ will override3126 alias `\@nameuse{MT@\@tempa @alias}’\MessageBreak3127 for font family `\@tempa’}}%3128 \MT@xdef@n{MT@\@tempa @alias}{\@tempb}%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 aconfiguration file, the configuration file for the alias font will be loaded, too.3129 \MT@ifdefined@c@T\MT@family{%3130 \MT@dinfo{1}{Activating alias font `\@tempb’ for `\MT@family’}%3131 \MT@glet\MT@familyalias\@tempb3132 }%3133 }May be used to load a configuration file manually.3134 \def\LoadMicrotypeFile#1{%3135 \edef\@tempa{\zap@space#1 \@empty}%3136 \@onelevel@sanitize\@tempa3137 \MT@exp@one@n\MT@in@clist\@tempa\MT@file@list3138 \ifMT@inlist@3139 \MT@vinfo{... Configuration file mt-\@tempa.cfg already loaded}%3140 \else3141 \MT@xadd\MT@file@list{\@tempa,}%3142 \MT@begin@catcodes3143 \InputIfFileExists{mt-\@tempa.cfg}{%3144 \edef\MT@curr@file{mt-\@tempa.cfg}%3145 \MT@vinfo{... Loading configuration file \MT@curr@file}%3146 }{%3147 \MT@warning{... Configuration file mt-\@tempa.cfg\MessageBreak3148 does not exist}%3149 }%3150 \MT@end@catcodes3151 \fi


IMPLEMENTATION: Configuration 1053152 }3153 3154 \DisableLigatures\MT@DisableLigatures\MT@nl@setname\MT@nl@ligatures14.3.3 Disabling ligaturesThis is really simple now: we can re-use the set definitions of \DeclareMicrotypeSet;there can only be one set, which we’ll call ‘no ligatures’.<strong>The</strong> optional argument may be used to disable selected ligatures only.3155 3156 \MT@requires@pdftex5{3157 \def\DisableLigatures{%3158 \MT@begin@catcodes3159 \MT@DisableLigatures3160 }3161 \newcommand*\MT@DisableLigatures[2][]{%3162 \MT@ifempty{#1}\relax{\gdef\MT@nl@ligatures{#1}}%3163 \xdef\MT@active@features{\MT@active@features,nl}%3164 \global\MT@noligaturestrue3165 \MT@declare@sets{nl}{no ligatures}{#2}%3166 \gdef\MT@nl@setname{no ligatures}%3167 \MT@end@catcodes3168 }3169 }{3170 If pdfTEX is too old, we throw an error.3171 3172 \renewcommand*\DisableLigatures[2][]{%3173 \MT@error{Disabling ligatures of a font is only possible\MessageBreak3174 with pdftex version 1.30 or newer.\MessageBreak3175 Ignoring \string\DisableLigatures}{%3176 Upgrade3177 Use3178 pdftex.}%3179 }3180 }3181 \DeclareMicrotypeBabelHook14.3.4 Interaction with babelDeclare the context that should be loaded when a babel language is selected. <strong>The</strong>command will not check whether a previous declaration will be overwritten.3182 3183 \def\DeclareMicrotypeBabelHook#1#2{%3184 \MT@map@clist@n{#1}{%3185 \KV@@sp@def\@tempa{##1}%3186 \MT@gdef@n{MT@babel@\@tempa}{#2}%3187 }%3188 }3189 14.3.5 Fine tuning\SetProtrusion<strong>The</strong> commands \SetExpansion and \SetProtrusion provide an interface for settingthe character protrusion resp. expansion factors for a set of fonts.This macro accepts three arguments: [options,] set of font attributes and list ofcharacter protrusion factors.


IMPLEMENTATION: Configuration 106\MT@SetProtrusion\MT@pr@c@name\MT@extra@context\MT@permutelist\SetExpansion\MT@SetExpansion\MT@ex@c@name\MT@extra@context\MT@permutelist\SetTrackingA new macro called \MT@pr@c@〈name〉 will be defined to be 〈#3〉 (i.e., the list ofcharacters, not expanded).3190 3191 \def\SetProtrusion{%3192 \MT@begin@catcodes3193 \MT@SetProtrusion3194 }We want the catcodes to be correct even if this is called in the preamble.3195 \newcommand*\MT@SetProtrusion[3][]{%3196 \let\MT@extra@context\@emptyParse the optional first argument. We first have to know the name before we candeal with the extra options.3197 \MT@set@named@keys{MT@pr@c}{#1}%3198 \MT@dinfo{1}{creating protrusion list `\MT@pr@c@name’}%3199 \def\MT@permutelist{pr@c}%3200 \setkeys{MT@cfg}{#2}%We have parsed the second argument, and can now define macros for all permutationsof the font attributes to point to \MT@pr@c@〈name〉, . . .3201 \MT@permute. . . which we can now define to be 〈#3〉. Here, as elsewhere, we have to make thedefinitions global, since they will occur inside a group.3202 \MT@gdef@n{MT@pr@c@\MT@pr@c@name}{#3}%3203 \MT@end@catcodes3204 }3205 \SetExpansion only differs in that it allows some extra options (stretch, shrink,step, auto).3206 3207 \def\SetExpansion{%3208 \MT@begin@catcodes3209 \MT@SetExpansion3210 }3211 \newcommand*\MT@SetExpansion[3][]{%3212 \let\MT@extra@context\@empty3213 \MT@set@named@keys{MT@ex@c}{#1}%3214 \MT@ifdefined@n@T{MT@ex@c@\MT@ex@c@name @factor}{%3215 \ifnum\csname MT@ex@c@\MT@ex@c@name @factor\endcsname > \@m3216 \MT@warning@nl{Expansion factor \number\@nameuse{MT@ex@c@\MT@ex@c@name @factor}3217 too large in list\MessageBreak `\MT@ex@c@name’. Setting it to the3218 maximum of 1000}%3219 \MT@glet@nc{MT@ex@c@\MT@ex@c@name @factor}\@m3220 \fi3221 }%3222 \MT@dinfo{1}{creating expansion list `\MT@ex@c@name’}%3223 \def\MT@permutelist{ex@c}%3224 \setkeys{MT@cfg}{#2}%3225 \MT@permute3226 \MT@gdef@n{MT@ex@c@\MT@ex@c@name}{#3}%3227 \MT@end@catcodes3228 }3229 \def\SetTracking{%3230 \MT@begin@catcodes3231 \MT@SetTracking3232 }


IMPLEMENTATION: Configuration 107\MT@SetTracking\SetExtraSpacing\MT@SetExtraSpacing\MT@sp@c@name\MT@extra@context\MT@permutelist\SetExtraKerning\MT@SetExtraKerning\MT@kn@c@name\MT@extra@context\MT@permutelist\MT@set@named@keys\MT@optionsThird argument may be empty.3233 \newcommand*\MT@SetTracking[3][]{%3234 \let\MT@extra@context\@empty3235 \MT@set@named@keys{MT@tr@c}{#1}%3236 \MT@dinfo{1}{creating tracking list `\MT@tr@c@name’}%3237 \def\MT@permutelist{tr@c}%3238 \setkeys{MT@cfg}{#2}%3239 \MT@permute3240 \KV@@sp@def\@tempa{#3}%3241 \MT@ifempty\@tempa\relax{%3242 \MT@ifint\@tempa3243 {\MT@xdef@n{MT@tr@c@\MT@tr@c@name}{\@tempa}}%3244 {\MT@warning{Value `\@tempa’ is not a number in\MessageBreak3245 tracking set `\MT@curr@set@name’}}}%3246 \MT@end@catcodes3247 }3248 3249 3250 \def\SetExtraSpacing{%3251 \MT@begin@catcodes3252 \MT@SetExtraSpacing3253 }3254 \newcommand*\MT@SetExtraSpacing[3][]{%3255 \let\MT@extra@context\@empty3256 \MT@set@named@keys{MT@sp@c}{#1}%3257 \MT@dinfo{1}{creating spacing list `\MT@sp@c@name’}%3258 \def\MT@permutelist{sp@c}%3259 \setkeys{MT@cfg}{#2}%3260 \MT@permute3261 \MT@gdef@n{MT@sp@c@\MT@sp@c@name}{#3}%3262 \MT@end@catcodes3263 }3264 \def\SetExtraKerning{%3265 \MT@begin@catcodes3266 \MT@SetExtraKerning3267 }3268 \newcommand*\MT@SetExtraKerning[3][]{%3269 \let\MT@extra@context\@empty3270 \MT@set@named@keys{MT@kn@c}{#1}%3271 \MT@dinfo{1}{creating kerning list `\MT@kn@c@name’}%3272 \def\MT@permutelist{kn@c}%3273 \setkeys{MT@cfg}{#2}%3274 \MT@permute3275 \MT@gdef@n{MT@kn@c@\MT@kn@c@name}{#3}%3276 \MT@end@catcodes3277 }3278 We first set the name (if specified), then remove it from the list, and set theremaining keys.3279 3280 \def\MT@set@named@keys#1#2{%3281 \def\x##1name=##2,##3\@nil{%3282 \setkeys{#1}{name=##2}%3283 \gdef\MT@options{##1##3}%3284 \MT@rem@from@clist{name=}\MT@options


IMPLEMENTATION: Configuration 108\MT@define@code@key\MT@define@code@key@family\MT@define@code@key@size\MT@define@code@key@font3285 }%3286 \x#2,name=,\@nil3287 \@expandtwoargs\setkeys{#1}\MT@options3288 }Define the keys for the configuration lists (which are setting the codes, in pdfTEXspeak).3289 \def\MT@define@code@key#1#2{%3290 \define@key{MT@#2}{#1}[]{%3291 \@tempcnta=\@ne3292 \MT@map@clist@n{##1}{%3293 \KV@@sp@def\MT@val{####1}%Here, too, we allow for something like ‘bf*’. It will be expanded immediately.3294 \MT@get@highlevel{#1}%3295 \MT@edef@n{MT@temp#1\the\@tempcnta}{\MT@val}%3296 \advance\@tempcnta \@ne3297 }%3298 }%3299 }Remove fontspec’s internal feature counter.3300 \def\MT@define@code@key@family#1{%3301 \define@key{MT@#1}{family}[]{%3302 \@tempcnta=\@ne3303 \MT@map@clist@n{##1}{%3304 \KV@@sp@def\MT@val{####1}%3305 \MT@get@highlevel{family}%3306 \ifMT@fontspec3307 \edef\x{\edef\noexpand\MT@val{\noexpand\MT@scrubfeature\MT@val()\relax}}\x3308 \fi3309 \MT@edef@n{MT@tempfamily\the\@tempcnta}{\MT@val}%3310 \advance\@tempcnta \@ne3311 }%3312 }%3313 }\MT@tempsize must be in a \csname, so that it is at least \relax, not undefined.3314 \def\MT@define@code@key@size#1{%3315 \define@key{MT@#1}{size}[]{%3316 \MT@map@clist@n{##1}{%3317 \KV@@sp@def\MT@val{####1}%3318 \expandafter\MT@get@range\MT@val--\@nil3319 \ifx\MT@val\relax \else3320 \MT@exp@cs\MT@xadd{MT@tempsize}%3321 {{{\MT@lower}{\MT@upper}{\MT@curr@set@name}}}%3322 \fi3323 }%3324 }%3325 }3326 \def\MT@define@code@key@font#1{%3327 \define@key{MT@#1}{font}[]{%3328 \MT@map@clist@n{##1}{%3329 \KV@@sp@def\MT@val{####1}%3330 \MT@ifstreq\MT@val*{\def\MT@val{*/*/*/*/*}}\relax3331 \expandafter\MT@get@font@and@size\MT@val/////\@nil3332 \ifMT@fontspec3333 \edef\@tempb{\expandafter\MT@scrubfeatures\@tempb()\relax}%3334 \fi3335 \MT@xdef@n{MT@\MT@permutelist @\@tempb\MT@extra@context}%3336 {\csname MT@\MT@permutelist @name\endcsname}%3337 \MT@dinfo@nl{1}{initialising: use list for font \@tempb=\MT@val3338 \ifx\MT@extra@context\@empty\else\MessageBreak


IMPLEMENTATION: Configuration 109\MT@get@font@and@size\MT@define@opt@key\MT@listname@count3339 (context: \MT@extra@context)\fi}%3340 \MT@exp@cs\MT@xaddb3341 {MT@\MT@permutelist @\@tempb\MT@extra@context @sizes}%3342 {{{\MT@val}{\m@ne}{\MT@curr@set@name}}}%3343 }%3344 }%3345 }Translate any asterisks and split off the size.3346 \def\MT@get@font@and@size#1/#2/#3/#4/#5/#6\@nil{%3347 \MT@get@font@{#1}{#2}{#3}{#4}{#5}{1}%3348 }3349 \MT@define@code@key{encoding}{cfg}3350 \MT@define@code@key@family {cfg}3351 \MT@define@code@key{series} {cfg}3352 \MT@define@code@key{shape} {cfg}3353 \MT@define@code@key@size {cfg}3354 \MT@define@code@key@font {cfg}3355 \def\MT@define@opt@key#1#2{%3356 \define@key{MT@#1@c}{#2}[]{\MT@ifempty{##1}\relax{%3357 \MT@xdef@n{MT@#1@c@\MT@curr@set@name @#2}{##1}}}%3358 }<strong>The</strong> options in the optional first argument.3359 \newcount\MT@listname@count3360 \MT@map@clist@c\MT@features{%Use file name and line number as the list name if the user didn’t bother to inventone – also check whether the name already exists (in case more than one unnamedlist is loaded in the same line, for example \AtBeginDocument).3361 \define@key{MT@#1@c}{name}[]{%3362 \MT@ifempty{##1}{%3363 \MT@ifdefined@n@TF{MT@#1@c@\MT@curr@file/\the\inputlineno}{%3364 \global\advance\MT@listname@count\@ne3365 \MT@edef@n{MT@#1@c@name}{\MT@curr@file/\the\inputlineno3366 (\number\MT@listname@count)}%3367 }{%3368 \MT@edef@n{MT@#1@c@name}{\MT@curr@file/\the\inputlineno}%3369 }%3370 }{%3371 \MT@edef@n{MT@#1@c@name}{##1}%3372 \MT@ifdefined@n@T{MT@#1@c@\csname MT@#1@c@name\endcsname}{%3373 \MT@warning{Redefining \@nameuse{MT@abbr@#1} list `\@nameuse{MT@#1@c@name}’}%3374 }%3375 }%3376 \MT@let@cn\MT@curr@set@name{MT@#1@c@name}%3377 }%3378 \MT@define@opt@key{#1}{load}%3379 \MT@define@opt@key{#1}{factor}%3380 \MT@define@opt@key{#1}{preset}%3381 \MT@define@opt@key{#1}{inputenc}%Only one context is allowed. This might change in the future.3382 \define@key{MT@#1@c}{context}[]{\MT@ifempty{##1}\relax{\def\MT@extra@context{##1}}}%3383 }3384 Automatically enable font copying if we find a protrusion or expansion context.After the preamble, check whether font copying is enabled. For older pdfTEXversions, disallow. It also works with LuaTEX 0.30 or newer.3385


IMPLEMENTATION: Configuration 110\MT@warn@nodim3386 \MT@requires@pdftex7{3387 \define@key{MT@ex@c}{context}[]{%3388 \MT@ifempty{#1}\relax{%3389 \MT@glet\MT@copy@font\MT@copy@font@3390 \def\MT@extra@context{#1}%3391 }%3392 }3393 \MT@addto@setup{%3394 \define@key{MT@ex@c}{context}[]{%3395 \ifx\MT@copy@font\MT@copy@font@3396 \MT@ifempty{#1}\relax{\def\MT@extra@context{#1}}%3397 \else3398 \MT@error{\MT@MT\space isn’t set up for expansion contexts.\MessageBreak3399 Ignoring `context’ key\on@line}%3400 {Either move the settings inside the preamble,\MessageBreak3401 or load the <strong>package</strong> with the `copyfonts’ option.}%3402 \fi3403 }%3404 }Protrusion contexts may also work without copying the font, so we don’t issuean error but only a warning. <strong>The</strong> 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 – like in the example with the footnote markers – we don’t needto copy the fonts.3405 \define@key{MT@pr@c}{context}[]{%3406 \MT@ifempty{#1}\relax{%3407 \MT@glet\MT@copy@font\MT@copy@font@3408 \def\MT@extra@context{#1}%3409 }%3410 }3411 \MT@addto@setup{%3412 \define@key{MT@pr@c}{context}[]{%3413 \MT@ifempty{#1}\relax{\def\MT@extra@context{#1}}%3414 \ifx\MT@copy@font\MT@copy@font@\else3415 \MT@warning@nl{If protrusion contexts don’t work as expected,3416 \MessageBreak load the <strong>package</strong> with the `copyfonts’ option}%3417 \fi3418 }%3419 }3420 3421 3422 }{3423 \define@key{MT@ex@c}{context}[]{%3424 \MT@error{Expansion contexts only work with pdftex 1.40.4\MessageBreak3425 or later. Ignoring `context’ key\on@line}%3426 {Upgrade pdftex.}%3427 }3428 3429 3430 \define@key{MT@pr@c}{context}[]{%3431 \MT@error{Protrusion contexts only work with pdftex3432 1.40.4\MessageBreak or later.3433 \MessageBreak or luatex.3434 Ignoring `context’ key\on@line}%3435 {Upgrade pdftex.}%3436 {Use pdftex or luatex.}%3437 }3438 3439 }


IMPLEMENTATION: Configuration 1113440 3441 \def\MT@warn@nodim#1{%3442 \MT@warning{`\@tempa’ is not a dimension.\MessageBreak3443 Ignoring it and setting values relative to\MessageBreak #1}%3444 }3445 Protrusion codes may be relative to character width, or to any dimension.3446 3447 \define@key{MT@pr@c}{unit}[character]{%3448 \MT@glet@nc{MT@pr@c@\MT@curr@set@name @unit}\@empty3449 \def\@tempa{#1}%3450 \MT@ifstreq\@tempa{character}\relax{%Test whether it’s a dimension, but do not translate it into its final form here, sinceit may be font-specific.3451 \MT@ifdimen\@tempa3452 {\MT@glet@nc{MT@pr@c@\MT@curr@set@name @unit}\@tempa}%3453 {\MT@warn@nodim{character widths}}%3454 }%3455 }3456 Tracking may only be relative to a dimension.3457 3458 \define@key{MT@tr@c}{unit}[1em]{%3459 \MT@glet@nc{MT@tr@c@\MT@curr@set@name @unit}\@empty3460 \def\@tempa{#1}%3461 \MT@ifdimen\@tempa3462 {\MT@glet@nc{MT@tr@c@\MT@curr@set@name @unit}\@tempa}%3463 {\MT@warn@nodim{1em}%3464 \MT@gdef@n{MT@tr@c@\MT@curr@set@name @unit}{1em}}%3465 }3466 Spacing and kerning codes may additionally be relative to space dimensions.3467 3468 \MT@map@clist@n{sp,kn}{%3469 \define@key{MT@#1@c}{unit}[space]{%3470 \MT@glet@nc{MT@#1@c@\MT@curr@set@name @unit}\@empty3471 \def\@tempa{##1}%3472 \MT@ifstreq\@tempa{character}\relax{%3473 \MT@glet@nc{MT@#1@c@\MT@curr@set@name @unit}\m@ne3474 \MT@ifstreq\@tempa{space}\relax{%3475 \MT@ifdimen\@tempa3476 {\MT@glet@nc{MT@#1@c@\MT@curr@set@name @unit}\@tempa}%3477 {\MT@warn@nodim{width of space}}%3478 }%3479 }%3480 }%3481 }3482 <strong>The</strong> first argument to \SetExpansion accepts some more options.3483 3484 \MT@map@clist@n{stretch,shrink,step}{%3485 \define@key{MT@ex@c}{#1}[]{%3486 \MT@ifempty{##1}\relax{%3487 \MT@ifint{##1}{%A space terminates the number.3488 \MT@gdef@n{MT@ex@c@\MT@curr@set@name @#1}{##1 }%3489 }{%3490 \MT@warning{%3491 Value `##1’ for option `#1’ is not a number.\MessageBreak


IMPLEMENTATION: Configuration 1123492 Ignoring it}%3493 }%3494 }%3495 }%3496 }3497 \define@key{MT@ex@c}{auto}[true]{%3498 \def\@tempa{#1}%3499 \csname if\@tempa\endcsnameDon’t use autoexpand for pdfTEX version older than 1.20.3500 \MT@requires@pdftex4{%3501 \MT@gdef@n{MT@ex@c@\MT@curr@set@name @auto}{autoexpand}%3502 3503 }{%3504 \MT@warning{pdftex too old for automatic font expansion}%3505 }3506 3507 \else3508 \MT@requires@pdftex4{%3509 \MT@glet@nc{MT@ex@c@\MT@curr@set@name @auto}\@empty3510 }\relax3511 \fi3512 }Tracking: Interword spacing and outer kerning. <strong>The</strong> variant with space just in case\SetTracking is called inside an argument (e.g., to \IfFileExists).3513 \MT@define@opt@key{tr}{spacing}3514 \MT@define@opt@key{tr}{outerspacing}3515 \MT@define@opt@key{tr}{outerkerning}Which ligatures should be disabled?3516 \define@key{MT@tr@c}{noligatures}[]%3517 {\MT@xdef@n{MT@tr@c@\MT@curr@set@name @noligatures}{#1}}3518 \define@key{MT@tr@c}{outer spacing}[]{\setkeys{MT@tr@c}{outerspacing={#1}}}3519 \define@key{MT@tr@c}{outer kerning}[]{\setkeys{MT@tr@c}{outerkerning={#1}}}3520 \define@key{MT@tr@c}{no ligatures}[]{\setkeys{MT@tr@c}{noligatures={#1}}}3521 \DeclareCharacterInheritance\MT@inh@feat\MT@extra@inputenc\MT@set@inh@list14.3.6 Character inheritanceThis 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 (e.g., \‘a, \’a, \^a, \~a, \"a, \r{a}, \k{a},\u{a}), which will make the configuration files look much nicer and easier tomaintain. If a single character of an inheritance list should have a different value,one can simply override it.<strong>The</strong> optional argument may be used to restrict the list to some features,and to specify an input encoding.3522 3523 \renewcommand*\DeclareCharacterInheritance[1][]{%3524 \let\MT@extra@context\@empty3525 \let\MT@extra@inputenc\@undefined3526 \let\MT@inh@feat\@empty3527 \setkeys{MT@inh@}{#1}%3528 \MT@begin@catcodes3529 \MT@set@inh@list3530 }Safe category codes.3531 \def\MT@set@inh@list#1#2{%3532 \MT@ifempty\MT@inh@feat{%


IMPLEMENTATION: Configuration 113\MT@declare@char@inh\MT@inh@do\MT@inh@split3533 \MT@map@clist@c\MT@features{{\MT@declare@char@inh{##1}{#1}{#2}}}%3534 }{%3535 \MT@map@clist@c\MT@inh@feat{{%3536 \KV@@sp@def\@tempa{##1}%3537 \MT@ifempty\@tempa\relax{%3538 \MT@exp@one@n\MT@declare@char@inh3539 {\csname MT@rbba@\@tempa\endcsname}{#1}{#2}%3540 }%3541 }}%3542 }%3543 \MT@end@catcodes3544 }<strong>The</strong> keys for the optional argument.3545 \MT@map@clist@c\MT@features@long{%3546 \define@key{MT@inh@}{#1}[]{\edef\MT@inh@feat{\MT@inh@feat#1,}}}3547 \define@key{MT@inh@}{inputenc}{\def\MT@extra@inputenc{#1}}<strong>The</strong> lists cannot be given a name by the user.3548 \def\MT@declare@char@inh#1#2#3{%3549 \MT@edef@n{MT@#1@inh@name}%3550 {\MT@curr@file/\the\inputlineno (\@nameuse{MT@abbr@#1})}%3551 \MT@let@cn\MT@curr@set@name{MT@#1@inh@name}%3552 \MT@ifdefined@c@T\MT@extra@inputenc{%3553 \MT@xdef@n{MT@#1@inh@\MT@curr@set@name @inputenc}{\MT@extra@inputenc}}%3554 \MT@dinfo{1}{creating inheritance list `\@nameuse{MT@#1@inh@name}’}%3555 \MT@gdef@n{MT@#1@inh@\csname MT@#1@inh@name\endcsname}{#3}%3556 \def\MT@permutelist{#1@inh}%3557 \setkeys{MT@inh}{#2}%3558 \MT@permute3559 }Parse the second argument. \DeclareCharacterInheritance may also be set upfor various combinations. We can reuse the key setup from the configuration lists(\Set...).3560 \MT@define@code@key{encoding}{inh}3561 \MT@define@code@key@family {inh}3562 \MT@define@code@key{series} {inh}3563 \MT@define@code@key{shape} {inh}3564 \MT@define@code@key@size {inh}3565 \MT@define@code@key@font {inh}Now parse the third argument, the inheritance lists. We define the commands\MT@inh@〈name〉@〈slot〉@, containing the inheriting characters. <strong>The</strong>y will also betranslated to slot numbers here, to save some time. <strong>The</strong> following will be executedonly once, namely the first time this inheritance list is encountered (in\MT@set@〈feature〉@codes).3566 \def\MT@inh@do#1,{%3567 \ifx\relax#1\@empty \else3568 \MT@inh@split #1==\relax3569 \expandafter\MT@inh@do3570 \fi3571 }Only gather the inheriting characters here. <strong>The</strong>ir codes will actually be set in\MT@set@〈feature〉@codes.3572 3573 3574 \def\MT@inh@split#1=#2=#3\relax{%3575 \def\@tempa{#1}%3576 \ifx\@tempa\@empty \else3577 \MT@get@slot3578 \ifnum\MT@char > \m@ne


IMPLEMENTATION: Configuration 1143579 \ifx\MT@char\@empty\else3580 \let\MT@val\MT@char3581 \MT@map@clist@n{#2}{%3582 \def\@tempa{##1}%3583 \ifx\@tempa\@empty \else3584 \MT@get@slot3585 \ifnum\MT@char > \m@ne3586 \ifx\MT@char\@empty\else3587 \MT@exp@cs\MT@xadd{MT@inh@\MT@listname @\MT@val @}{{\MT@char}}%3588 \fi3589 \fi3590 }%3591 \MT@dinfo@nl{2}{children of #1 (\MT@val):3592 \@nameuse{MT@inh@\MT@listname @\MT@val @}}%3593 \fi3594 \fi3595 }3596 \MT@permute\MT@permute@\MT@permute@@\MT@permute@@@\MT@permute@@@@14.3.7 PermutationCalling \MT@permute will define commands for all permutations of the specified fontattributes of the form \MT@〈list type〉@/〈encoding〉/〈family〉/〈series〉/〈shape〉/〈|*〉 tobe the expansion of \MT@〈list type〉@name, i.e., the name of the currently defined list.Size ranges are held in a separate macro called \MT@〈list type〉@/〈font axes〉@sizes,which in turn contains the respective 〈list name〉s attached to the ranges.3597 3598 \def\MT@permute{%3599 \let\MT@cnt@encoding\@ne3600 \MT@permute@Undefine commands for the next round.3601 \MT@map@tlist@n{{encoding}{family}{series}{shape}}\MT@permute@reset3602 \MT@glet\MT@tempsize\@undefined3603 }3604 \def\MT@permute@{%3605 \let\MT@cnt@family\@ne3606 \MT@permute@@3607 \MT@increment\MT@cnt@encoding3608 \MT@ifdefined@n@T{MT@tempencoding\MT@cnt@encoding}%3609 \MT@permute@3610 }3611 \def\MT@permute@@{%3612 \let\MT@cnt@series\@ne3613 \MT@permute@@@3614 \MT@increment\MT@cnt@family3615 \MT@ifdefined@n@T{MT@tempfamily\MT@cnt@family}%3616 \MT@permute@@3617 }3618 \def\MT@permute@@@{%3619 \let\MT@cnt@shape\@ne3620 \MT@permute@@@@3621 \MT@increment\MT@cnt@series3622 \MT@ifdefined@n@T{MT@tempseries\MT@cnt@series}%3623 \MT@permute@@@3624 }3625 \def\MT@permute@@@@{%3626 \MT@permute@@@@@3627 \MT@increment\MT@cnt@shape3628 \MT@ifdefined@n@T{MT@tempshape\MT@cnt@shape}%3629 \MT@permute@@@@3630 }


IMPLEMENTATION: Configuration 115\MT@permute@@@@@\MT@permute@@@@@@In order to save some memory, we can ignore unused encodings (inside the document).3631 \def\MT@permute@@@@@{%3632 \MT@permute@define{encoding}%3633 \ifMT@document3634 \ifx\MT@tempencoding\@empty \else3635 \MT@ifdefined@n@TF{T@\MT@tempencoding}\relax3636 {\expandafter\expandafter\expandafter\@gobble}%3637 \fi3638 \fi3639 \MT@permute@@@@@@3640 }3641 \def\MT@permute@@@@@@{%3642 \MT@permute@define{family}%3643 \MT@permute@define{series}%3644 \MT@permute@define{shape}%3645 \edef\@tempa{\MT@tempencoding3646 /\MT@tempfamily3647 /\MT@tempseries3648 /\MT@tempshape3649 /\MT@ifdefined@c@T\MT@tempsize *}%Some sanity checks: an encoding must be specified (unless nothing else is).3650 \MT@ifstreq\@tempa{////}\relax{%3651 \ifx\MT@tempencoding\@empty3652 \MT@warning{%3653 You have to specify an encoding for\MessageBreak3654 \@nameuse{MT@abbr@\MT@permutelist} list3655 `\@nameuse{MT@\MT@permutelist @name}’.\MessageBreak3656 Ignoring it}%3657 \else3658 \MT@ifdefined@c@TF\MT@tempsize{%Add the list of ranges to the beginning of the current combination, after checkingfor conflicts.3659 \MT@ifdefined@n@T{MT@\MT@permutelist @\@tempa\MT@extra@context @sizes}{%3660 \MT@map@tlist@c\MT@tempsize\MT@check@rlist3661 }%3662 \MT@exp@cs\MT@xaddb3663 {MT@\MT@permutelist @\@tempa\MT@extra@context @sizes}%3664 \MT@tempsize3665 \MT@dinfo@nl{1}{initialising: use list for font \@tempa,\MessageBreak3666 sizes: \csname MT@\MT@permutelist @\@tempa\MT@extra@context3667 @sizes\endcsname}%3668 }{%Only one list can apply to a given combination.3669 \MT@ifdefined@n@T{MT@\MT@permutelist @\@tempa\MT@extra@context}{%3670 \MT@warning{\@nameuse{MT@abbr@\MT@permutelist} list3671 `\@nameuse{MT@\MT@permutelist @name}’ will override list\MessageBreak3672 `\@nameuse{MT@\MT@permutelist @\@tempa\MT@extra@context}’3673 for font `\@tempa’}%3674 }%3675 \MT@dinfo@nl{1}{initialising: use list for font \@tempa3676 \ifx\MT@extra@context\@empty\else\MessageBreak3677 (context: \MT@extra@context)\fi}%3678 }%3679 \MT@xdef@n{MT@\MT@permutelist @\@tempa\MT@extra@context}%3680 {\csname MT@\MT@permutelist @name\endcsname}%3681 \fi3682 }%3683 }


IMPLEMENTATION: Configuration 116\MT@permute@define\MT@permute@reset\MT@check@rlistDefine the commands.3684 \def\MT@permute@define#1{%3685 \@tempcnta=\csname MT@cnt@#1\endcsname\relax3686 \MT@ifdefined@n@TF{MT@temp#1\the\@tempcnta}%3687 {\MT@edef@n{MT@temp#1}{\csname MT@temp#1\the\@tempcnta\endcsname}}%3688 {\MT@let@nc{MT@temp#1}\@empty}%3689 }Reset the commands.3690 \def\MT@permute@reset#1{%3691 \@tempcnta=\@ne3692 \MT@loop3693 \MT@let@nc{MT@temp#1\the\@tempcnta}\@undefined3694 \advance\@tempcnta\@ne3695 \MT@ifdefined@n@TF{MT@temp#1\the\@tempcnta}%3696 \iftrue3697 \iffalse3698 \MT@repeat3699 }For every new range item in \MT@tempsize, check whether it overlaps with rangesin the existing list.3700 \def\MT@check@rlist#1{\expandafter\MT@check@rlist@ #1}\MT@check@rlist@ Define the current new range and . . .\MT@check@range3701 \def\MT@check@rlist@#1#2#3{%3702 \def\@tempb{#1}%3703 \def\@tempc{#2}%3704 \MT@if@false3705 \MT@exp@cs\MT@map@tlist@c3706 {MT@\MT@permutelist @\@tempa\MT@extra@context @sizes}%3707 \MT@check@range3708 }. . . recurse through the list of existing ranges.3709 \def\MT@check@range#1{\expandafter\MT@check@range@ #1}\MT@check@range@ \@tempb and \@tempc are lower resp. upper bound of the new range, 〈#2〉 and 〈#3〉those of the existing range.3710 \def\MT@check@range@#1#2#3{%3711 \MT@ifdim{#2}=\m@ne{%3712 \MT@ifdim\@tempc=\m@ne{%• Both items are simple sizes.3713 \MT@ifdim\@tempb={#1}\MT@if@true\relax3714 }{%• Item in list is a simple size, new item is a range.3715 \MT@ifdim\@tempb>{#1}\relax{%3716 \MT@ifdim\@tempc>{#1}{%3717 \MT@if@true3718 \edef\@tempb{#1 (with range: \@tempb\space to \@tempc)}%3719 }\relax3720 }%3721 }%3722 }{%3723 \MT@ifdim\@tempc=\m@ne{%• Item in list is a range, new item is a simple size.3724 \MT@ifdim\@tempb


IMPLEMENTATION: Package options 1173726 }\relax3727 }{%• Both items are ranges.3728 \MT@ifdim\@tempb{#1}{%3730 \MT@if@true3731 \edef\@tempb{#1 to #2 (with range: \@tempb\space to \@tempc)}%3732 }\relax3733 }\relax3734 }%3735 }%3736 \ifMT@if@3737 \MT@warning{\@nameuse{MT@abbr@\MT@permutelist} list3738 `\@nameuse{MT@\MT@permutelist @name}’ will override\MessageBreak3739 list `#3’ for font \@tempa,\MessageBreak size \@tempb}%If we’ve already found a conflict with this item, we can skip the rest of the list.3740 \expandafter\MT@tlist@break3741 \fi3742 }\ifMT@opt@expansion\ifMT@opt@auto\ifMT@opt@DVI\MT@optwarn@admissible\MT@optwarn@nan\MT@opt@def@set14.4 Package options14.4.1 Declaring the optionsKeep track of whether the user explicitly set these options.3743 \newif\ifMT@opt@expansion3744 \newif\ifMT@opt@auto3745 \newif\ifMT@opt@DVISome warnings.3746 \def\MT@optwarn@admissible#1#2{%3747 \MT@warning@nl{`#1’ is not an admissible value for option\MessageBreak3748 `#2’. Assuming `false’}%3749 }3750 3751 3752 \MT@requires@latex1{3753 \def\MT@optwarn@nan#1#2{%3754 \MT@warning@nl{Value `#1’ for option `#2’ is not a\MessageBreak number.3755 Using default value of \number\@nameuse{MT@#2@default}}%3756 }3757 }\relax3758 3759 3760 \def\MT@opt@def@set#1{%3761 \MT@ifdefined@n@TF{MT@\@tempb @set@@\MT@val}{%3762 \MT@xdef@n{MT@\@tempb @setname}{\MT@val}%3763 }{%3764 \MT@xdef@n{MT@\@tempb @setname}{\@nameuse{MT@default@\@tempb @set}}%3765 \MT@warning@nl{<strong>The</strong> #1 set `\MT@val’ is undeclared.\MessageBreak3766 Using set `\@nameuse{MT@\@tempb @setname}’ instead}%3767 }%3768 }


IMPLEMENTATION: Package options 118\MT@def@bool@optexpansion and protrusion may be true, false, compatibility, nocompatibilityand/or a 〈set name〉.3769 \MT@map@clist@n{protrusion,expansion}{%3770 \define@key{MT}{#1}[true]{%3771 \csname MT@opt@#1true\endcsname3772 \MT@map@clist@n{##1}{%3773 \KV@@sp@def\MT@val{####1}%3774 \MT@ifempty\MT@val\relax{%3775 \csname MT@#1true\endcsname3776 \edef\@tempb{\csname MT@rbba@#1\endcsname}%3777 \MT@ifstreq\MT@val{true}\relax3778 {%3779 \MT@ifstreq\MT@val{false}{%3780 \csname MT@#1false\endcsname3781 }{%3782 \MT@ifstreq\MT@val{compatibility}{%3783 \MT@let@nc{MT@\@tempb @level}\@ne3784 }{%3785 \MT@ifstreq\MT@val{nocompatibility}{%3786 \MT@let@nc{MT@\@tempb @level}\tw@3787 }{%If everything failed, it should be a set name.3788 \MT@opt@def@set{#1}%3789 }%3790 }%3791 }%3792 }%3793 }%3794 }%3795 }%3796 }activate is a shortcut for protrusion and expansion.3797 \define@key{MT}{activate}[true]{%3798 \setkeys{MT}{protrusion={#1}}%3799 \setkeys{MT}{expansion={#1}}%3800 }spacing, kerning and tracking do not have a compatibility level.3801 \MT@map@clist@n{spacing,kerning,tracking}{%3802 \define@key{MT}{#1}[true]{%3803 \MT@map@clist@n{##1}{%3804 \KV@@sp@def\MT@val{####1}%3805 \MT@ifempty\MT@val\relax{%3806 \csname MT@#1true\endcsname3807 \MT@ifstreq\MT@val{true}\relax3808 {%3809 \MT@ifstreq\MT@val{false}{%3810 \csname MT@#1false\endcsname3811 }{%3812 \edef\@tempb{\csname MT@rbba@#1\endcsname}%3813 \MT@opt@def@set{#1}%3814 }%3815 }%3816 }%3817 }%3818 }%3819 }<strong>The</strong> true/false options: draft, final (may be inherited from the class options),auto, selected, babel, DVIoutput, defersetup, copyfonts.3820 \def\MT@def@bool@opt#1#2{%3821 \define@key{MT}{#1}[true]{%


IMPLEMENTATION: Package options 1193822 \def\@tempa{##1}%3823 \MT@ifstreq\@tempa{true}\relax{%3824 \MT@ifstreq\@tempa{false}\relax{%3825 \MT@optwarn@admissible{##1}{#1}%3826 \def\@tempa{false}%3827 }%3828 }%3829 #2%3830 }%3831 }Boolean options that only set the switch.3832 \MT@map@clist@n{draft,selected,babel}{%3833 \MT@def@bool@opt{#1}{\csname MT@#1\@tempa\endcsname}}3834 \MT@def@bool@opt{auto}{\csname MT@auto\@tempa\endcsname \MT@opt@autotrue}<strong>The</strong> DVIoutput option will change \pdfoutput immediately to minimise the risk ofconfusing other <strong>package</strong>s.3835 3836 3837 \MT@def@bool@opt{DVIoutput}{%3838 \csname if\@tempa\endcsname3839 3840 \ifnum\pdfoutput>\z@ \MT@opt@DVItrue \fi3841 \pdfoutput\z@3842 \else3843 \ifnum\pdfoutput


IMPLEMENTATION: Package options 1203867 \MT@glet\MT@copy@font\relax3868 \fi3869 }3870 }{3871 3872 3873 \MT@def@bool@opt{copyfonts}{%3874 \csname if\@tempa\endcsname3875 \MT@error3876 {<strong>The</strong> pdftex version you are using is too old\MessageBreak3877 to use the `copyfonts’ option}{Upgrade pdftex.}%3878 {<strong>The</strong> `copyfonts’ option does not work with xetex}3879 {Use pdftex or luatex instead.}%3880 \fi3881 }3882 }3883 final is the opposite to draft.3884 3885 \MT@def@bool@opt{final}{%3886 \csname if\@tempa\endcsname3887 \MT@draftfalse3888 \else3889 \MT@drafttrue3890 \fi3891 }For verbose output, we redefine \MT@vinfo.3892 \define@key{MT}{verbose}[true]{%3893 \let\MT@vinfo\MT@info@nl3894 \def\@tempa{#1}%3895 \MT@ifstreq\@tempa{true}\relax{%Take problems seriously.3896 \MT@ifstreq\@tempa{errors}{%3897 \let\MT@warning \MT@warn@err3898 \let\MT@warning@nl\MT@warn@err3899 }{%3900 \let\MT@vinfo\@gobbleCast warnings to the winds.3901 \MT@ifstreq\@tempa{silent}{%3902 \let\MT@warning \MT@info3903 \let\MT@warning@nl\MT@info@nl3904 }{%3905 \MT@ifstreq\@tempa{false}\relax{\MT@optwarn@admissible{#1}{verbose}}%3906 }%3907 }%3908 }%3909 }3910 Options with numerical keys: factor, stretch, shrink, step, letterspace.3911 3912 \MT@requires@latex1{3913 \MT@map@clist@n{%3914 stretch,shrink,step,%3915 letterspace}{%3916 \define@key{MT}{#1}[\csname MT@#1@default\endcsname]{%3917 \def\@tempa{##1 }%No nonsense in \MT@factor et al.? A space terminates the number.3918 \MT@ifint\@tempa3919 {\MT@edef@n{MT@#1}{\@tempa}}%


IMPLEMENTATION: Package options 1213920 {\MT@optwarn@nan{##1}{#1}}%3921 }%3922 }3923 }\relax3924 factor will define the protrusion factor only.3925 3926 \define@key{MT}{factor}[\MT@factor@default]{%3927 \def\@tempa{#1 }%3928 \MT@ifint\@tempa3929 {\edef\MT@pr@factor{\@tempa}}3930 {\MT@optwarn@nan{#1}{factor}}%3931 }Unit for protrusion codes.3932 \define@key{MT}{unit}[character]{%3933 \def\@tempa{#1}%3934 \MT@ifstreq\@tempa{character}\relax{%3935 \MT@ifdimen\@tempa3936 {\let\MT@pr@unit\@tempa}%3937 {\MT@warning@nl{`\@tempa’ is not a dimension.\MessageBreak3938 Ignoring it and setting values relative to\MessageBreak3939 character widths}}%3940 }%3941 }\MT@endinput14.4.2 Loading the definition fileAbort if no capable engine found.3942 \let\MT@endinput\relax3943 \ifx\MT@engine\relax3944 \MT@warning@nl{You don’t seem to be using either pdftex, luatex, or xetex.\MessageBreak3945 `\MT@MT’ only works with these engines.\MessageBreak3946 I will quit now.}3947 \MT@clear@options3948 \else3949 \input{<strong>microtype</strong>-\MT@engine tex.def}3950 \fi3951 \MT@endinput14.4.3 Reading the configuration file<strong>The</strong> <strong>package</strong> should just work if called without any options. <strong>The</strong>refore, expansionwill be switched off by default if output is DVI, since it isn’t 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 she’s running pdfTEX.)3952 \MT@protrusiontrue3953 3954 3955 \ifnum\pdfoutput


IMPLEMENTATION: Package options 122\MT@config@file\MT@get@config\MT@check@active@set<strong>The</strong> main configuration file will be loaded before processing the <strong>package</strong> options.However, the config option must of course be evaluated beforehand. We also haveto define a no-op for the regular option processing later.3962 3963 \define@key{MT}{config}[]{\relax}3964 \def\MT@get@config#1config=#2,#3\@nil{%3965 \MT@ifempty{#2}%3966 {\def\MT@config@file{\MT@MT.cfg}}%3967 {\def\MT@config@file{#2.cfg}}%3968 }3969 \expandafter\expandafter\expandafter\MT@get@config3970 \csname opt@\@currname.\@currext\endcsname,config=,\@nilLoad the file.3971 \IfFileExists{\MT@config@file}{%3972 \MT@info@nl{Loading configuration file \MT@config@file}%3973 \MT@begin@catcodes3974 \let\MT@begin@catcodes\relax3975 \let\MT@end@catcodes\relax3976 \let\MT@curr@file\MT@config@file3977 \input{\MT@config@file}%3978 \endgroup3979 }{\MT@warning@nl{%3980 Could not find configuration file `\MT@config@file’!\MessageBreak3981 This will almost certainly cause undesired results.\MessageBreak3982 Please fix your installation}%3983 }We have to make sure that font sets are active. If the user didn’t activate any, weuse those sets declared by \DeclareMicrotypeSetDefault (this is done at the endof the preamble).3984 \def\MT@check@active@set#1{%3985 \MT@ifdefined@n@TF{MT@#1@setname}{%3986 \MT@info@nl{Using \@nameuse{MT@abbr@#1} set `\@nameuse{MT@#1@setname}’}%3987 }{%3988 \MT@ifdefined@n@TF{MT@default@#1@set}{%3989 \MT@glet@nn{MT@#1@setname}{MT@default@#1@set}%3990 \MT@info@nl{Using default \@nameuse{MT@abbr@#1} set `\@nameuse{MT@#1@setname}’}%3991 }{%If no default font set has been declared in the main configuration file, we use the(empty, non-existent) set ‘@’, and issue a warning.3992 \MT@gdef@n{MT@#1@setname}{@}%3993 \MT@warning@nl{No \@nameuse{MT@abbr@#1} set chosen, no default set declared.3994 \MessageBreak Using empty set}%3995 }%3996 }%3997 }14.4.4 Hook for other <strong>package</strong>s\Microtype@HookThis hook may be used by font <strong>package</strong> authors, e.g., to declare alias fonts. If itis defined, it will be executed here, i.e., after the main configuration file has beenloaded, and before the <strong>package</strong> options are evaluated.This hook was needed in versions prior to 1.9a to overcome the situation that(1) the <strong>microtype</strong> <strong>package</strong> should be loaded after all font defaults have been setup (hence, using \@if<strong>package</strong>loaded in the font <strong>package</strong> 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 it’s


IMPLEMENTATION: Package options 123simpler than testing whether the <strong>package</strong> 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 <strong>package</strong>s aren’t overwritten. Example:\def\MinionPro@MT@Hook{\DeclareMicrotypeAlias{MinionPro-LF}{MinionPro}}\@if<strong>package</strong>loaded{<strong>microtype</strong>}\MinionPro@MT@Hook{\@ifundefined{Microtype@Hook}{\let\Microtype@Hook\MinionPro@MT@Hook}{\g@addto@macro\Microtype@Hook{\MinionPro@MT@Hook}}}\MicroType@Hook with a capital T (which only existed in version 1.7) is providedfor compatibility reasons. At some point in the future, it will no longer be available,hence it should not be used.3998 \MT@ifdefined@c@T\MicroType@Hook{\MT@warning{%3999 Command \string\MicroType@Hook\space is deprecated.\MessageBreak4000 Use \string\Microtype@Hook\space instead}\MicroType@Hook}4001 \MT@ifdefined@c@T\Microtype@Hook\Microtype@Hook\<strong>microtype</strong>setup\MT@define@optionX14.4.5 Changing options laterInside the preamble, \<strong>microtype</strong>setup accepts the same options as the <strong>package</strong> (unlessdefersetup=false). In the document body, it accepts the options: protrusion,expansion, activate, tracking, spacing and kerning. Specifying font sets is notallowed.4002 \def\<strong>microtype</strong>setup{\setkeys{MT}}4003 \MT@addto@setup{\def\<strong>microtype</strong>setup#1{\setkeys{MTX}{#1}\selectfont}}4004 4005 4006 \def\MT@define@optionX#1#2{%4007 \define@key{MTX}{#1}[true]{%4008 \edef\@tempb{\csname MT@rbba@#1\endcsname}%4009 \MT@map@clist@n{##1}{%4010 \KV@@sp@def\MT@val{####1}%4011 \MT@ifempty\MT@val\relax{%4012 \@tempcnta=\m@ne4013 \MT@ifstreq\MT@val{true}{%Enabling micro-typography in the middle of the document is not allowed if it hasbeen disabled in the <strong>package</strong> options since fonts might already have been loadedand hence wouldn’t be set up.4014 \MT@checksetup{#1}{%4015 \@tempcnta=\csname MT@\@tempb @level\endcsname4016 \MT@vinfo{Enabling #14017 (level \number\csname MT@\@tempb @level\endcsname)\on@line}%4018 }%4019 }{%4020 \MT@ifstreq\MT@val{false}{%4021 \@tempcnta=\z@4022 \MT@vinfo{Disabling #1\on@line}%4023 }{%4024 \MT@ifstreq\MT@val{compatibility}{%4025 \MT@checksetup{#1}{%4026 \@tempcnta=\@ne4027 \MT@let@nc{MT@\@tempb @level}\@ne4028 \MT@vinfo{Setting #1 to level 1\on@line}%4029 }%4030 }{%4031 \MT@ifstreq\MT@val{nocompatibility}{%4032 \MT@checksetup{#1}{%


IMPLEMENTATION: Package options 124\MT@checksetup\MT@protrudechars4033 \@tempcnta=\tw@4034 \MT@let@nc{MT@\@tempb @level}\tw@4035 \MT@vinfo{Setting #1 to level 2\on@line}%4036 }%4037 }{\MT@error{Value `\MT@val’ for key `#1’ not recognised}4038 {Use any of `true’, `false’, `compatibility’ or4039 `nocompatibility’.}%4040 }%4041 }%4042 }%4043 }%4044 \ifnum\@tempcnta>\m@ne4045 #2\@tempcnta\relax4046 \fi4047 }%4048 }%4049 }%4050 }Test whether the feature wasn’t disabled in the <strong>package</strong> options.4051 \def\MT@checksetup#1{%4052 \csname ifMT@#1\endcsname4053 \expandafter\@firstofone4054 \else4055 \MT@error{You cannot enable #1 if it was disabled\MessageBreak4056 in the <strong>package</strong> options}{Load <strong>microtype</strong> with #1 enabled.}%4057 \expandafter\@gobble4058 \fi4059 }4060 \MT@define@optionX{protrusion}\MT@protrudechars4061 4062 4063 \MT@define@optionX{expansion}\MT@adjustspacing\MT@adjustspacing 4064 \let\MT@protrudechars\pdfprotrudechars4065 \let\MT@adjustspacing\pdfadjustspacing4066 4067 4068 \let\MT@protrudechars\XeTeXprotrudechars4069 \define@key{MTX}{expansion}[true]{\MT@warning{Ignoring expansion setup}}4070 \MT@define@optionX@<strong>The</strong> same for tracking, spacing and kerning, which do not have a compatibilitylevel.4071 4072 \MT@requires@pdftex6{4073 \MT@requires@luatex3{4074 \def\MT@define@optionX@#1#2{%4075 \define@key{MTX}{#1}[true]{%4076 \MT@map@clist@n{##1}{%4077 \KV@@sp@def\MT@val{####1}%4078 \MT@ifempty\MT@val\relax{%4079 \@tempcnta=\m@ne4080 \MT@ifstreq\MT@val{true}{%4081 \MT@checksetup{#1}{%4082 \@tempcnta=\@ne4083 \MT@vinfo{Enabling #1\on@line}%4084 }%4085 }{%4086 \MT@ifstreq\MT@val{false}{%4087 \@tempcnta=\z@4088 \MT@vinfo{Disabling #1\on@line}%4089 }{\MT@error{Value `\MT@val’ for key `#1’ not recognised}


IMPLEMENTATION: Package options 125\MT@saved@setupfont4090 {Use either `true’ or `false’}%4091 }%4092 }%4093 \ifnum\@tempcnta>\m@ne4094 #2\relax4095 \fi4096 }%4097 }%4098 }%4099 }We cannot simply let \MT@tracking relax, since this may select the already letterspacedfont instance.4100 \MT@define@optionX@{tracking}{\ifnum\@tempcnta=\z@ \let\MT@tracking\MT@set@tr@zero4101 \else \let\MT@tracking\MT@tracking@ \fi}4102 \MT@define@optionX@{spacing}{\pdfadjustinterwordglue\@tempcnta}4103 \MT@define@optionX@{kerning}{\pdfprependkern\@tempcnta4104 \pdfappendkern \@tempcnta}4105 }{4106 4107 Disable for older pdfTEX versions and forTEX and LuaTEX.4108 \define@key{MTX}{tracking}[true]{\MT@warning{Ignoring tracking setup}}4109 }4110 \define@key{MTX}{kerning}[true]{\MT@warning{Ignoring kerning setup}}4111 \define@key{MTX}{spacing}[true]{\MT@warning{Ignoring spacing setup}}4112 }4113 \define@key{MTX}{activate}[true]{%4114 \setkeys{MTX}{protrusion={#1}}%4115 \setkeys{MTX}{expansion={#1}}%4116 }4117 Disable everything – may be used as a work-around in case setting up fonts doesn’twork in certain environments. (Undocumented.)4118 4119 \let\MT@saved@setupfont\MT@setupfont4120 \define@key{MTX}{disable}[]{%4121 \MT@info{Inactivate `\MT@MT’ <strong>package</strong>}%4122 \let\MT@setupfont\relax4123 }4124 \define@key{MTX}{enable}[]{%4125 \MT@info{Reactivate `\MT@MT’ <strong>package</strong>}%4126 \let\MT@setupfont\MT@saved@setupfont4127 }4128 EX\MT@ProcessOptionsWithKV14.4.6 Processing the optionsParse options.4129 4130 \MT@requires@latex1{4131 \def\MT@ProcessOptionsWithKV#1{%4132 \let\@tempc\relax4133 \let\MT@temp\@empty4134 \MT@requires@latex2{4135 \MT@map@clist@c\@classoptionslist{%4136 \def\CurrentOption{##1}%4137 \MT@ifdefined@n@T{KV@#1@\expandafter\MT@getkey\CurrentOption=\@nil}{%4138 \edef\MT@temp{\MT@temp,\CurrentOption,}%4139 \@expandtwoargs\@removeelement\CurrentOption4140 \@unusedoptionlist\@unusedoptionlist


IMPLEMENTATION: Package options 126\MT@getkey\MT@setup@PDF4141 }%4142 }%4143 \edef\MT@temp{\noexpand\setkeys{#1}%4144 {\MT@temp\@ptionlist{\@currname.\@currext}}}%eplain can handle <strong>package</strong> options.4145 4146 }{\edef\MT@temp{\noexpand\setkeys{#1}%4147 {\csname usepkg@options@\usepkg@pkg\endcsname}}}4148 4149 \MT@temp4150 \MT@clear@options4151 }For key=val in class options.4152 \def\MT@getkey#1=#2\@nil{#1}4153 \MT@ProcessOptionsWithKV{MT}4154 }\relax4155 4156 Now we can take the appropriate actions. We also tell the log file which optionsthe user has chosen (in case it’s interested).4157 \MT@addto@setup{%4158 \ifMT@draftWe disable most of what we’ve just defined in the 4158 lines above if we arerunning in draft mode.4159 \MT@warning@nl{`draft’ option active.\MessageBreak4160 Disabling all micro-typographic extensions.\MessageBreak4161 This might lead to different line and page breaks}%4162 \let\MT@setupfont\relax4163 \renewcommand*\LoadMicrotypeFile[1]{}%4164 \renewcommand*\<strong>microtype</strong>setup[1]{}%4165 \renewcommand*\<strong>microtype</strong>context[1]{}%4166 \renewcommand*\lsstyle{}%4167 \else4168 \MT@setup@PDF4169 \MT@setup@copiesFix the font sets.4170 \MT@map@tlist@c\MT@font@sets\MT@fix@font@set4171 \MT@setup@protrusion4172 \MT@setup@expansion4173 \MT@setup@tracking4174 \MT@setup@warntracking4175 \MT@setup@spacing4176 \MT@setup@kerning4177 \MT@setup@noligatures4178 }4179 pdfTEX can create DVI output, too. However, both the DVI viewer and dvips needto find actual fonts. <strong>The</strong>refore, expansion will only work if the fonts for differentdegrees of expansion are readily available.Some <strong>package</strong>s depend on the value of \pdfoutput and will get confused if it ischanged after they have been loaded. <strong>The</strong>se <strong>package</strong>s are, among others: color,graphics, hyperref, crop, contour, pstricks and, as a matter of course, ifpdf.Instead of testing for each <strong>package</strong> (that’s not our job), we only say that it was<strong>microtype</strong> that changed it. This must be sufficient!4180 4181 \def\MT@setup@PDF{%


IMPLEMENTATION: Package options 127\MT@setup@copies\MT@setup@protrusion\MT@setup@expansion4182 \MT@info@nl{Generating \ifnum\pdfoutput


IMPLEMENTATION: Package options 128\MT@auto4227 }{%4228 \ifnum\MT@stretch>\MT@shrink4229 \ifnum\MT@shrink=\z@4230 \@tempcnta=\MT@stretch4231 \else4232 \@tempcnta=\MT@shrink4233 \fi4234 \else4235 \ifnum\MT@stretch=\z@4236 \@tempcnta=\MT@shrink4237 \else4238 \@tempcnta=\MT@stretch4239 \fi4240 \fi4241 \divide\@tempcnta 5\relax4242 \ifnum\@tempcnta=\z@ \@tempcnta=\@ne \fi4243 \edef\MT@step{\number\@tempcnta\space}%4244 }%4245 4246 \fi4247 \ifnum\MT@step=\z@4248 \MT@warning@nl{<strong>The</strong> expansion step cannot be set to zero.\MessageBreak4249 Setting it to one}%4250 \def\MT@step{1 }%4251 \fiAutomatic expansion of the font? This new feature of pdfTEX 1.20 makes thehz programme really usable. It must be either ‘autoexpand’ or empty (or ‘1000’ forolder versions of pdfTEX).4252 \let\MT@auto\@empty4253 \ifMT@auto4254 \MT@requires@pdftex4{%We turn off automatic expansion if output mode is DVI.4255 \ifnum\pdfoutput


IMPLEMENTATION: Package options 129\MT@check@step\showhyphens4282 \MT@requires@pdftex4\relax{%4283 \def\MT@auto{1000 }%4284 }%4285 4286 \fiChoose the appropriate macro for selected expansion.4287 \ifMT@selected4288 \let\MT@set@ex@codes\MT@set@ex@codes@s4289 \else4290 \let\MT@set@ex@codes\MT@set@ex@codes@n4291 \fiFilter out stretch=0,shrink=0, since it would result in a pdfTEX error.4292 \ifnum\MT@stretch=\z@4293 \ifnum\MT@shrink=\z@4294 \MT@warning@nl{%4295 Both the stretch and shrink limit are set to zero.\MessageBreak4296 Disabling font expansion}%4297 \MT@expansionfalse4298 \fi4299 \fi4300 \fi4301 \ifMT@expansion4302 \edef\MT@active@features{\MT@active@features,ex}%4303 \MT@adjustspacing\MT@ex@level4304 \MT@info@nl{\ifMT@auto A\else Non-a\fi utomatic font expansion enabled4305 (level \number\MT@ex@level),\MessageBreak4306 stretch: \number\MT@stretch, shrink: \number\MT@shrink,4307 step: \number\MT@step, \ifMT@selected\else non-\fi selected}%Check whether stretch and shrink are multiples of step.4308 \def\MT@check@step##1{%4309 \@tempcnta=\csname MT@##1\endcsname4310 \divide\@tempcnta \MT@step4311 \multiply\@tempcnta \MT@step4312 \ifnum\@tempcnta=\csname MT@##1\endcsname\else4313 \MT@warning@nl{<strong>The</strong> ##1 amount is not a multiple of step.\MessageBreak4314 <strong>The</strong> effective maximum ##1 is \the\@tempcnta\space4315 (step \number\MT@step)}%4316 \fi4317 }%4318 \MT@check@step{stretch}%4319 \MT@check@step{shrink}%4320 \MT@check@active@set{ex}%Inside \showhyphens, font expansion should be disabled.4321 \CheckCommand*\showhyphens[1]{\setbox0\vbox{%4322 \color@begingroup\everypar{}\parfillskip\z@skip4323 \hsize\maxdimen\normalfont\pretolerance\m@ne\tolerance\m@ne4324 \hbadness\z@\showboxdepth\z@\ ##1\color@endgroup}}%I wonder why it’s defined globally (in ltfssbas.dtx)?4325 \gdef\showhyphens##1{\setbox0\vbox{%4326 \color@begingroup\pdfadjustspacing\z@\everypar{}\parfillskip\z@skip4327 \hsize\maxdimen\normalfont\pretolerance\m@ne\tolerance\m@ne4328 \hbadness\z@\showboxdepth\z@\ ##1\color@endgroup}}%4329 \else4330 \let\MT@expansion\relax4331 \MT@info@nl{No font expansion}%4332 \fi4333 }4334 4335 4336 \def\MT@setup@expansion{%


IMPLEMENTATION: Package options 130\MT@setup@tracking\MT@setup@spacing\MT@setup@spacing@check4337 \ifMT@expansion4338 \ifMT@opt@expansion4339 \MT@error{Font expansion does not work with xetex}4340 {Use pdftex or luatex instead.}%4341 \fi4342 \fi4343 }4344 Tracking, spacing and kerning.4345 4346 \MT@requires@pdftex6{%4347 \MT@requires@luatex3{%4348 \def\MT@setup@tracking{%4349 \ifMT@tracking4350 \edef\MT@active@features{\MT@active@features,tr}%4351 \MT@info@nl{Tracking enabled}%4352 \MT@check@active@set{tr}%Enable protrusion for compensation at the line edges.4353 \ifMT@protrusion\else\MT@protrudechars\@ne\fi4354 \else4355 \let\MT@tracking\relax4356 \MT@info@nl{No adjustment of tracking}%4357 \fi4358 }4359 4360 4361 \def\MT@setup@spacing{%4362 \ifMT@spacing4363 \edef\MT@active@features{\MT@active@features,sp}%4364 \pdfadjustinterwordglue\@ne4365 \MT@info@nl{Adjustment of interword spacing enabled}%<strong>The</strong> ragged2e <strong>package</strong> sets interword spaces to a fixed value without glue. <strong>microtype</strong>’smodifications can therefore have undesired effects. <strong>The</strong>refore, we issue a warning.4366 \MT@with@<strong>package</strong>@T{ragged2e}{%4367 \MT@warning@nl{You are using the `ragged2e’ <strong>package</strong>.\MessageBreak4368 Adjustment of interword spacing may lead to\MessageBreak4369 undesired results when used with `ragged2e’.\MessageBreak4370 In this case, disable the `spacing’ option}%4371 }%4372 \MT@check@active@set{sp}%4373 \else4374 \let\MT@spacing\relax4375 \MT@info@nl{No adjustment of interword spacing}%4376 \fi4377 }Warning if \nonfrenchspacing is active, since space factors will be ignoredwith \pdfadjustinterwordglue > 0. Why 1500? Because some <strong>package</strong>s redefine\frenchspacing. 164378 \def\MT@setup@spacing@check{%4379 \ifMT@spacing4380 \ifMT@babel \else4381 \ifnum\sfcode`\. > 15004382 \MT@ifstreq\MT@sp@context{nonfrench}\relax{%4383 \MT@warning@nl{%4384 \string\nonfrenchspacing\space is active. Adjustment of\MessageBreak16 Cf. the c.t.t. thread ‘\frenchspacing with AMS <strong>package</strong>s and babel’, started by Philipp Lehman on16 August 2005, MID: ddtbaj$rob$1@online.de


IMPLEMENTATION: Package options 131\MT@setup@kerning\MT@error@doesnt@work\MT@setup@warntracking4385 interword spacing will disable it. You might want\MessageBreak4386 to add `\@backslashchar\MT@MT context{spacing=nonfrench}’\MessageBreak4387 to your preamble}%4388 }%4389 \fi4390 \fi4391 \fi4392 }4393 \def\MT@setup@kerning{%4394 \ifMT@kerning4395 \edef\MT@active@features{\MT@active@features,kn}%4396 \pdfprependkern\@ne4397 \pdfappendkern\@ne4398 \MT@info@nl{Adjustment of character kerning enabled}%4399 \MT@check@active@set{kn}%4400 \else4401 \let\MT@kerning\relax4402 \MT@info@nl{No adjustment of character kerning}%4403 \fi4404 }4405 If pdfTEX is too old, we disable tracking, spacing and kerning, and throw an errormessage. We also switch the features off for LuaTEX and TEX.4406 }{4407 4408 \def\MT@setup@tracking{%4409 \ifMT@tracking4410 \MT@error{<strong>The</strong> tracking feature only works with luatex 0.62\MessageBreak4411 or newer. Switching it off}{Upgrade luatex.}%4412 \MT@trackingfalse4413 \MT@let@nc{MT@tracking}\relax4414 \else4415 \MT@info@nl{No adjustment of tracking (luatex too old)}%4416 \fi4417 }4418 }4419 4420 4421 \def\MT@error@doesnt@work#1{%4422 \csname ifMT@#1\endcsname4423 \MT@error{<strong>The</strong> #1 feature only works with pdftex 1.40\MessageBreak4424 or newer. Switching it off}4425 {Upgrade pdftex.}%4426 {Use pdftex instead.}%4427 \csname MT@#1false\endcsname4428 \MT@let@nc{MT@#1}\relax4429 \else4430 \MT@info@nl{No adjustment of #1%4431 \space(pdftex too old)%4432 }%4433 \fi4434 }4435 \def\MT@setup@tracking{\MT@error@doesnt@work{tracking}}4436 \def\MT@setup@kerning {\MT@error@doesnt@work{kerning}}4437 \def\MT@setup@spacing {\MT@error@doesnt@work{spacing}}4438 }4439 4440 \MT@addto@setup4441 \def\MT@setup@warntrackingEX


IMPLEMENTATION: Package options 132\MT@warn@tracking@DVI\MT@setup@noligatures\MT@set@babel@contextWe issue a warning, when letterspacing in DVI mode, since it will probably not work.We also switch on protrusion if it isn’t already, to compensate for the letterspacingkerns.4442 4443 {%4444 \ifnum\pdfoutput


IMPLEMENTATION: Package options 133\MT@shorthandoff\MT@curr@fileActive characters can only be switched off if babel isn’t loaded after <strong>microtype</strong>.4493 \@if<strong>package</strong>loaded{babel}{4494 \def\MT@shorthandoff#1#2{%4495 \MT@info@nl{Switching off #1 babel’s active characters (#2)}%4496 \shorthandoff{#2}}4497 }{4498 \def\MT@shorthandoff#1#2{%4499 \MT@error{You must load `babel’ before `\MT@MT’}4500 {Otherwise, `\MT@MT’ cannot switch off #1 babel’s\MessageBreak4501 active characters.}}4502 }We patch the language switching commands to enable language-dependent setup.4503 \MT@addto@setup{%4504 \ifMT@babel4505 \@if<strong>package</strong>loaded{babel}{%4506 \MT@info@nl{Redefining babel’s language switching commands}%4507 \let\MT@orig@select@language\select@language4508 \def\select@language#1{%4509 \MT@orig@select@language{#1}%4510 \MT@set@babel@context{#1}%4511 }%4512 \let\MT@orig@foreign@language\foreign@language4513 \def\foreign@language#1{%4514 \MT@orig@foreign@language{#1}%4515 \MT@set@babel@context{#1}%4516 }%4517 \ifMT@kerningDisable French babel’s active characters.4518 \MT@if@false4519 \MT@with@babel@and@T{french} \MT@if@true4520 \MT@with@babel@and@T{frenchb} \MT@if@true4521 \MT@with@babel@and@T{francais}\MT@if@true4522 \MT@with@babel@and@T{canadien}\MT@if@true4523 \MT@with@babel@and@T{acadian} \MT@if@true4524 \ifMT@if@\MT@shorthandoff{French}{:;!?}\fiDisable Turkish babel’s active characters.4525 \MT@if@false4526 \MT@with@babel@and@T{turkish} \MT@if@true4527 \ifMT@if@\MT@shorthandoff{Turkish}{:!=}\fi4528 \fiIn case babel was loaded before <strong>microtype</strong>:4529 \MT@set@babel@context\languagename4530 }{%4531 \MT@warning@nl{You did not load the babel <strong>package</strong>.\MessageBreak4532 <strong>The</strong> `babel’ option won’t have any effect}%4533 }%4534 \fi4535 }Now we close the \fi from \ifMT@draft.4536 \MT@addto@setup{\fiSet 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.4537 \selectfont}This is the current file (hopefully with the correct extension).4538 \edef\MT@curr@file{\jobname.tex}4539


CONFIGURATION FILES 134Finally, execute the setup macro at the end of the preamble, and empty it (thecombine class calls it repeatedly).4540 4541 \MT@requires@latex1{4542 \AtBeginDocument{\MT@setup@ \MT@glet\MT@setup@\@empty}4543 }\relax4544 Must come at the very, very end.4545 \MT@ifdefined@c@T\MT@setup@spacing@check4546 {\AtBeginDocument{\MT@setup@spacing@check}}Restore catcodes.4547 \MT@restore@catcodesThat was that.15 Configuration filesLet’s now write the font configuration files.4548 454915.1 Font setsWe first declare some sets in the main configuration file.4550 4551 %%% -----------------------------------------------------------------------4552 %%% FONT SETS45534554 \DeclareMicrotypeSet{all}4555 { }45564557 \DeclareMicrotypeSet{allmath}4558 { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,EU1,EU2,TS1,OML,OMS,U} }45594560 \DeclareMicrotypeSet{alltext}4561 { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2} }45624563 \DeclareMicrotypeSet{basicmath}4564 { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,EU1,EU2,OML,OMS},4565 family = {rm*,sf*},4566 series = {md*},4567 size = {normalsize,footnotesize,small,large}4568 }45694570 \DeclareMicrotypeSet{basictext}4571 { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,EU1,EU2},4572 family = {rm*,sf*},4573 series = {md*},4574 size = {normalsize,footnotesize,small,large}4575 }45764577 \DeclareMicrotypeSet{smallcaps}4578 { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2},4579 shape = {sc*}4580 }4581


CONFIGURATION FILES: Font variants and aliases 1354582 \DeclareMicrotypeSet{footnotesize}4583 { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2},4584 size = {-small}4585 }45864587 \DeclareMicrotypeSet{scriptsize}4588 { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2},4589 size = {-footnotesize}4590 }45914592 \DeclareMicrotypeSet{normalfont}4593 { font = */*/*/*/* }4594<strong>The</strong> default sets.4595 %%% -----------------------------------------------------------------------4596 %%% DEFAULT SETS45974598 \DeclareMicrotypeSetDefault[protrusion]{alltext}4599 \DeclareMicrotypeSetDefault[expansion] {basictext}4600 \DeclareMicrotypeSetDefault[spacing] {basictext}4601 \DeclareMicrotypeSetDefault[kerning] {alltext}4602 \DeclareMicrotypeSetDefault[tracking] {smallcaps}460315.2 Font variants and aliases4604 %%% -----------------------------------------------------------------------4605 %%% FONT VARIANTS AND ALIASES4606<strong>The</strong>se are the variants I happen to be using (expert encoding, oldstyle numerals,swashes, alternative, display, inferior and superior numerals):4607 \DeclareMicrotypeVariants{x,j,w,a,d,0,1}4608Other 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). I’ve omitted them since they seem hardly be used and/or they areactually more than just a variant, i.e., they shouldn’t share a file.Fonts that are ‘the same’: <strong>The</strong> fontspec <strong>package</strong> will use lmr by default, whoseEU1/2 encoding is declared in mt-LatinModernRoman.cfg.4609 \ifMT@fontspec4610 \DeclareMicrotypeAlias{lmr} {Latin Modern Roman}4611 \else4612 \DeclareMicrotypeAlias{lmr} {cmr} % lmodern4613 \fi<strong>The</strong> Latin Modern fonts, the virtual fonts from the ae and zefonts, and the ecoand hfoldsty <strong>package</strong>s (oldstyle numerals) all inherit the (basic) settings fromComputer Modern Roman. Some of them are in part overwritten later. We mustn’tforget the Latin Modern math fonts.4614 \DeclareMicrotypeAlias{lmsy}{cmsy}4615 \DeclareMicrotypeAlias{lmm} {cmm}4616 \DeclareMicrotypeAlias{aer} {cmr} % ae4617 \DeclareMicrotypeAlias{zer} {cmr} % zefonts4618 \DeclareMicrotypeAlias{cmor}{cmr} % eco4619 \DeclareMicrotypeAlias{hfor}{cmr} % hfoldsty<strong>The</strong> <strong>package</strong>s pxfonts and txfonts fonts inherit Palatino and Times settings respectively,also the TEX Gyre fonts Pagella and Termes (formerly: qfonts).


CONFIGURATION FILES: Interaction with babel 1364620 \DeclareMicrotypeAlias{pxr} {ppl} % pxfonts4621 \DeclareMicrotypeAlias{qpl} {ppl} % TeX Gyre Pagella (formerly: qfonts/QuasiPalatino)<strong>The</strong> ‘FPL Neu’ fonts, a ‘re-implementation’ of Palatino.4622 \DeclareMicrotypeAlias{fp9x}{pplx} % FPL Neu4623 \DeclareMicrotypeAlias{fp9j}{pplj} % "4624 \DeclareMicrotypeAlias{txr} {ptm} % txfonts4625 \DeclareMicrotypeAlias{qtm} {ptm} % TeX Gyre Termes (formerly: qfonts/QuasiTimes)<strong>The</strong> OpenType versions:4626 \DeclareMicrotypeAlias{TeX Gyre Pagella}{Palatino Linotype}4627 \DeclareMicrotypeAlias{Palatino LT Std} {Palatino Linotype}4628 \DeclareMicrotypeAlias{Palatino} {Palatino Linotype}4629 \DeclareMicrotypeAlias{Asana Math} {Palatino Linotype}More Times variants, to be checked: pns, mns (TimesNewRomanPS); mnt (Times-NewRomanMT, TimesNRSevenMT), mtm (TimesSmallTextMT); pte (TimesEuropa);ptt (TimesTen); TimesEighteen; TimesModernEF.<strong>The</strong> eulervm <strong>package</strong> virtually extends the Euler fonts.4630 \DeclareMicrotypeAlias{zeur}{eur} % Euler VM4631 \DeclareMicrotypeAlias{zeus}{eus} % "MicroPress’s Charter version (chmath).4632 \DeclareMicrotypeAlias{chr} {bch} % CH Math<strong>The</strong> mathdesign <strong>package</strong> provides math fonts matching Bitstream Charter and URWGaramond.4633 \DeclareMicrotypeAlias{mdbch}{bch} % mathdesign/Charter4634 \DeclareMicrotypeAlias{mdugm}{ugm} % mathdesign/URW Garamond<strong>The</strong> garamondx <strong>package</strong>, an extension of URW Garamond, providing small caps andoldstyle figures.4635 \DeclareMicrotypeAlias{zgmx}{ugm} % garamondx4636 \DeclareMicrotypeAlias{zgmj}{ugm} % "4637 \DeclareMicrotypeAlias{zgmI}{ugm} % "4638 \DeclareMicrotypeAlias{zgmq}{ugm} % "URW Letter Gothic is similar enough to Bitstream Letter Gothic to share the configuration.4639 \DeclareMicrotypeAlias{ulg} {blg} % URW LetterGothic -> Bitstream LetterGothic12PitchEuro symbol fonts, to save some files.4640 \DeclareMicrotypeAlias{zpeus} {zpeu} % Adobe Euro sans -> serif4641 \DeclareMicrotypeAlias{eurosans}{zpeu} % Adobe Euro sans -> serif4642 \DeclareMicrotypeAlias{euroitcs}{euroitc} % ITC Euro sans -> serif464315.3 Interaction with babelContexts that are to be set when switching to a language.4644 %%% -----------------------------------------------------------------------4645 %%% INTERACTION WITH THE `babel’ PACKAGE46464647 \DeclareMicrotypeBabelHook4648 {english,UKenglish,british,USenglish,american}4649 {kerning=, spacing=nonfrench}46504651 \DeclareMicrotypeBabelHook4652 {french,francais,acadian,canadien}4653 {kerning=french, spacing=}46544655 \DeclareMicrotypeBabelHook4656 {turkish}4657 {kerning=turkish, spacing=}4658


CONFIGURATION FILES: Note on admissible characters 13715.4 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 (‘{,}’, ‘{=}’) to keep keyvalhappy.Character commands are allowed as far as they have been defined in the properL A TEX way, that is, when they have been assigned a slot in the font encoding with\DeclareTextSymbol or \DeclareTextComposite. Characters defined via \chardefare also possible.Ligatures and \mathchardefed 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. <strong>The</strong>y should, however, only be used in private configurationfiles, where the proper input encoding is guaranteed, or else in combination withthe ‘inputenc’ key.15.5 Character inheritanceFirst the lists of inheriting characters. We only declare those characters that are thesame on both sides, i.e., not Œ for O.4659 4660 4661 %%% -----------------------------------------------------------------------4662 %%% CHARACTER INHERITANCE46634664 4665 15.5.1 OT1Glyphs that should possibly inherit settings on one side only: 012 (‘fi’ ligature),013 (‘fl’), 014 (‘ffi’), 015 (‘ffl’), Æ, æ, Œ, œ.4666 \DeclareCharacterInheritance4667 { encoding = OT1 }4668 { f = {011}, % ff4669 i = {\i},4670 j = {\j},4671 O = {\O},4672 o = {\o}4673 }4674


CONFIGURATION FILES: Character inheritance 13815.5.2 T1Candidates here: 028 (‘fi’), 029 (‘fl’), 030 (‘ffi’), 031 (‘ffl’), 156 (‘IJ’ ligature, sinceL A TEX 2005/12/01 accessible as \IJ), 188 (‘ij’, \ij), Æ, æ, Œ, œ.4675 \DeclareCharacterInheritance4676 { encoding = T1 }4677 { A = {\`A,\’A,\^A,\~A,\"A,\r A,\k A,\u A},4678 a = {\`a,\’a,\^a,\~a,\"a,\r a,\k a,\u a},4679 C = {\’C,\c C,\v C},4680 c = {\’c,\c c,\v c},4681 D = {\v D,\DH},4682 d = {\v d,\dj},4683 E = {\`E,\’E,\^E,\"E,\k E,\v E},4684 e = {\`e,\’e,\^e,\"e,\k e,\v e},4685 f = {027}, % ff4686 G = {\u G},4687 g = {\u g},4688 I = {\`I,\’I,\^I,\"I,\.I},4689 i = {\`i,\’i,\^i,\"i,\i},4690 j = {\j},4691 L = {\L,\’L,\v L},4692 l = {\l,\’l,\v l},4693 N = {\’N,\~N,\v N},4694 n = {\’n,\~n,\v n},4695 O = {\O,\`O,\’O,\^O,\~O,\"O,\H O},4696 o = {\o,\`o,\’o,\^o,\~o,\"o,\H o},4697 R = {\’R,\v R},4698 r = {\’r,\v r},4699 S = {\’S,\c S,\v S,\SS},4700 s = {\’s,\c s,\v s},4701 T = {\c T,\v T},4702 t = {\c t,\v t},4703 U = {\`U,\’U,\^U,\"U,\H U,\r U},4704 u = {\`u,\’u,\^u,\"u,\H u,\r u},4705 Y = {\’Y,\"Y},4706 y = {\’y,\"y},4707 Z = {\’Z,\.Z,\v Z},4708 z = {\’z,\.z,\v z}<strong>The</strong> ‘soft hyphen’ often has reduced right side bearing so that it may already beprotruded, hence no inheritance.4709 % - = {127},4710 }471115.5.3 LY1More characters: 008 (‘fl’), 012 (‘fi’), 014 (‘ffi’), 015 (‘ffl’), Æ, æ, Œ, œ.4712 \DeclareCharacterInheritance4713 { encoding = LY1 }4714 { A = {\`A,\’A,\^A,\~A,\"A,\r A},4715 a = {\`a,\’a,\^a,\~a,\"a,\r a},4716 C = {\c C},4717 c = {\c c},4718 D = {\DH},4719 E = {\`E,\’E,\^E,\"E},4720 e = {\`e,\’e,\^e,\"e},4721 f = {011}, % ff4722 I = {\`I,\’I,\^I,\"I},4723 i = {\`i,\’i,\^i,\"i,\i},4724 L = {\L},4725 l = {\l},4726 N = {\~N},


CONFIGURATION FILES: Character inheritance 1394727 n = {\~n},4728 O = {\`O,\’O,\^O,\~O,\"O,\O},4729 o = {\`o,\’o,\^o,\~o,\"o,\o},4730 S = {\v S},4731 s = {\v s},4732 U = {\`U,\’U,\^U,\"U},4733 u = {\`u,\’u,\^u,\"u},4734 Y = {\’Y,\"Y},4735 y = {\’y,\"y},4736 Z = {\v Z},4737 z = {\v z}4738 }473915.5.4 OT4<strong>The</strong> Polish OT1 extension. More interesting characters here: 009 (‘fk’), 012 (‘fi’),013 (‘fl’), 014 (‘ffi’), 015 (‘ffl’), Æ, æ, Œ, œ.4740 \DeclareCharacterInheritance4741 { encoding = OT4 }4742 { A = {\k A},4743 a = {\k a},4744 C = {\’C},4745 c = {\’c},4746 E = {\k E},4747 e = {\k e},4748 f = {011}, % ff4749 i = {\i},4750 j = {\j},4751 L = {\L},4752 l = {\l},4753 N = {\’N},4754 n = {\’n},4755 O = {\O,\’O},4756 o = {\o,\’o},4757 S = {\’S},4758 s = {\’s},4759 Z = {\’Z,\.Z},4760 z = {\’z,\.z}4761 }476215.5.5 QX<strong>The</strong> Central European QX encoding. 17 Ligatures: 009 (‘fk’), 012 (‘fi’), 013 (‘fl’),014 (‘ffi’), 015 (‘ffl’), Æ, æ, Œ, œ.4763 \DeclareCharacterInheritance4764 { encoding = QX }4765 { A = {\`A,\’A,\^A,\~A,\"A,\k A,\AA},4766 a = {\`a,\’a,\^a,\~a,\"a,\k a,\aa},4767 C = {\’C,\c C},4768 c = {\’c,\c c},4769 D = {\DH},4770 E = {\`E,\’E,\^E,\"E,\k E},4771 e = {\`e,\’e,\^e,\"e,\k e},4772 f = {011}, % ff4773 I = {\`I,\’I,\^I,\"I,\k I},4774 i = {\`i,\’i,\^i,\"i,\k i,\i},4775 j = {\j},4776 L = {\L},17 Contributed by Maciej Eder.


CONFIGURATION FILES: Character inheritance 1404777 l = {\l},4778 N = {\’N,\~N},4779 n = {\’n,\~n},4780 O = {\O,\`O,\’O,\^O,\~O,\"O},4781 o = {\o,\`o,\’o,\^o,\~o,\"o},<strong>The</strong> Rumanian \textcommabelow accents are actually replacements for the \cvariants, which had previously (and erroneously 18 ) been included in QX encoding.<strong>The</strong>y are still kept for backwards compatibility.4782 S = {\’S,\c S,\textcommabelow S,\v S},4783 s = {\’s,\c s,\textcommabelow s,\v s},4784 T = {\c T,\textcommabelow T},4785 t = {\c t,\textcommabelow t},4786 U = {\`U,\’U,\^U,\"U,\k U},4787 u = {\`u,\’u,\^u,\"u,\k u},4788 Y = {\’Y,\"Y},4789 y = {\’y,\"y},4790 Z = {\’Z,\.Z,\v Z},4791 z = {\’z,\.z,\v z},4792 . = \textellipsis4793 }479415.5.6 T5<strong>The</strong> Vietnamese encoding T5. It is so crowded with accented and double-accentedcharacters that there is no room for any ligatures.4795 \DeclareCharacterInheritance4796 { encoding = T5 }4797 { A = {\`A,\’A,\~A,\h A,\d A,\^A,\u A,4798 \`\Acircumflex,\’\Acircumflex,\~\Acircumflex,\h\Acircumflex,\d\Acircumflex,4799 \`\Abreve,\’\Abreve,\~\Abreve,\h\Abreve,\d\Abreve},4800 a = {\`a,\’a,\~a,\h a,\d a,\^a,\u a,4801 \`\acircumflex,\’\acircumflex,\~\acircumflex,\h\acircumflex,\d\acircumflex,4802 \`\abreve,\’\abreve,\~\abreve,\h\abreve,\d\abreve},4803 D = {\DJ},4804 d = {\dj},4805 E = {\`E,\’E,\~E,\h E,\d E,\^E,4806 \`\Ecircumflex,\’\Ecircumflex,\~\Ecircumflex,\h\Ecircumflex,\d\Ecircumflex},4807 e = {\`e,\’e,\~e,\h e,\d e,\^e,4808 \`\ecircumflex,\’\ecircumflex,\~\ecircumflex,\h\ecircumflex,\d\ecircumflex},4809 I = {\`I,\’I,\~I,\h I,\d I},4810 i = {\`i,\’i,\~i,\h i,\d i,\i},4811 O = {\`O,\’O,\~O,\h O,\d O,\^O,\horn O,4812 \`\Ocircumflex,\’\Ocircumflex,\~\Ocircumflex,\h\Ocircumflex,\d\Ocircumflex,4813 \`\Ohorn,\’\Ohorn,\~\Ohorn,\h\Ohorn,\d\Ohorn},4814 o = {\`o,\’o,\~o,\h o,\d o,\^o,\horn o,4815 \`\ocircumflex,\’\ocircumflex,\~\ocircumflex,\h\ocircumflex,\d\ocircumflex,4816 \`\ohorn,\’\ohorn,\~\ohorn,\h\ohorn,\d\ohorn},4817 U = {\`U,\’U,\~U,\h U,\d U,\horn U,4818 \`\Uhorn,\’\Uhorn,\~\Uhorn,\h\Uhorn,\d\Uhorn},4819 u = {\`u,\’u,\~u,\h u,\d u,\horn u,4820 \`\uhorn,\’\uhorn,\~\uhorn,\h\uhorn,\d\uhorn},4821 Y = {\`Y,\’Y,\~Y,\h Y,\d Y},4822 y = {\`y,\’y,\~y,\h y,\d y}4823 }482418 Cf. http://tug.org/pipermail/tex-live/2008-August/017204.html


CONFIGURATION FILES: Character inheritance 14115.5.7 EU1, EU2<strong>The</strong> EU1 and EU2 encodings are not well-defined as they don’t contain a fixednumber of glyphs, all of which must be present. OpenType fonts may containthousands of glyphs, but we only define those that should be present in every font(basically T1). This inheritance list should be overridden by font-specific ones.4825 \DeclareCharacterInheritance4826 { encoding = {EU1,EU2} }4827 { A = {\`A,\’A,\^A,\~A,\"A,\r A,\k A,\u A},4828 a = {\`a,\’a,\^a,\~a,\"a,\r a,\k a,\u a},4829 C = {\’C,\c C,\v C},4830 c = {\’c,\c c,\v c},4831 D = {\v D,\DH},4832 d = {\v d,\dj},4833 E = {\`E,\’E,\^E,\"E,\k E,\v E},4834 e = {\`e,\’e,\^e,\"e,\k e,\v e},4835 % f = {/f _ f}, % sometimes /f _ f, sometimes /ff4836 G = {\u G},4837 g = {\u g},4838 I = {\`I,\’I,\^I,\"I,\.I},4839 i = {\`i,\’i,\^i,\"i,\i},4840 % j = {\j},4841 L = {\L,\’L,\v L},4842 l = {\l,\’l,\v l},4843 N = {\’N,\~N,\v N},4844 n = {\’n,\~n,\v n},4845 O = {\O,\`O,\’O,\^O,\~O,\"O,\H O},4846 o = {\o,\`o,\’o,\^o,\~o,\"o,\H o},4847 R = {\’R,\v R},4848 r = {\’r,\v r},4849 S = {\’S,\c S,\v S}, % \SS4850 s = {\’s,\c s,\v s},4851 T = {\c T,\v T},4852 t = {\c t,\v t},4853 U = {\`U,\’U,\^U,\"U,\H U,\r U},4854 u = {\`u,\’u,\^u,\"u,\H u,\r u},4855 Y = {\’Y,\"Y},4856 y = {\’y,\"y},4857 Z = {\’Z,\.Z,\v Z},4858 z = {\’z,\.z,\v z}4859 }48604861 15.5.8 Euro symbolsMake Euro symbols settings simpler.4862 4863 \DeclareCharacterInheritance4864 { encoding = U,4865 family = {zpeu,zpeus,eurosans} }4866 { E = 128 }48674868 4869 Since 2006/05/11 (that is, one week after I’ve added these settings, after the<strong>package</strong> had been dormant for six years!), marvosym’s encoding is (correctly) Uinstead of OT1.4870 \DeclareCharacterInheritance4871 { encoding = {OT1,U},4872 family = mvs }


CONFIGURATION FILES: Tracking 1424873 { 164 = {099,100,101} } % \EURhv,\EURcr,\EURtm48744875 15.6 TrackingBy default, we only disable the ‘f*’ ligatures, for those fonts that have any. Thus,ligatures and especially kerning for all other characters will be retained.4876 4877 %%% -----------------------------------------------------------------------4878 %%% TRACKING/LETTERSPACING48794880 \SetTracking4881 [ name = default,4882 no ligatures = {f} ]4883 { encoding = {OT1,T1,T2A,LY1,OT4,QX,EU2} }4884 { }488515.7 Font expansion<strong>The</strong>se are Hàn Thê´ Thành’s original expansion settings. <strong>The</strong>y are used for all fonts(until somebody shows mercy and creates font-specific settings).4886 %%% -----------------------------------------------------------------------4887 %%% EXPANSION48884889 \SetExpansion4890 [ name = default ]4891 { encoding = {OT1,OT4,QX,T1,LY1} }4892 {4893 A = 500, a = 700,4894 \AE = 500, \ae = 700,4895 B = 700, b = 700,4896 C = 700, c = 700,4897 D = 500, d = 700,4898 E = 700, e = 700,4899 F = 700,4900 G = 500, g = 700,4901 H = 700, h = 700,4902 K = 700, k = 700,4903 M = 700, m = 700,4904 N = 700, n = 700,4905 O = 500, o = 700,4906 \OE = 500, \oe = 700,4907 P = 700, p = 700,4908 Q = 500, q = 700,4909 R = 700,4910 S = 700, s = 700,4911 U = 700, u = 700,4912 W = 700, w = 700,4913 Z = 700, z = 700,4914 2 = 700,4915 3 = 700,4916 6 = 700,4917 8 = 700,4918 9 = 7004919 }4920Settings for Cyrillic T2A encoding. 1919 Contributed by Karl Karlsson.


CONFIGURATION FILES: Font expansion 1434921 \SetExpansion4922 [ name = T2A ]4923 { encoding = T2A }4924 {4925 A = 500, a = 700,4926 B = 700, b = 700,4927 C = 700, c = 700,4928 D = 500, d = 700,4929 E = 700, e = 700,4930 F = 700,4931 G = 500, g = 700,4932 H = 700, h = 700,4933 K = 700, k = 700,4934 M = 700, m = 700,4935 N = 700, n = 700,4936 O = 500, o = 700,4937 P = 700, p = 700,4938 Q = 500, q = 700,4939 R = 700,4940 S = 700, s = 700,4941 U = 700, u = 700,4942 W = 700, w = 700,4943 Z = 700, z = 700,4944 2 = 700,4945 3 = 700,4946 6 = 700,4947 8 = 700,4948 9 = 700,4949 \CYRA = 500, \cyra = 700,4950 \CYRB = 700, \cyrb = 700,4951 \CYRV = 700, \cyrv = 700,4952 \CYRG = 700, \cyrg = 700,4953 \CYRD = 700, \cyrd = 700,4954 \CYRE = 700, \cyre = 700,4955 \CYRZH = 700, \cyrzh = 700,4956 \CYRZ = 700, \cyrz = 700,4957 \CYRI = 700, \cyri = 700,4958 \CYRISHRT = 700, \cyrishrt = 700,4959 \CYRK = 700, \cyrk = 700,4960 \CYRL = 700, \cyrl = 700,4961 \CYRM = 700, \cyrm = 700,4962 \CYRN = 700, \cyrn = 700,4963 \CYRO = 500, \cyro = 700,4964 \CYRP = 700, \cyrp = 700,4965 \CYRR = 700, \cyrr = 700,4966 \CYRS = 700, \cyrs = 700,4967 \CYRT = 700, \cyrt = 700,4968 \CYRU = 700, \cyru = 700,4969 \CYRF = 700, \cyrf = 700,4970 \CYRH = 700, \cyrh = 700,4971 \CYRC = 700, \cyrc = 700,4972 \CYRCH = 700, \cyrch = 700,4973 \CYRSH = 700, \cyrsh = 700,4974 \CYRSHCH = 700, \cyrshch = 700,4975 \CYRHRDSN = 700, \cyrhrdsn = 700,4976 \CYRERY = 700, \cyrery = 700,4977 \CYRSFTSN = 700, \cyrsftsn = 700,4978 \CYREREV = 700, \cyrerev = 700,4979 \CYRYU = 700, \cyryu = 700,4980 \CYRYA = 700, \cyrya = 7004981 }4982T5 encoding does not contain \AE, \ae, \OE and \oe.4983 \SetExpansion


CONFIGURATION FILES: Character protrusion 1444984 [ name = T5 ]4985 { encoding = T5 }4986 {4987 A = 500, a = 700,4988 B = 700, b = 700,4989 C = 700, c = 700,4990 D = 500, d = 700,4991 E = 700, e = 700,4992 F = 700,4993 G = 500, g = 700,4994 H = 700, h = 700,4995 K = 700, k = 700,4996 M = 700, m = 700,4997 N = 700, n = 700,4998 O = 500, o = 700,4999 P = 700, p = 700,5000 Q = 500, q = 700,5001 R = 700,5002 S = 700, s = 700,5003 U = 700, u = 700,5004 W = 700, w = 700,5005 Z = 700, z = 700,5006 2 = 700,5007 3 = 700,5008 6 = 700,5009 8 = 700,5010 9 = 7005011 }50125013 15.8 Character protrusion5014 %%% -----------------------------------------------------------------------5015 %%% PROTRUSION5016For future historians, Hàn Thê´ Thành’s original settings (from protcode.tex, convertedto <strong>microtype</strong> notation).\SetProtrusion[ name = thanh ]{ encoding = OT1 }{A = {50,50},F = { ,50},J = {50, },K = { ,50},L = { ,50},T = {50,50},V = {50,50},W = {50,50},X = {50,50},Y = {50,50},k = { ,50},r = { ,50},t = { ,50},v = {50,50},w = {50,50},x = {50,50},y = {50,50},. = { ,700}, {,}= { ,700},: = { ,500}, ; = { ,500},! = { ,200}, ? = { ,200},( = {50, }, ) = { ,50},


CONFIGURATION FILES: Character protrusion 14515.8.1 Normal- = { ,700},\textendash = { ,300}, \textemdash = { ,200},\textquoteleft = {700, }, \textquoteright = { ,700},\textquotedblleft = {500, }, \textquotedblright = { ,500}}<strong>The</strong> default settings always use the most moderate value.5017 5018 \SetProtrusion5019 [ name = default ]We also create configuration files for the fonts• Bitstream Charter (NFSS code bch)5020 [ name = bch-default ]• Bitstream Letter Gothic (blg)5021 [ name = blg-default ]• Computer Modern Roman (cmr)5022 [ name = cmr-default ]• Adobe Garamond (pad, padx, padj)5023 [ name = pad-default ]• Minion 20 (pmnx, pmnj)5024 [ name = pmnj-default ]• Palatino (ppl, pplx, pplj)5025 [ name = ppl-default ]• Times (ptm, ptmx, ptmj)5026 [ name = ptm-default ]• URW Garamond (ugm)5027 [ name = ugm-default ]5028 { }5029 { encoding = OT1,5030 { encoding = {OT1,OT4},5031 family = bch }5032 family = blg }5033 family = {pad,padx,padj} }5034 family = {ppl,pplx,pplj} }5035 family = {ptm,ptmx,ptmj} }5036 family = ugm }5037 {5038 A = {50,50},5039 A = {50,100},5040 \AE = {50, },5041 \AE = {150,50},5042 B = { ,50},5043 C = {50, },5044 D = { ,50},5045 D = { ,70},5046 E = { ,50},20 Contributed by Harald Harders and Karl Karlsson.


CONFIGURATION FILES: Character protrusion 1465047 F = { ,50},5048 F = { ,70},5049 G = {50, },5050 G = {50,50},5051 I = {150,150},5052 J = {50, },5053 J = {100, },5054 K = { ,50},5055 K = {50, },5056 L = { ,50},5057 L = { ,150},5058 L = { ,80},5059 L = { ,120},5060 O = {50,50},5061 \OE = {50, },5062 \OE = {50,50},5063 P = { ,100},5064 P = { ,50},5065 Q = {50,70},5066 Q = {50,50},5067 R = { ,50},5068 R = { ,70},5069 T = {50,50},5070 T = {100,100},5071 T = {70,70},5072 V = {50,50},5073 V = {70,70},5074 W = {50,50},5075 W = {70,70},5076 X = {50,50},5077 X = {50,70},5078 Y = {50,50},5079 Y = {80,80},5080 Z = {50,50},5081 f = {150,100},5082 i = {150,150},5083 j = {100,100},5084 k = { ,50},5085 k = { ,70},5086 l = {150,150},5087 l = { ,-50},5088 p = {50,50},5089 p = { ,50},5090 q = {50, },5091 r = { ,50},5092 r = {100, 80},5093 t = { ,70},5094 t = { ,50},5095 t = {150, 80},5096 t = { ,100},5097 v = {50,50},5098 v = {100,100},5099 v = {50,70},5100 w = {50,50},5101 w = {50,70},5102 x = {50,50},5103 x = {100,100},5104 y = { ,50},5105 y = { 50,100},5106 y = {50,70},5107 y = { ,70},5108 0 = { ,50},5109 1 = {50,50},5110 1 = {150,150},5111 1 = {100,200},


CONFIGURATION FILES: Character protrusion 1475112 1 = { ,50},5113 1 = {100,100},5114 2 = {50,50},5115 2 = { ,100},5116 3 = {50, },5117 3 = {50,50},5118 3 = {100, },5119 4 = {50,50},5120 4 = {100,50},5121 4 = {100, },5122 4 = {70,70},5123 4 = {50, },5124 4 = {70, },5125 5 = { ,50},5126 5 = {50,50},5127 6 = {50, },5128 6 = { ,50},5129 6 = {50,50},5130 7 = {50,50},5131 7 = {50,80},5132 7 = {100,100},5133 7 = {50,100},5134 7 = { ,50},5135 8 = { ,50},5136 9 = {50,50},5137 9 = { ,50},5138 . = { ,700},5139 . = { ,600},5140 . = {400,500},5141 {,}= { ,500},5142 {,}= {300,400},5143 : = { ,500},5144 : = { ,400},5145 : = {300,400},5146 ; = { ,300},5147 ; = {200,300},5148 ; = { ,500},5149 ; = { ,400},5150 ! = { ,100},5151 ! = {200,200},5152 ? = { ,100},5153 ? = { ,200},5154 ? = {150,150},5155 " = {300,300},5156 @ = {50,50},5157 @ = {100,100},5158 ~ = {200,250},5159 ~ = {300,350},5160 & = {50,100},5161 & = { ,100},5162 \% = {50,50},5163 \% = { ,50},5164 \% = {100,100},5165 \% = {50,100},5166 \# = {100,100},5167 * = {200,200},5168 * = {200,300},5169 * = {150,200},5170 * = {300,300},5171 + = {250,250},5172 + = {150,250},5173 + = {300,300},5174 + = {150,200},5175 + = {250,300},5176 {=}= {200,200},


CONFIGURATION FILES: Character protrusion 1485177 ( = {100, }, ) = { ,200},5178 ( = {200, }, ) = { ,200},5179 ( = {300, }, ) = { ,300},5180 ( = {100, }, ) = { ,300},5181 [ = {100, }, ] = { ,100},5182 [ = {300,100}, ] = { ,300},5183 / = {100,200},5184 / = { ,200},5185 / = {300,300},5186 / = {200,300},5187 / = {100,300},5188 - = {500,500},5189 - = {400,500},5190 - = {300,400},5191 - = {300,500},5192 - = {200,400},5193 - = {500,600},5194 < = {200,100}, > = {100,200},5195 _ = {150,250},5196 | = {250,250},5197 \textendash = {200,200}, \textemdash = {150,150},5198 \textendash = {200,300}, \textemdash = {150,250},5199 \textendash = {400,300}, \textemdash = {300,200},5200 \textendash = {300,300}, \textemdash = {200,200},5201 \textendash = {250,300}, \textemdash = {250,250},Why settings for left and right quotes? Because in some languages they might beused like that (see the csquotes <strong>package</strong> for examples).5202 \textquoteleft = {300,400}, \textquoteright = {300,400},5203 \textquoteleft = {400,600}, \textquoteright = {400,600},5204 \textquoteleft = {500,700}, \textquoteright = {500,600},5205 \textquoteleft = {500,700}, \textquoteright = {500,700},5206 \textquoteleft = {500,500}, \textquoteright = {300,500},5207 \textquoteleft = {300,600}, \textquoteright = {300,600},5208 \textquotedblleft = {300,300}, \textquotedblright = {300,300}5209 \textquotedblright = {300,400}5210 \textquotedblleft = {500,300}, \textquotedblright = {200,600}5211 \textquotedblleft = {300,400}, \textquotedblright = {300,400}5212 \textquotedblleft = {400,400}, \textquotedblright = {400,400}5213 }5214Greek uppercase letters are in OT1 encoding only.5215 5216 \SetProtrusion5217 [ name = OT1-default,5218 [ name = cmr-OT1,5219 [ name = pmnj-OT1,5220 load = default ]5221 load = cmr-default ]5222 load = pmnj-default ]5223 { encoding = OT1 }5224 { encoding = {OT1,OT4},5225 { encoding = OT1,5226 family = cmr }5227 family = pmnj }5228 {5229 \AE = {50, },5230 \OE = {50, }5231 5232 "00 = { ,150}, % \Gamma5233 "01 = {100,100}, % \Delta5234 "02 = { 50, 50}, % \<strong>The</strong>ta5235 "03 = {100,100}, % \Lambda


CONFIGURATION FILES: Character protrusion 1495236 "06 = { 50, 50}, % \Sigma5237 "07 = {100,100}, % \Upsilon5238 "08 = { 50, 50}, % \Phi5239 "09 = { 50, 50} % \PsiRemaining slots can be found in the source file.5240 5241 }52425243 T1 and LY1 encodings contain some more characters. <strong>The</strong> default list will be loadedfirst. For TEX (EU1) and LuaTEX (EU2) we simply use the T1 list as default (fornow).EX5244 \SetProtrusion5245 [ name = T1-default,5246 [ name = bch-T1,5247 [ name = blg-T1,5248 [ name = cmr-T1,5249 [ name = pad-T1,5250 [ name = pmnj-T1,5251 [ name = ppl-T1,5252 [ name = ptm-T1,5253 [ name = ugm-T1,5254 load = default ]5255 load = bch-default ]5256 load = blg-default ]5257 load = cmr-default ]5258 load = pad-default ]5259 load = pmnj-default ]5260 load = ppl-default ]5261 load = ptm-default ]5262 load = ugm-default ]5263 { encoding = {T1,LY1,EU1,EU2} }5264 { encoding = {T1,LY1},5265 { encoding = {T1},5266 family = bch }5267 family = blg }5268 family = cmr }5269 family = {pad,padx,padj} }5270 family = pmnj }5271 family = {ppl,pplx,pplj} }5272 family = {ptm,ptmx,ptmj} }5273 family = ugm }5274 {5275 \AE = {50, },5276 \OE = {50, },5277 \TH = { ,50},5278 \v L = { ,250},5279 \v d = { ,250},5280 \v l = { ,250},5281 \v t = { ,250},5282 127 = {300,400},5283 156 = {100, }, % IJ5284 188 = { 80, 80}, % ij5285 _ = {100,100},5286 _ = {200,200},5287 _ = {100,200},5288 \textbackslash = {100,200},5289 \textbackslash = {150,200},5290 \textbackslash = {250,300},5291 \textbackslash = {200,300},5292 \textbackslash = {100,300},5293 \textbar = {200,200},5294 \textendash = {300,300}, \textemdash = {150,150},


CONFIGURATION FILES: Character protrusion 1505295 \textquotedbl = {300,400}, \textquotedblleft = {300,400},5296 \textquotedbl = {300,300}, \textquotedblleft = {200,600},<strong>The</strong> EC fonts do something weird: they insert an implicit kern between quote andboundary character. <strong>The</strong>refore, we must override the settings from OT1.5297 \quotesinglbase = {400,400}, \quotedblbase = {400,400},5298 \quotesinglbase = {400,400}, \quotedblbase = {300,400},5299 \quotesinglbase = {400,400}, \quotedblbase = {300,300},5300 \guilsinglleft = {400,300}, \guilsinglright = {300,400},5301 \guilsinglleft = {300,500}, \guilsinglright = {300,500},5302 \guilsinglleft = {400,400}, \guilsinglright = {300,500},5303 \guilsinglleft = {400,400}, \guilsinglright = {300,600},5304 \guillemotleft = {200,200}, \guillemotright = {200,200},5305 \guillemotleft = {300,200}, \guillemotright = {100,400},5306 \guillemotleft = {200,200}, \guillemotright = {150,300},5307 \guillemotleft = {300,300}, \guillemotright = {200,400},5308 \guillemotleft = {300,400}, \guillemotright = {300,400},5309 \textexclamdown = {100, }, \textquestiondown = {100, },5310 \textexclamdown = {200, }, \textquestiondown = {100, },5311 \textexclamdown = {200, }, \textquestiondown = {200, },5312 \textbraceleft = {400,200}, \textbraceright = {200,400},5313 \textbraceleft = {200, }, \textbraceright = { ,300},5314 \textless = {200,100}, \textgreater = {100,200}5315 \textless = {100, }, \textgreater = { ,100},5316 \textvisiblespace = {100,100} % not in LY15317 }5318<strong>The</strong> lmodern fonts used to restore the original settings from OT1 fonts. Now, theyrequire even other settings, though.5319 5320 \SetProtrusion5321 [ name = lmr-T1,5322 load = cmr-T1 ]5323 { encoding = {T1,LY1},5324 family = lmr }5325 {5326 \textquotedblleft = {300,400}, \textquotedblright = {300,400}5327 }53285329 Settings for the T2A encoding (generic, Computer Modern Roman, and Minion). 215330 5331 \SetProtrusion5332 [ name = T2A-default,5333 [ name = cmr-T2A,5334 [ name = pmnj-T2A,5335 load = default ]5336 load = cmr-default ]5337 load = pmnj-default ]5338 { encoding = T2A,5339 }5340 family = cmr }5341 family = pmnj }5342 {5343 \CYRA = {50,50},5344 \CYRG = { ,50},5345 \CYRK = { ,50},5346 \CYRT = {50,50},5347 \CYRH = {50,50},5348 \CYRU = {50,50},21 Contributed by Karl Karlsson.


CONFIGURATION FILES: Character protrusion 1515349 \CYRS = {50, },5350 \CYRO = {50,50},5351 \cyrk = { ,50},5352 \cyrg = { ,50},5353 \cyrh = {50,50},5354 \cyru = {50,50},5355 \cyru = {50,70},5356 _ = {100,100},5357 _ = {200,200},5358 \textbackslash = {100,200}, \quotedblbase = {400,400},5359 \textbackslash = {200,300}, \quotedblbase = {400,400},5360 \textbackslash = {100,200}, \quotedblbase = {300,300},5361 \textquotedbl = {300,300}, \textquotedblleft = {200,600},5362 \guillemotleft = {200,200}, \guillemotright = {200,200},5363 \guillemotleft = {300,200}, \guillemotright = {100,400},5364 \guillemotleft = {200,200}, \guillemotright = {150,300},5365 \textbraceleft = {400,200}, \textbraceright = {200,400},5366 \textbraceleft = {200, }, \textbraceright = { ,300},5367 \textless = {200,100}, \textgreater = {100,200}5368 \textless = {100, }, \textgreater = { ,100}5369 }53705371 Settings for the QX encoding (generic and Times). 22 It also includes some glyphsotherwise in TS1.5372 5373 \SetProtrusion5374 [ name = QX-default,5375 [ name = ptm-QX,5376 load = default ]5377 load = ptm-default ]5378 { encoding = QX }5379 { encoding = QX,5380 family = {ptm,ptmx,ptmj} }5381 {5382 \AE = {50, },5383 * = {200,200},5384 {=} = {100,100},5385 \textunderscore = {100,100},5386 \textbackslash = {100,200},5387 \quotedblbase = {400,400},5388 \guillemotleft = {200,200}, \guillemotright = {200,200},5389 \guillemotleft = {300,300}, \guillemotright = {200,400},5390 \textexclamdown = {100, }, \textquestiondown = {100, },5391 \textbraceleft = {400,200}, \textbraceright = {200,400},5392 \textbraceleft = {200,200}, \textbraceright = {200,300},5393 \textless = {200,100}, \textgreater = {100,200},5394 \textminus = {200,200}, \textdegree = {300,300},5395 \copyright = {100,100}, \textregistered = {100,100}5396 \copyright = {100,150}, \textregistered = {100,150},5397 \textxgeq = { ,100}, \textxleq = {100, },5398 \textalpha = { , 50}, \textDelta = { 70, 70},5399 \textpi = { 50, 80}, \textSigma = { , 70},5400 \textmu = { , 80}, \texteuro = { 50, 50},5401 \textellipsis = {150,200}, \textasciitilde = { 80, 80},5402 \textapprox = { 50, 50}, \textinfty = {100,100},5403 \textdagger = {150,150}, \textdaggerdbl = {100,100},5404 \textdiv = { 50,150}, \textsection = { 80, 80},5405 \texttimes = {100,150}, \textpm = { 50, 80},5406 \textbullet = {150,150}, \textperiodcentered = {300,300},5407 \textquotesingle = {500,500}, \textquotedbl = {300,300},5408 \textperthousand = { ,50}22 Contributed by Maciej Eder.


CONFIGURATION FILES: Character protrusion 1525409 }54105411 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.5412 5413 \SetProtrusion5414 [ name = cmr-T5,5415 load = cmr-default ]5416 [ name = bch-T5,5417 load = bch-default ]5418 { encoding = T5,5419 family = cmr }5420 family = bch }5421 {5422 _ = {100,100},5423 \textbackslash = {150,200},5424 \textbackslash = {200,300},5425 \textquotedblleft = {200,600},5426 \textquotedbl = {300,300},5427 \quotesinglbase = {400,400}, \quotedblbase = {300,300},5428 \quotesinglbase = {400,400}, \quotedblbase = {400,400},5429 \guilsinglleft = {400,300}, \guilsinglright = {300,400},5430 \guilsinglleft = {400,400}, \guilsinglright = {300,500},5431 \guillemotleft = {200,200}, \guillemotright = {150,300},5432 \guillemotleft = {300,200}, \guillemotright = {100,400},5433 \textbraceleft = {200, }, \textbraceright = { ,300},5434 \textbraceleft = {400,200}, \textbraceright = {200,400},5435 \textless = {200,100}, \textgreater = {100,200}5436 }54375438 Minion with lining numbers.5439 5440 \SetProtrusion5441 [ name = pmnx-OT1,5442 load = pmnj-default ]5443 { encoding = OT1,5444 family = pmnx }5445 {5446 1 = {230,180}5447 }54485449 \SetProtrusion5450 [ name = pmnx-T1,5451 load = pmnj-T1 ]5452 { encoding = {T1,LY1},5453 family = pmnx }5454 {5455 1 = {230,180}5456 }54575458 \SetProtrusion5459 [ name = pmnx-T2A,5460 load = pmnj-T2A ]5461 { encoding = {T2A},5462 family = pmnx }5463 {5464 1 = {230,180}5465 }54665467


CONFIGURATION FILES: Character protrusion 153Times is the default font for LY1, therefore we provide settings for the additionalcharacters in this encoding, too.5468 5469 \SetProtrusion5470 [ name = ptm-LY1,5471 load = ptm-T1 ]5472 { encoding = LY1,5473 family = {ptm,ptmx,ptmj} }5474 {5475 _ = {100,100},5476 \texttrademark = {100,100},5477 \textregistered = {100,100},5478 \textcopyright = {100,100},5479 \textdegree = {300,300},5480 \textminus = {200,200},5481 \textellipsis = {150,200},5482 % \texteuro = { , }, % ?5483 \textcent = {100,100},5484 \textquotesingle = {500,500},5485 \textflorin = { 50, 70},5486 \textdagger = {150,150},5487 \textdaggerdbl = {100,100},5488 \textperthousand = { , 50},5489 \textbullet = {150,150},5490 \textonesuperior = {100,100},5491 \texttwosuperior = { 50, 50},5492 \textthreesuperior = { 50, 50},5493 \textperiodcentered = {300,300},5494 \textplusminus = { 50, 80},5495 \textmultiply = {100,100},5496 \textdivide = { 50,150}Remaining slots in the source file.5497 }54985499 15.8.2 ItalicsTo 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.<strong>The</strong> italic glyphs of Computer Modern Roman feature a lot of side bearing,therefore almost all of them have to protrude. 235500 \SetProtrusion5501 [ name = OT1-it ]5502 [ name = bch-it ]5503 [ name = blg-it,5504 load = blg-default ]5505 [ name = cmr-it ]5506 [ name = pad-it ]5507 [ name = pmnj-it ]5508 [ name = ppl-it ]5509 [ name = ptm-it ]5510 [ name = ugm-it ]5511 { encoding = OT1,5512 { encoding = {OT1,OT4},5513 family = bch,5514 family = blg,23 Settings contributed by Hendrik Vogt.


CONFIGURATION FILES: Character protrusion 1545515 family = {pad,padx,padj},5516 family = {ppl,pplx,pplj},5517 family = {ptm,ptmx,ptmj},5518 family = ugm,5519 shape = {it,sl} }5520 shape = it }5521 { }5522 {5523 A = {100,100},5524 A = {100,50},5525 A = {50, },5526 A = { ,150},5527 A = {50,50},5528 \AE = {100, },5529 \AE = {50, },5530 B = {83,-40},5531 B = {50, },5532 B = {20,-50},5533 C = {50, },5534 C = {165,-75},5535 C = {100, },5536 C = {50,-50},5537 D = {75, -28},5538 D = {50,50},5539 D = {20, },5540 E = {80,-55},5541 E = {50, },5542 E = {20,-50},5543 F = {85,-80},5544 F = {100, },5545 F = {10, },5546 F = {50, },5547 G = {50, },5548 G = {153,-15},5549 G = {100, },5550 G = {50,-50},5551 H = {73,-60},5552 H = {50, },5553 I = {140,-120},5554 I = {50, },5555 I = {20,-50},5556 J = {135,-80},5557 J = {50, },5558 J = {20, },5559 J = {100, },5560 K = {70,-30},5561 K = {50, },5562 K = {20, },5563 L = {87, 40},5564 L = {50, },5565 L = {20,50},5566 L = { ,100},5567 M = {67,-45},5568 M = { ,-30},5569 M = {50, },5570 N = {75,-55},5571 N = { ,-30},5572 N = {50, },5573 O = {50, },5574 O = {150,-30},5575 O = {100, },5576 O = {70,50},5577 \OE = {50, },5578 \OE = {100, },5579 P = {82,-50},


CONFIGURATION FILES: Character protrusion 1555580 P = {50, },5581 P = {20,-50},5582 Q = {50, },5583 Q = {150,-30},5584 Q = {100, },5585 Q = {70,50},5586 R = {75, 15},5587 R = {50, },5588 R = {20, },5589 S = {50, },5590 S = {90,-65},5591 S = {20,-30},5592 $ = {50, },5593 $ = {100,-20},5594 $ = {20,-30},5595 T = {70, },5596 T = {220,-85},5597 T = {100, },5598 U = {230,-55},5599 U = {50, },5600 U = {50,-50},5601 V = {260,-60},5602 V = {100, },5603 V = {100,50},5604 W = {185,-55},5605 W = {100, },5606 W = {50, },5607 W = {100,50},5608 X = {70,-30},5609 X = {50, },5610 Y = {250,-60},5611 Y = {50, },5612 Y = {100,50},5613 Y = {100, },5614 Z = {90,-60},5615 Z = { ,-50},5616 a = {150,-10},5617 b = {170, },5618 c = {173,-10},5619 d = {150,-55},5620 d = { ,-50},5621 e = {180, },5622 f = { ,-250},5623 f = { ,-100},5624 g = {150,-10},5625 h = {100, },5626 i = {210, },5627 i = { ,-30},5628 j = { ,-40},5629 j = { ,-30},5630 k = {110,-50},5631 l = {240,-110},5632 l = { ,-100},5633 m = {80, },5634 n = {115, },5635 o = {50,50},5636 o = {155, },5637 p = { ,50},5638 p = {-50, },5639 q = {50, },5640 q = {170,-40},5641 r = {155,-40},5642 r = { ,50},5643 s = {130, },5644 t = { ,50},


CONFIGURATION FILES: Character protrusion 1565645 t = {230,-10},5646 u = {120, },5647 v = {140,-25},5648 v = {50, },5649 w = { ,50},5650 w = {98,-20},5651 w = {50, },5652 x = {65,-40},5653 y = { ,50},5654 y = {130,-20},5655 z = {110,-80},5656 0 = {170,-85},5657 1 = {150,100},5658 1 = {230,110},5659 1 = {150, },5660 1 = {50, },5661 1 = {100, },5662 1 = {150,150},5663 2 = {130,-70},5664 2 = {50, },5665 2 = {-50, },5666 3 = {50, },5667 3 = {140,-70},5668 3 = {-100, },5669 3 = {100,50},5670 4 = {100, },5671 4 = {130,80},5672 4 = {150, },5673 4 = {50, },5674 5 = {160, },5675 5 = {50, },5676 6 = {50, },5677 6 = {175,-30},5678 7 = {100, },5679 7 = {250,-150},5680 7 = {20, },5681 7 = {50, },5682 8 = {130,-40},5683 9 = {155,-80},5684 . = { ,500},5685 . = {400,600},5686 . = { ,700},5687 {,}= {300,500},5688 {,}= { ,500},5689 {,}= { ,450},5690 {,}= { ,600},5691 {,}= { ,700},5692 : = { ,300},5693 : = { ,400},5694 : = { ,200},5695 : = { ,500},5696 ; = { ,300},5697 ; = { ,400},5698 ; = { ,200},5699 ; = { ,500},5700 ! = { ,100},5701 ? = { ,200},5702 ? = { ,100},5703 ? = { ,300},5704 " = {400,200},5705 & = {50,50},5706 & = { ,80},5707 & = {130,30},5708 & = {50,100},5709 \% = {100, },


CONFIGURATION FILES: Character protrusion 1575710 \% = {180,50},5711 \% = {50,50},5712 \% = {100,100},5713 \% = {100,50},5714 * = {200,200},5715 * = {300,200},5716 * = {380,20},5717 * = {500,100},5718 * = {400,200},5719 + = {150,200},5720 + = {180,200},5721 + = {250,250},5722 + = {250,200},5723 @ = {50,50},5724 @ = {80,50},5725 @ = {180,10},5726 @ = {150,150},5727 ~ = {150,150},5728 ~ = {200,150},5729 {=}= {200,200},5730 ( = {200, }, ) = { ,200},5731 ( = {300, }, ) = { ,70},5732 / = {100,200},5733 / = {100,100},5734 / = { ,150},5735 / = {100,150},5736 - = {300,300},5737 - = {300,400},5738 - = {200,300},5739 - = {500,300},5740 - = {300,500},5741 - = {500,500},5742 - = {400,700},5743 _ = {0,300},5744 \textendash = {200,200}, \textemdash = {150,150},5745 \textendash = {200,300}, \textemdash = {150,200},5746 \textendash = {500,300}, \textemdash = {400,170},5747 \textendash = {300,300}, \textemdash = {200,200},5748 \textquoteleft = {400,200}, \textquoteright = {400,200},5749 \textquoteleft = {400,400}, \textquoteright = {400,400},5750 \textquoteleft = {800,200}, \textquoteright = {800,-20},5751 \textquoteleft = {800,200}, \textquoteright = {800,200},5752 \textquoteleft = {700,400}, \textquoteright = {700,400},5753 \textquoteleft = {800,500}, \textquoteright = {800,500},5754 \textquotedblleft = {400,200}, \textquotedblright = {400,200}5755 \textquotedblright = {300,300}5756 \textquotedblleft = {540,100}, \textquotedblright = {500,100}5757 \textquotedblleft = {700,200}, \textquotedblright = {700,200}5758 \textquotedblleft = {500,300}, \textquotedblright = {500,300}5759 \textquotedblleft = {700,400}, \textquotedblright = {700,400}5760 \textquotedblleft = {600,200}, \textquotedblright = {600,200}5761 }57625763 5764 \SetProtrusion5765 [ name = cmr-it-OT1,5766 [ name = pmnj-it-OT1,5767 load = cmr-it ]5768 load = pmnj-it ]5769 { encoding = {OT1,OT4},5770 { encoding = OT1,5771 family = cmr,5772 family = pmnj,5773 shape = it }5774 shape = {it,sl} }


CONFIGURATION FILES: Character protrusion 1585775 {5776 \AE = {100, },5777 \AE = { ,-50},5778 \OE = {100, },5779 \OE = {50, }5780 5781 "00 = {200,150}, % \Gamma5782 "01 = {150,100}, % \Delta5783 "02 = {150, 50}, % \<strong>The</strong>ta5784 "03 = {150, 50}, % \Lambda5785 "04 = {100,100}, % \Xi5786 "05 = {100,100}, % \Pi5787 "06 = {100, 50}, % \Sigma5788 "07 = {200,150}, % \Upsilon5789 "08 = {150, 50}, % \Phi5790 "09 = {150,100}, % \Psi5791 "0A = { 50, 50} % \Omega5792 5793 }57945795 5796 \SetProtrusion5797 [ name = T1-it-default,5798 [ name = bch-it-T1,5799 [ name = blg-it-T1,5800 [ name = cmr-it-T1,5801 [ name = pad-it-T1,5802 [ name = pmnj-it-T1,5803 [ name = ppl-it-T1,5804 [ name = ptm-it-T1,5805 [ name = ugm-it-T1,5806 load = OT1-it ]5807 load = bch-it ]5808 load = blg-T1 ]5809 load = cmr-it ]5810 load = pmnj-it ]5811 load = pad-it ]5812 load = ppl-it ]5813 load = ptm-it ]5814 load = ugm-it ]5815 { encoding = {T1,LY1},5816 { encoding = T1,5817 family = bch,5818 family = blg,5819 family = cmr,5820 family = pmnj,5821 family = {pad,padx,padj},5822 family = {ppl,pplx,pplj},5823 family = {ptm,ptmx,ptmj},5824 family = ugm,5825 shape = {it,sl} }5826 shape = it }5827 {5828 _ = { ,100},5829 _ = {0,300},5830 _ = {100,200},5831 _ = {100,100},5832 . = {400,600},5833 {,}= {300,500},5834 \AE = {100, },5835 \AE = { ,-50},5836 \OE = { 50, },5837 \OE = {100, },5838 031 = { ,-100}, % ffl5839 156 = {100, }, % IJ


CONFIGURATION FILES: Character protrusion 1595840 156 = {50, }, % IJ5841 156 = {20, }, % IJ5842 188 = { ,-30}, % ij5843 \v t = { ,100},5844 \textbackslash = {100,200},5845 \textbackslash = {300,300},5846 \textbackslash = {150,150},5847 \textbackslash = {100,150},5848 \textbar = {200,200},5849 \textquotedblleft = {500,300},5850 \textquoteleft = {400,400}, \textquoteright = {400,400},5851 \textquotedbl = {300,300}, \textquotedblleft = {300,300},5852 \textquotedblright = {300,300}, \quotedblbase = {200,600},5853 \quotesinglbase = {300,700}, \quotedblbase = {400,500},5854 \quotesinglbase = {300,700}, \quotedblbase = {200,600},5855 \quotesinglbase = {200,500}, \quotedblbase = {150,500},5856 \quotesinglbase = {500,500}, \quotedblbase = {400,400},5857 \quotesinglbase = {300,700}, \quotedblbase = {300,500},5858 \guilsinglleft = {400,400}, \guilsinglright = {300,500},5859 \guilsinglleft = {300,400}, \guilsinglright = {200,500},5860 \guilsinglleft = {500,300}, \guilsinglright = {400,400},5861 \guilsinglleft = {500,400}, \guilsinglright = {300,500},5862 \guilsinglleft = {400,400}, \guilsinglright = {300,600},5863 \guillemotleft = {300,300}, \guillemotright = {300,300},5864 \guillemotleft = {200,300}, \guillemotright = {150,400},5865 \guillemotleft = {400,100}, \guillemotright = {200,300},5866 \guillemotleft = {300,300}, \guillemotright = {200,400},5867 \guillemotleft = {300,400}, \guillemotright = {200,400},5868 \guillemotleft = {300,400}, \guillemotright = {300,400},5869 \textexclamdown = {100, }, \textquestiondown = {200, },5870 \textexclamdown = {200, }, \textquestiondown = {200, },5871 \textexclamdown = {-50, }, \textquestiondown = {-50, },5872 \textbraceleft = {200,100}, \textbraceright = {200,200},5873 \textbraceleft = {200, }, \textbraceright = { ,200},5874 \textbraceleft = {400,100}, \textbraceright = {200,200},5875 \textless = {100, }, \textgreater = { ,100},5876 \textless = {300,100}, \textgreater = {200,100}5877 \textvisiblespace = {100,100}5878 }58795880 5881 \SetProtrusion5882 [ name = T2A-it-default,5883 [ name = cmr-it-T2A,5884 [ name = pmnj-it-T2A,5885 load = OT1-it ]5886 load = cmr-it ]5887 load = pmnj-it ]5888 { encoding = T2A,5889 family = cmr,5890 family = pmnj,5891 shape = {it,sl} }5892 shape = it }5893 {5894 \CYRA = {100,50},5895 \CYRA = {50, },5896 \CYRB = {50, },5897 \CYRV = {50, },5898 \CYRV = {20,-50},5899 \CYRG = {100, },5900 \CYRG = {10, },5901 \CYRD = {50, },5902 \CYRE = {50, },5903 \CYRE = {20,-50},5904 \CYRZH = {50, },


CONFIGURATION FILES: Character protrusion 1605905 \CYRZ = {50, },5906 \CYRZ = {20,-50},5907 \CYRI = {50, },5908 \CYRI = { ,-30},5909 \CYRISHRT = {50, },5910 \CYRK = {50, },5911 \CYRK = {20, },5912 \CYRL = {50, },5913 \CYRM = {50, },5914 \CYRM = { ,-30},5915 \CYRN = {50, },5916 \CYRO = {100, },5917 \CYRO = {50, },5918 \CYRP = {50, },5919 \CYRR = {50, },5920 \CYRR = {20,-50},5921 \CYRS = {100, },5922 \CYRS = {50, },5923 \CYRT = {100, },5924 \CYRT = {70, },5925 \CYRU = {100, },5926 \CYRU = {50, },5927 \CYRF = {100, },5928 \CYRH = {50, },5929 \CYRC = {50, },5930 \CYRCH = {100, },5931 \CYRSH = {50, },5932 \CYRSHCH = {50, },5933 \CYRHRDSN = {100, },5934 \CYRERY = {50, },5935 \CYRSFTSN = {50, },5936 \CYREREV = {50, },5937 \CYRYU = {50, },5938 \CYRYA = {50, },5939 \CYRYA = { ,20},5940 \cyrr = {-50, },5941 _ = { ,100},5942 _ = {100,200},5943 031 = { ,-100}, % ffl5944 \v t = { ,100},5945 \textbackslash = {100,200}, \quotedblbase = {400,500},5946 \textbackslash = {300,300}, \quotedblbase = {200,600},5947 \textbackslash = {100,150}, \quotedblbase = {150,500},5948 \guillemotleft = {300,300}, \guillemotright = {300,300},5949 \guillemotleft = {400,100}, \guillemotright = {200,300},5950 \guillemotleft = {200,300}, \guillemotright = {150,400},5951 \textbraceleft = {200,100}, \textbraceright = {200,200},5952 \textbraceleft = {400,100}, \textbraceright = {200,200},5953 \textbraceleft = {200, }, \textbraceright = { ,200},5954 \textquotedblleft = {500,300},5955 \textless = {300,100}, \textgreater = {200,100}5956 \textless = {100, }, \textgreater = { ,100}5957 }59585959 5960 5961 \SetProtrusion5962 [ name = QX-it-default,5963 [ name = ptm-it-QX,5964 load = OT1-it ]5965 load = ptm-it ]5966 { encoding = {QX},5967 family = {ptm,ptmx,ptmj},5968 shape = {it,sl} }5969 {


CONFIGURATION FILES: Character protrusion 1615970 009 = { , 50}, % fk5971 {=} = {100,100},5972 \textunderscore = {100,100},5973 \textunderscore = {100,150},5974 \textbackslash = {100,200},5975 \quotedblbase = {300,400},5976 \guillemotleft = {300,300}, \guillemotright = {300,300},5977 \guillemotleft = {200,400}, \guillemotright = {200,400},5978 \textexclamdown = {200, }, \textquestiondown = {200, },5979 \textbraceleft = {200,100}, \textbraceright = {200,200},5980 \textless = {100,100}, \textgreater = {100,100},5981 \textminus = {200,200}, \textdegree = {300,150},5982 \copyright = {100,100}, \textregistered = {100,100}5983 \textregistered = {100,150}, \copyright = {100,150},5984 \textDelta = { 70, }, \textdelta = { , 50},5985 \textpi = { 50, 80}, \textmu = { , 80},5986 \texteuro = {200, }, \textellipsis = {100,200},5987 \textquoteleft = {500,400}, \textquoteright = {500,400},5988 \textquotedblleft = {500,300}, \textquotedblright = {400,400},5989 \textapprox = { 50, 50}, \textinfty = {100,100},5990 \textdagger = {150,150}, \textdaggerdbl = {100,100},5991 \textdiv = {150,150}, \textasciitilde = { 80, 80},5992 \texttimes = {100,150}, \textpm = { 50, 80},5993 \textbullet = {300,100}, \textperiodcentered = {300,300},5994 \textquotesingle = {500,500}, \textquotedbl = {300,300},5995 \textperthousand = { ,50}5996 }59975998 5999 6000 \SetProtrusion6001 [ name = cmr-it-T5,6002 load = cmr-it ]6003 [ name = bch-it-T5,6004 load = bch-it ]6005 { encoding = T5,6006 family = bch,6007 family = cmr,6008 shape = it }6009 {6010 _ = { ,100},6011 _ = {100,200},6012 \textbackslash = {150,150},6013 \textbackslash = {300,300},6014 \quotesinglbase = {200,500}, \quotedblbase = {150,500},6015 \quotesinglbase = {300,700}, \quotedblbase = {200,600},6016 \guilsinglleft = {300,400}, \guilsinglright = {200,500},6017 \guilsinglleft = {500,300}, \guilsinglright = {400,400},6018 \guillemotleft = {200,300}, \guillemotright = {150,400},6019 \guillemotleft = {400,100}, \guillemotright = {200,300},6020 \textbraceleft = {200, }, \textbraceright = { ,200},6021 \textbraceleft = {400,100}, \textbraceright = {200,200},6022 \textless = {100, }, \textgreater = { ,100}6023 \textless = {300,100}, \textgreater = {200,100}6024 }60256026 Slanted is very similar to italic.6027 6028 \SetProtrusion6029 [ name = cmr-sl,6030 load = cmr-it-OT1 ]6031 { encoding = {OT1,OT4},6032 family = cmr,


CONFIGURATION FILES: Character protrusion 1626033 shape = sl }6034 {6035 L = { ,50},6036 f = { ,-50},6037 - = {300, },6038 \textendash = {400, }, \textemdash = {300, }6039 }60406041 \SetProtrusion6042 [ name = cmr-sl-T1,6043 load = cmr-it-T1 ]6044 { encoding = {T1,LY1},6045 family = cmr,6046 shape = sl }6047 {6048 L = { ,50},6049 f = { ,-50},6050 - = {300, },6051 \textendash = {400, }, \textemdash = {300, }6052 }60536054 \SetProtrusion6055 [ name = cmr-sl-T2A,6056 load = cmr-it-T2A ]6057 { encoding = T2A,6058 family = cmr,6059 shape = sl }6060 {6061 L = { ,50},6062 f = { ,-50},6063 - = {300, },6064 \textendash = {400, }, \textemdash = {300, }6065 }60666067 \SetProtrusion6068 [ name = cmr-sl-T5,6069 load = cmr-it-T5 ]6070 { encoding = T5,6071 family = cmr,6072 shape = sl }6073 {6074 L = { ,50},6075 f = { ,-50},6076 - = {300, },6077 \textendash = {400, }, \textemdash = {300, }6078 }60796080 \SetProtrusion6081 [ name = lmr-it-T1,6082 load = cmr-it-T1 ]6083 { encoding = {T1,LY1},6084 family = lmr,6085 shape = {it,sl} }6086 {6087 \textquotedblleft = { ,200}, \textquotedblright = { ,200},6088 \quotesinglbase = { ,400}, \quotedblbase = { ,500}6089 }6090Oldstyle numerals are slightly different.6091 \SetProtrusion6092 [ name = cmr(oldstyle)-it,6093 load = cmr-it-T1 ]6094 { encoding = T1,6095 family = {hfor,cmor},


CONFIGURATION FILES: Character protrusion 1636096 shape = {it,sl} }6097 {6098 1 = {250, 50},6099 2 = {150,-100},6100 3 = {100,-50},6101 4 = {150,150},6102 6 = {200, },6103 7 = {200, 50},6104 8 = {150,-50},6105 9 = {100, 50}6106 }61076108 6109 6110 \SetProtrusion6111 [ name = pmnx-it,6112 load = pmnj-it ]6113 { encoding = OT1,6114 family = pmnx,6115 shape = {it,sl} }6116 {6117 1 = {100,150}6118 }61196120 \SetProtrusion6121 [ name = pmnx-it-T1,6122 load = pmnj-it-T1 ]6123 { encoding = {T1,LY1},6124 family = pmnx,6125 shape = {it,sl} }6126 {6127 1 = {100,150}6128 }61296130 \SetProtrusion6131 [ name = pmnx-it-T2A,6132 load = pmnj-it-T2A ]6133 { encoding = {T2A},6134 family = pmnx,6135 shape = {it,sl} }6136 {6137 1 = {100,150}6138 }61396140 6141 6142 \SetProtrusion6143 [ name = ptm-it-LY1,6144 load = ptm-it-T1 ]6145 { encoding = {LY1},6146 family = {ptm,ptmx,ptmj},6147 shape = {it,sl} }6148 {6149 _ = {100,100},6150 \texttrademark = {100,100},6151 \textregistered = {100,100},6152 \textcopyright = {100,100},6153 \textdegree = {300,100},6154 \textminus = {200,200},6155 \textellipsis = {100,200},6156 % \texteuro = { , }, % ?6157 \textcent = {100,100},6158 \textquotesingle = {500, },6159 \textflorin = {100, 70},6160 \textdagger = {150,150},


CONFIGURATION FILES: Character protrusion 1646161 \textdaggerdbl = {100,100},6162 \textbullet = {150,150},6163 \textonesuperior = {150,100},6164 \texttwosuperior = {150, 50},6165 \textthreesuperior = {150, 50},6166 \textparagraph = {100, },6167 \textperiodcentered = {500,300},6168 \textonequarter = { 50, },6169 \textonehalf = { 50, },6170 \textplusminus = {100,100},6171 \textmultiply = {150,150},6172 \textdivide = {150,150}6173 }61746175 15.8.3 Small capsSmall caps should inherit the values from their big brothers. Since values arerelative to character width, we don’t need to adjust them any further (but we haveto reset some characters).6176 6177 \SetProtrusion6178 [ name = OT1-sc,6179 [ name = bch-sc,6180 [ name = cmr-sc-OT1,6181 [ name = pad-sc,6182 [ name = pmnj-sc,6183 [ name = ppl-sc,6184 [ name = ptm-sc,6185 load = default ]6186 load = bch-default ]6187 load = cmr-OT1 ]6188 load = pad-default ]6189 load = pmnj-default ]6190 load = ppl-default ]6191 load = ptm-default ]6192 { encoding = OT1,6193 { encoding = {OT1,OT4},6194 family = bch,6195 family = cmr,6196 family = {pad,padx,padj},6197 family = pmnj,6198 family = {ppl,pplx,pplj},6199 family = {ptm,ptmx,ptmj},6200 shape = sc }6201 {6202 a = {50,50},6203 \ae = {50, },6204 c = {50, },6205 d = { ,50},6206 f = { ,50},6207 g = {50, },6208 j = {50, },6209 j = {100, },6210 l = { ,50},6211 l = { ,80},6212 013 = { ,50}, % fl6213 013 = { ,80}, % fl6214 o = {50,50},6215 \oe = {50, },6216 p = { 0, 0},6217 q = {50,70},


CONFIGURATION FILES: Character protrusion 1656218 q = { 0, },6219 r = { , 0},6220 t = {50,50},6221 y = {50,50}6222 y = {80,80}6223 }62246225 \SetProtrusion6226 [ name = T1-sc,6227 [ name = bch-sc-T1,6228 [ name = cmr-sc-T1,6229 [ name = pad-sc-T1,6230 [ name = pmnj-sc-T1,6231 [ name = ppl-sc-T1,6232 [ name = ptm-sc-T1,6233 load = T1-default ]6234 load = bch-T1 ]6235 load = cmr-T1 ]6236 load = pad-T1 ]6237 load = pmnj-T1 ]6238 load = ppl-T1 ]6239 load = ptm-T1 ]6240 { encoding = {T1,LY1},6241 family = bch,6242 family = cmr,6243 family = {pad,padx,padj},6244 family = pmnj,6245 family = {ppl,pplx,pplj},6246 family = {ptm,ptmx,ptmj},6247 shape = sc }6248 {6249 a = {50,50},6250 \ae = {50, },6251 c = {50, },6252 d = { ,50},6253 f = { ,50},6254 g = {50, },6255 j = {50, },6256 j = {100, },6257 l = { ,50},6258 l = { ,80},6259 029 = { ,50}, % fl6260 029 = { ,80}, % fl6261 o = {50,50},6262 \oe = {50, },6263 p = { 0, 0},6264 q = {50,70},6265 q = { 0, },6266 r = { , 0},6267 t = {50,50},6268 y = {50,50}6269 y = {80,80}6270 }62716272 6273 6274 \SetProtrusion6275 [ name = T2A-sc,6276 [ name = cmr-sc-T2A,6277 load = T2A-default ]6278 load = cmr-T2A ]6279 { encoding = T2A,6280 family = cmr,6281 shape = sc }6282 {


CONFIGURATION FILES: Character protrusion 1666283 \cyra = {50,50},6284 \cyrg = { ,50},6285 \cyrt = {50,50},6286 \cyry = { ,50}6287 }62886289 6290 6291 \SetProtrusion6292 [ name = QX-sc,6293 load = QX-default ]6294 { encoding = QX,6295 shape = sc }6296 {6297 a = {50,50},6298 f = { ,50},6299 j = {50, },6300 l = { ,50},6301 013 = { ,50}, % fl6302 r = { , 0},6303 t = {50,50},6304 y = {50,50}6305 }63066307 6308 6309 \SetProtrusion6310 [ name = bch-sc-T5,6311 load = bch-T5 ]6312 [ name = cmr-sc-T5,6313 load = cmr-T5 ]6314 { encoding = T5,6315 family = bch,6316 family = cmr,6317 shape = sc }6318 {6319 a = {50,50},6320 c = {50, },6321 d = { ,50},6322 f = { ,50},6323 g = {50, },6324 j = {100, },6325 j = {50, },6326 l = { ,50},6327 o = {50,50},6328 q = { 0, },6329 r = { , 0},6330 t = {50,50},6331 y = {50,50}6332 }63336334 6335 6336 \SetProtrusion6337 [ name = pmnx-sc,6338 load = pmnj-sc ]6339 { encoding = OT1,6340 family = pmnx,6341 shape = sc }6342 {6343 1 = {230,180}6344 }63456346 \SetProtrusion6347 [ name = pmnx-sc-T1,


CONFIGURATION FILES: Character protrusion 1676348 load = pmnj-sc-T1 ]6349 { encoding = {T1,LY1},6350 family = pmnx,6351 shape = sc }6352 {6353 1 = {230,180}6354 }635515.8.4 Italic small capsMinion provides real small caps in italics. <strong>The</strong> slantsc <strong>package</strong> calls them scit,Philipp Lehman’s fontinstallationguide suggests si.6356 \SetProtrusion6357 [ name = pmnj-scit,6358 load = pmnj-it ]6359 { encoding = OT1,6360 family = pmnj,6361 shape = {scit,si} }6362 {6363 a = {50, },6364 \ae = { ,-50},6365 b = {20,-50},6366 c = {50,-50},6367 d = {20, 0},6368 e = {20,-50},6369 f = {10, 0},6370 012 = {10,-50}, % fi6371 013 = {10,-50}, % fl6372 014 = {10,-50}, % ffi6373 015 = {10,-50}, % ffl6374 g = {50,-50},6375 i = {20,-50},6376 j = {20, 0},6377 k = {20, },6378 l = {20,50},6379 m = { ,-30},6380 n = { ,-30},6381 o = {50, },6382 \oe = {50,-50},6383 p = {20,-50},6384 q = {50, },6385 r = {20, 0},6386 s = {20,-30},6387 t = {70, },6388 u = {50,-50},6389 v = {100, },6390 w = {100, },6391 y = {50, },6392 z = { ,-50}6393 }63946395 \SetProtrusion6396 [ name = pmnj-scit-T1,6397 load = pmnj-it-T1 ]6398 { encoding = {T1,LY1},6399 family = pmnj,6400 shape = {scit,si} }6401 {6402 a = {50, },6403 \ae = { ,-50},6404 b = {20,-50},6405 c = {50,-50},6406 d = {20, 0},


CONFIGURATION FILES: Character protrusion 1686407 e = {20,-50},6408 f = {10, 0},6409 028 = {10,-50}, % fi6410 029 = {10,-50}, % fl6411 030 = {10,-50}, % ffi6412 031 = {10,-50}, % ffl6413 g = {50,-50},6414 i = {20,-50},6415 188 = {20, 0}, % ij6416 j = {20, 0},6417 k = {20, },6418 l = {20,50},6419 m = { ,-30},6420 n = { ,-30},6421 o = {50, },6422 \oe = {50,-50},6423 p = {20,-50},6424 q = {50, },6425 r = {20, 0},6426 s = {20,-30},6427 t = {70, },6428 u = {50,-50},6429 v = {100, },6430 w = {100, },6431 y = {50, },6432 z = { ,-50}6433 }64346435 \SetProtrusion6436 [ name = pmnx-scit,6437 load = pmnj-scit ]6438 { encoding = OT1,6439 family = pmnx,6440 shape = {scit,si} }6441 {6442 1 = {100,150}6443 }64446445 \SetProtrusion6446 [ name = pmnx-scit-T1,6447 load = pmnj-scit-T1 ]6448 { encoding = {T1,LY1},6449 family = pmnx,6450 shape = {scit,si} }6451 {6452 1 = {100,150}6453 }64546455 15.8.5 Text companionFinally the TS1 encoding. Still quite incomplete for Times and especially Palatino.Anybody?6456 \SetProtrusion6457 [ name = textcomp ]6458 [ name = bch-textcomp ]6459 [ name = blg-textcomp ]6460 [ name = cmr-textcomp ]6461 [ name = pad-textcomp ]6462 [ name = pmn-textcomp ]6463 [ name = ppl-textcomp ]6464 [ name = ptm-textcomp ]6465 [ name = ugm-textcomp ]


CONFIGURATION FILES: Character protrusion 1696466 { encoding = TS1 }6467 { encoding = TS1,6468 family = bch }6469 family = blg }6470 family = cmr }6471 family = {pad,padx,padj} }6472 family = {pmnx,pmnj} }6473 family = {ppl,pplx,pplj} }6474 family = {ptm,ptmx,ptmj} }6475 family = ugm }6476 {6477 \textquotestraightbase = {400,500},6478 \textquotestraightbase = {300,300},6479 \textquotestraightbase = {400,400},6480 \textquotestraightdblbase = {300,400},6481 \textquotestraightdblbase = {300,300},6482 \textquotestraightdblbase = {400,400},6483 \texttwelveudash = {200,200},6484 \textthreequartersemdash = {150,150},6485 \textthreequartersemdash = {200,200},6486 \textquotesingle = {500,600},6487 \textquotesingle = {300,400},6488 \textquotesingle = {400,500},6489 \textquotesingle = {500,500},6490 \textquotesingle = {300,500},6491 \textasteriskcentered = {200,300},6492 \textasteriskcentered = {150,200},6493 \textasteriskcentered = {300,300},6494 \textasteriskcentered = {100,200},6495 \textfractionsolidus = {-200,-200},6496 \textoneoldstyle = {100,100},6497 \textoneoldstyle = { , 50},6498 \textthreeoldstyle = { , 50},6499 \textthreeoldstyle = { 50, },6500 \textfouroldstyle = { 50, 50},6501 \textfouroldstyle = { 50, },6502 \textsevenoldstyle = { 50, 80},6503 \textlangle = {400, },6504 \textrangle = { ,400},6505 \textminus = {200,200},6506 \textminus = {300,300},6507 \textminus = {250,300},6508 \textlbrackdbl = {100, },6509 \textlbrackdbl = {200, },6510 \textrbrackdbl = { ,100},6511 \textrbrackdbl = { ,200},6512 \textasciigrave = {200,500},6513 \texttildelow = {200,250},6514 \textasciibreve = {300,400},6515 \textasciicaron = {300,400},6516 \textacutedbl = {200,300},6517 \textgravedbl = {150,300},6518 \textdagger = { 80, 80},6519 \textdagger = {200,200},6520 \textdagger = {100,100},6521 \textdagger = {150,150},6522 \textdaggerdbl = {150,150},6523 \textdaggerdbl = { 80, 80},6524 \textdaggerdbl = {100,100},6525 \textbardbl = {100,100},6526 \textbardbl = {150,150},6527 \textbullet = {200,200},6528 \textbullet = {400,500},6529 \textbullet = { ,100},6530 \textbullet = {150,150},


CONFIGURATION FILES: Character protrusion 1706531 \textbullet = { 50,100},6532 \textcelsius = { 50, },6533 \textcelsius = { 80, },6534 \textflorin = { 50, 50},6535 \textflorin = {100,100},6536 \textflorin = { ,100},6537 \textflorin = { 50,100},6538 \textflorin = { 50, 70},6539 \textcolonmonetary = { , 50},6540 \textcolonmonetary = { 50, },6541 \textinterrobang = { ,100},6542 \textinterrobangdown = {100, },6543 \texttrademark = {100,100},6544 \texttrademark = {150,150},6545 \texttrademark = {200,200},6546 \texttrademark = { 50, 50},6547 \texttrademark = {100,150},6548 \textcent = { 50, },6549 \textcent = {100,100},6550 \textsterling = { 50, },6551 \textsterling = { , 50},6552 \textbrokenbar = {200,200},6553 \textbrokenbar = {250,250},6554 \textbrokenbar = {200,300},6555 \textasciidieresis = {300,400},6556 \textcopyright = {100,100},6557 \textcopyright = {100,150},6558 \textcopyright = {200,200},6559 \textordfeminine = {100,200},6560 \textordfeminine = {200,200},6561 \textlnot = {200, },6562 \textlnot = {200,100},6563 \textregistered = {100,100},6564 \textregistered = { 50,150},6565 \textregistered = {200,200},6566 \textasciimacron = {150,200},6567 \textdegree = {300,300},6568 \textdegree = {150,200},6569 \textdegree = {200,200},6570 \textdegree = {400,400},6571 \textdegree = {150,400},6572 \textpm = {150,200},6573 \textpm = {100,100},6574 \textpm = { 50, 80},6575 \texttwosuperior = {100,200},6576 \texttwosuperior = { 50,100},6577 \texttwosuperior = {200,200},6578 \texttwosuperior = { 50, 50},6579 \textthreesuperior = {100,200},6580 \textthreesuperior = { 50,100},6581 \textthreesuperior = {200,200},6582 \textthreesuperior = { 50, 50},6583 \textasciiacute = {300,400},6584 \textmu = { ,100},6585 \textparagraph = { ,100},6586 \textperiodcentered = {300,400},6587 \textperiodcentered = {400,500},6588 \textperiodcentered = {300,300},6589 \textperiodcentered = {200,500},6590 \textonesuperior = {200,300},6591 \textonesuperior = {200,200},6592 \textonesuperior = {100,100},6593 \textordmasculine = {200,200},6594 \textordmasculine = {100,200},6595 \texteuro = {100, },


CONFIGURATION FILES: Character protrusion 1716596 \texteuro = { 50,100},6597 \texttimes = {200,200},6598 \texttimes = {100,100},6599 \texttimes = {150,250},6600 \texttimes = {100,150},6601 \texttimes = { 70,100},6602 \texttimes = {200,300},6603 \textdiv = {150,200}6604 \textdiv = {100,100}6605 \textdiv = {150,250}6606 \textdiv = { 50,100},6607 \textdiv = {200,300},6608 \textperthousand = { ,50}6609 \textsection = { ,100},6610 \textonehalf = { 50,100},6611 \textonequarter = { 50,100},6612 \textthreequarters = { 50,100},6613 \textsurd = { ,100}Remaining slots in the source file.6614 }66156616 6617 \SetProtrusion6618 [ name = cmr-textcomp-it ]6619 [ name = pad-textcomp-it ]6620 [ name = pmn-textcomp-it ]6621 [ name = ugm-textcomp-it ]6622 { encoding = TS1,6623 family = cmr,6624 family = {pad,padx,padj},6625 family = {pmnx,pmnj},6626 family = ugm,6627 shape = {it,sl} }6628 shape = it }6629 {6630 \textquotestraightbase = {300,600},6631 \textquotestraightbase = {400,400},6632 \textquotestraightdblbase = {300,600},6633 \textquotestraightdblbase = {300,400},6634 \textquotestraightdblbase = {300,300},6635 \texttwelveudash = {200,200},6636 \textthreequartersemdash = {150,150},6637 \textthreequartersemdash = {200,200},6638 \textquotesingle = {600,300},6639 \textquotesingle = {800,100},6640 \textquotesingle = {300,200},6641 \textquotesingle = {500,500},6642 \textasteriskcentered = {300,200},6643 \textasteriskcentered = {500,100},6644 \textasteriskcentered = {200,300},6645 \textasteriskcentered = {300,150},6646 \textfractionsolidus = {-200,-200},6647 \textoneoldstyle = {100, 50},6648 \textoneoldstyle = {100, },6649 \textoneoldstyle = { 50, },6650 \texttwooldstyle = { 50, },6651 \texttwooldstyle = {-50, },6652 \textthreeoldstyle = {100, 50},6653 \textthreeoldstyle = {-100, },6654 \textfouroldstyle = { 50, 50},6655 \textfouroldstyle = { 50,100},6656 \textsevenoldstyle = { 50, 80},6657 \textsevenoldstyle = { 50, },6658 \textsevenoldstyle = { 20, },


CONFIGURATION FILES: Character protrusion 1726659 \textlangle = {400, },6660 \textrangle = { ,400},6661 \textminus = {300,300},6662 \textminus = {200,200},6663 \textminus = {250,300},6664 \textlbrackdbl = {100, },6665 \textrbrackdbl = { ,100},6666 \textasciigrave = {300,300},6667 \texttildelow = {200,250},6668 \textasciibreve = {300,300},6669 \textasciicaron = {300,300},6670 \textacutedbl = {200,300},6671 \textgravedbl = {150,300},6672 \textdagger = {100,100},6673 \textdagger = {200,100},6674 \textdagger = { 80, 50},6675 \textdagger = { 80, 80},6676 \textdaggerdbl = { 80, 80},6677 \textdaggerdbl = { 80, 50},6678 \textbardbl = {150,150},6679 \textbullet = {200,100},6680 \textbullet = {300, },6681 \textbullet = { 30, 70},6682 \textbullet = { 50,100},6683 \textcelsius = {100, },6684 \textcelsius = {200, },6685 \textcelsius = { 50,-50},6686 \textflorin = {100, },6687 \textflorin = { 50,100},6688 \textflorin = { ,100},6689 \textcolonmonetary = {150, },6690 \textcolonmonetary = {100, },6691 \textcolonmonetary = { 50,-50},6692 \texttrademark = {200, },6693 \texttrademark = { 50,100},6694 \texttrademark = {150, 50},6695 \textcent = { 50, },6696 \textsterling = { , 50},6697 \textbrokenbar = {200,300},6698 \textasciidieresis = {300,200},6699 \textcopyright = {100, },6700 \textcopyright = {200,100},6701 \textcopyright = {100,150},6702 \textcopyright = {300, },6703 \textordfeminine = {100,100},6704 \textordfeminine = {200,200},6705 \textordfeminine = {100,200},6706 \textlnot = {300, },6707 \textlnot = {200, },6708 \textregistered = {100, },6709 \textregistered = {200,100},6710 \textregistered = { 50,150},6711 \textregistered = {300, },6712 \textasciimacron = {150,200},6713 \textdegree = {500,100},6714 \textdegree = {150,150},6715 \textdegree = {300,200},6716 \textpm = {150,100},6717 \textpm = {200,150},6718 \textpm = {150,200},6719 \textonesuperior = {400, },6720 \textonesuperior = {300,100},6721 \textonesuperior = {200,100},6722 \textonesuperior = {300,300},6723 \texttwosuperior = {400, },


CONFIGURATION FILES: Character protrusion 1736724 \texttwosuperior = {300, },6725 \texttwosuperior = {200,100},6726 \texttwosuperior = {300,200},6727 \textthreesuperior = {400, },6728 \textthreesuperior = {300, },6729 \textthreesuperior = {200,100},6730 \textthreesuperior = {300,200},6731 \textmu = { ,100},6732 \textasciiacute = {300,200},6733 \textparagraph = {200, },6734 \textparagraph = { ,100},6735 \textperiodcentered = {500,500},6736 \textperiodcentered = {300,400},6737 \textordmasculine = {100,100},6738 \textordmasculine = {200,200},6739 \textordmasculine = {300,200},6740 \texteuro = {200, },6741 \texteuro = {100, },6742 \texteuro = {100,-50},6743 \texttimes = {200,200},6744 \texttimes = {200,100},6745 \texttimes = { 70,100},6746 \texttimes = {200,300},6747 \textdiv = {200,200}6748 \textdiv = {150,200}6749 \textdiv = {200,300},6750 \textsection = { ,200},6751 \textonehalf = { 50,100},6752 \textonequarter = { 50,100},6753 \textthreequarters = { 50,100},6754 \textsurd = { ,100}6755 }67566757 15.8.6 Computer Modern mathNow to the math symbols for Computer Modern Roman. Definitions have beenextracted from fontmath.ltx. I did not spend too much time fiddling with thesesettings, so they can surely be improved.<strong>The</strong> math font ‘operators’ (also used for the \mathrm and \mathbf alphabets) isOT1/cmr, which we’ve already set up above. It’s declared as:\DeclareSymbolFont{operators} {OT1}{cmr}{m} {n}\SetSymbolFont{operators}{bold}{OT1}{cmr}{bx}{n}\mathit (OT1/cmr/m/it) is also already set up.<strong>The</strong>re are (for the moment) no settings for \mathsf and \mathtt.Math font ‘letters’ (also used as \mathnormal) is declared as:\DeclareSymbolFont{letters} {OML}{cmm}{m}{it}\SetSymbolFont{letters} {bold}{OML}{cmm}{b}{it}6758 6759 \SetProtrusion6760 [ name = cmr-math-letters ]6761 { encoding = OML,6762 family = cmm,6763 series = {m,b},6764 shape = it }6765 {6766 A = {100, 50}, % \mathnormal6767 B = { 50, },


CONFIGURATION FILES: Character protrusion 1746768 C = { 50, },6769 D = { 50, 50},6770 E = { 50, },6771 F = {100, 50},6772 G = { 50, 50},6773 H = { 50, 50},6774 I = { 50, 50},6775 J = {150, 50},6776 K = { 50,100},6777 L = { 50, 50},6778 M = { 50, },6779 N = { 50, },6780 O = { 50, },6781 P = { 50, },6782 Q = { 50, 50},6783 R = { 50, },6784 S = { 50, },6785 T = { 50,100},6786 U = { 50, 50},6787 V = {100,100},6788 W = { 50,100},6789 X = { 50,100},6790 Y = {100,100},6791 f = {100,100},6792 h = { ,100},6793 i = { , 50},6794 j = { , 50},6795 k = { , 50},6796 r = { , 50},6797 v = { , 50},6798 w = { , 50},6799 x = { , 50},6800 "0B = { 50,100}, % \alpha6801 "0C = { 50, 50}, % \beta6802 "0D = {200,150}, % \gamma6803 "0E = { 50, 50}, % \delta6804 "0F = { 50, 50}, % \epsilon6805 "10 = { 50,150}, % \zeta6806 "12 = { 50, }, % \theta6807 "13 = { ,100}, % \iota6808 "14 = { ,100}, % \kappa6809 "15 = {100, 50}, % \lambda6810 "16 = { , 50}, % \mu6811 "17 = { , 50}, % \nu6812 "18 = { , 50}, % \xi6813 "19 = { 50,100}, % \pi6814 "1A = { 50, 50}, % \rho6815 "1B = { ,150}, % \sigma6816 "1C = { 50,150}, % \tau6817 "1D = { 50, 50}, % \upsilon6818 "1F = { 50,100}, % \chi6819 "20 = { 50, 50}, % \psi6820 "21 = { , 50}, % \omega6821 "22 = { , 50}, % \varepsilon6822 "23 = { , 50}, % \vartheta6823 "24 = { , 50}, % \varpi6824 "25 = {100, }, % \varrho6825 "26 = {100,100}, % \varsigma6826 "27 = { 50, 50}, % \varphi6827 "28 = {100,100}, % \leftharpoonup6828 "29 = {100,100}, % \leftharpoondown6829 "2A = {100,100}, % \rightharpoonup6830 "2B = {100,100}, % \rightharpoondown6831 "2C = {300,200}, % \lhook6832 "2D = {200,300}, % \rhook


CONFIGURATION FILES: Character protrusion 1756833 "2E = { ,100}, % \triangleright6834 "2F = {100, }, % \triangleleft6835 "3A = { ,500}, % ., \ldotp6836 "3B = { ,500}, % ,6837 "3C = {200,100}, % 6840 "3F = {200,200}, % \star6841 "5B = { ,100}, % \flat6842 "5E = {200,200}, % \smile6843 "5F = {200,200}, % \frown6844 "7C = {100, }, % \jmath6845 "7D = { ,100} % \wp6846 }6847Remaining slots in the source file.Math font ‘symbols’ (also used for the \mathcal alphabet) is declared as:\DeclareSymbolFont{symbols} {OMS}{cmsy}{m}{n}\SetSymbolFont{symbols} {bold}{OMS}{cmsy}{b}{n}6848 \SetProtrusion6849 [ name = cmr-math-symbols ]6850 { encoding = OMS,6851 family = cmsy,6852 series = {m,b},6853 shape = n }6854 {6855 A = {150, 50}, % \mathcal6856 C = { ,100},6857 D = { , 50},6858 F = { 50,150},6859 I = { ,100},6860 J = {100,150},6861 K = { ,100},6862 L = {100, },6863 M = { 50, 50},6864 N = { 50,100},6865 P = { , 50},6866 Q = { 50, },6867 R = { , 50},6868 T = { 50,150},6869 V = { 50, 50},6870 W = { , 50},6871 X = {100,100},6872 Y = {100, },6873 Z = {100,150},6874 "00 = {300,300}, % -6875 "01 = { ,700}, % \cdot, \cdotp6876 "02 = {150,250}, % \times6877 "03 = {150,250}, % *, \ast6878 "04 = {200,300}, % \div6879 "05 = {150,250}, % \diamond6880 "06 = {200,200}, % \pm6881 "07 = {200,200}, % \mp6882 "08 = {100,100}, % \oplus6883 "09 = {100,100}, % \ominus6884 "0A = {100,100}, % \otimes6885 "0B = {100,100}, % \oslash6886 "0C = {100,100}, % \odot6887 "0D = {100,100}, % \bigcirc6888 "0E = {100,100}, % \circ6889 "0F = {100,100}, % \bullet6890 "10 = {100,100}, % \asymp


CONFIGURATION FILES: Character protrusion 1766891 "11 = {100,100}, % \equiv6892 "12 = {200,100}, % \subseteq6893 "13 = {100,200}, % \supseteq6894 "14 = {200,100}, % \leq6895 "15 = {100,200}, % \geq6896 "16 = {200,100}, % \preceq6897 "17 = {100,200}, % \succeq6898 "18 = {200,200}, % \sim6899 "19 = {150,150}, % \approx6900 "1A = {200,100}, % \subset6901 "1B = {100,200}, % \supset6902 "1C = {200,100}, % \ll6903 "1D = {100,200}, % \gg6904 "1E = {300,100}, % \prec6905 "1F = {100,300}, % \succ6906 "20 = {100,200}, % \leftarrow6907 "21 = {200,100}, % \rightarrow6908 "22 = {100,100}, % \uparrow6909 "23 = {100,100}, % \downarrow6910 "24 = {100,100}, % \leftrightarrow6911 "25 = {100,100}, % \nearrow6912 "26 = {100,100}, % \searrow6913 "27 = {100,100}, % \simeq6914 "28 = {100,100}, % \Leftarrow6915 "29 = {100,100}, % \Rightarrow6916 "2A = {100,100}, % \Uparrow6917 "2B = {100,100}, % \Downarrow6918 "2C = {100,100}, % \Leftrightarrow6919 "2D = {100,100}, % \nwarrow6920 "2E = {100,100}, % \swarrow6921 "2F = { ,100}, % \propto6922 "30 = { ,400}, % \prime6923 "31 = {100,100}, % \infty6924 "32 = {150,100}, % \in6925 "33 = {100,150}, % \ni6926 "34 = {100,100}, % \triangle, \bigtriangleup6927 "35 = {100,100}, % \bigtriangledown6928 "38 = { ,100}, % \forall6929 "39 = {100, }, % \exists6930 "3A = {200, }, % \neg6931 "3E = {200,200}, % \top6932 "3F = {200,200}, % \bot, \perp6933 "5E = {100,200}, % \wedge6934 "5F = {100,200}, % \vee6935 "60 = { ,300}, % \vdash6936 "61 = {300, }, % \dashv6937 "62 = {100,100}, % \lfloor6938 "63 = {100,100}, % \rfloor6939 "64 = {100,100}, % \lceil6940 "65 = {100,100}, % \rceil6941 "66 = {150, }, % \lbrace6942 "67 = { ,150}, % \rbrace6943 "68 = {400, }, % \langle6944 "69 = { ,400}, % \rangle6945 "6C = {100,100}, % \updownarrow6946 "6D = {100,100}, % \Updownarrow6947 "6E = {100,300}, % \, \backslash, \setminus6948 "72 = {100,100}, % \nabla6949 "79 = {200,200}, % \dagger6950 "7A = {100,100}, % \ddagger6951 "7B = {100, }, % \mathparagraph6952 "7C = {100,100}, % \clubsuit6953 "7D = {100,100}, % \diamondsuit6954 "7E = {100,100}, % \heartsuit6955 "7F = {100,100} % \spadesuit


CONFIGURATION FILES: Character protrusion 1776956 }6957Remaining slots in the source file.We don’t bother about ‘largesymbols’, since it will only be used in display math,where protrusion doesn’t work anyway. It’s declared as:\DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}6958 6959 15.8.7 AMS symbolsSettings for the AMS math fonts (amssymb).6960 Symbol font ‘a’.6961 6962 \SetProtrusion6963 [ name = AMS-a ]6964 { encoding = U,6965 family = msa }6966 {6967 "05 = {150,250}, % \centerdot6968 "06 = {100,100}, % \lozenge6969 "07 = { 50, 50}, % \blacklozenge6970 "08 = { 50, 50}, % \circlearrowright6971 "09 = { 50, 50}, % \circlearrowleft6972 "0A = {100,100}, % \rightleftharpoons6973 "0B = {100,100}, % \leftrightharpoons6974 "0D = {-50,200}, % \Vdash6975 "0E = {-50,200}, % \Vvdash6976 "0F = {-70,150}, % \vDash6977 "10 = {100,150}, % \twoheadrightarrow6978 "11 = {100,150}, % \twoheadleftarrow6979 "12 = { 50,100}, % \leftleftarrows6980 "13 = { 50, 80}, % \rightrightarrows6981 "14 = {120,120}, % \upuparrows6982 "15 = {120,120}, % \downdownarrows6983 "16 = {200,200}, % \upharpoonright6984 "17 = {200,200}, % \downharpoonright6985 "18 = {200,200}, % \upharpoonleft6986 "19 = {200,200}, % \downharpoonleft6987 "1A = { 80,100}, % \rightarrowtail6988 "1B = { 80,100}, % \leftarrowtail6989 "1C = { 50, 50}, % \leftrightarrows6990 "1D = { 50, 50}, % \rightleftarrows6991 "1E = {250, }, % \Lsh6992 "1F = { ,250}, % \Rsh6993 "20 = {100,100}, % \rightsquigarrow6994 "21 = {100,100}, % \leftrightsquigarrow6995 "22 = {100, 50}, % \looparrowleft6996 "23 = { 50,100}, % \looparrowright6997 "24 = { 50, 80}, % \circeq6998 "25 = { ,100}, % \succsim6999 "26 = { ,100}, % \gtrsim7000 "27 = { ,100}, % \gtrapprox7001 "28 = {150, 50}, % \multimap7002 "2B = {100,150}, % \doteqdot7003 "2C = {100,150}, % \triangleq7004 "2D = {100, 50}, % \precsim7005 "2E = {100, 50}, % \lesssim7006 "2F = { 50, 50}, % \lessapprox


CONFIGURATION FILES: Character protrusion 1787007 "30 = {100, 50}, % \eqslantless7008 "31 = { 50, 50}, % \eqslantgtr7009 "32 = {100, 50}, % \curlyeqprec7010 "33 = { 50,100}, % \curlyeqsucc7011 "34 = {100, 50}, % \preccurlyeq7012 "36 = { 50, }, % \leqslant7013 "38 = { , 50}, % \backprime7014 "39 = {250,250}, % \dabar@ : the dash bar in \dash(left,right)arrow7015 "3C = { 50,100}, % \succcurlyeq7016 "3E = { , 50}, % \geqslant7017 "40 = { , 50}, % \sqsubset7018 "41 = { 50, }, % \sqsupset7019 "42 = { ,150}, % \vartriangleright, \rhd7020 "43 = {150, }, % \vartriangleleft, \lhd7021 "44 = { ,100}, % \trianglerighteq, \unrhd7022 "45 = {100, }, % \trianglelefteq, \unlhd7023 "46 = {100,100}, % \bigstar7024 "48 = { 50, 50}, % \blacktriangledown7025 "49 = { ,100}, % \blacktriangleright7026 "4A = {100, }, % \blacktriangleleft7027 "4B = { ,150}, % \dashrightarrow (the arrow)7028 "4C = {150, }, % \dashleftarrow7029 "4D = { 50, 50}, % \vartriangle7030 "4E = { 50, 50}, % \blacktriangle7031 "4F = { 50, 50}, % \triangledown7032 "50 = { 50, 50}, % \eqcirc7033 "56 = { ,150}, % \Rrightarrow7034 "57 = {150, }, % \Lleftarrow7035 "58 = {100,300}, % \checkmark7036 "5C = { 50, 50}, % \angle7037 "5D = { 50, 50}, % \measuredangle7038 "5E = { 50, 50}, % \sphericalangle7039 "5F = { , 50}, % \varpropto7040 "60 = {100,100}, % \smallsmile7041 "61 = {100,100}, % \smallfrown7042 "62 = { 50, }, % \Subset7043 "63 = { , 50}, % \Supset7044 "66 = {150,150}, % \curlywedge7045 "67 = {150,150}, % \curlyvee7046 "68 = { 50,150}, % \leftthreetimes7047 "69 = {100, 50}, % \rightthreetimes7048 "6C = { 50, 50}, % \bumpeq7049 "6D = { 50, 50}, % \Bumpeq7050 "6E = {100, }, % \lll7051 "6F = { ,100}, % \ggg7052 "70 = { 50,100}, % \ulcorner7053 "71 = {100, 50}, % \urcorner7054 "75 = {150,200}, % \dotplus7055 "76 = { 50,100}, % \backsim7056 "78 = { 50,100}, % \llcorner7057 "79 = {100, 50}, % \lrcorner7058 "7C = {100,100}, % \intercal7059 "7D = { 50, 50}, % \circledcirc7060 "7E = { 50, 50}, % \circledast7061 "7F = { 50, 50} % \circleddashRemaining slots in the source file.7062 }70637064 Symbol font ‘b’.7065 7066 \SetProtrusion7067 [ name = AMS-b ]


CONFIGURATION FILES: Character protrusion 1797068 { encoding = U,7069 family = msb }7070 {7071 A = { 50, 50}, % \mathbb7072 C = { 50, 50},7073 G = { , 50},7074 L = { , 50},7075 P = { , 50},7076 R = { , 50},7077 T = { , 50},7078 V = { 50, 50},7079 X = { 50, 50},7080 Y = { 50, 50},7081 "00 = { 50, 50}, % \lvertneqq7082 "01 = { 50, 50}, % \gvertneqq7083 "02 = { 50, 50}, % \nleq7084 "03 = { 50, 50}, % \ngeq7085 "04 = {100, 50}, % \nless7086 "05 = { 50,150}, % \ngtr7087 "06 = {100, 50}, % \nprec7088 "07 = { 50,150}, % \nsucc7089 "08 = { 50, 50}, % \lneqq7090 "09 = { 50, 50}, % \gneqq7091 "0A = {100,100}, % \nleqslant7092 "0B = {100,100}, % \ngeqslant7093 "0C = {100, 50}, % \lneq7094 "0D = { 50,100}, % \gneq7095 "0E = {100, 50}, % \npreceq7096 "0F = { 50,100}, % \nsucceq7097 "10 = { 50, }, % \precnsim7098 "11 = { 50, 50}, % \succnsim7099 "12 = { 50, 50}, % \lnsim7100 "13 = { 50, 50}, % \gnsim7101 "14 = { 50, 50}, % \nleqq7102 "15 = { 50, 50}, % \ngeqq7103 "16 = { 50, 50}, % \precneqq7104 "17 = { 50, 50}, % \succneqq7105 "18 = { 50, 50}, % \precnapprox7106 "19 = { 50, 50}, % \succnapprox7107 "1A = { 50, 50}, % \lnapprox7108 "1B = { 50, 50}, % \gnapprox7109 "1C = {150,200}, % \nsim7110 "1D = { 50, 50}, % \ncong7111 "1E = {100,150}, % \diagup7112 "1F = {100,150}, % \diagdown7113 "20 = {100, 50}, % \varsubsetneq7114 "21 = { 50,100}, % \varsupsetneq7115 "22 = {100, 50}, % \nsubseteqq7116 "23 = { 50,100}, % \nsupseteqq7117 "24 = {100, 50}, % \subsetneqq7118 "25 = { 50,100}, % \supsetneqq7119 "26 = {100, 50}, % \varsubsetneqq7120 "27 = { 50,100}, % \varsupsetneqq7121 "28 = {100, 50}, % \subsetneq7122 "29 = { 50,100}, % \supsetneq7123 "2A = {100, 50}, % \nsubseteq7124 "2B = { 50,100}, % \nsupseteq7125 "2C = { 50,100}, % \nparallel7126 "2D = {100,150}, % \nmid7127 "2E = {150,150}, % \nshortmid7128 "2F = {100,100}, % \nshortparallel7129 "30 = { ,150}, % \nvdash7130 "31 = { ,150}, % \nVdash7131 "32 = { ,100}, % \nvDash7132 "33 = { ,100}, % \nVDash


CONFIGURATION FILES: Character protrusion 1807133 "34 = { ,100}, % \ntrianglerighteq7134 "35 = {100, }, % \ntrianglelefteq7135 "36 = {100, }, % \ntriangleleft7136 "37 = { ,100}, % \ntriangleright7137 "38 = {100,200}, % \nleftarrow7138 "39 = {100,200}, % \nrightarrow7139 "3A = {100,100}, % \nLeftarrow7140 "3B = { 50,100}, % \nRightarrow7141 "3C = {100,100}, % \nLeftrightarrow7142 "3D = {100,200}, % \nleftrightarrow7143 "3E = { 50, 50}, % \divideontimes7144 "3F = { 50, 50}, % \varnothing7145 "60 = {200, }, % \Finv7146 "61 = { , 50}, % \Game7147 "68 = {100,100}, % \eqsim7148 "69 = { 50, }, % \beth7149 "6A = { 50, }, % \gimel7150 "6B = {150, }, % \daleth7151 "6C = {200, }, % \lessdot7152 "6D = { ,200}, % \gtrdot7153 "6E = {100,200}, % \ltimes7154 "6F = {150,100}, % \rtimes7155 "70 = { 50,100}, % \shortmid7156 "71 = { 50, 50}, % \shortparallel7157 "72 = {200,300}, % \smallsetminus7158 "73 = {100,200}, % \thicksim7159 "74 = { 50,100}, % \thickapprox7160 "75 = { 50, 50}, % \approxeq7161 "76 = { 50,100}, % \succapprox7162 "77 = { 50, 50}, % \precapprox7163 "78 = {100,100}, % \curvearrowleft7164 "79 = { 50,150}, % \curvearrowright7165 "7A = { 50,200}, % \digamma7166 "7B = {100, 50}, % \varkappa7167 "7F = {200, } % \backepsilonRemaining slots in the source file.7168 }71697170 15.8.8 EulerEuler Roman font (<strong>package</strong> euler).7171 7172 \SetProtrusion7173 [ name = euler ]7174 { encoding = U,7175 family = eur }7176 {7177 "01 = {100,100},7178 "03 = {100,150},7179 "06 = { ,100},7180 "07 = {100,150},7181 "08 = {100,100},7182 "0A = {100,100},7183 "0B = { , 50},7184 "0C = { ,100},7185 "0D = {100,100},7186 "0E = { ,100},7187 "0F = {100,100},7188 "10 = {100,100},7189 "13 = { ,100},7190 "14 = { ,100},


CONFIGURATION FILES: Character protrusion 1817191 "15 = { , 50},7192 "16 = { , 50},7193 "17 = { 50,100},7194 "18 = { 50,100},7195 "1A = { , 50},7196 "1B = { , 50},7197 "1C = { 50,100},7198 "1D = { 50,100},7199 "1E = { 50,100},7200 "1F = { 50,100},7201 "20 = { , 50},7202 "21 = { , 50},7203 "22 = { 50,100},7204 "24 = { , 50},7205 "27 = { 50,100},7206 1 = {100,100},7207 7 = { 50,100},7208 "3A = {300,500},7209 "3B = {200,400},7210 "3C = {200,100},7211 "3D = {200,200},7212 "3E = {100,200},7213 A = { ,100},7214 D = { , 50},7215 J = { 50, },7216 K = { , 50},7217 L = { , 50},7218 Q = { , 50},7219 T = { 50, },7220 X = { 50, 50},7221 Y = { 50, },7222 h = { , 50},7223 k = { , 50}7224 }7225Extended by the eulervm <strong>package</strong>.7226 \SetProtrusion7227 [ name = euler-vm,7228 load = euler ]7229 { encoding = U,7230 family = zeur }7231 {7232 "28 = {100,200},7233 "29 = {100,200},7234 "2A = {100,150},7235 "2B = {100,150},7236 "2C = {200,300},7237 "2D = {200,300},7238 "2E = { ,100},7239 "2F = {100, },7240 "3F = {150,150},7241 "5B = { ,100},7242 "5E = {100,100},7243 "5F = {100,100},7244 "80 = { , 50},7245 "81 = {200,250},7246 "82 = {100,200}7247 }72487249 Euler Script font (eucal).7250 7251 \SetProtrusion


CONFIGURATION FILES: Character protrusion 1827252 [ name = euscript ]7253 { encoding = U,7254 family = eus }7255 {7256 A = {100,100},7257 B = { 50,100},7258 C = { 50, 50},7259 D = { 50,100},7260 E = { 50,100},7261 F = { 50, },7262 G = { 50, },7263 H = { ,100},7264 K = { , 50},7265 L = { ,150},7266 M = { , 50},7267 N = { , 50},7268 O = { 50, 50},7269 P = { 50, 50},7270 T = { ,100},7271 U = { , 50},7272 V = { 50, 50},7273 W = { 50, 50},7274 X = { 50, 50},7275 Y = { 50, },7276 Z = { 50,100},7277 "00 = {250,250},7278 "18 = {200,200},7279 "3A = {200,150},7280 "40 = { ,100},7281 "5E = {100,100},7282 "5F = {100,100},7283 "66 = { 50, },7284 "67 = { , 50},7285 "6E = {200,200}7286 }72877288 \SetProtrusion7289 [ name = euscript-vm,7290 load = euscript ]7291 { encoding = U,7292 family = zeus }7293 {7294 "01 = {600,600},7295 "02 = {200,200},7296 "03 = {200,200},7297 "04 = {200,200},7298 "05 = {150,150},7299 "06 = {200,200},7300 "07 = {200,200},7301 "08 = {100,100},7302 "09 = {100,100},7303 "0A = {100,100},7304 "0B = {100,100},7305 "0C = {100,100},7306 "0D = {100,100},7307 "0E = {150,150},7308 "0F = {100,100},7309 "10 = {150,150},7310 "11 = {100,100},7311 "12 = {150,100},7312 "13 = {100,150},7313 "14 = {150,100},7314 "15 = {100,150},7315 "16 = {200,100},7316 "17 = {100,200},


CONFIGURATION FILES: Character protrusion 1837317 "19 = {150,150},7318 "1A = {150,100},7319 "1B = {100,150},7320 "1C = {100,100},7321 "1D = {100,100},7322 "1E = {250,100},7323 "1F = {100,250},7324 "20 = {150,200},7325 "21 = {150,200},7326 "22 = {150,150},7327 "23 = {150,150},7328 "24 = {100,200},7329 "25 = {150,150},7330 "26 = {150,150},7331 "27 = {100,100},7332 "28 = {100,100},7333 "29 = {100,150},7334 "2A = {100,100},7335 "2B = {100,100},7336 "2C = {100,100},7337 "2D = {150,150},7338 "2E = {150,150},7339 "2F = {100,100},7340 "30 = {100,100},7341 "31 = {100,100},7342 "32 = {100,100},7343 "33 = {100,100},7344 "34 = {100,100},7345 "35 = {100,100},7346 "3E = {150,150},7347 "3F = {150,150},7348 "60 = { ,200},7349 "61 = {200, },7350 "62 = {100,100},7351 "63 = {100,100},7352 "64 = {100,100},7353 "65 = {100,100},7354 "68 = {300, },7355 "69 = { ,300},7356 "6C = {100,100},7357 "6D = {100,100},7358 "6F = {100,100},7359 "72 = {100,100},7360 "73 = {200,100},7361 "76 = { ,100},7362 "77 = {100, },7363 "78 = { 50, 50},7364 "79 = {100,100},7365 "7A = {100,100},7366 "7D = {150,150},7367 "7E = {100,100},7368 "A8 = {100,100},7369 "A9 = {100,100},7370 "AB = {200,200},7371 "BA = { ,200},7372 "BB = { ,200},7373 "BD = {200,200},7374 "DE = {200,200}7375 }73767377 Euler Fraktur font (eufrak).7378 7379 \SetProtrusion


CONFIGURATION FILES: Character protrusion 1847380 [ name = mathfrak ]7381 { encoding = U,7382 family = euf }7383 {7384 A = { , 50},7385 B = { , 50},7386 C = { 50, 50},7387 D = { , 80},7388 E = { 50, },7389 G = { , 50},7390 L = { , 80},7391 O = { , 50},7392 T = { , 80},7393 X = { 80, 50},7394 Z = { 80, 50},7395 b = { , 50},7396 c = { , 50},7397 k = { , 50},7398 p = { , 50},7399 q = { 50, },7400 v = { , 50},7401 w = { , 50},7402 x = { , 50},7403 1 = {100,100},7404 2 = { 80, 80},7405 3 = { 80, 50},7406 4 = { 80, 50},7407 7 = { 50, 50},7408 "12 = {500,500},7409 "13 = {500,500},7410 ! = { ,200},7411 ’ = {200,300},7412 ( = {200, },7413 ) = { ,200},7414 * = {200,200},7415 + = {200,250},7416 - = {200,200},7417 {,} = {300,300},7418 . = {400,400},7419 {=} = {200,200},7420 : = { ,200},7421 ; = { ,200},7422 ] = { ,200}7423 }74247425 7426 15.8.9 Euro symbolsSettings for various Euro symbols (Adobe Euro fonts (<strong>package</strong>s eurosans, europs),ITC Euro fonts (<strong>package</strong> euroitc) and marvosym 24 ).7427 7428 \SetProtrusion7429 { encoding = U,7430 { encoding = {OT1,U},7431 family = zpeu }7432 family = {euroitc,euroitcs} }7433 family = mvs }7434 {7435 E = {50, }7436 E = {100,50}24 Of course, there are many more symbols in this font. Feel free to contribute protrusion settings!


CONFIGURATION FILES: Interword spacing 185Figure 1:Example for interwordspacing (from Siemoneit1989). <strong>The</strong> numbers indicatethe preference/order whenthe interword space needsto be shrunk.7437 164 = {50,50}, % \EUR7438 068 = {50,-100} % \EURdig7439 }74407441 7442 \SetProtrusion7443 { encoding = U,7444 family = zpeu,7445 family = {euroitc,euroitcs},7446 shape = it* }7447 {7448 E = {100,-50}7449 E = {100,}7450 }74517452 7453 7454 \SetProtrusion7455 { encoding = U,7456 family = {zpeus,eurosans} }7457 {7458 E = {100,50}7459 }74607461 \SetProtrusion7462 { encoding = U,7463 family = {zpeus,eurosans},7464 shape = it* }7465 {7466 E = {200, }7467 }74687469 7470 15.9 Interword spacingDefault unit is space.7471 7472 %%% -----------------------------------------------------------------------7473 %%% INTERWORD SPACING7474 74757476 7477 \SetExtraSpacing7478 [ name = default ]7479 { encoding = {OT1,T1,LY1,OT4,QX,T5} }7480 {<strong>The</strong>se settings are only a first approximation. <strong>The</strong> 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 186‘<strong>The</strong> idea is – analog to the tables for expansion and protrusion – to havetables for optical reduction/expansion of spaces in dependence of the actualcharacter so that the distance between words is optically equal.When reducing distances the (weighting) order is:• after commas7481 {,} = { ,-500,500},• in front of capitals which have optical more room on their left side, e.g., ‘A’,‘J’, ‘T’, ‘V’, ‘W’, and ‘Y’ [this is not yet possible – RS]• in front of capitals which have circle/oval shapes on their left side, e.g., ‘C’,‘G’, ‘O’, and ‘Q’ [ditto – RS]• after ‘r’ (because of the bigger optical room on the righthand side)7482 r = { ,-300,300},• [before or] after lowercase characters with ascenders7483 b = { ,-200,200},7484 d = { ,-200,200},7485 f = { ,-200,200},7486 h = { ,-200,200},7487 k = { ,-200,200},7488 l = { ,-200,200},7489 t = { ,-200,200},• [before or] after lowercase characters with x-height plus descender withadditional optical space, e.g., ‘v’, or ‘w’7490 c = { ,-100,100},7491 p = { ,-100,100},7492 v = { ,-100,100},7493 w = { ,-100,100},7494 z = { ,-100,100},7495 x = { ,-100,100},7496 y = { ,-100,100},• [before or] after lowercase characters with x-height plus descender withoutadditional optical space7497 i = { , 50, -50},7498 m = { , 50, -50},7499 n = { , 50, -50},7500 u = { , 50, -50},• after colon and semicolon7501 : = { ,200,-200},7502 ; = { ,200,-200},• after punctuation which ends a sentence, e.g., period, exclamation mark,question mark7503 . = { ,250,-250},7504 ! = { ,250,-250},7505 ? = { ,250,-250}7506 }75077508 <strong>The</strong> order has to be reversed when enlarging is needed.’Questions are:


CONFIGURATION FILES: Interword spacing 187• Is the result really better?• Is it overdone? (Try with a factor < 1000.)• Should the first parameter also be used? (Probably.)• 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):\parfillskip0pt\rightskip0pt plus 1em\spaceskip\fontdimen2\fonttest test\par\pdfadjustinterwordglue2\stbscode\font`t=-50test test\byeSome more characters in T2A. 257509 7510 \SetExtraSpacing7511 [ name = T2A,7512 load = default ]7513 { encoding = T2A,7514 family = cmr }7515 {7516 \cyrg = { ,-300,300},7517 \cyrb = { ,-200,200},7518 \cyrk = { ,-200,200},7519 \cyrs = { ,-100,100},7520 \cyrr = { ,-100,100},7521 \cyrh = { ,-100,100},7522 \cyru = { ,-100,100},7523 \cyrt = { , 50, -50},7524 \cyrp = { , 50, -50},7525 \cyri = { , 50, -50},7526 \cyrishrt = { , 50, -50},7527 }752815.9.1 Nonfrenchspacing<strong>The</strong> following settings simulate \nonfrenchspacing (since space factors will beignored when spacing adjustment is in effect). <strong>The</strong>y may be used for Englishcontexts.From the TEXbook:‘If 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 ≥ 2000. [ . . . ] <strong>The</strong>n the stretch component is multiplied byf /1000, while the shrink component is multiplied by 1000/f .’<strong>The</strong> ‘extra space’ (\fontdimen 7) for Computer Modern Roman is a third of\fontdimen 2, i.e., 333.7529 \SetExtraSpacing7530 [ name = nonfrench-cmr,7531 load = default,7532 context = nonfrench ]7533 { encoding = {OT1,T1,LY1,OT4,QX,T5},25 Contributed by Karl Karlsson.


CONFIGURATION FILES: Additional kerning 1887534 family = cmr }7535 {latex.ltx has:\def\nonfrenchspacing{\sfcode`\. 3000\sfcode`\? 3000\sfcode`\! 30007536 . = {333,2000,-667},7537 ? = {333,2000,-667},7538 ! = {333,2000,-667},\sfcode`\: 20007539 : = {333,1000,-500},\sfcode`\; 15007540 ; = { , 500,-333},\sfcode`\, 12507541 {,}= { , 250,-200}}7542 }75437544 fontinst, however, which is also used to create the PSNFSS font metrics, sets\fontdimen 7 to 240 by default. <strong>The</strong>refore, the fallback settings use this value forthe first component.7545 7546 \SetExtraSpacing7547 [ name = nonfrench-default,7548 load = default,7549 context = nonfrench ]7550 { encoding = {OT1,T1,LY1,OT4,QX,T5} }7551 {7552 . = {240,2000,-667},7553 ? = {240,2000,-667},7554 ! = {240,2000,-667},7555 : = {240,1000,-500},7556 ; = { , 500,-333},7557 {,}= { , 250,-200}7558 }755915.10 Additional kerningDefault unit is 1em.7560 %%% -----------------------------------------------------------------------7561 %%% ADDITIONAL KERNING7562A dummy list to be loaded when no context is active.7563 \SetExtraKerning7564 [ name = empty ]7565 { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1} }7566 { }7567


CONFIGURATION FILES: Additional kerning 18915.10.1 French<strong>The</strong> ratio of \fontdimen 2 to \fontdimen 6 varies for different fonts, so that eitherthe kerning of the colon (which should be a space, i.e., \fontdimen 2) or that ofthe other punctuation characters (TEX’s \thinspace, i.e., one sixth of \fontdimen 6)may be inaccurate, depending on which unit we choose (space or 1em). For Times,for example, a thin space would be 665. I don’t know whether French typographyreally wants a thin space, or rather (as it happens to turn out with CMR) half aspace. (Wikipedia 26 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.)7568 \SetExtraKerning7569 [ name = french-default,7570 context = french,7571 unit = space ]7572 { encoding = {OT1,T1,LY1} }7573 {7574 : = {1000,}, % = \fontdimen27575 ; = {500, }, % ~ \thinspace7576 ! = {500, },7577 ? = {500, }7578 }7579<strong>The</strong>se settings have the disadvantage that a word following a left guillemet willnot be hyphenated. This might be fixed in pdfTEX.7580 \SetExtraKerning7581 [ name = french-guillemets,7582 context = french-guillemets,7583 load = french-default,7584 unit = space ]7585 { encoding = {T1,LY1} }7586 {7587 \guillemotleft = { ,800}, % = 0.8\fontdimen27588 \guillemotright = {800, }7589 }75907591 \SetExtraKerning7592 [ name = french-guillemets-OT1,7593 context = french-guillemets,7594 load = french-default,7595 unit = space ]7596 { encoding = OT1 }7597 { }759815.10.2 Turkish7599 \SetExtraKerning7600 [ name = turkish,7601 context = turkish ]7602 { encoding = {OT1,T1,LY1} }7603 {7604 : = {167, }, % = \thinspace7605 ! = {167, },7606 {=} = {167, }7607 }76087609 7610 26 http://fr.wikipedia.org/wiki/Espace _ typographique, 5 July 2007.


OPENTYPE CONFIGURATION FILES 19016 OpenType configuration files<strong>The</strong>se are the configuration files for the following OpenType fonts: 27• Latin Modern Roman• Charis SIL 28• Palatino Linotype 29<strong>The</strong> settings are typeset in the respective font.16.1 Character inheritanceOpenType fonts may differ considerably in how complete their arsenal of glyphs is.<strong>The</strong>refore, each font family should have their own inheritance settings.76117612 %%% -----------------------------------------------------------------------7613 %%% INHERITANCE76147615 %% for xetex (EU1) and luatex (EU2)7616 7617 \DeclareCharacterInheritance7618 { encoding = {EU1,EU2},7619 family = Latin Modern Roman }7620 { A = {À,Á,Â,Ã,Ä,Å,Ā,Ă,Ą,Ǻ,Ȁ,Ạ,Ả,Ấ,Ầ,Ẩ,Ẫ,Ậ,Ắ,Ằ,Ẳ,Ặ,7621 Α}, % Greek7622 Æ = {Ǽ},7623 B = {฿,7624 Β}, % Greek7625 C = {Ç,Ć,Ĉ,Ċ,Č},7626 D = {Ð,Ď,Đ,Ḍ,Ḏ},7627 E = {È,É,Ê,Ë,Ē,Ĕ,Ė,Ę,Ě,Ȅ,Ẹ,Ẻ,Ẽ,Ề,Ế,Ễ,Ể,Ệ,7628 Ε}, % Greek7629 G = {Ĝ,Ğ,Ġ,Ģ,Ǧ,Ǵ},7630 H = {Ĥ,Ħ,Ḥ,Ḧ,Ḫ,7631 Η}, % Greek7632 I = {Ì,Í,Î,Ï,Ĩ,Ī,Ĭ,Į,İ,Ȉ,Ỉ,Ị,7633 Ι}, % Greek7634 J = {Ĵ},7635 K = {Ķ,7636 Κ}, % Greek7637 L = {Ĺ,Ļ,Ł,Ḷ}, % Ľ,Ŀ,Ḹ7638 M = {Μ}, % Greek7639 N = {Ñ,Ń,Ņ,Ň,Ṅ,Ṇ,7640 Ν}, % Greek7641 O = {Ò,Ó,Ô,Õ,Ö,Ø,Ō,Ŏ,Ő,Ọ,Ơ,Ǫ,Ǿ,Ȍ,Ỏ,Ố,Ồ,Ổ,Ỗ,Ộ,Ớ,Ờ,Ỡ,Ở,Ợ,7642 Ο}, % Greek7643 P = {Ρ}, % Greek7644 R = {Ŕ,Ŗ,Ř,Ȑ,Ṛ,Ṙ,Ṝ},7645 S = {Ś,Ŝ,Ş,Š,Ș,Ṣ},27 This is file <strong>microtype</strong>-utf.dtx.28 This font is available at http://scripts.sil.org/CharisSILfont.29 <strong>The</strong>se settings have been contributed by Loren Davis.


OPENTYPE CONFIGURATION FILES: Character inheritance 1917646 T = {Ţ,Ť,Ț,Ṭ,Ṯ,7647 Τ}, % Greek7648 U = {Ù,Ú,Û,Ü,Ũ,Ū,Ŭ,Ů,Ű,Ų,Ư,Ȕ,Ụ,Ủ,Ứ,Ừ,Ử,Ữ,Ự},7649 W = {Ŵ,Ẁ,Ẃ,Ẅ},7650 X = {Χ}, % Greek7651 Y = {Ý,Ŷ,Ÿ,Ỵ,Ỷ,Ỹ},7652 Z = {Ź,Ż,Ž,Ẓ,7653 Ζ}, % Greek7654 a = {à,á,â,ã,ä,å,ā,ă,ą,ǻ,ȁ,ạ,ả,ấ,ầ,ẩ,ẫ,ậ,ắ,ằ,ẳ,ẵ},7655 æ = {ǽ},7656 c = {ç,ć,ĉ,ċ,č},7657 d = {đ,ḍ,ḏ},7658 e = {è,é,ê,ë,ē,ĕ,ė,ę,ě,ȅ,ẹ,ẻ,ẽ,ế,ề,ể,ễ,ệ},7659 f = {/f_f},7660 g = {ĝ,ğ,ġ,ģ,ǧ,ǵ},7661 h = {ĥ,ħ,ḥ,ḧ,ḫ},7662 i = {ì,í,î,ï,ĩ,ī,ĭ,į,ı,ȉ,ỉ,ị},7663 j = {ĵ},7664 k = {ķ},7665 l = {ĺ,ļ,ł,ḷ,ḹ}, % ľ,l·7666 n = {ñ,ń,ņ,ň,ṅ,ṇ},7667 o = {ò,ó,ô,õ,ö,ø,ō,ŏ,ő,ọ,ơ,ǫ,ǿ,ȍ,ỏ,ố,ồ,ổ,ỗ,ộ,ớ,ờ,ỡ,ở,ợ},7668 r = {ŕ,ŗ,ř,ȑ,ṛ,ṙ,ṝ},7669 s = {ś,ŝ,ş,š,ș,ṣ},7670 t = {ţ,ț,ṭ,ṯ,ẗ}, % ť7671 u = {ù,ú,û,ü,ũ,ū,ŭ,ů,ű,ų,ư,ȕ,ụ,ủ,ứ,ừ,ử,ữ,ự},7672 w = {ŵ,ẁ,ẃ,ẅ},7673 y = {ý,ŷ,ÿ,ỳ,ỵ,ỷ,ỹ},7674 z = {ź,ż,ž,ẓ},7675 }7676 7677 7678 \DeclareCharacterInheritance7679 { encoding = {EU1,EU2},7680 family = Charis SIL }7681 { A = {À,Á,Â,Ã,Ä,Å,Ā,Ă,Ą,Ǎ,Ǟ,Ǡ,Ȧ,Ǻ,Ȁ,Ȃ,Ḁ,Ạ,Ả,Ấ,Ầ,Ẩ,Ẫ,Ậ,Ắ,Ằ,Ẳ,Ẵ,Ặ,Ꜳ,7682 А,Ӑ,Ӓ}, % Cyrillic7683 Æ = {Ǣ,7684 Ǽ,Ӕ}, % Cyrillic7685 B = {Ḃ,Ḅ,Ḇ,7686 В}, % Cyr7687 C = {Ç,Ć,Ĉ,Ḉ,Ċ,Č,7688 С,Ҫ}, % Cyr7689 D = {Ď,Ḋ,Ḍ,Ḏ,Ḑ,Ḓ,Đ},7690 E = {È,É,Ê,Ë,Ē,Ĕ,Ė,Ę,Ě,Ȅ,Ȩ,Ȇ,Ḕ,Ḗ,Ḙ,Ḛ,Ḝ,Ẹ,Ẻ,Ẽ,Ế,Ề,Ể,Ễ,Ệ,7691 Е,Ѐ,Ё,Ӗ}, % Cyr7692 F = {Ḟ},7693 G = {Ĝ,Ğ,Ġ,Ģ,Ǧ,Ǵ,Ḡ,Ԍ},7694 H = {Ĥ,Ȟ,Ḣ,Ḥ,Ḧ,Ḩ,Ḫ,7695 Н,Ң,Ҥ,Ӈ,Ӊ}, % Cyr7696 I = {Ì,Í,Î,Ȉ,Ï,Į,Ĩ,Ị,Ī,İ,Ǐ,Ỉ,Ȋ,Ĭ,Ḭ,Ï,


OPENTYPE CONFIGURATION FILES: Character inheritance 1927697 І,Ї,Ӏ,ӏ}, % Cyr7698 J = {Ĵ,7699 Ј}, % Cyr7700 K = {Ķ,Ǩ,Ḱ,Ḳ,Ḵ,7701 К,Ќ,Қ,Ҝ,Ҟ,Ҡ,Ӄ,Ԟ}, % Cyr7702 L = {Ĺ,Ļ,Ľ,Ḷ,Ḹ,Ḻ,Ḽ}, % L·7703 M = {Ḿ,Ṁ,Ṃ,7704 М,Ӎ}, % Cyr7705 N = {Ñ,Ń,Ņ,Ň,Ǹ,Ṅ,Ṇ,Ṉ,Ṋ,7706 И,Й,Ѝ,Ҋ,Ӣ,Ӥ}, % Cyr7707 O = {Ò,Ó,Ô,Õ,Ö,Ō,Ŏ,Ő,Ǒ,Ǫ,Ǭ,Ȍ,Ȏ,Ȫ,Ȭ,Ȯ,Ȱ,Ṍ,Ṏ,Ṑ,Ṓ,Ọ,Ỏ,Ố,Ồ,Ổ,Ỗ,Ộ,Ớ,Ờ,Ở,Ỡ,Ơ,7708 О,Ѳ,Ӧ,Ө,Ӫ, % Cyr7709 Θ}, % Greek7710 P = {Ṕ,Ṗ,7711 Р,Ҏ}, % Cyr7712 Q = {Ԛ}, % Cyr7713 R = {Ŕ,Ŗ,Ř,Ȑ,Ȓ,Ṙ,Ṛ,Ṝ,Ṟ},7714 S = {Ś,Ŝ,Ş,Š,Ș,Ṡ,Ṣ,Ṥ,Ṧ,Ṩ,7715 Ѕ}, % Cyr7716 T = {Ţ,Ť,Ț,Ṫ,Ṭ,Ṯ,Ṱ,7717 Т,Ҭ}, % Cyr7718 U = {Ù,Ú,Û,Ü,Ũ,Ū,Ŭ,Ů,Ű,Ų,Ǔ,Ǖ,Ǘ,Ǚ,Ǜ,Ȕ,Ȗ,Ṳ,Ṵ,Ṷ,Ṹ,Ṻ,Ụ,Ủ,Ứ,Ừ,Ử,Ữ,Ự},7719 V = {Ṽ,Ṿ},7720 W = {Ŵ,Ẁ,Ẃ,Ẅ,Ẇ,Ẉ,7721 Ԝ}, % Cyr7722 X = {Ẋ,Ẍ,7723 Х,Ҳ,,}, % Cyr7724 Y = {Ý,Ŷ,Ÿ,Ȳ,Ẏ,Ỳ,Ỵ,Ỷ,Ỹ,7725 Ү,Ұ}, % Cyr7726 Z = {Ź,Ż,Ž,Ẑ,Ẓ,Ẕ},7727 a = {à,á,â,ã,ä,å,ā,ă,ą,ǎ,ǟ,ǡ,ȧ,ǻ,ȁ,ȃ,ḁ,ạ,ả,ầ,ấ,ẩ,ẫ,ậ,ắ,ằ,ẳ,ẵ,ặ, % aʾ7728 а,ӑ,ӓ}, % Cyr7729 æ = {ǽ,7730 ӕ}, % Cyr7731 b = {ḃ,ḅ,ḇ},7732 c = {ç,ć,ĉ,ċ,č,ḉ,7733 с,ҫ}, % Cyr7734 d = {ď,ḋ,ḍ,ḏ,ḑ,ḓ},7735 e = {è,é,ê,ë,ē,ĕ,ė,ę,ě,ȅ,ȩ,ȇ,ḕ,ḗ,ḙ,ḛ,ḝ,ẹ,ẻ,ẽ,ề,ế,ể,ễ,ệ,7736 е,ѐ,ё,ӗ}, % Cyr7737 f = {ḟ,ff}, % /f_f7738 g = {ĝ,ğ,ġ,ģ,ǧ,ǵ,ḡ},7739 h = {ĥ,ȟ,ḣ,ḥ,ḧ,ḩ,ḫ,ẖ,7740 Һ,һ}, % Cyr7741 i = {ı,ì,í,î,ȉ,ǐ,ï,į,ī,ị,ĩ,ḭ,ḯ,ỉ,ȋ,ĭ,7742 і,ї}, % Cyr7743 j = {ĵ,ǰ,7744 ј}, % Cyr7745 k = {ķ,ǩ,ḱ,ḳ,ḵ},7746 l = {ĺ,ļ,ḻ,ḷ,ḹ,ḽ}, % ľ,l·7747 m = {ḿ,ṁ,ṃ},


OPENTYPE CONFIGURATION FILES: Character inheritance 1937748 n = {ñ,ń,ņ,ň,ǹ,ṅ,ṇ,ṉ,ṋ}, % ʼn7749 o = {ò,ó,ô,õ,ö,ō,ŏ,ő,ǒ,ǫ,ǭ,ȍ,ȏ,ȫ,ȭ,ȯ,ȱ,ṍ,ṏ,ṑ,ṓ,ọ,ỏ,ồ,ố,ổ,ỗ,ộ,ớ,ờ,ở,ỡ,ợ,7750 о,ѳ,ӧ,ө,ӫ}, % Cyr7751 p = {ṕ,ṗ,7752 р,ҏ}, % Cyr7753 q = {ԛ}, % Cyr7754 r = {ŕ,ŗ,ř,ȑ,ȓ,ṙ,ṛ,ṝ,ṟ},7755 s = {ś,ŝ,ş,š,ș,ṡ,ṣ,ṥ,ṧ,ṩ,7756 ѕ}, % Cyr7757 t = {ţ,ț,ṫ,ṭ,ṯ,ṱ,ẗ}, % ť7758 u = {ù,ú,û,ü,ũ,ū,ŭ,ů,ű,ų,ǔ,ǖ,ǘ,ǚ,ǜ,ȕ,ȗ,ṳ,ṵ,ṷ,ṹ,ṻ,ụ,ủ,ứ,ừ,ử,ữ,ự},7759 v = {ṽ,ṿ},7760 w = {ŵ,ẁ,ẃ,ẅ,ẇ,ẉ,ẘ,7761 ԝ}, % Cyr7762 x = {ẋ,ẍ,7763 х,ҳ}, % Cyr7764 y = {ý,ÿ,ŷ,ȳ,ẏ,ẙ,ỳ,ỵ,ỷ,ỹ,7765 у,ў,ӯ,ӱ,ӳ}, % Cyr7766 z = {ź,ż,ž,ẑ,ẓ,ẕ},7767 % Cyrillic7768 Г = {Ѓ,Ґ,Ғ,,Ӻ},7769 Ж = {Җ,Ӝ,Ӂ},7770 З = {Ӟ,Ҙ},7771 Л = {Ӆ},7772 П = {Ԥ},7773 У = {Ў,Ӯ,Ӱ,Ӳ},7774 Ч = {Ҷ,Ҹ,Ӌ,Ӵ},7775 Ы = {Ӹ},7776 Ә = {Ӛ},7777 Ҽ = {Ҿ},7778 г = {ѓ,ґ,ғ,,ӻ},7779 ж = {җ,ӂ,ӝ},7780 з = {ҙ,ӟ},7781 и = {й,ѝ,ҋ,ӣ,ӥ},7782 к = {ќ,қ,ҝ,ҟ,ҡ,ӄ,ԟ},7783 л = {ӆ},7784 м = {ӎ},7785 н = {ң,ҥ,ӈ,ӊ},7786 п = {ԥ},7787 т = {ҭ},7788 х = {,},7789 ч = {ҷ,ҹ,ӌ,ӵ},7790 ш = {щ},7791 ы = {ӹ},7792 э = {ӭ},7793 ҽ = {ҿ},7794 ә = {ӛ},7795 ү = {ұ},7796 Г = {Γ}, % Greek7797 П = {Π}, % Greek7798 }7799


OPENTYPE CONFIGURATION FILES: Character inheritance 1947800 % missing: tipa, math, symbols, ...7801 7802 7803 \DeclareCharacterInheritance7804 { encoding = {EU1,EU2},7805 family = {PalatinoLinotype} }Unfortunately, I don’t have a Palatino variant containing all of the following glyphs,which will therefore not show up here. <strong>The</strong> following is typeset in TEX Gyre Pagella.To see the real settings, consult mt-PalatinoLinotype.cfg.7806 { A = {À,Á,Â,Ã,Ä,Ā,Ă,Ą,Ǎ,,,,Ǻ,Ȁ,,,Ạ,Ả,Ấ,Ầ,Ẩ,Ẫ,Ậ,Ắ,Ằ,Ẳ,Ẵ,Ặ,},7807 B = {,,},7808 C = {Ç,Ć,Ĉ,,Ċ,Č},7809 D = {Ď,,Ḍ,Ḏ,,},7810 E = {È,É,Ê,Ë,Ē,Ĕ,Ė,Ę,Ě,Ȅ,,,,,,,,Ẹ,Ẻ,Ẽ,Ế,Ề,Ể,Ễ,Ệ},7811 F = {},7812 G = {Ĝ,Ğ,Ġ,Ģ,Ǧ,Ǵ,},7813 H = {Ĥ,,,Ḥ,Ḧ,,Ḫ},7814 I = {Ì,Í,Î,Ȉ,Ï,Į,Ĩ,Ị,Ī,İ,Ǐ,Ỉ,,Ĭ,,Ï},7815 J = {Ĵ},7816 K = {Ķ,,,,},7817 L = {Ĺ,Ļ,Ľ,Ḷ,Ḹ,,,,Ŀ,Ł}, % L·7818 M = {,,Ṃ},7819 N = {Ñ,Ń,Ņ,Ň,,Ṅ,Ṇ,,},7820 O = {Ò,Ó,Ô,Õ,Ö,Ō,Ŏ,Ő,Ǒ,Ǫ,,Ȍ,,,,,,,,,,Ọ,Ỏ,Ố,Ồ,Ổ,Ỗ,Ộ,Ớ,Ờ,Ở,Ỡ,Ơ},7821 P = {,},7822 R = {Ŕ,Ŗ,Ř,Ȑ,,Ṙ,Ṛ,Ṝ,},7823 S = {Ś,Ŝ,Ş,Š,Ș,,Ṣ,,,},7824 T = {Ţ,Ť,Ț,,Ṭ,Ṯ,},7825 U = {Ù,Ú,Û,Ü,Ũ,Ū,Ŭ,Ů,Ű,Ų,Ǔ,,Ǘ,Ǚ,Ǜ,Ȕ,,,,,,,Ụ,Ủ,Ứ,Ừ,Ử,Ữ,Ự},7826 V = {,},7827 W = {Ŵ,Ẁ,Ẃ,Ẅ,,},7828 X = {,},7829 Y = {Ý,Ŷ,Ÿ,,,Ỳ,Ỵ,Ỷ,Ỹ},7830 Z = {Ź,Ż,Ž,,Ẓ,},7831 a = {à,á,â,ã,ä,å,ā,ă,ą,ǎ,,,,ǻ,ȁ,,,ạ,ả,ầ,ấ,ẩ,ẫ,ậ,ắ,ằ,ẳ,ẵ,ặ}, % aʾ7832 b = {,,},7833 c = {ç,ć,ĉ,ċ,č,},7834 d = {ď,,ḍ,ḏ,,},7835 e = {è,é,ê,ë,ē,ĕ,ė,ę,ě,ȅ,,,,,,,,ẹ,ẻ,ẽ,ề,ế,ể,ễ,ệ},7836 f = {,ff},7837 g = {ĝ,ğ,ġ,ģ,ǧ,ǵ,},7838 h = {ĥ,,,ḥ,ḧ,,ḫ,},7839 i = {ı,ì,í,î,ȉ,ǐ,ï,į,ī,ị,ĩ,,ḯ,ỉ,,ĭ},7840 j = {ĵ,ǰ},7841 k = {ķ,,,,},7842 l = {ĺ,ļ,,ḷ,ḹ,}, % ľ,l·7843 m = {,,ṃ},7844 n = {ñ,ń,ņ,ň,,ṅ,ṇ,,}, % n7845 o = {ò,ó,ô,õ,ö,ō,ŏ,ő,ǒ,ǫ,,ȍ,,,,,,,,,,ọ,ỏ,ồ,ố,ổ,ỗ,ộ,ớ,ờ,ở,ỡ,ợ},7846 p = {,},7847 r = {ŕ,ŗ,ř,ȑ,,ṙ,ṛ,ṝ,},


OPENTYPE CONFIGURATION FILES: Character protrusion 1957848 s = {ś,ŝ,ş,š,ș,,ṣ,,,},7849 t = {ţ,ț,,ṭ,ṯ,,ẗ}, % ť7850 u = {ù,ú,û,ü,ũ,ū,ŭ,ů,ű,ų,ǔ,,ǘ,ǚ,ǜ,ȕ,,,,,,,ụ,ủ,ứ,ừ,ử,ữ,ự},7851 v = {,},7852 w = {ŵ,ẁ,ẃ,ẅ,,,},7853 x = {,},7854 y = {ý,ÿ,ŷ,,,,ỳ,ỵ,ỷ,ỹ},7855 z = {ź,ż,ž,,ẓ,},7856 }7857 16.2 Character protrusion78587859 %%% -----------------------------------------------------------------------7860 %%% PROTRUSION78617862 7863 \SetProtrusion7864 [ name = LMR-default ]7865 { encoding = {EU1,EU2},7866 family = Latin Modern Roman }7867 {7868 A = {50,50},7869 Æ = {50, },7870 F = { ,50},7871 J = {50, },7872 K = { ,50},7873 L = { ,50},7874 T = {50,50},7875 V = {50,50},7876 W = {50,50},7877 X = {50,50},7878 Y = {50,50},7879 k = { ,50},7880 r = { ,50},7881 t = { ,70},7882 v = {50,50},7883 w = {50,50},7884 x = {50,50},7885 y = {50,70},7886 0 = { ,50},7887 1 = {100,200},7888 2 = {50,50},7889 3 = {50,50},7890 4 = {70,70},7891 5 = { ,50},7892 6 = { ,50},7893 7 = {50,100},7894 8 = { ,50},7895 9 = { ,50},7896 . = { ,700},7897 {,}= { ,500},


OPENTYPE CONFIGURATION FILES: Character protrusion 1967898 : = { ,500},7899 ; = { ,500},7900 ! = { ,100},7901 ? = { ,200},7902 @ = {50,50},7903 ~ = {200,250},7904 \% = {50,50},7905 * = {300,300},7906 + = {250,250},7907 - = {400,500}, % /hyphen7908 – = {400,300}, % /endash7909 — = {300,200}, % /emdash7910 _ = {200,200}, % /underscore7911 / = {200,300},7912 /backslash = {200,300},7913 ' = {300,400}, % /quotesingle7914 ‘ = {500,700}, ’ = {500,600},7915 “ = {500,300}, ” = {200,600},7916 ‚ = {400,400}, „ = {400,400},7917 ‹ = {400,400}, › = {300,500},7918 « = {300,200}, » = {100,400},7919 ¡ = {100, }, ¿ = {100, },7920 ( = {300, }, ) = { ,300},7921 < = {200,100}, > = {100,200},7922 /braceleft = {400,200}, /braceright = {200,400},7923 /angleleft = {400, }, /angleright = { ,400},7924 † = {100,100},7925 ‡ = { 80, 80},7926 • = {200,200},7927 · = {400,450}, % / periodcentered7928 ℃ = { 80, 50},7929 ₡ = { , 50},7930 ° = {400,400},7931 = {100,200},7932 © = {100,100},7933 ® = {100,100},7934 ª = {100,200},7935 º = {100,200},7936 ¹ = {200,250},7937 ² = { 50,100},7938 ³ = { 50,100},7939 ¬ = {200, },7940 − = {300,300},7941 ± = {150,200},7942 × = {150,250},7943 ÷ = {150,250},7944 € = {100, },7945 /one.oldstyle = {100,100},7946 /two.oldstyle = { 50, 50},7947 /three.oldstyle = { 30, 80},7948 /four.oldstyle = { 50, 50},7949 /seven.oldstyle = { 50, 80},


OPENTYPE CONFIGURATION FILES: Character protrusion 1977950 Γ = { ,180}, % /Gamma7951 Δ = {100,100}, % /Delta7952 Θ = { 50, 50}, % /<strong>The</strong>ta7953 Λ = {100,100}, % /Lambda7954 % Ξ = {,}, % /Xi7955 % Π = {,}, % /Pi7956 Σ = { 50, 50}, % /Sigma7957 Υ = {100,100}, % /Upsilon7958 Φ = { 50, 50}, % /Phi7959 Ψ = { 50, 50}, % /Psi7960 % Ω = {,}, % /Omega7961 }79627963 \SetProtrusion7964 [ name = LMR-it ]7965 { encoding = {EU1,EU2},7966 family = Latin Modern Roman,7967 shape = {it,sl} }7968 {7969 A = {125,100},7970 Æ = {125,-55},7971 B = {90,-40},7972 C = {145,-75},7973 D = {75, -28},7974 E = {80,-55},7975 F = {85,-80},7976 G = {153,-15},7977 H = {73,-60},7978 I = {140,-120},7979 IJ = {140,-80},7980 J = {135,-80},7981 K = {70,-30},7982 L = {87, 40},7983 M = {67,-45},7984 N = {75,-55},7985 O = {150,-30},7986 Œ = {150,-55},7987 P = {82,-50},7988 Q = {150,-30},7989 R = {75, 15},7990 S = {90,-65},7991 $ = {100,-20},7992 T = {220,-85},7993 U = {230,-55},7994 V = {260,-60},7995 W = {185,-55},7996 X = {70,-30},7997 Y = {250,-60},7998 Z = {90,-60},7999 a = {150,-10},8000 b = {170, },8001 c = {173,-10},8002 d = {150,-55},


OPENTYPE CONFIGURATION FILES: Character protrusion 1988003 e = {180, },8004 f = { ,-250},8005 g = {150,-10},8006 h = {100, },8007 i = {210, },8008 ij = {210,-40},8009 j = { ,-40},8010 k = {110,-50},8011 l = {240,-110},8012 m = {80, },8013 n = {115, },8014 o = {155, },8015 q = {170,-40},8016 r = {155,-40},8017 s = {130, },8018 t = {230,-10},8019 u = {120, },8020 v = {140,-25},8021 w = {98,-20},8022 x = {65,-40},8023 y = {130,-20},8024 z = {110,-80},8025 0 = {170,-85},8026 1 = {230,110},8027 2 = {130,-70},8028 3 = {140,-70},8029 4 = {130,80},8030 5 = {160, },8031 6 = {175,-30},8032 7 = {250,-150},8033 8 = {130,-40},8034 9 = {155,-80},8035 . = { ,500},8036 {,}= { ,450},8037 : = { ,300},8038 ; = { ,300},8039 & = {130,30},8040 \% = {180,50},8041 * = {380,20},8042 + = {180,200},8043 @ = {180,10},8044 ~ = {200,150},8045 ( = {300, }, ) = { ,70},8046 / = {100,100},8047 - = {500,300}, % /hyphen8048 – = {500,300}, % /endash8049 — = {400,170}, % /emdash8050 _ = {100,200}, % /underscore8051 ' = {300,400}, % /quotesingle8052 " = {500,300},8053 ‘ = {800,200}, ’ = {800,-20},8054 “ = {540,100}, ” = {500,100},


OPENTYPE CONFIGURATION FILES: Character protrusion 1998055 ‚ = {300,700}, „ = {200,600},8056 ‹ = {500,300}, › = {400,400},8057 « = {400,100}, » = {200,300},8058 ¡ = {200, }, ¿ = {200, },8059 < = {300,100}, > = {200,100},8060 /backslash = {300,300},8061 /braceleft = {400,100}, /braceright = {200,200},8062 † = {200, 80},8063 ‡ = {120, 80},8064 • = {220,100},8065 · = {550,300}, % / periodcentered8066 ℃ = {170, },8067 ₡ = {100, 50},8068 = {200, },8069 ° = {500,300},8070 = {200, 70},8071 © = { 50, 70},8072 ® = { 50, 70},8073 ª = {140,100},8074 º = {140,100},8075 ¹ = {400,150},8076 ² = {250, 80},8077 ³ = {250, 80},8078 ¬ = {250, 80},8079 − = {300,200},8080 ± = {150,170},8081 × = {200,200},8082 ÷ = {200,200},8083 € = {150, },8084 /one.oldstyle = {100,100},8085 /two.oldstyle = {100, 80},8086 /three.oldstyle = { 80, 50},8087 /four.oldstyle = { 80, 80},8088 /five.oldstyle = { 50, },8089 /six.oldstyle = { 50, },8090 /seven.oldstyle = { 80, 80},8091 /eight.oldstyle = { 50, },8092 Γ = {100,120}, % /Gamma8093 Δ = {120,100}, % /Delta8094 Θ = {120, 50}, % /<strong>The</strong>ta8095 Λ = {130,100}, % /Lambda8096 Ξ = {100,}, % /Xi8097 Π = {100,}, % /Pi8098 Σ = {100, 50}, % /Sigma8099 Υ = {180,100}, % /Upsilon8100 Φ = {130, 70}, % /Phi8101 Ψ = {130, 50}, % /Psi8102 Ω = { 50,}, % /Omega8103 }8104 8105 8106 \SetProtrusion8107 [ name = Charis-default ]


OPENTYPE CONFIGURATION FILES: Character protrusion 2008108 { encoding = {EU1,EU2},8109 family = Charis SIL }8110 {8111 A = {50,50},8112 Æ = {50,50},8113 C = {50, },8114 D = { ,50},8115 F = { ,50},8116 G = {50, },8117 J = {100, },8118 K = { ,50},8119 L = { ,50},8120 Ŀ = { ,100},8121 O = {50,50},8122 Œ = {50, },8123 P = { ,50},8124 Q = {50,70},8125 R = { ,50},8126 ẞ = { ,40}, % capital sharp s8127 T = {50,50},8128 V = {50,50},8129 W = {50,50},8130 X = {50,50},8131 Y = {50,50},8132 k = { ,50},8133 ŀ = { ,150},8134 r = { ,50},8135 t = { ,50},8136 v = {50,50},8137 w = {50,50},8138 x = {50,50},8139 y = { ,50},8140 1 = {150,150},8141 2 = {50,50},8142 3 = {50, },8143 4 = {100,50},8144 6 = {50, },8145 7 = {50,80},8146 9 = {50,50},8147 . = { ,600},8148 {,}= { ,500},8149 : = { ,400},8150 ; = { ,300},8151 ! = { ,100},8152 ? = { ,200},8153 @ = {50,50},8154 ~ = {200,250},8155 \% = { ,50},8156 * = {300,300},8157 + = {200,250},8158 / = { ,200},8159 /backslash = {150,200},


OPENTYPE CONFIGURATION FILES: Character protrusion 2018160 | = {200,200},8161 - = {400,500}, % hyphen8162 – = {200,300}, % endash8163 — = {150,250}, % emdash8164 ― = {200,200}, % Horizontal Bar = \texttwelveudash8165 ‒ = {150,150}, % Figure Dash = \textthreequartersemdash8166 _ = {100,100},8167 {=} = {100,100},8168 ‘ = {300,400}, ’ = {300,400},8169 “ = {300,300}, ” = {300,300},8170 ‚ = {400,400}, „ = {300,300},8171 ‹ = {400,300}, › = {300,400},8172 « = {200,200}, » = {150,300},8173 ¡ = {100, }, ¿ = {100, },8174 ( = {200, }, ) = { ,200},8175 < = {200,150}, > = {100,200},8176 [ = {100, }, ] = { ,100},8177 /braceleft = {200, }, /braceright = { ,300},8178 † = { 80, 80},8179 ‡ = {100,100},8180 • = {200,200},8181 ° = {150,200},8182 = {150,150},8183 ¢ = { 50, },8184 £ = { 50, },8185 ¦ = {200,200},8186 © = {100,100},8187 ® = {100,100},8188 ª = {100,200},8189 º = {200,200},8190 ¬ = {200, 50},8191 µ = { ,100},8192 = { ,100},8193 · = {300,400},8194 ¹ = {200,300},8195 ² = {100,200},8196 ³ = {100,200},8197 € = {100, },8198 ± = {150,200},8199 × = {200,200},8200 ÷ = {250,250},8201 /minus = {200,200},8202 − = {200,200},8203 % Cyrillic8204 Б = { ,50},8205 Г = { ,130},8206 Ж = {50,50},8207 З = {30,50},8208 Л = {50, },8209 У = {50,50},8210 Ф = {50,50},8211 Ч = {100, },


OPENTYPE CONFIGURATION FILES: Character protrusion 2028212 Ъ = { ,50},8213 Ь = { ,50},8214 Э = {50,50},8215 Ю = { ,40},8216 Я = {50, },8217 Ѵ = {50,50},8218 Ҽ = {50, },8219 Ђ = {50,100},8220 Є = {50, },8221 Љ = {50,50},8222 Њ = { ,50},8223 Ћ = {50,50},8224 Ԅ = {100,100},8225 Ԇ = {50,50},8226 Ѣ = { ,50},8227 Ҍ = { ,50},8228 Ԉ = {50,80},8229 Ԋ = { ,80},8230 Ԏ = {50,50},8231 = {50, },8232 Ԕ = {50,40},8233 Ԗ = { ,50},8234 Ԙ = {50, },8235 Ԡ = { ,50},8236 Ԣ = { ,50},8237 Ԃ = { ,100},8238 б = {50,50},8239 г = { ,70},8240 к = { ,50},8241 л = {50, },8242 т = {50,50},8243 ф = {50,50},8244 ч = {50, },8245 ъ = { ,50},8246 ь = { ,50},8247 э = { ,50},8248 я = {50, },8249 љ = {50, },8250 њ = { ,50},8251 ѣ = { ,50},8252 ѵ = {50,50},8253 ҽ = {50, },8254 ҍ = { ,50},8255 ү = {50,50},8256 ҕ = { ,50},8257 ҧ = { ,50},8258 ԃ = { ,100},8259 ԅ = {100,100},8260 ԇ = {50,50},8261 ԉ = {50,70},8262 ԋ = { ,70},8263 ԙ = {50,30},


OPENTYPE CONFIGURATION FILES: Character protrusion 2038264 ԡ = { ,50},8265 ԣ = { ,50},8266 % Д П Ц Ш Щ Ы Ҕ Ҧ Ҩ Ә Ҵ Џ Ӭ Ӡ Ԁ8267 % в д ж з и м н п ц ш ы ю ђ є ћ џ ә ҩ ҵ ӡ ԁ ԍ ԏ ԕ ԗ8268 % Greek8269 Δ = {50,50},8270 Ψ = {50,50},8271 γ = {70,70},8272 λ = {40,70},8273 π = {40,50},8274 ρ = { ,50},8275 σ = { ,50},8276 χ = {50,50},8277 }82788279 \SetProtrusion8280 [ name = Charis-it ]8281 { encoding = {EU1,EU2},8282 family = Charis SIL,8283 shape = {it,sl} }8284 {8285 C = {50, },8286 G = {50, },8287 J = {50, },8288 L = {50,50},8289 O = {50, },8290 Œ = {50, },8291 Q = {50, },8292 S = {50, },8293 $ = {50, },8294 T = {70, },8295 o = {50,50},8296 p = { ,50},8297 q = {50, },8298 t = { ,50},8299 w = { ,50},8300 y = { ,50},8301 1 = {150,100},8302 3 = {50, },8303 4 = {100, },8304 6 = {50, },8305 7 = {100, },8306 . = { ,700},8307 {,}= { ,600},8308 : = { ,400},8309 ; = { ,400},8310 ? = { ,150},8311 & = { ,80},8312 \% = {50,50},8313 * = {300,200},8314 + = {250,250},8315 @ = {80,50},8316 ~ = {150,150},


OPENTYPE CONFIGURATION FILES: Character protrusion 2048317 / = { ,150},8318 /backslash = {150,150},8319 - = {300,400}, % hyphen8320 – = {200,300}, % endash8321 — = {150,200}, % emdash8322 _ = { ,100},8323 {=} = {200,200},8324 ± = {150,200},8325 × = {250,250},8326 ÷ = {250,250},8327 ° = {150,200},8328 · = {300,400},8329 ‘ = {400,200}, ’ = {400,200},8330 “ = {300,200}, ” = {400,200},8331 ‚ = {200,500}, „ = {150,500},8332 ‹ = {300,400}, › = {200,500},8333 « = {200,300}, » = {150,400},8334 ( = {200, }, ) = { ,200},8335 < = {200,200}, > = {200,200},8336 /braceleft = {300, }, /braceright = { ,200},8337 % Cyrillic8338 Ж = {50,30},8339 Л = {50, },8340 У = {50,30},8341 Ф = {50, },8342 Ч = {100, },8343 Ъ = { ,50},8344 Ь = { ,50},8345 Э = {50,50},8346 Я = {50, },8347 Ѵ = {50,50},8348 Љ = {50,50},8349 Ԅ = {140,100},8350 Ԇ = {70,50},8351 Ԉ = {50,80},8352 Ԋ = { ,80},8353 Ԏ = {50,50},8354 г = {50,50},8355 д = {50,30},8356 м = {50, },8357 ф = {50, },8358 ч = {50, },8359 ъ = { ,50},8360 ь = { ,50},8361 э = { ,50},8362 я = {50, },8363 љ = {50,50},8364 њ = { ,50},8365 ѵ = {50,50},8366 ҍ = { ,50},8367 ԅ = {140,100},8368 ԇ = {70,50},


OPENTYPE CONFIGURATION FILES: Character protrusion 2058369 ԉ = {50,70},8370 ԋ = { ,70},8371 % Greek8372 Γ = { ,130},8373 Δ = {50,50},8374 Ψ = {50,50},8375 γ = {70,70},8376 λ = {40,70},8377 π = {40,50},8378 ρ = { ,50},8379 σ = { ,50},8380 χ = {50,50},8381 }83828383 \SetProtrusion8384 [ name = Charis-sc,8385 load = Charis-default ]8386 { encoding = {EU1,EU2},8387 family = Charis SIL,8388 shape = {sc} }8389 {8390 % ᴀ = {100,100}, % etc., doesn't work with \textsc8391 /a.SC = {100,100},8392 /c.SC = {50, },8393 /d.SC = { ,50},8394 /f.SC = { ,50},8395 /g.SC = {50, },8396 /j.SC = {100, },8397 /k.SC = { ,50},8398 /l.SC = { ,50},8399 /f_l.SC = { ,50},8400 /o.SC = {50,50},8401 /oe.SC = {50, },8402 /q.SC = {50,70},8403 /r.SC = { ,50},8404 /t.SC = {50,100},8405 /v.SC = {50,50},8406 /w.SC = {50,50},8407 /x.SC = {50,50},8408 /y.SC = {50,50}8409 }8410 8411 8412 \SetProtrusion8413 [ name = palatino-default ]8414 { encoding = {EU1,EU2},8415 family = {PalatinoLinotype} }8416 {8417 A = {50,50},8418 D = { ,50},8419 J = {50, },8420 K = { ,50},8421 L = { ,50},8422 O = {25, },


OPENTYPE CONFIGURATION FILES: Character protrusion 2068423 T = {50,50},8424 V = {50,50},8425 W = {50,50},8426 X = {50,50},8427 Y = {50,50},8428 b = { ,25},8429 d = {25,30},8430 f = { ,50},8431 g = { ,100},8432 k = { ,50},8433 p = { ,50},8434 q = {50, },8435 r = { ,50},8436 t = { ,50}, = { ,50}, = { ,50},8437 v = {75,50},8438 w = {50,50},8439 x = {50,50},8440 y = {50,70},8441 1 = {100,50},8442 2 = {25,50},8443 4 = {50, },8444 6 = {50, },8445 9 = {25, },8446 Æ = {100, },8447 Œ = {25, },8448 . = { ,700}, = { ,350}, … = {,150},8449 {,}= { ,500},8450 : = { ,500},8451 ; = { ,500},8452 ! = { ,100}, = { ,100},8453 ? = { ,200}, ‽ = { ,200},8454 @ = {50,50},8455 ~ = {200,250},8456 & = {50,100},8457 \% = {100,100},8458 * = {200,200},8459 + = {250,250},8460 ( = {100, }, ) = { ,300},8461 / = {200,300},8462 - = {400,500},8463 \textendash = {300,300}, \textemdash = {200,200},8464 \textquoteleft = {500,700}, \textquoteright = {500,700},8465 \textquotedblleft = {300,400}, \textquotedblright = {300,400},8466 \textbackslash = {200,300},8467 \quotesinglbase = {400,400}, \quotedblbase = {400,400},8468 \guilsinglleft = {400,400}, \guilsinglright = {300,500},8469 \guillemotleft = {300,300}, \guillemotright = {200,400},8470 \textexclamdown = {100, }, \textquestiondown = {100, },8471 \textbraceleft = {400,200}, \textbraceright = {200,400},8472 \textless = {200,100}, \textgreater = {100,200},8473 ≤ = {200,100}, ≥ = {100,200},8474 \textminus = {300,300},


OPENTYPE CONFIGURATION FILES: Character protrusion 2078475 \texttrademark = {200,200},8476 \textcopyright = {200,200},8477 \textregistered = {200,200},8478 \textdegree = {300,300},8479 ¦ = {450,500}, ¬ = {250,150},8480 = {150,250},8481 · = {850, 700},8482 = {100,0},8483 × = {150, 300},8484 ª = {300,300}, º = {300,300},8485 = {200,400},8486 ¹ = {400,350}, ² = {200,300}, ³ = {250,400},8487 = {250,350}, = {200,300}, = {250,400},8488 = {200,450}, = {250,400}, = {200,350},8489 = {200,400},8490 = {400,250}, = {200,300}, = {250,400},8491 = {250,350}, = {200,300}, = {250,400},8492 = {200,450}, = {250,400}, = {200,350},8493 ± = {150,100}, ÷ = {300,300},8494 þ = { ,25},8495 = {300,450}, = {300,450},8496 = {300,450}, = {300,450},8497 † = {200,250}, ‡ = {200,250},8498 π = {50, },8499 ſ = { ,50},8500 № = {100,150},8501 \textservicemark = {100,200},8502 ‐ = {400,500}, ‐ = {400,500}, = {200,300},8503 – = {205,305}, — = {200,300}, = {50,150},8504 • = {125,200},8505 % /a.sc = {50,50},8506 }85078508 \SetProtrusion8509 [ name = palatino-it ]8510 { encoding = {EU1,EU2},8511 family = {PalatinoLinotype},8512 shape = {it,sl} }8513 {8514 A = {50,50},8515 Æ = {50, },8516 B = {50, },8517 C = {50, },8518 D = {50,50},8519 E = {50, },8520 F = {50, },8521 G = {50, },8522 H = {50, },8523 K = {50, },8524 L = {50, },8525 O = {50, },8526 Œ = {50, },8527 P = {50, },


OPENTYPE CONFIGURATION FILES: Character protrusion 2088528 Q = {50, },8529 R = {50, },8530 S = {50, },8531 $ = {50, },8532 T = {100, },8533 U = {50, },8534 V = {100,50},8535 W = {50, },8536 X = {50, },8537 Y = {100,50},8538 b = { ,50},8539 c = {25, },8540 g = {75, },8541 i = {25, },8542 m = { ,50},8543 n = { ,50},8544 p = { ,25},8545 q = {25, },8546 x = { ,50},8547 1 = {100, },8548 2 = {50, },8549 4 = {50, },8550 7 = {50, },8551 . = { ,500}, = { ,350}, … = { ,200},8552 {,}= { ,500},8553 : = { ,300},8554 ; = { ,300},8555 ? = { ,300}, ‽ = { ,300},8556 & = {50,50},8557 \% = {100,100},8558 * = {200,200},8559 + = {150,200},8560 @ = {50,50},8561 ~ = {200,150},8562 ( = {200, }, ) = { ,200},8563 / = {100,200},8564 - = {300,500},8565 \textendash = {300,300}, \textemdash = {200,200},8566 \textquoteleft = {700,400}, \textquoteright = {700,400},8567 \textquotedblleft = {500,300}, \textquotedblright = {500,300},8568 _ = {100,100},8569 \textbackslash = {100,200},8570 \quotesinglbase = {500,500}, \quotedblbase = {400,400},8571 \guilsinglleft = {400,400}, \guilsinglright = {300,500},8572 \guillemotleft = {300,300}, \guillemotright = {300,300},8573 \textexclamdown = {100, }, \textquestiondown = {200, },8574 \textbraceleft = {200,100}, \textbraceright = {200,200},8575 \textless = {300,100}, \textgreater = {200,100},8576 ≤ = {200,100}, ≥ = {100,200},8577 ¦ = {450,500}, ¬ = {250,150},8578 · = {850, 700},8579 = {100,0},


OPENTYPE CONFIGURATION FILES: Character protrusion 2098580 × = {150, 300},8581 ª = {300,250}, ° = {300,300}, º = {300,250},8582 = {300,200},8583 ¹ = {300,150}, ² = {350,200}, ³ = {250,150},8584 = {350,100}, = {300, 50}, = {400,100},8585 = {400, 50}, = {250, 50}, = {300, 50},8586 = {300,300},8587 = {300,350}, = {300,150}, = {250,250},8588 = {400,200}, = {300,100}, = {450,200},8589 = {450,150}, = {400,250}, = {400,200},8590 ± = {150,100}, ÷ = {300,300},8591 þ = { 50, },8592 † = {250,200}, ‡ = {250,200},8593 = {300,450}, = {300,450},8594 = {300,450}, = {300,450},8595 ‐ = {300,500}, ‐ = {300,500}, = {100,300},8596 – = {125,305}, — = {200,300}, = {125,150},8597 • = {125,200}8598 }85998600 \SetProtrusion8601 [ name = palatino-sc,8602 load = palatino-default ]8603 { encoding = {EU1,EU2},8604 family = {PalatinoLinotype},8605 shape = sc }8606 {8607 a = {50,50},8608 æ = {50, },8609 b = { 0, 0},8610 d = { 0, 0},8611 f = { 0, 0},8612 g = { 0, 0},8613 j = {50, },8614 l = { ,50},8615 o = { 0, 0},8616 p = { 0, 0},8617 q = { 0, },8618 r = { , 0},8619 t = {50,50},8620 y = {50,50},8621 fl = { 0,50},8622 ffl = { 0,50},8623 = { 0,50},8624 = { 0,50}8625 }8626 8627


AUXILIARY FILE FOR MICRO FINE TUNING 21017 Auxiliary file for micro fine tuningThis file can be used to test protrusion and expansion settings.8628 8629 \documentclass{article}86308631 %% Here you can specify the font you want to test, using8632 %% the commands \fontfamily, \fontseries and \fontshape.8633 %% Make sure to end all lines with a comment character!8634 \newcommand*\TestFont{%8635 \fontfamily{ppl}%8636 %% \fontseries{b}%8637 %% \fontshape{it}% sc, sl8638 }86398640 \use<strong>package</strong>{ifthen}8641 \use<strong>package</strong>[T1]{fontenc}8642 \use<strong>package</strong>[latin1]{inputenc}8643 \use<strong>package</strong>[verbose,expansion=alltext,stretch=50]{<strong>microtype</strong>}86448645 \pagestyle{empty}8646 \setlength{\parindent}{0pt}8647 \newcommand*\crulefill{\cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill}8648 \newcommand*\testprotrusion[2][]{%8649 \ifthenelse{\equal{#1}{r}}{}{#2}%8650 lorem ipsum dolor sit amet,8651 \ifthenelse{\equal{#1}{r}}{\crulefill}{\leftarrowfill} #28652 \ifthenelse{\equal{#1}{l}}{\crulefill}{\rightarrowfill}8653 you know the rest%8654 \ifthenelse{\equal{#1}{l}}{}{#2}%8655 \linebreak8656 {\fontencoding{\encodingdefault}%8657 \fontseries{\seriesdefault}%8658 \fontshape{\shapedefault}%8659 \selectfont8660 Here is the beginning of a line, \dotfill and here is its end}\linebreak8661 }8662 \newcommand*\showTestFont{\expandafter\stripprefix\meaning\TestFont}8663 \def\stripprefix#1>{}8664 \newcount\charcount8665 \begin{document}86668667 \<strong>microtype</strong>setup{expansion=false}86688669 {\centering <strong>The</strong> font in this document is called by:\\8670 \texttt{\showTestFont}\par}\bigskip86718672 \TestFont\selectfont8673 This line intentionally left empty\linebreak8674 %% A -- Z8675 \charcount=658676 \loop8677 \testprotrusion{\char\charcount}8678 \advance\charcount 18679 \ifnum\charcount < 91 \repeat8680 %% a -- z8681 \charcount=978682 \loop8683 \testprotrusion{\char\charcount}8684 \advance\charcount 18685 \ifnum\charcount < 123 \repeat8686 %% 0 -- 98687 \charcount=488688 \loop


AUXILIARY FILE FOR MICRO FINE TUNING 2118689 \testprotrusion{\char\charcount}8690 \advance\charcount 18691 \ifnum\charcount < 58 \repeat8692 %%8693 \testprotrusion[r]{,}8694 \testprotrusion[r]{.}8695 \testprotrusion[r]{;}8696 \testprotrusion[r]{:}8697 \testprotrusion[r]{?}8698 \testprotrusion[r]{!}8699 \testprotrusion[l]{\textexclamdown}8700 \testprotrusion[l]{\textquestiondown}8701 \testprotrusion[r]{)}8702 \testprotrusion[l]{(}8703 \testprotrusion{/}8704 \testprotrusion{\char`\\}8705 \testprotrusion{-}8706 \testprotrusion{\textendash}8707 \testprotrusion{\textemdash}8708 \testprotrusion{\textquoteleft}8709 \testprotrusion{\textquoteright}8710 \testprotrusion{\textquotedblleft}8711 \testprotrusion{\textquotedblright}8712 \testprotrusion{\quotesinglbase}8713 \testprotrusion{\quotedblbase}8714 \testprotrusion{\guilsinglleft}8715 \testprotrusion{\guilsinglright}8716 \testprotrusion{\guillemotleft}8717 \testprotrusion{\guillemotright}87188719 \newpage8720 <strong>The</strong> following displays the current font stretched by 5\%,8721 normal, and shrunk by 5\%:87228723 \bigskip8724 \newlength{\MTln}8725 \newcommand*\teststring8726 {ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789}8727 \settowidth{\MTln}{\teststring}8728 \<strong>microtype</strong>setup{expansion=true}87298730 \parbox{1.05\MTln}{\teststring\linebreak\\8731 \teststring}\par\bigskip8732 \parbox{0.95\MTln}{\teststring}87338734 \end{document}8735 Needless to say that things may always be improved. For suggestions, mail tow.m.l@gmx.net.


THE TITLE LOGO 212\tempdim\fboxrulei\fboxruleii\kernboxheight\scaletoem\showlogoA <strong>The</strong> title logo8736 Here’s how the logo on the title page was created. 30 It has nothing to do with <strong>microtype</strong>, actually, but uses fontinst.It is based on an experiment I posted to the de.comp.text.tex newsgroup. 31 It will show:• the character• the TEX box• the bounding box• kernsA.1 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.8737 \input fontinst.stybbox.sty is an addition to fontinst, which makes dimensions of the bounding boxes available (and was writtenby Hàn Thê´ Thành, by the way). <strong>The</strong>se dimensions are specified in the afm file, but not used by TEX, which is whyfontinst will discard them otherwise.8738 \input bbox.styAllocate some dimen registers.8739 \newdimen\tempdimFrame width of the box as TEX sees it.8740 \newdimen\fboxrulei8741 \fboxrulei=0.1ptFrame width of the bounding box.8742 \newdimen\fboxruleii8743 \fboxruleii=0.1ptHeight of the box indicating the kern.8744 \newdimen\kernboxheight8745 \kernboxheight=5ptAn auxiliary macro. Return a dimension relative to the em-width of the font. Requires e-TEX.8746 \setcommand\scaletoem#1{\dimexpr #1 sp*\fontdimen6\font/1000\relax}A fontinst incantation whose sole purpose is to produce the logo. Its argument is a string (letters only).8747 \fontinstcc8748 \def\showlogo#1{%Some fonts do not specify the \fontdimen 6 (width of an em) in the afm file. In this case, use the font size, which iscorrect in most cases.8749 \ifdim\fontdimen6\font = 0pt8750 \typeout{***~Warning:~no~fontdimen~6~specified~***^^J%8751 ***~setting~it~to~\pdffontsize\font \ifnum\pdftexversion < 130 pt\fi~***}8752 \fontdimen6\font=\pdffontsize\font \ifnum\pdftexversion < 130 pt\fi\relax8753 \fi8754 \installfonts8755 \input _ metrics{}{\logofont,\metrics\printbbs{#1}\relax}8756 \endinstallfonts8757 }8758 \normalccLayers.8759 \makeatletter8760 \def\mtl@layer#1#2{\pdfliteral{/OC/#1 BDC}#2\pdfliteral{EMC}}8761 \ifx\mt@objects\@undefined\let\mt@objects\@empty\fi8762 \ifx\mt@order \@undefined\let\mt@order \@empty\fi30 Note that the logo module will not be created when installing <strong>microtype</strong>. Instead, I’ve included the source in the PDFfile as an attachment. If your PDF reader supports this, you can to extract it; alternatively, you may us thepdftk tool.31 Message ID: 42aa3687$0$24366$9b4e6d93@newsread2.arcor-online.net


THE TITLE LOGO: Macros 213\printbbs8763 \xdef\mt@order{\mt@order[(Logo)}8764 \let\mtl@resources\@empty8765 \def\mtl@register#1{%8766 \immediate\pdfobj{>}8767 \expandafter\xdef\csname mtl@#1\endcsname{\the\pdflastobj\space 0 R }8768 \xdef\mt@objects{\mt@objects\csname mtl@#1\endcsname}8769 \xdef\mt@order{\mt@order\csname mtl@#1\endcsname}8770 \xdef\mtl@resources{\mtl@resources/#1 \csname mtl@#1\endcsname}}8771 \mtl@register{canvas}8772 \mtl@register{characters}8773 \mtl@register{bounding-boxes}8774 \mtl@register{TeX-boxes}8775 \xdef\mt@order{\mt@order]}8776 \global\let\mtl@objects\mt@objects8777 \ifx\pdfcolorstack\@undefined8778 \pdfcatalog{/OCProperties >}8781 \fi8782 \def\togglelayer#1#2{%8783 \pdfstartlink width \wd\logobox height \ht\logobox depth \dp\logobox8784 user{/Subtype/Link8785 /BS > /H/O8786 /A >8788 }#2\pdfendlink8789 }Preparation.8790 \setcommand\printbbs#1{%8791 \setbox0\hbox{#1}%8792 \leavevmode8793 \kern-\fboxrulei<strong>The</strong> canvas in the natural width of the text minus protrusion, in color bgcolor.8794 \mtl@layer{canvas}{%8795 \getboundarychars#1\relax8796 \tempdim=\dimexpr\wd0 - (\scaletoem{\lpcode\font\firstchar}+8797 \scaletoem{\rpcode\font\lastchar})\relax8798 \kern\dimexpr\scaletoem{\lpcode\font\firstchar}\relax8799 \lower\dimexpr\dp0+0.05em \relax \vbox{\color{bgcolor}%8800 \hrule width \tempdim8801 height \dimexpr\dp0+\ht0+0.15em\relax}%8802 \kern-\tempdim<strong>The</strong> baseline, in color blcolor.8803 \vbox{\color{blcolor}%8804 \hrule width \tempdim8805 height \fboxrulei}%8806 }%8807 \kern-\dimexpr\wd0 -\scaletoem{\rpcode\font\lastchar}\relax<strong>The</strong> string.\getboundarychars Get first . . . .\getlastchar8808 \printbbss #1\relax\relax8809 }8810 \def\getboundarychars#1#2\relax{%8811 \def\firstchar{`#1}%8812 \getlastchar#1#2\relax8813 }. . . and last character.8814 \def\getlastchar#1#2{%8815 \ifx\relax#2\relax8816 \def\lastchar{`#1}%8817 \else8818 \expandafter\getlastchar


THE TITLE LOGO: Macros 214\printbbss\printbb\showboxes8819 \fi8820 #2%8821 }Loop over all characters of the string.8822 \def\printbbss#1#2#3\relax{%8823 \ifx\relax#1\relax8824 \else8825 \ifx\relax#2\relax8826 \printbb{#1}{}%8827 \else8828 \printbb{#1}{#2}%8829 \fi8830 \expandafter\printbbss8831 \fi8832 #2#3\relax8833 }Record the kern between the current and the following character, then print the character. \kerning is a fontinstcommand.8834 \setcommand\printbb#1#2{%8835 \setbox0\hbox{\kerning{#1}{#2}\xdef\thekern{\number\result}}%8836 \showboxes{#1}%This could be another application.8837 % \quad8838 % w: \the\scaletoem{\width{#1}},8839 % bb: \the\scaletoem{\bbleft{#1}}/%8840 % \the\scaletoem{\bbright{#1}},8841 % \the\scaletoem{\number\numexpr\width{#1}-\bbright{#1}\relax}8842 % h: \height{#1}/\bbtop{#1}, \bbbottom{#1}/\depth{#1}\par8843 }Print the boxes for character 〈#1〉. This will not work if 〈#1〉 is not also the PostScript name of the glyph (e.g., ‘comma’=/ ‘,’).8844 \setcommand\showboxes#1{%8845 \leavevmode8846 \color{texcolor}%We have to record the width of the glyph.8847 \setbox0\hbox{{\color{textcolor}#1}}%8848 \global\tempdim=\wd0\relax8849 \kern-\fboxrulei1. <strong>The</strong> TEX box: Print a frame in color texcolor. This frame shows the glyph as TEX sees it.8850 \mtl@layer{TeX-boxes}{%8851 \hbox{%8852 \lower\dimexpr \dp0 + \fboxrulei\relax8853 \hbox{%8854 \vbox{%8855 \hrule height\fboxrulei8856 \hbox{%8857 \vrule width\fboxrulei height \dimexpr\ht0 + 2\fboxrulei\relax8858 \phantom{\unhcopy0}%8859 \vrule width\fboxrulei8860 }%8861 \hrule height\fboxrulei}}}%8862 }%2. <strong>The</strong> 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.8863 \kern-\wd08864 \mtl@layer{characters}{%8865 \hbox{\box0}%8866 }%Step back by the amount that the character’s bounding box differs from the TEX box on the left side.8867 \kern\dimexpr\scaletoem{\bbleft{#1}}-\tempdim-\fboxruleii\relax


THE TITLE LOGO: Macros 2153. <strong>The</strong> bounding box: will be printed in color bbcolor.8868 \mtl@layer{bounding-boxes}{%8869 {\color{bbcolor}%8870 \hbox{%8871 \lower\dimexpr-\scaletoem{\bbbottom{#1}}+\fboxruleii\relax8872 \hbox{%8873 \vbox{%8874 \hrule height\fboxruleii8875 \hbox to \dimexpr\scaletoem{\numexpr8876 \bbright{#1}-\bbleft{#1}\relax}+2\fboxruleii\relax{%8877 \vrule height \dimexpr\scaletoem{\numexpr8878 \bbtop{#1}-\bbbottom{#1}\relax}%8879 width\fboxruleii8880 \hfill8881 \vrule width\fboxruleii}%8882 \hrule height\fboxruleii}}}%8883 }%8884 \kern-\dimexpr\fboxruleii+\fboxrulei\relax8885 }%4. <strong>The</strong> 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.8886 \kern\scaletoem{\numexpr\width{#1}-\bbright{#1}\relax}%8887 \mtl@layer{TeX-boxes}{%8888 {\ifnum\thekern


THE TITLE LOGO: Macros 2168924 \thelogofontProtrusion values (overdone for didactic reasons).8925 \lpcode\font`M=968926 \rpcode\font`e=46Now we can generate the logo.8927 \pdfliteral direct{/SXS gs}%8928 \showlogo{Microtype}%8929 % \rlap{\normalfont\normalsize\raisebox{55pt}{\footnotemark[1]}}%8930 % \kern5pt\\[3\baselineskip]8931 % \long\def\@makefntext##1{%8932 % \leftskip 0pt8933 % \parindent 0pt8934 % \everypar{\parindent 0pt}%8935 % \leavevmode\hbox to 15pt{\@thefnmark\hss}##1}8936 % \footnotetext[1]{This graphic display on a8937 % \togglelayer{canvas}{canvas} the \togglelayer{characters}{characters},8938 % their \togglelayer{bounding-boxes}{bounding boxes}8939 % and \togglelayer{TeX-boxes}{\TeX\ boxes}.}8940 }}%8941 \edef\logodimens{width \the\wd\logobox height \the\ht\logobox depth \the\dp\logobox}8942 \immediate\pdfobj{}%8943 \immediate\pdfxform8944 attr {/Group }8945 resources {/Properties 8946 /ExtGState >8947 }8948 \logobox8949 % \vskip-2.5\baselineskip8950 % \leavevmode8951 % \togglelayer{characters}{%8952 % \pdfrefxform\pdflastxform8953 % }%8954 \pdfannot\logodimens{%8955 /Subtype/Widget /FT/Btn /T(Logo)8956 %/F 4 % why did I say this?8957 /AP >8958 /AA 8959 /X >8960 /D >8961 /U >8962 >>8963 }%8964 \vspace{3\baselineskip}8965 }Our font.8966 \pdfmapline{+pkpmmri8r10 KeplMM-It _ 385 _ 575 _ 10 _ " TeXBase1Encoding ReEncodeFont "


THE LETTERSPACING ILLUSTRATION: Document 217A.2 DocumentNow we can start the document.8981 \documentclass[10pt,a4paper]{ltxdoc}8982 \providecommand\MakePercentComment{\relax}8983 \expandafter\def\csname ver@<strong>microtype</strong>.dtx\endcsname{2999/99/99}Re-use the preamble from <strong>microtype</strong>.dtx.8984 \use<strong>package</strong>{<strong>microtype</strong>-doc}8985 \use<strong>package</strong>{attachfile}8986 \makeatletter8987 \pdfcatalog{/OCProperties >>}8988 \makeatother8989 \begin{document}You are currently reading this.8990 \DocInput{<strong>microtype</strong>-logo.dtx}And here’s the logo.8991 \vfill8992 \begin{center}8993 \printlogo \null8994 \end{center}8995 \vfill8996 \expandafter\enddocument8997 \fiThat’s it.8998 B <strong>The</strong> letterspacing illustration8999 \ifx\lssample\undefined9000 Upon popular request, here’s how I’ve created the letterspacing illustration. 32B.1 MacrosRule width and image height and depth.9001 \makeatletter9002 \newdimen\lsamount9003 \newdimen\lsrule9004 \lsrule=0.2pt9005 \def\lsheight{8pt}9006 \def\lsdepth{12pt}Our font (Adobe Caslon).9007 \def\lsfont{\fontfamily{paca}\selectfont}Loop over all letters in 〈#2〉, letterspacing them by 〈#1〉.9008 \def\dols#1#2{\lsamount=#1\relax \dolss#2\enddols}9009 \def\dolss#1#2\enddols{%9010 \ifx\empty#2\empty\divide\lsamount 2\fi9011 \ls{#1}%9012 \ifx\empty#2\empty\else \dolss#2\enddols \fi9013 }One tikz picture for each letter.9014 \def\ls#1{%9015 \begin{tikzpicture}[remember picture,line width=\lsrule]9016 \tikzstyle{every node}=[inner sep=0pt]32 Note that the lssample module will not be created when installing <strong>microtype</strong>. Instead, I’ve included the source in thePDF file as an attachment. If your PDF reader supports this, you can to extract it; alternatively, may can usthe pdftk tool.


THE LETTERSPACING ILLUSTRATION: Macros 218<strong>The</strong> bounding box.9017 \mts@layer{stuff}{%9018 \node[draw=thegrey,9019 fill=theshade,9020 outer sep=\lsrule,9021 anchor=base,9022 font=\lsfont]{\phantom{#1}};9023 }<strong>The</strong> letter.9024 \node[anchor=base,font=\lsfont](#1){#1};Two auxiliary coordinates.9025 \path (#1.south west) ++(+.5\lsrule,-.5\lsrule) coordinate (#1L);9026 \path (#1.base east) ++(-.5\lsrule,-\lsdepth) coordinate (#1R);9027 \mts@layer{stuff}{%Now draw the normal character width,9028 \draw[color=thered!75,9029 fill=thered!30,9030 outer sep=\lsrule]9031 (#1L) rectangle (#1R);9032 \ifdim\lsamount>0pt9033 \path (#1.base east) ++(+.5\lsamount,-6pt) coordinate (#1 _ ls);9034 \path (#1R) ++(\lsamount+\lsrule,+\lsdepth) coordinate (#1E);and the letter space.9035 \draw[color=thered,9036 fill=thered!50,9037 outer sep=\lsrule]9038 (#1R) ++(+\lsrule,+0pt) rectangle (#1E);9039 \fi9040 }9041 \end{tikzpicture}%9042 \ignorespaces9043 }Draw the interword space.9044 \def\lssp#1#2#3#4{%9045 \mts@layer{stuff}{%9046 \begin{tikzpicture}[remember picture,line width=\lsrule,inner sep=0pt]9047 \tikzstyle{every draw}=[anchor=bottom]9048 \coordinate(#1space) at (#2/2,\lsdepth/2);9049 \coordinate(#1stretch) at (#2+#3/2,+0pt);9050 \coordinate(#1shrink) at (#2-#4/2,+0pt);9051 \draw[color=thegreen,fill=thegreen!50,use as bounding box]9052 (0,0) rectangle ++(+#2,+\lsdepth);9053 \draw[color=thegreen,fill=thegreen!30]9054 (+#2,-\lsrule) rectangle ++(+#3,-4pt+\lsrule);9055 \draw[color=thegreen,fill=thegreen!50]9056 (+#2,-\lsrule) rectangle ++(-#4,-4pt+\lsrule);9057 \draw[->,line width=0.3pt,shorten ,line width=0.3pt,shorten


THE LETTERSPACING ILLUSTRATION: Macros 2199071 \immediate\pdfobj{>}9072 \expandafter\xdef\csname mts@#1\endcsname{\the\pdflastobj\space 0 R }9073 \xdef\mt@objects{\mt@objects\csname mts@#1\endcsname}9074 \xdef\mt@order{\mt@order\csname mts@#1\endcsname}9075 \xdef\mts@resources{\mts@resources/#1 \csname mts@#1\endcsname}}9076 \mts@register{stuff}9077 \mts@register{tracking}9078 \mts@register{ispace}9079 \mts@register{ospace}9080 \mts@register{istretch}9081 \mts@register{ishrink}9082 \mts@register{ostretch}9083 \mts@register{oshrink}9084 \mts@register{okern}9085 \mts@register{ligature}9086 \mts@register{ _ compatibility}9087 \xdef\mt@order{\mt@order]}Anchor point for the arrow in the code.9088 \newcommand\anchorarrow[1]{%9089 \tikz[remember picture,overlay]\node(#1 _ c){};}Add an arrow from code to image.9090 \newcommand\add@arrow[5][left]{%9091 \tikz[remember picture,overlay,bend angle=14,looseness=0.75,>=latex]{%9092 \mtsx@layer{#3}{%9093 \draw[->,thick,color=the#2](#4) to[bend #1] (#5);}}%9094 }Toggle layer.9095 \def\toggle@layer#1#2#3{%9096 \pdfstartlink9097 user{/Subtype/Link9098 /BS > /H/O9099 % /BS >9100 % /C[0.7 0.7 0.7] /H/O9101 /Contents(Click to Toggle!)9102 /A >9104 }%9105 \rlap{#2}%9106 {\fboxsep=0pt \fboxrule=0pt9107 \mtsx@layer{stuff}{%9108 \rlap{\fcolorbox{white}{white}{\vphantom{kg}\color{the#3}#2}}}%9109 \mtsx@layer{#1}{%9110 \fcolorbox{white}{the#3!50}{\vphantom{kg}\color{white}#2}}%9111 }%9112 \pdfendlink9113 }9114 \newcommand\showarrow[2][]{%9115 \ifx\relax#1\relax\def\@tempa{#2}\else\def\@tempa{#1}\fi9116 \toggle@layer{\@tempa}{{\itshape #2}}}<strong>The</strong> environment for our illustration.9117 \def\ls@sample#1{{%9118 \parskip 4pt \parindent 0pt9119 \par9120 \vskip4pt9121 {\leftskip 15pt9122 \mt@pseudo@marg{\color{theblue}Click on the image to show the kerns9123 and spacings involved. Click on emphasised words in the text below9124 to reveal the relation of image and code.}9125 \mt@layer{ _ compatibility}{%9126 \mt@place{\rlap{\hskip-\marginparwidth \color{white}%9127 \vrule width\dimexpr\hsize+\marginparwidth\relax height\mt@unvdimen}}9128 \mt@pseudo@marg{\color{thered}%9129 If you had a \acronym{PDF} viewer that understands


THE LETTERSPACING ILLUSTRATION: Document 2209130 \acronym{PDF}\,{\smaller1.5}, you could hide the arrows selectively.}}9131 \vskip-\mt@unvdimen}%9132 \vskip-4pt9133 \setlength\fboxsep{4pt}%9134 \leavevmode9135 \pdfstartlink9136 user{/Subtype/Link9137 /BS > /H/O9138 /A >9140 }%9141 \fcolorbox{theframe}{theshade}%9142 {\fontsize{34}{38}\selectfont #1}%9143 \pdfendlink9144 \par\medskip9145 }%9146 \edef\x{\pdfpageresources{/Properties }}\x9147 }Now define the illustration to be used in the document.9148 \def\lssample{%9149 \ls@sample{%9150 \dols{0pt}{Stop}9151 \lssp{o}{0.45em}{0.25em}{0.15em}9152 \dols{0.16em}{{st}ealing}\hskip-\dimexpr 0.08em+\lsrule\relax9153 \lssp{i}{13.82pt}{4.65pt}{2.08pt}9154 \dols{0.16em}{sheep}9155 \dols{0pt}{!}9156 }%Don’t forget to add the arrows.9157 \vspace{-\baselineskip}9158 \add@arrow{red} {tracking}{lsamount _ c.east}{a _ ls}9159 \add@arrow{red} {okern} {okernend _ c.east}{p _ ls}9160 \add@arrow{green} {ospace} {ospace _ c.east} {ospace}9161 \add@arrow{green} {ispace} {ispace _ c.center}{ispace}9162 \add@arrow{green!75} {istretch}{istretch _ c.east}{istretch.north}9163 \add@arrow{green!75} {ishrink} {ishrink _ c.west} {ishrink.north}9164 \add@arrow{green!75} {ostretch}{ostretch _ c.east}{ostretch.north}9165 \add@arrow{green!75} {oshrink} {oshrink _ c.east} {oshrink.north}9166 \add@arrow[right]{grey}{ligature}{nolig _ c.east} {st.center}9167 }9168 \fiThis is for use with <strong>microtype</strong>.dtx9169 \ifx\documentclass\@twoclasseserror9170 \use<strong>package</strong>{tikz}9171 \elseB.2 Document9172 \documentclass[10pt,a4paper]{ltxdoc}9173 \expandafter\def\csname ver@<strong>microtype</strong>.dtx\endcsname{2999/99/99}Re-use the preamble from <strong>microtype</strong>.dtx.9174 \use<strong>package</strong>{<strong>microtype</strong>-doc}9175 \use<strong>package</strong>{attachfile}9176 \use<strong>package</strong>{tikz}9177 \makeatletter9178 \pdfcatalog{/OCProperties > }9182 \makeatother9183 \begin{document}You are currently reading this.


THE LETTERSPACING ILLUSTRATION: Document 2219184 \DocInput{<strong>microtype</strong>-lssample.dtx}Now show what we are able to do.9185 \noindent9186 Since a picture is worth a thousand words, probably even more if, in our9187 case, it depicts a couple of letterspaced words, let’s bring one to sum up9188 these somewhat confusing options. Suppose you had the following settings9189 (which I would in no way recommend; they are only for illustrative purposes):9190 \begin{verbatim}9191 \SetTracking9192 [ no ligatures = {"\anchorarrow{nolig}"f},9193 spacing = {60"\anchorarrow{ispace}"0*,"%9194 "-1"\anchorarrow{istretch}"00*, "\anchorarrow{ishrink}"},9195 outer spacing = {4"\anchorarrow{ospace}"50,"%9196 "2"\anchorarrow{ostretch}"50,1"\anchorarrow{oshrink}"50},9197 outer kerning = {"\anchorarrow{okernbegin}"*,"%9198 \anchorarrow{okernend}"*} ]9199 { encoding = * }9200 { 1"\anchorarrow{lsamount}"60 }9201 \end{verbatim}9202 and then write:9203 \begin{verbatim}9204 Stop \textls{stealing sheep}!9205 \end{verbatim}9206 this is the (typographically dubious) outcome:92079208 \lssample92099210 \noindent9211 While the word `Stop’ is not letterspaced, the space between the letters in9212 the other two words is expanded by the \showarrow[tracking]{tracking~amount}{red}9213 of 160/1000\,em\,=\allowbreak\,0.16\,em.9214 <strong>The</strong> \showarrow[ispace]{inner~space}{green} within the letterspaced text is9215 increased by 60\%, while its \showarrow[istretch]{stretch}{green} amount is9216 decreased by 10\% and the \showarrow[ishrink]{shrink}{green} amount is left9217 untouched.9218 <strong>The</strong> \showarrow[ospace]{outer~space}{green} (of 0.45\,em) immediately before the9219 piece of text may \showarrow[ostretch]{stretch}{green} by 0.25\,em and9220 \showarrow[oshrink]{shrink}{green} by 0.15\,em.9221 Note that there is no outer space after the text, since the exclamation mark9222 immediately follows; instead, the default \showarrow[okern]{outer~kern}{red}9223 of half the letterspace amount (0.08\,em) is added.9224 Furthermore, one \showarrow{ligature}{grey} wasn’t broken up, because we9225 neglected to specify the `|s|’ in the |no ligatures| key.92269227 \expandafter\enddocument9228 \fi9229


CHANGE HISTORY 222C Change history2004/09/11 Version 1.0General: Initial version . . . . . . . . . . . . . . . . . . . . . 12004/09/21 Version 1.1General: configuration file names in lowercase (suggestedby Harald Harders) . . . . . . . . . . . . . . . 82remove 8-bit characters from the configuration files(suggested by Harald Harders) . . . . . . . . . . . 137Protrusion: add factors for some more characters 144settings for Adobe Minion (contributed by HaraldHarders) . . . . . . . . . . . . . . . . . . . . . . . . . . . 145\DeclareCharacterInheritance: new command: possibilityto specify character inheritance . . . . . 112\MT@declare@sets: remove spaces around set name 99\MT@DeclareSet: remove spaces around first argument. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98\MT@find@file: fix: also check whether the file forthe base font family has already been loaded . . 82\MT@get@basefamily: only remove suffix if it is ‘x’ or‘j’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83\MT@get@listname@: don’t check for empty attributeslist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84\MT@ifempty: fix: use category code 12 for the percentcharacter (reported by Tom Kink) . . . . . . . . . . 43\MT@is@number: numbers may also be specified in hexadecimalor octal (suggested by Harald Harders) 89\MT@pdftex@no: fix: version check (reported by HaraldHarders) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38\MT@permute: don’t use sets for empty encoding . . 114\MT@setup@expansion: issue an error instead of awarning, when pdfTEX version is too old forautoexpand . . . . . . . . . . . . . . . . . . . . . . . . . 128\MT@split@codes: fix: allow zero and negative values 60\MT@use@set: remove spaces around set name . . . 103\UseMicrotypeSet: remove spaces around first argument. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1032004/10/03 Version 1.2Font sets: declare cmor as an alias of cmr . . . . . . . 135new: allmath and basicmath . . . . . . . . . . . . . 134Protrusion: add settings for Computer Modern Romanand Adobe Garamond in TS1 encoding . . . . . 168add settings for Computer Modern Roman mathsymbols . . . . . . . . . . . . . . . . . . . . . . . . . . . 173\MT@familyalias: define alias font name as an alternative,not as a replacement . . . . . . . . . . . . . . 56\MT@get@basefamily: also remove ‘w’ (swash capitals). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83\MT@get@highlevel: check whether defaults havechanged . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99\MT@get@inh@list: fix: set inheritance list \globallyto \@empty . . . . . . . . . . . . . . . . . . . . . . . . . . 86\MT@get@listname@: alternatively check for alias fontname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84\MT@get@size: additional magic to catch some errors 101hijack \set@fontsize instead of \@setfontsize . 101\MT@loop: fix: new macro, used instead of \loop . . 47\MT@maybe@do: also check for alias font name . . . . . 57\MT@permute@@@@@@: more sanity checks for\SetProtrusion and \SetExpansion . . . . . . . 115\MT@setupfont: also search for alias font file . . . . . 54fix: call \@@enc@update if necessary . . . . . . . . . . 542004/10/27 Version 1.3General: fix: specifying load option does no longerrequire to give a name, too . . . . . . . . . . . . . . 109Font sets: declare aer, zer and hfor as aliases of cmr 135\MT@fix@catcode: check some category codes (compatibilitywith german) . . . . . . . . . . . . . . . . . . 34\MT@load@list: check whether list exists . . . . . . . . 822004/11/12 Version 1.4General: check for pdfcprot . . . . . . . . . . . . . . . . . 52don’t use scratch registers in global definitions . . 86use \pickup@font instead of \define@newfont asthe hook for \MT@setupfont . . . . . . . . . . . . . . 93use one instead of five counters . . . . . . . . . . . . . 48Protrusion: tweak quote characters for cmr variants(OT1, T1, lmr) . . . . . . . . . . . . . . . . . . . . . . . 150\<strong>microtype</strong>setup: fix: set the correct levels, and rememberthem; warning when enabling an optiondisabled in <strong>package</strong> options . . . . . . . . . . . . . 123\SetExpansion: fix: specifying extra options does nolonger require to give a name, too . . . . . . . . . 1062004/11/17 Version 1.4aGeneral: new option: final . . . . . . . . . . . . . . . . 120\MT@cfg@catcodes: fix: reset some more catcodeswhen reading files (reported by Michael Hoppe) 83


CHANGE HISTORY 2232004/11/26 Version 1.4bGeneral: fix: set catcodes before reading global configurationfile (reported by Christoph Bier) . . 122optimisation: use less \expandafters and \csnames 42Protrusion: harmonise dashes in upshape and italic(cmr, pad, ppl) . . . . . . . . . . . . . . . . . . . . . . 144slanted like italics . . . . . . . . . . . . . . . . . . . . . 153\MT@checklist@family: fix: don’t try alias familyname if encoding failed . . . . . . . . . . . . . . . . . 58\MT@get@basefamily: fix: failed for font names of theform abczz (reported by Georg Verweyen) . . . . 83\MT@get@slot: don’t define \MT@char globally (savestack problem) . . . . . . . . . . . . . . . . . . . . . . . 86\MT@ifdimen: don’t set \MT@count globally (save stackproblem) . . . . . . . . . . . . . . . . . . . . . . . . . . . 44\MT@setup@PDF: new message if \pdfoutput ischanged . . . . . . . . . . . . . . . . . . . . . . . . . . . 126\MT@use@set: don’t use undeclared font sets . . . . 1032004/12/15 Version 1.5General: defaults: step: 4 (suggested by Hàn Thê´Thành) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120new option: selected, by default false (suggestedby Hàn Thê´ Thành) . . . . . . . . . . . . . . . . . . . 118Documentation: add ‘Short history’ . . . . . . . . . . . . 29add note about DVIoutput option . . . . . . . . . . . . 8Inheritance: remove \ss from T1 list, add \DJ . . . 138Protrusion: settings for Bitstream Charter . . . . . . 145\DeclareMicrotypeAlias: remove spaces around arguments. . . . . . . . . . . . . . . . . . . . . . . . . . . 104\MT@cfg@catcodes: reset catcode of ‘=’ (compatibilitywith Turkish babel) . . . . . . . . . . . . . . . . . . . . 83\MT@fix@catcode: reset catcode of ‘ˆ’ (compatibilitywith chemsym) . . . . . . . . . . . . . . . . . . . . . . . . 34\MT@get@highlevel: don’t test defaults if called afterbegin document . . . . . . . . . . . . . . . . . . . . . . 99\MT@scale@factor: warning for factors outside limits 62\MT@scale@to@em: don’t use \lpcode and \rpcode forthe calculation . . . . . . . . . . . . . . . . . . . . . . . 61\MT@set@ex@codes: allow non-selected font expansion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66\MT@set@pr@codes: adjust protrusion factors beforesetting the inheriting characters . . . . . . . . . . . 59\MT@setup@expansion: defaults: calculate step asmin(stretch,shrink)/5 . . . . . . . . . . . . . . . . 127defaults: turn off expansion for DVI output . . . . 127disable automatic expansion for DVI output . . . 1282005/01/24 Version 1.6General: defaults: turn off expansion for old pdfTEXversions . . . . . . . . . . . . . . . . . . . . . . . . . . . 121load a font if none is selected . . . . . . . . . . . . . . 54new option: factor, by default 1000 . . . . . . . . 120restructure dtx file . . . . . . . . . . . . . . . . . . . . . 134test whether \pickup@font has changed . . . . . . 96test whether numeric options receive a number 120use e-TEX’s \ifcsname and \ifdefined if defined 43Protrusion: add italic uppercase Greek letters . . . 153improve settings for numbers (pointed out by PeterMuthesius) . . . . . . . . . . . . . . . . . . . . . . . . . 146tune CMR math letters (OML encoding) . . . . . . 173\MT@get@charwd: use e-TEX’s \fontcharwd, if available 61\MT@get@inh@list: correct message if selected isfalse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86\MT@set@ex@codes: introduce factor option . . . . . 66\MT@set@pr@codes: introduce factor option . . . . . 59\MT@setup@expansion: disable automatic expansionfor old pdfTEX versions . . . . . . . . . . . . . . . . 128\MT@use@set: retain current set if new set is undeclared. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103\MT@vinfo: new macro instead of \ifMT@verbose . . 352005/02/02 Version 1.6aDocumentation: add table of fonts with tailored protrusionsettings . . . . . . . . . . . . . . . . . . . . . . . 21\MT@get@slot: completely redone, hopefully morerobust (compatible with frenchpro; problemreported by Bernard Gaulle) . . . . . . . . . . . . . . 86\MT@pdftex@no: new macro . . . . . . . . . . . . . . . . . 38\MT@reset@ef@codes: only reset \efcodes for olderpdfTEX versions . . . . . . . . . . . . . . . . . . . . . . . 672005/03/23 Version 1.7General: allow specification of size ranges (suggestedby Andreas Bühmann) . . . . . . . . . . . . . . . . . 100disallow automatic expansion if pdfTEX too old 112fix: remove space after autoexpand . . . . . . . . . 112new value for verbose option: errors . . . . . . . 120shorter command names . . . . . . . . . . . . . . . . . . 48warning when running in draft mode . . . . . . . 126Documentation: add hint about compatibility . . . . 26remove table of match order . . . . . . . . . . . . . . . 12Protrusion: fix: remove \ from OT1, add\textbackslash to T1 encoding . . . . . . . . . . 148\DeclareMicrotypeAlias: may also be used insideconfiguration files . . . . . . . . . . . . . . . . . . . . 104\LoadMicrotypeFile: new command (suggested byAndreas Bühmann) . . . . . . . . . . . . . . . . . . . 104\Microtype@Hook: new command for font <strong>package</strong>authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122\<strong>microtype</strong>setup: fix: warning also when setting to(no)compatibility . . . . . . . . . . . . . . . . . . . 123\MT@begin@catcodes: also use inside configuration


CHANGE HISTORY 224commands . . . . . . . . . . . . . . . . . . . . . . . . . . 83\MT@cfg@catcodes: reset catcode of ‘:’ (compatibilitywith french* <strong>package</strong>s) . . . . . . . . . . . . . . . . . 83\MT@get@listname@: use \@tfor (Andreas Bühmann’sidea) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84\MT@get@slot: remove backslash hack . . . . . . . . . . 86test for \chardefed commands . . . . . . . . . . . . . 87test whether \〈encoding〉\〈...〉 is defined . . . . . . . 87\MT@if@list@exists: don’t define \MT@#1@c@name\globally, here and elsewhere . . . . . . . . . . . . 85\MT@ifdimen: comparison with 1 to allow size smallerthan 1 (suggested by Andreas Bühmann) . . . . . 44\MT@increment: use e-TEX’s \numexpr if available . . 48\MT@is@composite: new macro: construct commandfor composite character; no uncontrolled expansion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91\MT@scale: new macro: use e-TEX’s \numexpr if available. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48\MT@set@ex@codes: two versions of this macro . . . . 66\MT@setup@expansion: modify \showhyphens . . . . 129\MT@split@name: don’t define \MT@encoding &c.\globally . . . . . . . . . . . . . . . . . . . . . . . . . . . 56\MT@test@ast: make it simpler . . . . . . . . . . . . . . 100\MT@try@order: always check for size, too (suggestedby Andreas Bühmann) . . . . . . . . . . . . . . . . . . 84fix: also check for //〈series〉/〈shape〉// (reported byAndreas Bühmann) . . . . . . . . . . . . . . . . . . . . 84\MT@warn@code@too@large: new macro: type out maximumprotrusion factor . . . . . . . . . . . . . . . . . 63\MT@warn@err: new macro: for verbose=errors . . . 352005/06/23 Version 1.8General: \SetProtrusion: new key: unit . . . . . . . 111if font substitution has occurred, set up the substitutefont, not the selected one . . . . . . . . . . . . 94new option: config to load a different main configurationfile . . . . . . . . . . . . . . . . . . . . . . . . . 122new option: unit, by default character . . . . . . . 121Documentation: add example for factor option . . 13add example of how to get rid of a widow (suggestedby Adam Kucharczyk) . . . . . . . . . . . . . 14add hint about error messages . . . . . . . . . . . . . 27Font sets: add U encoding to allmath . . . . . . . . . 134declare pxr and txr as aliases of ppl resp. ptm . 135Inheritance: remove \DJ from T1 list (it’s the same as\DH) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Protrusion: add LY1 characters for Times . . . . . . . 153settings for AMS math fonts . . . . . . . . . . . . . . 177verified settings for slanted Computer Modern Roman. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161\add@accent: fix: disable micro-typographic setup inside\add@accent (reported by Stephan Hennig) 95\DeclareMicrotypeAlias: warning when overridingan alias font . . . . . . . . . . . . . . . . . . . . . . . . 104\DeclareMicrotypeSetDefault: new command: setdefault font set . . . . . . . . . . . . . . . . . . . . . . 103\MT@cfg@catcodes: reset catcodes of the remainingASCII characters . . . . . . . . . . . . . . . . . . . . . . 83\MT@check@rlist: made recursive . . . . . . . . . . . . 116\MT@curr@list@name: new macro: current list typeand name . . . . . . . . . . . . . . . . . . . . . . . . . . . 92\MT@declare@sets: warning when redefining a set . 99\MT@define@set@key@: use comma lists instead oftoken lists . . . . . . . . . . . . . . . . . . . . . . . . . . . 99\MT@find@file: no longer wrap names in commands 82\MT@get@charwd: warning for missing (resp. zerowidth)characters . . . . . . . . . . . . . . . . . . . . . 61\MT@get@font@dimen@six: new macro: test whether\fontdimen 6 is defined . . . . . . . . . . . . . . . . . 59\MT@get@listname@: made recursive . . . . . . . . . . . 84\MT@get@slot: fix: expand active characters . . . . . . 86test whether \〈encoding〉\〈...〉 is defined made morerobust . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87\MT@get@unit: new macro: get unit for codes . . . . . 64\MT@in@rlist: made recursive . . . . . . . . . . . . . . . 47\MT@is@active: new macro: translate inputencdefinedcharacters . . . . . . . . . . . . . . . . . . . . . 90\MT@is@letter: warning for non-ASCII characters . 89\MT@ledmac@setup: character protrusion with ledmac 50\MT@map@clist@n: new macro: used instead of \@for 46\MT@map@tlist@n: new macro: used instead of \@tfor 46\MT@old@cmd: renamed commands from\..MicroType.. to \..Microtype.. . . . . . . . . . 35\MT@pdftex@no: case 5: pdfTEX 1.30 . . . . . . . . . . . 38\MT@permute@@@@@@: add ranges to the beginning ofthe lists . . . . . . . . . . . . . . . . . . . . . . . . . . . 115\MT@scale: fix: remove spaces in /e-TEX variant (reportedby Mark Rossi) . . . . . . . . . . . . . . . . . . 48\MT@setupfont@hook: restore \% and \# whenhyperref is loaded . . . . . . . . . . . . . . . . . . . . 51restore csquotes’s active characters . . . . . . . . . . 51restore percent character if Spanish babel is loaded 51\MT@split@codes: get character width once only . . 60\MT@use@set: fix: remove braces in first line . . . . . 103\MT@xadd: simplified . . . . . . . . . . . . . . . . . . . . . . 462005/10/28 Version 1.9General: \DeclareMicrotypeSet: new key: font . . 101\SetProtrusion: value ‘relative’ renamed to‘character’ for key unit . . . . . . . . . . . . . . . . 111allow context-specific font setup . . . . . . . . . . . . 94compatibility with TEX Live hack (reported by HerbertVoß) . . . . . . . . . . . . . . . . . . . . . . . . . . . 37disable <strong>microtype</strong> setup inside hyperref’s\pdfstringdef (reported by Hàn Thê´ Thành) . . 52fix: use true as the default value . . . . . . . . . . . 118option unit: rename value relative to character 121Documentation: add hint about verbatim environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25add remark about Type 1 fonts required for automaticfont expansion . . . . . . . . . . . . . . . . . . . . 8Font sets: add OT4 encoding to text sets . . . . . . . 134add T5 encoding to text sets . . . . . . . . . . . . . . 134declare qpl and qtm (qfonts, TEX Gyre) as aliasesof ppl resp. ptm . . . . . . . . . . . . . . . . . . . . . . 135Inheritance: add list for OT4 . . . . . . . . . . . . . . . 139add list for T5 (requested by Hàn Thê´ Thành) . . 140


CHANGE HISTORY 225Protrusion: fix: remove uppercase Greek letters fromT1 encoded CMR . . . . . . . . . . . . . . . . . . . . . 148settings for OT4 encoding (Computer Modern Roman,Palatino, Times) . . . . . . . . . . . . . . . . . 144settings for T5 encoded Computer Modern Roman 144\DisableLigatures: new command: disable ligatures(requires pdfTEX 1.30) . . . . . . . . . . . . . . . . . 105\<strong>microtype</strong>context: new command: change setupcontext in the document . . . . . . . . . . . . . . . . 97\MT@checklist@family: fix: add two missing\expandafters . . . . . . . . . . . . . . . . . . . . . . . . 58\MT@detokenize@c: fix the /e-TEX version . . . . . . . . 43\MT@exp@two@n: new macros: less \expandafters . . 43\MT@get@opt: new key ‘preset’ to set all characters tothe specified value before loading the lists . . . . 64\MT@is@active: redone: use \set@display@protect 90\MT@is@letter: using \catcode should be more efficientthan inspecting the \meaning . . . . . . . . . 89\MT@maybe@do: redone . . . . . . . . . . . . . . . . . . . . . 57\MT@rem@from@clist: new macro: remove an itemfrom a comma list . . . . . . . . . . . . . . . . . . . . . 47\MT@scale@factor: generalised . . . . . . . . . . . . . . . 62\MT@setup@expansion: disable expansion if both stepand shrink are zero . . . . . . . . . . . . . . . . . . 129warning if user requested zero step . . . . . . . . . 127\MT@toks: use instead of \toks@ . . . . . . . . . . . . . . 40\SetProtrusion: (et al.) new key: font . . . . . . . . 1052005/12/05 Version 1.9aGeneral: ‘〈file name〉/〈line number〉’ as default listname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109new option: defersetup, by default true . . . . . 119remove superfluous test whether \pickup@font haschanged . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96Documentation: add explanation for error messagein DVI mode . . . . . . . . . . . . . . . . . . . . . . . . . 27add explanation for error message with non-Type 1fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Font sets: declare mdbch (mathdesign) as an alias ofCharter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136Protrusion: fix: remove ‘ _ ’ from OT1 encoding . . . 149settings for T5 encoded Charter . . . . . . . . . . . . 144\<strong>microtype</strong>setup: inside the preamble, accepts all<strong>package</strong> options . . . . . . . . . . . . . . . . . . . . . 123\MT@check@font@cx: optimise context-sensitive setup 96\MT@define@set@key@: don’t expand variables immediately(requested by Georg Verweyen) . . . . . . 99\MT@get@highlevel: no longer check whether defaultshave changed . . . . . . . . . . . . . . . . . . . . . . . . 99\MT@ifdefined@c@T: new macros: true case only . . 43\MT@ifint: use \pdfmatch if available . . . . . . . . . . 44\MT@ifstreq: use \pdfstrcmp if available . . . . . . . 45\MT@in@clist: fix . . . . . . . . . . . . . . . . . . . . . . . . 46\MT@info@missing@char: info instead of warning (afterMichael Hoppe reported that the ‘fl’ ligature ismissing in Palatino SC) . . . . . . . . . . . . . . . . . 62\MT@is@feature: new macro: check for pdfTEX feature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49\MT@map@clist@n: following LATEX3 . . . . . . . . . . . . 46\MT@permute@@@@@: don’t define permutations forunused encodings . . . . . . . . . . . . . . . . . . . . 115\MT@rem@from@clist: fix . . . . . . . . . . . . . . . . . . . 47\MT@setup@: defer setup until the end of the preamble 492006/01/20 Version 1.9bGeneral: compatibility with listings: sanitise morecatcodes (reported by Holger Uhr) . . . . . . . . . 53compatibility with the extendedchar option of thelistings <strong>package</strong> . . . . . . . . . . . . . . . . . . . . . 53Documentation: activate expansion in the distributedPDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1add samples of micro-typographic features . . . . . . 4\MT@features: use throughout the <strong>package</strong> to adjustto beta-ness . . . . . . . . . . . . . . . . . . . . . . . . . 49\MT@ifdimen: use \pdfmatch if available . . . . . . . . 44\MT@warn@code@too@large: fix calculation withpresent factor . . . . . . . . . . . . . . . . . . . . . . . . 632006/02/02 Version 1.9cDocumentation: add example of how to increase protrusionof footnote markers (suggested by GeorgVerweyen) . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Protrusion: settings for URW Garamond . . . . . . . 145\MT@define@code@key@font: fix: context was ignored 108\MT@define@code@key@size: fix: embrace\MT@tempsize in \csname (bug introduced inv1.9b) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1082006/05/05 Version 1.9dFont sets: md* instead of m series in basic sets . . . . 134add QX encoding to text sets . . . . . . . . . . . . . . 134Inheritance: add list for QX encoding (contributed byMaciej Eder) . . . . . . . . . . . . . . . . . . . . . . . . 139Protrusion: settings for QX encoding (contributed byMaciej Eder) . . . . . . . . . . . . . . . . . . . . . . . . 151settings for Euro symbols (Adobe, ITC, marvosym) 184tweak AMS settings . . . . . . . . . . . . . . . . . . . . 177\DeclareCharacterInheritance: fix: empty context 112\MT@detokenize@n: new macro: use \detokenize ifavailable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43\MT@get@ex@opt: fix: evaluate preset . . . . . . . . . . 67\MT@get@font@dimen: warning for zero fontdimen . 62\MT@get@opt: optimise: don’t reset when preset optionis set . . . . . . . . . . . . . . . . . . . . . . . . . . . 64set list name before presetting . . . . . . . . . . . . . . 64


CHANGE HISTORY 226\MT@is@active: support for Unicode (inputenc/utf8) 90\MT@setupfont@hook: restore \% and \# when tex4htis loaded (reported by Peter Dyballa) . . . . . . . 51\SetProtrusion: (et al.) optimise: unify keys formandatory argument . . . . . . . . . . . . . . . . . . 105(et al.) split keys of optional and mandatory argument. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1052006/07/28 Version 1.9eGeneral: fix: default value for activate: true . . . 118Documentation: add hint about unknown encodings 26include LPPL . . . . . . . . . . . . . . . . . . . . . . . . . 238Font sets: declare zeur and zeus (eulervm) as aliasesof eur resp. eus (euler) . . . . . . . . . . . . . . . . 136Inheritance: adapt to marvosym’s changed encoding 141Protrusion: complete settings for Euler Fraktur andScript fonts . . . . . . . . . . . . . . . . . . . . . . . . . 183fix: forgotten comma in mt-mvs.cfg; adapt tomarvosym’s changed encoding . . . . . . . . . . . . 184settings for Euler Roman font . . . . . . . . . . . . . 180\DeclareCharacterInheritance: new key ‘inputenc’to set the input encoding . . . . . . . . . . . . . . . 112\MT@rem@from@clist: model after \@removeelement 47\MT@setup@: empty \MT@setup@ after use (compatibilitywith the combine class) . . . . . . . . . . . . . . . 49\pickup@font: no tracing with trace <strong>package</strong> . . . . 95\SetExpansion: new key: inputenc . . . . . . . . . . . 106\SetProtrusion: (et al.) new key: inputenc . . . . 1052006/09/09 Version 1.9fProtrusion: fix: euler-vm did not load euler settings 181\MT@curr@list@name: fix: \MessageBreak must not beexpanded . . . . . . . . . . . . . . . . . . . . . . . . . . . 92\MT@gdef@n: new macros: global variants . . . . . . . . 42\MT@get@inh@list: fix: input encoding must be setafter the inheritance list has been parsed . . . . 86\MT@glet: new macro . . . . . . . . . . . . . . . . . . . . . . 42\MT@reset@context: only reset context if it has actuallybeen changed . . . . . . . . . . . . . . . . . . . . . 97\MT@set@inh@list: fix: forgotten comma in the featureslist . . . . . . . . . . . . . . . . . . . . . . . . . . . 113\MT@set@named@keys: new macro: set name first, simplifyparsing of optional argument . . . . . . . . 107\SetProtrusion: (et al.) set catcodes before parsingoptional argument . . . . . . . . . . . . . . . . . . . . 1052007/01/14 Version 2.0General: (beta:1) new option: babel, by default false(language-dependent setup suggested by UlrichDirr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118(beta:1) new option: letterspace, by default 100 120(beta:3) compatibility with soul: register \textlsand \lsstyle . . . . . . . . . . . . . . . . . . . . . . . . 53(beta:8) option ‘babel’: fix: switch off Frenchbabel’s shorthands properly (reported by DanielFlipo) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133(beta:8) option ‘babel’: switch off Turkish babel’sshorthands . . . . . . . . . . . . . . . . . . . . . . . . . 133compatibility with listings: set catcode of backslashto zero (reported by Steven Bath) . . . . . . 53new <strong>package</strong> letterspace: a stripped-down version,containing the letterspacing commandsonly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1option ‘unit’, \SetProtrusion: deprecate value‘relative’ completely . . . . . . . . . . . . . . . . . 111Documentation: add hint about how to increasefont _ max and font _ mem _ size . . . . . . . . . . . . 27add hint about warning when tracking and expansionis applied to a font . . . . . . . . . . . . . . . . . 27add remark about ‘draft’ option disabling<strong>microtype</strong> (noted by Michalis Miatidis) . . . . . . . 9qualify hint about web documents with regard toolder pdfTEX versions . . . . . . . . . . . . . . . . . . 25qualify hints about expansion error messages withregard to older pdfTEX versions . . . . . . . . . . . 27Font sets: add footnotesize and scriptsize sets 135add smallcaps set . . . . . . . . . . . . . . . . . . . . . 134\DeclareMicrotypeBabelHook: (beta:1) new command:interaction with babel . . . . . . . . . . . . 105\lsstyle: (beta:1) new command: letterspacing . . 75(beta:8) fix: font switches don’t pose a problemanymore . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75(beta:8) fix: letterspacing commands may benested . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75totally redone, using the new \letterspacefont 75\MT@declare@sets: fix: empty size list when redefiningset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99\MT@is@symbol: made even more robust . . . . . . . . 91\MT@load@inputenc: sanitise catcodes before loadinginput encoding (problem with listings) . . . . 65\MT@pdftex@no: (beta:1) case 6: pdfTEX 1.40 . . . . . 38\MT@setup@noligatures: maybe disable\MT@noligatures after the preamble . . . . . . . 132\MT@split@name: adjust to possible letterspacing . . 56\SetExtraKerning: (beta:1) new command: additionalkerning . . . . . . . . . . . . . . . . . . . . . . . 107\SetExtraSpacing: (beta:1) new command: adjustmentof interword spacing . . . . . . . . . . . . . . 107\SetTracking: new command: tracking . . . . . . . . 106\textls: (beta:1) new command: letterspacing . . . 79starred version: remove spaces around text . . . . 79\tracing<strong>microtype</strong>inpdf: new debug method: markall fonts with PDF annotations . . . . . . . . . . . . 36


CHANGE HISTORY 2272007/01/21 Version 2.1General: compatibility with CJK: also check for itsdefinition . . . . . . . . . . . . . . . . . . . . . . . . . . . 94compatibility with pinyin: disable <strong>microtype</strong> in\py@macron (reported by Sven Naumann) . . . . 53fix: letterspace <strong>package</strong> forgot to load keyval . 40\lslig: new command: protect ligatures in letterspacedtext . . . . . . . . . . . . . . . . . . . . . . . . . . 75\MT@get@ls@basefont: redone: use \pdfmatch tomake it bullet-proof . . . . . . . . . . . . . . . . . . . . 75\textls: fix: use \hmode@bgroup . . . . . . . . . . . . . . 792007/07/14 Version 2.2General: disable <strong>microtype</strong> if wordcount is loaded(reported by Ross Hetherington) . . . . . . . . . . . 49new option: copyfonts . . . . . . . . . . . . . . . . . . 119simplify key declarations . . . . . . . . . . . . . . . . 109Documentation: add hint about error message withpdfTEX 1.40 . . . . . . . . . . . . . . . . . . . . . . . . . 27add hint about extra TOC leader dot (first discoveredby Morten Høgholm) . . . . . . . . . . . . . . . . 25add overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 5logo transparency and amusement . . . . . . . . . . . 1Font sets: declare FPL Neu as an alias of Palatino . 136declare chr (chmath) as an alias of Charter (reportedby Geoff Vallis) . . . . . . . . . . . . . . . . . 136default set for tracking: smallcaps . . . . . . . . . 135Inheritance: remove ‘-’ → ‘127’ . . . . . . . . . . . . . . 138Protrusion: settings for Bitstream Letter Gothic . . 145Spacing: add sample . . . . . . . . . . . . . . . . . . . . . 185Tracking: add ligatures that are to be disabled . . . 142\DeclareMicrotypeVariants: new command . . . . 104\DisableLigatures: new optional argument: disableselected ligatures only . . . . . . . . . . . . . . . . . 105\lslig: always defined . . . . . . . . . . . . . . . . . . . . 75\MT@checklist@font: fix: construct font name fromcharacteristics . . . . . . . . . . . . . . . . . . . . . . . . 58\MT@copy@font: optionally work on copies of fonts . 55\MT@get@basefamily: redone, working on font namesand suffixes of arbitrary length . . . . . . . . . . . . 83\MT@get@charwd: subtract letterspacing amount fromwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62\MT@get@ls@basefont: fix again: remember base fontin a macro . . . . . . . . . . . . . . . . . . . . . . . . . . 75\MT@ifdimen: employ LuaTEX features if available . . 44\MT@ifint: employ LuaTEX features if available . . . 44\MT@ifstreq: employ LuaTEX features if available . . 45fix: /e-TEX version shouldn’t use \x and \y (foundby Wiebke Petersen) . . . . . . . . . . . . . . . . . . . . 45\MT@is@composite: more robust: expand exactly once 91\MT@is@symbol: expand once more (for frenchpro) 91\MT@lsfont: use \font@name, not \MT@font . . . . . . 72\MT@lua: (basic) support for LuaTEX . . . . . . . . . . . 39\MT@maybe@etex: use catcode trickery . . . . . . . . . . 37\MT@pdftex@no: case 7: pdfTEX 1.40.4 . . . . . . . . . . 38\MT@preset@aux@space: generalised . . . . . . . . . . . 65\MT@set@all@pr: (et al.) allow empty values . . . . . 60\MT@set@inputenc@: only load inputenc files if necessary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64\MT@set@tr@codes: disable ligatures in letterspacedfonts manually (due to change in pdfTEX 1.40.4) 72possibility to customise interword spacing . . . . . 72\MT@setup@expansion: warning if stretch or shrinkaren’t multiples of step . . . . . . . . . . . . . . . . 129\MT@setupfont: don’t call \@@enc@update anymore . 54only add features that are available with the respectivepdfTEX . . . . . . . . . . . . . . . . . . . . . . . . . . 54\MT@setupfont@hook: restore percent character ifGalician babel is loaded . . . . . . . . . . . . . . . . . 51\MT@the@pr@code@tr: adjust protrusion of letterspacedfonts . . . . . . . . . . . . . . . . . . . . . . . . . 60\MT@tracking: remember fonts that shouldn’t be letterspaced. . . . . . . . . . . . . . . . . . . . . . . . . . . 71\MT@tracking@: fix: tracking couldn’t be re-enabled 71\MT@warn@tracking@DVI: warning when letterspacingin DVI mode . . . . . . . . . . . . . . . . . . . . . . . . 131\MT@with@babel@and@T: also inspect class options . 50\pickup@font: letterspace: setup inside group . . . 95\SetTracking: new key ‘no ligatures’ to disableligatures of letterspaced fonts . . . . . . . . . . . . 106new keys ‘spacing’ and ‘outer spacing’ to adjustinterword spacing (suggested by Steven E. Harris). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106third argument may be empty . . . . . . . . . . . . . 106\text<strong>microtype</strong>context: new command: wrapperaround \<strong>microtype</strong>context . . . . . . . . . . . . . . 972007/12/23 Version 2.3General: disable \<strong>microtype</strong>context in hyperref’s\pdfstringdef . . . . . . . . . . . . . . . . . . . . . . . 52fix: really switch off Turkish shorthands . . . . . . 133new value for verbose option: silent (suggestedby Karl Berry) . . . . . . . . . . . . . . . . . . . . . . . 120turned some warnings into errors . . . . . . . . . . 120Documentation: add kerning sample . . . . . . . . . . . 18add letterspacing illustration . . . . . . . . . . . . . . . 17\do@subst@correction: remember substitute font forall times (reported by Stephan Hennig) . . . . . . 95\lslig: redone: extract outer kerns from currentletterspacing amount . . . . . . . . . . . . . . . . . . . 75\<strong>microtype</strong>context: made robust (reported by StephanHennig) . . . . . . . . . . . . . . . . . . . . . . . . 97\MT@begin@catcodes: fix: don’t disable \KV@@sp@def 83\MT@define@set@key@font: font: single asteriskmeans normal font . . . . . . . . . . . . . . . . . . . 101\MT@in@clist: fix: don’t use \x (reported by PeterMeier) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46\MT@is@active: support for extended Unicode(inputenc/utf8x resp. ucs) – experimental . . . 90\MT@noligatures: fix: set evaluation didn’t work (bugintroduced in v2.2) . . . . . . . . . . . . . . . . . . . . 81\MT@plain: letterspace: support for eplain/miniltx 37\MT@set@curr@os: adjusting spaces made more reliable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73


CHANGE HISTORY 228\MT@set@tr@codes: also adjust tracking if protrusion isnot enabled, and even for letterspace (reportedby Stephan Hennig) . . . . . . . . . . . . . . . . . . . . 72possibility to customise outer kerning (suggestedby Stephan Hennig) . . . . . . . . . . . . . . . . . . . . 72\MT@SetTracking: sanity check for value . . . . . . . 107\MT@setup@tracking: enable protrusion when trackingis enabled . . . . . . . . . . . . . . . . . . . . . . . 130\MT@tr@outer@l: only change pre outer space if itcontains shrink . . . . . . . . . . . . . . . . . . . . . . . 772008/02/29 Version 2.3aGeneral: fix test for soul under plain TEX . . . . . . . 53Documentation: add hint about babel having to beloaded first . . . . . . . . . . . . . . . . . . . . . . . . . . 26add table of available and enabled features . . . . . 7mention soulutf8 . . . . . . . . . . . . . . . . . . . . . . 29Protrusion: adjust LMR quotation marks again . . . 150\MT@error@doesnt@work: error messages if pdfTEX istoo old for extensions . . . . . . . . . . . . . . . . . 131\MT@fix@catcode: fix catcodes earlier, and also for theletterspace <strong>package</strong> . . . . . . . . . . . . . . . . . . . 34\MT@getkey: fix: key=val in class options list . . . . 126\MT@maybe@etex: removed . . . . . . . . . . . . . . . . . . 37\MT@set@codes: generalised . . . . . . . . . . . . . . . . . 60\MT@setupfont@hook: restore percent character ifMexican babel is loaded . . . . . . . . . . . . . . . . 512008/06/04 Version 2.3bGeneral: compatibility with CJKutf8: also check forits definition . . . . . . . . . . . . . . . . . . . . . . . . . 94\MT@exp@gcs: new macro: reduce save stack size . . 42\MT@font@copy: enable font copies also with protrusioncontexts (reported by Nathan Rosenblum) 55\MT@get@size: grouping . . . . . . . . . . . . . . . . . . . . 101\MT@noligatures@: fix: warning messages for unknownslots . . . . . . . . . . . . . . . . . . . . . . . . . 81\MT@requires@latex: new macro . . . . . . . . . . . . . 37\MT@set@tr@codes: fix: protrusion adjustment onlyfor new fonts (reported by Wolfram Schaalo) . . 72\MT@tr@outer@l: fix: only in horizontal mode . . . . 77make \spaceskip-aware (ragged2e) . . . . . . . . . 77\MT@tr@outer@r@@: additional test for horizontalmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782008/11/11 Version 2.3cGeneral: LuaTEX supported by default . . . . . . . . . . 39Documentation: add hint about spacing being experimental. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26add hint about partial incompatibility with CJK . 27Inheritance: add \textcommabelow[STst] to QX encoding(reported by Vasile Gaburici) . . . . . . . 140\MT@detokenize@c: fix: remove last space only (reportedby Ulrich Dirr) . . . . . . . . . . . . . . . . . . 43\MT@tr@outer@r@@: additional test for horizontalmode (reported by Sveinung Heggen) . . . . . . . 782009/03/27 Version 2.3dGeneral: fix pinyin compatibility check (reported bySilas S. Brown) . . . . . . . . . . . . . . . . . . . . . . . 53move setup to the very end (for Colin Rourke) . 134\ifMT@inannot: use pdftexcmds for debugging . . . . 36\lsstyle: disable for LuaTEX . . . . . . . . . . . . . . . . 75make invalid in math mode . . . . . . . . . . . . . . . . 75\<strong>microtype</strong>setup: select font after setup . . . . . . . 123\MT@check@active@set: warning for missing defaultsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122\MT@lua: update for LuaTEX 0.36 . . . . . . . . . . . . . . 39\MT@set@tr@codes: allow zero tracking . . . . . . . . . 72\MT@set@tr@zero: fix: allow switching off tracking(reported by Ulrich Dirr) . . . . . . . . . . . . . . . . 75\MT@setup@expansion: default step: 1 for pdfTEXversions ≥ 1.40 . . . . . . . . . . . . . . . . . . . . . . 127\MT@tr@outer@r@@: don’t use \x (reported by UlrichDirr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78fix: don’t adjust in math mode (reported byChristoph Bier) . . . . . . . . . . . . . . . . . . . . . . . 78fix: don’t adjust inside discretionary (reported byMaverick Woo) . . . . . . . . . . . . . . . . . . . . . . . 78\MT@tr@set@okern: allow empty value for outerkerning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80\textls: make math mode aware . . . . . . . . . . . . . 792009/11/09 Version 2.3eDocumentation: suggest to patch \@verbatim insteadof \verbatim . . . . . . . . . . . . . . . . . . . . . . . . . 25Expansion: settings for T2A encoding (contributed byKarl Karlsson) . . . . . . . . . . . . . . . . . . . . . . . 142Font sets: sc* instead of sc in smallcaps set . . . . 134add T2A encoding . . . . . . . . . . . . . . . . . . . . . 134Protrusion: settings for T2A encoding (contributed byKarl Karlsson) . . . . . . . . . . . . . . . . . . . . . . . 150Spacing: settings for T2A encoding (contributed byKarl Karlsson) . . . . . . . . . . . . . . . . . . . . . . . 187\MT@get@font@dimen@six: fix: gobbling settings withtracking failed (reported by Leo) . . . . . . . . . . 59\MT@setup@: make space-unaware (requested byMarcin Borkowski) . . . . . . . . . . . . . . . . . . . . . 49\MT@tr@outer@r: compatibility with tikz (first reportedby Christian Stark) . . . . . . . . . . . . . . . 77\MT@tr@outer@r@@: fix: set current kerning and spacingagain (found by Lars Rönnbäck) . . . . . . . . 78


CHANGE HISTORY 2292010/01/10 Version 2.4General: new file <strong>microtype</strong>.lua containing the luafunctions (contributed by Élie Roux) . . . . . . . . 42Protrusion: settings for T2A encoded Minion (contributedby Karl Karlsson) . . . . . . . . . . . . . . 1502013/03/13 Version 2.5General: allow contexts for LuaTEX . . . . . . . . . . . 109disable ‘DVIoutput’ option for TEX . . . . . . . . . 119fix: check whether ‘〈file〉/〈line〉’ list name alreadyexists (reported by Till A. Heilmann) . . . . . . . 109letterspacing with LuaTEX 0.62 . . . . . . . . . . . . . 71new files: <strong>microtype</strong>-pdftex.def,<strong>microtype</strong>-xetex.def, <strong>microtype</strong>-luatex.def,containing engine-specific definitions . . . . . . . 37protrusion with TEX . . . . . . . . . . . . . . . . . . . . 39restore \space inside listings (reported by RolfDieterich) . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Documentation: add hint about spacing andragged2e . . . . . . . . . . . . . . . . . . . . . . . . . . . 26add hint about dtx source code . . . . . . . . . . . . . 27add hint about LuaTEX compatibility . . . . . . . . . 26include <strong>microtype</strong>-logo.dtx and<strong>microtype</strong>-lssample.dtx . . . . . . . . . . . . . . . 212Font sets: add EU1 and EU2 encodings . . . . . . . . 134declare lmr as alias of Latin Modern Roman (Open-Type version) . . . . . . . . . . . . . . . . . . . . . . . 135declare lmsy and lmm as aliases of cmsy resp. cmm(reported by Jonas Hogstrom) . . . . . . . . . . . . 135declare zgmx etc. (garamondx) as aliases of URWGaramond . . . . . . . . . . . . . . . . . . . . . . . . . 136declare TeX Gyre Pagella, Asana Math, Palatino LTStd, and Palatino as aliases of Palatino Linotype(OpenType version) . . . . . . . . . . . . . . . . . . . 136Inheritance: add rudimentary list for EU1 and EU2 . 141Protrusion: add default lists for EU1 and EU2 . . . 149improvements to Computer Modern Roman italics(contributed by Hendrik Vogt) . . . . . . . . . . . 153Tracking: add EU2 encoding to default list . . . . . . 142\DeclareCharacterInheritance: allow more thanone encoding . . . . . . . . . . . . . . . . . . . . . . . 112\DeclareMicrotypeAlias: remove spaces in fontname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104\ifMT@nofamily: info if settings are not family-specific(suggested by Hàn Thê´ Thành) . . . . . . . . . . . . 59\LoadMicrotypeFile: remove all spaces in font name 104EXEX\lsstyle: fix: ensure to set up math fonts (reportedby RazorXsr) . . . . . . . . . . . . . . . . . . . . . . . . . 75\<strong>microtype</strong>context: fix: ensure to set up math fonts(reported by RazorXsr) . . . . . . . . . . . . . . . . . . 97\MT@define@code@key@family: compatibility withfontspec: remove its internal counter (reportedby Till A. Heilmann) . . . . . . . . . . . . . . . . . . . 108\MT@define@code@key@font: scrub fontspec featurecount (found by Meho R) . . . . . . . . . . . . . . . 108\MT@do@font: adapt for TEX . . . . . . . . . . . . . . . . 48adapt for LuaTEX . . . . . . . . . . . . . . . . . . . . . . . 48\MT@get@slot@: adapt for TEX . . . . . . . . . . . . . . 87adapt for LuaTEX (requested by Georg Duffner) . . 87\MT@if@outer@next: fix: conflict with amsmath (reportedby Scott Pakin) . . . . . . . . . . . . . . . . . . 78EXEX\MT@info@missing@char: fix error message for TEX(reported by Juan Acevedo) . . . . . . . . . . . . . . 62\MT@is@charx: compatibility with xunicode . . . . . . 91\MT@ledmac@setup: fix to work with TEX (reportedby Maïeul Rouquette) . . . . . . . . . . . . . . . . . . . 50\MT@ls@set@ls: allow formulas in optional argumentto \textls (fix by Heiko Oberdiek) . . . . . . . . . 80\MT@register@subst@font: only register if it isn’t registeredalready (reported by George Gratzer andJosep Maria Font) . . . . . . . . . . . . . . . . . . . . . 96\MT@register@subst@font@cx: only register if it isn’tregistered already . . . . . . . . . . . . . . . . . . . . . 96\MT@scrubfeatures: compatibility with fontspec:remove its internal counter . . . . . . . . . . . . . . 56\MT@set@all@pr: fix: remove space (found byMeho R) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60\MT@set@pr@codes: make info about generic settingsencoding-specific (reported by Sebastian Schubert). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59\MT@setup@spacing: warning with ragged2e (reportedby Steffen Hoffmann) . . . . . . . . . . . . . . . . . . 130\MT@setupfont@hook: restore \% and \# whenmathastext is loaded (found by Seamus Bradley) 51select font with fontspec (found by Georg Duffner) 51EXEX2013/05/23 Version 2.5aGeneral: use luatexbase instead of luatextra (contributedby Élie Roux) . . . . . . . . . . . . . . . . . . 41Documentation: add hint about fontspec having tobe loaded first . . . . . . . . . . . . . . . . . . . . . . . . 26include OpenType configuration files . . . . . . . . 189\MT@afteraftergroup: fix: get outer kerning andspacing of nested letterspacing right . . . . . . . . 74\MT@get@slot@: adapted for luaotfload v2.2 (contributedby Élie Roux) . . . . . . . . . . . . . . . . . . 88\MT@led@unhbox@line: simplified . . . . . . . . . . . . . 50\MT@ledmac@setup: support for eledmac . . . . . . . . . 50\MT@ls@outer@k: add marker for tightly nested letterspacing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81\MT@set@tr@codes: fix: load font for fontspec . . . . 73\MT@xspace: fix outer spacing problem with xspace(reported by Dave) . . . . . . . . . . . . . . . . . . . . 79


INDEX 230D IndexLinks (in blue) refer to the page where the corresponding entry is described (bold face) resp. occurs. Plain numbers(in black) refer to the code line where the corresponding entry is defined (underlined) resp. used.Options:DVIoutput . . . . . . . . . . . . . . . . . . . . . . . . . . . 8activate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6auto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7babel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9draft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . 6factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7final . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9kerning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6letterspace . . . . . . . . . . . . . . . . . . . . . . . . . . 8protrusion . . . . . . . . . . . . . . . . . . . . . . . . . . . 6selected . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8shrink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8stretch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7verbose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9User Commands:\DeclareCharacterInheritance . . . . . . . . . . . 20A a0poster (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . 101activate (option) . . . . . . . . . . . . . . . . . . 6, 118, 226\add@accent . . . . . . . . . . . . . . . . . . . . . . . . . . 2735ae (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . . . 21, 135\DeclareMicrotypeAlias . . . . . . . . . . . . . . . . 21\DeclareMicrotypeBabelHook . . . . . . . . . . . . 23\DeclareMicrotypeSet . . . . . . . . . . . . . . . . . 10\DeclareMicrotypeSet* . . . . . . . . . . . . . . . . 10\DeclareMicrotypeSetDefault . . . . . . . . . . . 12\DeclareMicrotypeVariants . . . . . . . . . . . . . 20\DeclareMicrotypeVariants* . . . . . . . . . . . . 20\DisableLigatures . . . . . . . . . . . . . . . . . . . . 24\LoadMicrotypeFile . . . . . . . . . . . . . . . . . . . 21\lslig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\lsstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\<strong>microtype</strong>context . . . . . . . . . . . . . . . . . . . . 22\<strong>microtype</strong>setup . . . . . . . . . . . . . . . . . . . . . . 9\SetExpansion . . . . . . . . . . . . . . . . . . . . . . . 14\SetExtraKerning . . . . . . . . . . . . . . . . . . . . . 18\SetExtraSpacing . . . . . . . . . . . . . . . . . . . . . 19\SetProtrusion . . . . . . . . . . . . . . . . . . . . . . 12\SetTracking . . . . . . . . . . . . . . . . . . . . . . . . 15\textls . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\textls* . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\text<strong>microtype</strong>context . . . . . . . . . . . . . . . . 22\UseMicrotypeSet . . . . . . . . . . . . . . . . . . . . . 11amsmath (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . 229amssymb (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . 177article (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . 22auto (option) . . . . . . . . . . . . . . . . . . . . . . . 7, 8, 118B babel (option) . . . . . . . . . . . . 9, 23, 26, 31, 118, 226 babel (<strong>package</strong>) . . . . . . . . 2, 3, 5, 16, 23, 24, 26,51, 83, 105, 132, 133, 136, 223, 224, 226–228C chemsym (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . 223chmath (<strong>package</strong>) . . . . . . . . . . . . . . . . . 21, 136, 227CJK (<strong>package</strong>) . . . . . . . . . . . . . . 27, 53, 94, 227, 228CJKutf8 (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . 94, 228cm-super (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . . 8color (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . 9, 126combine (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . 134, 226D \DeclareCharacterInheritance . . . . . . . 20, 41, 3522\DeclareMicrotypeAlias . . . . . . . . . 21, 43, 71, 3120\DeclareMicrotypeBabelHook . . . . . . 23, 45, 64, 3182\DeclareMicrotypeSet . . . . . 10, 32, 57, 59, 72, 2848\DeclareMicrotypeSet* . . . . . . . . . . . . . . . . 10, 2848\DeclareMicrotypeSetDefault . . . . . 12, 34, 61, 3079\DeclareMicrotypeVariants . . . 20, 42, 58, 63, 3107\DeclareMicrotypeVariants* . . . . . . . . . . . . . . . . 20E eco (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . . 21, 135\efcode . . . . . . . . . . . 1455, 1481, 1482, 1522, 1524eledmac (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . 50, 229eplain (<strong>package</strong>) . . . . . . 24, 30, 33, 37, 50, 126, 227eucal (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . . . 181eufrak (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . 183F \f@family . . . . . . . . . . . . . . . . . . . . . . . . 2689, 2690\f@size . . . . . . . . . . . 2682, 2684, 2686, 2693, 2733factor (option) . . . . . . . . . . . 7, 13, 32, 120, 121, 223fancyvrb (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . 26final (option) . . . . . . . . . . . . . 9, 32, 118, 120, 222fix-cm (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . . 56\font . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898, 1843config (option) . . . . . . . . . . . . . 9, 20, 31, 122, 224contour (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . 126copyfonts (option) . . . . . . . . . . . . 55, 118, 119, 227crop (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . . . 126csquotes (<strong>package</strong>) . . . . . . . . . . . . . 28, 51, 148, 224\curr@fontshape . . . . . 2682, 2684, 2686, 2693, 2733defersetup (option) . . . . . . . . 51, 118, 119, 123, 225\define@newfont . . . . . . . . . . 2675, 2683, 2687, 2695\DisableLigatures . . . . . . . . . . . . . 24, 40, 62, 3155\do@subst@correction . . . . . . . . . . . . . . . . . . . 2732docstrip (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . 33draft (option) . . . . . . . . . . . . . . . . 9, 118, 120, 226dsfont (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . . 59DVIoutput (option) . . . . . . . . 8, 9, 118, 119, 223, 229euler (<strong>package</strong>) . . . . . . . . . . . . . . . . . . 92, 180, 226eulervm (<strong>package</strong>) . . . . . . . . . . . . 21, 136, 181, 226euroitc (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . 184europs (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . 184eurosans (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . 184expansion (option) . . . . . . . . . . . . . . 6, 11, 118, 127\font@name . . . . . . . . . . . . . . . . . . . . . . . . . 111,943, 945, 947, 949, 959, 960, 1714, 1719,1754, 1760, 1765, 1768, 1829, 1843, 1855,1857, 1862, 1864, 1867, 1870, 1873, 1908,1963, 2105, 2107, 2675, 2683, 2692, 2695,2716, 2718, 2720, 2734, 2747, 2748, 2765, 2770\fontcharwd . . . . . . . . . . . . . . . . . 1199, 1203, 1209


INDEX 231\fontdimen . . . . . . . . . . . . . . . . . . . . . . . . 1122,1129, 1234, 1239, 1338, 1341, 1731, 1732,1760, 1855, 1901, 1902, 1909, 1910, 1916,1920, 1927, 1937, 1941, 1944, 1963, 2118, 2121fontinst (<strong>package</strong>) . . . . . . . . . . . . . . . 188, 212, 214fontinstallationguide (<strong>package</strong>) . . . . . . . . . . . 167G garamondx (<strong>package</strong>) . . . . . . . . . . . . . . . 21, 136, 229german (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . 34, 222fontspec (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . 6,22, 24, 26, 27, 29, 30, 56, 100, 108, 135, 229fourier (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . . 59french (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . 224frenchpro (<strong>package</strong>) . . . . . . . . . . . . . . . 91, 223, 227\glb@currsize . . . . . . . . . . . . . . . . . . . . 1832, 2796graphics (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . 9, 126H hfoldsty (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . 21, 135 hyperref (<strong>package</strong>) . . . . . 9, 51, 52, 94, 126, 224, 227I IEEEtran (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . 94\iffontchar . . . . . . . . . . . . . . . . . . . . . . . . . . . 1244\ifMT@auto . . . . . . . . . . . . . . . . . . . 282, 4253, 4304\ifMT@babel . . . . . . . . . . . . . . . . . . 282, 4380, 4504\ifMT@do . . . . . . . . . . . . . . . . . 992, 1055, 1690, 2152\ifMT@document . . . . . . . . . . . . . . . . . . . . . 323, 3633\ifMT@draft . . . . . . . . . . . . . . . . . . . . . . . 282, 4158\ifMT@expansion . . . . . . . . . . . 282, 4216, 4301, 4337\ifMT@fontspec . . . . . . . . . . . . . . . . . . . . . . . . . .. . 782, 787, 816, 973, 1750, 2912, 3306, 3332\ifMT@if@ . . . . . . . . . . . . . . . . . . . . . . . . . . 281,792, 799, 823, 855, 2761, 3736, 4524, 4527\ifMT@inannot . . . . . . . . . . . . . . . . . . . . . . . . . . 99\ifMT@inlist@ . . . 597, 642, 715, 740, 916, 1022,1039, 1048, 1066, 1084, 1688, 2205, 2216,2265, 2314, 2748, 2755, 2767, 2822, 2834, 3138\ifMT@kerning . . . . . . . . . . . . . . . . 282, 4394, 4517J jurabib (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . . 94K kerning (option) . . . . . . . . . . . . . . . . . 6, 11, 30, 118keyval (<strong>package</strong>) . . . . . . . . . . . . . . 40, 60, 137, 227\knaccode . . . . . . . . . . 1639, 1640, 1650, 1653, 1659L ledmac (<strong>package</strong>) . . . . . . . . . . . . 28, 31, 50, 94, 224ledpar (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . . 28\leftmarginkern . . . . . . . . . . . . . . . . . . . . . . . . 753letterspace (option) 8, 17, 23, 24, 30, 44, 71, 120, 226letterspace (<strong>package</strong>) . . . . . . . . . . . . . . . . . . 1,24, 30, 31, 33, 35, 37, 72, 73, 75, 226–228\letterspacefont . . . . . . . . . . . . . . . . . . . . . . . 1719lineno (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . . 50listings (<strong>package</strong>) . . . . 26, 53, 65, 83, 225, 226, 229M marvosym (<strong>package</strong>) . . . 21, 31, 33, 141, 184, 225, 226mathastext (<strong>package</strong>) . . . . . . . . . . . . . . . . . . 51, 229mathdesign (<strong>package</strong>) . . . . . . . . . . . . . . 21, 136, 225memoir (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . 22, 94\Microtype@Hook . . . . . . . . . . . . . . . . . . . . 122, 3998\<strong>microtype</strong>context . . . . . . . . . . . . . . . . . . . . . . .. . 22, 47, 844, 2791, 2802, 4165, 4487, 4490<strong>microtype</strong>context (environment) . . . . . . . . . . . . . 22\<strong>microtype</strong>setup . . . . . . . . . . . . . . 9, 46, 4002, 4164miniltx (<strong>package</strong>) . . . . . . . . . 24, 30, 33, 37, 50, 227minimal (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . 54\MT@@font . . . . . . . . . . . . . . . . . . . . . . 380, 919,941, 1124, 1235, 1248, 1702, 2268, 2340, 2721\MT@abbr@ex . . . . . . . . . . . . . . . . . . . . . . . . . . . 691\MT@abbr@ex@c . . . . . . . . . . . . . . . . . . . . . . . . . 691\MT@abbr@ex@inh . . . . . . . . . . . . . . . . . . . . . . . . 691\MT@abbr@kn . . . . . . . . . . . . . . . . . . . . . . . . . . . 691\MT@abbr@kn@c . . . . . . . . . . . . . . . . . . . . . . . . . 691\MT@abbr@kn@inh . . . . . . . . . . . . . . . . . . . . . . . . 691\MT@abbr@nl . . . . . . . . . . . . . . . . . . . . . . . . . . . 691\MT@abbr@pr . . . . . . . . . . . . . . . . . . . . . . . . . . . 691\MT@abbr@pr@c . . . . . . . . . . . . . . . . . . . . . . . . . 691\MT@abbr@pr@inh . . . . . . . . . . . . . . . . . . . . . . . . 691\ifMT@nofamily . . . . . . . . . . . . . . . . . . . . 1094, 1101\ifMT@noligatures . . . . . . . . . . . . . . . . . . 282, 4470\ifMT@nonselected . . . . . . . . . . . . 1432, 2327, 2335\ifMT@norest . . . . . . . 2396, 2413, 2425, 2439, 2500\ifMT@opt@auto . . . . . . . . . . . . . . . . . . . . 3743, 4256\ifMT@opt@DVI . . . . . . . . . . . . . . . . . . . . 3743, 4183\ifMT@opt@expansion . . . . . . . . . . 3743, 4212, 4338\ifMT@protrusion . . . . . . . 282, 747, 769, 4195, 4353\ifMT@selected . . . . . . . . . . . . . . . . 282, 4287, 4307\ifMT@spacing . . . . . . . . . . . . . . . . 282, 4362, 4379\ifMT@tracking . . . . . . . . . . . . . . . . 282, 4349, 4409\ifMT@xunicode . . . . . . . . . . . . . . . . 782, 2583, 2621ifpdf (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . 9, 94, 126\iftracing<strong>microtype</strong>inpdfall . . . . . . . . . . . . . . 105inputenc (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . 14,26, 31, 53, 64, 65, 86, 90, 92, 224, 226, 227\knbccode . . . . . . . . . . 1632, 1633, 1649, 1652, 1658\knbscode . . . . . . . . . . 1553, 1554, 1577, 1581, 1587lmodern (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . 8, 150\LoadMicrotypeFile . . . . . . . 21, 44, 74, 3134, 4163\lpcode . . . . . . 1136, 1172, 1173, 1376, 1379, 1744\lslig . . . . . . . . . . . . . . . . . . . . 23, 54, 1848, 1851\lsstyle . . . . . . . . . . . . . . 23, 51, 846, 871, 876,1830, 2044, 2050, 2055, 2058, 2068, 2072, 4166luaotfload (<strong>package</strong>) . . . . . . . . . . . . . . . 26, 88, 229luatexbase (<strong>package</strong>) . . . . . . . . . . . . . . . . . . 41, 229luatextra (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . 229\MT@abbr@sp . . . . . . . . . . . . . . . . . . . . . . . . . . . 691\MT@abbr@sp@c . . . . . . . . . . . . . . . . . . . . . . . . . 691\MT@abbr@sp@inh . . . . . . . . . . . . . . . . . . . . . . . . 691\MT@abbr@tr . . . . . . . . . . . . . . . . . . . . . . . . . . . 691\MT@abbr@tr@c . . . . . . . . . . . . . . . . . . . . . . . . . 691\MT@active@features . . . . . . . . . . . . . . . . . . . . .951, 2749, 2752, 2764, 2775, 2811, 2821,3163, 4196, 4302, 4350, 4363, 4395, 4479, 4480\MT@addto@annot . . . . . . . . . . . . . . . . . . . . . . . . . 99\MT@addto@setup . . . . . . . . . . . . . . . . . 731, 732,802, 1351, 1976, 2669, 2791, 2792, 3393,3411, 3856, 4003, 4157, 4440, 4478, 4503, 4536\MT@adjustspacing . . . . . . . . . . . . 4063, 4064, 4303\MT@afteraftergroup . . . . . . . . . . 1772, 1780, 1790\MT@auto . . . . . . . . . . . 1442, 4252, 4266, 4277, 4283\MT@auto@ . . . . . . . . . . . . . . . . . . . 1442, 1451, 1495\MT@autofalse . . . . . . . . . . . . . . . . 284, 4264, 4276\MT@autotrue . . . . . . . . . . . . . . . . . . . . . . 284, 3958\MT@babelfalse . . . . . . . . . . . . . . . . . . . . . . . . . 291\MT@babeltrue . . . . . . . . . . . . . . . . . . . . . . . . . 291\MT@begin@catcodes 2206, 2207, 2247, 3142, 3158,3192, 3208, 3230, 3251, 3265, 3528, 3973, 3974\MT@cat . . . . . . . . . . . . . . . . . . . . 1347, 2660, 2662


INDEX 232\MT@cfg@catcodes . . . . . . . . . . 857, 1369, 2232, 2249\MT@char . . . . . . . . . . . . . . . . . 1161, 1162, 1172,1173, 1178, 1179, 1182, 1184, 1199, 1200,1203, 1376–1380, 1481, 1482, 1484, 1485,1522–1524, 1553, 1554, 1560, 1561, 1567,1568, 1571, 1572, 1577–1582, 1632, 1633,1639, 1640, 1643, 1644, 1649–1653, 2163,2369, 2385, 2393, 2395, 2405, 2407, 2415,2416, 2424, 2425, 2430, 2432, 2438, 2440,2443, 2447, 2451, 2455, 2567, 2570, 2572,2616, 2619, 2622, 2624, 3578–3580, 3585–3587\MT@char@ . . . . . . . . . . . . . . . . . . . . . . . . . 1205,1206, 1209, 1244, 2369, 2375, 2380, 2385,2433, 2504, 2506, 2512, 2513, 2515, 2528,2529, 2532, 2533, 2536, 2537, 2541, 2543,2571, 2590, 2593, 2596, 2605, 2607, 2620, 2634\MT@charstring . . . . . . . . . . . . . . . 2382, 2570, 2575\MT@charxstring . . . . . . . . . . . . . . . . . . . 2600, 2624\MT@check@active@set . . . . . . . . . . . . . . . . . . . . .. . . . . . . 3984, 4202, 4320, 4352, 4372, 4399\MT@check@font . . . . . . . . . . . . . . . . 915, 2745, 2813\MT@check@font@cx . . . . . . . . . . . . . . . . . 2750, 2813\MT@check@range . . . . . . . . . . . . . . . . . . . 3707, 3709\MT@check@range@ . . . . . . . . . . . . . . . . . . 3709, 3710\MT@check@rlist . . . . . . . . . . . . . . . . . . . 3660, 3700\MT@check@rlist@ . . . . . . . . . . . . . . . . . . 3700, 3701\MT@check@step . . . . . . . . . . . . . . . . . . . . . . . . 4308\MT@checklist@ . . . . . . . . . . . . . . . 1000, 1015, 2149\MT@checklist@family . . . . . . . . . . . . . . . . . . . 1033\MT@checklist@font . . . . . . . . . . . . . . . . . . . . 1077\MT@checklist@size . . . . . . . . . . . . . . . . . . . . 1061\MT@checksetup . . . . . . 4014, 4025, 4032, 4051, 4081\MT@clear@options . . . . . . 161, 274, 726, 3947, 4150\MT@clist@break . . . . . . 569, 1028, 1056, 1072, 1086\MT@clist@function . . . . . . . . . . . . . . . . . . . . . 569\MT@cnt@encoding . . . . . . . . . . . . . 3599, 3607, 3608\MT@cnt@family . . . . . . . . . . . . . . . 3605, 3614, 3615\MT@cnt@series . . . . . . . . . . . . . . . 3612, 3621, 3622\MT@cnt@shape . . . . . . . . . . . . . . . 3619, 3627, 3628\MT@config@file 3962, 3971, 3972, 3976, 3977, 3980\MT@context . . . . . . . . . . . . . 2290, 2302, 2321, 2348\MT@copy@font . . . . . . . . . . . . . . . . . . . . . . 902,937, 3389, 3395, 3407, 3414, 3865, 3867, 4186\MT@copy@font@ . . 937, 3389, 3395, 3407, 3414, 3865\MT@count . . . . . . . . . . . . . . . . . . . . . . 486, 487,675, 1191, 1199, 1201, 1203, 1207, 1209,1212, 1218, 1223, 1224, 1228, 1239, 1270, 1332\MT@curr@file . . . . . . . 2210, 2211, 2220, 2221,3144, 3145, 3363, 3365, 3368, 3550, 3976, 4538\MT@curr@list@name . . . 1237, 1273, 1363, 1491,2160, 2191, 2359, 2629, 2637, 2642, 2650, 2656\MT@curr@ls . . . . . . . . . . . . . . . . . 1751, 1852, 1855\MT@curr@set@name . . . . . . . . . . . . . . . . . . . . . . .2873, 2875–2878, 2880, 2881, 2886, 2891,2895, 2896, 2924, 2928, 2957, 2987, 2993,2999, 3003, 3004, 3245, 3321, 3342, 3357,3376, 3448, 3452, 3459, 3462, 3464, 3470,3473, 3476, 3488, 3501, 3509, 3517, 3551, 3553\MT@declare@char@inh . . . . . . . . . . 3533, 3538, 3548\MT@declare@sets . . . . . . . . . 2856, 2862, 2874, 3165\MT@DeclareSet . . . . . . . . . . . . . . . 2851, 2853, 2870\MT@DeclareSetAndUseIt . . . . . . . . . . . . . 2850, 2869\MT@DeclareVariants . . . . . . . . . . 3110, 3111, 3113\MT@def@bool@opt . . . . . . . . . . . . . . . . . . . 3820,3833, 3834, 3837, 3851, 3863, 3873, 3885\MT@def@n . . . . . . . . . . . . . . . . . . . . 369, 2844, 2845\MT@default@ex@set . . . . . . . . . . . . . . . . . . . . 3095\MT@default@kn@set . . . . . . . . . . . . . . . . . . . . 3095\MT@default@pr@set . . . . . . . . . . . . . . . . . . . . 3095\MT@default@sp@set . . . . . . . . . . . . . . . . . . . . 3095\MT@default@tr@set . . . . . . . . . . . . . . . . . . . . 3095\MT@define@code@key . . . . . . . . . . . . . . . . . . . . .. . 3289, 3349, 3351, 3352, 3560, 3562, 3563\MT@define@code@key@family . . . . . 3300, 3350, 3561\MT@define@code@key@font . . . . . . 3326, 3354, 3565\MT@define@code@key@size . . . . . . 3314, 3353, 3564\MT@define@opt@key . . 3355, 3378–3381, 3513–3515\MT@define@optionX . . . . . . . . . . . 4002, 4060, 4063\MT@define@optionX@ . . . . . . 4071, 4100, 4102, 4103\MT@define@set@key@ . . . . . . . . . . 2884, 3043–3046\MT@define@set@key@font . . . . . . . . . . . . 2991, 3048\MT@define@set@key@size . . . . . . . . . . . . 2917, 3047\MT@detokenize@c . . . . . . . . . . . . . . 410, 2377, 2568\MT@detokenize@n . . . . . . . . . . . . . . . . . . . 410, 2618\MT@dimen@six . . . . . . . . . . . . . . . . . . . . . . . . . .. . 1121, 1192, 1228, 1270, 1936, 1939, 2114\MT@dinfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87\MT@dinfo@list . . . . . . . . . . . . . . . . . . . . . . . . . .1013, 1023, 1026, 1031, 1040, 1043, 1049,1051, 1059, 1067, 1070, 1075, 1085, 1088, 1092\MT@dinfo@nl . . . . . . . . . . . . . . . . . . . . . . . . . . . 87\MT@DisableLigatures . . . . . . . . . . . . . . . . . . . 3155\MT@do@font . . . . 659, 1138, 1455, 1590, 1660, 1744\MT@documentfalse . . . . . . . . . . . . . . . . . . . . . . 323\MT@documenttrue . . . . . . . . . . . . . . . . . . . 323, 4482\MT@dofalse . . . . 992, 1004, 1027, 1044, 1071, 1089\MT@dotrue . . 992, 995, 1024, 1041, 1050, 1068, 2144\MT@draftfalse . . . . . . . . . . . . . . . . . . . . . 287, 3887\MT@drafttrue . . . . . . . . . . . . . . . . . . . . . 287, 3889\MT@edef@n . . . . . . . . . . . 371, 2326, 2352, 2838,3295, 3309, 3365, 3368, 3371, 3549, 3687, 3919\MT@encoding . . . . . 970, 1081, 1102, 1104, 1107,2285, 2297, 2377, 2568, 2617, 2641, 2648, 2656\MT@end@catcodes . . . . . . . . . . 2208, 2251, 3150,3167, 3203, 3227, 3246, 3262, 3276, 3543, 3975\MT@endinput . . . . . . . . . . . . . . . . . 165, 3942, 3951\MT@engine . . . . . . . . . . . . . . . . . . . . . . . . . 173,255, 259, 265, 271, 2045, 2049, 3943, 3949\MT@engine@tooold . . . . . . . . . . . . . . . . . . . 173, 256\MT@error . . . . . . . . . . . . . . . . . . . . . . . 76, 718,805, 2045, 2056, 2183, 2196, 2955, 3074,3101, 3173, 3398, 3424, 3431, 3875, 4037,4055, 4089, 4257, 4270, 4339, 4410, 4423, 4499\MT@error@doesnt@work . . . . . . . . . . . . . . . . . . 4406\MT@ex@c@name . . . . . . . . . . . . . . . . . . . . . 1424,1426, 1497, 1498, 1508, 1514, 1515, 1527, 3211\MT@ex@context . . . . . . . . . . . . . . . . 941, 2805, 2843\MT@ex@doc@contexts . . . . . . . . . . . . . . . . . . . 2843\MT@ex@factor . . . . . . . . . . . . . . . . 292, 1443, 1501\MT@ex@factor@ . 1443, 1457, 1461, 1471, 1472, 1495\MT@ex@inh@name . . . . . . . . . . . . . . . . . . . 1483–1485\MT@ex@level . . . . . . . . . . . . . . . . . 292, 4303, 4305\MT@ex@max . . . . . . . . . . . . . . . . . . . 304, 1474, 1475\MT@ex@min . . . . . . . . . . . . . . . . . . . 304, 1477, 1478\MT@ex@setname . . . . . . . . . . . . . . . . . . . . . . . . 3066\MT@ex@split@val . . . . . . . . . . . . . . . . . . . . . . 1469\MT@exp@cs . . . . . . . 366, 369, 372, 375, 378, 952,954, 963, 1065, 1183, 1257, 1260, 1290,1294, 1304, 1307, 1310, 1485, 1572, 1644,


INDEX 2331792–1794, 2313, 2768, 2776, 2777, 2781,2824, 2835, 2923, 3320, 3340, 3587, 3662, 3705\MT@exp@gcs . . . . . . . . . . . . . 366, 370, 374, 376, 379\MT@exp@one@n . . . . . . . . . . . . . . . 381, 415, 576,714, 906, 908, 964, 1019, 1082, 1687, 2215,2745, 2747, 2753, 2765, 2787, 2821, 2832,2843, 2862, 3042, 3059, 3088, 3137, 3538, 4487\MT@exp@two@c . . . . . . . . . . . . . . . 383, 401, 406,416, 611, 905, 945, 947, 949, 958, 1829,1864, 1867, 1870, 2376, 2381, 2569, 2622, 2623\MT@exp@two@n . . . . . . . 385, 1037, 1046, 2890, 2998\MT@expandfont . . . . . . . . . . . . . . . 1428, 1446, 1450\MT@expansion . . . . . . . . . . . . . . . . 921, 1415, 4330\MT@expansionfalse . . . . . . . . . . . . 283, 4213, 4297\MT@expansiontrue . . . . . . . . . . . . . . . . . . 283, 3957\MT@extra@context . . . . . . . . . 2843, 3195, 3211,3234, 3254, 3268, 3335, 3338, 3339, 3341,3382, 3390, 3396, 3408, 3413, 3524, 3659,3663, 3666, 3669, 3672, 3676, 3677, 3679, 3706\MT@extra@inputenc . . . . . . . 3522, 3547, 3552, 3553\MT@factor@default . . . . . . . . . . . . 316, 3926, 4199\MT@family . . . . . . . . . . . . . . . . . . . . . 906, 970,1038, 1081, 1102, 1104, 1107, 2286, 3129, 3130\MT@familyalias . . . . . . . . . . . . . . . . . . . . . . . . .. 907, 908, 981, 1045, 1047, 2296, 2298, 3131\MT@feat . . . . . . . . . 992, 1126, 1164, 1252, 1254,1256, 1257, 1259, 1260, 1266, 1268, 1271,1279–1283, 1285, 1287–1291, 1294, 1295,1300, 1304, 1307, 1310, 1313–1315, 1324,1325, 1330, 1348, 1833, 2181, 2183, 2186,2187, 2191, 2193, 2196, 2322, 2324, 2326,2330, 2334, 2338, 2339, 2342, 2350, 2352,2353, 2355, 2362, 2366, 2630, 2631, 2660, 2662\MT@features . . . . . . . . . . . . . . . . . . . . . . . . . . .711, 2843, 2856, 3042, 3053, 3082, 3360, 3533\MT@features@long . . . . . . 711, 714, 719, 2818, 3545\MT@file@list . . . . . . . . . . . . . . . . . . . . . 2202,2204, 2212, 2215, 2217, 2222, 2225, 3137, 3141\MT@find@file . . . . . . . . . . . . . . . . . 906, 908, 2202\MT@fix@catcode . . . . . . . . . . . . . . . . . . . . . . . . . . 5\MT@fix@font@set . . . . . . . . . . . . . . . . . . 2909, 4170\MT@font . . . . . . . . . . . . . . . . . . . . 380, 671, 787,817, 905, 958, 965, 1122, 1129, 1136, 1137,1172, 1173, 1178, 1179, 1199, 1200, 1203,1206, 1209, 1234, 1239, 1244, 1338, 1341,1376, 1377, 1379, 1380, 1451, 1455, 1481,1482, 1522, 1524, 1553, 1554, 1560, 1561,1567, 1568, 1577–1579, 1581, 1582, 1587–1589, 1632, 1633, 1639, 1640, 1649, 1650,1652, 1653, 1658, 1659, 1687, 1691, 1749,1750, 2153, 2392, 2446, 2664, 2716–2718,2720, 2733, 2734, 2745, 2746, 2753, 2779, 2788\MT@font@copy . . . . . . . 941, 942, 949, 950, 958–960\MT@font@list . . . . . . . . . . . 2664, 2745–2748, 2812\MT@font@orig . . . . . . . . . . . . . . . . . . . . . . . . . 942\MT@font@sets . . . . . . . . . . . 2894, 2909, 3002, 4170\MT@fontspecfalse . . . . . . . . . . . . . . . . . . . . . . 783\MT@fontspectrue . . . . . . . . . . . . . . . . 783, 785, 814\MT@gdef@n . . . . . . . . . . . . . . . . 369, 3186, 3202,3226, 3261, 3275, 3464, 3488, 3501, 3555, 3992\MT@get@axis . . . . . . . . . . . . . . . . 3016–3019, 3029\MT@get@basefamily . . . . . . . . . . . . . . . . 2214, 2252\MT@get@basefamily@ . . . . . . . . . . . . . . . 2258, 2261\MT@get@char@unit . . . . . . . . 1163, 1302, 1328, 1420\MT@get@charwd . . . . . . . . . . . 1197, 1228, 1305, 1328\MT@get@config . . . . . . . . . . . . . . . . . . . . . . . . 3962\MT@get@ex@opt . . . . . . . . . . . . . . . 1419, 1437, 1495\MT@get@ex@opt@ . . . . . . . . . . 1503–1505, 1507, 1513\MT@get@font . . . . . . . . . . . . . . . . . . . . . 2997, 3007\MT@get@font@ . . . . . . . . . . . . . . . 3008, 3013, 3347\MT@get@font@and@size . . . . . . . . . . . . . . 3331, 3346\MT@get@font@dimen . . . . . . . . . . . . . . . . 1232, 1308\MT@get@font@dimen@six 1110, 1121, 1537, 1616, 1703\MT@get@highlevel . . . 2889, 2899, 3031, 3294, 3305\MT@get@inh@list . . . . 1113, 1422, 1540, 1619, 2348\MT@get@listname . . . . . . . . . . . . . 2267, 2324, 2350\MT@get@listname@ . . . . . . . . . . . . . . . . . . . . . 2267\MT@get@ls@basefont . . . . . . . . . . 1718, 1854, 1861\MT@get@opt . . . . . . . . . . . . . 1111, 1277, 1538, 1617\MT@get@range . . . . . . . . . . . . . . . 2921, 2931, 3318\MT@get@size . . . . . . . 2938, 2943, 2952, 2971, 3027\MT@get@slot . . . . . . . 1160, 2162, 2369, 3577, 3584\MT@get@slot@ . . . . . . . . . . . . . . . . . . . . 2386, 2390\MT@get@space@unit . . . . . . . . . . . . . . . . . . . . . .. . 1302, 1404, 1551, 1558, 1565, 1630, 1637\MT@get@tr@opt . . . . . . . . . . . . . . . . . . . . 1705, 1799\MT@get@tr@opt@ . . . . . . . . . . . . . . 1817–1820, 1822\MT@get@unit . . . . . . . . . . . . . . . . 1310, 1318, 1810\MT@get@unit@ . . . . . . . . . . . . . . . . . . . . . . . . 1318\MT@getkey . . . . . . . . . . . . . . . . . . . . . . . 4137, 4152\MT@glet . . . . . . . . . . 364, 376, 945, 1793, 1864,1895, 2050, 2058, 2714, 2813–2816, 3131,3389, 3407, 3602, 3865, 3867, 4451, 4456, 4542\MT@glet@nc . . . . . . 375, 1107, 1908, 2105, 2362,2734, 2812, 2878, 2880, 2886, 2993, 3219,3448, 3452, 3459, 3462, 3470, 3473, 3476, 3509\MT@glet@nn . . . . . . . . . . . . . . . . . . 378, 2831, 3989\MT@if@false . . . . . . . . . . . . . . . . . . . . . . . 281,788, 795, 819, 836, 2758, 3704, 4518, 4525\MT@if@list@exists . . . . . . . . . . . . . . . . . . . . . .. . 1100, 1418, 1436, 1536, 1615, 1704, 2321\MT@if@outer@next . . . . . . . . . . . . . . . . . . . . . . .. . . 1985, 2000, 2004, 2007, 2012, 2017–2020\MT@if@true . . . . . . . . . . . . . . . . . . . . . . . . 281,789–791, 796–798, 820–822, 849, 853, 854,2751, 3713, 3717, 3725, 3730, 4519–4523, 4526\MT@ifdefined@c@T . . . . . . . . . . . . . . . . . . . 389,792, 825, 1181, 1217, 1483, 1570, 1642,1737, 2556, 3129, 3552, 3649, 3998, 4001, 4545\MT@ifdefined@c@TF . . . . . . . . . . . . . . . . . . . . . .. . . . . . 389, 748, 1708, 1721, 1724, 1735,1852, 1933, 2111, 2157, 2158, 2325, 2351, 3658\MT@ifdefined@n@T . . . . . . . . . . . . . . . . . . . . . . .. 389, 737, 1016, 1034, 1062, 1078, 1182,1313, 1349, 1484, 1508, 1571, 1643, 1802,1804, 1823, 2304, 2659, 2876, 3124, 3214,3372, 3608, 3615, 3622, 3628, 3659, 3669, 4137\MT@ifdefined@n@TF . . . . . . . . . . . . . . . . . . . . . .. . . . . . 389, 981, 998, 1017, 1035, 1063,1079, 1102, 1279, 1287, 1497, 1514, 1791,2147, 2186, 2292, 2377, 3068, 3071, 3097,3363, 3635, 3686, 3695, 3761, 3985, 3988, 4485\MT@ifdim . . 509, 631, 632, 636, 637, 2954, 2963,3711–3713, 3715, 3716, 3723–3725, 3728, 3729\MT@ifdimen . . . . 471, 2982, 3451, 3461, 3475, 3935\MT@ifempty . . . . . . 422, 1136, 1137, 1170, 1176,1393, 1394, 1550, 1557, 1564, 1587–1589,1601–1603, 1605–1607, 1629, 1636, 1658,1659, 1675, 1676, 1914, 1915, 1925, 1943,2080, 2103, 2104, 2116, 2823, 2855, 2860,


INDEX 2342901, 2907, 2932, 2933, 2946, 2947, 3021,3032, 3052, 3057, 3081, 3086, 3162, 3241,3356, 3362, 3382, 3388, 3396, 3406, 3413,3486, 3532, 3537, 3774, 3805, 3965, 4011, 4078\MT@ifint . . . . . . 435, 2535, 3242, 3487, 3918, 3928\MT@ifstreq . 518, 1355, 2182, 2323, 2338, 2591,2594, 2606, 2786, 2996, 3330, 3450, 3472,3474, 3650, 3777, 3779, 3782, 3785, 3807,3809, 3823, 3824, 3895, 3896, 3901, 3905,3934, 4013, 4020, 4024, 4031, 4080, 4086, 4382\MT@in@clist . . . . . . . . . . . . . . . . . . . . . . . 597,714, 738, 1019, 1037, 1046, 1082, 1687,2204, 2215, 2745, 2747, 2753, 2765, 2821, 3137\MT@in@rlist . . . . . . . . . . . . . . . . . 625, 1065, 2313\MT@in@rlist@ . . . . . . . . . . . . . . . . . . . . . . . . . 625\MT@in@rlist@@ . . . . . . . . . . . . . . . . . . . . . . . . . 625\MT@in@tlist . . . . . . . . . . . . . . . . . 613, 2264, 2832\MT@in@tlist@ . . . . . . . . . . . . . . . . . . . . . . . . . 613\MT@inannotfalse . . . . . . . . . . . . . . . . . . . . . . . 100\MT@inannottrue . . . . . . . . . . . . . . . . . . . . . . . . 100\MT@increment . . . . . . . 675, 3607, 3614, 3621, 3627\MT@info . . . . . . . . . . . . 76, 91, 96, 3902, 4121, 4125\MT@info@missing@char . . . . . . . . . 1212, 1242, 2442\MT@info@nl . . . . . . . . 76, 92, 93, 97, 749, 1103,1243, 3893, 3903, 3972, 3986, 3990, 4182,4186, 4198, 4205, 4304, 4331, 4351, 4356,4365, 4375, 4398, 4402, 4415, 4430, 4495, 4506\MT@inh@do . . . . . . . . . . . . . . . . . . . . . . . 2361, 3566\MT@inh@feat . . . . . . . . . . . . 3522, 3532, 3535, 3546\MT@inh@split . . . . . . . . . . . . . . . . . . . . 3568, 3572\MT@inlist@false . . . . . . . . 597, 601, 614, 626, 2761\MT@inlist@true . . . . . 597, 603, 621, 633, 638, 2761\MT@is@active . . . . . . . . . . . . . . . . . . . . 2376, 2548\MT@is@char . . . . . . . . . . . . . . . . . 2381, 2569, 2575\MT@is@charx . . . . . . . . . . . . . . . . 2584, 2600, 2623\MT@is@composite . . . . . . . . . . . . . . . . . . 2379, 2614\MT@is@feature . . . . . . . . . . . . 713, 2861, 3058, 3087\MT@is@letter . . . . . . . . . . . 2374, 2492, 2572, 2619\MT@is@number . . . . . . . . . . . . . . . . . . . . 2518, 2523\MT@is@symbol . . . . . . . . . . . . . . . . . . . . 2378, 2566\MT@iterate . . . . . . . . . . . . . . . . . . . . . . . . . . . 647\MT@kerning . . . . . . . . . . . . . . . . . . 925, 1612, 4401\MT@kerningfalse . . . . . . . . . . . . . . . . . . . . . . . 289\MT@kerningtrue . . . . . . . . . . . . . . . . . . . . . . . . 289\MT@kn@c@name . . . . . . . . . . . 1621, 1623, 1666, 3268\MT@kn@context . . . . . . . . . . . . . . . . . . . . 2806, 2843\MT@kn@doc@contexts . . . . . . . . . . . . . . . . . . . 2843\MT@kn@factor . . . . . . . . . . . . . . . . . . . . . . . . . 292\MT@kn@factor@ . . . . . . . . . . . . . . . . . . . . . . . . 1279\MT@kn@inh@name . . . . . . . . . . . . . . . . . . . 1642–1644\MT@kn@max . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304\MT@kn@min . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304\MT@kn@setname . . . . . . . . . . . . . . . . . . . . . . . . 3066\MT@kn@split@val . . . . . . . . . . . . . . . . . . . . . . 1627\MT@kn@unit . . . . . . . . . . . . . . . . . . . . . . . . . . . 298\MT@kn@unit@ . . . . . . . . . . . . . . . . . . . . . 1287, 1669\MT@led@unhbox@line . . . . . . . . . . . . . . . . . . . . 749\MT@ledmac@setup . . . . . . . . . . . . . . . . 743, 811, 812\MT@let@cn . . . . . 377, 378, 379, 982, 1117, 1426,1498, 1544, 1623, 1803, 1805, 1809, 2181,2193, 2318, 2322, 2355, 2716, 2975, 3376, 3551\MT@let@nc . . 375, 1315, 2026, 2334, 2366, 2756,3688, 3693, 3783, 3786, 4027, 4034, 4413, 4428\MT@let@nn . . . . . . . . . . . . . . . . . . . . . . . . . . . . .378, 1280, 1285, 1288, 1300, 1515, 1518, 1824\MT@letterspace . . . . . . . . . . . . . . . . . . . . . . . . .. . . 319, 1708, 1803, 1813, 4459, 4460, 4462\MT@letterspace@ . . . . . . . . . . . . . . . . . . . . . . . .. . . . 1147, 1217, 1218, 1708, 1709, 1712,1715, 1719, 1723, 1731, 1743–1745, 1751,1760, 1939, 1943, 2066, 2081–2084, 2117, 2120\MT@letterspace@default . . . . . . . . . . . . . 319, 4460\MT@listname . . . . . . . . . . . . . . . . . . . . . . . . . . .2267, 2315, 2318, 2325, 2326, 2328, 2330,2351, 2352, 2354, 2355, 2359, 2362, 3587, 3592\MT@listname@count . . . . . . . . . . . 3359, 3364, 3366\MT@load@inputenc . . . . . . . . . . . . 1356, 1359, 1368\MT@load@list . . . . . . 1115, 1424, 1542, 1621, 2178\MT@loop . . . . . . . . . . . . . . . . . . 647, 655, 669, 3692\MT@lower . . . . . . . . . . . . . . . . . . . 2925, 2931, 3321\MT@ls@adjust . . . . . . . . . . . . . . . . . . . . 1758, 2077\MT@ls@adjust@ . . . . . . . . . . . . . . . . . . . . 2061, 2085\MT@ls@adjust@empty . . . . . . . . . . . . . . . 2063, 2077\MT@ls@adjust@relax . . . . . . . . . . . . . . . 2064, 2077\MT@ls@basefont . . . . . . . . . . 1861, 1870, 1873, 1874\MT@ls@outer@k . . . . . . . . . . . . . . . . . . . . . 1761,1766, 1774, 1956, 1970, 2023, 2040, 2125\MT@ls@set@ls . . . . . . . . . . . . . . . 2068, 2071, 2077\MT@ls@too@large . . . . . . . . . . . . . 2084, 2087, 4462\MT@lsfont . . . . . . . . . . . . . . . . . . . 1714, 1719,1731, 1732, 1741, 1744, 1745, 1749, 1829,1839, 1884, 1886, 1901, 1902, 1909, 1910,1916, 1920, 1927, 1937, 1941, 1944, 2118, 2121\MT@lslig . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1851\MT@lua . . . . . . . . . . . . . . . 242, 459, 496, 541, 2397\MT@luatex@no . . . . . . . . . . . . . . . . . . . . . . 240, 332\MT@map@clist@ . . . . . . . . . . . . . . . . . . . . . . . . . 569\MT@map@clist@c . . . . . . . . 569, 951, 2161, 2752,2764, 2775, 2811, 2818, 2856, 2858, 3053,3055, 3082, 3084, 3360, 3533, 3535, 3545, 4135\MT@map@clist@n . . . . . . . . . . . . . 569, 997, 2146,2843, 2887, 2919, 2994, 3042, 3114, 3184,3292, 3303, 3316, 3328, 3468, 3484, 3581,3769, 3772, 3801, 3803, 3832, 3913, 4009, 4076\MT@map@tlist@ . . . . . . . . . . . . . . . . . . . . . . . . . 587\MT@map@tlist@c . . . . . 587, 616, 627, 954, 1183,1485, 1572, 1644, 2271, 2781, 3660, 3705, 4170\MT@map@tlist@n . . . . . . . . . . . 587, 2243, 2577, 3601\MT@max@char . . . . . . . . . . . . . . . . . . . . . 2492, 2515\MT@max@slot . . . . . . . . . . . . . . . . . 663, 2492, 2541\MT@maybe@do . . . 992, 1097, 1416, 1534, 1613, 1689\MT@maybe@etex . . . . . . . . . . . . . . . . . . . . . . . . . 149\MT@maybe@rem@from@list . . . . . . . . . . . . 2781, 2785\MT@MT . . . . . . . . . . . . . . . . . . . 2, 76, 79, 82, 84,86, 91, 92, 94, 95, 270, 725, 806, 808, 3398,3945, 3966, 4121, 4125, 4183, 4386, 4499, 4500\MT@next@listname . . . . . . . . . . . . . . . . . 2274, 2283\MT@next@listname@ . . . . . . . . . . . 2293, 2305, 2311\MT@nl@ligatures . . . . . . . . . . . . . . . . . . 2153, 3155\MT@nl@setname . . . . . . . . . . . . . . . . . . . . 2145, 3155\MT@nofamilyfalse . . . . . . . . . . . . . . . . . 1094, 1099\MT@nofamilytrue . . . . . . . . . . . . . . . . . . 1094, 2284\MT@noligatures . . . . . . . . . . . . . . . 929, 2141, 4471\MT@noligatures@ . . . . . . . . . 1884, 1886, 2153, 2156\MT@noligaturesfalse . . . . . . . . . . . . . . . . . . . . 286\MT@noligaturestrue . . . . . . . . . . . . . . . . 286, 3164\MT@nonselectedfalse . . . . . . . . . . . . . . . 1432, 1447\MT@nonselectedtrue . . . . . . . . . . . . . . . 1432, 1435\MT@norestfalse . . . . . . . . . . . . . . . . . . . . . . . . .. . 2501, 2508, 2517, 2538, 2591, 2594, 2606


INDEX 235\MT@noresttrue . . . . . . . . . . . . . . . 2372, 2501, 2526\MT@old@cmd . . . . . . . . . . . . . . . . . . . . . . . 66, 71–74\MT@opt@autofalse . . . . . . . . . . . . . . . . . . . . . 3744\MT@opt@autotrue . . . . . . . . . . . . . . . . . . 3744, 3834\MT@opt@def@set . . . . . . . . . . . . . . 3760, 3788, 3813\MT@opt@DVIfalse . . . . . . . . . . . . . . . . . . . . . . 3745\MT@opt@DVItrue . . . . . . . . . . . . . . 3745, 3840, 3843\MT@opt@expansionfalse . . . . . . . . . . . . . . . . . 3743\MT@opt@expansiontrue . . . . . . . . . . . . . . . . . . 3743\MT@options . . . . . . . . . . . . . . . . . . . . . . . . . . 3279\MT@optwarn@admissible . . . . . . . . 3746, 3825, 3905\MT@optwarn@nan . . . . . . . . . . . . . . 3750, 3920, 3930\MT@orig@add@accent . . . . . . . . . . . . . . . . . . . 2735\MT@orig@foreign@language . . . . . . . . . . 4512, 4514\MT@orig@pickupfont . . . . 842, 885, 890, 2670, 2737\MT@orig@py@macron . . . . . . . . . . . . . . 882, 886, 891\MT@orig@select@language . . . . . . . . . . . 4507, 4509\MT@outer@kern 1760, 1764, 1766, 1767, 1771, 1779,1855, 1856, 1858, 2023, 2024, 2040, 2098, 2137\MT@outer@space . . . . . . . . . . . . . . . . . . . . . . . . .1754, 1755, 1899, 1952, 1954, 1955, 1968,1969, 1992, 1993, 2008, 2009, 2013, 2014, 2038\MT@pdf@annot . . . . . . . . . . . . . . . . . . . . . . . . . . 99\MT@pdf@or@lua . . . . . . . . . . . . . . 178, 183, 268, 438\MT@pdftex@no . . . . . . . . . . . . . . . . . . . . . . 199, 331\MT@permute 3201, 3225, 3239, 3260, 3274, 3558, 3597\MT@permute@ . . . . . . . . . . . . . . . . . . . . . . . . . 3597\MT@permute@@ . . . . . . . . . . . . . . . . . . . . . . . . 3597\MT@permute@@@ . . . . . . . . . . . . . . . . . . . . . . . . 3597\MT@permute@@@@ . . . . . . . . . . . . . . . . . . . . . . . 3597\MT@permute@@@@@ . . . . . . . . . . . . . . . . . . 3626, 3631\MT@permute@@@@@@ . . . . . . . . . . . . . . . . . 3639, 3641\MT@permute@define . . . . . . . 3632, 3642–3644, 3684\MT@permute@reset . . . . . . . . . . . . . . . . . 3601, 3690\MT@permutelist . . . . . . . . . . . . . . . . . . . . . . . . .. . . . 3195, 3211, 3237, 3254, 3268, 3335,3336, 3341, 3556, 3654, 3655, 3659, 3663,3666, 3669–3672, 3679, 3680, 3706, 3737, 3738\MT@pickupfont . . . . . . . . . . . . 887, 892, 2731, 2739\MT@plain . . . . . . . . . . . . . . . . . . . . . . . . . . 125, 146\MT@pr@c@name . . . . . . . . . . . 1115, 1117, 1384, 3195\MT@pr@context . . . . . . . . . . . . . . . . 941, 2805, 2843\MT@pr@doc@contexts . . . . . . . . . . . . . . . . . . . 2843\MT@pr@factor . . . . . . . . . . . . 292, 3929, 4199, 4200\MT@pr@factor@ . . . . . . . . . . . . . . . . . . . . . . . . 1279\MT@pr@inh@name . . . . . . . . . . . . . . 1181, 1182, 1184\MT@pr@level . . . . . . . . . . . . . . . . . 292, 4197, 4198\MT@pr@max . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304\MT@pr@min . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304\MT@pr@setname . . . . . . . . . . . . . . . . . . . . . . . . 3066\MT@pr@split@val . . . . . . . . . . . . . . . . . . . . . . 1168\MT@pr@unit . . . . . . . . . . . . . . . . . . 298, 3936, 4201\MT@pr@unit@ . . . . . . . . . . . . . . . . . . . . . 1287, 1387\MT@preset@aux . . . . . . . . . . . . . . . . . . . . . 1389,1391, 1393, 1394, 1397, 1671, 1673, 1675, 1676\MT@preset@aux@factor 1389, 1397, 1601–1603, 1671\MT@preset@aux@space . 1391, 1397, 1605–1607, 1673\MT@preset@ex . . . . . . . . . . . . . . . . . . . . 1509, 1526\MT@preset@kn . . . . . . . . . . . . . . . . . . . . . . . . 1664\MT@preset@kn@ . . . . . . . . . . . . . . . . . . . . . . . . 1664\MT@preset@pr . . . . . . . . . . . . . . . . . . . . . . . . 1382\MT@preset@pr@ . . . . . . . . . . . . . . . . . . . . . . . . 1382\MT@preset@sp . . . . . . . . . . . . . . . . . . . . . . . . 1594\MT@preset@sp@ . . . . . . . . . . . . . . . . . . . . . . . . 1594\MT@ProcessOptionsWithKV . . . . . . . . . . . 4129, 4153\MT@protrudechars . . . . . . . . 4060, 4064, 4197, 4353\MT@protrusion . . . . . . . . . . . . . . . . 920, 1096, 4204\MT@protrusionfalse . . . . . . . . . . . . . . . . 282, 1787\MT@protrusiontrue . . . . . . . . . . . . . . . . . 282, 3952\MT@rbba@expansion . . . . . . . . . . . . . . . . . . . . . 706\MT@rbba@kerning . . . . . . . . . . . . . . . . . . . . . . . 706\MT@rbba@protrusion . . . . . . . . . . . . . . . . . . . . 706\MT@rbba@spacing . . . . . . . . . . . . . . . . . . . . . . . 706\MT@rbba@tracking . . . . . . . . . . . . . . . . . . . . . . 706\MT@register@font . . . . . . . . . . . . . 933, 2746, 2814\MT@register@font@cx . . . . . . . . . . . . . . . 2774, 2814\MT@register@subst@font . . . . . . . 2722, 2747, 2815\MT@register@subst@font@cx . . . . . . . . . . 2763, 2815\MT@rem@from@clist . . . . . . . . 608, 964, 2787, 3284\MT@rem@from@list . . . . . . . . . . . . . . . . . . . 954, 962\MT@rem@last@space . . . . . . . . . . . . . . . . . . . . . 410\MT@repeat . . . . . . . . . . . . . . . . 647, 657, 671, 3698\MT@requires@latex . . . . . . . 145, 162, 729, 838,869, 1828, 2668, 3752, 3912, 4130, 4134, 4541\MT@requires@luatex 326, 912, 1145, 1683, 4073, 4347\MT@requires@pdftex . . . . . . . . . . . . . . . . . 326,437, 472, 519, 744, 901, 911, 924, 928,939, 1144, 1189, 1215, 1459, 1533, 1612,1682, 1881, 2142, 3156, 3386, 3500, 3508,3862, 3956, 4072, 4224, 4254, 4282, 4346, 4469\MT@res@a . . . 531, 533, 599, 606, 609, 611, 615, 620\MT@res@b . . . . . . . . . . . 532, 533, 609–611, 619, 620\MT@reset@context . . . . . . . . 2795, 2799, 2803, 2830\MT@reset@context@ . . . . . . . . . . . . . . . . 2803, 2830\MT@reset@ef@codes . . . . . . . 1421, 1445, 1458, 1510\MT@reset@ef@codes@ . . . . . . . . . . 1453, 1462, 1467\MT@reset@kn@codes . . . . . . . . . . . 1618, 1625, 1655\MT@reset@kn@codes@ . . . . . . . . . . . . . . . . . . . 1655\MT@reset@pr@codes . . . . . . . . . . . 1112, 1119, 1140\MT@reset@pr@codes@ . . . . . . . . . . . . . . . . . . . 1140\MT@reset@sp@codes . . . . . . . . . . . 1539, 1546, 1584\MT@reset@sp@codes@ . . . . . . . . . . . . . . . . . . . 1584\MT@restore@catcodes . . . . . . . . . . 5, 7, 8, 163, 4547\MT@restore@p@h . . . . . . . . . . . . . . . . . 779, 799, 855\MT@saved@setupfont . . . . . . . . . . . . . . . 4118, 4126\MT@scale . . . . . . 682, 1192, 1253, 1267, 1270, 1472\MT@scale@factor . . . . 1194, 1225, 1251, 1399, 1528\MT@scale@to@em . . 1171, 1177, 1189, 1222, 1405,1552, 1559, 1566, 1631, 1638, 1812, 1934, 2112\MT@scrubfeature . . . . . . . . . . . . . . . 974, 985, 3307\MT@scrubfeatures . . . . . . . . . . . . . 985, 2913, 3333\MT@selectedfalse . . . . . . . . . . . . . . . . . . . . . . 285\MT@selectedtrue . . . . . . . . . . . . . . . . . . . . . . . 285\MT@series . . . . . . . . . . . . . . . 970, 1081, 2287, 2299\MT@set@all@ex . . . . . . . . . . . . . . . . . . . . 1453, 1529\MT@set@all@kn . . . . . . . . . . . . . . . . . . . . 1655, 1677\MT@set@all@pr . . . . . . . . . . . . . . . 1133, 1140, 1395\MT@set@all@sp . . . . . . . . . . . . . . . . . . . . 1584, 1609\MT@set@babel@context . . . . . 4484, 4510, 4515, 4529\MT@set@codes . 1118, 1151, 1427, 1545, 1624, 2194\MT@set@curr@ls . . . . . . . . . . . . . . . . . . . . . . . 1751\MT@set@curr@ok 1771, 1773, 1779, 1782, 1997, 2001\MT@set@curr@os . . . . . . . . . . 1753, 1781, 1997, 2001\MT@set@default@set . . . . . . . . . . 3082, 3088, 3095\MT@set@ex@codes . . . . . . . . . . . . . 1449, 4288, 4290\MT@set@ex@codes@n . . . . . . . . . . . 1432, 1449, 4290\MT@set@ex@codes@s . . . . . . . . . . . . . . . . 1417, 4288\MT@set@ex@heirs . . . . . . . . . . . . . . . . . . 1485, 1521\MT@set@inh@list . . . . . . . . . . . . . . . . . . 3529, 3531\MT@set@inputenc 1114, 1346, 1423, 1541, 1620, 2360


INDEX 236\MT@set@inputenc@ . . . . . . . . . . . . . . . . . 1349, 1351\MT@set@kn@codes . . . . . . . . . . . . . . . . . . . . . . 1614\MT@set@kn@heirs . . . . . . . . . . . . . . . . . . 1644, 1648\MT@set@listname . . . . . . . . . . . . . . . . . . . 1116,1278, 1425, 1496, 1543, 1622, 1801, 2629\MT@set@lsbasefont . . . . . . . . . . . . . . . . . . . . 1870\MT@set@lsfont . . . . . . . . . . . . . . . 1748, 1827, 1839\MT@set@named@keys 3197, 3213, 3235, 3256, 3270, 3279\MT@set@pr@codes . . . . . . . . . . . . . . . . . . . . . . 1098\MT@set@pr@heirs . . . . . . . . . . . . . . . . . . 1185, 1374\MT@set@sp@codes . . . . . . . . . . . . . . . . . . . . . . 1535\MT@set@sp@heirs . . . . . . . . . . . . . . . . . . 1572, 1576\MT@set@tr@codes . . . . . . . . . . . . . 1699, 1834, 1844\MT@set@tr@zero . . . . . . . . . . . . . . 1710, 1870, 4100\MT@SetExpansion . . . . . . . . . . . . . . . . . . 3209, 3211\MT@SetExtraKerning . . . . . . . . . . . . . . . 3266, 3268\MT@SetExtraSpacing . . . . . . . . . . . . . . . 3252, 3254\MT@SetProtrusion . . . . . . . . . . . . . . . . . 3193, 3195\MT@SetTracking . . . . . . . . . . . . . . . . . . . 3231, 3233\MT@setup@ . . . . . . . . . . . 727, 731, 3854, 3855, 4542\MT@setup@contexts . . . . . . . . . . . . . . . . 2794, 2810\MT@setup@copies . . . . . . . . . . . . . . . . . . 4169, 4185\MT@setup@expansion . . . . . . . . . . . . . . . 4172, 4209\MT@setup@kerning . . . . . . . . . . . . 4176, 4393, 4436\MT@setup@noligatures . . . . . . . . . . . . . . 4177, 4467\MT@setup@PDF . . . . . . . . . . . . . . . 4168, 4180, 4190\MT@setup@protrusion . . . . . . . . . . . . . . . 4171, 4193\MT@setup@spacing . . . . . . . . . . . . 4175, 4360, 4437\MT@setup@spacing@check . . . . . . . 4378, 4545, 4546\MT@setup@tracking . . . . . . . 4173, 4345, 4408, 4435\MT@setup@warntracking . . . . . . . . . . . . . 4174, 4440\MT@setupfont . . 899, 2725, 4119, 4122, 4126, 4162\MT@setupfont@hook . . . . . . . . . . . . . . . . . . . . . .. . . . . 786, 815, 817, 824, 829, 855, 862, 900\MT@shape . . . . . . . . . . . . . . . . 970, 1081, 2288, 2300\MT@shorthandoff . . . . . . . . . . . . . 4493, 4524, 4527\MT@show@pdfannot . . . . . . . . . . . . . . . . . . . . . . 106\MT@shrink . . . . . . . . . . . . . . . . . . . . 301, 1440,4220, 4221, 4228, 4229, 4232, 4236, 4293, 4306\MT@shrink@ . . . . . . . . . . . . . . . . . 1440, 1451, 1495\MT@shrink@default . . . . . . . . . . . . . . . . . . . . . 317\MT@size . . . . . . . . . . . . . . . 632, 636, 637, 970, 1081\MT@size@name . . . . . . . . . . . . . . . . . . . . . 625, 2315\MT@sp@c@name . . . . . . . . . . . 1542, 1544, 1596, 3254\MT@sp@context . . . . . . . . . . . . . . . 2806, 2843, 4382\MT@sp@doc@contexts . . . . . . . . . . . . . . . . . . . 2843\MT@sp@factor . . . . . . . . . . . . . . . . . . . . . . . . . 292\MT@sp@factor@ . . . . . . . . . . . . . . . . . . . . . . . . 1279\MT@sp@inh@name . . . . . . . . . . . . . . . . . . . 1570–1572\MT@sp@max . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304\MT@sp@min . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304\MT@sp@setname . . . . . . . . . . . . . . . . . . . . . . . . 3066\MT@sp@split@val . . . . . . . . . . . . . . . . . . . . . . 1548\MT@sp@unit . . . . . . . . . . . . . . . . . . . . . . . . . . . 298\MT@sp@unit@ . . . . . . . . . . . . . . . . . . . . . 1287, 1599\MT@spacing . . . . . . . . . . . . . . . . . . 925, 1532, 4374\MT@spacingfalse . . . . . . . . . . . . . . . . . . . . . . . 288\MT@spacingtrue . . . . . . . . . . . . . . . . . . . . . . . . 288\MT@split@codes . . . . . . . . . . . . . . . . . . . 1153, 1157\MT@split@name . . . . . . . . . . . . . . . . . . . . . . 905, 970\MT@step . . . . . . . . . . . . . . . . . . 301, 1441, 4223,4225, 4243, 4247, 4250, 4307, 4310, 4311, 4315\MT@step@ . . . . . . . . . . . . . . . . . . . 1441, 1451, 1495\MT@stretch . . . . . . . . . . . . . . . 301, 1439, 4217,4218, 4221, 4228, 4230, 4235, 4238, 4292, 4306\MT@stretch@ . . . . . . . . . . . . . . . . 1439, 1451, 1495\MT@stretch@default . . . . . . . . . . . . . . . . 317, 4218\MT@strip@prefix . . . . . . . . . . . . . 2584, 2600, 2622\MT@temp . . . . . . . . . . . . 1135–1138, 1586–1590,1657–1660, 1904, 1908, 1911, 1916, 1919,1924, 1989, 1992, 1998, 2002, 2005, 2008,2013, 2021, 2023, 2029, 2102, 2105, 2122,3015, 3040, 4133, 4138, 4143, 4144, 4146, 4149\MT@tempencoding . . . . . . . . . 3634, 3635, 3645, 3651\MT@tempfamily . . . . . . . . . . . . . . . . . . . . . . . . 3646\MT@tempseries . . . . . . . . . . . . . . . . . . . . . . . . . 3647\MT@tempshape . . . . . . . . . . . . . . . . . . . . . . . . 3648\MT@tempsize . . . . . . . 3602, 3649, 3658, 3660, 3664\MT@test@ast . . . . . . . . . . . . 1932, 2110, 2900, 2905\MT@textls . . . . . . . . . . . . . . . 49, 2063, 2064, 2066\MT@the@pr@code . . . . . . . . . . 1142, 1172, 1178, 1746\MT@the@pr@code@tr . . . . . . . . . . . . . . . . 1142, 1746\MT@tlist@break . . . . . . . . 587, 622, 644, 2276, 3740\MT@toks 280, 1243, 1273, 1491, 2373, 2408, 2434,2506, 2513, 2560, 2596, 2607, 2634, 2646, 2654\MT@tr@c@name . . . . . . . . . . . . . . . . . . . . . . . . . .. . . 1802–1805, 1809, 1823, 1824, 3236, 3243\MT@tr@context . . . . . . . . . . . . . . . . . . . . 2806, 2843\MT@tr@doc@contexts . . . . . . . . . . . . . . . . . . . 2843\MT@tr@factor@ . . . . . . . . . . . . . . . . . . . . . . . . . 1811\MT@tr@font@list . . . . . . . . . . . . . . . . . . . . . . 1685\MT@tr@ispace . . . . . . . . . . . . . . . 1721, 1722, 1817\MT@tr@ligatures . . . . . . . . . 1737, 1820, 1883, 1886\MT@tr@max . . . . . . . . . . . . . . . . . . . 304, 2088–2090\MT@tr@min . . . . . . . . . . . . . . . . . . . 304, 2092–2094\MT@tr@noligatures . . . . . . . . . . . . . . . . 1737, 1880\MT@tr@okern . . . . . . . . . . . . . . . . . . . . . 1735, 1819\MT@tr@ospace . . . . . . . . . . . . . . . 1724, 1725, 1817\MT@tr@outer@icr . . . . . . . . . . . . . . . . . . 2002, 2031\MT@tr@outer@icr@ . . . . . . . . . . . . . . . . . . . . . 2031\MT@tr@outer@l . . . . . . . . . . . . . . . . . . . . 1756, 1948\MT@tr@outer@next . . . . . . . . . . . . 1982, 1986, 2033\MT@tr@outer@r . . . . . . . . . . . . . . . . . . . . 1783, 1976\MT@tr@outer@r@ 1980, 1981, 1982, 1998, 2005, 2031\MT@tr@outer@r@@ . . . . . . . . . . . . . . . . . . 1983, 1988\MT@tr@set@okern . . . . . . . . . . . . . . . . . . 1736, 2098\MT@tr@set@okern@ . . . . . . . . . . . . 2103, 2104, 2109\MT@tr@set@space . . . . . . . . . . . . . . . . . . 1727, 1900\MT@tr@set@space@ . . . . . . . . . . . . 1905–1907, 1913\MT@tr@set@space@@ . . . . . . . 1918, 1923, 1926, 1931\MT@tr@setname . . . . . . . . . . . . . . . . . . . . . . . . 3066\MT@tr@unit@ . . . . . . . . . . . . . . . . 1804, 1933, 2111\MT@tracking 913, 1685, 1834, 2727, 4100, 4101, 4355\MT@tracking@ . . . . . . . . . . . . . . . . . . . . 1685, 4101\MT@trackingfalse . . . . . . . . . . . . . . . . . . 290, 4412\MT@trackingtrue . . . . . . . . . . . . . . . . . . . . . . . 290\MT@try@order . . . . . . . . . . . . . . . . . . . . 2271, 2279\MT@undefined@char . . . . . . . . . . . 2553, 2555, 2565\MT@upper . . . . . . . . . . . . . . . . . . . 2925, 2931, 3321\MT@use@set . . . . . . . . . . . . . . . . . 3053, 3059, 3066\MT@val . . . . . . . . . . . . 2823–2825, 2827, 2833,2835, 2838, 2888, 2892, 2900, 2902, 2920–2922, 2934, 2937, 2939, 2942, 2944, 2945,2951, 2953, 2954, 2956, 2959, 2961, 2972,2975, 2979, 2982–2984, 2986, 2988, 2995–2997, 3000, 3009–3011, 3023, 3025, 3030,3032, 3034, 3036, 3293, 3295, 3304, 3307,3309, 3317–3319, 3329–3331, 3337, 3342,3580, 3587, 3591, 3592, 3761, 3762, 3765,3773, 3774, 3777, 3779, 3782, 3785, 3804,


INDEX 2373805, 3807, 3809, 4010, 4011, 4013, 4020,4024, 4031, 4037, 4077, 4078, 4080, 4086, 4089\MT@variants . . . . . . . . . . . . . . . . 2264, 3107, 3117\MT@vinfo . . . . . . . . . . . 76, 93, 919, 1010, 1282,1291, 1295, 1330, 1499, 1516, 1702, 1712,2164, 2173, 2187, 2211, 2221, 2224, 2328,2330, 2336, 2804, 2827, 3139, 3145, 3893,3900, 4016, 4022, 4028, 4035, 4083, 4088, 4486\MT@warn@ascii . . . . . . . . . . . . . . . . . . . . 2515, 2633\MT@warn@axis@empty . . . . . . . . . . 3022, 3033, 3038\MT@warn@code@too@large . . . . . . . 1257, 1260, 1264\MT@warn@err . . . . . . . . . . . . . . . . . . 76, 3897, 3898\MT@warn@ex@too@large . . . . . . . . . 1475, 1478, 1489\MT@warn@maybe@inputenc . . . 2159, 2647, 2655, 2658\MT@warn@nodim . . . . . . . . . . . 3440, 3453, 3463, 3477\MT@warn@number@too@large . . . . . . . . . . 2542, 2639\MT@warn@preset@towidth . . . 1388, 1408, 1600, 1670\MT@warn@rest . . . . . . . . . . . . . . . 2414, 2450, 2644\MT@warn@tracking@DVI . . . . . . . . . . . . . . 1713, 4442\MT@warn@unknown . . . . 2404, 2420, 2429, 2454, 2652\MT@warning . . . . . . . . . . 67, 76, 94, 2089, 2093,2167, 2339, 2877, 2986, 3039, 3125, 3147,3244, 3373, 3442, 3490, 3504, 3652, 3670,3737, 3897, 3902, 3998, 4069, 4108, 4110, 4111\MT@warning@nl . . . . . . . . . . . . . . 76, 88, 95, 257,724, 759, 770, 831, 1123, 1235, 1271, 1323,1363, 1409, 1490, 1892, 2634, 2640, 2645,2653, 2698, 3216, 3415, 3747, 3754, 3765,3846, 3898, 3903, 3937, 3944, 3979, 3993,4159, 4248, 4294, 4313, 4367, 4383, 4446, 4531\MT@while@num . . . . . . . . . . . . . . 653, 661, 858–860\MT@with@babel@and@T . . . . . . . . . . . . . . . . . . . . .. . . 736, 789–791, 820–822, 4519–4523, 4526\MT@with@<strong>package</strong>@T . . . . . . . . . . . . . . . . . . . . . .733, 784, 785, 793, 796–798, 804, 811–814,827, 839, 853, 854, 856, 870, 881, 2709, 4366\MT@xadd . . . . . . . . . 104, 553, 2212, 2217, 2222,2225, 2768, 2777, 2835, 2923, 3141, 3320, 3587\MT@xaddb . . . . . . . . . . . . . . . . . . . . 561, 3340, 3662\MT@xdef@n . . 371, 3069, 3072, 3099, 3104, 3128,3243, 3335, 3357, 3517, 3553, 3679, 3762, 3764\MT@xetex@no . . . . . . . . . . . . . . . . . . . . . . . . . . 231\MT@xspace . . . . . . . . . . . . . . . . . . . . . . . 2021, 2036\MT@xunicodefalse . . . . . . . . . . . . . . . . . . . . . . 782\MT@xunicodetrue . . . . . . . . . . . . . . . . 782, 784, 813N \normalfont . . . . . . . . . . . . . . . . . . 898, 4323, 4327 \nullfont . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898P \pdfadjustinterwordglue . . . . . . . . . . . . 4102, 4364\pdfadjustspacing . . . . . . . . . . . . . . . . . 4065, 4326\pdfappendkern . . . . . . . . . . . . . . . . . . . . 4104, 4397\pdfcopyfont . . . . . . . . . . . . . . . . . . . . . . . . . . 949pdfcprot (<strong>package</strong>) . . . . . . . . . 26, 29, 52, 61, 93, 222\pdffontexpand . . . . . . . . . . . . . . . . . . . . . . . . . 1451\pdfnoligatures . . . . . . . . . . . . . . . . . . . 2166, 2172\pdfprependkern . . . . . . . . . . . . . . . . . . . 4103, 4396\pdfprotrudechars . . . . . . . . . . . . . . . . . 4064, 4455pdftexcmds (<strong>package</strong>) . . . . . . . . . . . . . . . . . . 36, 228Q qfonts (<strong>package</strong>) . . . . . . . . . . . . . . . . . 21, 135, 224R ragged2e (<strong>package</strong>) . . . . . . . . . 26, 77, 130, 228, 229relsize (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . . 101S selected (option) . . . . . . . 8, 14, 32, 66, 85, 118, 223\selectfont . . . . . . . . 1835, 2798, 2808, 4003, 4537\set@fontsize . . . . . . . . . . . . . . . . . . . . . . . . . 2979\SetExpansion . . . . . . . . . . . . . . . . . . . 14, 36, 3206\SetExtraKerning . . . . . . . . . . . . . . . . . 18, 38, 3264\SetExtraSpacing . . . . . . . . . . . . . . . . . 19, 39, 3249\SetProtrusion . . . . . . . . . . . . . . . . . . . 12, 35, 3190\SetTracking . . . . . . . . . . . . . . . . . . . . 15, 37, 3229\sfcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4381\shbscode . . . . . . . . . . 1567, 1568, 1579, 1582, 1589\showhyphens . . . . . . . . . . . . . . . . . . . . . 4321, 4325T \tagcode . . . . . . . . . . . . . . . . . . . . 1741, 2158, 2163tex4ht (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . 51, 226\textls . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23,52, 53, 847, 872, 877, 1759, 1831, 1847, 2061\textls* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\text<strong>microtype</strong>context . . . . . . . . . 22, 48, 843, 2802tikz (<strong>package</strong>) . . . . . . . . . . . . . . . . 77, 78, 217, 228tipa (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . . . . 94U ucs (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . . 90, 227ulgothic (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . 21\pdftracingfonts . . . . . . . . . . . . . . . . . . . . . . . 335\pickup@font . . . . . . . . . . . . . . . . 842, 885, 887,890, 892, 2697, 2699, 2708, 2731, 2737, 2739pifont (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . . 94pinyin (<strong>package</strong>) . . . . . . . . . . . . . . . . . 53, 227, 228protrusion (option) . . . . . . . . . . . . . . . . . 6, 11, 118PSNFSS (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . 188pstricks (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . 9, 126pxfonts (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . 21, 135\rightmarginkern . . . . . . . . . . . . . . . . . . . . . . . 755\rpcode . . . . . . 1137, 1178, 1179, 1377, 1380, 1745shrink (option) . . 8, 15, 32, 120, 127, 129, 225, 227slantsc (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . 167soul (<strong>package</strong>) . . . . . . . . . . . . 4, 29, 53, 78, 226, 228soulutf8 (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . 29, 228\spacefactor . . . . . . . . . . . . . . . . . . . . . . . . . . 1959\spaceskip . . . . . . . . . . . . . . . . . . . . . . . 1960, 1963spacing (option) . . . . . . . 6, 11, 26, 30, 118, 228, 229\stbscode . . . . . . . . . . 1560, 1561, 1578, 1582, 1588step (option) . 8, 30, 32, 120, 127, 129, 223, 225, 227stretch (option) . . . 8, 15, 25, 32, 120, 127, 129, 227trace (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . 95, 226\tracing<strong>microtype</strong> . . . . . . . . . . . . . . . . . . . . . . . 87\tracing<strong>microtype</strong>inpdf . . . . . . . . . . . . . . . . . . . 98\tracing<strong>microtype</strong>inpdfallfalse . . . . . . . . . . . 105\tracing<strong>microtype</strong>inpdfalltrue . . . . . . . . . . . . 105tracking (option) . . . . . . . . . . . . . 6, 11, 23, 30, 118txfonts (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . 21, 135unit (option) . . . . . . . . . . . . . . . . . . 7, 31, 224, 226\UseMicrotypeSet . . . . . . . 11, 33, 60, 73, 2871, 3050


THE LATEX PROJECT PUBLIC LICENSE 238V verbose (option) . . . . . . 9, 30, 31, 120, 223, 224, 227W wordcount (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . 49, 227X \XeTeXcharglyph . . . . . . . . . . . . . . . . . . . . . . . 2440\XeTeXcountglyphs . . . . . . . . . . . . . . . . . . . . . . . 671\XeTeXfonttype . . . . . . . . . . . . . . . . . . . . . . . . . 2392\XeTeXglyph . . . . . . . . . . . . . . . . . . . . . . . . . . 1206\XeTeXglyphindex . . . . . . . . . . . . . . . . . . . . . . . 2427\XeTeXglyphname . . . . . . . . . . . . . . . . . . . . . . . 2446Y yfonts (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . . . . 24Z zefonts (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . 21, 135\XeTeXprotrudechars . . . . . . . . . . . . . . . . . . . 4068\xspace . . . . . . . . . . . . . . . . . . . . . . . . . 2020, 2021xspace (<strong>package</strong>) . . . . . . . . . . . . . . . . . . . . . 79, 229\xspaceskip . . . . . . . . . . . . . . . . . . . . . . 1962, 1965xunicode (<strong>package</strong>) . . . . . . . . . . . . . . . . . 91, 92, 229E <strong>The</strong> L A TEX Project Public LicenseLPPL Version 1.3c 2006-05-20Copyright 1999, 2002–2006 LATEX3 ProjectEveryone is allowed to distribute verbatimcopies of this license document, but modificationof it is not allowed.Preamble<strong>The</strong> LATEX Project Public License (LPPL) is the primary licenseunder which the the LATEX kernel and the base LATEX<strong>package</strong>s 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 TEXrelated(such as a LATEX <strong>package</strong>), but it is written in sucha way that you can use it even if your work is unrelatedto TEX.<strong>The</strong> section ‘WHETHER AND HOW TO DISTRIBUTEWORKS UNDER THIS LICENSE’, below, gives instructions,examples, and recommendations for authors who are consideringdistributing 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 modifiedversions 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 ‘cfgguide.tex’ and‘modguide.tex’ in the base LATEX distribution for suggestions.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 – for example, theproduction of a file containing an original file associatedwith the Work or a significant portion of sucha file, either verbatim or with modifications and/ortranslated 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. Distributionincludes (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 Sun’s Network File System (NFS).Compiled Work: A version of the Work that has been processedinto a form where it is directly usable on acomputer system. This processing may include usinginstallation facilities provided by the Work, transformationsof the Work, copying of components of theWork, or other activities. Note that modification ofany installation facilities provided by the Work constitutesmodification of the Work.Current Maintainer: A person or persons nominated assuch within the Work. If there is no such explicit nominationthen it is the ‘Copyright Holder’ under anyapplicable law.Base Interpreter: A program or process that is normallyneeded for running or interpreting a part or the wholeof the Work.A Base Interpreter may depend on external componentsbut these are not considered part of the BaseInterpreter provided that each external componentclearly identifies itself whenever it is used interactively.Unless explicitly specified when applying thelicense to the Work, the only applicable Base Interpreteris a ‘LATEX-Format’ or in the case of files belongingto the ‘LATEX-format’ a program implementing the‘TEX language’.


THE LATEX PROJECT PUBLIC LICENSE 239Conditions on Distribution and Modification1. Activities other than distribution and/or modificationof 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 Work,and 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 beengenerated 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 creatinga Derived Work. You may also distribute the DerivedWork without restriction, including CompiledWorks generated from the Derived Work. DerivedWorks distributed in this manner by the Current Maintainerare considered to be updated versions of theWork.5. If you are not the Current Maintainer of the Work,you 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 Work,you may distribute a Derived Work provided the followingconditions are met for every component ofthe Work unless that component clearly states in thecopyright notice that it is exempt from that condition.Only 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 Interpreter,then, wherever this component of theWork identifies itself to the user when used interactivelywith that Base Interpreter, the replacementcomponent of this Derived Work clearly andunambiguously identifies itself as a modified versionof 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 referenceto 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) theauthors of the original version of the Work, provideany support, including (but not limited to)the reporting and handling of errors, to recipientsof the Derived Work unless those persons havestated explicitly that they do provide such supportfor the 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 offeringequivalent access to copy the Work fromthe same or some similar place meets this condition,even though third parties are not compelledto copy the Work along with the modifiedcomponent;ii. Information that is sufficient to obtain a complete,unmodified copy of the Work.7. If you are not the Current Maintainer of the Work,you may distribute a Compiled Work generated froma Derived Work, as long as the Derived Work is distributedto all recipients of the Compiled Work, andas long as the conditions of Clause 6, above, are metwith regard to the Derived Work.8. <strong>The</strong> conditions above are not intended to prohibit,and hence do not apply to, the modification, by anymethod, of any component so that it becomes identicalto an updated version of that component of theWork 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 applyingsome 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 differentlicense 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 recipientof 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.


THE LATEX PROJECT PUBLIC LICENSE 240No Warranty<strong>The</strong>re is no warranty for the Work. Except when otherwisestated in writing, the Copyright Holder provides the Work‘as is’, without warranty of any kind, either expressed orimplied, including, but not limited to, the implied warrantiesof merchantability and fitness for a particular purpose.<strong>The</strong> entire risk as to the quality and performance ofthe Work is with you. Should the Work prove defective,you assume the cost of all necessary servicing, repair, orcorrection.In no event unless required by applicable law oragreed to in writing will <strong>The</strong> Copyright Holder, or any authornamed in the components of the Work, or any otherparty who may distribute and/or modify the Work as permittedabove, 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 data,data 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.Maintenance of <strong>The</strong> Work<strong>The</strong> Work has the status ‘author-maintained’ if the CopyrightHolder 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 ‘author-maintained’.<strong>The</strong> Work has the status ‘maintained’ 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.<strong>The</strong> Work changes from status ‘maintained’ to ‘unmaintained’if there is no Current Maintainer, or the personstated to be Current Maintainer of the work cannotbe reached through the indicated means of communicationfor 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 followingsteps:1. Make a reasonable attempt to trace the Current Maintainer(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 resumeactive maintenance is taken by the CurrentMaintainer, then announce within the pertinentcommunity your intention to take over maintenance.(If the Work is a LATEX work, this could bedone, for example, by posting to comp.text.tex.)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 ‘intention announcement’ 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 becomesreachable 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 itself,alter the fact that the Work is distributed under the LPPLlicense.If you become the Current Maintainer of the Work,you should immediately provide, within the Work, aprominent and unambiguous statement of your statusas Current Maintainer. You should also announce yournew status to the same pertinent community as in 2babove.Whether and How to Distribute Works under This LicenseThis section contains important instructions, examples,and recommendations for authors who are consideringdistributing their works under this license. <strong>The</strong>se authorsare addressed as ‘you’ in this section.Choosing This License or Another LicenseIf for any part of your work you want or need to use distributionconditions 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.<strong>The</strong> document ‘modguide.tex’ in the base LATEX distributionexplains 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 unrelated


THE LATEX PROJECT PUBLIC LICENSE 241to LATEX, the discussion in ‘modguide.tex’ may still be relevant,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 – you mayforget that you have modified that component; or it maynot occur to you when allowing others to access the modifiedversion that you are thus distributing it and violatingthe conditions of this license in ways that could have legalimplications and, worse, cause problems for the community.It is therefore usually in your best interest to keepyour copy of the Work identical with the public one. Manyworks provide ways to control the behavior of that workwithout 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 and/or lastsubstantially modified. Include also a statement that thedistribution and/or modification of that component isconstrained by the conditions in this license.Here is an example of such a notice and statement:%% pig.dtx%% Copyright 2005 M. Y. Name%% This work may be distributed and/or modified under the% conditions of the LaTeX Project Public License, either version 1.3% of this license or (at your option) any later version.% <strong>The</strong> latest version of this license is in% http://www.latex-project.org/lppl.txt% and version 1.3 or later is part of all distributions of LaTeX% version 2005/12/01 or later.%% This work has the LPPL maintenance status `maintained'.%% <strong>The</strong> Current Maintainer of this work is M. Y. Name.%% This work consists of the files pig.dtx and pig.ins% and the derived file pig.sty.Given such a notice and statement in a file, the conditionsgiven in this license document would apply, withthe ‘Work’ referring to the three files ‘pig.dtx’, ‘pig.ins’,and ‘pig.sty’ (the last being generated from ‘pig.dtx’using ‘pig.ins’), the ‘Base Interpreter’ referring to any‘LATEX-Format’, and both ‘Copyright Holder’ and ‘CurrentMaintainer’ referring to the person ‘M. Y. Name’.If you do not want the Maintenance section of LPPLto apply to your Work, change ‘maintained’ above into‘author-maintained’. However, we recommend that youuse ‘maintained’ 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 ReplacementsSeveral clauses of the LPPL specify means to provide reliabilityand stability for the user community. <strong>The</strong>y 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(e.g., if a few lines of code are reused for a completelydifferent task), then clauses 6b and 6d shall not apply.Important RecommendationsDefining What Constitutes the Work<strong>The</strong> LPPL requires that distributions of the Work containall 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 manifest.txt.in that place. In the absence of an unequivocal list it mightbe impossible for the licensee to determine what is consideredby you to comprise the Work and, in such a case, thelicensee would be entitled to make reasonable conjecturesas to which files comprise the Work.

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

Saved successfully!

Ooh no, something went wrong!