Plain Newline macro with no List, TOC, bold, color - Solved

Get help using and writing Nisus Writer Pro macros.
Post Reply
User avatar
CrisB
Posts: 122
Joined: 2006-09-25 10:30:11
Location: Gibraltar, Europe
Contact:

Plain Newline macro with no List, TOC, bold, color - Solved

Post by CrisB »

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
8 No-list Newline.nwm
Has my attempt to remove TOC both before and after the Newline
(17.84 KiB) Downloaded 746 times
Last edited by CrisB on 2013-10-18 22:35:00, edited 1 time in total.
Find strategies to improve your effectiveness at http://www.lifestrategies.net
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: How to change newline macro to remove both List & TOC st

Post by martin »

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.
User avatar
CrisB
Posts: 122
Joined: 2006-09-25 10:30:11
Location: Gibraltar, Europe
Contact:

Re: How to change newline macro to remove both List & TOC st

Post by CrisB »

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
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: How to change newline macro to remove both List & TOC st

Post by martin »

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 750 times
User avatar
CrisB
Posts: 122
Joined: 2006-09-25 10:30:11
Location: Gibraltar, Europe
Contact:

Re: How to change newline macro to remove both List & TOC st

Post by CrisB »

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
User avatar
CrisB
Posts: 122
Joined: 2006-09-25 10:30:11
Location: Gibraltar, Europe
Contact:

Re: How to change newline macro to remove both List & TOC st

Post by CrisB »

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'
User avatar
CrisB
Posts: 122
Joined: 2006-09-25 10:30:11
Location: Gibraltar, Europe
Contact:

Re: Plain Newline macro with no List, TOC, bold, color - Sol

Post by CrisB »

Maybe I should have attached this macro which now gives a totally unformatted blank paragraph no matter how it was formatted before...

Cris
Attachments
Insert Plain Paragraph.nwm
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.
(18.62 KiB) Downloaded 716 times
Find strategies to improve your effectiveness at http://www.lifestrategies.net
Post Reply