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:
Whiteboard:
Keywords:
: 74552 78519 86905 104206 126887 (view as bug list)
Depends on:
Blocks: Chapter-Numbering
  Show dependency treegraph
 
Reported: 2013-03-08 17:41 UTC by Miguel
Modified: 2020-02-23 23:23 UTC (History)
19 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.