We will be migrating from Ask to Discourse on the first week of August, read the details here

Working with styles: how to automatically use custom list based on paragraph custom style?

INTRODUCTION

I am trying to create a template. For the sake of the example, let us say that my template contains two main styles:

• The basic "TextBody" style with the default bullet list (first block of text on the picture);

• A custom "ExSum - Text Body" style that I want to use for the Executive summary. Its main difference with "TextBody" is a red border (the red-bordered text in the picture).

In each paragraph style, I want to be able to add bullet lists. If I click on the "Toggle Bulleted List" button (see below), it appears to add a default bullet list.

This works well for the "TextBody" paragraph style, but messes up the paragraph border for the "ExSum - Text Body" style. For this reason, I created a custom list style "ExSum - Bullet List" and its associated paragraph style "ExSum Bullet List", that inherits properties from the "ExSum - Text Body" style (see below).

PROBLEM

I am writing in an "ExSum - Text Body" paragraph style and I want to start a bullet list. If I click on the "Toggle Bulleted List" button, I notice that it inserts a paragraph with a default bullet list style. The only way to use the custom list is by choosing it in the Styles dropdown list (upper left corner of the screen).

QUESTION

Is it possible for LibreOffice to automatically use the "ExSum - Bullet List" paragraph style when I create a bullet list from an "ExSum - Bullet List" paragraph?

edit retag close merge delete

Sort by » oldest newest most voted

From the moment you're creating styles, forget everything about buttons in the toolbar and other direct formatting actions or eles you'll end up with an unmanageable mess. You already experience such conflicts with your border issue.

Be aware that formatting list items requires two styles from different categories:

• a paragraph style which defines the general properties of the text (font, size, borders, spacing above and below, alignment, …)
• list style (this is a bad designation) which defines the appearance of the numbering, a multi-level counter and the indent for every level

The setting for left indent (LTR text, opposite for RTL) in the list style takes precedence over the left indent in the paragraph style. Trying to play with the paragraph style setting will mess up everything.

In a template, you must define your own list styles because you can't save the settings for the default Format>Bullets & Numbering.

To create a list style, click on the fifth icon (List Styles when you hover over it) in the style sidepane. Create a style as usual. In the rest of this answer, I'll use built-in Bullet • (which you can customise) but any other list style may do.

Next I'll transform built-in paragraph style List 1 for formatting bullet list item. Once again, any style may do, e.g. your Esum - Bullet List.

Goto Outline & Numbering tab of the paragraph style definition and set Numbering style: to Bullet •. You're done.

Styling a paragraph List 1 make it a bulleted list item. Revert to Text Body when you want to continue with "ordinary" text.

Don't ever use again the tool bar button, otherwise you'll create conflicts.

There remains however a problem without solution: the border around your executive summary.

The list style take over control of the left indent. If this left indent is different in the preceding or next paragraphs, borders will not be merged. This can be solved for level-1 list items but is impossible for levels 2+ if the indent is not the same as level-1 (and it is highly desirable to indent higher levels to make clear items are at another level). This means each level (beyond 1) will be laid out in its own borders.

To mitigate this, you can opt for no indent at all on all levels (or the same level as the executive summary) and make a distinction between the levels by using different bullets (see for example list style Bullet, but IMHO the chosen bullets result in a disastrous appearance).

To show the community your question has been answered, click the ✓ next to the correct answer, and "upvote" by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.

more

Thank you for your detailed explanation. As a matter of fact, I was already able to perform the different steps you describe. What I take from your answer is that there does not seem to be any "no brainer" way of adding a customized bullet list, except by asking the users to search the styles and click on the custom style. I am trying to build a set of templates and they need to be foolproof somehow.

( 2020-12-16 08:55:51 +0200 )edit
1

Basically, a template is a library of styles. The idea is for users to click on styles and to stop direct formatting. With a company-wide template, adding fancy non-template formatting should be strictly forbidden because it deviates from the company look-and-feel.

With the side style pane displayed, double-clicking on a style name is as "comfortable" (or even more) as playing with the buttons and keyboard shortcuts.

The great advantage of styles in a template becomes obvious if you decide to change your graphic charter (embodied in the styles). You update the template. Next time a document is opened, it is automatically brought up-to-date with the template. But, if users added direct formatting (outside styles), this breaks because direct formatting takes precedence over styles.

( 2020-12-16 09:35:56 +0200 )edit