How to Automatically Number Headings for PDF Export in LibreOffice Writer?

Hi everyone,

I’m working on a long document in LibreOffice Writer that I plan to export as a PDF. I’ve set up my headings using the built-in Heading 1, Heading 2, etc., but I’m struggling to get consistent automatic numbering (e.g., 1., 1.1, 1.1.1).

I’d like:

Heading 1 → 1, 2, 3…
Heading 2 → 1.1, 1.2, etc.
Heading 3 → 1.1.1, 1.1.2, etc.

Right now, either the numbering is inconsistent or the PDF shows unexpected formatting after export.

I’ve tried adjusting the Styles → Manage Styles → Numbering settings and experimenting with Tools → Chapter Numbering, but I’m still not getting the result I want.

  1. What’s the correct way to set up multi-level numbering for headings in LibreOffice?
  2. Is there anything special I need to do before exporting to PDF so the numbering stays intact?
  3. Are there known quirks with certain versions of LibreOffice around this?

Thanks in advance!

It sounds as if you are mixing list styles with Heading Numbering and getting mixed results.

You might want to look at this question, Outline numbering doesn't work for Body Text , and then work out how deep you want your numbering to go and if you could live with the workaround I suggested in Comment 4

[Edit]
Just make sure that you set the number for Show sublevels to the same as the heading level. If you want every paragraph to have a numbered level, e.g. 1.1.2.3.4.1, then you will need to set your main body text to a Heading n style, not Body Text, so make sure you have worked out the depth of the levels you will be using.

It is hard to guess what you are seeing so this answer is a guess too.

I notice that sometimes updating a heading does not affect all headings of the same level in the document.

Make a copy of the document for this test. Try select all in document and then in the style box on the left select the arrow and update the style.

Other problem I see is some numbers are auto-generated but other editors have hard typed the numbers. Those should show two sets of numbers - delete the ones on the right not the left.

Have fun.