I’ve been searching high and low for some kind of pointers on how to achieve this, but—much to my surprise—I can’t seem to find any mentions of it anywhere, even though it seems like such a basic, simple thing.

I’m setting a book that has hundreds of block quotes in four different styles (regular quote, dialogue quote, verse quote, and verse quote with translation). These four types need to be laid out differently, so I have four different paragraph styles set up for them. Each block quote can contain one, two, or more paragraphs, and it can follow and be followed by text in (at least) two different styles of body text.

To separate the block quotes from the rest of the text, I apply a 1 mm space before the first paragraph, and a 1.5 mm space after the last paragraph, regardless of which type of block quote the paragraph belongs to.

I would really, really like to be able to this without having to go through each and every instance of block quote and manually add space-before and space-after overrides to the first and last paragraphs, ’cause that’s a major pain in a certain part of my anatomy.

Ideally, I would create a “first” paragraph pseudo-style that defines *only* the space before and a “last” paragraph pseudo-style that defines *only* the space after, and then I’d simply apply these pseudo-styles on top of the paragraph styles already applied—a sort of CSS-like approach to style overrides. But that, unfortunately, isn’t possible in InDesign, since paragraph styles can’t be stacked (for whatever reason).

Does anyone have a good way of doing this, other than manually? I find it very, very hard to believe that I should be the first to ever struggle with this issue—surely anyone who’s ever set an academic book must have experienced similar problems.

(Scripting would be fine, though I’m almost a complete beginner at InDesign scripting.)

Edit: Just found this thread on here, which looks at it from a slightly different angle, the suggestion being to add paragraphs around the quotes. This is doable, I suppose, but it is (in my eyes) a hack—and it would still mean going through hundreds of block quotes, adding extra paragraphs.

That’s what I’ve been doing—there’s just one problem: in my case here, I end up with 16 different paragraph styles just for quotes. That’s horribly messy.

If specific paragraph styles always precede and follow the quote paragraph styles, consider adding space after to the preceding and space before to the following style, if this doesn't upset how they're already used.

If specific paragraph styles always precede and follow the quote paragraph styles, consider adding space after to the preceding and space before to the following style, if this doesn't upset how they're already used.

Unfortunately, the specific paragraph styles that always precede and follow the quoted sections are the regular body text styles, so that would upset a whole lot of things. :-(

request for this, but please do so as well), is the equivalent of Words

"Don't add space between paragraphs of the same style."

Anyway, if you're interested in this script (I haven't actually put it

on the website yet), please contact me offline: admin (at)

freelancebookdesign.com

HTH,

Ariel

Great to have a script when there's nothing else that will do the job. But, it would be greater if InDesign had a built-in ability to do it. I've mentioned several times on these fora that FrameMaker's "structured" side has the ability to apply paragraph styles or properties according to rules you create. The gotcha is that you need to do some non-trivial setup work with the structured FM mode, not the "vanilla" mode.

Structured FM can work with an EDD (Element Definition Document) which is the equivalent of a DTD (Document Type Definition) in SGML, XML, and other similar languages. An EDD or DTD is composed of rules about what's legal in a document. The rules processor is always on. It can warn when rules are violated, and it can perform some operations when the rules processor detects the need to perform them.

In this case, context rules are in play. Within the general context rules there's a set of list-specific rules that can easily manage your requirements. You'd use a rule that tests the location of a paragraph within a list and changes the space above the first or space below the last paragraph, and doesn't affect the notfirst/notlast paragraphs in the list. Unlike a script, it's always "on," so moving a first or last paragraph to a position within the list automatically removes their first/last paragraph special properties, and automatically applies them to the new first and/or last paragraph.

InDesign's XML can work with a DTD, but InDesign lacks the always-looking-for-opportunities-to-apply rules mechanism. So, if you think it would be a good idea to add this ability to InDesign, add your request to mine and others, here: Adobe - Feature Request/Bug Report Form. If InDesign developers can make it work without a DTD and XML markup, it's likely to happen sooner. If a DTD and XML markup are required to make it work, it'll have a much lower priority until ID-XML users become a majority.