How to do numbered appendices and dependent headings and subheadings?

This question has been asked many times over the years, and each time it seems that it gets a different answer. This is either a tribute to LibreOffice’s flexibility or a mark of its labyrinthine complexity. Some of the answers to that question given over the years are from much earlier versions of LibreOffice and the setps can no longer be followed. Or else they seem to require much greater understanding of LibreOffice’s internals than I have and so are equally not follow-able. I have tried to follow about half a dozen different answers but none of them worked for me. My installation’s version details:


Version: 7.1.3.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 16; OS: Linux 5.3; UI render: default; VCL: kf5
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Calc: threaded

It was installed from my distro’s repositories. As far as I know this is not a nobbled version of LibreOffice.

What I am trying to achieve is:


Appendix A title
A.1 heading
A.1.1 subheading
A.2 heading

Appendix B title
B.1 heading
B.1.1 subheading
B.2 heading

So far I have managed to get:


Appendix A title
A.1 heading
A.1.1 subheading
A.2 heading

Appendix B title
A.3 heading
A.3.1 subheading
A.4 heading

with a page break automatically inserted before the appendix heading. Also I can get all these headings and subheadings to appear in the Table of Contents. I can fix A.3 so that it is A.1 but that is a minor concern given that I cannot get it to be what it should be, which is B.1.

Having appendices with headings and subheadings is such a commonplace in technical reports that I’m disappointed that they are not already built into LibreOffice. If anyone has managed to figure out how to do numbered appendices with dependent headings and subheadings properly using a recent release of LibreOffice I would really, really be grateful if they could set out some follow-able instructions for how it is done.

In response to @ajlittoz’s request for more information:

I originally restricted my description to the appendix headings and did not mention that I use the standard/built-in headings (Heading 1, Heading 2, etc) in the main part of the document. I have changed things such as font characteristics and indentation in those standard headings but on the on the “Outline & Numbering” tab the “Numbering style” is “Chapter Number” (greyed out). The “Chapter Number” dialogue has numbering set up for each of the levels (1, 1.1, 1.1.1 etc).

My document does not use the predifined Chapter heading; the main body of the text (after cover sheets etc) starts with a Heading 1 styled heading.

As for the appendix headings I started with mimicking the configurations of the standard headings (Appendix like Heading 1, Appendix sub-heading like Heading 2, etc). When that didn’t work I searched for the right way to do it and followed all manner of ways suggested in this and other forums over the years; trying to use Tools->‘Chapter Numbering’ was one such way. I say “trying to” because it might be that I didn’t use it correctly; in any case it didn’t work for me so I moved on to try other ways of doing it.

At present (that is, how I left it when I gave up trying different things and raised this question on this forum) it is as follows (ignoring fonts and indentations etc):

The main appendix heading:


Paragraph Style:
Organiser:Style:Name: 'Appendix heading'
Organiser:Style:'Inherit from': 'Default Paragraph Style'
Organiser:Style:Category: 'Custom Styles'
'Outline & Numbering':Outline:'Outline level': 'Level 1'
'Outline & Numbering':Numbering:'Numbering style': 'Numbering ABC'

Numbering Style:
Level: 1
Numbering:Number: 'A, B, C, ...'
Numbering:'Start at': 1
Numbering:'Character style': 'Numbering Symbols'
Numbering:'Show sublevels': 1 (greyed out)
Numbering:Separator:Before: 'Appendix '
Numbering:Separator:After: '.'

The first level of appendix subheading:


Paragraph Style:
Organiser:Style:Name: 'Appendix Sub-heading 1'
Organiser:Style:'Inherit from': 'Appendix heading'
Organiser:Style:Category: 'Custom Styles'
'Outline & Numbering':Outline:'Outline level': 'Level 2'
'Outline & Numbering':Numbering:'Numbering style': 'Numbering 123'

Numbering Style:
Level: 2
Numbering:Number: '1, 2, 3, ...'
Numbering:'Start at': 1
Numbering:'Character style': 'Numbering Symbols'
Numbering:'Show sublevels': 2

The second level of appendix subheading:


Paragraph Style:
Organiser:Style:Name: 'Appendix Sub-heading 2'
Organiser:Style:'Inherit from': 'Appendix Sub-heading 1'
Organiser:Style:Category: 'Custom Styles'
'Outline & Numbering':Outline:'Outline level': 'Level 3'
'Outline & Numbering':Numbering:'Numbering style': 'Numbering 123'

Numbering Style:
Level: 2
Numbering:Number: '1, 2, 3, ...'
Numbering:'Start at': 1
Numbering:'Character style': 'Numbering Symbols'
Numbering:'Show sublevels': 3

These configurations give the result shown above. Clearly this is not the right way to do it but I am at a loss as to what is the right way.

Edit your question to tell us how you styled (which paragraph style) your headings and sub-headings. Have you applied some custom numbering instead of relying on Tools>Chapter Numbering?

You describe your appendixes, but have you “standard” numbered 1. Chapter headings in the same document?

Please do not use Add Answer but edit your original question to enhance the details of your question (answers are reserved for solutions to a problem on this Q&A site).

You nearly got it. Your error is to use two independent “numbering styles” (named list styles in the style sidepane but this is an unfortunate name).

The problem happens when you switch from appendix A to appendix B. This cause a level-1 break in Numbering ABC and all levels 2+ are reset. But this does not reset levels 2+ in Numbering 123 because this list style defines another list counter, independent from the former.

What you must understand is every list style defines a multilevel counter and there is no link between various counters.

In your case, your appendixes must be numbered by a dedicated counter, say Numbering ABC. Customize levels 2+ so that numbering is 1, 2, 3, … instead of A, B, C, … and you’re done.

EDIT 2021-06-14: assigning correct level numbering

Associating a paragraph style with a list style makes the paragraph style fit for list items. By default, the paragraph are set at level-1 of the list (as you can see, outline level and list level are not correlated). To “shift” the list to the desired level, press Tab at start of the paragraph (appendix heading) until you reach the target level (n-1 times for level n). If you overtook the level, press Shift+Tab to back up.

End of EDIT

Bonus: if you want to maintain your appendix styles in sync with Heading n with regards to typographical attributes, create them by right-clicking on Heading n and Modify. Change only Outline & Numbering tab. This way, when you change something in Heading n, the same change is automatically applied to your Appendix n (or whatever you call it).

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.

Thanks for that simple fix. I have one question though: I have changed the appendix sub-headings’ Numbering styles to Numbering ABC but left their Outline levels at 2 and 3 respectively. When I assign my sub-headings those (modified) styles they all appear as level 1. I then have to use the demote icon below the edit area to get them to show B.1 or B.1.1 as needed, which isn’t what I would have expected to have to do. Is this how it should be or does something still need to be fixed?

I effectively forgot to mention this aspect of the procedure. Your appendix styles define in fact list item formatting. Though the same feature is used for Heading n, Writer makes sure to set the list level consistent with the outline level for this specific styles.

To assign the correct list level with the keyboard, press Tab key with the cursor at the very head of the appendix title. Pressing Tab n-1 times will get a level-n list item. Shift+Tab does the reverse.

Thank you, that clarifies what is happening. I’ve ticked/accepted your answer and I’m very grateful to you for your help.