Is it possible to have only lines with text numbered and leave blank space un-numbered?
TIA,
Nick D.
NOT numbering blank lines?
Re: NOT numbering blank lines?
Hi Nick,
the solution to your problem is to stop using multiple returns to create blank space. If you want to create a blank space after a paragraph, set a "Space after" in the Paragraph palette. Furthermore, you can make this "Space after" setting part of the style definition. If you use "Space after", you do not create blank lines, which means that you do not get line numbers, either.
Hope this helps.
the solution to your problem is to stop using multiple returns to create blank space. If you want to create a blank space after a paragraph, set a "Space after" in the Paragraph palette. Furthermore, you can make this "Space after" setting part of the style definition. If you use "Space after", you do not create blank lines, which means that you do not get line numbers, either.
Hope this helps.
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: NOT numbering blank lines?
There's no option in NWP to skip numbering empty paragraphs. So mrennie's idea is the best solution, use the before/after paragraph spacing to remove the need for hard blank lines/paragraphs.
Re: NOT numbering blank lines?
Which leads me to a feature request: I would love to be able to have "suppress line numbering" as part of a style definition. This option exists in Microsoft Word, and it is particularly useful. If I want to prepare a handout, line numbering usually starts with the first line of the body text, i.e. the title is not included. If I had the option to have the Title style suppress line numbering, I could simply apply line numbering. Right now, I need to add a continuous section break after the title to create a new section for the line numbering. This is surprising, actually, given how easy-to-use and accessible Nisus Writer Pro normally is.
Re: NOT numbering blank lines?
In old NW you could select paragraphs noncontigly and let NW number only those paragraphs. Can one do this with NWP?
Re: NOT numbering blank lines?
I'm using NWP to write programming manuals, and there are languages, like Python, that do require blank lines as part of the syntax: obviously, changing the AB spacing is not an option, since those blank lines have to be numbered like the rest.
Re: NOT numbering blank lines?
IIRC and AFAIK, only the line number is available in NW Classic. Do you speak of macros written for that purpose? As of the version 1.2, NW Pro Macro language is much more powerful than that of NW Classic although there are still some missing commands, e.g. math functions, PageNum, PageLineNum, etc. Anyway, now we can do something like this.Matze wrote:In old NW you could select paragraphs noncontigly and let NW number only those paragraphs. Can one do this with NWP?
Code: Select all
### Number Paragraphs in selections ###
# Put paragraph numbers of the format "$prefix + number + $suffix" at the top of each paragraph in selection(s) excluding empty paragraphs.
$prefix = "["
$suffix = "]\t"
Require Pro Version 1.2
$doc = Document.active
if $doc == undefined # if there is no open document...
exit
end
$text = $doc.text
$numFound = Find All in Selection '^[^\n\f]', 'E'
if ! $numFound
exit 'No paragraph start found (nothing selected, perhaps), exit...'
end
$sels = $doc.textSelections
Select End # deselect
$i = $sels.count - 1
while $i >= 0
if $sels[$i].text != $text # then, this selection is not in the document body
$sels.removeValueAtIndex $i # remove this selection from $sels
end
$i -= 1
end
$n = $sels.count
foreach $sel in reversed $sels
$paraNium = Cast to String "$prefix$n$suffix"
$text.insertAtIndex $sel.location, $paraNium
$n -= 1
end
### end of macro ###