21 Replies Latest reply on Apr 28, 2014 3:12 PM by Peter Spier

    GREP question ... removing indent in first instance of paragraph style

    Spenno

      Hi all. I have a GREP question if anyone can help?

      I have story books with one story per page. There are three paragraph styles used in each story - Title, Text and Author. There is a break to next page command in the Title style, so only one story appears per page.

      The Text style is indented 4mm on each first line.

      The editors would like the first paragraph written in this style in each new story to not be indented. In hindsight another Text style ie Text_No Indent would have been ideal - but it's a bit late for that!

      I can't think of a find and replace that will only select the paragraphs I want.

       

      Is there a GREP I can enter into the Text style that will remove the indent, or replace it with a new paragraph style without one - but only in the first instance in each story? Of course the GREP will need to know what the first paragraph is each time and it will simply be the paragraph that immediately follows the Title on each new page.

       

      Example:

       

      Story title

       

         Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle.

         Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle.

       

      Author's name

       

      Desired outcome (note only first indent is removed):

       

      Story title

       

      Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle.

         Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle. Once upon a time there was a princess who lived in a castle.

       

      Author's name