Reserved ID's for Chapters/Sections/sub-section Styles.


Subject: Reserved ID's for Chapters/Sections/sub-section Styles.
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Tue Feb 06 2001 - 17:59:33 CST


Hi everyone,
           The recent thread about outlines vs lists got me thinking that
it be VERY easy implement automatic numbering of Chapters /Sections
/Styles /Equations /Tables/ Figures and anything else by just reserving
some ID's for the these purposes and reusing the fl_AutoNum class.

For example a Numbered Chapter Style would in addition the usual Font
information would have a list ID associated with it. Upon setting the
Numbered Chapter Style a

1.

Would appear waiting for input. Upon hitting return the parabreak code
would see that the ID for this list element was in the reserved range and
so would not propagte the list to the next number.

Upon selecting "Numbered Heading" Style again the code would see that the
ID for this has already been invoked so a

2.

Would appear. Bingo, automatically numbered Chapters. We could do the same
thing for sub-sections. Users can change the appearence of their Chapter
headings using all the powereful features of our list dialog.

It would also be easy to implement a Table of Contents using the Piece
Table fields by interogating all the StruxDocHandles stored in the
AutoNum's of the reserved ID's to find the text and page numbers
associated with the Numbered Heading ID's.

Pretty Neat eh? I'm sure I could whip up a TOC in about 40 hours of work.

The Numbered Headings is so easy I'll implement it once the Styles dialog
is in.

Cheers

Martin



This archive was generated by hypermail 2b25 : Tue Feb 06 2001 - 17:59:46 CST