4 Replies Latest reply on Jan 28, 2015 5:41 AM by Laubender

    Nested Line Style affecting my GREP style

    Colin Flashman Adobe Community Professional

      Hello all.

      I'm formatting a large book at the moment and am trying out a "runt fixer" to prevent bad sentence breaks in columns. So far I have created a character style that only applies the "no-break" attribute, and have two GREP styles - one looking for a space and 8 characters or less before a full-stop, exclamation mark or question mark; and another looking for the 8 characters or less then a space after a full-stop, exclamation point or question mark. The codes are:

      \s.{1,8}[.!?]

      and

      (?<=[.?!]\s).{1,8}\s

      It works... nearly. It has issues when fullstops are used in numbers such as displaying currency, dates... but largely works for the text.

      The problem occurs when I go to the Drop Caps and Nested Styles feature, and use the "New Line Style" - in this instance it was used at the beginning of chapters to make the first line smallcaps. Instead, something strange happened to the second GREP style - it no longer worked.

      In case I'm not explaining myself properly, i've uploaded a sample of what is going on here: https://dl.dropboxusercontent.com/u/55743036/runt-issue.idml

      The first page is OK, but the second page displays the fault. I've colorised the GREPs so that it is clear what is not breaking at the end of a sentence and what is not breaking at the start of a sentence.

      Has anyone experienced this before or can tell me what is going on? it is my error or is it a bug?

       

      Colin

        • 1. Re: Nested Line Style affecting my GREP style
          Laubender Adobe Community Professional & MVP

          @Colin – what is the version of InDesign where you see the problems?

          I just opened your IDML in InDesign CS5.5 and I can see that the GREP "no break of start of line" will not be honored after doing the "New Line Style". So yes, something has changed…

           

          And that line style will break the GREP even if you do nothing to format the text, even if all features in the used character style are set to "ignore" formatting (I did that, because I wanted to know, if the feature Drop Caps would do the harm).

           

          Uwe

          • 2. Re: Nested Line Style affecting my GREP style
            Laubender Adobe Community Professional & MVP

            @Colin – and it will not change from showing the effects of the GREP Style "no break of start of line", if you are doing local formatting in the first line of a paragraph (introducing a new text style range, technically spoken).

             

            But definitely with the feature "Line Style" for the first line the GREP Style will not kick in.

             

            Does a redraw of the text will help?
            No. If you open an IDML the text always has to redraw…

             

            It seems you found a bug…

             

            Uwe

            • 3. Re: Nested Line Style affecting my GREP style
              Colin Flashman Adobe Community Professional

              Looks like a bug to me too Uwe. I've submitted it via Adobe's Wishform.

              • 4. Re: Nested Line Style affecting my GREP style
                Laubender Adobe Community Professional & MVP

                @Colin – I thought, I could make it work, if I introduce another GREP Style BEFORE the one that is not working: A GREP Style, that is doing nothing (applying the character style "[None]" to a character like "§" that is simply not in the text. Did not work.

                 

                Another attempt with InDesign CS5.5 OSX 10.6.8: I made a new paragraph style BASED ON the one that is not working. Changed nothing in that new one, just let it be based on the not working one.


                Now: THAT IS FINALLY WORKING! But in a different way I expected…

                 

                NewParaStyleBASEDonNOT-WORKING-STYLE.png

                 

                "Will work" is based on "not working".

                Here all GREP Styles used in "Will work":

                 

                NewParaStyle-GREP-Styles.png

                 

                Uwe