Using “Change Consecutive Paragraphs Pro”
InDesign gives the user no simple way to adjust the paragraph style of a paragraph depending on the paragraph style of the paragraph before or after it. Yet typesetting a book, magazine or newspaper involves spending much time doing this.
For example, a common pattern in book design is that the paragraph that comes after a chapter heading in a book should have a drop capital at the beginning. Or, for example, the paragraph following a block quote should not be indented.
Even InDesign’s excellent Find/Change doesn’t provide a convenient way of doing this – there is no way to create a find/change query to search for a previous paragraph with style X and apply style Y to the following paragraph. (It can be done with multiple find/change operations, but this is an inadequate workaround.)
Change Consecutive Paragraphs Pro (CCPP for short) makes it easy to modify the paragraph style of text based on the paragraph style of the text before or after the paragraph.
What’s more, with CCPP you can save your settings for reuse in a different document, and it even comes with a functional batch editor that allows stringing together many change sequences and running them all at once on a document.
Making effective use of the CCPPs batch editor can seriously speed up the laborious, time-consuming and error prone work of applying the right paragraph styles to books, newspapers and other documents.
This brief User Guide will show how to make full use of all the power of Change Consecutive Paragraphs Pro to speed up and improve your typesetting workflow.
The Main Window
Here’s a screenshot of the main window:
The controls are as follows:
(1)–(4) The basic paragraph style dropdowns. Read all 4 together as though they were a single sentence: “If paragraph style A is followed by paragraph style B, then change style A to style C and B to D.” All the paragraph styles in the document appear in these dropdowns, with an indication of which paragraph style group they are in (if groups are being used in the document).
Note: The last item in dropdowns (3) and (4) is a “No Change” option. Select this if you want to change only one of the pair of styles. For instance, if your desired sequence is: “If style A is followed by style B, change B to C (leaving A unchanged)” select “No Change” in dropdown (3).
Tip: Another way to leave a style unchanged, apart from selecting “No Change” as explained in the previous note, is to select the same style in (3) as in (1), or in (4) as in (2). In all these cases, no changes will be made to the styles, including not removing overrides even if checkbox (5) is checked.
Tip: To make it easier to select the styles, before running CCPP place the text cursor in a relevant paragraph. Now when you run CCPP, dropdowns (1) and (3) will show the paragraph style applied to the text under the cursor, and dropdowns (2) and (4) will show the paragraph style of the subsequent paragraph. This can be a great time-saver, so take note!
(5) Checking this box tells CCPP to clear all local overrides when it applies any paragraph styles. For example, if a paragraph had italics applied to some words as a local override (that is, without using a character style), then the italics will disappear from that paragraph if CCPP changes the style of paragraph, if this box is checked.
(6) This is a powerful option which will be described in more details, with examples, below. In brief, it means that if there is a run of paragraphs all having the same style as the style/s chosen in dropdown (2), they will all be modified, and not just the first.
(7)–(8) Use these buttons to add or remove dropdowns under dropdown (2). This will be explained in more detail below, but the basic idea is that it makes it possible to choose multiple paragraph styles in the (2) slot, all of which will be changed to the style chosen in (4) if they are preceded by the style chosen in (1).
(9) The Execute button will run CCPP. The script will search the entire document (there is currently no option to search only part of the document). Wherever it finds a sequence of paragraphs matching the choices made in dropdowns (1) and (2), it will modify the paragraph styles accordingly.
Important: CCPP respects the options currently active in InDesign’s Find/Change window regarding locked and hidden layers, master pages, and footnotes. To ensure that CCPP makes changes in text appearing in any of the above, make sure those options are selected in Find/Change before running CCPP.
(10) The Finish button closes the dialog and exits the script. (Note that from version 2.0.5, this button is called “Close”.)
(11)–(12) One of the great features of Change Consecutive Paragraphs Pro is that you can save the change-sequences you create for reuse later in the same document, or in another document. The Load and Save As buttons let you save the current change-sequence, or load one previously created.
Note: If your document uses paragraph style groups, the styles selected in the dropdowns are stored along with the group they are in. So when loading a previously saved change-sequence, CCPP expects to find the paragraph style sitting in the same style group/s. For example, if a saved sequence refers to a style called “Body Text” inside a group called “Main Text”, loading that sequence in a document that does not have a style group called “Main Text” will result in a “style not found” error, even if the document does have a style called “Body Text”.
Tip: Clicking on the Save button while holding down Shift on the keyboard will save the change-sequence, and automatically add the newly saved sequence to the batch file currently in the Batch Editor. This makes it quick to add change-sequences and build a batch without having to constantly switch to the Batch Editor to add files. Note that it only works if there is a batch currently loaded in the Batch Editor.
(13) The Batch Editor button launches CCPPs powerful batch editor, where multiple saved change-sequences can be strung together and run in one go.
(14) The About button displays the current version of the script, includes links to this web page and other useful online links, and includes a checkbox to add Change Consecutive Paragraphs Pro to the optional Id-Extras menu that can be added to InDesign’s main menu. Read more about that here.
In the following document, there are 5 paragraph styles. To begin with, the document has 5 paragraphs, with each of the styles applied. (To make it easy, the only difference between the styles is their color and a different left indent for each style.)
Running the following change-sequence:
Results in the following changes:
Where Style Yellow follows Style Red we asked to change Style Red to Style Green and Style Yellow to Style Blue, and this is what has happened.
Continuing from the previous example, if we now set the options as follows:
The result will be:
Note that Style Green has been left unchanged (dropdowns (1) and (3) are the same), and both instances of Style Blue following Style Green have been changed to Style Red.
Example 3: Using the “or” Option
Clicking on the + button (button (7) above) allows us to select multiple styles for the second dropdown. In the following screenshot, we have added one extra dropdown and set the options as follows:
Let’s run this change-sequence on the following document:
The result is as follows:
Why? Because we told CCPP that wherever Style Green is followed by either Style Red or Style Dark those two styles should be changed to Style Blue. And that’s what’s happened.
Note that we only added a single “or” option. But it is possible to add multiple dropdowns by clicking on the + button, creating powerful change-sequences.
Example 4: Using the “Consider as … Single Unit” Option
Look at the following document with the following settings:
Running this change-sequence results in
Only the second paragraph has been changed, as expected.
However, what if we had wanted all the blue paragraphs to change to dark? To do this, check the bottom checkbox (“Consider Consecutive Paragraphs of all Styles in (2) as a Single Unit” – if you can think of a shorter description, please let me know!):
Now when we run this on the original document at the beginning of this example, the result is
The final four paragraphs, all of them, have been changed to the dark style, because they all originally shared the same “Style Blue” style.
This checkbox works also when several “or” dropdowns have been added to (2).
Saving Change Sequences
If you would like to reuse a change-sequence later, or if you plan to use the batch editor, click on the Save As… button to save it. It is saved as a plain text file, with a .ccpp extension.
Using the Batch Editor
The batch editor allows you to load multiple, previously-created change-sequences, arrange them in the desired order, and run them all as a batch with a single click.
- Click the Batch Editor button to display the following window. When opened, it will automatically load up the last saved batch that was used with this document, if available.
- Click on the Add Files button to add files to the batch. Navigate to a folder containing previously saved change sequences (see “Saving Change Sequences” above) and select one or more of them. They will now appear in the batch editor. Alternatively, if you have previously saved a batch (using the Save Batch As button, as described below), click on the Load Batch button to load all files in a previously saved batch.
A preview of each file is shown in the pane on the right to show what changes will be made when it is run.
- Select a file from the list on the left, and use the Up and Down arrows on the left to change the order of the files. The batch will be run from top to bottom, and clearly the order in which changes are made can make a big difference to the result, so it is important to get the order right.
- Once you have added all the files to the batch and arranged them in the correct order, you may save these settings by clicking on the Save Batch As… button. This will store the files used in this batch sequence, and the order they have been placed in, so that the batch can be quickly reloaded, ready to run on a different document.
The batch file is a plain text file saved with a .ccpb extension.
- Click on the Save Batch button (not shown; available from version 2.0.5 upwards) to save any changes to the current batch without having to select the file from the file browser.
Note: The actual files are not saved when you save a batch file – the batch file only includes the path to the included files and the order in which they are to be executed. So if the files are moved or deleted, the batch will need to be reconstructed. The batch file uses absolute paths to the files only, not relative paths, so moving the saved change-sequence files to a different folder will spoil the batch.
Tip: If it is necessary to move all the .ccpp files to a different location, you may consider opening the .ccpb batch file in a text editor and using find/change to replace the old path with the new.
- Click on Run Batch to execute all the change-sequences in the order they appear in the panel on the left.
- If any of the files in a batch refer to a paragraph style that does not exist in the current document, an error message will be displayed, that particular change sequence will be skipped, and batch processing will pick up from the next file.
In this tutorial, you will learn how to use Change Consecutive Paragraphs Pro to quickly format a recipe book that is being put together in InDesign.
Please feel free to post any questions or comments directly related to Change Consecutive Paragraphs Pro below.