Non breaking Paragraph Marker

Everything related to our flagship word processor.
Post Reply
Vanceone
Posts: 211
Joined: 2013-05-03 07:06:31

Non breaking Paragraph Marker

Post by Vanceone »

So seeing a couple of other topics on list styles has triggered my mind on how to achieve something.

I'd like to get a heading that looks like this:

1.3. Stock Sale. The following will trigger a stock sale....
1.4. Other Events of Default. Default will also be triggered upon the following....

Note the heading as a list style, and on the same line the first sentence bolded. The text is not bolded after that.

I thought that you could use a regular heading style for this, but they are paragraph styles. If I apply bold to that paragraph style, the entire paragraph becomes bold. Also, the entire paragraph is entered into a Table of Contents. I would want only the "1.3. Stock Sale." part.

Now, you can use a nonbreaking paragraph marker, usually entered with CNTL-Enter, to split a heading over two lines without actually splitting the logical consistency of the header. Is there a way to do the opposite and run two paragraph styles together on the same line? I've thought about character styles, but they do not seem to be able to be automatically applied like the "next style" setting of a paragraph style. And manually marking the header text is laborious.
adryan
Posts: 561
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Non breaking Paragraph Marker

Post by adryan »

G'day, Vanceone et al

Rather than use a Heading Style of the Paragraph Style variety, I think I'd be inclined to use a macro that simultaneously altered the appearance of the initial content of each List Item and marked it for inclusion in the Table of Contents. For example, the following code could be incorporated into a macro that could be run after selecting the List in question.

Code: Select all

Find All @Text<^(\d+\.)+\t.+?\.>, 'Esa'
Bold
Table of Contents:Include in TOC:Level 1
Instead of "Bold", you could use whatever Character Style you like.

Because tab characters in List Items reflect List Levels, the code could be modified to have these List Levels reflected in the TOC as well if you desired.

I hope this helps.

Cheers,
Adrian
MacBook Pro (M1 Pro, 2021)
macOS Ventura
Nisus Writer user since 1996
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Non breaking Paragraph Marker

Post by martin »

This is an awkward task to finesse. Vance outlined some of the problems, and I don't see any ideal solutions. There's certainly nothing like a "paragraph joiner" character to let you run together two paragraphs with separate paragraph styles.

That said a macro or two could certainly help here, as Adrian suggested. From Vance's post it sounds like the important workflow is entering these headings as the document is being created, not fixing them all up afterwards. We know that a paragraph style will be necessary, to enforce both the list style and TOC inclusion. If we assume that as the starting point, the macro could help turn off the unwanted components of the paragraph style, eg: prevent TOC inclusion, remove bold, etc.

The workflow while you're typing would be:

1. Start a new heading by activating the desired heading style, eg: Heading 1.
2. Type the heading text after the automatically inserted list item, eg: "Stock Sale."
3. Run the macro to disable unwanted formatting.
4. Continue typing to finish the paragraph, eg: "The following will trigger a stock sale..."

Does that make sense and sound like something that would be helpful?

You could even have the macro work through styles to disable most of the unwanted formatting. You can have the macro apply a character style that enforces a regular font that's not bold. The only aspect that can't be dealt with through character styles is the TOC removal. Character styles can't enforce "Do Not Include in TOC". The macro would have to apply that manually.
Vanceone
Posts: 211
Joined: 2013-05-03 07:06:31

Re: Non breaking Paragraph Marker

Post by Vanceone »

The macro as proposed by Martin sounds good. Would it affect numbering in any fashion? By that I mean that occasionally I move entire sections around the document and usually, with the list style and automatic numbering, it renumbers. I can't see any reason why it would matter here, but I've learned to never take something for granted.

Thanks for the Macro, Adrian!

Actually, while yes, entering this is important; I frequently edit other people's documents to this style as well, and so a mass edit solution would be wonderful as well.

This particular style is very common with legal contracts; a good solution here would help Nisus be more attractive to legal customers. WordPerfect's last stronghold on the PC side is attorneys; they offer some great tools focused for lawyers that Word simply doesn't touch. Maybe Nisus could do something similar to adopt tools useful for attorneys that Word doesn't offer?
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Non breaking Paragraph Marker

