|
Creating a Table of Contents in EZ
This help file introduces you to the Table of Contents option available in the EZ text editor. The Table of Contents option is a recent addition to EZ, and some features may not work as well as you would like. If you experience any difficulty in executing the procedures discussed, keep in mind that this option is still being developed.
This help document assumes that you are reasonably familiar with some of the basic formatting options in EZ.
What the Table of Contents Does
The EZ text editor provides for tables of contents on two different levels. On one hand, EZ enables you to print a hardcopy version of the table when you print the original document. In addition to the hardcopy table, EZ provides an interactive Table of Contents window that allows you to view and edit the titles that appear in the hardcopy table of contents. The Table of Contents window also allows you to view and scan terms which will appear in your document's index pages. For more information on indexes, see the ez-index help file.
For a normal EZ document, both the printed and interactive tables of contents are composed of document titles formatted with Chapter, Section, Subsection, or Paragraph styles. If you would like a particular title to appear in the table of contents, you must format it with one of these styles, or specify other styles in your preference file (see the section below). Tables of Contents can also be created for different types of EZ files such as source code.
Neither the printed table or the Table of Contents window depends on the other to function properly. For example, you can get a printed table of contents by using the interactive Table of Contents window, or you can simply add a line to your preference file which allows you to automatically print a table.
Most of the sections that follow are devoted to explaining options available in the interactive Table of Contents window. If all you want to do is print a table of contents, skip directly to the Preferences for the Table of Contents section.
Working with the Table of Contents Window
Creating a Table of Contents window. To automatically create a Table of Contents window for the current document, choose the Table of Contents option from EZ's Page menu. A new window is opened entitled "ez Buffer: Contents_filename" where filename is the current EZ document. The Table of Contents window is a read only buffer. This means that you cannot make direct changes in the table of contents as you would in a normal EZ file.
Moving around with the Table of Contents window. In addition to helping you view, edit and print a table of contents, the Table of Contents window can also help you to move about lengthy documents as you edit them.
To move directly to a specific title in the document window, click once on the corresponding title in the Table of Contents window. The text in the original document window scrolls to reveal that title. In this manner, you can move directly to different portions of a document without fumbling with the scroll bar. Once the TOC window has the input focus, it is then possible to use the keyboard to traverse the contents. Each time you position the text caret on a new procedure name, the associated procedure in the source document is brought into view. For even greater viewing pleasure, see the description of the ContentsScrollTop preference in the section Preferences for the Table of Contents below.
Closing the Table of Contents window. To close the Table of Contents window, choose Close Contents from that window's front menu card.
Most of the sections that follow assume that the Table of Contents window is open.
Numbering and Renumbering Titles
The titles listed in the Table of Contents window can be easily numbered using EZ's enumerate option. EZ numbers titles according to a 1.2.3.4 numbering scheme where:
1 indicates the current Chapter,
2 indicates the current Section,
3 indicates the current Subsection, and
4 indicates the current Paragraph.
For example, the number 1.3 would represent the third section of the first chapter of a document.
Numbering the entire table. To number the entire table of contents, move to the Table of Contents window and select Enumerate from the Contents menu card. The appropriate numbers are inserted in both the Table of Contents and document windows.
To remove these numbers from the entire table of contents, select Denumerate from the Contents menu card. Numbers are again removed from both windows.
Numbering or renumbering portions of the table. There may be times when you will want to number or renumber specific portions of the table of contents. This can become necessary when an entire document represents only a particular chapter or section of some larger work.
To number or renumber a portion of the table of contents, highlight the desired titles in the Table of Contents window and select Enumerate from the Contents menu card. The message,
Starting number
is displayed in a dialogue box. If the selected titles are not already numbered, the number 0 appears at the prompt. If the selection is currently numbered, the number of the first selected title appears at the prompt. You have the option of accepting the given starting number or of defining your own.
To define the starting number for the selected titles, delete the given number and replace it with your own.
Clicking on the accept button accepts the starting number shown in the dialogue box. Beginning with the selected number, highlighted titles are numbered in both windows according to the 1.2.3.4 numbering scheme discussed above. Clicking cancel aborts the entire process.
To remove the numbering from a portion of the table, highlight the desired titles and select Denumerate from the Contents menu. If no titles are highlighted, numbers are removed from the entire table.
Editing Titles
Although titles appear in both the document and Table of Contents windows, you need not make two separate corrections when changing title entries. Instead, EZ allows you to work on an original document while either manually or automatically updating titles in the Table of Contents window.
Editing existing titles. To edit an existing table of contents title, make the desired insertions and/or deletions to the corresponding title in the original document. EZ makes changes in the document's Table of Contents window as you type.
At present, EZ does not allow you to change the formatting style of titles located in the Table of Contents window or the printed table of contents pages. However, you can change the formatting style of titles appearing in the original document using lookz. For more information, see the lookz help file.
Creating new titles. To place a new title in the existing Table of Contents window, first add the appropriate title to the original document window. Next, move to the Table of Contents window and choose Update Contents from the Contents menu card. The new title is inserted into the Table of Contents window at the proper location.
Deleting existing titles. To completely remove a title from both the table of contents and document windows, select the title in the original document window and choose Cut from the front menu card. The title is removed from both windows.
Notice that in the Table of Contents window, a blank space appears in the position of the deleted title. This empty space is left to remind you that a previous title is now missing, and that any existing numbers that label the table of contents are incorrect. Also, the space serves to mark your place in the document just in case you wish to replace the deleted title with a new one.
To complete the deletion process, move to the Table of Contents window and select Update Contents from the Contents menu card. The blank space is erased and any numbering errors are fixed.
Printing and Previewing the Table of Contents
While editing a document, the interactive Table of Contents window displays a simple listing of titles to be included in the printed table. However, the printed version of table of contents is formatted differently, with page number references appearing next to the appropriate titles.
Previewing the table of contents. To see how both the document and its table of contents will appear in the final printout, choose the Preview option from the Table of Contents window's File menu. EZ opens a separate Preview window that displays a picture of the final document as it will appear when printed.
Printing the table of contents. To print a document and its table of contents, choose Print from the Table of Contents window's File menu. The document's table of contents is printed on the last page.
As an alternative, you can automatically print tables of contents by editing your preference file (see the below section).
To print the document without the table of contents, choose Print from the document window's File menu.
Preferences for the Table of Contents
There are a number of preferences used to change the way in which EZ creates and prints the table of contents. If you would like to use any of the following preferences, you must add the specified lines to your preferences file. For more information, see the preferences help file.
Changing included titles. To specify the title formats included in both the Table of Contents window and the printed table of contents, add the line
*.ContentsList:
to your preferences file, followed by a listing of the desired formatting styles. For example, the line
*.ContentsList:chapter,section,subsection,paragraph,function
would represent EZ's default preference setting.
Automatically enumerating the table of contents. To have your table of contents numbered automatically upon printing, add the line,
*.AutoEnumerate:yes
to your preferences file.
Automatically printing the table of contents. To automatically print tables of contents, add the line
*.PrintContents:yes
to your preferences file. A table of contents will be included in each printed document, regardless of whether or not you open a Table of Contents window.
Automatically scrolling a selected procedure to the top of the screen. To automatically scroll a selected procedure to the top of the screen, add the line
*.ContentsScrollTop:yes
to your preferences file. Whenever you place the text caret on a new procedure in the TOC window, the associated procedure in the source document will be scrolled to the top of the window.
Pop-up menu meanings
Contents Menu Card
Enumerate: Numbers the selected titles in both the document and Table of Contents windows.
Denumerate: Removes numbering from the selected titles in both the document and Table of Contents windows.
Update Contents: Recreates the table of contents list to include any newly created titles in the original document.
Index menu card
Index Term: Formats all occurrences of a specified word with the index style. For more information, see the ez-index help file.
Index from File: Formats all occurrences of terms included in the specified index file with index style. For more information, see the ez-index help file.
Index to File: Writes the current index listing to the specified index file. For more information, see the ez-index help file.
Preview Index: Creates a preview window that shows a picture of the current index as it will appear when printed. For more information, see the ez-index help file.
Print Index: Prints the current index to the specified printer. For more information, see the ez-index help file.
Italic Index: Makes all terms formatted with index style appear italicized in the document window. For more information, see the ez-index help file.
Plain Index: Removes the italic appearance of terms formatted with index style. For more information, see the ez-index help file.
Expose Inv. Index: Makes readable all invisible index terms. For more information, see the ez-index help file.
Hide Inv. Index: Hides all occurrences of invisible index terms in the document window. For more information, see the ez-index help file.
Program Author
Tom Neundorffer, ITC
Related Topics
|