Paragraph Numbering

Everything related to our flagship word processor.
Post Reply
writerhoward
Posts: 50
Joined: 2013-02-03 05:10:26

Paragraph Numbering

Post by writerhoward »

Is there a way to have only non-blank paragraphs in a selection numbered?

Thanks,
Howard
Þorvarður
Posts: 410
Joined: 2012-12-19 05:02:52

Re: Paragraph Numbering

Post by Þorvarður »

Hello Howard,

Yes, you can do this with a simple macro.
Here is such a macro that will work on a selection. It first inserts list numbers. Then finds the numbers in empty paragraphs and replaces them with a return.

Make sure you have a list style with this name (it's an original Nisus list style) and that for this list style numbering continues across document content. If you ever changed the original style, you'll then have to modify the Find and Replace part accordingly for the macro to work.
Number non-empty paragraphs.nwm.zip
(2.83 KiB) Downloaded 446 times
User avatar
martin
Official Nisus Person
Posts: 5228
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Paragraph Numbering

Post by martin »

Þorvarður macro might do the trick, but personally I would come at this from a different angle and ask the question: do you really need those blank lines? To state it a different way, instead of using newlines to create blank lines, why not use paragraph spacing or soft returns? Either of those will not trigger list items for the blank lines.
writerhoward
Posts: 50
Joined: 2013-02-03 05:10:26

Re: Paragraph Numbering

Post by writerhoward »

Thank you both for your replies.

Martin, if I do it your way, how can I get the automatic paragraph numbering to apply only to a selection, not the whole document?
User avatar
martin
Official Nisus Person
Posts: 5228
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Paragraph Numbering

Post by martin »

writerhoward wrote:Martin, if I do it your way, how can I get the automatic paragraph numbering to apply only to a selection, not the whole document?
From this question, it's become clear to me that you're talking about paragraph numbering that appears not in the main text, but as numbers running alongside the main text in the margin (eg: using the menu View > Line Numbers > Show Paragraph Numbers This Section). Both Þorvarður and I incorrectly assumed you were asking about list item numbering, which people sometimes inaccurately call paragraph numbering.

Now that's clear, the answers will be different. I can still recommend using paragraph spacing or soft returns to prevent numbering for otherwise blank lines; that is still a good strategy. However, paragraph numbering is not as flexible as list item numbering when it comes to controlling which bits of text are numbered and which are not. Paragraph numbering can only be controlled on a per-section basis. That means you'll need to insert a section break any time you want to change whether paragraph numbering is enabled or not.

I hope that helps. Please let me know if you have any further questions.
Post Reply