Should I include list items in a TOC, or only headings?

Why do you both favour this approach?

I’m writing the Articles for a non-profit. I’m trying to mimic the layout of UK legislation, because they’ve given it a lot of thought. (Just ignore the Times New Roman at >10pt…)

Semantically, I want headings, subheadings, and clause titles, to appear in my TOC.

Technically, I’ve set an Outline Level for all of these.

Clause titles are the top level in my list style “Legislation”.

Minor point: why am I using list items as headings?
I want the heading number to come after the word “Part” or “Section”. I can’t see how to do that with headings.

Major point: Why am I setting an Outline Level to a Paragraph Style that also has a List Style set? (see, you teach well :wink: )

  1. While drafting I can quickly promote sub-clauses to clause titles using SHIFT+TAB (and vice versa), instead of applying a heading style every time.
  2. There are a lot of clauses (~60) so headings just “feel” less appropriate.
  3. I dare to hope when I’ve finished the content, I will find a setting or a macro to apply paragraph style “Clauses L1” to every paragraph that is at List Level 1.

Is that good reasoning or am I laying track to problems later?

Articles of Association sampler.odt (23.7 KB)

The first document you showed in this other question contains headings, subheadings, clauses and nothing else, the full document was duplicated in the TOC.

So your first task is to ask yourself what are headings (whatever name you give it to them as clause title may just be another level of heading) and what is “text”. “Text” won’t go into the TOC.

You can assign outline level even to “text”. When you create the TOC, you configure it to collect heading only up to some level.

Headings are just a particular list. Everything you can do with lists can be done with headings. However to avoid conflicts or confusion, the corresponding list style is hidden and not displayed in the style side pane. You customise the heading list style with Tools>Heading Numbering.

It works also with headings, with a bonus: the paragraph style is automatically changed to match the level (this is a benefit of the special properties of Tools>Heading Numbering). So, promoting or demoting a heading is as easy as doing the same in list.

Why? If you really want to assign outline levels to your clauses, then just use Heading n. Everything is already configured from the factory. You only need to limit TOC generation to the appropriate level.

Don’t fall into macro strategy until you have fully understood all Writer features. I’d say that ~50% of request for macros on AskLO come from the lack of knowledge about existing features and the styling mechanism.

If all you want is different paragraph styles at different levels, go for headings. I sort of remember there is an experimental feature to grant list styles the same extra features as heading numbering. It should be available to general public as standard feature in a coming release.

Learn how the existing features work. The most important approach is to structure your mind and translate this structure into a document: the outline is the backbone upon which you “flesh” the document. Styles tell the importance or significance of the objects (paragraphs, words, pages, …). Enter only significant objects. Empty paragraphs contain no information. Consequently a well-behaved document should have absolutely no empty paragraph.

Empty paragraphs are frequently used for vertical space. This is wrong. You become tightly tied to many implicit assumptions which easily break and ruin your manual layout (e.g. when you flush some paragraph to next page with empty paragraphs; make an edit before them and you’re out of sync). Remember that empty objects have nevertheless a style. Customise the style to fit the need for a visible object and empty ones are also impacted and your manual layout is again ruined.

Spacing is yet another property of objects and thus can be recorded in styles, removing the supposed need for empty paragraphs.


To answer your initial question “Should I include list items in a TOC, or only headings?”, a TOC only contains heading to provide a condensed summary of the document. List items are usually part of the discourse or main topic. Consequently, they don’t go into the TOC.

One exception, though: since Tools>Heading Numbering as a standard list allows for only one numbering type per level (say level 1 is numeric; that nice to number chapters but you can’t have simultaneously alphabetical annexes), you must create a second list for a different numbering. Then this list is a second set of heading and, yes, you collect it into the TOC by assigning outline level to its paragraph styles.

1 Like

Thanks for taking the time to write such a tutorial. Very clear.

This is useful, but…

…it seems the customisation doesn’t do what I need it to: I get a nest of numbers, instead of “Part I” alone, then “Section A” alone.


Screenshot 2024-11-15 at 13.35.57


But once you mentioned “interlaced lists”. If I’ve understood, that may work here.

I could have a list called “Parts”, which when applied would give the next sequential number, even if there are paragraphs between with the list style “Sections”, with their own sequential number (letter).

Part I
Section A
Section B
Part II
Section A
Section B

By the time I finish this doc, it may well be here :sweat_smile:

I am a bit puzzled.
To me, your attached sample document appears to do exactly what you explain as your objective. Is there a problem, something you need to be different from what you have achieved?

I may be dense, or perhaps I just need the weekend off …

It does! :grinning:

Only the strong recommendations from others to not do it that way - better not to set an outline level on a list level.

Given this…

…I’m going to use headings per @ajlittoz , and live with the H1, H1.1, H1.1.1 format that I don’t like. Trading my aesthetic preference for easier paragraph styles is a win.

Reduce the number of sublevels to one in the heading numbering dialogue

1 Like

This works great, thanks.


I also see now that heading numbering can have separators before and after, just like in a list - so this is a complete and total solution, with the bonus of automatic paragraph styles.


Thanks for all the help, especially the tutorial posts.