Reply to topic  [ 4 posts ] 
Style Libraries 
Author Message

Joined: 2007-11-09 15:27:25
Posts: 86
I prefer to write using quirky fonts and sizes that need to be replaced before printing or sending out.
I have two style libraries (’Writing’ & ’Printing’) with identically named styles, so switching between them does the job: it keeps all formatting while changing only the fonts and sizes appropriate to the context.

But I’m wondering: Is it possible to set up a macro to do the same thing?

Although the process of switching libraries manually is not terribly cumbersome, I find myself looking for a quicker way when revising and wanting to print so that I can review on paper.


2011-09-05 09:04:22
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
This isn't too difficult to automate. Assuming your style library files are saved as "Writing.rtf" and "Printing.rtf" then the attached macros should do the trick.


Attachments:
ApplyStyles.zip [6.38 KiB]
Downloaded 280 times
2011-09-06 16:47:54
Profile WWW
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Code:
$doc.addStyles($styleText, 'replace')


Ah, that was the key command I was looking for.

_________________
philip


2011-09-06 16:58:18
Profile

Joined: 2007-11-09 15:27:25
Posts: 86
This is great and makes Nisus even more versatile.

Many thanks, Martin.


2011-09-06 18:04:52
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

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