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 for breaking titles

Return to Member Forum

  • Author
    Posts
    • #14357960
      Constanza Pacher
      Participant

      Hello,

      Is there a GREP style (or nested style?) that can automatically break long titles in the same way? For instance, break line after 2 words? I am trying to automate chapter titles that appear centered on the page, and I’m looking for consistency in words per line.

      Thank you!

    • #14357973
      David Blatner
      Keymaster

      GREP Styles cannot insert characters, no… You could use the GREP feature in Find/Change to insert characters (like a line break).

    • #14357975
      Max Pinton
      Participant

      Have you looked at “Balance Ragged Lines”? You have to be using the Paragraph Composer or it does nothing, but it seems pretty useful for headlines.

    • #14357976
      Constanza Pacher
      Participant

      Thank you David and Max, both answers are useful!

    • #14357977
      Dhafir Photo
      Participant

      Try this mad trick
      Create a character style with Horizontal Scale: 1000%, and Tracking: 10000
      Then use it with GREP Style by this regex ^\S+\S+\K

    • #14358110
      David Blatner
      Keymaster

      Wow that is awesome, Dhafir! I did not realize you could set tracking and horizontal scaling that large… However, here is something weird: Your trick only seems to work for the first paragraph in a text frame. If there is another heading later in the story, it stops working. Isn’t that strange? Does it work for you?

      • #14358811
        Dhafir Photo
        Participant

        Hello David!
        In this case just add (?s) “Single-Line On” before the regex: (?s)^\S+\S+\K

      • #14358813
        David Blatner
        Keymaster

        Wow, that’s crazy! To be honest, I have never quite understood the single-line on/off features. This makes no sense to me… but yes, I can see that it works. Well done.

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