Conditional paragraph formatting based on its associated outline level

LIBRE OFFICE WRITER
Is it possible to conditionally format a paragraph based upon the outline level of its associated list style?
Specifically, I created a list style with different text and numbering for its different levels.
I then created a paragraph style that uses the list style I created.
I can create a paragraph of that style, and tab in or out to get the outline level I want.
But I also need to format the paragraph based on that outline level.
Can this be done in LibreOffice Writer?

Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 32; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.6
Calc: threaded

Since version 7.6, there is a new experimental feature, related to tdf#62032. Namely, paragraph styles can be bound not only to list styles, but also to the specific levels of the selected style. This allows you to create different paragraph styles, one per list level, and assign them accordingly. Then, changing the outline level of the list, you would also get respective paragraph style automatically assigned.

Note again: the feature is experimental, meaning it’s only available when you have experimental features enabled in Advanced Options.

@mikekaganski I turned the experimental features on. Restarted Libreoffice. Opened a new document, but I could not find the menu in your screenshot above.
The “Same as outline level” option is not available.
Could this be a MSWINDOWS version only feature?

Did you check the very first “since version 7.6” words?

@mikekaganski WHOOPS! my bad. Sorry.
Crud, It looks like I have to manually install the latest on Ubuntu which will take it out of the auto-update function.
Thanks for the quick response.

There is the official PPA that allows you to continue using autoupdate.

Woot! Your DA MAN!

Now I have to remove what I just installed and get the PPA version installed.

But it worked.

AND, since I can now do what I need to with LibreOffice, I don’t have to submit to Microsoft’s “Serfdom Plan”, $100 US is coming your way LibreOffice.

Thank you!

1 Like

One last comment. The conditional format function is almost perfect.
It lets you create and assign different character styles to the outline numbering of different list levels of the same paragraph style.

I say almost perfect because perfect would be the ability to assign a paragraph style to the entire paragraph based upon its outline level. Just a suggestion.

What do you mean exactly?

  • “entire” ??? A paragraph style always apply to the complete paragraph. So, which part in the “entire” range is not covered by the style?
  • “outline level”: you seem to make a confusion between outline level and list level
    Outline is the set of paragraphs designated as headings (up to 10 levels) which can be collected in a TOC.
    Every list can have up to 10 levels too, but if the paragraph style is not attached to an outline level, the items will not be entered into the TOC.
    These are two independent notions. You can create “interesting” effects by combining them.

@ajlittoz I understand your concern around use of “outline level” term; but the term “outline level of a list” is valid, if it’s used correctly, not confusing with LibreOffice’s notion of outline numbering (which is about outline structure of the whole document, not of a given list). I only hope that @scribbler doesn’t do the mistake that you try to prevent here (thanks).

I see. Please bear with my innappropriate terminology. If you can autotranslate it to something actionable so much the better.

So, I will outline the steps to get to what I am talking about.

  1. I created a new paragraph style.
  2. I created a new list style.
  3. I create few new character styles.
  4. In the out I was able to create new character styles.

Back to the paragraphs style:
5. In the outline level I selected [None]
6. In the list style I select the the list I created in step 2.
7. I open the edit list style (edit style box next to list syle in the paragraph outline pane),

In the Edit List style window:
8. I select the character style definitions I created for the list level I want to have it.

===========
The list numbering (before, number and after) are formated per the character style selected.
BUT, the rest of the paragraph has the paragraph format from 1.

PERFECT would be if an existing paragraph style could be selected for each list level, that would substitute for the paragraph’s formatting for the selected list level.

To be clear, in the paragraph of 1., the list level can be selected by tabbing in or out. It is very convenient.

This is the standard design for list formatting: a list is considered an homogeneous sub-part of the document, so a single paragraph style for all levels.

The number or bullet is internally added to the item text, outside of author’s typing. This piece of data must be controlled separately from item text (at least because its appearance may need to be different from text). This is the role of the designated character style in the list (style) configuration. Conceptually, the paragraph style defines the general look (which applies by default to the number) but if you want something special for the number, you designate a character style for it. This is the reverse of your expectation according to your comment.


However, there are circumstances (or author’s desire) where the “historical” design is not totally adequate. For example, we can’t presently request automatic smaller font size for higher-level items. This is possible through a contorted configuration (the same list style is associated with several paragraph styles and this requires manual level forcing with Tab presses).

This is the (welcome) experimental feature @mikekaganski described. The feature bridges partly the gap between Tools>Heading Numbering and generic list numbering. Chapter numbering is based on the “standard” list numbering engine with added functionality, i.e. level-dependent paragraph style. This added functionality was difficult to imitate when you wanted several chapter numbering schemes in your document (e.g. numeric numbering for chapters and alphabetic numbering for annexes).

I have not yet experimented with it (I was not aware of its existence) but it seems to me very interesting and powerful. It even lifts a limitation of Tools>Heading Numbering which allows only for a single paragraph style at each level.

With the experimental feature in question, I believe @mikekaganski is on the track to make LibreOffice a destination for MS Word users. It only takes one POWERFUL feature that makes formatting and organizing easy. LibreOffice got my donation on this experimental feature alone.

CONCEPT (from the user’s perspective): Keeping this experimental feature, just add an additional dropdown selection for each list level (from 6.) to select the paragraph style to SUBSTITUTE for the parent paragraph style (from 1.).

Think about how easy this would make it for users to write final organized outlihes with just an initial draft. Just start typing - GONE are the struggles with the list / outline system, and then having to manually apply paragraph styles to each level. Also GONE are the repetitive formating effforts with each edit.

ALSO think about how much this could clean-up, unclutter and streamline the outline user interface.

Yes I know it may not be programatically easy. But isn’t the idea to put the work into the programming so that the users don’t have to?

LibreOffice moved to python. I don’t know, but I can only guess something might be possible using OOP’s inheritance and reach-back to the parent structures.

GO @mikekaganski !!!