Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

GREP to replace straight double quotation marks

Return to Member Forum

  • Author
    Posts
    • #93418

      Hello, I’m new to GREP and can’t seem to wrap my head around how to use REPLACE with GREP (no style change/application needed in this case) + how to get a location GREP to work in addition to two other GREPs.

      I import Word manuscripts for books into InDesign on a regular basis and I’m hoping to simplify the process of correcting quotation marks with GREP. People often use straight quotation marks in their Word documents, and I need double left and double right quotation marks instead («»).

      1. For the purpose of replacing to double RIGHT quotation marks I have this code to find every instance of a double STRAIGHT quotation mark before any kind of punctuation or at the end of a word, and it seems to work fine:
      (~”[[:punct:]]|~”)

      However, I can’t figure out how to turn this into what I want with REPLACE. I need to retain the different kinds of punctuation throughout but change the STRAIGHT double quotation marks into the correct double RIGHT quotation marks. How do I type this out in the REPLACE field?

      2. For the purpose of replacing to double LEFT quotation marks I have this code to find every instance of a double STRAIGHT quotation mark after an open parentheses or any kind of white space:
      (\(~”|~”)

      But I also need to include finding instances of double straight quotation marks at the beginning of a paragraph, and as soon as I include this in the GREP, it no longer finds the instances after any kind of white space (located within a paragraph).
      (\(~»|~»|^~”)

      It seems the location GREP applies to the other two GREPs, but I need all three of them to work simultaneously. How can I accomplish that?

      Beforehand, thank you so much for your help!

      Best regards, Elisabeth, Norway

    • #93421
      Masood Ahmad
      Participant

      Hi Elisabeth, what I have understood is that you want to replace all the Double Straight Quotation Marks to Left/Right Double Quotation Marks…

      I think this can easily be achieved.

      First go to the “InDesign Preferences >> Type” and Check On the “Use Typographer’s Quotes”

      Then run the GREP find/change:

      GREP Find/Change:
      Find What:~"
      Change to::"

      Find: Any Straight Double Quotation Marks
      Change: Double Quotation Marks (“), [Shift+’ >> the key next to the Return]

      Let InDesign decide whether it is going to be a Left or Right Mark.

      I hope that solves your mystery.

    • #93422

      So simple! I did a small scale test with your suggestion and it seems to work like a charm. Thank you so much. :)

    • #93423
      Masood Ahmad
      Participant

      Glad that helped :)

      Things that look simple are not at all simple and the complex are not complex in real scenario!

      Sometimes the simplest problem have taken away my sleeps.

    • #116256

      I know this is an old post, but I have a somewhat related question. I have several manuscripts that were originally typeset in Australia. For dialog, single quotes are used. I need to change all the single quotes to double for American readers. Is there any GREP that you know of that will accomplish that. I obviously don’t want to replace all single quotes, as some are meant to be apostrophes. Any advice would be appreciated. Thank you.

    • #14395253
      Peggy Nehmen
      Member

      Thank you very much!! This worked perfectly.

Viewing 5 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads