Reply to topic  [ 5 posts ] 
Paragraph Numbering 
Author Message

Joined: 2013-02-03 05:10:26
Posts: 33
Is there a way to have only non-blank paragraphs in a selection numbered?

Thanks,
Howard


2017-10-04 04:58:55
Profile

Joined: 2012-12-19 05:02:52
Posts: 226
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.

Attachment:
Number non-empty paragraphs.nwm.zip [2.83 KiB]
Downloaded 16 times


2017-10-04 09:12:24
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Þ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.


2017-10-04 10:26:25
Profile WWW

Joined: 2013-02-03 05:10:26
Posts: 33
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?


2017-10-04 16:09:26
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
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.


2017-10-05 09:40:07
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 7 guests


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:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software