Reply to topic  [ 2 posts ] 
Macros to Apply Styles 
Author Message

Joined: 2007-07-30 12:06:49
Posts: 30
Now that I am a full-fledged Nisus Pro license holder (yeah!), I feel more qualified to pester Martin for macro advice.

I am looking to create a macro that applies a particular style to certain text.

So, for example, if a paragraph begins with a "(" I want Nisus to apply the style "Parenthesis."

If a paragraph begins with three or more Uppercase letters in a row, I want Nisus to apply the style, "Character."

I am a playwright so these macros would come in mighty helpful.

Thanks for a great product!


2007-10-19 08:24:49
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Post 
These kinds of macros will require a simple combination of find commands and style menu items. Basically you'll want to find the text that meets your criteria and then apply your style.

So, your parenthesis macro might look like this:
Code:
Find '^\(.+$', 'aE'
Format:Character Style:Parenthesis


The first line is a PowerFind Pro expression that finds all paragraphs that start with an open parenthesis. The second applies your style to all found paragraphs. If you're uncomfortable with PowerFind Pro, you can use PowerFind instead. Just construct the expression in the Find panel and paste it into your macro:

Image


2007-10-19 14:17:59
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 3 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