Hi, Sarah...
Yes, this makes things much clearer. The TOC entry for the
Description Title is being generated before the FOSI has seen the
subsection element and altered the page numbering accordingly.
I'd suggest trying to generate the TOC entry for the description title
in the first subsection or para0, at which point you'll know for sure
the correct page numbering style. You should be able to target this
case by copying the e-i-c for subsection and adding an occur="first",
then moving the description title TOC code there. You'll then need to
do the same for para0.
Alternatively, you could try to do this without copying the e-i-c
(always good to avoid duplicating code, though FOSI doesn't often make
it easy). You might try creating an att rule based on the value of a
counter or text variable that is modified with each subsection, or
something along those lines. This isn't as clear-cut as the "occur"
solution, though.
-Brandon 🙂
On Tue, Sep 15, 2009 at 12:50 PM, Copley, Sarah
CTR<sarah.r.copley@uscg.mil> wrote:
> I'm trying to generate a master TOC with page numbers generated from sections that may or may not have subsections:
>
> My source document could look like this:
>
> <description>
> <title>TITLE</title>
> <subsection label="A">
> <title>SUBSECTION A TITLE</title>
> </subsection>
> <subsection label="B">
> <title>SUBSECTION B TITLE</title>
> </description>
>
> Or like this:
>
> <description>
> <title>TITLE</title>
> <para0 "a"=">
> <title>SUBSECTION TITLE</title>
> </para0>
> </description>
>
> If the section has subsections then the page numbering would be 1A-1, 1A-2, etc.
>
> If not the page numbering would be 1-1, 1-2, etc.
>
> I have all page numbering correct in the Main TOC except where it reads the Description Title. I'm getting 1-1 instead of 1A-1.
>
> I tried Ed's suggestion but I must be doing something wrong.
>
> Thanks for all your help and all the responses.
>
> Sarah
>