[Writer] Numbering Table of contents

I have the following structure:

#Title (Heading 1)

###Subtitle (Heading 2)
text here

#Second Title (Heading 1)
###Subtitle (Heading 2)

 
Then I setup headings from Tools > Chapter numbering… > Paragraph styles, also I change the Number
field to 1,2,3. And show sub-levels.
When I generate TOC it looks OK:
 

1. Title .......................3  
  1.1 Subtitle .................3
2. Second Title.................6  
  2.1 Subtitle .................6  

It’s OK, BUT the problems is that my original Title also changes and it has numbering. It became like:

#1.Title

I want to have numbering only in TOC. Is that possible?

Ideally, numbering in Heading x should be styled Hidden but it does not work. Therefore, it is a bit more complicated to get the expected result.

  • Define an Invisible character style

    In Font tab, set Size to 2pt (minimum allowed by LO Writer)

    In Font Effects, check Hidden (useless in fact, because Writer doesn’t seem to take it into account in this specific case – that’s why I set Size to 2pt)

    Save the new definition.

  • Tune Tools>Chapter Numbering, after your custom settings are tuned and saved

    In Numbering tab, click on 1-10 level and set Character style to Invisible you just created. Make sure Separator Before and After are empty.

    In Position tab, , click on 1-10 level and set Number followed by to Nothing. Set Aligned at and Indent at to 0.

    Press OK.

  • Edit the TOC structure through right-click and Edit Index/Table.

    For every level you inserted in your TOC, put the cursor in the text box between E# and E. In this box type a space (or any other decorated separator you like).

    When done with all levels, press OK.

    You need to insert a space because in Tools>Chapter Numbering, Position, the separator was suppressed ( Nothing ) so that the Heading x paragraphs would be left-justified (save for a tiny space due to the numbering in 2pt).

If this answer helped you, please accept it by clicking the check mark :heavy_check_mark: to the left and, karma permitting, upvote it. If this resolves your problem, close the question, that will help other people with the same question.

1 Like

Thanks for the answer.
To make it fully invisible I can match the font color with the background color,