Download it now!
Bug 62032 - Cannot specify a Paragraph Style to use a numbering level (over 1) for a chosen Numbering (List) style
Summary: Cannot specify a Paragraph Style to use a numbering level (over 1) for a chos...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: high enhancement
Assignee: Not Assigned
URL: https://ask.libreoffice.org/en/questi...
Whiteboard:
Keywords:
: 74552 78519 86905 104206 126887 136812 (view as bug list)
Depends on:
Blocks: ODF-import Chapter-Numbering
  Show dependency treegraph
 
Reported: 2013-03-08 17:41 UTC by Miguel
Modified: 2020-09-17 16:20 UTC (History)
20 users (show)

See Also:
Crash report or crash signature:


Attachments
Proof of concept of the issue (11.47 KB, application/vnd.oasis.opendocument.text)
2013-03-08 17:41 UTC, Miguel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miguel 2013-03-08 17:41:29 UTC
Created attachment 76173 [details]
Proof of concept of the issue

Consider the attached file, where we have a Heading 1 (H1), a Heading 2 (H2) and a Heading 3 (H3).

One of the ways to define numberings (the only way if you intend to create a style template that you can then apply to existing documents) is do the following:

1) Tools-Outline numbering: Set "paragraph style" to (none) in first 3 levels
2) Styles & formatting - list styles: use Numbering 1 to define your numbering style
3) Styles & formatting - Paragraph styles: Change H1,H2,H3. Outline & numbering tab - set "numbering style" to Numbering 1 and Outline Level to 1,2 an 3 respectively.


Expected:
With these settings, you'd expect the following numbering:

1. Heading 1
1.1 Heading 2
1.1.1 Heading 3


Actual:
1. Heading 1
2. Heading 2
3. Heading 3

You can confirm this in the attachment, where the proof is even more evident because I set the prefix XX to Level 1 in the style Numbering 1. It should be applied to H1 only, but it's being applied to H1,H2 and H3!
Comment 1 Brenda Granados 2013-05-19 12:37:51 UTC
Hi, I can confirm that LibreOffice is behaving as you stated, but I am not very familiar with Styles and Outline numbering. Why do you think it should show

1. Heading 1
1.1 Heading 2
1.1.1 Heading 3

I will do some more research to understand what the expected behavior should be.

Thanks,

Brenda
Comment 2 sophie 2014-03-24 16:08:12 UTC
Confirmed but this is really not a good way to set a chapter numbering. 
Using the Numbering 1 style alone works as expected, i.e demoting the levels gives:
1.
1.1
1.1.1
But once set in the Heading style dialogs, the full numbering is not displayed.
Verified with 4.1.5.3 and 4.2.3.1
Set as New - Sophie
Comment 3 Albrecht Müller 2014-09-02 09:04:52 UTC
My current understanding of concepts of outline numbering is:

You can define outline levels for paragraph styles, and you can attach list styles the paragraph styles. The numbering level you see is independent of the outline level.

This implies that you have to set the numbering level by hand. If your outline level is "Body Text" that is usually what you want. If the outline level is something else I think you usually expect that the numbering level reflects the outline level. This is what happens if you define the numbering using the Tools -> Outline Numbering window.

I think it is not possible to fix this issue by automatically linking the numbering level to the outline level: This would break existing documents that rely on the fact that the applied numbering level is independent of the outline level.

A possible solution may be to add a check-box that allows you to specify if the resulting numbering level should depend on the outline level.

