NewDeal Hot Tip 1901

[Hot Tips for...] NewWrite

Semi-Automatic Table of Contents

Here is a previously undocumented feature of NewWrite. If you have ever had to reformat a long document that has a table of contents or index, this tip should be very helpful. By following these procedures, your table of contents will automagically keep track of the page number for each article, section, or chapter.

First you must enable the Help Editor in NewWrite. The Help Editor is used by NewDeal programmers to create the on-screen help files you see when you click the question mark button in NewDeal applications. The Help Editor is actually a hidden feature of NewWrite.

To turn on the Help Editor:

  1. In Preferences, Configure UI, choose the Advanced button and check Enable Help Editor. Choose OK. (If you have the Configure application, choose the System button and turn on Enseble Help Editor. Or you can edit your GEOS.INI file by adding these two lines:
    [configure]
    helpEditor = true
  2. Run NewWrite and click on Options, Change User Level.
  3. In the User Level dialog box, click the Fine Tune button.
  4. Check the new option for Help Editor and click OK.
  5. To save this setting for the future, choose Save Configuration in the Options menu.
The Help Editor menu will now appear in your menu bar.

You will use only two of the items in the Help Editor menu:

Define Context

This is where you enter names for the various sections, chapters, or articles in your document. The names can be as simple as a number or word, or they can be a descriptive phrase. Define a context for each article, chapter, or section in your document that you plan to track in your table of contents or index. Leave the drop down lists set to their defaults: "current file" and "Text."

Set Context

This is where you actually mark the chapter or article which you want to track in your index or table of contents.

To set a context:

  1. Select the first character, word, or phrase on the first page of a chapter.
  2. Click Help Editor, Set Context.
  3. Choose the appropriate context from the list and click Apply.

Here's a quick example.

Let's say you have written a short book about animals with three chapters: horses, dogs, and cows. First, choose Help Editor, Define Context. In the dialog box, enter the word "horses" and press ENTER. Next enter the word "dogs" and press ENTER. Finally, enter the word "cows" and press ENTER. Close the dialog box.

Now go to the fist page of the chapter about horses and select the title. It's often best if you include the first character on the page, plus the words which make up the title. If you have a graphic in the text layer at the start of the page, you may select it, too.

While the title is selected, click Help Editor, Set Context. Choose the appropriate context from the list (horses) and click Apply.

Next go to the first page of the chapter about dogs, select its title and set its context to "dogs." Finally go to the first page of the chapter about cows and set its context.

Using contexts to automate page numbering in your table of contents

Now you are ready to use the automatic page numbering feature. Let's say your table of contents looks like this:

Chapter One - Horses ............ page A
Chapter Two - Dogs .............. page B
Chapter Three - Cows ............ page C
where A, B, and C are the actual page numbers for the first page of each chapter.

Position your insertion point where the letter A appears in the above example and click Edit, Insert Special, Number from Context. In the Number from Context dialog box, select Context Page, highlight "horses" in the list, and click Apply. The page number for the chapter about horses will appear.

Then position your insertion point where the letter B appears in the above example, highlight "dogs" in the Number from Context dialog and click Apply. Repeat the process for the the location where C appears in our example for the context "cows."

Now you may return to editing and expanding your document. If you add pages or move the chapters around, the page numbers in your table of contents will be automatically updated.

If your document contains sections, Section Number and Page in Section work the same way in the Number from Context dialog as they do in the regular page numbering feature in the Insert Special menu.


Return to Index

Last Modified 7 Mar 1999