Contextual paragraph styles in InDesign

Nick Sherman's picture

I've found a few threads on this topic, but none from the recent past; I'm hoping things might have changed since then (perhaps in CS4, which I'm less familiar with)…

In InDesign, is there any smart (i.e. truly automatic) way to indent the first line in all but the first paragraph? To date, I've simply been making a separate child paragraph style named "First paragraph" or something like that, but it'd be so much easier if there were some way that wouldn't require me to change each instance by hand.

I've looked through the InDesign help files, and I'm aware of the "Next Style" feature, but — unless you use InDesign as your word processor, which I don't — it still requires selecting text and applying the changes by hand.

Basically I'm looking for the InDesign equivalent of CSS adjacent sibling selectors.

The fact that the "Next Style" function exists (which is close but no cigar) makes me guess that there isn't anything better, but please correct me if I'm wrong.

Theunis de Jong's picture

No, there is nothing of that kind.
GREP styles are an interesting addition to CS4; they do 'contextual character styling', so there is yet hope for the future.

Nick Sherman's picture

Thanks for confirming; I was afraid that was the answer I would get. It always seemed funny to me that, despite the obvious limitations of web typography, there are also instances where it exceeds print. Another such example is with em-based linespacing.

The GREP styles are promising though. We'll see what happens in CS5.

Bert Vanderveen's picture

If there is a different Paragraph Style you use before the first paragraph, eg a Heading or Subheading or whatever, you would be able to use the Next Styles feature, right?

. . .
Bert Vanderveen BNO

Nick Sherman's picture

Next Styles isn't really automatic in the same way adjacent sibling selectors are… it still requires you to apply the changes by hand. Given, it can do a large number of changes in one fell swoop, but it does require some kind of preceding paragraph style. It's essentially a glorified find/replace.

Theunis de Jong's picture

As it happens, yesterday I wrote a javascript to apply styles with first/next settings. All you have to do is change the style names in the script and run it in your story. The script is at http://forums.adobe.com/message/2303467

(As an aside, typing this I remembered I didn't properly test it. So I just did. And, surely, it did sth weird ... oughta be fixed now.)

Syndicate content Syndicate content