In article <1992Aug13.160131.10248@lsil.com> bgossett@lsil.com writes:
>I'm using a book file to generate a TOC from the chapter files that make up a book. I have a autonumbering format in the chapter paragraph formats that allows Frame to update them if the order of the chapters is rearranged. The format is
>Chapter <n+>< >< >< > (The blank ones are used for numbering sections, tables, etc.)
>In the footer of each master page, the variable string Running H/F 3-# (where Running H/F 3 is <$paranumonly[chapter]>) inserts page numbers of the form 1-1, 1-2, 1-3, etc.
>Here's the problem: I want the same format for page numbers to appear in the generated TOC. I currently have to select "Setup File" in the book file and edit the page number prefix for each chapter file, inserting 1- for chapter 1, 2- for chapter 2, etc. This works fine until I have to rearrange the chapters in the book. Upon re-generating the TOC, Frame correctly updates the chapter and page numbers within each file. HOWEVER, Frame does NOT update the page numbers referenced in the TOC unless I
>lly change the page number prefixes in the book file's "Setup File" option.
>
>Is there any way to have Frame automatically update the prefixes in the
>book file "Setup" by pulling the chapter number from each file?
Not that I know of. Worse yet, let me assure you that in my experience,
there is no hope of changing all the setup file entries correctly.
What you can do to make this easier is to keep the bookfile in MIF
format, which is easily edited with a text editor. In particular, I
now use the m4 macro processor so:
changequote([,])<Book 2.0> # Macros for creating book files
define(DOC,<BookComponent
<FileName `<c\>$1.doc<U\>$1.doc'>
<StartPageSide StartRightSide>
<PageNumbering Restart >
<PgfNumbering Continue >
<PageNumPrefix `$2-'>
<PageNumSuffix `'>
<DefaultPrint Yes >
<DefaultApply Yes >
> )
define(GEN,<BookComponent
<FileName `<c\>$1.doc<U\>$1.doc'>
<FileNameSuffix `TOC'>
<DeriveType TOC>
[ifelse($2,,,<DeriveTag `$2'>
)][ifelse($3,,,<DeriveTag `$3'>
)][ifelse($4,,,<DeriveTag `$4'>
)][ifelse($5,,,<DeriveTag `$5'>
)][ifelse($6,,,<DeriveTag `$6'>
)][ifelse($7,,,<DeriveTag `$7'>
)][ifelse($8,,,<DeriveTag `$8'>
)][ifelse($9,,,<DeriveTag `$9'>
)]<StartPageSide StartRightSide>
<PageNumbering Restart >
<PgfNumbering Continue >
<PageNumPrefix `'>
<PageNumSuffix `'>
<DefaultPrint Yes >
<DefaultApply Yes >
<DefaultDerive Yes >
> )
<BWindowRect 820 183 326 238>
GEN(dfTOC,ChapHd,SectHd)
DOC(intro,1)
DOC(basics,2)
DOC(hpms,3)
DOC(fwork,4)
(Actually, the first part is include()'d from a common file, and I've
got a more complicated definition of DOC that allows for chapter TOC's
as well as the book's TOC. M4 is not my favorite language, but it sure
beats writing this all out.)
You can fix up .fminit2.0/MifRead so that this file, with an .m4 suffix,
is expanded on the fly.
Now if only there were some way for the book file to tell the chapter
documents what number to put in the footer of the master pages, rather
than having to rely on the autonumbering.
-------------------------------------- Keighley Ross ----------------
HH _ HH kcr@mlb.semi.harris.com Design Systems Development