Table of Contents [Styles Applied] Do not save to Templates

I have painstakingly applied custom styles to a table of contents for a document. Now I have this style saved as both a separate document, a template file.

Regardless of which one I use, when attempting to create a brand new table of contents on a document with those template applied - it does not save the styles I used for the table of contents!

What is going on?

Even within the original document, with my custom styles applied, if I were to go down a few lines and create a new table of contents - I have to MANUALLY apply every style again and again to the table of contents.

I can’t imagine this is how it’s supposed to work?

Remember that a TOC is dynamically created by Writer. When you update (refresh) it or create a new one, Writer starts again from “null”: it scans the whole document, collecting paragraphs intended for TOC and applies styles Contents n (n equal to level).


Consequently, if you didn’t customise Contents n paragraph style family, your user styles are simply ignored.

So, if you expect an automatic formatting for your TOC, fix built-in Contents n to your taste.

PS: when asking here, always mention OS name, exact LO version and save format. In the present case, a small sample document would hav been appreciated to better grasp your workflow.

Windows 11 Pro,
Version: 25.8.2.2 (X86_64)
Build ID: d401f2107ccab8f924a8e2df40f573aab7605b6f
CPU threads: 20; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: en-CA (en_US); UI: en-US
Calc: CL threaded

Here is a sample
Sample for Libre Ask.odt (34.3 KB)

I customized the upper TOC, using my own customized styles.

But if I create a new table below it, it completely resets the styles to the default.

Is there a way, of forcing Libre Office to use the presets that I customize for the TOC always?

There’s also the issue of even if I edit the built-in default styles for paragraphs, I cannot keep adjustments to the TOC customization for things like “entries”.

The best way to work with styles is to use the styles supplied with Writer and create new ones only in the case where we really need a style (because we need a custom name, a conditional style or something special).

  • To customize the fonts of all the TOCs, it is best to modify the Heading Contents, and Contentss (1-10) paragraph styles
1 Like

The problem is in the association of styles to levels. This is done in the Styles tab of the TOC configuration dialog and the mapping is unique to a TOC occurrence (it cannot be saved for reuse).

The only workaround is to customise built-in Contents n which are used by default when building a new TOC.

Most beginners disregard the value of built-in styles. They can be customised any way you like. You must be aware that several usages of built-in styles are hard-coded, like here for a brand new TOC, and can’t be easily replaced, notably in a template, to give a specific “personality” to your documents.

So, instead of struggling against built-in styles (replacing the whole collection with your favourites), learn how to tame them and play with them.


You mentioned a template in your initial post, but your sample document is not template-based, as reported by File>Properties.

1 Like