• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Explorer ,
Aug 26, 2024 Aug 26, 2024

Copy link to clipboard

Copied

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

TOPICS
How to , Type

Views

323

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 26, 2024 Aug 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. 

Votes

Translate

Translate
Community Expert ,
Aug 26, 2024 Aug 26, 2024

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 26, 2024 Aug 26, 2024

Copy link to clipboard

Copied

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. ..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 26, 2024 Aug 26, 2024

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 26, 2024 Aug 26, 2024

Copy link to clipboard

Copied

Apologies - responded to the wrong bit. Willi's suggestion DOES work for me. See below.🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 26, 2024 Aug 26, 2024

Copy link to clipboard

Copied

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 26, 2024 Aug 26, 2024

Copy link to clipboard

Copied

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 26, 2024 Aug 26, 2024

Copy link to clipboard

Copied

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. 

AlisonClearlyStated_0-1724671826678.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 26, 2024 Aug 26, 2024

Copy link to clipboard

Copied

Find " and replace all with " will change all quotes to the correct ones according the language or no language.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 26, 2024 Aug 26, 2024

Copy link to clipboard

Copied

LATEST

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines