Writer: Can the List styles be linked?

I am trying to base ‘List 1 Start’, ‘-Cont.’ and ‘-End’ on “List 1” definition so that I can experiment with the best-looking margins in my document. The styles are made ‘linked’ to “List 1” in the Organizer tab. It works as long as the subordinate styles are exact equivalent to “List 1”.

Whenever any distance is changed in Indents & Spacing tab (e.g. “List 1 Cont.” has no bullet and ‘First line indent’ set to 0), the subordinate styles seem to be de facto unlinked (they are still linked to “List 1”, but any change in “List 1” does not propagate to the unmodified fields, e.g. ‘Before text indent’).

The same is true if I play with “Numbering 1”.

I played also with the “Heading” family and cascading happens normally.

Since the “List x” are standard built-in styles, is there any restriction on the linking relationship? Is it specific to the list style category?

I noticed in the XML, these styles have an attribute style:class=“list”.

If that can be a lead, I also noticed that eventhough a single parameter was changed, all parameters of the ‘Indents & Spacing’ tab are dumped in the <style:paragraph-properties> XML element.

Does it mean that the “cascading quantum” is a style definition tab, not the individual field?

How can I work around this shortcoming?

Ordered and unordered lists have about as many ways of setting them up as there are users of LO. Every person seems to have their own way of doing this, which is possibly related to the definitions of the default styles in LO being less than useful. To compound matters it is not uncommon for people to use toolbar functions in deference to styles. No doubt the toolbar vs styles debate (and the parallel styles vs styles debate) will go on for a long time.

Semantics of the “Cont.” styles

This is my understanding of how lists can be defined. Naturally this can differ for others. If you want to use the default styles supplied with LO then you are going to have to make a choice about what the “Cont.” styles mean. For some (such as yourself) this is a style with no leading identifier that is used as a way of continuing a single point e.g.,

* List 1 Start
  List 1 Cont.
* List 1
* List 1 End

For others (and as indicated in the Writer Guide) the semantics of “Cont.” is in reference to the list as a whole, thus:

* List 1 Start
* List 1 Cont.
* List 1 Cont.
* List 1 End

In this case, either a non-identified style (based on the List 1 paragraph style) needs to be separately defined to cater for the continuation of a single point, or you can use the related toolbar function as indicated in this thread.

Paragraph (list) style hierarchy

There is another entire side-discussion about whether or not the List 1 paragraph style should in fact serve as an underlying style for the List 1 Start, List 1 Cont., and List 1 End paragraph styles. I personally feel that this would be a good thing as it would make the list styles more hierarchical, but presently this is not how they are defined so we will leave this aside for now and deal with the duplicated effort required to change all the necessary list styles into something useful. To answer this part of your question though, you can probably link the paragraph styles in this hierarchical manner if desired, although as you indicate not all settings appear to link correctly.

One possible method

You can achieve what you require using styles (paragraph and list) but it is more difficult than necessary due to the dissociation (by default) of corresponding paragraph and list styles e.g., the List 1 paragraph style not being associated with the corresponding List 1 list style, etc. Here is a screenshot of text, using only styles, that may have the layout you are indicating:

screenshot