I think bug 74552 is essentially a duplicate of this one.
Comment 4 Albrecht Müller 2014-09-02 09:08:29 UTC
*** Bug 74552 has been marked as a duplicate of this bug. ***
Comment 5 Owen Genat (retired) 2015-01-25 00:49:43 UTC
(In reply to Albrecht Müller from comment #3)
> You can define outline levels for paragraph styles, and you can attach list
> styles the paragraph styles. The numbering level you see is independent of
> the outline level.
> 
> This implies that you have to set the numbering level by hand. If your
> outline level is "Body Text" that is usually what you want. If the outline
> level is something else I think you usually expect that the numbering level
> reflects the outline level. This is what happens if you define the numbering
> using the Tools -> Outline Numbering window.
> 
> I think it is not possible to fix this issue by automatically linking the
> numbering level to the outline level: This would break existing documents
> that rely on the fact that the applied numbering level is independent of the
> outline level.

I just want to add to (and largely agree with) what has been stated above. There is currently a hopeless confusion between styling ordered list items (associating paragraph and list styles; Format > Bullets and Numbering...; using the list toolbar buttons) and setting heading outline numbering (Tools > Outline numbering). This is largely due to how the related options are exposed to the user in the UI (modify style > Outline and Numbering tab; Format > Bullets and Numbering > Options tab). The two use similar terminology to that in the Tools > Outline Numbering facility and yet generate quite different XML in the background. 

I have almost given up trying to explain the differences over on the AskLO site as the UI indicates that the on-screen results should be similar. While ordered lists can be defined to use an outline style of numbering it needs to be remembered that headings are not list items. At this point there may be little that can be done to improve the situation with the term "outline" being used for both headings and lists. Perhaps we can more clearly indicate in the UI which relates to headings and which to list items? It may be that the core problem here relates to shortcomings with the ODF specification or a need for OOXML interoperability? In any case this is not a problem that I see being resolved any time soon.
Comment 6 QA Administrators 2016-02-21 08:35:47 UTC Comment hidden (obsolete)
Comment 7 Smith Kennedy 2017-01-27 18:33:05 UTC
Still a problem in:

Version: 5.2.3.3
Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf
CPU Threads: 8; OS Version: Mac OS X 10.12.3; UI Render: GL; 
Locale: en-US (en_US.UTF-8); Calc: group

I simply don't understand what value the "Outline level" setting in the "Outline & Numbering" tab of the Paragraph Style settings window provides, if not to automatically set the outline level.

For document authors of structured documents, this is quite a serious problem. The user has the ability to define a paragraph style that includes an outline level, which sets the expectation that if a paragraph has its style set, that its outline level will be set accordingly.

If the Document Foundation hopes that LibreOffice and the Open Document formats are to  become more broadly adopted as a document format in professional organizations such as technology standards bodies (several of which I take part in and NONE of them use ODF or LibreOffice) this issue MUST be resolved.
Comment 8 Regina Henschel 2017-04-05 19:18:13 UTC
The outline level is set correctly, but the paragraph does not get a list-level, which corresponds to the outline level.

The list level is not given by an attribute in the file format, but by nesting lists, which is a structure.

I have looked around in the ODF 1.2 specification, whether it is possible to specify an associated list level. If I understand the spec correctly, it would be possible to use the attribute "style:list-level" in the paragraph style. That is section 19.495 in http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html. It seems, that currently LibreOffice does not evaluate that attribute at all. At least adding it manually to the file has no effect and resaving the document removes this attribute.

With that attribute it would be possible to build a set of paragraph styles similar to "Heading 1", "Heading 2", ..., so that when assigning the paragraph style, LibreOffice knows, that it has to put the paragraph to the specified list level, which means to generate the nested lists accordingly.

If I'm correct with my interpretation, then implementing the attribute could solve the problem. In this sense this bug report would be an enhancement request.
Comment 9 Mike Kaganski 2017-04-05 20:52:53 UTC
*** Bug 104206 has been marked as a duplicate of this bug. ***
Comment 10 Regina Henschel 2017-07-02 00:28:25 UTC
*** Bug 78519 has been marked as a duplicate of this bug. ***
Comment 11 Regina Henschel 2017-08-18 11:10:10 UTC
*** Bug 86905 has been marked as a duplicate of this bug. ***
Comment 12 sdc.blanco 2019-12-23 02:40:24 UTC
I can reproduce the problem using attachment 76173 [details] with 

Version: 6.4.0.0.beta1 (x64)
Build ID: 4d7e5b0c40ed843384704eca3ce21981d4e98920
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: GL; VCL: win; 
Locale: da-DK (en_DK); UI-Language: en-US
Calc: CL

Additional comments.

1.  Outline level "Heading 1" was set to "Text Body"  (but it did not seem to matter if it was subsequently changed to "Level 1")

2.  Selecting the three lines, and toggling the number list (F12) or from toolbar gave THREE different appearances  (but I cannot explain why).

3.  After trying to modify a style, then this effect disappears.

4.  Tried to get things to work (without success) by modifying the styles.  Is it correct to believe that it is impossible with this method?

5.  Open attachment 76173 [details], use Tools > Chapter Numbering.  Levels 1 to 4 have No paragraph style, and "Show sublevels" is 1 for each level.  


(In reply to Regina Henschel from comment #8)

> If I'm correct with my interpretation, then implementing the attribute 
> could solve the problem. In this sense this bug report would be an 
> enhancement request.
I get the impression that this has been attempted (linking list styles with paragraph styles) - which may be why Tools - Chapter Numbering works.  See here:
https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/DocumentStylePoolManager.cxx?r=24314773#209
Comment 13 sdc.blanco 2019-12-23 02:48:15 UTC
(In reply to sdc.blanco from comment #12)
> I get the impression that this has been attempted (linking list styles with
> paragraph styles) - which may be why Tools - Chapter Numbering works. 

Sorry -- I should have specified that the technique for linking list styles with paragraph styles seems to have been worked out Headings.  I understand that in this case, there is an attempt to link list styles with paragraph styles, which does not seem to be possible manually.
Comment 14 sdc.blanco 2019-12-27 22:34:22 UTC
Have changed bug summary to better express the problem. 

To understand the problem.

Start in a Paragraph Style dialog box (e.g., Format > Paragraph for any line).

0.  Ignore "Outline Level" in this dialog box.  It is not relevant for this issue.
1.  Click on drop-down box in Numbering Style, choose one you like.
2.  Now, edit that chosen Numbering Style (i.e., View > Styles (F11), click on List Style icon.
3.  Find the Style chosen in step 1, right-click, Modify
4.  For different levels, set different values for Number.

Now here is the problem.....how do you tell your paragraph style which numbering level (which was set in step 4) to use for the numbering style chosen in step 1?  (The claim is:  You can't -- with one exception noted below).

You can specify the numbering style in the Paragraph style dialog box. And you can specify the appearance of each level in the Numbering Style dialog box. But you cannot link these two dialogs (i.e., to specify which numbering level should be used in the chosen paragraph style, so you always get Level 1). That is the problem reported in this bug.

This is consistent with Regina's hypothesis (comment #8), that there is no way in the Paragraph style dialog to give a level to the numbering style.

It is possible -- as discussed in bug #42920 - to use the Tab key or the Promote/Demote icons in the Bullets and Numbering Toolbar to introduce these levels in the document, but there is no way for a user to specify these levels in the Paragraph style.

A solution, as requested in bug #42920, would be to add a drop-down box in the Paragraph dialog box in the Numbering section, for example, under the Numbering Style, where the Level could be specified.
Comment 15 sdc.blanco 2020-01-15 15:58:16 UTC
*** Bug 126887 has been marked as a duplicate of this bug. ***
Comment 16 Xisco Faulí 2020-02-19 17:08:33 UTC
Changing priority back to 'high' since the number of duplicates is 5 or more
Comment 17 Cor Nouws 2020-02-23 21:21:38 UTC
Wasn't this a use case in which you have to type TAB at the start of the heading to move it to the next level?
Comment 18 Smith Kennedy 2020-02-23 23:23:59 UTC
(In reply to Cor Nouws from comment #17)
> Wasn't this a use case in which you have to type TAB at the start of the
> heading to move it to the next level?

Sort of but you shouldn't have to type TAB - it should assume the right numbering level based on the style. You shouldn't have to touch the style AND the numbering.
Comment 19 Cor Nouws 2020-04-21 19:50:04 UTC
@miguel  : can you pls check this? thanks!

(In reply to Cor Nouws from comment #17)
> Wasn't this a use case in which you have to type TAB at the start of the
> heading to move it to the next level?
Comment 20 Atticus 2020-06-05 13:01:19 UTC
We are talking about the same thing but describing Bug 62032 differently.

Problem [1]

Even though both "Heading <x>" and "Example <x>" are using Paragraph Styles and List Styles editing each corresponding set (Heading <x>, {List Style : Paragraph Style} ; Example <x>, {List Style : Paragraph Style}) is approached and done differently. Each Paragraph Style, {"Heading 1" : ... : "Heading 9"}, and List Style, "Chapter Numbering", is edited using the editing menu under Paragraph Style and the editing menu under Tools->Chapter Numbering. However, each Paragraph Style, {"Example 1" : ... : "Example 9"}, and List Style, "Example 123", is edited using the editing menu under Paragraph Style and the editing menu under List Styles.

Problem [2]

List Style "Chapter Numbering" is not present under List Styles; which segues into Problem one-s' approach to editing Paragraph and List Styles: {"Heading 1" : ... : "Heading 9"} and "Chapter Numbering". So the ways in which these styles are edited and presented are neither consistent with nor congruent to each other.

Problem [3]

Applying custom Paragraph Style "Example 2", which is assigned to Numbering Style "Example 123" and outline level 2, to my target, does not result in a corresponding change in that targets' outline level. Here, the observed behavior does not match the expected behavior. When I apply Paragraph Style "Example 2", which has been edited and assigned outline level 2, I expect the target to be changed to outline level 2.

Problem [4]

If I click to the left of {"Example 1" : ... : "Example 9"} and press "Tab" then there is a change in the targets' outline level; but that change does not match the styles' edited and assigned outline level and there is no corresponding change under the Paragraph Style Menu to indicate the targets' outline level has been changed. Here, the observed behavior does not match the expected behavior. The observed behavior ought to match the results of the activating process for Paragraph Styles {"Heading 1" : ... : "Heading 9"} and List Style "Chapter Numbering". The List Style "Chapter Numbering" is activated, automatically, when its' corresponding Paragraph Styles {Heading "1" : ... : Heading "9"} are activated. So, at the present moment, activating each distinct Paragraph style results in observable behavior that is neither consistent with nor congruent to each other; when, in fact they ought to be.

For example, when I select Paragraph Style and apply Heading 2 to my target, then that target changes to Outline Level 2 (Heading 2 is assigned Outline Level 2). Here, the observed behavior matches the expected behavior. When I click to the left of "Heading 1", formatted as a Multi-level List, and press "Tab" then that Heading changes to Level 2 from Level 1, as is expected. Additionally, there is a corresponding change under the Paragraph Style indicating the target has been changed to "Heading 2" ("Heading 2" is assigned Outline Level 2). Here, the observed behavior matches the expected behavior.

Heading Multilevel List Style :: 
List Style: "Chapter Numbering"
Paragraph Style: {"Heading 1" : ... : "Heading 9"}

Expected Behavior and Observed Behavior Match:

- 1. Heading 1          == Outline Level 1
- 1.1 Heading 2         == Outline Level 2

- 2. Heading 1          == Outline Level 1
- 2.1 Heading 2         == Outline Level 2

Custom Multilevel List Style :: 
Editing custom List Style: "Example 123"
Editing custom Paragraph Style: {"Example 1" : ... : "Example 9"}

- List Styles -> 
- New ->
 - Tab.Organizer.Name           "Example 123"
 - Tab.Outline.Select           "Numeric with all sublevels"
 - Tab.Position ->              ...Multiple Options Set
 - Tab.Customize ->             ...Multiple Options Set


- Paragraph Styles ->
- New ->
 - Tab.Organizer ->                 Name                "Example 1"
 - Tab.Outline and Numbering ->     Outline level:      "Level 1"
 - Tab.Outline and Numbering ->     Numbering style:    "Example 123"

Paragraph Styles {"Example 2" : ... : "Example 9"} follow the above editing process and to each corresponding edit, "Example X" is assigned Outline level: "Level X".

Expected Behavior

- 1. Heading 1      == Outline Level 1
- Example 2         == Outline Level 2
- Example 2         == Outline Level 2

- 1.1 Heading 2     == Outline Level 2
- Example 3         == Outline Level 3
- Example 3         == Outline Level 3

Observed Behavior

- 1. Heading 1      == Outline Level 1
- Example 2         == Outline Level 1
- Example 2         == Outline Level 1

- 1.1 Heading 2     == Outline Level 2
- Example 3         == Outline Level 1
- Example 3         == Outline Level 1
Comment 21 Atticus 2020-06-05 13:33:05 UTC
LibreOffice Version and OS Information is as follows:
- LibreOffice Writer Version: 6.3.6.2
- Build ID: FreeBSD ports 6.3.6
- OS: FreeBSD 12.1; UI render: default; VCL: gtk2; 
- Locale: en-US (C); UI-Language: en-US


Multi-Level List Style [1]
Numbering Style  "Chapter Numbering"
Paragraph Styles "Heading 1" ... "Heading 9"

Multi-Level List Style [2]
Numbering Style  "Example 123"                 ## Customized Style
Paragraph Styles "Example 1" ... "Example 9"   ## Customized Style


Problem [1]

Numbering Style "Chapter Numbering" is edited using Tools-Chapter Numbering
Paragraph Style "Heading <X>" is edited using Paragraph Styles

Numbering Style "Example 123" is edited using List Styles
Paragraph Style "Example <X>" is edited using Paragraph Styles

So even though "Chapter Numbering" and "Example 123" are List Styles each are edited differently.


Problem [2]

List Style "Chapter Numbering" is not present under List Styles; which segues into Problem [1]s' approach to editing List Styles "Chapter Numbering" and "Example 123".  So the ways in which these styles are edited and presented are neither consistent with nor congruent to each other.


Problem [3]

Applying Paragraph Style "Example 2", which is assigned to Numbering Style "Example 123" and outline level 2, to my target, does not result in a corresponding change in that targets' outline level. Here, the observed behavior does not match the expected behavior. When I apply Paragraph Style "Example 2", which has been edited and assigned outline level 2, I expect the target to be changed to outline level 2.


Problem [4]

If I click to the left of "Example <X>" and press "Tab" then there is a change in the targets' outline level; but that change does not match the styles' edited and assigned outline level.  Additionally, there is no corresponding change under the Paragraph Style Menu to indicate the targets' outline level has been changed. Here, the observed behavior does not match the expected behavior.

The observed behavior ought to match the results of the activating process for Paragraph Styles "Heading <X>" and List Style "Chapter Numbering". List Style "Chapter Numbering" is activated, automatically, when its' corresponding Paragraph Styles "Heading <X>" is activated. So, at the present moment, activating each Paragraph style for Multi-Level List [1] and [2] results in observable behavior that is neither consistent with nor congruent to each other; when, in fact they ought to be.

For example, when I select Paragraph Style and apply Heading 2 to my target, then that target changes to Outline Level 2 (Heading 2 is assigned Outline Level 2). Here, the observed behavior matches the expected behavior. When I click to the left of "Heading 1", formatted as a Multi-level List, and press "Tab" then that Heading changes to Level 2 from Level 1, as is expected. Additionally, there is a corresponding change under the Paragraph Style indicating the target has been changed to "Heading 2" ("Heading 2" is assigned Outline Level 2). Here, the observed behavior matches the expected behavior. However, duly note, the preceding changes visible under Paragraph Styles do not occur when the corresponding style activation is applied to "Example <X>".


Multi-Level List Style [1]
Numbering Style  "Chapter Numbering"
Paragraph Styles "Heading 1" ... "Heading 9"

Expected Behavior and Observed Behavior Match:

- 1. Heading 1          == Outline Level 1
- 1.1 Heading 2         == Outline Level 2

- 2. Heading 1          == Outline Level 1
- 2.1 Heading 2         == Outline Level 2

Multi-Level List Style [2]
Numbering Style  "Example 123"                 ## Customized Style
Paragraph Styles "Example 1" ... "Example 9"   ## Customized Style

- List Styles -> 
- New ->
 - Tab.Organizer.Name           "Example 123"
 - Tab.Outline.Select           "Numeric with all sublevels"
 - Tab.Position ->              ...Multiple Options Set
 - Tab.Customize ->             ...Multiple Options Set


- Paragraph Styles ->
- New ->
 - Tab.Organizer ->                 Name                "Example 1"
 - Tab.Outline and Numbering ->     Outline level:      "Level 1"
 - Tab.Outline and Numbering ->     Numbering style:    "Example 123"

Paragraph Style "Example <X>" follows the above editing process and to each corresponding edit, "Example <X>" is assigned Outline level: "Level <X>".

Expected Behavior

- 1. Heading 1      == Outline Level 1
- Example 2         == Outline Level 2
- Example 2         == Outline Level 2

- 1.1 Heading 2     == Outline Level 2
- Example 3         == Outline Level 3
- Example 3         == Outline Level 3

Observed Behavior

- 1. Heading 1      == Outline Level 1
- Example 2         == Outline Level 1
- Example 2         == Outline Level 1

- 1.1 Heading 2     == Outline Level 2
- Example 3         == Outline Level 1
- Example 3         == Outline Level 1
Comment 22 Regina Henschel 2020-09-13 16:31:54 UTC
You can use a conditional style, so that changing the list level automatically changes the paragraph style. You need to define for each numbering level a paragraph style. To make them headings, set for each of them the corresponding outline level.

A list level information cannot be stored in a paragraph style, because the list level is not determined by an attribute but it is determined by nesting of list-elements. It would be only possible, that LibreOffice provides, that setting an outline level will automatically change the numbering level too.
Comment 23 Regina Henschel 2020-09-13 16:50:53 UTC
The needed attribute style:list-level, now 19.499 ODF 1.3, which would solve the problem, is still not implemented.
Comment 24 Regina Henschel 2020-09-13 16:54:54 UTC
Add blocks 94587 to reflect, that an existing ODF feature is not implemented.
Comment 25 Mike Kaganski 2020-09-17 05:51:30 UTC
(In reply to Regina Henschel from comment #22)
> A list level information cannot be stored in a paragraph style, because the
> list level is not determined by an attribute but it is determined by nesting
> of list-elements. It would be only possible, that LibreOffice provides, that
> setting an outline level will automatically change the numbering level too.

I suppose that the idea is not to store list level information in a paragraph style, but to store assigned paragraph style names for each level in the list style, and have program explicitly change paragraph style of a paragraph when changing list level of a paragraph (unlike conditional style approach, where the assigned paragraph style isn't changed; more in line with the existing chapter numbering feature).
Comment 26 Regina Henschel 2020-09-17 13:42:03 UTC
(In reply to Mike Kaganski from comment #25)
> I suppose that the idea is not to store list level information in a
> paragraph style, but to store assigned paragraph style names for each level
> in the list style, and have program explicitly change paragraph style of a
> paragraph when changing list level of a paragraph (unlike conditional style
> approach, where the assigned paragraph style isn't changed; more in line
> with the existing chapter numbering feature).

The existing chapter numbering feature does not work in the way "store assigned paragraph style names for each level in the list style". Coupling a heading paragraph style with a level of the <text:outline-style> list happens in the UI and in rendering. Nothing about that is directly stored in the file.
Comment 27 Mike Kaganski 2020-09-17 14:12:52 UTC
(In reply to Regina Henschel from comment #26)

I should had written more clearly, that the parts "where to store" was not linked to "more in line with existing chapter numbering feature", while "how to behave" was, so I was only talking that *behaviour* of the new feature should be like in existing one - that program would assign new paragraph style when level changes. But the proposal to reference the assigned paragraph styles from list style was new, possibly needing an extension to ODF.
Comment 28 Regina Henschel 2020-09-17 16:20:57 UTC
*** Bug 136812 has been marked as a duplicate of this bug. ***