Ask Your Question
1

How can I force TOC entries to wrap to avoid lines with just a dot leader? [closed]

asked 2014-07-10 23:08:20 +0100

KevinH gravatar image

updated 2015-09-01 22:42:30 +0100

Alex Kemp gravatar image

I am writing a thesis with multiple chapters and subchapters, and using styles to automatically generate a properly-numbered table of contents. Each TOC entry has the chapter (or section) title, a dot leader, and the page number against the right margin. (It is essentially the default TOC formatting.)

If the length of a chapter title is just a bit shorter than the length of a full line of text - so that there isn't room for a dot leader and page number before hitting the right margin - then the entry wraps to a second (or subsequent) line in the TOC. This creates a full line of ........ (dot leader) followed by the page number at the right margin.

This results in a TOC that looks like

  1. Introduction............................. 1
  2. This chapter title doesn't work
    ................................................ 5
  3. Chapter with a short title.......... 7
  4. This chapter has a very long
    title that wraps just fine........... 10
  5. Last chapter........................... 11

Short titles work fine, long titles wrap to multiple lines and look fine; it's just those awkward exactly-one-line headers. Any ideas for how I can get that Chapter 2 title to work?

(Using LibreOffice Writer 4.2.4.2 under Windows 8.1.)

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 2016-02-28 23:13:50.035672

1 Answer

Sort by » oldest newest most voted
3

answered 2014-07-11 13:49:58 +0100

Regina gravatar image

I know no build-in way to avoid it, but you have some means to tweak the TOC. You can try to make the line shorter, so that the page number fits into the first line, or to make the line longer, so that at least one word goes to the second line.

  • Do not use a dot after the chapter number, that is typographically wrong anyway.
  • To get the wrap for very long lines you have likely used indents and/or tabs. Tweak their positions.
  • Write your TOC with an additional indent on the left side.
  • Use a font size, which is a little bit larger or smaller. For example 12.2pt instead of 12pt might already force the wrap before the last word of the line, or 11.7pt to make the page number fit.
  • Expand or condense the letter spacing a little bit, 0.1pt will likely work already.
  • Rethink the content of the heading.
edit flag offensive delete link more

Comments

1

Isn't that "dot after the chapter number ... is typographically wrong" something that only holds in German(y)? "1." in German reads as "first", but it doesn't necessarily in Dutch or English.

bencomp gravatar imagebencomp ( 2014-07-11 18:38:39 +0100 )edit
1

For German I'm sure, it is DIN 1421. For other languages I refer to http://en.wikipedia.org/wiki/ISO_2145 . But to look into the standard itself I would have to go to a library, because ISO standards are not online.

Regina gravatar imageRegina ( 2014-07-11 23:50:32 +0100 )edit

Question Tools

3 followers

Stats

Asked: 2014-07-10 23:08:20 +0100

Seen: 2,045 times

Last updated: Jul 11 '14