home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / text / frame / 2598 < prev    next >
Encoding:
Text File  |  1992-08-14  |  3.8 KB  |  89 lines

  1. Newsgroups: comp.text.frame
  2. Path: sparky!uunet!gatech!darwin.sura.net!mlb.semi.harris.com!deneb.mlb.semi.harris.com!kcr
  3. From: kcr@deneb.mlb.semi.harris.com (Keighley Ross)
  4. Subject: Re: **HELP with Page Numbers in TOCs**
  5. References: <1992Aug13.160131.10248@lsil.com>
  6. Date: Fri, 14 Aug 1992 16:38:29 GMT
  7. Nntp-Posting-Host: deneb.mlb.semi.harris.com
  8. Organization: Harris Semiconductor, Melbourne FL
  9. Sender: news@mlb.semi.harris.com
  10. Message-ID: <1992Aug14.163829.8191@mlb.semi.harris.com>
  11. Lines: 76
  12.  
  13. In article <1992Aug13.160131.10248@lsil.com> bgossett@lsil.com writes:
  14. >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
  15. >Chapter <n+>< >< >< >    (The blank ones are used for numbering sections, tables, etc.)
  16. >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.
  17. >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
  18. >lly change the page number prefixes in the book file's "Setup File" option.  
  19. >
  20. >Is there any way to have Frame automatically update the prefixes in the
  21. >book file "Setup" by pulling the chapter number from each file?
  22.  
  23. Not that I know of.  Worse yet, let me assure you that in my experience,
  24. there is no hope of changing all the setup file entries correctly.
  25.  
  26. What you can do to make this easier is to keep the bookfile in MIF
  27. format, which is easily edited with a text editor.  In particular, I
  28. now use the m4 macro processor so:
  29.  
  30. changequote([,])<Book 2.0> # Macros for creating book files
  31.  
  32. define(DOC,<BookComponent
  33.  <FileName `<c\>$1.doc<U\>$1.doc'>
  34.  <StartPageSide StartRightSide>
  35.  <PageNumbering Restart >
  36.  <PgfNumbering Continue >
  37.  <PageNumPrefix `$2-'>
  38.  <PageNumSuffix `'>
  39.  <DefaultPrint Yes >
  40.  <DefaultApply Yes >
  41.  > )
  42.  
  43. define(GEN,<BookComponent
  44.  <FileName `<c\>$1.doc<U\>$1.doc'>
  45.  <FileNameSuffix `TOC'>
  46.  <DeriveType TOC>
  47.  [ifelse($2,,,<DeriveTag `$2'>
  48.  )][ifelse($3,,,<DeriveTag `$3'>
  49.  )][ifelse($4,,,<DeriveTag `$4'>
  50.  )][ifelse($5,,,<DeriveTag `$5'>
  51.  )][ifelse($6,,,<DeriveTag `$6'>
  52.  )][ifelse($7,,,<DeriveTag `$7'>
  53.  )][ifelse($8,,,<DeriveTag `$8'>
  54.  )][ifelse($9,,,<DeriveTag `$9'>
  55.  )]<StartPageSide StartRightSide>
  56.  <PageNumbering Restart >
  57.  <PgfNumbering Continue >
  58.  <PageNumPrefix `'>
  59.  <PageNumSuffix `'>
  60.  <DefaultPrint Yes >
  61.  <DefaultApply Yes >
  62.  <DefaultDerive Yes >
  63.  > )
  64.  
  65. <BWindowRect 820 183 326 238>
  66.  
  67. GEN(dfTOC,ChapHd,SectHd)
  68. DOC(intro,1)
  69. DOC(basics,2)
  70. DOC(hpms,3)
  71. DOC(fwork,4)
  72.  
  73. (Actually, the first part is include()'d from a common file, and I've
  74. got a more complicated definition of DOC that allows for chapter TOC's
  75. as well as the book's TOC.  M4 is not my favorite language, but it sure
  76. beats writing this all out.)
  77.  
  78. You can fix up .fminit2.0/MifRead so that this file, with an .m4 suffix,
  79. is expanded on the fly.
  80.  
  81. Now if only there were some way for the book file to tell the chapter
  82. documents what number to put in the footer of the master pages, rather
  83. than having to rely on the autonumbering.
  84.  
  85. -------------------------------------- Keighley Ross ----------------
  86. HH _  HH    kcr@mlb.semi.harris.com    Design Systems Development
  87. H_/ |_HH      Opinions expressed       Harris Semiconductor
  88. HH    HH      are solely my own.       Melbourne, Florida,
  89.