Let me first say, that if it were up to me, I wouldn't add empty lines into a list. It goes against the logic of a document to do that, and using empty paragraphs for formatting is poor formatting style. With a bullet list you can sort of get away with this, but if the list is a numbered list it will reset your numbering to "1" for each list item. How about just increasing the "space after" on the list items? I would use a paragraph style—with a name like "Bullet list with space"—and attach the list style and the extra large "space after" to that style.
Apart from that, writing a macro to do what you want would consist of the following steps:
- Select the bullet list
- Add empty lines
- Turn off the list style on the empty lines (to get rid of the bullets)
The first step can be done using a find by style:
Code: Select all
$doc = Document.active
$bulletList = $doc.styleWithName "Bullet List"
Find All $bulletList
Now for the second step you would like to do this:
But this will typically add empty lines before and after the list as well. So you precede this line with a line that selects only the returns that are completely within the list:
Code: Select all
Find All in Selection '\n.', 'Eas'
Find And Replace '^', '\n', 'Eas'
Now at that point, I would have expected Nisus to end with the empty lines selected, but unfortunately this is not the case. Basically Nisus does not preserve selections on a find/replace in a non-contiguous selection. So at that point you have two options: work around this, or skip using the GUI Find command. I tend to favor the latter option. But this does get a bit ugly, because you either need to turn off the list style one line at a time, or calculate the location of the inserted bits (counting the shifted selections) so you can select them at the end.
Like I said, I would just use "space after".