nisus.com
https://www.nisus.com/forum/

Plain Newline macro with no List, TOC, bold, color - Solved
https://www.nisus.com/forum/viewtopic.php?f=17&t=5448
Page 1 of 1

Author:  CrisB [ 2013-09-16 05:32:11 ]
Post subject:  Plain Newline macro with no List, TOC, bold, color - Solved

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 200 times

Author:  martin [ 2013-09-20 16:35:27 ]
Post subject:  Re: How to change newline macro to remove both List & TOC st

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.

Author:  CrisB [ 2013-09-23 08:22:28 ]
Post subject:  Re: How to change newline macro to remove both List & TOC st

Reply just emailed via NWP's great Send Feedback system...
much appreciate your help, Martin.

warm regards, Cris

Author:  martin [ 2013-09-23 15:05:42 ]
Post subject:  Re: How to change newline macro to remove both List & TOC st

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 203 times

Author:  CrisB [ 2013-09-23 22:01:57 ]
Post subject:  Re: How to change newline macro to remove both List & TOC st

Thanks a million, Martin. It works perfectly.

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

warm regards
Cris

Author:  CrisB [ 2013-10-18 22:31:11 ]
Post subject:  Re: How to change newline macro to remove both List & TOC st

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'

Author:  CrisB [ 2013-10-20 11:10:02 ]
Post subject:  Re: Plain Newline macro with no List, TOC, bold, color - Sol

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 184 times

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/