Clear overrides selectively

Home Forums General InDesign Topics Clear overrides selectively

This topic contains 5 replies, has 2 voices, and was last updated by  Clark Kenyon 1 week, 2 days ago.

  • Author
  • #110804

    Clark Kenyon

    Is it possible to clear some paragraph overrides, while leaving others in place?

  • #110805

    Yeap! …

  • #110823

    … but could you be a little clearer? What paragraphs?

  • #110824

    Clark Kenyon

    It’s complicated. I am using the method of creating two numbered list styles, where the first level list is not actually numbered, but since it is formatted to “start at 1”, following paragraphs, the real numbered lists (level 2), will automatically restart their numbering. And this book is full of them. I would do this, but my experience has been that the numbering doesn’t always restart as it should in an ePub export. So I would have to export a separate ID doc for the ePub and go through and override the style of every numbered list to restart at 1.
    So assume I did these overrides in the original ID doc. Since it’s a print layout, certain other overrides have to be employed for the sake of copyfitting, e.g., changing the keep options on a single paragraph to properly fill out a page or break at a different point on a page, increasing tracking to improve copyfitting. These overrides I would want to remove before the export to ePub as in an ePub such considerations as copyfitting are irrelevant and could affect the flow of the text.
    So the question is, how would I clear all overrides but the overrides to the numbered list style?

  • #110825

    It’s simplistic! ;-)

    var myParas = app.activeDocument.stories.everyItem().paragraphs.everyItem().getElements(),
    P = myParas.length, p;
    for ( p = 0; p < P ; p++) if ( myParas[p] != “NumberedListStyle” ) myParas[p].clearOverrides();

    Michel, for FRIdNGE

  • #110828

    Clark Kenyon


You must be logged in to reply to this topic.