+-----------------------------------------------------------------------------+ | index | +-----------------------------------------------------------------------------+ Abbreviation: ã|\ixã% Parameters: ã|title textã% Submarkup: ã|\subentry, \blindentry, \uspn, \bdpn, \itpnã% ã|Description:ã% The \index markup builds index entries which can be sorted and printed at the end of a document. The \index markup has the format \indexn{entry} where "n" is the index number (1, 2, or 3), and "entry" is the index entry. The page number you are on when the \index markup is inserted will be printed with the "entry". You must use the \printindex markup to sort and print the index. It comes at the end of the document. Refer to the documentation of \printindex for details on this markup. ã|Example:ã% Consider this index example: The files you create and change have a filemode of A. This means that they are all kept in a collection of files called your A-disk. The FILELIST command displays a list of all \index1{A-disk} the files on your A-disk. In the document, the following would print where the index markup occurred, +-----------------------------------------------------------------------------+ | | | The files you create and change have a filemode of A. This means | | that they are all kept in a collection of files called your A-disk. The | | FILELIST command displays a list of all the files on your A-disk. | +-----------------------------------------------------------------------------+ If this occurred on page 32, the entry in the index printed with \printindex1 would print as illustrated on the next page. +-----------------------------------------------------------------------------+ | A-disk, 32 | +-----------------------------------------------------------------------------+ ã|Notes:ã% You cannot use \index within a \settabs or \halign. ã|Lower Level or Sub entriesã% If you want to record a subentry to a main index entry you use the \subentry markup within the \index markup. ã|Notes:ã% The \subentry markup is only valid when used within \index. ã|Example:ã% If you had a main entry called "reader list" and you wanted sub entries for "receiving a file" and "replacing a file" you could enter the \index markup as illustrated here: \sha{Receiving a File} To receive a file, move the cursor to the line that describes the file you want to receive. \index1{reader list \subentry1{receiving a file}} Then press PF9. A notice will appear on that line telling you that the file has been received, . . . \sha{Replacing or Renaming a File} What happens if the file in your reader has the same file label as one you already have on your disk? There are two ways to handle this. \lib\lil1 If you want the file in your reader to replace the file \index1{reader list \subentry1{replacing a file}} on your disk, type the command "receive / (replace". \lil1 If you want to keep the file on your disk, then rename the file in your reader with the command "receive / newname \index1{reader list\subentry1{renaming a file}} newtype" where "newname" is the new file name and "newtype" is the new filetype. \lie This would produce the following paragraph in a document: +-----------------------------------------------------------------------------+ | | | Receiving a File | | To receive a file, move the cursor to the line that describes the file | | you want to receive. Then press PF9. A notice will appear on that line | | telling you that the file has been received, ... | | | | Replacing or Renaming a File | | What happens if the file in your reader has the same file label as one | | you already have on your disk? There are two ways to handle this. | | 1. If you want the file in your reader to replace the file on your disk, | | type the command "receive / (replace". | | 2. If you want to keep the file on your disk, then rename the file | | in your reader with the command "receive / newname newtype" where | | "newname" is the new file name and "newtype" is the new filetype. | | | +-----------------------------------------------------------------------------+ If list level #2 printed at the top of page 33, the index entries would look like: +-----------------------------------------------------------------------------+ | | | reader list | | receiving a file, 32 | | renaming a file, 33 | | replacing a file, 32 | | | +-----------------------------------------------------------------------------+ ã|Excluding Text from the Sortã% There are occasions when you will want text to print in an indexed item, but you do not want that text to be a part of the sorting process. For example, you may want to index the title "Consumer Guides" including the quotes, but you want it sorted with the C's and not sorted with the double quote marks. Also, you probably would want to sort \par with the p's, and not with the backslashes. Both can be accomplished using the \sortasmarkup which can only be used within the \index markup. ã|Example:ã% Using the input, Please get a copy of the article "Consumer Guides" and \index1{"Consumer Guides"\sortas{Consumer Guides}} refer to the illustration on page 5. \par Be sure to index the paragraph command "\\par" \index1{\\par\sortas{par}} somewhere in the document. you would get the following two paragraphs in your document. +-----------------------------------------------------------------------------+ | | | Please get a copy of the article "Consumer Guide References" and refer | | to the illustration on page 5. | | | | Be sure to index the paragraph command "\par" somewhere in the | | document. | | | +-----------------------------------------------------------------------------+ The index entries would print like: +-----------------------------------------------------------------------------+ | | | "Consumer Guides", 45 | | contour Maps, 23 | | | | \par, 45 | | Paragraphs, long, 16 | | | +-----------------------------------------------------------------------------+ ã|Example:ã% Prepositions in a subentry may not be part of the sort, but are to be printed in the index. For example, to get the index to look like, +-----------------------------------------------------------------------------+ | | | vacations | | on boats, 32 | | at the Olympian, 21 | | | +-----------------------------------------------------------------------------+ you would use the \index, \subentry, and \sortas commands illustrated on the next page. Some people spend their vacations at older hotels like the Olympian. \index1{vacations \subentry1{at the Olympian\sortas{Olympian}}} Another popular vacation is travelling the Pacific in a boat. \ix1{vacations\subentry1{on boats\sortas{boats}}} ã|Example:ã% As another example, "10 Downing Street" is typically sorted with the T's and not prior to the 2's. This can also be accomplished using the \sortas markup. For example, the Prime Minister's address mentioned earlier would be entered as: Taxi, please take me to 10 Downing Street. \index1{10 Downing Street\sortas{ten Downing Street}} ã|Highlighted Page Numbersã% For those applications which require some of the page numbers to be printed in bold, some in italics, and others underscored, there are three markup available to do this. They are \boldpagenumber, \italicpagenumber, and \underscorepagenumber. They are all used within the \index markup, and indicate to TEXT1 that a page number other than the standard page number is to be used. We recommend that important references be noted in bold (\boldpage- number). Fleeting references be printed with italics (\italicpagenumber). And primary references be indicated by being underscored (\underscorepage- number). Of course, you are free to use these three markup as you see fit. The bold page number will always come prior to a standard face reference to the same page. ã|Example:ã% If you had an \boldpagenumber on page 43 and \index's on pages 42--44 for "peace." \index1{peace} % Located on page 42 \index1{peace} % Located on page 43 \index1{peace\bdpn} % Located on page 43 \index1{peace} % Located on page 44 the index printed with \printindex would look like: +-----------------------------------------------------------------------------+ | peace 43, 42--44 | +-----------------------------------------------------------------------------+ ã|Example:ã% If you have an underscored page number and it falls in the same range as a standard face entry, the underscored entry would follow the standard face entry. For example, if you had a \underscorepagenumber on page 66 and \index's on pages 66--72 for "nationalism", \index1{nationalism\uspn} % On page 66 \index1{nationalism} % On page 66 \index1{nationalism} % On page 67 \index1{nationalism} % On page 72 the index sequence would print like: +-----------------------------------------------------------------------------+ | Quick Programming Language 66--72, 66 | +-----------------------------------------------------------------------------+ ã|Example:ã% If you have an index reference in italics and it falls in the same range as a standard face entry, the italics entry will not be printed. For example, if you had an italics entry using \italicpagenumber on pages 45 and 56, and you had standard face entries on pages 54--60 for "In Search of Excellence", the printed index would look like: +-----------------------------------------------------------------------------+ | | | In Search of Excellence 45, 54--60 | | | +-----------------------------------------------------------------------------+ ã|Cross Referencesã% Often it is desirable to have a cross reference to another index entry. You can do this using the \blindentry markup within the \index markup. You cannot use both \blindentry and \subentry within the same \index markup. The \blindentry markup has the format, \blindentry{blind entry} where "blind entry" is the text you want associated with that index entry. ã|Example:ã% For example, to get an index entry to print like +-----------------------------------------------------------------------------+ | | | | | Flow of control, see Control Structures | +-----------------------------------------------------------------------------+ you would enter \index1{Flow of control\blindentry{see Control Structures}} ã|Example:ã% It is also possible to have a blind entry printed with an index entry, and still have it indexed with page numbers. For example, if you were to enter \index1{Label\uspn} \index1{Label\blindentry{({\it see also} Case Label)}} on page 78 you would get an index entry printed as: +-----------------------------------------------------------------------------+ | Label, 78, (see also Case Label) | +-----------------------------------------------------------------------------+ ã|Notes:ã% If you have page numbers and a blind entry, then the blind entry will follow the last page number as illustrated here. ã|Multiple Indexesã% You can have multiple indexes by changing the "1" in \index1 to "2" or "3". For example, \index1{entry in first index} \index2{entry in second index} \index3{entry in third index} will generate one entry in each of three indexes. See \printindex for instructions on how to print out each of the three indexes.