Book formatting and typography
Optical Margin Alignment: The Invisible Trick That Makes Typesetting Look Expensive
A common assumption about digital layout is that a left margin set by software is straight because every line starts at the same coordinate. Measured with a ruler, it is. Seen at reading distance, it often is not. Ilene Strizver, writing about InDesign’s optical margin alignment, describes the most familiar case: “In flush left or justified text, a line that begins with quotation marks or an apostrophe can appear to be indented.”1 The mark sits exactly on the margin, but because it is small and surrounded by white space, the eye reads the edge of the text block as beginning farther in.
Optical margin alignment is the family of techniques that corrects this by moving certain characters slightly outside the measured margin, so that the edge looks straight rather than measures straight. This article explains why the problem occurs, how the practice developed from Gutenberg’s hanging hyphens to modern software, how the main tools available to independent authors implement it, and where it should and should not be applied in a book.
Mathematical alignment and visual alignment differ
Every character occupies a rectangular box in the font, and layout software aligns those boxes. The ink inside the boxes varies. A capital H or M fills its box nearly to the edge with a vertical stem. A period, comma, hyphen, or quotation mark occupies only a small part of its box. Capitals such as A, T, V, W, and Y have diagonal or overhanging strokes that leave a wedge of white space at the edge. When one of these characters starts or ends a line, the visible edge of the text recedes at that point.
Strizver attributes the effect to the size of these marks and the white space around them: they are smaller than most characters and so leave a visual gap at the margin.2 In a single line the gap is slight. Across a page of justified text, where right-hand lines frequently end in commas, periods, and hyphens, the accumulated effect is a margin that looks faintly notched. The same is true of left margins in dialogue-heavy fiction, where many paragraphs begin with an opening quotation mark.
Strizver’s TypeTalk column on hanging punctuation states the choice directly. Aligning an opening quotation mark with the text below is “not technically incorrect,” she writes, but “it does create a visual hole that makes the line appear to be indented.”3 She calls hanging the marks into the margin a “more typographically sophisticated solution.”4 Her judgment is an expert’s preference rather than a measured finding about readers, but it reflects the long-standing professional view that the visible edge, not the measured one, is what a reader perceives.
Hanging punctuation is older than the computer
The practice predates digital type. The design historian Paul Shaw, in a 2018 article for PRINT, notes that in Gutenberg’s Bible the hyphens “are hung in the margin,” and that Gutenberg “copied medieval scribal practices.”5 Shaw reports that “hanging hyphens disappeared because they made composing metal type more complicated,” since a compositor had to set characters outside the measure of the composing stick.6 He also notes that the twentieth-century typographer Geoffrey Dowding later “proposed hanging hyphens in the margin” as a refinement.7
Hand compositors could hang a quotation mark at the start of a line with some effort, and fine printing sometimes did. Mechanical typesetting and early phototypesetting generally aligned character boxes, and the refinement became rare in commercial work. Digital composition made it practical again because the software can shift any character by any amount, line by line, without additional handwork.
The hz program and pdfTeX revived the technique digitally
The modern revival is associated with the hz program developed by Hermann Zapf with the type company URW. Hàn Thế Thành, who implemented related features in the pdfTeX typesetting engine, wrote in a 2005 conference paper that margin kerning and font expansion “have been implemented in the hz program by Hermann Zapf and URW,” and that the pdfTeX extensions are only a small subset of hz’s modules.8
Thành’s definition of the technique is concise. Margin kerning, he writes, “makes the margins of text look smooth, by moving certain characters out to the margins by a small amount.”9 He names the hyphen and punctuation marks as the most common targets and notes that a footnote reference mark would “look bad when ending up at the margin without protrusion.”10 The LaTeX microtype package, maintained by R. Schlicht, provides an interface to these pdfTeX extensions. As of its version dated 1 March 2026, its manual quotes Thành’s description: “Margin kerning is the adjustments of the characters at the margins of a typeset text.”11 The manual refers to the same feature as character protrusion.12
Thành’s paper also connects margin kerning to its companion feature. “Font expansion can help to improve line-breaking,” he writes, listing among the benefits fewer hyphenations, more even word spacing, and fewer rivers.13 The two features are often used together, though they solve different problems: protrusion corrects the edges of the text block, and expansion evens the spacing inside it.
Software hangs each character by a different amount
Optical margin alignment differs from simple hanging punctuation in two ways. First, it applies to more characters. The CreativePro TypeTalk article on the subject, originally published on 9 March 2016, distinguishes the two: “Hung punctuation refers to the practice of extending lines beginning or ending with certain punctuation,” while optical margin alignment outdents “any letter, numeral, character, or symbol that may disrupt the appearance of a flush edge,” including the capitals A, T, and W, the numeral 1, and registered and trademark symbols.14
Second, it moves each character by a proportion suited to its shape rather than hanging it fully. A hyphen or period may protrude most of its width, because nearly all of it is white space at the line’s edge. A comma may protrude somewhat less. A capital T or A protrudes only a fraction, enough to bring its visual edge into line with the stems of neighboring letters. In TeX, these amounts are set per character in configuration files that microtype supplies for common fonts.15 In InDesign, the proportions are built into the program and scaled by a single size value.
InDesign applies the setting to a whole story
As of November 2026, InDesign’s optical margin alignment lives in the Story panel. The CreativePro article states that the feature is off by default, that its default overhang value is 12 points, and that the typesetter should begin by “starting with the size of the type and going up (or down) from there,” judging by eye rather than by the number.16 Strizver’s separate guide explains that “the point size determines how far into the margin characters will extend,” and that the value that looks right “may sometimes be considerably larger than the text size,” and need not match it.17
Because the Story panel setting applies to an entire threaded story, the CreativePro article notes that elements within it, such as bulleted lists, will also hang, which may not be wanted.18 InDesign provides an exception at the paragraph level: in a paragraph style, under “Paragraph Styles Options > Indents and Spacing > Alignment > Ignore Optical Margin,” the feature can be switched off for headings, lists, centered text, or any other element that should align by its boxes.19 Strizver adds that making optical margin alignment a default in InDesign applies only to documents created after the default is set with no document open.20
In Adobe Illustrator the feature is simpler. The CreativePro article reports that “It can only be turned on or off with no ability to customize the value.”21 Strizver’s guide noted that QuarkXPress did not offer an automatic optical alignment feature and that Microsoft Word lacks it.22 Her separate TypeTalk column, which carries a later revision date, describes QuarkXPress 8 as offering “Hanging Punctuation” and “Punctuation Margin Alignment” options.23 The two statements appear to reflect different versions of that program; neither page is current enough to settle what the latest version offers, and Word users should not expect the feature at all.
Affinity Publisher and LaTeX use rule tables
Affinity Publisher takes a rule-based approach. Its help page states that “Optical alignment uses preset or custom rules for aligning characters at the start and end of paragraph text,” and offers two types: “‘Manual’ where a lookup table of rules is used” and “‘Font’ where the font itself provides optical alignment control.”24 The page recommends setting optical alignment on a base text style and adjusting it in the Character panel where necessary, and it explains that custom rules can name specific characters and the amounts they protrude on the left and right.25
In LaTeX, the microtype manual states that character protrusion works with pdfTeX, LuaTeX, or XeTeX, and that “character protrusion will always be enabled” when the package is loaded unless the user turns it off.26 Its protrusion factors give, for each character, “the amount that a character should be protruded into the left margin (first value)” and a second value for the right margin, and “The microtype package ships with configuration files for a number of font families.”27 Authors who typeset their own books in LaTeX can therefore get optical margins without adjusting anything by hand, provided the package has a configuration for the chosen font or a fallback applies.
On the web and in some ebook reading systems, the CSS property hanging-punctuation provides a limited form of the technique. As of its 20 April 2026 revision, the MDN Web Docs page describes the property as specifying “whether a punctuation mark should hang at the start or end of a line of text,” with values for opening and closing brackets and quotes and for stops and commas at line ends.28 The page labels the feature “Limited availability” and states that “This feature is not Baseline because it does not work in some of the most widely-used browsers.”29 Authors should not rely on it in reflowable ebooks, where the reading system controls most layout.
Some elements should not hang
Optical margin alignment suits running text. It is less suitable where alignment carries structural meaning. Bulleted and numbered lists depend on bullets and numerals lining up vertically, and hanging them disturbs the list’s structure, which is why the CreativePro article flags them.30 Centered headings, epigraphs, verse, and tables should usually be excluded, since an optical shift at one edge of a centered line moves the line off center.
Pull quotes and block quotations need a deliberate decision. A large opening quotation mark at display size will protrude conspicuously if the overhang value is set for the body text, and a block quotation set in a smaller size within the same story may protrude too little. Setting the feature separately, or excluding those paragraphs and handling their quotation marks by hand, gives more control.
Running heads, folios, and footnotes are usually separate text frames in InDesign and therefore not affected by the main story’s setting. Each frame needs its own choice. Footnotes threaded within the main story follow its setting, which Thành’s observation about footnote markers at the margin suggests is generally desirable.31
The effect is real but not easily measured
The catalogue title calls optical margin alignment a trick that makes typesetting “look expensive.” No study was found that measures readers’ perception of book quality with and without it, and the claim should be read as a description of professional taste rather than an established finding. What the sources do establish is that the visual irregularity it corrects is real, that skilled typographers have treated the correction as a mark of refinement since Gutenberg’s hanging hyphens, and that modern software makes it inexpensive to apply.323334
For an independent author working in InDesign, Affinity Publisher, or LaTeX, the practical steps are short. Turn the feature on for the main text story or base style. Set the overhang near the body text size and adjust by eye on a printed proof. Exclude lists, centered material, tables, and display elements through paragraph styles. Then check a few pages where many lines end in punctuation, since those pages show whether the right margin now reads as a straight edge.
Related articles on selfpublishingtool.com
Platform rules, fees and laws change. Facts in this guide are dated to when they were checked; confirm current terms with the platform or authority before relying on them. Nothing here is legal, tax or financial advice.