Index using prefix for page numbers

J

Jo

I've been asked to create a single Index document for a book that has
multiple Sections and each Section has multiple Chapters. Each of these
chapters is currently in a separate document that has its own little index at
the end, using words that are marked with XE fields.

No problem. I know *not* to use a Master Document. I also know how to create
a separate document that compiles an index from multiple documents using the
RD field.

However, each section and chapter starts its page numbering from 1, and the
authors want it to stay this way. I've been asked to compile an index that
would display a combination of Section-Chapter-Pagenumber for each word
entry. For example, if the word "aardvark" was in Section 2, Chapter 4, Page
7, it would show as 2-4-7. If the same word was in Section 3, Chapter 1, Page
2, both instances of the word would show in the central index as something
like this:

Aardvark........2-4-7, 3-1-2

What is the easiest way to do this? I have a vague idea how to approach it
but nothing concrete. Would I have to specify something in the XE field
codes, like a switch that would put a section-chapter prefix in front of the
page number in the final index? If so, what switch would do this? Or should I
try to do something from a concordance table?

Which brings me to another question: The individual indexes were created
using individually marked words using XE field codes. Is there any way to
automatically run through a document and collect all the words that have been
marked, so that I can compile them into a concordance table? I'm wondering if
that *might* be an easier way to deal with this, but I'm not sure.

Any help with this would be most appreciated!

Jo
 
R

Robert M. Franz (RMF)

Hi Jo
I've been asked to create a single Index document for a book that has
multiple Sections and each Section has multiple Chapters. Each of these
chapters is currently in a separate document that has its own little index at
the end, using words that are marked with XE fields.

No problem. I know *not* to use a Master Document. I also know how to create
a separate document that compiles an index from multiple documents using the
RD field.

However, each section and chapter starts its page numbering from 1, and the
authors want it to stay this way. I've been asked to compile an index that
would display a combination of Section-Chapter-Pagenumber for each word
entry. For example, if the word "aardvark" was in Section 2, Chapter 4, Page
7, it would show as 2-4-7. If the same word was in Section 3, Chapter 1, Page
2, both instances of the word would show in the central index as something
like this:

Aardvark........2-4-7, 3-1-2

What is the easiest way to do this? I have a vague idea how to approach it
but nothing concrete. Would I have to specify something in the XE field
codes, like a switch that would put a section-chapter prefix in front of the
page number in the final index? If so, what switch would do this? Or should I
try to do something from a concordance table?

I don't know what the easiest way is (apart from changing the page
numbering :)). But it seems that you would be best off to gather the
information that's there in the individual indexes already. If you do it
manually, you copy | paste as text one index into your overview
document, and change the page numbers according to your requirements.
You do that for all indexes. And in the end, you have to shuffle them
into one (not sure if a mere sort will suffice).

Of course, you want to do that in code, and I'm sure some gurus in here
might provide a starter.

Which brings me to another question: The individual indexes were created
using individually marked words using XE field codes. Is there any way to
automatically run through a document and collect all the words that have been
marked, so that I can compile them into a concordance table? I'm wondering if
that *might* be an easier way to deal with this, but I'm not sure.

Given that you already have everything marked with XEs, I doubt a
concordance file would do you any good (the result of applying a
concordance file are marked index entries).

0.2cents
Robert
 
J

Jo

Hi Robert,

Thanks very much for your reply! I think the folks I'm doing this work for
are hoping I can do this in code, so that if they change stuff in the
original documents, it will be reflected in the "overview index" by simply
updating the fields.

So copy/pasting would be the last preference for something like this, since
it would have to be redone manually each time a change was added. And I
expect there will be many changes before the final product is ready to roll.
So the more automated I can make this, the better.

But perhaps there's a way I can easily alter the page numbers in (copies of)
the original documents (e.g., maybe using a macro?), so that the chapter
documents already have the 2-4-7 format for the page numbers already there.
Then the overview index would import those formats with the RD fields. I
think this is what you were suggesting about changing the page numbers, right?

It sounds like there are a few ways to approach this, and all of them have
to be creative solutions rather than a function that's already built in for
this purpose. Pick your poison. LOL

I'm wondering if anyone else out there might have done a project like this
before and could share how they did it?

Thanks again.

Jo
 
R

Robert M. Franz (RMF)

Jo said:
So copy/pasting would be the last preference for something like this, since
it would have to be redone manually each time a change was added. And I
expect there will be many changes before the final product is ready to roll.
So the more automated I can make this, the better.

yes, you surely want your code to do the "copying" (in whichever form).

But perhaps there's a way I can easily alter the page numbers in (copies of)
the original documents (e.g., maybe using a macro?), so that the chapter
documents already have the 2-4-7 format for the page numbers already there.
Then the overview index would import those formats with the RD fields. I
think this is what you were suggesting about changing the page numbers, right?

That's a creative approach. But I fear you will fail to generate page
numbers in the form #-#-#! :-( Word can only show you a chapter number
so you'd stick with #-#.

It sounds like there are a few ways to approach this, and all of them have
to be creative solutions rather than a function that's already built in for
this purpose. Pick your poison. LOL

Indeed -- as most times when you have a decent task ... :)

Good luck!
Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top