Porting Central
Skip to main content

Porting Central

Creating an Index in EZ

This help file introduces you to the Index option available in the EZ text editor. The Index 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 feature is still being developed.

This help document assumes that you are reasonably familiar with some of the basic formatting options in EZ.

What the EZ Index Does

An EZ index can be created using any combination of five different methods. Each method can be performed in the original document window that is opened when you start EZ. In addition to this, you can also open an interactive "Contents window" for the document. The interactive Contents window allows you to view and scan the index entries that will appear in the hard copy index pages.

Installing the Index Menu

In order to create indexes for EZ documents, you must first be able to access the Index menu. By default, EZ provides you with an Index menu when you use the menu cards in the interactive Contents window. However, it is generally more convenient to have an Index menu available in the EZ window itself.

You can install such an Index menu by adding a few lines to your .ezinit file. These lines will cause a new menu card, entitled Index, to appear the next time you run EZ. For more information on initfiles, see the initfiles help document.

To install an Index menu into EZ, place the following lines in your .ezinit file and run EZ:

addmenu tindex-index-term "Index,Index term~1" textview tindex noinherit

addmenu tindex-preview "Index,Preview Index~20" textview tindex noinherit

addmenu tindex-print "Index,Print Index~21" textview tindex noinherit

addmenu tindex-read-index-file "Index,Index from File~10" textview tindex noinherit

addmenu tindex-write-index-file "Index,Index to File~11" textview tindex noinherit

addmenu tindex-index-italic "Index,Italic Index~30" textview tindex noinherit

addmenu tindex-index-plain "Index,Plain Index~31" textview tindex noinherit

addmenu tindex-expose-inv-index "Index,Expose Inv. Index~32" textview tindex noinherit

addmenu tindex-hide-inv-index "Index,Hide Inv. Index~33" textview tindex noinherit

When you run EZ, a new Index menu appears among the standard menu cards.

Creating an Index

The following are five different methods for indexing terms in EZ. You can use any combination of them to create your index.

  1. Indexing a specific term. To index a specific instance of a term, select the desired word and choose Index from the EZ Title menu. The word is formatted in index style, which is by default an italicized font, such as in the example, indexterm. This formatting style allows you and EZ to recognize the word as an index item. Terms formatted in index style will not appear italicized in the printed document unless you format them accordingly. For more information on formatting, see the introductory ez help document.

  2. Indexing all occurrences of a specific term. To index every occurrence of a term in an existing EZ document, select Index Term from the Index menu. The prompt,

    Term to index?

    is placed in the message line. Type in the term to be indexed and press Enter. EZ searches through your document, formatting each occurrence of the specified term with the index formatting style. After searching, a message is displayed which indicates the number of instances found in the current document.

  3. Indexing invisible terms. You may want to create index references for terms that do not occur within the document itself. For this reason, EZ also contains a special option for creating invisible indexes. When the original document is printed, invisible index terms are not included in the body of the text itself.

    Important Note: You should only place invisible index terms into a document after you have completed editing that document. Terms formatted as invisible index entries cannot be edited in the same manner as standard text.

    To create an invisible index term, place the term on the desired page in the original document, select it and choose Invisible Index from the Title menu. The selection is formatted with the indexi style, which is by default a raised, italicized font, such as in the example, indexiterm.

  4. Indexing two-level entries. Most standard indexes are of the two-level form. Two-level indexes allow you to indent a group of related terms beneath a more general term, as in the example:

    Indexes

    about, 2

    in EZ, 10

    invisible, 13

    To create a two-level index entry, place the first term on the appropriate page in the original document, followed immediately by two "+" signs, and finally, the second term. Select the entire line of text and choose InvisibleIndex from the Title menu. For example, the above example of a two-level index can be created by including the following lines on the corresponding pages of a document:

    Indexes++about

    Indexes++in EZ

    Indexes++invisible

  5. Indexing from files. If you regularly compose documents that require similar indexes, you may want to create an EZ index file. Index files are used to index a specified list of terms in a number of different documents. When you apply an index file to a given document, EZ searches through the document's text and formats each occurrence of the specified terms with the index formatting style.

    When you ask EZ to create an index file, the program searches through the existing index terms and records those terms that occur in all lower case letters.

    To create an index file, then, first create a list of terms in lower case characters, and format them with index style. To avoid confusion, you may want to do this in an empty EZ window. Next, select Index To File from the Index menu. The message,

    Index file to write:

    is displayed in the message line. Type in the desired name for the index file and press Enter.

    To apply an index file to a document, first load the document into an EZ window and choose Index From File from the Index menu. The message,

    Index file to read:

    is displayed in the message box. Type in the name of the saved index file and press Enter. EZ searches through the original document and formats each instance of the index file terms with the index formatting style.

Deleting Indexed Terms

Once an index listing has been created, you will occasionally need to delete indexed terms. Although EZ has four different ways of creating indexes, the method for removing indexed terms is the same for all entries.

