NISUS Archives

May 2011

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:
Þorvarður Davíðsson <[log in to unmask]>
Reply To:
Date:
Mon, 30 May 2011 11:46:31 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (44 lines)
I have several text documents from Gutenberg. Names of chapters and/or poems are usually written in UPPERCASE and span one paragraph. I'm now trying to write a macro that selects all chapter names so that I can easily include them in TOC and view them in the Navigator Pane.

This shouldn't be too difficult to achieve but I have tried a number of ways and it simply won’t work by me. Can somebody help?

Here is a sample text based on a poem by William Blake. Every paragraph starts with a SPACE. 


 THE BLOSSOM
 
 Merry, merry sparrow!
 Under leaves so green
 A happy blossom 

 THE CHIMNEY SWEEPER
 
 When my MOTHER died I was very young,
 And my father sold me while yet my tongue
 Could scarcely cry "Weep! weep! weep! weep!"
 So your chimneys I sweep, and in soot I sleep.

 THE CHIMNEY-SWEEPER

 THE CHIMNEY/SWEEPER

 THE BLOSSOM?

 THE BLOSSOM!



The closest I have got is this:

Find All '^[[[:upper:]]{1,40} [[:upper:]]]{1,40}\n', 'Ea-i'

It selects the chapter name but unfortunately also the following empty line with a Space and Return and that is not what I want.

Can I search for AnyWord in uppercase? I could do that in Nisus Classic if I highlighted AnyWord in the Find Box and executed Edit >  Convert > To UPPERCASE

but in NWP this seems not to work so as an alternative I am forced to use Wild Card > AnyUppercaseLetter.

Is this correct? I mean, is AnyUppercaseLetter the way to go? I would be interested in hearing whether there is an alternative search criterion available? 


Þorvarður Davíðsson

ATOM RSS1 RSS2