List Style Macro Needed

Get help using and writing Nisus Writer Pro macros.
Post Reply
tedg
Posts: 57
Joined: 2012-09-22 01:52:56
Location: Brisbane, Australia
Contact:

List Style Macro Needed

Post by tedg »

Here's what I mean by list styles. In Nisus, the paragraph styles are the masters. If I take paragraphs and make them list entries, the list attribute is applied, but there is no way to change the paragraph specifications. What I want is the list items to have at the very least a closer paragraph spacing and ideally a custom right indent. And I don't want to have to perform two or three operations in the text to get it.
Attachments
Screenshot 2024-09-06 at 5.56.10 AM.png
Screenshot 2024-09-06 at 5.56.10 AM.png (272.52 KiB) Viewed 8892 times
User since 1990
Most current NWp and MacOS
MacBookPro 16-inch 2023
Þorvarður
Posts: 441
Joined: 2012-12-19 05:02:52

Re: List Style Macro Needed

Post by Þorvarður »

tedg wrote: 2024-09-05 12:04:42 I don't want to have to perform two or three operations in the text to get it.
You only have to perform one operation, i.e. run a macro, and let Nisus do the rest for you.
Try this and see if it is what you want. First select the paragraphs you want to change, then run the macro.

Code: Select all

# Ensure something is selected.
$textExpression = Read Selection
If $textExpression == ‘’
$proceed = Prompt “You need to select some text first. Click now ‘OK’ and then select the text.”, ‘’, ‘OK, I will.’
# The following sleep-trick is from Adrian
   While $textExpression == ‘’
      Sleep 1
      $textExpression = Read Selection
   End
End

Format:Lists:Bullet List
Set Paragraph Spacing Before “0”
Set Paragraph Spacing After “0”
Align Justified
Set Tail Indent “40”
User avatar
phspaelti
Posts: 1345
Joined: 2007-02-07 00:58:12
Location: Japan

Re: List Style Macro Needed

Post by phspaelti »

Actually you don't need macros at all for Ted's problem.
The proper way to handle lists isn't to use list styles (I mean you do need list styles, but…). Rather you should make paragraph styles for your lists. Then attach the list style as an attribute to the list style. The paragraph style will then specify all other attributes you want for the list.

The name "List Style" is a bit of a misnomer. These styles are just the collection of specific attributes needed for lists collected into one. They are really a kind of attribute collection. Formatting isn't part of the List style.
philip
Post Reply