Page 1 of 1

Paragraph Numbering

Posted: 2017-10-04 04:58:55
by writerhoward
Is there a way to have only non-blank paragraphs in a selection numbered?


Re: Paragraph Numbering

Posted: 2017-10-04 09:12:24
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
(2.83 KiB) Downloaded 78 times

Re: Paragraph Numbering

Posted: 2017-10-04 10:26:25
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.

Re: Paragraph Numbering

Posted: 2017-10-04 16:09:26
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?

Re: Paragraph Numbering

Posted: 2017-10-05 09:40:07
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.