Creating Proper Primes
I’ve been thinking about the proper way to type the symbols for inches and feet. (Maybe it’s all the talk on television about the inches of rain from hurricane Irene which is pounding outside my window as I write this post.)
We all know that we shouldn’t use smart quotes for measurements such as 5′ 3″. However, most likely you have the option for “Use Typographer Quotes” turned on in the Type preference. So what do you do if you want to quickly type feet or inches without having to go into the Preferences dialog box?
Fortunately you can easily switch between typing curly quotes and straight quotes by doing the following: On the Mac press the code Cmd-Opt-Shift and tap the quote key. On Windows press the code Ctrl-Alt-Shift and tap the quote key. This turns off the Use Typographer’s Quotes preference without having to open the Preferences dialog box. Then use the quote key to type the feet or inch mark. Then re-do the code to turn the preference back on. (It takes longer to explain than it does to do.)
While they are better than curly quotes, these straight, up and down quotes aren’t the proper marks for feet and inches. Notice that the curly quotes are also in the text. These were created by turning the preference for typographer’s quotes on and off.
Once you have inserted these straight (or dumb) quotes in the text, you may think you’re set. Sadly, you’re not. The straight, up and down quote marks are not the proper characters for feet and inches. Instead you want to insert a mark called a prime or double prime. These look like italicized versions of the straight quote marks.
Unfortunately not all fonts contain proper prime characters. My favorite font, Minion Pro, does not, while Helvetica does. If your font has prime characters you can find them and insert them into your text using the Glyphs panel.
But what do you do if you want proper primes but your typeface doesn’t have them? Well, remember I said that the primes look similar to italicized versions of the straight quote marks. This means you can apply the italic style to the straight mark to angle it like a prime. However, if you’re doing work with a lot of these marks, you want a way to automate the process of italicizing the marks.
Applying an italic to the straight quote marks simulates the appearance of a proper prime. This can be a cumbersome task to do for every instance of feet and inch marks.
However, no one wants to have to individually select and apply an italic font or character style to every instance of feet and inch marks?especially not if you’re doing a book on basketball players or a catalog on hardware measurements. That’s when the GREP style commands can save you loads of work. Now, don’t panic when you read the term GREP. I agree that most of the time, when we think of GREP, we think of complicated formulas. But the GREP formula can be very simple.
First thing you want to do is create a character style that applies the italic style. This gets chosen in the GREP style Apply Style menu. Then, you want to apply that character style to both the dumb apostrophe and the dumb quote marks. Ordinarily I would just type those dumb characters in the GREP text field. However, inserting a plain quote character would also italicize the curly quotes in the text. Fortunately a simple tilde (~) inserted before the dumb apostrophe or quote marks indicates that you want only those straight characters to have the italic style applied.
The (~) inserted in front of the straight quote marks applies the italic style to just the straight quotes for inches, not the curly ones. Similarly ~’ applies the italic style to just the straight apostrophe mark for feet.
Finally, if you want to move to a slightly more advanced technique, you need to handle the space between the digit and the quote mark. Look at the results of applying the italic style to the characters. You’ll notice that the marks are too far away from the last digit in each measurement.
In order to fix this, you need to create a GREP style that applies tracking to tighten the space between the digit and the mark. I created a style with the tracking amount of -100. You may need a different amount depending on your typeface and/or point size.
Once you have the tracking amount in a character style, you need to apply it to a digit in the GREP style. The digit part is easy; \d is the wildcard for an number. Applying the tracking style to this digit will tighten the space between that digit and the mark. (If you’re wondering why I didn’t use kerning, you can only apply metric or optical kerning as part of a style.)
But if you leave the GREP formula as just \d, you’ll not only tighten the space between a digit and the quote mark, you’ll also tighten the space between two digit numbers. The code \> applied after the digit code specifies that the digit must be at the end of the word which fixes the problem with two digit numbers.
The code \d\> applies tracking to just the final digit in double-digit measurements.
An example of how tracking can be applied to digits to move the italic primes nearer to the measurement.
Now there’s one more situation in the text which I confess I don’t know how to handle. This situation is when there a digit that exists without any mark following it. For instance something like “He improved his shooting over 50%.” In that case the tracking will be applied to the digit and any space or character that follows it?which is not what I want! I need a way to specify that the tracking style be applied only to those digits that are followed by an apostrophe or quote mark.
I welcome input from any GREP genius who can fix this situation.
So I guess nobody uses the symbol font anymore? this font has the correct inch and foot marks.
Symbol does indeed have the prime marks but the don’t always fit with the rest of the font style and weight. It is better to use the primes that come with the font or italicizes that straight marks
To answer to your last question, I think you can do that in grep with a positive lookahead?
Nice tip! I’d also do a GREP search to use a non-breaking space between any feet and inches so things like 6′ 9″ don’t break up over two lines, but that might be overkill.
I think something like that might work…
Apply style tracking for digits to:
\d\>(?=”|’)
A., almost there — but as Sandee noted, GREP matches the single ‘ and ” characters to both straight and curly quotes. So you use the escaped forms instead:
\d(?=~’|~”)
Notice you don’t need the End-of-word marker \> because this only applies to a digit that’s followed by the inch or feet mark. (Also notice the curly quotes don’t get matched by your attempt — and neither do the straight ones. Some confusion arises, methinks.)
Oh, and you don’t need to change the preferences to insert straight quotes ;) I’m behind my Mac at the mo’ so I can’t test the Windows equivs, but pressing Ctrl+’ / Ctrl+Shift+’ inserts these straight away.
Nice! I was just reading about properly setting primes the other day. ::: shuffling through bookmarks:::: ah, here it is:
https://www.smashingmagazine.com/2011/08/15/mind-your-en-and-em-dashes-typographic-etiquette/
(see the section “Quotation Marks Don’t Measure Up.”)
We need to get the author to link to this post; he gives the topic about 2 sentences. :D
Jongware,
I’m having trouble getting your code \d(?=~?|~?) to work. It turns off the tracking for all digits, not just the ones not followed by feet or inch marks.
I don’t understand positive/negative lookbehind/lookahead at all, so I can’t figure out how to fix it.
I would use these two GREP-style rules:
1) Apply ITALIC to the pattern:
(?<=\d)[\x27\x22]
2) Apply TRACKING-FOR-DIGITS to the pattern:
\d(?=[\x27\x22])
@+
Marc
Marc Autret:
Using the unicode values is nicely done. It straightens out the confusion that ID has sometimes with the ~’ and ~” codes.
And I have a better understanding of the positive look behind (?<=\d) and the positive lookahead (?=\x22\x27) based on these two examples. (Did I get them correct?)
BTW, for any beginners, don't panic at this part of the conversation. Just start with using the correct quote marks instead of curly quotes.
Thank you! I think I’ll print this out and post it, email it, broadcast it from on high, etc. I’m SO sick of seeing typewriter quotes being used for prime and double prime. Even the leading book publishers do this all the time and it drives me crazy.
Funny that I was talking to our editor this morning about the necessity of using proper prime marks. I don’t think it’s ever a good idea to use straight quotes. If you turn off typographer’s quotes (or manually insert straight quotes), please note that if you ever copy and paste that text somewhere else it’s going to switch to curly quotes unless you remember to go back and turn off typographer’s quotes. I just don’t think it ever works and that prime marks should always be used. When necessary, I switch to the Symbol font to get primes.
This is a great thread! I’ve been manually changing curlies to straights/italics for what seems like aeons. For the moment all the GREP stuff still comes across as magik to me, but it looks like I may have to get down and dirty teaching myself how to use it (I’ve had my head in the sand for too many years, I think).
Much thanks for the thread and forcing my education. :)
Lovely discourse from everyone?thanks!
For InDesign newbies or oldies who understand the “use primes or italicize straight quotes” bit, but are a little lost with where they’re exactly supposed to do the GREP stuff, let me break it down a bit more.
It’s tedious to manually select individual straight quotes and apostrophes and make them italic. You could speed it up a bit more with a Find/Change.
But the fastest, most automated way to italicize and track in these guys would be to add one or two GREP Styles to the paragraph style(s) used by your feet and inch marks.
GREP Styles were introduced to InDesign in CS4. They’re like super-charged Nested Styles — they automatically apply a character style to certain text whenever the “parent” paragraph style is applied. In other words, you can skip the Find/Change step.
Unlike GREP Find/Change, you can’t use a GREP Style to change the text itself (you can’t change a single quote mark to the Symbol prime character, for example), you can only apply a character style to the “found” text.
See the InDesignSecrets videocast #1, “Line Styles and GREP Styles” for more information.
Uh. Hmm. Let me clarify my clarification. LOL
It is possible to change fonts with a GREP Style, since you can spec a typeface in the character style that the GREP Style applies. So yes, you could change the found text from whatever typeface it’s using to the Symbol typeface.
But the key that you press for a single quote mark is not the key that you press for the “prime” glyph. (I don’t think. Actually I can’t find the prime glyph anywhere in my Symbol font. I know it’s there somewhere.) Glyph Styles can’t add, remove, or replace the glyphs/characters you keystroke in; they can only change the formatting of the characters that match their pattern.
I hate to say it, but I think you need to further clarify your clarification of the previous clarification. In the last sentence, didn’t you mean “GREP Styles can’t add…”?
(Gad, I hope this DOES constitute a clarification. I shudder to think of having muddied a clarification of a clarification.)
Allen
Anne Marie,
Thank for your excellent clarifications of what has turned slightly muddy.
Also, the Prime glyph for Symbol is just after the Latin small letter f with hook. The unicode value is 02B9. The Double Prime is just after that with a unicode of 02BA.
Option-E is the keystroke to type a single prime if the Symbol font is chosen, but I can’t find a keystroke for the double prime. It may require the Glyphs panel.
Allen,
You are right. Anne-Marie meant “GREP styles can’t add…”
Whoops! I take that back about Option-E. My text frame lapsed into Minion Pro and I got the wrong keystroke. I can’t find the keystrokes for either primes in Symbol.
If the font you want to use doesn’t have the prime characters, I would recommend using GREP styles to substitute the font, but not to Symbol. Symbol is an ugly font and a non-Unicode mess. If the font information is stripped or accidentally lost somewhere down the line, you’ll end up with some other character instead, which is harder to notice than a pink ‘missing glyph’ box. Instead, I would recommend using the character viewer* to find a Unicode font which does contain prime and matches your text font as closely as possible (e.g. if you’re in Helvetica Neue, you’ll find a suitable prime in Helvetica). That way you’ll get a much smoother appearance than if you used Symbol.
*If you’re talking about the Option key, you must be using a Mac. And therefore you have access to the character viewer (if not, turn it on by going into System Preferences > Language & Text > Input Sources and ticking ‘Keyboard & Character Viewer’. You can find the prime character by typing ‘prime’ into the search box at the bottom of the character viewer (the true prime character is the third result). Then you can click it to insert into the document at the current cursor location ? including in the find/replace dialog or the GREP styles dialog.
I never ever use InDesign’s Glyphs panel, because the Mac’s character viewer is so much easier to use, and so much more informative (it shows you all glyphs, which fonts have each one, and what they look like in every font).
I’m having an issue with my paragraph styles. I’m not that familiar with GREP other than implementing a code I’ve found online.
I set up a paragraph style that included fractions, curly quotes, and italicized straight quotes in place of primes. I set this up to use as a master that I can import the styles into any document.
For some reason, The GREP styles won’t function in a new text box even within a new document. The only one that holds true is the fractions.
I have typographer’s quotes checked on and use ctrl+shift to get straight quotes. Everything works when I type using the sample text box to make sure it worked.
GREP’s used:
Fractions: \d+/\d+
Italics: (?<=\d)[\x27\x22]
Tracking: \d(?=[\x27\x22])
Left Curly: ~{
Right Curly: ~}
Any suggestions as to why this works in the original text box but not in a new one or other existing one?
My formula for creating inch and foot marks on the Mac comes from the Art Director’s Toolkit many years ago. That is:
Shift + Option + G = inch marks (˝)
Shift + Option + E = foot marks (´)
I believe that many designers mistakenly use quotation marks for inch marks. Overall, I believe that the criteria for inch marks is that they are straight and angled (never curved and never straight up and down).
Aren’t those acute accent marks?
Yes, they are: double acute, x02DD and single acute, x00B4, not double prime, x2033 and single prime, x2032. There are two other characters that look similar to x2032 but have different codes in the Unicode standard: Greek tonos, x0384 and Greek oxia, x1FFD. In well designed typefaces, the glyphs for each of these differ subtly.