Post by martin »

Vanceone wrote: 2019-08-28 14:19:29The macro as proposed by Martin sounds good. Would it affect numbering in any fashion?
I'm glad to hear the macros sound like they would be helpful. I'll attach a first stab at them. One macro is for use when typing such headings, the other can be run in a document afterwards to fix up all such headings. The macros should leave your list style numbering alone.

Heading Sentences, Switch Typing to Plain.nwm
(7.07 KiB) Downloaded 497 times
Heading Sentences, Switch All to Plain.nwm
(7.42 KiB) Downloaded 499 times

There is one quirk of the style applied by the macros which I want to point out. To turn off bold, italic, and underline font options the macros apply a character style called "Heading Plain". In order for such a style to enforce the removal of such formatting (eg: unbold) the formatting must first be enforced higher up in the style hierarchy, by an inherited style. That's why the "Heading Plain" style is based on a "Heading Font" style. This shouldn't matter much for anyone using these macros, I just wanted to make note of it.
This particular style is very common with legal contracts; a good solution here would help Nisus be more attractive to legal customers.
Do you know if this kind of formatting has a name? I'd be curious to know. I used "Heading Sentences" in the macro file names, which is rather unspecific.
Maybe Nisus could do something similar to adopt tools useful for attorneys that Word doesn't offer?
The one feature I know that lawyers would like to see in Nisus Writer is tables of authority (TOA). If you have any other suggestions I'd be happy to know them. Thanks!
Vanceone
Posts: 211
Joined: 2013-05-03 07:06:31

Re: Non breaking Paragraph Marker

Post by Vanceone »

Thanks for the Macros, Martin! I appreciate them very much!

So Nisus already has Tables of Authorities, for the most part. It's all Indexing, really. A dedicated Table of Authorities command would really only be a refining of the indexing. It's a two level index, and with the ability to possibly sort the index entries arbitrarily. Also, if an item is frequently referenced throughout the document, the word "passim" instead of the page number can be used. Usually the trigger is if the reference is cited on 4 or more different ranges.

Another legal feature would be Bates numbering. I know Wordperfect has it, but I'm not aware of anything on the Mac side that does it in word processors; I believe Acrobat can do it. Bates Numbering is essentially a page numbering system that runs across exhibits and documents; a secondary page numbering system like a watermark.

The style system I've demonstrated in this thread, where the first sentence after an automatic number is the heading, and then the normal paragraph follows--I don't know the name but it's fairly common. That's really what it is-- A heading style that is applied to the first sentence of a paragraph, along with any associated list style.

I personally would appreciate a command to import a multi-page PDF and insert it into the document, one PDF page per Nisus Page, shrinking the PDF if necessary to fit. And of course relative file links in PDF's, but that one appears to be something no one has been able to solve besides Adobe.

I do appreciate the pleading page templates that are built in. Other features are more general, not specific to lawyers I would imagine. For instance, I'd love to be able to designate what section controls the header/footer and page numbering on a page. I would love to see Nisus Writer be a LinkBack publisher as well as a subscriber. General improvements in the Macro language would be welcome; there's no way to access the palettes via keyboard control either. And facing columns would be neat and a welcome return to the Mac platform--the last word processor that had them was Wordperfect Mac, lo these 20 years ago.

So yeah, I have a few suggestions, but don't get me wrong, I love Nisus and I use it over Word for a reason--namely the index using word list is a killer feature for the Table of Authorities--it saves me countless hours, let me tell you.
ToddO
Posts: 34
Joined: 2015-10-18 14:25:32

Re: Non breaking Paragraph Marker

Post by ToddO »

I use something similar for a Heading 4, which is a Run-in Heading. It looks something like this:

Bold Heading Text. Paragraph of unbolded text follows.

I use a character Style for this called "Heading 4 Char".

You can't assign the TOC level to the character style, but I simply apply the style, and then at some point I click on one of them, use the character style menu at the bottom of the screen to Select All in Style, then in the Tools > Table of Contents > Include in TOC > Level 4 (or any other level I need according to the template.) You'll see them show up in the Navigator, and then in the actual Table of contents.

That *may* help, if I fully get what you are looking for.
Post Reply