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 question

Tagged: 

Return to Member Forum

  • Author
    Posts
    • #74113
      Luke Hall
      Member

      Hello,

      I was wondering if anyone could help me.

      I am looking to apply a character style only when a particular character is talking (including speech marks) in a text for example:

      “I could not do that,” said Sancho, “for when I separate from your worship fear at once lays hold of me, and assails me with all sorts of panics and fancies; and let what I now say be a notice that from this time forth I am not going to stir a finger’s width from your presence.”

      So far I have got to:

      “.*?”(?= said Sancho,)
      (?= said Sancho,) “.*?”

      Which works to a degree but this is very specific.
      Is it possible for whenever the character occurs in paragraph, I can format first occurrence of speech marks before and after characters name?

      Any help will be much appreciated,

      With best wishes,

      Luke

    • #74114
      David Blatner
      Keymaster

      Tricky. What if another character says:
      “You are muy guapo Sancho,” said Lupe, as she put down the gun
      That line has “sancho” in it, too…

    • #74115
      Luke Hall
      Member

      Thanks for the quick response,

      In this case I would remove the styling by hand as from what I have seen this doesn’t occur too frequently.

      Best,
      Luke

    • #74116
      Luke Hall
      Member

      or is it possible to specify left and right quotation mark.

    • #74131
      Aaron Troia
      Participant

      Yes, in InDesign GREP a left double quotation mark is signified as ~{ and a right double quotation mark is ~}

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