.LEFT MARGIN .ifnot hlp .HL 1 Indexing You can have RUNOFF produce an index for your document by indicating each keyword you wish to appear in the index with the _.INDEX command. .ifnot small The index can be printed with the _.PRINT INDEX or _.DO INDEX command. Indexing does not automatically cause all occurences of a keyword to be included in the index; the index facility is intended for produce indexes, not concordances. .s .endif small .endif hlp .HELPC INDEX .q _.INDEX [text] .qq _.X [text] .p.index INDEX adds an index entry along with the current page number to the internal index buffer. The command does not cause a break. .ifnot small If in FILL mode, the index command must appear immediately after the item to be indexed. If in NO FILL mode, the index command must appear immediately after the line containing the index item. If RUNOFF breaks the line because it is too long, the index page number may be incorrect. Underlining, overstriking, and escape sequences are not recognized in index keywords because there is no rational way to alphabetize keywords if they are used. A given keyword can be indexed more than once. If a keyword is indexed more than one time on a given page, only one entry appears for that page in the index. .p;SEE also the commands _.ENABLE INDEXING and _.DISABLE INDEXING. .if RSX .s.i5;ADDITIONAL HELP AVAILABLE: ENTRY DO PRINT DELETE RESET format Subindex Autoindex optimization .endif RSX .HELPD ENTRY .endif small .q _.ENTRY index term .qq _.Y index term .p.x ENTRY puts an index term into the index, but doesn't include the current page number. This command requests optimization for subindex entries. .ifnot small .HELPD DO .endif small .q _.DO INDEX [;][text] .qq _.DX [;][text] .p.x DO INDEX clears the title and subtitle, uses the text as a header, and starts a new page. The entire contents of the internal index buffer is printed and the buffer is reset. .ifnot small The _.DO INDEX command is equivalent to: .i5;_.TITLE .i5;_.SUBTITLE .i5;_.FLUSH _.PAGE _.C; [text] .i5;_.S 4 _.PRINT INDEX .p;If no text is specified, the word INDEX is used as the header text. .HELPD PRINT .endif small .q _.PRINT INDEX ["entry"] .qq _.PX ["entry"] .p.index PRINT INDEX prints the specified entry in the internal index buffer. If no entry is specified, the entire index buffer is printed and the buffer is reset. .ifnot small (If an entry is specified, the internal index buffer is not reset.) The "entry" must be a previously specified index term. This term and all of its subindex terms will be printed. .HELPD FORMAT .p Entries are printed in alphabetic order and are set against the left margin. Chapter and subpage numbers are printed in the same format as specified by the _.DISPLAY CHAPTER or _.DISPLAY SUBPAGE commands. Regular line spacing is used, except that a new paragraph is formed between entries with different first letter. Orphan lines at the end of the page are prevented by the paragraph test page value. Paragraph indentation is used to indent extra page numbers that cannot fit on the line with the index entry. .P If both FILL and JUSTIFY are enabled, the entry is followed by ellipses (#.#.#.#) and the page numbers are printed right justified with respect to the current right margin. If FILL is disabled, the ellipses are omitted. If JUSTIFY is disabled, the page numbers will start 2 spaces after the index entry, and no justification will occur. .i5;(This use of FILL and JUSTIFY as well as the paragraph spacing is not the same as in DSR) .HELPD DELETE .endif small .q _.DELETE INDEX "entry" .s.index DELETE>INDEX deletes an index entry from the internal index buffer. .ifnot small (The buffer is not shortened, so no space is saved.) This command is useful for breaking the index into several parts. Each part can be printed separately by _.PRINT INDEX and the deleted. Finally, all of the remaining parts can be printed and the internal index buffer reset. .HELPD RESET .endif small .q _.RESET INDEX .s.index RESET>INDEX resets the internal index buffer so that it contains no entries. .ifnot small This is done automatically by _.DO INDEX or an unqualified _.PRINT INDEX. .HELPD SUBINDEX .s.c;SUBINDEX .p.x Subindex Terms can be subindexed by issuing the command _.FLAGS SUBINDEX. Each subindex item is marked by a subindex flag. Subindex items will appear indented by 2 spaces more than the previous item when a _.PRINT INDEX command or _.DO INDEX is issued. For example, the following text: .lm+5 .nf _.FLAGS SUBINDEX _.INDEX flags>substitute _.INDEX flags>index _.PRINT INDEX .qq produces: flags index 1 substitute 1 .f.lm-5 .HELPD AUTOINDEX .s.c;AUTOINDEX .p.x Autoindex Index terms can be generated automatically without using the _.INDEX command if the _.FLAGS INDEX command has been issued. Any term preceded by an index flag (_>) will be automatically indexed. For further information see: FLAGS INDEX. Autoindexing cannot be done inside a _.TITLE, _.SUBTITLE, _.CHAPTER, _.APPENDIX, or _.HEADER LEVEL command. .HELPD OPTIMIZATION .p The index facility can optimize the speed of index processing by keeping internal quick reference tables in dynamic memory. A table is always kept for the main entries. You can control whether tables are kept for subentries by using the _.ENTRY statement. For example, if you know that a large set of subindex entries will be made under the entry NAMES, then you should request subindex optimization with the following command: .i5;_.ENTRY NAMES> .p This command must precede any _.INDEX commands with the main entry NAMES. If you do not wish optimization for the subentries of NAMES, then use the command: .i5;_.ENTRY NAMES .p The optimization applies to all levels of subindex entries. For example, .i5;_.ENTRY NAMES>Authors>British .i5;_.ENTRY NAMES>Authors>American .i5;_.X NAMES>Authors>French .br will optimize all subentries under NAMES,Authors,British, and American. Subentries under French will not be optimized. The number of subindex entries must be greater than 26 for optimization to improve the execution speed. .endif small