3

I have an Indesign document with the following structure:

paragraph 1 blah blah blah blah blah blah blah blah

paragraph 2 blah blah blah blah blah blah blah blah

paragraph 3 blah blah blah blah blah blah blah blah

paragraph 4 blah blah blah blah blah blah blah blah

paragraph 5 blah blah blah blah blah blah blah blah

. . . and so on...

Now I need to leave the first paragraph as is but apply paragraph styles to all the subsequent paragraphs in the following pattern:

paragraph 2: style A

paragraph 3: style B

paragraph 4: style A

paragraph 5: style B

. . . and so on (alternating pattern)...

I know this can be automated using scripts and I also know a bit of programming in general (JavaScript) but I have no idea how to go about doing this in Indesign. Any suggestion?

1 Answer 1

7

They covered this in my last User's Group meeting.

First, you have to set up your paragraph style's Next Style. If you want the paras to go Style A -> B -> A -> B etc, you have to have paragraph A's next style be Paragraph B, and Paragraph B's next style must be style A. Your styles must create a loop. You can do this with any number of styles.

Select ALL the text that you want styled (you can use GREP for this if you need to).

Right-click and select Apply Name then Next Stlye (and leave overrides if there is local formatting)

In the demo, the instructor did this with a 10-page list of names, email addresses and phone numbers, each paragraph getting a different formatting.

2
  • 1
    What a simple and straightforward solution!! I had been torturing myself with the thoughts of writing scripts and whatnot. Thank you so very much!
    – TheLearner
    Feb 12, 2015 at 21:01
  • Yup. These kinds of problems can give you nightmares. Thankfully Indesign is a powerhouse and gives us lots of tools to overcome issues like these.
    – Preston
    Feb 13, 2015 at 0:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.