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 break single work paragraph

Tagged: ,

Return to Member Forum

  • Author
    Posts
    • #94854
      Anonymous
      Inactive

      I guys…. does anybody can show me how I can use GREP to break a line when the next paragraph starts at the end other on the text box.

      Examples:

      a cinta verde que envolve o mesmo. Note (break the “Note” to next line)

      or

      não precise aguardar uma reposição. Caso (break the “Caso” to next line)

      I want that just any orphan single word at the end automaticaly go to the next line… just in cases like that, to prevent to be a single word alone.

      sorry by my english!

      Thanks!!! :)

    • #94855
      Masood Ahmad
      Participant

      To my knowledge, there isn’t any thing like end of line in GREP. If you want certain words/characters to be at the end of paragraph, then that is possible.

    • #94856

      Grep style:

      Grep code: [.?!;:…]\K[\w-]+ [to be eventually completed!]
      Char style: no-break [to be included!]

      (^/)

    • #94859
      Masood Ahmad
      Participant

      I don’t think this is going to grab the last word in a line. To my understanding it will grab all the words followed by .?!;:… and a space. I wonder if “to be eventually completed!” could add some magic to it :)

      Lets pray to God…

    • #94862

      Masood,

      Maybe you do ignore some things about Grep! Try before commenting! ;-)

      I don’t beleive in God! … Only The Force!

      (^/)

    • #94903
      Masood Ahmad
      Participant

      Hi Michael,

      I did tried, but as I said it grabs the words followed by those marks.

      I might be missing something. Can you please advise, what’s that!

    • #94906
      David Blatner
      Keymaster
    • #94908

      Hi,

      Here, we talk about the last word of each line of the para following a sentence end as “. “, “? ” “! ” …

      The grep code I gave means that a grep style applies a “no-break” to “this” word [\w-]+ and its space that follows!

      … So, it’s totally impossible to have at the end of a line in a para a single word after, e.g. a dot: It will magically jump to the beginning of the next line!

      Of course, all the words in that situation (after a dot) are targeting by the grep style but no importance (e.g. in the middle of a line).

      (^/)

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