Reply to topic  [ 6 posts ] 
search for text in italics 
Author Message

Joined: 2004-11-30 16:23:08
Posts: 64
I have been told by my editor to replace all italicized text with underlined text in a long manuscript. How can I do this using search/replace?

Thanks


2009-03-02 12:52:03
Profile

Joined: 2007-03-03 09:55:06
Posts: 494
Location: Europe
Open the Search and Replace window (comand-F).
Select PowerFind Pro from the "Using:" pop-up.
In Find what digit: .+
In Replace with digit: \0
Select all the content in the Find What pane and apply italics, or hit command-I.
Select all the content in the Replace with pane and apply underlined, or hit command-U.
Click Replace All.

Any trouble let me know.

Cheers, Henry.


2009-03-03 01:45:18
Profile

Joined: 2004-11-30 16:23:08
Posts: 64
Thanks...but I did this and nothing happens. It says not text found.

What to do?

Thanks again.


2009-03-03 05:22:34
Profile

Joined: 2008-05-17 04:02:32
Posts: 400
Unfortunately the attribute sensitive find/replace is not available in Nisus Writer Express. So try the attached macro:
Attachment:
Itlic2Underline.pl.zip [744 Bytes]
Downloaded 329 times

Code:
#!/usr/bin/perl
#Nisus Macro Block
#source front
#send text as RTF
#destination new
#End Nisus Macro Block

while (<STDIN>) {
   s/(\\AppleTypeServices [^}]*)\\i/$1\\ul/g;
   print;
}

### end of script ###
This macro modifies rtf code directly and produces a new document with italic style attribute replaced by underline style attribute. It does not touch the original document.

I have not tested the macro extensively. It may not work properly for mixed attributes. As for Italic applied via character/paragraph styles, it would be better to change the definition of those styles.


2009-03-03 06:03:27
Profile

Joined: 2007-03-03 09:55:06
Posts: 494
Location: Europe
My fault, sorry. I should have remembered that NWE doesn't support search with attributes.

Below is another (and faster) way.

Select any occurrence of italicized text.
A small "a" should appear on the statusbar (at the window's bottom).
Click on the "a" and select "Select All". This will select all occurrences of italicized text in the document.
Hit command-I, or select Format > Italics, or click Italics in the Character palette, to toggle the attribute back to regular.
Apply an underline format by hitting command-U, selecting Format > Underline > Single, or clicking Underline in the Character palette.

Cheers, Henry.


2009-03-03 08:23:50
Profile

Joined: 2004-11-30 16:23:08
Posts: 64
Wow! Thanks for all the suggestions. Your suggestion worked like a charm Henry... Thanks again to all!

Cheers.


2009-03-03 19:19:50
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: Bing [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software