First, the table of contents is automatically generated using the outline level.
If you want to insert a table of contents, click the Insert menu, point to Reference → Index and Table of Contents, and the index and table of contents will appear. Click the Contents tab. If you press the OK button directly, you will be prompted "Error! Directory entry not found ".
So what is a "directory entry"? A table of contents item is a paragraph or a line of text displayed as a table of contents in a document. Therefore, if you want to display the table of contents automatically, you must first define the table of contents items.
The definition of a directory entry is very simple. Click View → Outline to switch to outline mode, as shown in the figure below. In outline mode, the level of each paragraph in the document is clearly displayed. Select the title of the article, which is defined as "1 level". Then select the text that needs to be set as a directory item in turn, and define it as "secondary" one by one. Of course, if necessary, you can continue to define "three-level" directory entries.
After the definition is completed, click View → Page to return to page mode, insert the cursor into the document where the table of contents is to be created, and click Insert → Reference → Index and Table of Contents again to open the index and table of contents interface, and click the Table of Contents tab, as shown in the following figure:
A * * * only defines two-level catalog items, so the number in the "display level" in the above figure is changed to "2". Show Page Numbers and Align Page Numbers Right are two recommended options. The former is used to automatically display the page where the directory item is located, and the latter is used to display beauty. Tab leader is the display symbol of the area between the directory item and the right-aligned page number, which can be selected from the drop-down list; In addition, there are a variety of directory display formats to choose from, which can be seen by pulling down "Format".
Finally, click OK, as shown in the figure, the table of contents is generated, including the page number, which is automatically displayed. Hold down the Ctrl key and click a directory item, and the current page will automatically jump to the page number where the directory item is located. Is it convenient?
There is another advantage of using this method to generate directories. If you want to change the directory item, you can switch to outline mode to adjust the content and level of the directory item, and then click the button as shown in the figure, and the directory can be automatically updated-it's a breeze!
Secondly, the index entries are marked to automatically generate the table of contents.
The second method to realize automatic directory generation is to mark index items, that is, to mark each directory item as an index item in advance, and finally realize directory generation. The specific operation method is:
In page mode, select the first table of contents item in the article, that is, the title of the article, and execute Insert → Reference → Index and Table of Contents. When the Index and Catalog screen appears, click the Index tab, and then click the Mark Index Entries button to display this window:
"Marking" marks the title of the article "A literary maverick" as the main index item. At this point, the following text appears in the title of the article (the content in quotation marks):
"{"A literary maverick "}"
Next, define a secondary index item, and the operation method is the same as above. However, when tagging, it should be noted that by default, the text you select will appear in the primary index item, not the secondary index item. Please enter the text "Ananda: Romance+Question" you chose in the second index item, and enter the "one" just marked in the first index item.
"{"A literary maverick: A new work Ananda: Romance+Problems}} "By the way, the primary and secondary index items of these marks are actually a field, so you can directly copy the contents in quotation marks to the next secondary index item without repeating the operation, just modify the text content. In this way, all primary index items and secondary index items can be quickly marked one by one.
The following things are simple. Select Insert → Reference → Index and Directory, and set them in the pop-up window.