The Microtype Package Subliminal Refinements Towards Typographical Perfection
Total Page:16
File Type:pdf, Size:1020Kb
The microtype package Subliminal refinements towards typographical perfection R Schlicht v2.8c [email protected] 2021/03/14 The microtype package provides aLaTeX interface to the micro-typographic exten- sions that were introduced by pdfTeX and have since also propagated to LuaTeX and X Te eX: most prominently, character protrusion and font expansion, furthermore the adjustment of interword spacing and additional kerning, as well as hyphenatable letterspacing (tracking) and the possibility to disable all or selected ligatures. These features may be applied to customisable sets of fonts, and all micro-typographic aspects of the fonts can be configured in a straight-forward and flexible way. Settings for various fonts are provided. Note that character protrusion requires pdfTeX (version 0.14f or later), LuaTeX, or X Te eX (at least version 0.9997). Font expansion works with pdfTeX (version 1.20 for automatic expansion) or LuaTeX. The package will by default enable protrusion and expansion 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 only works≥ with pdfTeX( 1.40). Letterspacing is available with pdfTeX( 1.40) or LuaTeX( 0.62). ≥ ≥ The alternative≥ package letterspace, which also works with plainT eX, provides the user commands for letterspacing only, omitting support for all other extensions (see section7). This package is copyright © 2004–2021 R Schlicht. It may be distributed and/or modified under the conditions of theLaTeX Project Public License, either version 1.3c of this license or (at your option) any later version. This work has the LPPL mainten- ance status ‘author-maintained’. CONTENTS 2 Contents 1 Micro-typography withTeX4 2 Getting started5 3 Options6 3.1 Enabling the micro-typographic features..................6 3.2 Character protrusion...............................7 3.3 Font expansion..................................7 3.4 Tracking......................................8 3.5 Miscellaneous options..............................9 3.6 Changing options later.............................9 4 Selecting fonts for micro-typography 10 5 Micro fine tuning 12 5.1 Character protrusion............................... 13 5.2 Font expansion.................................. 14 5.3 Tracking...................................... 15 5.4 Additional kerning................................ 18 5.5 Interword spacing................................ 19 5.6 Character inheritance.............................. 20 5.7 Configuration files................................ 20 6 Context-sensitive setup 22 7 Letterspacing revisited 23 8 Disabling ligatures 24 9 Hints and caveats 25 10 Contributions 28 11 Acknowledgments 28 12 References 30 13 Short history 30 14 Implementation 34 14.1 Preliminaries................................... 35 Debugging [36] Requirements [38] Declarations [42] Auxiliary macros [43] Compatibility [52] 14.2 Font setup..................................... 56 Protrusion [62] Expansion [69] Interword spacing (glue) [72] Additional kern- ing [73] Tracking [75] Disabling ligatures [85] Loading the configuration [87] Translating characters into slots [91] Hook intoLaTeX’s font selection [99] Context-sensitive setup [102] 14.3 Configuration................................... 105 Font sets [105] Variants and aliases [111] Disabling ligatures [112] Interaction with babel [113] Fine tuning [113] Character inheritance [120] Permuta- tion [121] LIST OF TABLES 3 14.4 Package options................................. 125 Declaring the options [125] Loading the definition file [129] Reading the configuration file [129] Hook for other packages [130] Changing options later [131] Processing the options [133] 15 Configuration files 143 15.1 Font sets...................................... 143 15.2 Font variants and aliases............................ 144 15.3 Interaction with babel .............................. 146 15.4 Note on admissible characters........................ 147 15.5 Character inheritance.............................. 147 OT1 [147] T1 [148] LY1 [148] OT4 [149] QX [149] T5 [150] EU1, EU2, TU [151] Euro symbols [151] 15.6 Tracking...................................... 152 15.7 Font expansion.................................. 152 15.8 Character protrusion............................... 154 Normal [155] Italics [163] Small caps [174] Italic small caps [177] Text companion [178] Computer Modern math [183] AMS symbols [187] Euler [190] Euro symbols [194] 15.9 Interword spacing................................ 195 Nonfrenchspacing [197] 15.10 Additional kerning................................ 198 French [199] Turkish [199] 16 OpenType configuration files 201 16.1 Character inheritance.............................. 201 16.2 Character protrusion............................... 205 17 Auxiliary file for micro fine tuning 219 A The title logo 221 A.1 Macros....................................... 221 A.2 Document..................................... 226 B The letterspacing illustration 226 B.1 Macros....................................... 226 B.2 Document..................................... 229 C Change history 231 D Index 241 E TheLaTeX Project Public License 250 List of Tables 1 Availability of micro-typographic features......................7 2 Predefined font sets................................... 11 3 Fonts with tailored protrusion settings....................... 21 4 Order for matching font attributes.......................... 89 MICRO-TYPOGRAPHY WITHT eX4 1 Micro-typography withTeX Micro-typography is the art of enhancing the appearance and readability of a document while exhibiting a minimum degree of visual obtrusion. It is concerned with what happens between or at the margins of characters, words or lines. Whereas the macro-typographical aspects of a document (i.e., its layout) are clearly visible even to the untrained eye, micro-typographical refinements should ideally not even be recognisable. That is, you may think that a document looks beautiful, but you might not be able to tell exactly why: good micro-typographic practice tries to reduce all potential irritations that might disturb a reader. Some essential micro-typographical aspects are already taken care of byT eX out of 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 responsib- ilities, 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 micro- typographic techniques have been introduced to theT eX world relatively recently with pdfTeX, and have since also propagated to LuaTeX and X Te eX. These features make them the tool of choice not only for the creation of electronic documents but also of works of outstanding time-honoured typography: most prominently, character protrusion (also known as margin kerning) and font expansion. Quoting Hàn Thê´ Thành, the author of pdfTeX, who writes in his thesis: AfterIf you you had have a PDF readviewer the textthat ‘Margin‘Margin kerning kerning is is the adjustments of of the the characters characters at at the the margins margins of of a a typeset typeset typeset text. text. onunderstands the right,PDF you1.5 can, you view A simplified employment of margin kerning is hanging punctuation. Margin kerning thecould effect view of the the effect features of the it is needed for optical alignment of the margins of a typeset typeset text, text, because because mechanical mechanical describesmicro-typographic by clicking features on the by justification of the margins makes them look rather ragged. ragged. Some characters characters can links:clicking on the links. make a line appear shorter to the human eye than others. Shifting such characters Protrusion onoff by an appropriate amount into the margins would greatly improve the appearance Expansion onoff of a typeset text. Both features are enabled Composing with with font font font expansion expansion expansion is is is the the the method method method to to touse use use a a wider awider wider or or narrower or narrower narrower variant variant variant of of a throughout this document. ofafont font a fontto to make maketo make interword interword interword spacing spacing spacing more moremore even. even. even.A font A font A in font ina loose a in loose a a line loose loose line can linecan line be besubstitutedcan can substituted be be substi- substi- by tutedbya wider a wider by variant a wider variant so variant the so interword the so the theinterword interword interword spaces spaces are spaces spaces stretched are are are stretched stretched stretched by a smaller by by by a a aamount. smaller smaller smaller Similarly, amount. amount. Similarly,a font in a a tight font line in a can tight be line replaced can be by replaced a narrower by avariant narrower to reduce variant the to amount reduce thethat amount the interword that the spaces interword are shrunk spaces by. are There shrunk is certainly by. There a potential is certainly danger a potential potential of font dangerdistortion of fontwhen distortion using such when manipulations, using such manipulations, thus they must thus be used they withmust extreme be used withcare. extreme The potentiality care. The to potentiality adjust a line to adjust width a by line font width expansion by font can expansion be taken can into be takenconsideration into consideration while a paragraph while a is paragraph being broken is being into lines, broken in