8 Replies Latest reply: Sep 3, 2013 5:46 AM by [Ariel] RSS

    Set up "Apply Style unless"

    PurplePlumUK Community Member

      Hi

       

      In web design you can create exceptions by saying: if something occurs after, or adjacent to, do this. ie (css): h1 + p { margin-top:0px; }

       

      Is it possible to do this in InDesign?

       

      I want to give InDesign the instruction: "Apple a paragraph before of 3mm UNLESS following a paragraph in {'Heading'} style" I want a wider paragraph 'before' on body text when it's following a paragraph in the same style and a narrower paragraph 'before' when it's following a heading.

       

      Thanks

        • 1. Re: Set up "Apply Style unless"
          Eugene Tyson MVP

          I think some screenshots would work wonders here - I don't follow all that web lingo at all

           

          I think what you're looking for is Apply Next Style

           

          But I'm not sure

          • 2. Re: Set up "Apply Style unless"
            Peter Spier ACP/MVPs

            If I understand what you want, and I'm not sure I do, then you need two paragraph styles, one that follows the headings with the narrow "space before" and one that doesn't follow headings, with the wider space. You should set the "next style" attribute of both the the wider-space style.

            • 3. Re: Set up "Apply Style unless"
              [Ariel] Community Member

              Nope, InDesign doesn't do conditional styles. It would be a very useful

              feature and you should consider filing a feature request.

               

              You still have to do it all manually -- define a separate paragraph

              style for each difference, and apply the paragraph styles manually. So

              you might have a style called "Subhead A" and another called "Subhead A

              following Chapter Title" etc. etc.

               

              To help keep all this under control, it's probably worth taking the time

              to create paragraph style groups and put the different, but related,

              paragraph styles in their own group. But this is purely an

              organisational thing -- it doesn't actually provide any extra functionality.

               

              To cut out the tiresome process of having to go through all your

              document applying the right paragraph styles, I sell a script on my

              website (www.freelancebookdesign.com) called "Change Consecutive

              Paragraphs", which allows you to say something like: "Whenever Subhead A

              is followed by Chapter Title, replace Subhead A with

              Subhead-A-following-Chapter-Title" etc. It then goes through the

              document and makes the necessary adjustments. Many people use this

              script to save them hours of tedious work. Worth checking out if you'll

              be doing a lot of this, I think.

               

              Ariel

              • 4. Re: Set up "Apply Style unless"
                PurplePlumUK Community Member

                Thanks everyone for pitching in.

                 

                Ariel,

                You confirm my suspicions. Styles are best when kept to a minimum optimum number (as you clearly recognise).

                • 5. Re: Set up "Apply Style unless"
                  sandeecohen ACP/MVPs

                  I didn't know about Ariel's script. This would have helped me enormously for years, doing my book. As it is, I've made some compromises in the design to work around the limitation. I'm in the process of revising my template, so I may have to buy the script to take advantage of the feature.

                  • 6. Re: Set up "Apply Style unless"
                    [Ariel] Community Member

                    I recommend it, and not just because I get the price of a pizza per license sold! It really saves time.

                     

                    Shameless plug: It's worth having a look at this page on my website: http://www.freelancebookdesign.com/scripts

                     

                    It's a quick summary of all the scripts I sell. It's good to know what's out there for your hour of need! Why slog away when there's a cheap script available that will do the work for you!

                    • 7. Re: Set up "Apply Style unless"
                      PurplePlumUK Community Member

                      Yes Sandee...

                       

                      The words: "compromises to the design" should be a red flag for Adobe. It's really-really not good.

                      • 8. Re: Set up "Apply Style unless"
                        [Ariel] Community Member

                        What makes this such a good feature request, though, is that Adobe is focusing on ePub export these days. Well, if they implemented conditional paragraph styles, that could be carried through to ePub export -- since the CSS for this sort of thing is respected by ePub viewers as far as I can tell.

                         

                        Seems like a no-brainer to me.