To delete a specific instance of an indexed term, select the desired instance within the document window and choose Plainer from the front menu card to remove the index formatting. The index or indexi formatting style is removed from the term.

If you have formatted the index term with other styles, you may have to use EZ's procedures for removing imbedded styles. For more information, see the introductory ez help file.

Disguising Indexed Terms

By default, the index and indexi formatting styles make characters appear italicized in the body of your document. However, you may want to change the appearance of these terms while editing your document. You may, for example, find it difficult to discern between words formatted with italic style and those formatted with index style. For this reason, EZ allows you to easily change the appearance of index terms so that they resemble plain text in the original document.

Disguising normal index terms. Words formatted with index style can be made to resemble plain text while editing the original document.

To make all normal index terms appear as plain text, choose Plain Index from the Index menu. The italicized appearance of these entries is removed. The terms remain formatted with index style, and will appear in both interactive Contents window and the printed index pages. See the below sections for more information.

To restore the italicized appearance of indexed terms, select Italic Index from the Index menu. All normal index terms appear in italics.

Notice that although the Plain Index and Italic Index options change the appearance of normal indexed terms, the entries remain formatted with index style. You can check the formatting of indexed terms and any other text by issuing the esc-s command. For more information, see the introductory ez help document.

Disguising invisible index terms. Documents containing a large number of invisible index entries can be rather difficult to read. You can use EZ to hide these entries and make the text more readable.

To hide invisible index entries, choose Hide Inv. Index from the Index menu. Index entries disappear from the original document, but will remain in the Contents window and in the printed or previewed index pages.

To make the invisible index entries readable once again, choose Expose Inv. Index from the Index menu. Invisible index entries are restored to their original condition.

Important Note: In order to search through or spellcheck invisible footnote terms, the terms must first be exposed.

Working with the Contents Window

After you have created an index for your document, you may want to view the list of indexed terms or check to see if any changes to the index list should be made. You can do this by opening an interactive Contents window. If all you want to do is print the index you have created, skip directly to the Printing and Previewing Indexes section below.

Opening the Contents window. To open the interactive Contents window, choose Table of Contents from the Page menu. A new window is opened which contains an alphabetical listing of all the terms in the document that have been formatted with index or indexi styles. This window may also contain titles to be included in the document's table of contents. For now, you can ignore the table of contents entries. If you would like further information on the table of contents, see the ez-contents help file.

Notice that the entries included in the Contents window are not formatted as you would expect them to be. Page numbers are not shown, different terms may be repeated in the list, and two-level index entries are not indented. Do not worry. The index listing contained in the Contents window reflects the actual index entries as they appear in the original document. The index will become properly formatted with page numbers and indentation when you Preview or Print the index.

Also notice that the Contents window is a read only buffer. This means that you cannot edit any of the text that it contains. However, you can use this window to scan the body of your document for indexed terms.

Scanning documents with the Contents window. In addition to providing you with simple list of indexed terms, the Contents window also allows you to pinpoint specific instances of an indexed term within the original document. This can be very helpful when verifying or editing index entries.

To scan your document for a specific index term, move to the Contents window and click on the desired term. Inside the document window, the specific instance of that term is selected and positioned in the viewing area.

Updating the Contents window. Because you cannot make any direct changes to text in the Contents window, you must update that window after adding or deleting indexed terms.

To update the Contents window, choose Update Contents from the Contents menu. The index listing is redisplayed to reflect the addition or deletion of indexed terms.

Choosing options in the Contents window. The interactive Contents window contains an Index menu card that is identical to the one found in the original EZ window. You can use the Index menu in either window to choose the options discussed in this help file.

Closing the Contents window. To close the interactive Contents window, move to that window and choose Delete Window from the front menu card. The Contents window is not required for printing or previewing index pages.

Printing and Previewing Indexes

While editing the document, you have little idea of what the printed index pages will look like. You can use the interactive Contents window to display a simple listing indexed terms. However, even this listing is quite different from the printed index, which is formatted with page references, indented, and placed into two columns.

Previewing indexes. To see how the index will appear in the final printout, choose Preview Index from the Index menu card. EZ opens a separate Preview window that displays a picture of the index pages as they will appear when printed.

Printing indexes. To print a document's index, choose Print Index from the Index menu card. The index pages are printed on the specified printer.

Pop-up Menu Meanings

Index menu card

Index Term: Formats all occurrences of a specified word with the index style.

Index from File: Formats all occurrences of terms included in the specified index file with index style.

Index to File: Writes the current index listing to the specified index file.

Preview Index: Creates a preview window that shows a picture of the current index as it will appear when printed.

Print Index: Prints the current index to the specified printer.

Italic Index: Makes all terms formatted with index style appear italicized in the document window.

Plain Index: Removes the italic appearance of terms formatted with index style.

Expose Inv. Index: Makes readable all invisible index terms.

Hide Inv. Index: Hides all occurrences of invisible index terms in the document window.

Program Author

Tom Neundorffer, ITC

Related Topics