Table of Contents problem and solution
-
paperbackwriter
- Posts: 19
- Joined: Fri Apr 19, 2013 11:52 am
Table of Contents problem and solution
I want to create a Table of Contents (TOC) from the following chapter titles (using "Alice in Wonderland" as an example).
I. (Heading 3)
DOWN THE RABBIT HOLE (Heading 4)
II Heading 3)
THE POOL OF TEARS (Heading 4)
III (Heading 3)
A CAUCUS-RACE AND A LONG TALE (Heading 4)
IV (Heading 3)
THE RABBIT SENDS IN A LITTLE BILL Heading 4)
V (Heading 3)
ADVICE FROM A CATERPILLAR (Heading 4)
etc.etc.
The first few lines of the TOC will look like this:
I. DOWN THE RABBIT HOLE.........................................................1
II. THE POOL OF TEARS.............................................................15
etc. etc.
The problem is that it doesn't seem possible to combine Heading 3 and Heading 4 onto the same line using only 1 TOC.
However there may be better way of setting up a TOC: Insert an empty table into the contents page with three columns and one row. Insert a TOC into each column (delete the "Title" field in each case). Enter heading 3 into the first column TOC - followed by a full stop, to give a list of chapter numbers; enter heading 4 into the second column TOC with optional dots as filler to give the list of chapter names; and enter heading 3 or 4 into the 3rd column TOC, right aligned, for the page numbers.
If the chapter name runs onto a new line you will have to add the odd extra line or paragraph break to columns 1 and 3. If the TOC runs to more than one page, only the first page of results will display. But you can fix this by using the "Remove Index" command on the Navigator, which will change the TOC to text.
I have obtained excellent results using this method. It is far more flexible than relying on one Table of Contents.
A big advantage of this method is that the left and right margins of each field - chapter number, chapter name, and page number - can be finely adjusted by moving the table column boundaries. This prevents the chapter title straying onto the chapter number or page number area.
I have attached an example of a bit of a TOC using this "3-column table" method.
I. (Heading 3)
DOWN THE RABBIT HOLE (Heading 4)
II Heading 3)
THE POOL OF TEARS (Heading 4)
III (Heading 3)
A CAUCUS-RACE AND A LONG TALE (Heading 4)
IV (Heading 3)
THE RABBIT SENDS IN A LITTLE BILL Heading 4)
V (Heading 3)
ADVICE FROM A CATERPILLAR (Heading 4)
etc.etc.
The first few lines of the TOC will look like this:
I. DOWN THE RABBIT HOLE.........................................................1
II. THE POOL OF TEARS.............................................................15
etc. etc.
The problem is that it doesn't seem possible to combine Heading 3 and Heading 4 onto the same line using only 1 TOC.
However there may be better way of setting up a TOC: Insert an empty table into the contents page with three columns and one row. Insert a TOC into each column (delete the "Title" field in each case). Enter heading 3 into the first column TOC - followed by a full stop, to give a list of chapter numbers; enter heading 4 into the second column TOC with optional dots as filler to give the list of chapter names; and enter heading 3 or 4 into the 3rd column TOC, right aligned, for the page numbers.
If the chapter name runs onto a new line you will have to add the odd extra line or paragraph break to columns 1 and 3. If the TOC runs to more than one page, only the first page of results will display. But you can fix this by using the "Remove Index" command on the Navigator, which will change the TOC to text.
I have obtained excellent results using this method. It is far more flexible than relying on one Table of Contents.
A big advantage of this method is that the left and right margins of each field - chapter number, chapter name, and page number - can be finely adjusted by moving the table column boundaries. This prevents the chapter title straying onto the chapter number or page number area.
I have attached an example of a bit of a TOC using this "3-column table" method.
Last edited by RoryOF on Wed Apr 24, 2013 6:21 pm, edited 2 times in total.
Reason: Corrected typo - The Rabbit Sends in a Little Bill [not Bit] = so, I'm picky! Little Bill was lowered down the chimney.
Reason: Corrected typo - The Rabbit Sends in a Little Bill [not Bit] = so, I'm picky! Little Bill was lowered down the chimney.
AOo 4.1.0 on Windows XP (SP3) laptop.
Re: Table of Contents problem and solution
What's the purpose in splitting the numbering and the text into different paragraphs & styles?paperbackwriter wrote:... The problem is that it doesn't seem possible to combine Heading 3 and Heading 4 onto the same line using only 1 TOC.
...
If all you need is to have the two on separate lines, it is possible without using separate paragraphs. Make a search here for "two line heading" or something like that and you should find the steps. The chapter titles will appear across two lines but as one line in the ToC.
AOO4/LO5 • Linux • Fedora 23
-
paperbackwriter
- Posts: 19
- Joined: Fri Apr 19, 2013 11:52 am
Re: Table of Contents problem and solution
Because in books, it is standard practice (e.g. see chapter 1 Alice in Wonderland}.acknak wrote:...What's the purpose in splitting the numbering and the text into different paragraphs & styles?
....
There is a tutorial, Work-around for a Two lines heading, but it seems a bit complicated, needs a macro, and I'm not sure if the user can use different styles on the two headings while combining them into one style and one heading in the TOC.
The "3-column table" method is not too difficult to understand and allows the user to finely adjust the left and right margins of the chapter title field (e.g. by moving the column lines), keeping it clear of the chapter number and page number. Just one thing though: For some reason you can't access the edit window of a TOC in a table by right clicking - you have to use the Navigator instead
I'm not claiming it is the best solution, but it seems to work OK.
AOo 4.1.0 on Windows XP (SP3) laptop.
Re: Table of Contents problem and solution
Here's my version. I haven't used the wide tab trick; it doesn't work if you want centered numbering and title. I've configured the "after" text of the numbering to include a line break. That also has some problems but it works well enough.
I've added a manual ToC using a table; the chapter title and page items are inserted as cross references. The numbering is done by a separate list style because a cross-reference can't display the chapter number in a different numbering type.
One thing you lose with a table, and it's rather a nuisance to work around, is the standard dotted leader between the chapter titles and the page numbers.
I've added a manual ToC using a table; the chapter title and page items are inserted as cross references. The numbering is done by a separate list style because a cross-reference can't display the chapter number in a different numbering type.
One thing you lose with a table, and it's rather a nuisance to work around, is the standard dotted leader between the chapter titles and the page numbers.
- Attachments
-
- Alice in Wonderland - Lewis Carroll_20130424d.odt
- (70.71 KiB) Downloaded 521 times
AOO4/LO5 • Linux • Fedora 23
-
paperbackwriter
- Posts: 19
- Joined: Fri Apr 19, 2013 11:52 am
Re: Table of Contents problem and solution
A few questions:
1. How did you configure the after-text of Heading 1 to give you a line break, but still appear on the same line in the TOC? - I assume you did it in "outline numbering" but I'm not sure.
(2) When I create a footer on the chapter-title page and then insert a page number field, then apply the "footer" style, the page number is left aligned despite the alignment being defined as centred in the page footer style. No matter what I do I could not get the correct footer style to apply.
Note: You need to update the TOC as it is showing the wrong page numbers.
Just one other thing. The TOC looks fine as it stands but the problem is with long titles that break onto the next line and run into the "chapter number" and " page number" area. Is there a workaround for this?
1. How did you configure the after-text of Heading 1 to give you a line break, but still appear on the same line in the TOC? - I assume you did it in "outline numbering" but I'm not sure.
(2) When I create a footer on the chapter-title page and then insert a page number field, then apply the "footer" style, the page number is left aligned despite the alignment being defined as centred in the page footer style. No matter what I do I could not get the correct footer style to apply.
Note: You need to update the TOC as it is showing the wrong page numbers.
Just one other thing. The TOC looks fine as it stands but the problem is with long titles that break onto the next line and run into the "chapter number" and " page number" area. Is there a workaround for this?
AOo 4.1.0 on Windows XP (SP3) laptop.
Re: Table of Contents problem and solution
Put your cursor before the Page number field and hit Tab.
Apache OpenOffice 4.1.17 on Xubuntu 26.04.1 LTS
Re: Table of Contents problem and solution
Right.paperbackwriter wrote:A few questions:
1. How did you configure the after-text of Heading 1 to give you a line break, but still appear on the same line in the TOC? - I assume you did it in "outline numbering" but I'm not sure.
However, it's a slightly nasty trick. It turns out that OOo running in Linux will accept a line break (or "newline", "linefeed", character code 10) in the "after" slot of the dialog, but OOo on Windows won't. The newline is ignored when the ToC is generated. I don't know if it's possible to configure this on Windows. I'd love to know if there's some other way to manage this that would work on any platform.
No, not really. That is one situation that the table approach handles correctly, where the normal tab stops don't. I wish that Writer was more flexible, or robust, in how it handled formatting the ToC. There are some real weaknesses in the current design.... the problem is with long titles that break onto the next line ...
AOO4/LO5 • Linux • Fedora 23
Re: Table of Contents problem and solution
I do not think there is an easy way. The only way I found to insert the line break on the "text after" box was pressing Ctrl-Shift-U (a small underlined u appears) and then type the unicode code 000A followed by enter. This adds the line break on the heading and on the TOC, but it's possible to configure the TOC to show the chapter number "without separator": just select the E# button on the Entries tab and from the Format drop down menu select "Number without separator".acknak wrote:Right.paperbackwriter wrote:A few questions:
1. How did you configure the after-text of Heading 1 to give you a line break, but still appear on the same line in the TOC? - I assume you did it in "outline numbering" but I'm not sure.
However, it's a slightly nasty trick. It turns out that OOo running in Linux will accept a line break (or "newline", "linefeed", character code 10) in the "after" slot of the dialog, but OOo on Windows won't. The newline is ignored when the ToC is generated. I don't know if it's possible to configure this on Windows. I'd love to know if there's some other way to manage this that would work on any platform.
The problem with this approach is that the Ctrl-Shift-U trick only works when AOO is using GTK2 widgets (in fact, this is a GTK trick, not an AOO trick) so it fails on windows: the line feed control character cannot be copy-pasted to the box, it seems (at least I was not able to copy paste it) so the only method for centred two line headings seems to be the use of two paragraph styles.
There are two types of people: those who believe that there are two types of people and those who do not.
openSUSE Leap with KDE Plasma / LibreOffice
openSUSE Leap with KDE Plasma / LibreOffice
Re: Table of Contents problem and solution
You could do it by editing the xml, of course. 
AOO4/LO5 • Linux • Fedora 23
-
paperbackwriter
- Posts: 19
- Joined: Fri Apr 19, 2013 11:52 am
[Issue] Table of contents nested in a Table
I would also suggest one further fix if possible. At the moment only the first page of the TOC displays in a table - you get a little blue marker to indicate "overflow" for subsequent pages. The bottom border of the table should be allowed to expand onto the next page with the TOC.
AOo 4.1.0 on Windows XP (SP3) laptop.
Re: Table of Contents problem and solution
for what its worth....I have TOCs of 5 pages plus TOFs and TOTs several pages each.
I would have to poke around on how get the template set up...years ago
Basically, contents styles used for TOC (lots of work to get right)....if hyperlinking, then need unique hyperlink style of TOC entry has say different font
TOC set maps contents to headings.
I would have to poke around on how get the template set up...years ago
Basically, contents styles used for TOC (lots of work to get right)....if hyperlinking, then need unique hyperlink style of TOC entry has say different font
TOC set maps contents to headings.
Open office 3.1 on Windows XP