List formatting

Everything related to our flagship word processor.
Post Reply
JBB
Posts: 12
Joined: 2009-09-13 23:13:36

List formatting

Post by JBB » 2014-07-29 17:32:21

Is there a way to get a list/paragraph style formatted as follows?

I. Heading

i.e., the underlining does not apply to the number itself? I can't seem to figure this out. Thank you.

User avatar
phspaelti
Posts: 994
Joined: 2007-02-07 00:58:12
Location: Japan

Re: List formatting

Post by phspaelti » 2014-07-29 21:10:33

The following kludge seems to work. Apply Underline Color > White to the list style that you are using for the automatic Heading number.
I was hoping that "No Underline" (applying Underline twice) might work, but it doesn't seem to. It would be nice if Nisus made the styles applied to list numbers visible in some way, and/or otherwise improved the handling of such styles.
philip

JBB
Posts: 12
Joined: 2009-09-13 23:13:36

Re: List formatting

Post by JBB » 2014-07-29 23:08:22

Thank you, and I agree: the numbering should be independently styled from the content. Hopefully an update will address this.

User avatar
martin
Official Nisus Person
Posts: 4471
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: List formatting

Post by martin » 2014-07-31 14:20:35

phspaelti wrote:I was hoping that "No Underline" (applying Underline twice) might work, but it doesn't seem to. It would be nice if Nisus made the styles applied to list numbers visible in some way, and/or otherwise improved the handling of such styles.
The problem is that the "no underline" attribute is culled immediately from the list level because NWP thinks it's unnecessary.

The situation is akin to selecting a character style, applying bold, and then toggling bold again: NWP removes the bold attribute. It would only leave "unbold" as an attribute if the style was overriding an ancestor style, eg: if Heading 1 enforces bold, but Heading 2 needs to turn off bold.

I'm not sure what the best solution here might be. Perhaps we could change NWP so it doesn't cull unnecessary attributes from styles after the user interacts with the stylesheet. That would leave it to the user to manually delete superfluous attributes from style definitions.

JBB
Posts: 12
Joined: 2009-09-13 23:13:36

Re: List formatting

Post by JBB » 2014-07-31 14:29:20

So it's currently not possible to have list styling as:

1. Item 1

or

1. Item 1

But rather just:

1. Item 1

and

1. Item 1

Correct?

User avatar
martin
Official Nisus Person
Posts: 4471
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: List formatting

Post by martin » 2014-07-31 14:50:38

Yes, that is correct. To state it more specifically: one cannot have a list style remove attributes that are enforced through other means (eg: your paragraph style). However, you could have a list style add attributes, eg: the list style could make all your list items blue, even if the paragraph isn't blue.

JBB
Posts: 12
Joined: 2009-09-13 23:13:36

Re: List formatting

Post by JBB » 2014-07-31 19:06:24

I see. I hope this can get solved as soon as possible.

JBB
Posts: 12
Joined: 2009-09-13 23:13:36

Re: List formatting

Post by JBB » 2014-11-30 23:20:08

It's been a bit more than a year since the last update…hoping for some new features and fixes such as this soon.

JBB
Posts: 12
Joined: 2009-09-13 23:13:36

Re: List formatting

Post by JBB » 2015-03-17 17:34:57

Just curious if this now can be done in 2.1?

User avatar
martin
Official Nisus Person
Posts: 4471
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: List formatting

Post by martin » 2015-03-18 17:07:41

Sorry, but this cannot be done in NWP version 2.1.

JBB
Posts: 12
Joined: 2009-09-13 23:13:36

Re: List formatting

Post by JBB » 2018-11-18 15:46:02

How about 3.0?

User avatar
martin
Official Nisus Person
Posts: 4471
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: List formatting

Post by martin » 2018-11-19 12:04:50

I'm sorry but this is still not possible in Nisus Writer Pro 3. List styles cannot remove formatting enforced by your paragraph styles. Your best option is likely to fake this by having your list style enforce a white underline:

list.png
list.png (49.69 KiB) Viewed 3704 times

That will make it appear as if the list item has no underlining in the document text:

text.png
text.png (17.59 KiB) Viewed 3704 times

User avatar
phspaelti
Posts: 994
Joined: 2007-02-07 00:58:12
Location: Japan

Re: List formatting

Post by phspaelti » 2018-11-19 16:28:41

One possibility is that of using a character style to remove formatting of this kind. While the following solution is a kludge it can be made to work. While a character style cannot directly be given a feature "Unbold" or "No Underline", the trick is to first define a "dummy" character style with all the features turned on. Then create a second style based on the first with all the features turned off. This character style can then be applied to the numbers in heading paragraphs. I provide a screenshot and a demonstration file below.
Turn Off Style Demo.png
Turn Off Style Demo.png (134.01 KiB) Viewed 3696 times
Attachments
Turn Off Character Style test.rtf
(22.74 KiB) Downloaded 77 times
philip

User avatar
phspaelti
Posts: 994
Joined: 2007-02-07 00:58:12
Location: Japan

Re: List formatting

Post by phspaelti » 2018-11-19 17:35:01

And a short addition. To make inserting a Heading style more convenient one can use a macro like the following to insert the Heading style. Just attach the macro to the preferred shortcut for the heading style.

Code: Select all

Type Newline # Optional convenience
Paragraph Style:Heading 1
if Find '^.+\t', 'Eb'
  Character Style:Turn off
  Select End
  Character Style:Turn off
end
The macro (optionally) inserts a newline applies the Heading style, then checks to see if there is an inserted automatic number. If yes, it applies the "Turn off" character style and then places the cursor after the number and turns the character style back off, so further typing will proceed in the normal Heading style.
philip

User avatar
martin
Official Nisus Person
Posts: 4471
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: List formatting

Post by martin » 2018-11-21 10:15:32

Those are good and clever ideas, thanks Philip!

To build off Philip's contributions, I'd probably adjust the macro a bit, so it's not so specific to any particular paragraph style. I could imagine myself wanting to turn off a list item's underline for other styles (eg: Heading 2, etc). I'll attach a macro that just turns off font face options (like underline) for the current paragraph's list item, no matter how the list item got there.
Attachments
List Item - Disable Font Face Options.nwm.zip
(2.88 KiB) Downloaded 72 times

Post Reply