0 Replies Latest reply on Aug 1, 2008 12:17 PM by (Kenneth_Benson)

    Collect outline-style numbering for running head variable

    Level 1
      The book I'm working on now uses 4 levels of numbered heads. Head 1 uses
      roman numerals, Head 2 uses upper case letters, Head 3 uses arabic
      numerals, and Head 4 uses lower case letters, like this:

      I. Head 1
      A. Head 2
      1. Head 3
      a. Head 4

      I've got them set up to autonumber, and that works great. Next I need to
      get the deepest number, plus whatever numbers are on top of it, into the
      running head, so that if first match is Head 4, the running head will
      display "I.A.1.a." If first match is Head 2, then I need the running
      head to display only "I.A."

      I have that working too, by putting a hidden paragraph after each head
      containing the number string and then referencing that hidden paragraph
      in a running head variable on the master page. Works great.

      The only problem is in creating the hidden paragraph. It's a drag, and
      it's really easy to make mistakes.

      Is it possible to make a script that goes to each head, picks up its
      number, combines it with the numbers from the most recent higher-level
      heads, and writes the whole thing down in a new paragraph directly
      following the head? Maybe even goes through the whole document first and
      removes any existing hidden paragraphs before it begins (so I can update
      numbering if the head structure changes)?

      --
      Kenneth Benson
      Pegasus Type, Inc.
      www.pegtype.com