Reply to topic  [ 7 posts ] 
Plain Newline macro with no List, TOC, bold, color - Solved 
Author Message
User avatar

Joined: 2006-09-25 10:30:11
Posts: 115
Location: Gibraltar, Europe
Hi,

I'm trying to revise Martin's nice new Remove Lists newline to also remove the ToC style. This is an attempt to overcome the lack of a fully functional NWP "Remove Styles and Attributes' command, one which actually works as stated and also removes List and TOC styles. A "Remove Everything" command.

Whether I'm inserting a new line before or after the current cursor point at the beginning or end of the current line, I need the macro to give the new line no list style and no TOC style. So I tried this macro, without the first menu-TOC-remove-command (initially), but it does not remove the TOC both when the newline is before as well as after the text on the current line. Then I tried this macro now with a duplicated initial menu-TOC-remove-command as well as ending menu-TOC-remove-command. But it still does not work properly.

Please, how do I improve this menu to remove both List styles and TOC styles whether I'm inserting before or after the current line?

Thanks for your help
Cris


Attachments:
File comment: Has my attempt to remove TOC both before and after the Newline
8 No-list Newline.nwm [17.84 KiB]
Downloaded 201 times

_________________
Find strategies to improve your effectiveness at http://www.lifestrategies.net


Last edited by CrisB on 2013-10-18 22:35:00, edited 1 time in total.

2013-09-16 05:32:11
Profile WWW
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Hi Cris, I'm not sure I understand what you mean by "when the newline is before as well as after the text on the current line". I tried running the macro with the insertion point both at the start, middle, and end of a paragraph marked for TOC inclusion; in all cases the newly created paragraph was not marked for TOC inclusion.

If you could attach (or email) a document where the macro does not work as you expect, that would be helpful. Please have the document saved so it reopens with the selection/caret exactly as it should be to see the failure.


2013-09-20 16:35:27
Profile WWW
User avatar

Joined: 2006-09-25 10:30:11
Posts: 115
Location: Gibraltar, Europe
Reply just emailed via NWP's great Send Feedback system...
much appreciate your help, Martin.

warm regards, Cris

_________________
Find strategies to improve your effectiveness at http://www.lifestrategies.net


2013-09-23 08:22:28
Profile WWW
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Cris and I communicated privately and this attached macro is the result. Conceptually it inserts a new plainly formatted paragraph (ie: Normal style, no list items, no TOC inclusion). If you run it when the selection is at the start of a paragraph, then the new paragraph is inserted before; if you run it with a selection at the end of a paragraph, then the new paragraph appears afterwards.


Attachments:
Insert Plain Paragraph.nwm [18.46 KiB]
Downloaded 204 times
2013-09-23 15:05:42
Profile WWW
User avatar

Joined: 2006-09-25 10:30:11
Posts: 115
Location: Gibraltar, Europe
Thanks a million, Martin. It works perfectly.

And wow, that code is complicated... :-)

warm regards
Cris

_________________
Find strategies to improve your effectiveness at http://www.lifestrategies.net


2013-09-23 22:01:57
Profile WWW
User avatar

Joined: 2006-09-25 10:30:11
Posts: 115
Location: Gibraltar, Europe
To get this macro to insert a TOTALLY plain line, one that also has no color nor bolding etc, then it also needs the following two lines

Menu 'Format:Remove Attributes Except Styles'
Menu 'Character Style:Remove Character Styles'


2013-10-18 22:31:11
Profile WWW
User avatar

Joined: 2006-09-25 10:30:11
Posts: 115
Location: Gibraltar, Europe
Maybe I should have attached this macro which now gives a totally unformatted blank paragraph no matter how it was formatted before...

Cris


Attachments:
File comment: This macro inserts a new totally plain paragraph. If you run it when the selection is at the start of a paragraph, then the new paragraph is inserted before; if you run it with a selection at the end of a paragraph, then the new paragraph appears afterwards.
Insert Plain Paragraph.nwm [18.62 KiB]
Downloaded 185 times

_________________
Find strategies to improve your effectiveness at http://www.lifestrategies.net
2013-10-20 11:10:02
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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