Ask Your Question

I wrote a doc and now I would like to add a TOC, but keep the formatting I have already used in my document. How can I update/change the existing Heading types and text body settings to be what I am currently using?

asked 2019-01-31 19:22:33 +0100

heysid gravatar image

updated 2020-07-27 17:05:32 +0100

Alex Kemp gravatar image

In other words, I want a Table of Contents that utilizes the formatting/heading styles that I have already predetermined in my document). Btw I'm using Libre Version:

okay, little more info: I composed a long document with it's own custom formatting: ie. some content is in paragraph form, some in outline form; some using numbered outline form and some as bullet points; I used my own style of title, headings and sub-headings that I want to keep / basically I would like to keep the documented formatted the way it currently is, but would like to add a TOC. But the TOC directs me to utilize the pre-existing Libre headings, and when I attempt to create or modify a TOC, it changes the formatting of my document, which I do not want.

But from your previous answer, it appears that it would be better for m to create a Contents rather than TOC? I basically need a list of headings in this document that I can click on a hyperlink and jump to that section within the document.

edit retag flag offensive close merge delete


A question again: can you describe which formatting change occurs when you create/modify your TOC?

ajlittoz gravatar imageajlittoz ( 2019-02-01 08:13:35 +0100 )edit

2 Answers

Sort by » oldest newest most voted

answered 2019-01-31 20:27:01 +0100

ajlittoz gravatar image

updated 2019-02-01 08:12:39 +0100

You question deserves a more thorough explanation of what you've already done and how. To do that, click the edit link (near the slanted pencil) under your question.

Meanwhile, here are general information about the TOC mechanism in LO Writer.

Your document (i.e. what you typed and how you formatted it) will be unaffected by TOC generation.

When you Insert>TOC & Index>Toc & Index, LO Writer scans your whole document from start to end to collect paragraphs styles Heading n. This means you gave this style to your headings, otherwise they will not be recognised as headings.

The heading paragraphs are then slightly transformed according to the template(s) defined in the Entries tab of the insert-TOC dialog. The template tells whether the heading numbering, the heading itself or the page number should be displayed and in which order. These elements may be separated by spaces or tabs and in this latter case if you want leading lines.

To allow maximum flexibility in appearance, TOC paragraphs are not styled Heading n but Contents n (with corresponding n). Consequently, if you want the headings in the TOC to be exactly formatted as the heading in the text (which is not a good idea because you usually have the page number in addition in the TOC), you only need to make Contents n identical to Heading n.

From this description, you see that having a different layout in the TOC is easy because headings and TOC are made independent by use of different styles and the template factory.

Adding a TOC has no back-fire effect on your document. It only adds a new portion of content which you can control without the fear of badly impacting the existing text.

To show the community your question has been answered, click the ✓ next to the correct answer, and "upvote" by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

EDIT 2019-2-1

TOC collection

It is possible to include non-Heading n paragraphs in the TOC. Open the paragraph styles definitions and go to Outline & Numbering tab. The drop-down menu Outline sets the heading level. If this heading is to be numbered, associate the style to a numbering style (improperly named list style in the documentation) with drop-down menu Numbering style. This will allow to number/bullet the heading and also is the clue for Writer to capture the right numbering.

After that, the modified paragraph styles have the same properties as the built-in Heading n styles.

TOC formatting

There is no Contents-named table. Forgive me if my answer above was ambiguous.

The TOC is created as soon as you request it with Insert>... Writer then changes the original styles (Heading n and your modified custom styles) of the paragraph to Contents n to allow you to format TOC entries independently from main text.

If you already have designed a custom style ... (more)

edit flag offensive delete link more

answered 2019-02-01 09:12:59 +0100

ebot gravatar image

A little help on how to apply styles can be found here in a video on YouTube.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-01-31 19:22:33 +0100

Seen: 103 times

Last updated: Feb 01 '19