home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #2
/
Image.iso
/
wp
/
grfbook.zip
/
INDEX.DOC
< prev
next >
Wrap
Text File
|
1993-05-28
|
6KB
|
141 lines
INDEX, ver. 1.5 (c)1993 EFD Systems
All Rights Reserved
INDEX is a simple (and somewhat crude) utility designed to help compile a
standard word/page type index or a table of contents for TXTBook and GRFBook
documents. This utility can be used interactively, to index one word at a time,
or in batch mode by using DOS redirection to read and write to and from files.
Most word processors (WordPerfect, WordStar, etc.) have built-in features to
perform these tasks. These built-in features are probably more convenient and
should be used if available; otherwise, use this utility.
* INTERACTIVE MODE
To use this utility interactively, type: INDEX bookname.txt options
'bookname.txt' is the name of the ASCII document file. Options MUST designate
the document type, either "T" (TXTBook file, 24 lines/pg), or "G" (GRFBook file,
29 lines/pg). Option "E" can be added to echo as output the lines found
containing the given index word.
EXAMPLES: INDEX mybook.doc g (GRFBook file)
INDEX mybook.doc te (TXTBook file, echo lines)
In interactive mode, the user is prompted to enter each word to be indexed one
at a time. Type "END" to exit the utility and return to DOS.
* BATCH MODE
Batch mode makes use of DOS redirection to read/write to/from files instead of
reading the keyboard and writing to the screen. For batch mode use type:
INDEX bookname.txt options <wordlist >output
Wordlist is an ASCII file containing a list of the words that you wish to index,
one word per line. Use "END" as the last word in the list, otherwise; the
program will hang at the end of the file waiting for input and you will have to
re-boot the computer since keyboard input is no longer recognized. Output is
the name of the file that you wish to send the index results to. "<" and ">"
are DOS redirection symbols. See your DOS manual if you need more details on
DOS re-direction. Note that the time required to index each word increases with
the size of the file.
* BUILDING A WORD/PAGE INDEX
This utility is a general purpose tool which can be used in a variety of
different ways depending upon the user's needs, preferences, skills and
imagination. For example, to create a standard back-of-the-book word/page index
for a GRFBook document, any of the following options could be used.
Option 1
Use INDEX interactively by typing:
INDEX mybook.txt g
Manually type each word to be indexed. Results are displayed on the screen and
must be manually copied or printed with the DOS Print Screen key. After the
index has been built, edit the document file and manually add the index
information. This option is good for short, simple documents.
Option 2
Use your editor/word processor to prepare an ASCII file containing a list of the
words you wish to index, one word per line. Use DOS redirection to pipe the
prepared word list into INDEX. Use DOS redirection again to send results out to
yet another file. The command line should look something like this:
INDEX mybook.txt g <words.lst >results.txt
Use your editor to dress up the results stored in 'results.txt' and then merge
results.txt into the document using your editor; or, use the DOS copy command to
append results.txt to the end of the document file like this:
COPY mybook.txt+results.txt mybook.txt
This option is better for long documents.
Option 3
Any combination of the above options is also possible. You can read a word list
from a file but display the results to the screen like this :
INDEX mybook.txt g <words.lst
Likewise, you can enter words interactively while re-directing the results to a
file like this :
INDEX mybook.txt g >results.txt
* BUILDING A TABLE OF CONTENTS
The [E]CHO option can be put to good use to help build a table of contents for a
document. As you are preparing the document, use any unique character or string
of characters to mark the section headings that you would like to list as
entries in the table. For example, in this document, an asterisk marks each
section heading. Leave a blank page(s) in the document as a place holder for
the table of contents. This is essential if you are to avoid changing all of
the document page numbers when the table of contents is merged in. When the
document is almost finished, use INDEX with echo to find the unique character or
string and display the section headings followed by a comma and the heading page
number.
This file provides an example. Exit to DOS now and type : INDEX index.doc ge
When prompted for a word to index, type an asterisk, [*], and press [ENTER].
Each heading, followed by it's page number, should be echoed to the screen. As
was the case earlier, results can be re-directed to a file. This allows the
table of contents to be refined and then merged into the actual document. To
re-direct the table, use a command line similiar to this:
INDEX mybook.txt ge >table.txt
* NOTES
- To get a feel for how this utilty works, practice using it on this file.
Start INDEX in interactive, GRFBook, echo mode by typing:
INDEX INDEX.DOC ge
When prompted for the word to index, type: '*' <enter>. A list of the major
headings for this document (which all begin with '*') should be displayed on
the screen. Type: END <enter> to exit.
- Unique characters for identifying section headings and preparing a table of
contents can be placed out of sight beyond column 80 and left in place as part
of the document.
- Words are indexed without regard to capitalization (case-insensitive).
- Only exact matching words are indexed. For example, SUPERSTITION is not
considered to be a match for the index word SUPER.
- In interactive mode, all input is accepted on the top line of the screen. This
may initially be somewhat confusing since the cursor is always located where
the next output will take place.
- See TXTBOOK.DOC or GRFBOOK.DOC for license and disclaimer information.