EPUB TOC creating page numbers for each line of text

New Here ,
Mar 16, 2022 Mar 16, 2022

Copy link to clipboard

Copied

Hey.

I am formatting an EPUB. The chapter headings for each chapter contain a number and a line of text with the name of the chapter (or in some cases, two lines of text):

Screenshot 2022-03-16 at 10.12.19.png

 

When exported as an EPUB, the TOC gives each line its own page number, like this:

Screenshot 2022-03-16 at 10.13.45.png

 

I can't find any information on how to solve this problem. I'd greatly appreciate any help on this.

Thanks so much!

TOPICS
EPUB , Import and export , Type

Views

80

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 16, 2022 Mar 16, 2022

Copy link to clipboard

Copied

I suppose you have created for each line its own paragraph. Make one single paragraph for these lines and they appear together with one entry in the toc.

To keep text together in one line use non breaking spaces, to get a new line, not a new paragraph, use shift return.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 16, 2022 Mar 16, 2022

Copy link to clipboard

Copied

Almost certainly that.

 

Soft returns/newlines are something of a glitch in reflowable EPUB; there's a checkbox to remove them for a fairly good reason.

 

The better techniques for controlling line breaks, especially for chapter headings, is to specify left/right margins or use nonbreaking spaces very selectively. In this case, a hard space between the words "MR.[hard space]MCGRATH[hard space]REFUSES[soft space]AN[hard space]INVITATION" would probably work best, but 5-10% side margins might work almost as well. Or in combination.

 

The attached chapter number is a problem. Only a soft return can create that alignment and create a proper TOC entry. There are other formatting techniques that might work better, such as two styles.

 

After some tinkering, it looks as if the only way to create the style shown and have a matching TOC is:

  1. Use two styles for the chapter number and chapter title.
  2. Set the chapter title margins to help fold the text, and selective use of hard spaces to hold text together.
  3. In the TOC, ignore the chapter number style and auto-number the chapter entries to match.

 

|| Word & InDesign to Kindle (& EPUB): a Professional Guide (v2 now on Amazon!)

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 16, 2022 Mar 16, 2022

Copy link to clipboard

Copied

LATEST

Hi. In the end, it's like you both suggested - a combination of soft returns and (aggressive) margins.

Thank you so much. It's really apreciated. Have a great week!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 16, 2022 Mar 16, 2022

Copy link to clipboard

Copied

Thanks so much for your reply. I did try that, but it was only moderately succesful. I really appreciate you taking the time to answer, though. Cheers!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines