Turning Off Hanging Punctuation for Quotes in Middle of a Paragraph
The art director said "only hang quotes at the beginning of a paragraph"! This little tweak can help.

Many of you know I’ve been working on a book called Spectrums. The designer is Scott Citron, whom many of you know, and he has done a terrific job laying out his complex book. However, the production editor recently noted that while she doesn’t mind quotation marks hanging out in the left margin at the beginning of a paragraph, she doesn’t like it when the quote marks are in the middle of the paragraph.
As you may know, InDesign handles “hanging punctuation” via a feature called Optical Margin Alignment, which lives in the Story panel (Type > Story). OMA affects every character along the column edge, not just punctuation — that’s why capital Ts and Ws and letters with rounded edges hang out a little bit. But the effect is way more obvious with punctuation, and most of all with quotes.
Unfortunately, you can only turn OMA on or off; you can’t say “just apply it to some characters and on some lines.” But the production editor’s request got me thinking, and… well, here’s one way to do it.
First, do a GREP find/change for: ~{
(that’s a space, tilde, curly brace)
and replace with: ~[~{
(that’s space, tilde square brace, tilde curly brace)
That adds a single quote to the left of every double quote, but only if there’s a space before it. That is, it doesn’t do anything for quotes at the beginning of a paragraph.
After you click Change All, you’ll get an extra character inserted. (Note that technically you don’t have to use a single quote — you could use any character before the double-quotes — but the single quote is convenient here.)
Step two is to a grep style to this paragraph style. You need to create a character style that turns the text Paper and applies -100 tracking. (The exact tracking value is actually dependent on the font and the effect. -150 might actually be slightly better.)
After you have a character style, you can apply it as a grep style inside the paragraph style definition:
That grep code is '(?=")
which means “any single quote that is immediately followed by a double quote.” It will make the single quote white and “disappear it” (with kerning) when it’s in the middle of a line. But at the beginning of the line the optical margin alignment applies to the single quote (hanging it) and leaves the double-quote slightly indented.
Of course, there are a couple of things to consider when taking advantage of this. First, if you’re going to export the text as EPUB or HTML or even RTF/Word, you’ll want to remove that extra single quote first, or else it will appear in the exported file. (You could even use the Conditional Text panel and the Find/Change panel to apply a condition to those single quotes, then turn off that condition before exporting.)
Also, it’s still not perfect, because the negative tracking pulls the quote out into the margin a tiny bit. But you need the negative tracking so that the single quote doesn’t take up space for quotes in the middle of the line.
Nevertheless, we think this may solve the problem for this book, and perhaps for you, too, next time you run into this kind of issue.
This article was last modified on December 21, 2021
This article was first published on July 3, 2012
Got it ! Found one nice & easy way.
Through Tabs Menu. Ctrl+Shift+t .
Thank u !
Or instead of inserting space after every Other line … !
can we customize that particular TAB ?
Sry.
Just imagine TABs before nd after every COLON.
Sry. Unable to show the prob. in this comment … !
trying again … !
Name : Name Surname
DOB : Date of Birth
e-Mail : anant.anant@gmail.com
Gender : Male
Address : “House Name” <– The (Not)hanging Quotation Prob.
: House Address.
Plz… Help me out … !
How to “Optical Margin Align” … AFTER a blank “Tab”.
For eg… in C.V. where there is no table construction ?
Or just how to Optically adjust that hanging Quotation Mark ?
i just want to hang the initial quotation mark to sync. to above text lines.
For eg… !
Name : Name Surname
DOB : Date of Birth
e-Mail : anant.anant@gmail.com
Gender : Male
Address : “House Name” <– The (Not)hanging Quotation prob.
: House Address.
I’m having a little trouble doing a custom search for the first double right quotation of a sentence and replacing with a double left quotation. The word document I got has every paragraph with the incorrect quotations so need to find and replace all. Any help would be much appreciated!
ex:
?Vet du vad det här är??
needs to be changed to:
?Vet du vad det här är??
@David Blatner
@Marcel: I address that near the end of the article …
Marcel hangs his head in shame. I should read more carefuly next time. Sorry for nitpicking.
Very cool! :)
1. Definitely use color »None« and not »Paper«.
2. I’d agree to Eugene: optical alignment off, but use a discretionary hyphen directly before the quote mark and negative kern against it.
(IMHO »Paper« and the use of a space to kern the first character of a paragraph against the left frame border are relicts from older Quark versions. Always think of the export to EPUB or RTF or XML …)
IMHO this post clearly shows the great »weakness« of the automatic optical alignment: There is no way to do exact configurations on this feature.
I’m posting feature requests with every new version since CS1, that they’d best implement a true kerning editor, which supports special characters for »left frame border« and »right frame border« to allow kerning of every character against the left or right frame border and save sets of individual kerning (could be placed inside the »metrics«, »optical«, »MyKerning-MinionPro« …). There could be an automatic way to generate those values, but everyone could correct the pairs as he wishes.
Something like that would be much more powerful and would lead to much more control and excellent typography than an automated feature.
@Marcel: I address that near the end of the article. You need to remove extra characters like this first. Fortunately, you can use this trick to apply the condition easily: https://creativepro.com/findchange-with-conditional-text.php
@João Carlos: YES!
@Eugene: That would work if all you cared about was the quotation mark. But by turning off OMA you lose the benefit of aligning all the other characters optically (T, e, A, W, V, and so on).
Would it be safer to turn off the optical alignment – then use a Space before the first quote mark, and use a negative kerning on the Space to pull the quote mark outside the margin?
At least the worst that can happen is a double space.
To make a character invisible, isn’t the None swatch a safer choice than Paper?
Good luck with exporting that to ebook
Geez, David, don’t you have enough to do? ;-)
They really need to have a setting that allows you to apply this only to the first line, or perhaps even on a per-character basis.