home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / text / frame / 3791 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  4.4 KB

  1. Path: sparky!uunet!wupost!spool.mu.edu!olivea!gossip.pyramid.com!pyramid!infmx!cortesi
  2. From: cortesi@informix.com (David Cortesi)
  3. Newsgroups: comp.text.frame
  4. Subject: Re: Autonumbering page numbers for chapter TOC
  5. Message-ID: <1992Dec29.173053.5875@informix.com>
  6. Date: 29 Dec 92 17:30:53 GMT
  7. References: <1992Dec29.025734.29052@cbnewsj.cb.att.com>
  8. Sender: news@informix.com (Usenet News)
  9. Organization: Informix Software, Inc.
  10. Lines: 88
  11.  
  12. In article <1992Dec29.025734.29052@cbnewsj.cb.att.com> ralph@cbnewsj.cb.att.com (Ralph Brandi) writes:
  13. >Okay, my first query was so successful I've got another....
  14. >
  15. >I've got multi-chapter books with complex page numbers, autonumbered
  16. >with an invisible ChapterNumber tag.  In addition to the book-wide
  17. >TOC, the format dictates chapter TOCs.  But when I generate the TOCs
  18. >directly from the file, all I get is page numbers, no chapter
  19. >numbers. [complicated, failed attempt details omitted...]
  20.  
  21. I see this subject of chapter TOCs isn't in the FAQ, maybe it should be?
  22.  
  23. Your chapter TOCs are documents, and as such they need to be in the
  24. book file as book components.  You use a two-stage generation process
  25. to create them.  At least, this is the only way I've ever found.
  26.  
  27. 1) Each chapter, as you note, has an invisible ChapterNumber paragraph
  28. which represents the chapter's number.  Two notes on this:
  29.  
  30.       * the best way to make it "invisible" is to give it a spot
  31.     color such as "magenta."  Then you can use the View:Spot Colors
  32.     dialog to display that color for editing or hide it for printing.
  33.     You can not use a conditional tag for this purpose since hidden
  34.     conditional text is removed from the document and cannot be used
  35.     as a cross-reference source.
  36.  
  37.       * the ChapterNumber tag does not need to be in the para catalog,
  38.     and probably shouldn't be -- it clutters the catalog display
  39.     and invites tinkering by writers.  Just put the tag manually
  40.     on one paragraph in the document template's first page.
  41.     
  42. 2) The chapter TOC is a unique document and requires a template 
  43. different from your chapter contents template.  In the TOC template,
  44. the ChapterNumber para uses the + autonumber to increment by one.
  45.  
  46. 3) In the template for a chapter contents document there must *also*
  47. be an invisible ChapterNumber para, but in this one, the number
  48. is not repeat *not* incremented, only used.
  49.  
  50. 4) Aside from the chapter (auto)number, the paratext of the
  51. invisible ChapterNumber paragraph should be the text of
  52. the chapter title, for use in cross references.  Thus you can have
  53. an xref format ChapterNumber of <$paranum[ChapterNumber]>, and
  54. an xref format ChapterTitle of <$paratext[ChapterNumber]>.  Always
  55. use these instead of typing the actual number or title.
  56.  
  57. 5) Each time you create a chapter contents document, you also create
  58. its matching TOC document.  You fill in the chapter title and other
  59. chapter-unique items in *both* files.
  60.  
  61. 6) Now you add *both* files to the book, the chapter TOC document
  62. first, then the chapter contents.  Their "setups" differ:
  63.  
  64.                 TOC        contents
  65.  
  66.     para numbering        continue    continue
  67.     page numbering        restart at 1    continue
  68.     starting side:        right        right or next-avail
  69.                         as you prefer
  70.  
  71. Because the chap number increments in the TOC while the page number
  72. restarts, each TOC begins on page #-1.  In the contents files the chap
  73. number does not increment and the page number continues, so they begin
  74. on page #-3 (typically).
  75.  
  76. Also in the setup you must *manually* type in the chapter number
  77. as the page-number-prefix value for generated page numbers.
  78. Manually. Even though the numbers are dynamically generated and
  79. picked up automatically in headers and xrefs, you still have to
  80. put them in *manually* in the book setup.  Go figure.
  81.  
  82. 7) Now generate the book: the chapter numbers are produced and
  83. should show up properly in the headers of all pages.  However,
  84. the TOCs are as yet empty.
  85.  
  86. 8) So now open each chapter contents file indivually and use
  87. File:Generate to generate a table of contents. If the TOC documents
  88. have the appropriate filenames, Frame will use them, putting
  89. contents lines into them.  (Of course you have already tinkered
  90. with this to get the format right when creating the TOC template.)
  91.  
  92. 9) Some TOC files may now be longer than they were before.  So you
  93. repeat step 7 to adjust the page numbers, and then repeat step 8
  94. to correct the TOC contents.
  95.  
  96. This scheme can be extended to multi-document chapters but that
  97. is best left as an exercise for the compulsive...
  98.  
  99. Dave Cortesi
  100.