[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Macro for XML indexing help needed



I have to do an index using a unique numbering system for each entry
(so electronic file is coded to words and phrases rather than page
numbers).

I can use a page/unique number system for the coding. (There are other
options, but this is the one I hope they'll let me use).

Austen, Jane, 19.1 for example is the first entry on typescript page
19.

For regular old, page number indexes, I use a very simple macro that
inserts # as the page number, until I finish all entries on one page.

I then use a second macro to search and replace (invisibly) for #, and
replace with the page number that I type on the command line.

For XML coding, I can do is the same thing with an added "period", but
then I manually have to add unique entry numbers.

I'd like to find a way to change # into the current page number
followed by a period and a unique number. So on page 19, say I have 5
entries, which I type into a list as they appear on the page.

Austen, Jane, #
Bronte, Emily, #
Wuthering Heights, #
Bronte, Charlotte, #
Wyler, William, #

The ideal macro would, after a prompt for a page number, turn this list
into:

Austen, Jane, 19.1
Bronte, Emily, 19.2
Wuthering Heights, 19.3
Bronte, Charlotte, 19.4
Wyler, William, 19.5

Then I'd apply a sort command, to get the list in alphabetical order.

Any ideas on how I do this?

Lisa Kleinholz
www.kleinholz.com