TOC indent level level

Hi,
another newbie TOC situation (see attached .odt). My paragraph styles define which content is used in the TOC, but I’d like the list level of that content to define the Assignment level within the TOC rather than Paragraph style defining that assignment level. For instance, in example file: Ephedrine/PseudoEphedrine should be nested within Sympathomimetic rather than immediately beneath it. Ephedrine/PseudoEphedrine and Methamphetamine (overdoses…) are both “Disease” paragraph styles for content formatting purposes, but are List level 3 and 4 respectively -and I’d like the TOC to reflect those List levels. I can edit the TOC manually, but those manual edits are reverted whenever I update the TOC, and I’m confident that LO has a better way to do this that I just haven’t been able to find in the literature.

thanks for guidance!
G

Minimal TOC Example.odt (84.8 KB)

TOC in Writer is built from data collected from document text. This data is flagged by specifying an outline level in a paragraph style. Usually the “standard” paragraph styles are Heading 1 to Heading 10 which are assigned to the corresponding level at factory. Other paragraph styles may be used, as you did, when different formatting is needed in parallel to the built-in styles, e.g. chapter headings with ordinary numbering and appendices with Roman numbering, which is not your case.

TOC entries are styled Contents 1 to Content 10, no matter which style was used to collect the entry, built-in Heading n or user-styles. Only the outline level is important here. Consequently, you only need to customise Contents n to set indentation to your liking.

However, this will be difficult because your document is a real mess (no offence intended).

  • you have a mixture of Heading n and user styles
    If your purpose is “semantic styling” (which is a very good approach), you should use Tools>Chapter Numbering to replace Heading 4 and Heading 5 with Disease and Medications in the configuration. This also automatically takes care of the outline level paragraph styles without the need to manually set it. It also advertises the use of the paragraph styles, integrating them harmoniously with the TOC engine.

  • you didn’t use the automatic numbering feature of Tools>Chapter Numbering
    Instead, you seem to have defined a manual numbering with default Format>Bullets & Numbering which is akin to manual formatting and will lead you into nightmarish numbering problems. When outline and TOC are concerned, always use the dedicated Tools>Chapter Numbering sequence as it never interferes with any numbered list. It is also easier to create a numbering scheme without the fear to break some other list. Fortunately, your Tools>Chapter Numbering is presently set to None otherwise you’d have experienced conflict between chapter and list numbering resulting in unexpected numbers.

    The only reason to use a custom list style (= numbering style) here would be the ability to manage TOC-excluded headings with a consistent numbering. But doing it reliably requires advanced skill with Writer.

    I noticed that your document was probably initially created with M$ Word, as your “custom numbering style” is named WWWNum1. But there are many “fossil styles” due to the approximate conversion from M$ format.

  • page styles are converted from Word
    Pay special attention to this as in extreme cases, translation ends up with one page style per page, preventing central layout control (You’d have to tune every page style individually instead of a couple of them corresponding to the main parts of the document: cover, TOC, contents, post-topic material, …).

    I’d highly recommend to get rid of all conversion issues to copy and paste as unformatted text the whole document into a blank file and to restyle it consistently.

IMHO, your first task is to think over the outline of the document and to design a consistent numbering with a dedicated list style. Don’t rely on Format>Bullets & Numbering for such a complex document. It is a false friend who will play nasty tricks on your back. Define which paragraph styles go to which level (in case you want to differentiate headings to be included or not in TOC). For headings not in TOC (outline level = Text Body), you’ll have to set manually the list level by pressing Tab at the very beginning n-1 times (where n = desired heading level) because the outline level can’t be stored in the paragraph style (otherwise the heading is included in the TOC).

However I consider your present TOC scheme as reader-confusing because numbering is not continuous (some numbers are missing from the expected sequence). This is direct consequence of your decision of not including some headings into the TOC.

TOC layout is done by configuring Contents n. I suggest you changed slightly your TOC Entries structure lines by adding a T between E# and E (stop position at 0). Tick also Tab position relative to paragraph style indent so that you can align page number position by setting the same value in each level (instead of doing a complex math to “guess” the real position). With this new T, you can now set the indents in Contents n for Before text as 1cm, 1.5cm, 2cm, 2.5cm, … and all First line as -1cm. This will implement what you are looking for. Then tune the distances for optimal result.

If page number alignment appears ragged (because you don’t/can’t use Align at right in 2-column), a work around is to assign a character style to the page number # where you set the font size to a fixed value. As the digits will then have the same width, the “raggedness” disappears.

2 Likes

Thank you for such thoughtful and thorough assessment & recommendations. I will start a fresh document, and copy existing text w/o formatting, and implement your tips. Thanks again!

A good sleep is always a good adviser. Thinking back about your design of partial heading inclusion in TOC, I’d suggest you use two separate sequence counters (numbering sequences): Tools>Chapter Numbering for everything going to TOC (so that numbering in the TOC is continuous) and specific dedicated list style for those not in TOC.

Numbering is sufficiently diverse you can find a “type” visually different to suggest the heading doesn’t go into TOC (such as Greek you don’t use yet). In fact you have a numbered list.

The only limitation is a list item number can’t be prefixed with chapter number. This is equivalent to say that two list counters cannot be combined (which doesn’t make sense in practice). This has no consequence for you as you don’t use a “cascading” numbering scheme where all previous levels are also displayed.

1 Like