Mobile app version of vmapp.org
Login or Join
Debbie163

: Indesign script to apply paragraph style to alternating paragraphs I have an Indesign document with the following structure: paragraph 1 blah blah blah blah blah blah blah blah paragraph

@Debbie163

Posted in: #IndesignScripting #ParagraphStyles

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Debbie163

1 Comments

Sorted by latest first Latest Oldest Best

 

@Rivera951

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme