Skip to main content
Alison - Clearly Stated
Inspiring
August 26, 2024
Answered

Need straight and curly quotes in same file - how to find and replace

  • August 26, 2024
  • 3 replies
  • 1298 views

Hi.

I do the layout for an association's journal. They are an association of software developers. In the normal body text, quotes (both single and double) and apostrophes need to be typographers'/curly quotes. In code listings, they need to be straight. This is in a single article (file).

No matter which option I have for default, the whole lot becomes that variety when pasted. Finding and replacing seems to replace with whatever the default is, no matter what I type in the 'replace'. 

This is a real problem because I have to find, select and replace manually with a keyboard shortcut. I then have to repeat the exercise if for any reason I cut/copy/paste a chunk elsewhere. And I miss some.

With FrameMaker, I could paste as straight (the default), put one into 'curly', then step through a find/replace exercise. It took 4 passes of a file (left single, right single, left double, right double) but was still quicker than having to visually select and manually type the replacement. 

What am I missing?

I don't mind whether my find/replace takes me from curly to straight or vice versa... but I'm stepping through the current file MANUALLY for the 4th time now!

Any help gratefully received.

Alison

This topic has been closed for replies.
Correct answer Willi Adelberger

For text use the typographic quotes from the language. 
For code apply a character style, or if the whole paragraph is code,  the paragraph style with the language property "No language". 
InDesign will apply straight quotes to text with no language. 

3 replies

Susan Culligan
Inspiring
August 26, 2024

There's a straight quote in a monospace font named PT Mono (available in Adobe Fonts)--see "straight quote" screenshot. I tried it in InDesign, and it didn't curl when I used it in a document set to use curly quotes. You could change your code font to PT Mono, "find" the quote character, and "replace" it with the character copied from Character Map UWP (the app I use). It's all the way down at the bottom of the character list under "Private Use." 

 

I did a find/replace in a line of code ("code" screenshot) that I pasted into an InD doc set to use curly quotes, and when I replaced it with this character it came in straight.

 

Give it a try. If it doesn't work as expected, my apologies!

Willi Adelberger
Community Expert
Willi AdelbergerCommunity ExpertCorrect answer
Community Expert
August 26, 2024

For text use the typographic quotes from the language. 
For code apply a character style, or if the whole paragraph is code,  the paragraph style with the language property "No language". 
InDesign will apply straight quotes to text with no language. 

Alison - Clearly Stated
Inspiring
August 26, 2024

Thank you! That's the type of thing I was hoping to find - something 'inbuilt' that I was just missing. 🙂 Off to try it now. As I use styles for code (paragraph for blocks and character for odd words) it should be fairly straightforward. Off to try!

Alison - Clearly Stated
Inspiring
August 26, 2024

OK, it seems to half-work, which is good step further forward. If I've already got text that is straight quotes and I copy/paste it, it keeps the straight quotes and doesn't keep reverting. I may need to copy/paste in chunks (set paragraph format at insertion point, paste a chunk of code) but that should solve about 80% of my issue. 
And it's also solved the 'Find/Replace' not working if I've pasted in as body copy then marked up as code... I think before it was replacing but then automatically reverting (format-as-you-type/paste). It's now staying as straight quotes. As far as I'm concerned, 100% fixed. Thank you so much... will save me HOURS. 

 

Peter Spier
Community Expert
Community Expert
August 26, 2024

I'm not sure what you mean by stepping through manually, so using the Glyphs tab of the Find/Change dialog may not be any faster (or may  be what you use now).

I'm thinking, though, that a script, which I don't write, might add some functionality to the search. The Find/Change dialog for glyphs does not allow you to specify a paragraph or character style as you can with a text or GREP query, but a script might be able to do that for you.

Alison - Clearly Stated
Inspiring
August 26, 2024

Using the Glyphs box helps me find them... but once found, I have to manually type the keyboard shortcut (at the moment, for straight quotes in code, so Alt + ' for single and Alt + Shift + ' for double.

Selecting the glyph in the 'replace' box doesn't work for some reason... it marks the character as 'changed' (blue background) but visually keeps it as it is. I'll see if I can find a combination that works.  I don't need to search by style  - by font is fine, and that's what I'm using. Thanks for replying. Maybe  I need to try various combinations of 'automatically correct' with the find/replace. ..

Peter Spier
Community Expert
Community Expert
August 26, 2024

I had some mixed reults with find/change glyphs not swtiching myself. Willi's suggestion below seems like a great idea, but iti isn't working for me here.