NISUS Archives

June 2010

NISUS@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Hamid Haji <[log in to unmask]>
Reply To:
Date:
Tue, 29 Jun 2010 04:39:21 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (46 lines)
On Tue, 29 Jun 2010 00:58:54 +0900, Kino <[log in to unmask]> wrote:

>On Jun 27, 2010, at 6:46 PM, Hamid Haji wrote:
>
>> It is possible to have a NWP macro which can merge two index files created
>> in NWP?
>> 
>> Index file 1:
>> apples 1, 3, 10, 30
>> bananas 3, 6, 10
>> 
>> Index file 2:
>> apples 31, 33, 40, 43
>> bananas 33, 36, 41
>> 
>> Merged file:
>> apples 1, 3, 10, 30-31, 33, 40, 43
>> bananas 3, 6, 10, 33, 36, 41
>
>Here is a macro for that. Before running it, you have to change the
character "Before Page Number" in your index files from space to tab or
something unique, i.e. never used in entries nor in Page Number Separator.
The language of the caret in the active document is used to determine the
sort order. Sub-entries are not supported.
>
[...]

Wow! Thank you, Kino.

I tested the macro on both Roman and Arabic (after changing the page number
separator) index files and it works as expected.

I noticed that some index topics did not appear in the merged file. This
happens when a topic includes sequential page number references showing the
first and the last of the sequence as:

apples	10–11, 120–124

The same topic is included in the merged file if the sequential page number
references are given separately as:

apples	10, 11, 120, 121, 122, 123, 124


Hamid

ATOM RSS1 RSS2