Conditional Styling Rules for InDesign
With this plug-in you can define conditions for automatically applying paragraph styles or local formatting.

This article appears in Issue 46 of CreativePro Magazine.
Let’s take a moment to savor the plain honesty of a simple InDesign plug-in whose name is the description of what it actually does. Conditional Styling Rules, the inaugural offering of Romania-based Krommatine Systems, enables InDesign to apply styles based on a set of rules, or conditions, in a document’s paragraph styles. Book production designers have long wished (in some cases for decades) for InDesign to perform this core function.
Now, they simply wish it would perform a little better. The plug-in is not without some significant shortcomings, but it works, at least in the limited test that I could do on a sample book project. Flaws aside—and developer Vlad Vladila is close to fixing them in a forthcoming release—Conditional Styling Rules is worth immediate consideration if you build books.
You can search for a paragraph style and define conditions of that search—say, only body text that follows a B-head. Or you can look for styles, either first or last, in a story, cell, or footnote. You can search for styles that are or are not preceded by, or do or do not follow, another style. Along the way, you can ignore footnotes, table cells, parent pages, or hidden items. You can save the specified conditions as rules (Plug-ins > Conditional Styling Rules > Conditional Styling Rules), which then show up clearly in a new panel (Figure 1).

Taking a Test Drive
As a test, I paginated a public-domain book from Project Gutenberg. (I chose the 1926 title, Public Opinion and the Teaching of History in the United States, solely because it used two levels of subheads.) I downloaded the HTML version, opened it in Word, and saved a DOCX, thus creating a reasonable and common real-world test to put the plug-in through its paces, complete with default paragraph styles that imported into the INDD file.
My exercise immediately provided me with three scenarios where you’ll reach for this product.
The chapter number and chapter title imported from Word as one line separated by a soft return and styled as Heading 3 (Figure 2).

Of course, you can use a GREP search to separate the lines (Figure 3), but from there, both lines retained that original style. Instead, I created a new chapter head style, Heading 3 (CT), and a style rule to search for paragraphs styled H3 that were preceded by H3 and then apply this new style (Figure 4).


I wanted the intro text for the chapter to start with a drop cap. I defined a new style based on Body Text and called it Body Text (intro). Next, I created a rule to search for Body Text preceded by Heading 3 (CT) and then replace the result with my new style (Figure 5).

I wanted Body Text that followed the next level of subhead, which came in as Heading 4, to omit the first-line indent. Again, I created a variant, Body Text (section break) (Figure 6). One click of the rule in the panel transformed every instance throughout approximately 300 pages of text.

You also have the option of replacing text not with a style but by applying local formatting on the paragraphs that Conditional Styling Rules finds for you (Figure 7). Vladila, clearly still traumatized by a document that he describes as a “300-page labyrinth of nested lists,” wants to give users a way to avoid what he describes as “extreme style-itis.” By automating local formatting this way, you might be able to reassess your discipline of making styles for every scenario, which Vladila suggests can overwhelm and confuse those who try to use your file.

While you can’t create groups of these individual rules, you can select multiple conditions and apply them en masse with one click of the Apply button at the bottom of the panel. You can apply any of your rules to a selection, a story, or the entire document.
Though this plug-in is clearly written with book and long-document production in mind, Vladila says some of his users have opened his eyes to some other uses. One user has deployed it for “post-production of large numbers of note cards” generated from a backend system, he says; another uses it in an automated workflow to flag missing content, changing the color of remaining styles to attract the attention of a human designer.
The Flip Side
Conditional Styling Rules is a very young product, Krommatine is a very young company, and despite Vladila’s report that the plug-in is the product of more than 500 hours of development since his experience with the 300-page labyrinth inspired him to create scripting solutions in 2010, the end result feels rough. Doubtless some of this roughness comes from his developing the product in UXP (InDesign’s new and more modern flavor of JavaScript), which itself is still a young technology and is experiencing some growing pains, Vladila says.
Despite a beautiful congruence with Adobe’s own user interface—the plug-in panel looks like it shares DNA with the New Document dialog box—you’ll find some roughness here and there in minor details (like the use of “master pages,” just when the InDesign community is finally used to referencing them as parent pages). A click on the company logo will take you to a website that at this writing was clearly unfinished.
But the real gaping maw in the product’s capabilities is its inability to import its rules from other InDesign documents. Create a new document, and you’re starting from scratch.
Vladila says that in the product’s next release, he’s planning to address this serious shortcoming: The rules are document-based, and you can’t export or import them. For now, you can get around that by opening a new file from a template with defined rules for the plug-in or by saving a copy of a source document and deleting all your pages, creating a new document environment with the conditions intact. I figured out a way to copy and paste the rules from one IDML file to another, but that solution seems reckless in a production environment. You will need to re-create these conditions if you use a previous InDesign release to open an IDML or use Adobe’s on-the-fly conversion.
But these are only irritants in the big picture: The plug-in really is elegant. Defining (or redefining) rules is quick and intuitive, and on any significant book project, building these conditions anew would be a small price to pay for now.
And Vladila comes highly recommended by his mentor and former TypeFi colleague, Peter Kahrel, the InDesign scripting rock star whose abundant contributions to tools for automating long documents have saved InDesign users countless hours. The endorsement is meaningful in the extreme.
When I designed books for a living, I developed agonizing workarounds to accomplish these same goals, going to ridiculously complex extremes of transforming tagged text and using GREP to find patterns with which to get my styles right in one process for automatic, flawless typesetting. For those of us who pushed through this world, using this product almost feels like cheating. Given its reasonable price point and its developer’s bona fides, it’s worth a try.
Commenting is easier and faster when you're logged in!
Leave a Reply
Recommended for you

Illustrator Downloadable: Tropical Shadow Overlay Kit
[memb_has_any_tag not=not tagid="282,643,655,657,1664"] Downloadables are an exc...

Illustrator Downloadable: Summer Citrus Pattern Set
Downloadables are an exclusive benefit for CreativePro members! (Not a member ye...

InDesign Downloadable: Tables SuperGuide
Downloadables are an exclusive benefit for CreativePro members! (Not a member ye...
Is there a link available where we can check out this plug-in?
Sorry, there should have been one in the first paragraph. It’s there now.