Chapter number not in all TOC levels

Document resets page number on heading1. TOC entries for level 1 can be created in the form 1-1, 2-1 etc. Other TOC levels cannot be made to show chapter number in the page
TOC looks something as follows:
Big title 1-1
subpiece -12
Big title 2-1
subpiece -5
Big title 3-1
subpiece -3
subsub -5

Those subpieces should be things like 1-12, 2-5, 3-3 and 3-5.

Follow the LibreOffice Writer Guide section "Numbering pages by chapter then Generate the Table of Contents.
Then for each of the TOC levels, make the following changes just before the page number field (#).

  1. Add the chapter number field
  2. In the blank area between E# and #, place a hyphen character
  3. (This is the part that is not well documented). Select the E# field just entered. Change the selection “Evaluate up to level:” make it a 1.

(formatting edited by ajlittoz)

Verify the outline numbering settings in ToolsOutline Numbering..., tab Numbering.

Click on 2 in Level box. By default, Show sublevels shows 1, i.e. display only numbering for Heading 2. To get what you want, increment Show sublevels to 2, i.e. Heading 2 and Heading 1.

More generally, if you want a complete numering for Heading x, set Show sublevels to x.

If this answers your question, please accept it by ticking the check mark at left and eventually, karma permitting, upvote it. For community benefit, close the question if you think it fully addresses your issue.

Thank you for your attempt to answer my question. The answer would probably be correct in a different situation. I do not want complete numbering for Heading X… The sublevels should not show their number (1.2, 4.12 etc). It’s only chapters that should be numbered. In the TOC, if I include the field Chapter number (E#), that works for level 1 but the TOC E# field for levels 2 through 4 (I don’t go beyond level 4) show NULL (as in nothing) for that field.

E# is generated as a whole by LO according to the rules you set in Outline Numbering..., that is, you have only one valid-for-all-levels way of generating E#. If I understand what you’re trying to achieve, you’d like to control E# content: chap# for TOC level 1, chap# for TOC level 2 instead of chap#-sect#.

Since having a sequence of identical chapter number for all entries in a chapter, you could perhaps number only TOC level 1 and suppress numbering for all other levels.

This can be achieved through InsertIndex & Tables...->Ìndex & Tables` where you remove E# in levels 2-9. This is only a workaround.

Quite the opposite. First by Insert->Index T table … I assume you mean (words taken straight from the drop down menu) Insert → Table of Contents and Index. That option is used for generating the TOC. At all levels in the TOC, I wish to use the E#. I do not in any way want the actual titles for heading levels 2-4 to have a number show on them in the document. It is in the TOC where I want the Chapter number to show on every entry (think of the form as E#-E, which is the page number)

This may be a bug situation. The E# field should be usable at lower level TOC entries. It is coming up blank.

E# is a mirror of the numbering in Heading x paragraphs. Consequently, if such a paragraph has no numbers, there will be no corresponding number in the TOC. You might try to number all your Heading x paragraphs and give a custom character style with attribute Hidden to erase numbers in text and keep them in TOC.

However, my test was not successful because Hidden seems not to be effective in Heading x numbers. I got the effect setting character color to white.

E# use to work. See bug 105628 ( One of the two attachments on that bug is a document with a TOC that was created using a prior version. In that instance, chapter numbering works until you delete and add the E# field back. Two possible work-arounds exist but, they are not something that should be encouraged long term.

  1. Use that sample appended to the bug as your document. Cut and paste your document into it. Delete all the written stuff in that original sample document but DO NOT TOUCH THE TOC ENTRIES. Right click in the TOC area to update the TOC - it will now have your headings and preserve the by-chapter technique.

  2. Maintain a copy of LibreOffice4 or maybe LO 5.0.0. Use this to generate the beginning of your document.

The key thing is that you cannot update the E# portion of TOC entries with the

I was not aware of that bug. But I’m surprised that E# can capture something like <chap#>-<page#>. Aren’t you rather building your TOC entry with E#-#? And here again, I would use a special trick so that E# contains only a chapter number.

I’ll study the attached file in the bug report as soon as I’m back from my journey.

The bug predates LO I could easily have been on some LO 4 level when I last successfully generated a chapter-by-chapter TOC.

I reproduced the bug on my laptop with LO

That you ajlittoz for working with me on this issue. I installed three other levels of Libreoffice (, and trying to figure out when I had generating a good TOC. I’m thinking now, the original was an import from another writting software (.doc maybe?). the previous documents were creating by copying the previous document and gutting it’s contents. This was probably a lazy way of preserving various modified paragraph and character style elements.

It’s still not cool that the fix for getting chapter numbers into TOC elements would involve this ‘evaluate up to level’ thing.