PORTIA@engvax.UUCP (Portia 616-2635) (11/24/86)
I found an undocumented nice feature in RUNOFF that people may be interested in. (as least it was not documented in my 4.2 manual) People use Figures, Tables and Examples in their RUNOFF document, and often wish to generate a table of contents for the Figures, Tables and Examples. I thought there was no way to do it in RUNOFF, so we were using .SEND TOC to directly put the text in the table of contents. We had to manually enter the page numbers where the figure or table would appear. We did something like: .send toc .page .send toc .center;List of figures .send toc .blank 2 .send toc 1 this is the title for figure 1........page 12 .send toc 2 this is the title for figure 2........page 20 .send toc 3 this is the title for figure 3........page 22 and the .rnt file came out completely wrong! a better word would be "unexpected". After some experimenting, we discovered the following: The first character after the ".send toc" has special meaning if it were 1, 2 or 3. Specifically ".send toc 1" generates an table of contents entry for EXAMPLES. RUNOFF would use the text after ".send toc 1" as the title of the example, and supply a page number where the ".send toc 1" command appeared in the document. And a special section called EXAMPLES would appear in the table of contents. ".send toc 2" would generate an entry for FIGURES, ".send toc 3" for TABLES. So now we could just place anywhere in the document where we want the figure or table or example to appear, a line of the form .send toc 1 An Example of the Undocumented Features in RUNOFF .send toc 2 This is a figure .send toc 3 This is a table And RUNOFF would generate the nice table of contents with page numbers! Now if someone will just figure out if there is an undocumented feature to have RUNOFF do the numbering of Figures, etc like it does .header levels... -- Portia Bjorndahl UUCP -- {allegra|ihnp4}!scgvaxd!engvax!portia Hughes Aircraft Co. ARPA -- engvax!portia@csvax.caltech.edu (213) 616-2635