This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Add-ons & Links / AuthorTools / Function Interface /

Creating an Index

This section assumes that you have already loaded the AuthorTools package and set the variable nb to represent the notebook you wish to process. (See Using Functions to see how to do this.)

There are two steps involved in setting up an index.

1. Associate index entries with specific cells in your source notebook.

The simplest way to insert index entries is using the Edit Notebook Index dialog box, accessed from the MakeIndex palette. Alternatively, you can type and evaluate the AddIndexEntry function. The following command associates the specified main entry and subentry with the currently selected cell(s) in the notebook.

AddIndexEntry[nb, {main, sub}]

2. Generate the index using the MakeIndex function.

This generates an index for the notebook.

MakeIndex[nb,"Simple"]

The second argument of MakeIndex specifies the format of the index. You can choose from four different formats: "Simple", "Book", "TwoColumn", or "BrowserIndex". (See Make Index for more information on these formats.)

Note: The MakeIndex command inserts cell tags into the source notebook and automatically saves the changes. If you do not want your source notebook modified, you should keep a separate copy as a back-up.