Force Apostrophes Instead of Foot Mark

835 views
Skip to first unread message

Ed Wong

unread,
Feb 7, 2013, 9:12:14 AM2/7/13
to xmpie...@googlegroups.com
Hi all,

I know how to turn off and on Typographers Quotes in InDesign. I have a need for more straight foot and inch marks than the need for a curly apostrophe. So I turn off Typographers Quotes in InDesign and all of my variable foot and inch marks are perfect.

Problem is the I also need curly/Typographers apostrophes.

Is there a way to:

A. Format the copy on Excel or Access so that XMPie/InDesign recognizes the difference between a foot mark and an apostrophe

B. Do a find and replace in QLingo

C. Character style in InDesign


Thank you for your valuable time with this,
Ed



Matt

unread,
Feb 7, 2013, 1:03:21 PM2/7/13
to xmpie...@googlegroups.com

Ultimately, you want to use a single prime or a double prime instead of quotes. These are the real marks used for things like inches, feet, and other measurements. They are actually separate characters (with their own unicode values) and basically look like a straight quote or apostrophe, but at a slight angle. Problem is not all fonts have glyphs for these characters...but many do…for instance, Helvetica.


So, assuming the intended font has those glyphs, you could use qlingo find and replace and a set of conditions to change the apostrophe or quote to a single or double prime.


From Couch in another post...uPlan has a function that inserts a unicode value in to your string:


"Hello" + HexToUnicode("2003") + "World" = Hello—World


So, we can use that in the find and replace statement:


FindAndReplaceChars (|->[FIELD_TO_SEARCH], "'", HexToUnicode("2032")


This will change the apostrophe to a single prime mark.


by the way, here's a good website I found to get unicode values: http://www.fileformat.info


If the ADOR will just have primes, then that formula alone should do it. This allows you to leave smart quotes (typographer's quotes) turned on in inDesign and have curly quotes throughout your document that will not be affected. If both primes and curly quotes will possibly exist in a single ADOR, it gets more complicated, but you could write a set of conditions based on what strings precede the primes that will do a search and replace on only those strings.


The problem is if you have a font that doesn't include prime glyphs. I haven't come up with a good answer for that. You could turn smart quotes off in inDesign (uncheck "Use Typographer's Quotes" in prefs) and then do a GREP style that would change the apostrophe or quotes to italics and give it a style ADOR. This approximates the look of a prime, but then the problem is that you lose all of your curly quotes. I haven't found a way to do a GREP style or programmatically turn smart quotes on and off that a style ADOR can trigger. 


I'm still a newbie at all this, but hopefully this helps or at least gets you on the right track.

Ed Wong

unread,
Feb 7, 2013, 1:33:10 PM2/7/13
to xmpie...@googlegroups.com
Great info Matt, thank you.

My challenge now is to figure out how to differentiate when I need an apostrophe and when I need a single prime. 

The data may come in with a mix, example:   15' x 10' Lumber's.

This is one data field and trying to differentiate between the two is what my challenge is now.


Thank you,
Ed

Ed Wong

unread,
Feb 7, 2013, 2:44:32 PM2/7/13
to xmpie...@googlegroups.com
Got it.

Matt, your unicode vales got me thinking to find and replace the apostrophe with the unicode value. I did a search and here is what I found:

Type Curly Single Quotes--
On a Mac, use Option+] and Shift+Option+] for the left (open) and right (closed) single quotes. For Windows, use ALT 0145 and ALT 0146 for the left and right single quotes (hold down the ALT key and type the numbers on the numeric keypad).

Type Curly Double Quotes--
On a Mac, use Option+[ and Shift+Option+[ for the left and right double quotes. For Windows, use ALT 0147 and ALT 0148 for the left and right double quotation marks (curly quotes).

So I do a find and replace in Excel to replace the keyboard apostrophe with the unicode. You have to do it one and a time so you don't screw-up what should be foot marks. Then in InDesign you turn off Typographers Quotes.

Thanks for the help Matt,
Ed

Matt

unread,
Feb 7, 2013, 5:47:42 PM2/7/13
to xmpie...@googlegroups.com
No problem. I'm still very new to XMPie and this group, so I'm at the early stages of learning...but I figure I need to start trying to help others and in the process learn more myself. 

Doing Find and Replace in the data works. Guess I should have started there. :-)

That said, I always try to do things programmatically in uPlan when I can. That way, I don't have to worry if the data is right because it will get fixed when the plan is executed. ZIP Codes are good example. I used to scrub my Excel files to make sure the ZIP Codes were strings and had all their leading zeros (East Coast ZIPs), but I found that I often forgot to do this or messed it up, etc. When we started on XMPie, our trainer, Deb, showed me how to write a function in uPlan to automatically fix them. Simple, but powerful. Now, I never have to worry about making sure those ZIPs are right in the Excel file. 

So, that would be me thought with this...but I suppose it depends on how often you will run this job and if the data will change. If it's only once, then yeah, probably quickest to just do search and replace in Excel.

That said, I think you could write a function that would detect when the apostrophe is at the end of a number and change those, but leave other apostrophes unchanged. You could even use an IF/THEN statement to deal with multiple conditions where it might be a prime versus a real apostrophe.

Just a thought...like I said, probably not worth it, if it is a one-time job. 

couch

unread,
Feb 7, 2013, 8:13:52 PM2/7/13
to xmpie...@googlegroups.com
For the benefit of future searchers on this topic, the following web page provides the unicode values of the different types of quote marks:

(Remember to double check that they are supported by the font that you intend to use.)
Reply all
Reply to author
Forward
0 new messages