[Solved] ToC treats embedded line break as 2 lines

Writing a book, Automating Document Production - Discuss your special needs here
Post Reply
EdIsenberg
Posts: 83
Joined: Wed May 27, 2009 6:19 am
Location: Central New Mexico, USA

[Solved] ToC treats embedded line break as 2 lines

Post by EdIsenberg »

I've finished a SF novel that will be printed in a "Trade Paperback" format: 6" x 9". Several of my Chapter Titles are too long to fit on one 4.5"-wide line, so I broke them up into two physical lines with a line-break (Shift-Enter). The Table of Contents erroneously reads the Chapter Title as two lines / 2 Chapters:

In my text the following is centered:
Chapter 19: Cyborgs, Money, UFOs, Insanity, and Sex

After I use a line break it appears in the text, centered,
Chapter 19: Cyborgs, Money,
UFOs, Insanity, and Sex


In the Table of Contents, it reads as follows:
Chapter 19: Cyborgs, Money,......................174
UFOs, Insanity, and Sex............................174


What I want in the ToC is:
Chapter 19: Cyborgs, Money,
UFOs, Insanity, and Sex............................174


I would greatly appreciate any advice. One idea is that maybe Shift-Enter isn't the right way to make a line-break.
Last edited by floris v on Mon Aug 08, 2016 10:18 am, edited 1 time in total.
Reason: Tagged as Solved based on last post by OP, edited subject to fit, floris v, moderator
Edward D. Isenberg
MS Windows 10
OOo 4.1.2
LibreOffice 5.2.7.2
User avatar
floris v
Volunteer
Posts: 4581
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Table of Contents treats embedded line break as 2 lines

Post by floris v »

I can't duplicate that. In Libre, the Line break is ignored, in AOO the break is kept, giving exactly the effect that you want. I can only get your effect if I insert a paragraph break in the heading, so maybe you thought you had hit Shift + Enter when in fact you just hit Enter.
LibreOffice 24.2.7.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Table of Contents treats embedded line break as 2 lines

Post by acknak »

I wonder if perhaps the "line break" you mention has actually come from pressing the Enter key, not Shift+Enter. Shift+Enter in the chapter title will insert an actual line break, which will give one entry in the ToC. Pressing Enter in the chapter title will indeed start a new line but it inserts a paragraph break, which then goes into the ToC as two separate headings.

It may be that the line break (Shift+Enter) carries into the ToC, so that may not be quite satisfactory either.
AOO4/LO5 • Linux • Fedora 23
User avatar
RoryOF
Moderator
Posts: 35103
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Table of Contents treats embedded line break as 2 lines

Post by RoryOF »

Whether it is a line break (shift Enter) or not can be confirmed by looking at the actual chapter title in the text and turning on /View /nonprinting characters. If it is a line break this will show as a left pointing hooked arrow.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
EdIsenberg
Posts: 83
Joined: Wed May 27, 2009 6:19 am
Location: Central New Mexico, USA

Re: Table of Contents treats embedded line break as 2 lines

Post by EdIsenberg »

Thanks for the help; using Enter instead of Shift-Enter was the problem. Such a stupid mistake on my part.

I appreciate your quick help. I wasn't able to send you a timely response because both my wife & I are disabled and in a lot of pain, so our "up" time is very irregular and we fall behind on stuff quite easily. I do have other questions which I will post after double-checking that neither I nor this forum has the answer available.

Ed
Edward D. Isenberg
MS Windows 10
OOo 4.1.2
LibreOffice 5.2.7.2
Post Reply