Ask Your Question

How to use sections as TOC entries? [closed]

asked 2013-01-07 19:34:10 +0200

Eduardo Villegas gravatar image

updated 2013-06-15 00:04:11 +0200

manj_k gravatar image

Is it possible to generate in Writer a Table of contents with the name of sections?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-10-30 20:44:15.294393

2 Answers

Sort by » oldest newest most voted

answered 2013-04-27 07:33:39 +0200

oweng gravatar image

updated 2013-04-27 07:56:31 +0200

The answer by @ROSt52 is effectively correct and I have marked it up. What I want to address in this answer is a different aspect of your question: what do you mean by your use of the term "section"? There is a conceptual and practical aspect to any answer to this question that I want to explain.

The TLDR version of this answer is: There is no method I know of for pulling instances of the <text:section> element from a Writer (ODT) document and using them as a basis for generating a table of contents (ToC). A ToC is based on Paragraph styles / automatically inserted bookmarks. Avoid using the section facility in word processing software to break-up content, use a text style instead.

Definition of 'section'

In typography a section was historically a device to divide a lengthy chapter into more digestible pieces (Wikipedia source). A flourish (graphic swirl) or three asterisks were the common method of illustrating a section break. Related to this idea is the use of the section sign § (U+00a7). In the provided source it is worth noting that "in written narrative such as fiction, sections are not usually numbered or named" but instead are "used to signal various changes in a story, including changes in time, location, point-of-view character, mood, tone, emotion, and pace."

More recently (and generally) documents are considered to be divided into sections according to their "headings and subheadings, which may be used for a table of contents." Thus, what @ROSt52 has answered is correct in this respect: you need only define your required headings and pull these into your ToC. If you are referring to a section as a formatting mark used to alter page layout (as per MS Word) or the text area of a page (as per LO Writer), that is an altogether different consideration.

MS Word

Since the advent of MS Word and its encoding of a section as a formatting mark most people seem to use this term in similar manner, whether they realise it or not. MS took the concept of a section (that of division) and used it as a way of designating changes in appearance. In simple terms they encoded it to allow for changes in the "layout or formatting of a page or pages in your document" (MS Office Word Help source). More specifically a "section break acts as an embedded code ... (more)

edit flag offensive delete link more


@oweng - thanks for this great additional explanation!!!

ROSt52 gravatar imageROSt52 ( 2013-04-28 05:27:01 +0200 )edit

I often wrap lists of short items in sections and I see this division as being both presentational and semantic: my lists’ sections are named according to the content and status of the list; visually, this also allows me to lay out the list on two columns so that it takes up less space. This is both meaningful and æsthetically sound. I have recently noticed that reference lists on Wikipedia are now laid out on two columns when the browser supports the CSS3 multi-column layout module.

CyanCG gravatar imageCyanCG ( 2013-04-29 16:30:02 +0200 )edit

Thanks for pointing out a case where the two converge. I don't deny that there are such cases, however they are less common that the usage of the term "section" when describing documents in general. A section, as you have described it, is also useful for cross-referencing (semantically).

oweng gravatar imageoweng ( 2013-04-30 01:38:28 +0200 )edit

Yes, and in this sense they are also similar to HTML div elements and LaTeX environments.

CyanCG gravatar imageCyanCG ( 2013-04-30 03:16:20 +0200 )edit

answered 2013-04-27 05:10:36 +0200

ROSt52 gravatar image

If you can give each section a heading name it will automatically go into the TOC;. However this depends on how you want to structure your document.

Otherwise I recommend to read the help file and/or

All depends very much of what you want to layout and structure your document.

edit flag offensive delete link more

Question Tools


Asked: 2013-01-07 19:34:10 +0200

Seen: 1,170 times

Last updated: Apr 27 '13