Ask Your Question

Table of Contents in Single Column in section [closed]

asked 2013-02-25 05:00:34 +0200

mark gravatar image

updated 2013-06-15 00:03:45 +0200

manj_k gravatar image

I thought the process would be simple enough, but either I’m doing something wrong or it can’t be done (yet).

I have a small section with two columns at the beginning of a chapter. I would like to put some introductory text in the first column, and a small table of contents in the second column.

When I try, either by copying an existing table or by creating a new one, the TOC stretches across the full width of the page, rather than staying inside the column. This is true even if I try it on a new unstyled document, so I don’t think my styles are to blame.

If I try to do do the same thing using tables, it all behaves as expected.

Any ideas?


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-11-01 20:09:28.850815

1 Answer

Sort by » oldest newest most voted

answered 2013-05-23 14:07:46 +0200

oweng gravatar image

You are not really doing something wrong, but you are likely not realising that a table of contents (ToC) is effectively a section in LO. This is what the XML code for a ToC looks like:

<style:style style:name="Sect1" style:family="section">
<text:table-of-content text:style-name="Sect1" text:name="Table of Contents1">

You could certainly try and embed a ToC within an existing section, but it doesn't actually end up being set within it in the XML. Thus you are faced with having to style the ToC separately anyway.

If this small leading section is only going to contain a brief piece of text on the left and the ToC on the right and the following content is not in the same section, I would simply use the ToC and dispense with the section. Insert your ToC and set it to use two columns and be editable. At the beginning of the first column insert a column break. Then type your content in the left column as per usual. Here is an example.

edit flag offensive delete link more

Question Tools


Asked: 2013-02-25 05:00:34 +0200

Seen: 372 times

Last updated: May 23 '13