Word and auto-generated cross-references (Part 2 of 2)

Subject: Word and auto-generated cross-references (Part 2 of 2)
From: K Watkins <KWATKINS -at- QUICKPEN -dot- COM>
Date: Fri, 1 Dec 1995 08:40:00 -0300

Okay, I guess I was wrong. If this discussion is off-topic, it's apparently
not very far off. I have gotten a whole bunch of requests for the Word
field codes discussion, and some of them don't have Email addresses on them.
So I am posting to the list the stuff I have so far. I have to split this
into two messages, because my Email system neither sends files nor accepts
messages over a certain length. This is part 2 of 2:

From Kris Olberg:

In a message dated 95-11-27 21:46:51 EST, you write:

>However, numbering pages by chapter makes it a _lot_
>more work to generate an index: you have to auto-generate each chapter's
>index separately, manually insert the "A-" for every page number in each
>index, and then sort all the indexes together. And if you have sub-entries
>in your index, the automatic sort separates them from their main entries!

>Anyone care to comment on other factors affecting the decision to number
>consecutively or by chapters? I have always preferred consecutive
>numbering, at least when the whole thing really was intended as one unified
>document, rather than a loose compendium of related materials. It's a lot
>easier to guess where to thumb to in order to find page 247, rather than
>page F-38.


Whether you use consecutive numbering (1, 2, 3, etc.) or folio-by-chapter
numbering (1-1, 2-1, etc.) depends on the document. I prefer consecutive for
all small documents (<100 pp.) and use it for large documents when there is
little chance the document will be "chunked" by users (for example, broken
up by section and passed out to different departments or users). I agree
that consecutive page numbering is easier for users overall.

Regarding your indexing problem with Word when your document consists of
several files: instead of A-1, B-1, etc., you can use 1-1, 2-1, etc.
instead (except for appendixes, which I'll talk about later). This way, you
can generate the index all at once. You create an index file that contains
the INDEX field and all of your RD fields. Example:

{INDEX \h "A" \l ", " \e " " \s sec}
<section break>
{RD c:\\myfiles\\file1.doc}
{RD c:\\myfiles\\file2.doc}
{RD c:\\myfiles\\file3.doc}

The \s switch on the INDEX field is the key. (See the online help in Word
for an explanation.) Somewhere in each of your constituent files--I put it
at the top--you need to use the SEQ field as follows:

{SEQ sec \r x} where x is the section number

Example: {SEQ sec \r 10) This field should exist in section 10.

To generate the index, just open the "index" file (i.e., the file containing
the INDEX and RD fields), select the entire document, and press F9 to update
fields. This will pull in the index entries from all of your contituent
files, giving them the appropriate page numbers.

How to Deal With Alphabetic Prefixes (Example: A-1, B-1, etc.)
----------------------------------------------------------------------------
-----------

Word cannot handle alphabetic prefixes in pages numbers. This can be a
problem if you want to use alphabetic prefixes or when your document
contains several numbered sections along with several appendixes. What I do
is use the same method outlined above except that I use a BOGUS section
number such as 97 or 99 or 1156 in the SEQ field for sections with
alphabetically prefixed page numbers. Example:

{SEQ sec \r 98}

Then I generate the index. The page numbers come out as 98-1, 98-2, etc. in
the index. Then I do a global search and replace, changing all occurrences
of "98-" to "A-". This method has worked very well for me. Caveat: Make
sure you choose a BOGUS number that is not likely to appear anywhere else in
the text of the index. Also, when you do the search and replace, include the
hyphen in both the search string and the replacement string. This can
virtually eliminate the possibility that you replace a bit of text that you
don't want to replace.

Questions? E-mail me.

Regards...Kris
-------------------------------------------------------
kjolberg -at- aol -dot- com
kjolberg -at- ix -dot- netcom -dot- com
102031 -dot- 3556 -at- compuserve -dot- com
----------------------------------------------------------------------------


Previous by Author: Word and auto-generated cross-references (Part 1 of 2)
Next by Author: Re: Screen Captures
Previous by Thread: Word and auto-generated cross-references (Part 1 of 2)
Next by Thread: Portland Chapter President


What this post helpful? Share it with friends and colleagues:


Sponsored Ads