• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

location of the table of contents in EPUB

Contributor ,
Dec 01, 2022 Dec 01, 2022

Copy link to clipboard

Copied

Hi,

 

Today, I posted a question below and some people made a comment.

I want to hear other opinions.

Would you help me?

 

Hosun

************************

I applied Title (paragraph style) to title (Grimms' Fairy Tales) and tagged h1.

In EPUB, table of contents are located on a wrong place.

 

IdIdBooks appBooks appIdId

 

 

TOPICS
How to

Views

206

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

correct answers 1 Correct answer

Community Expert , Dec 01, 2022 Dec 01, 2022

Okay, let's take this from the start. (And it really helps if you keep all discussion of one project in one topic, so that all the exchanges are in one place, and the forum isn't cluttered up with multiple topics on the same issue...)

 

First, the TOC pane has to be anchored to a paragraph in the document where you want it to appear. That is, the TOC pane will immediately follow whatever paragraph you anchor it to. (If you don't anchor the TOC, it falls to the end of the EPUB.)

 

Second, getting

...

Likes

Translate

Translate
Community Expert ,
Dec 01, 2022 Dec 01, 2022

Copy link to clipboard

Copied

Okay, let's take this from the start. (And it really helps if you keep all discussion of one project in one topic, so that all the exchanges are in one place, and the forum isn't cluttered up with multiple topics on the same issue...)

 

First, the TOC pane has to be anchored to a paragraph in the document where you want it to appear. That is, the TOC pane will immediately follow whatever paragraph you anchor it to. (If you don't anchor the TOC, it falls to the end of the EPUB.)

 

Second, getting a paragraph to start on a new page in an EPUB reader is a bit tricky, as reflowable EPUB doesn't have pages, per se — reader apps arbitrarily break up the content into viewing pages, but those will change (as they should) with every different reader setting of font size, spacing, user preference, screen size, etc.

 

Third, nearly every EPUB reader is a little different and handles things in its own way, usually because the developer had a better idea than the EPUB standard. You're using the iBooks reader, which is very nonstandard relative to standards-compliant readers.

 

So you've done everything right, over the changes, except that the paragraph you've anchored the TOC to is not breaking to a new "virtual page" and thus starting the TOC on that next page. This is because most EPUB readers, iBooks included, do not recognize page breaks ("Start on Next Page," etc.) — because, structurally, there is no next page.

 

There are two techniques that can force a page break, but neither works on all readers and neither will work the same on any given reader.

 

First technique: add an enormous "space below" to the Title paragraph — say 12 inches. Bottom spacing is truncated in EPUB readers; if it's more than the remaining page size, the excess just disappears. (That is, the extra inches don't continue onto the next display page.) This may be enough to push the TOC anchor paragraph to the next page... on some readers.

 

Second technique: make that TOC anchor paragraph completely unique and used ONLY t force a page break; call it Body Text pagebreak or something so you don't inadvertenly use it for anything else. Then, in that pragraph style definition, under Export Tagging, check "Split Document." At the time of export, under General, check "Split Document" and check "Based on Paragraph Style Export Tags." (You can also skip the first step and in the export menu, just specify to split on the pagebreak style... but that's sort of a shortcut.)

 

The EPUB export will now split the actual content file so that each "split" paragraph will start a new XHTML content section... which most readers interpret as a new page.

 

I appreciate that you're moving along and taking instruction here well (there are others who could learn to... grumble), but your ongoing problem is that you haven't mastered enough of the basics to get a simple EPUB export the way you want it. I'd look at some tutorials that walk you through those basics, some of which we've covered in these exchanges but of which there are many more. With that basic understanding, you'll be able to get this relatively simple book export done and have the foundation for adding more advanced tricks (like the split/pagebreak one above) to your skill set.

 

I'd also recommend doing all preview and proofing in a "vanilla" reader like Thorium or Calibre, so that the quirks of iBooks don't confuse the development issues. Getting a book "right" on the vanilla level and then tweaking it for a specific reader (Kindle, iBooks) is the correct workflow.

 

By all means keep asking questions (preferably in one topic for each project, not for each separate issue). But some tutorials would pay off in speed of learning. 🙂

 

 


| Word & InDesign to Kindle & EPUB: a Pro Guide (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
Contributor ,
Dec 01, 2022 Dec 01, 2022

Copy link to clipboard

Copied

LATEST

Hi,

 

I tried your workarounds (Space After and Page Break).

Both work in placing the Table of Contetns on the correct position.

But there are issues of both workarounds:

- EPUB starts with page 3.

- Title (Grimms' Fairy Tales) is not placed in the center and middle.

 

So, I rasterized Title (Grimms' Fairy Tales).

Then, only reaming issue is; EPUB starts with page 3.

Another minor issue is; when EPUB was created and opened, I should press the left arrow key twice to move to the next page, next time no problem in turning the pages (It's observed in all three workarounds).

 

As a rerult, I'd rather go with rasterization.

 

Hosun

 

I post links to files (indd and epub). Screenshots look messy.

1. Space After

https://drive.google.com/file/d/1N-EtMJQH-kLCvk-DaSpi5c00ZugLPuoY/view?usp=share_link

https://drive.google.com/file/d/16sHBKFjQc5WjgxdVXHUKUulZdHpvc-Ck/view?usp=share_link

2. Page Break

https://drive.google.com/file/d/1SneKTLOOQ2IZIjjnnRt82Ct73sEPuf-E/view?usp=share_link

https://drive.google.com/file/d/1KkCXvUBzcmlguEoElA97FnpLOxz9j2qk/view?usp=share_link

3. Raterization

https://drive.google.com/file/d/1p98wQW-7gBS4hcFLWrM1fBg8HR_DlfEI/view?usp=share_link

https://drive.google.com/file/d/1myyPOIfTrWpmUgbK1XQfX57FyE4K2w0r/view?usp=share_link

 

*************************

When I made my homepage a few years ago, I encounterd compatibility issue with some browsers.

The same seems to be happening in the EPUB world.

 

Thank you very much for your help.

 

Hosun

 

 

 

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