One way to do this is:

  1. Set the paragraph style List 1 to use the list style List 1 (modify style > Outline and Numbering tab > Numbering style: “List 1”). I cannot fathom why this is not the default. It should be.
  2. Now repeat the prior step for the List 1 Start and List 1 End paragraph styles. Do not do this for the List 1 Cont. style if you are intending this to act as a single point continuation.
  3. Apply the List 1 Start, List 1 Cont., List 1, and List 1 End paragraph styles to the related list entries.
  4. Adjust the indent and spacing of the paragraph styles to suit (modify style > Indents & Spacing tab. In the screenshot shown I use Before text “18pt”; First line: “-18pt”; Line spacing: “Fixed” | “18pt” for the List 1 Start, List 1, and List 1 End paragraph styles. The List 1 Cont. paragraph style is set to use Before text “36pt” and the same values as for the other styles. The Spacing values are set to “18pt” | “0pt” (above|below) for List 1 Start, “0pt” | “0pt” (above|below) for List 1 and List 1 Cont., and “0pt” | “18pt” (above|below) for List 1 End.
  5. Adjust the indent and spacing of the list style to suit (modify style > Position tab). In the screenshot I use Numbering followed by “Tab stop” | “18pt”; Aligned at “0pt”; Indent at “18pt”.

Further discussion

Your remaining queries about the relationships of the paragraph styles are dependent upon the approach to the issues I have posed above. To what degree the underlying XML is affected / related is probably less important than the current semantic and organisational issues I have outlined.

EDIT: Bug fdo#68263 (paragraph/list style inheritance problem) and fdo#68264 (enhancement request to print the style catalog) have been reported.

An excellent account; the discussion in @ajlittoz’s answer also helps much. This whole thread is helping me reflect on my personal use of those styles. What’s funny is that I remember reading somewhere, perhaps on (http://opendocument.xml.org), that the ODF 1.2 spec does not adequately allow use of user-defined paragraph styles inside list elements and that this should be improved in the next spec version, but in LibO there is already a plethora of redundant options, some hacky and others clean.

Thanks. There have been many discussions about para+list style on the OASIS mailing lists, such as here and here. The aspects are numerous but essentially relate to how paragraphs (and numbered paragraphs in particular) and list items are viewed. For me, the main issues are simplicity and compatibility (which is helped by the former).

Thank you very much for this answer.

A few comments first

I agree with you that laying out text is a matter of personal taste and that a universal rule cannot be agreed upon. A word processor should give freedom to its user to typeset its document the way he intends.

You rightfully interpreted my desired effect. The procedure is clean and easy to follow (but I already knew it).

You seem to give a pointer to the Writer Guide for the semantics of the standard styles, notably Cont. and family. I went through the 4.0 Writer Guide and did not find this information. Is there another specific guide?

Having the bullet/number specification under user control is a very good thing.
Giving the same name to list and bullet style (e.g. “List 1”) may prove disturbing for a newbee, but I do not hesitate to associate “List 1” list with “List 2” bullet if I need it.
What may be debatable is the default choice of associating “List 1” list with “none” bullet.

Further discussion

My purpose is related to documentation maintenance for an OSS project. I already have two 200+ page manuals, plus shorter minor manuals. Just like you define symbolic constants in code to ease software configuration, I am streamlining the styles used in the documentation with the hierarchical feature. The goal is to have as few “master” styles as possible so that the general graphical aspect (layout) of the document may be changed with only a handful of key parameters (duly commented in an auxiliary document).

This means the changes propagate down the hierarchy. It works fine, but for the ordered and unordered list styles. These styles have something special: during my experiments, when “List 1 Start” was linked to “List 1”, clicking on “Standard” button reset indent parameters to values which were neither “List 1” nor “Default” ones.

Another anomaly (or a misunderstanding from me) is the ‘Outline & Numbering’ tab → Line numbering → ‘Restart at this paragraph’ check box for “Numbering 1 Start” style. I checked it and asked for a ‘Start with’ 10. Paragraph number was not restarted and kept running.
Should I understand that this sub-tab relates only to [margin] line numbers?

Work arounf is, of course, right-clicking and selecting “Restart numbering”, but it is not acceptable to track all “Numbering 1 Start” paragraphs in a 200-page manual.

The (only) reference to the “Cont.” style is made on p.186 of the Writer Guide v4.0. This page also states “the Numbering 1 list style is associated with four paragraph styles: Numbering 1; Numbering 1 Cont.; Numbering 1 End; Numbering 1 Start” and yet this is not the case under v4.1.0.4. I concur with your efforts to produce a hierarchical style list with as few root styles as possible. There are (as you indicate) problems with doing this for paragraph styles of the list type.

Thank you for the reference. It is very short and leaves semantics open to personal interpretation as you clearly showed in your answer. I’ll have to check the differences with 4.1 (it is located in a different test partition, because I want to make sure all upgrades are compatible with the existing files, not only LO). From a very quick trial, I noted some minor changes in the Heading family (e.g. Center alignment instead of Left), needing careful check of all styles.

By the way, do you know of a means of printing the style catalog? This feature existed long ago in MS Word; I don’t know if it is still present in nowadays versions.

The centered heading alignment may have come from (or be related to) this recent mailing list thread. I know of no method for printing a list of styles (either applied or available). I would suggest raising a bug for both this feature (mark it “enhancement”) and the problem with paragraph style inheretance, with respect to lists. If you do so, please report the bug number here.

Following your suggestion, i filed bug #68263 for the inheritance problem and bug #68264 to request an enhancement to print the style catalog.

Thanks. I have confirmed both bugs and provided an example file for the one dealing with the para/list styles problem. I will update my answer to include links to the bugs.