Is there a way to format paragraph styles so that only the first paragraph in each chapter gets a drop cap?
So far I have seen this solved by saving a "first_paragraph" style and a "regular" style to be the next-style, however I am modifying an imported text, so I need it to be able to automatically change all first chapter paragraphs.
Is there a way to de this without introducing separating into two paragraph styles?
You don't want one style to produce two different visual results. That would be a very strange feature. What you're after is automation of applying the styles. That makes sense.
I assume you have your whole book chained in one text flow. And the styles surrounding your chapter text are already in place from the source. The source doc should have the basic semantic framework in place.
So from the source file your styles should look something like this:
heading-chapterTitle > heading-chapterSubtitle >> heading-leadingQuote >>> text-base >>> text-base >>> ... heading-chapterTitle > ...
Break each chapter into it's own source doc prior to import. Assuming your style flow is
opening stuff >
end of chapter as I outlined above, you should be able to select the frame at the start of the chapter and
apply style then next (or whatever it's called). Problem solved.
^ There's also a slick scripting solution for that, but it breaks the "easy answer" promise.
Assuming a structured pattern like my outline, InDesign has all the search power to do the style application for you.
That will set the first paragraph in a sequence of text-styled paragraphs to your desired style. The problem is, you can only run it once and you need to be sure you don't have the opener style applied anywhere yet.
Write functions to:
InD gives you script access to all the search functions your heart desires.
If you're new to scripting, it may sound daunting at first. It's really not that difficult and there are plenty of people on Adobe's forum to help you out. I haven't written scripts for InD in a long while, but if I find something to get you started, I'll post it back here.
[ UPDATE ]
Here's an example that shows you how to access your paragraph styles and apply them. In this case, it's just operating on the selected story and applying according to the order of the paragraphs. Not a very flexible approach (compared to searching), but it might work for you.
var mySelection = app.selection, paraStyle1 = app.activeDocument.paragraphStyles.itemByName("style1"), paraStyle2 = app.activeDocument.paragraphStyles.itemByName("style2"); mySelection.paragraphs.appliedParagraphStyle = paraStyle1; mySelection.paragraphs.appliedParagraphStyle = paraStyle2;
Another option: Don't learn, just pay for it. This fine scripter has already solved your problem and packed it up nicely.