06-05-2021, 01:48 AM | #1 |
Guru
Posts: 744
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
No Table of Contents in Converted Epub?
Up until now, I've been using Kindles and doing MOBI/AZW3 > AZW3 Conversions in Calibre to make things look a bit better (mostly increasing font size). I've never had a problem with that. Today, I bought my first epub from Kobo. The DRM Free version automatically synced to my new Kobo Forma and I also downloaded a copy of it directly from Kobo to my hard drive and then Added it to Calibre. I did my standard conversion (this time from Epub > Epub) and sent the book to my Forma. The directly synced version has a TOC, but the version I Converted does not (neither in the Calibre viewer nor on the Forma - the only thing in the TOC is "Start"). Is there some known issue with Tables of Contents when converting to epubs?
|
06-05-2021, 02:11 AM | #2 | |
Bibliophagist
Posts: 39,378
Karma: 153516540
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
You might want to check the conversion options under the ToC tab. Try a conversion using the Force use of auto-generated Table of Contents or the Manually fine-tune the ToC after conversion is completed to pop the ToC editor open. A couple of questions that come to mind. If you open the epub using the calibre viewer prior to the epub => epub conversion, does it have a ToC? And also may I ask why you are doing an epub=>epub conversion prior to sending the book to your Kobo? For most part, I use the Modify Epub plugin to remove fluff from epubs when I feel it is necessary. I reserve epub=>epub conversion for those epubs where the contents are so gibbled that it makes sense to try a conversion. |
|
Advert | |
|
06-05-2021, 10:49 AM | #3 |
Guru
Posts: 744
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
Thanks for the reply.
- I'm using the KoboTouchExtended driver, so I'm also getting the kepub over on the Forma. But, I've tried sending the book over to the Forma without that and saw the same lack of TOC in the epub as well as the kepub. - Looking at the pre-conversion file in Calibre's viewer also shows no TOC. I wonder if the version downloaded to my computer from Kobo is different from the version synced to the Forma from Kobo. Is there some way to side-load the synced version on the Forma to Calibre? - Under Preferences > Common Options > Table of Contents, everything's blank (default, I think). But, I've tried turning on "Force Use..." and "Detect and Markup Unformatted Chapter Headings and Subheading" under Heuristic Processing, but still end up with nothing but "Start" in the TOC. Also, I noticed that in the converted book, there's no time to the end of chapter. So, it looks like it's not seeing chapters at all. The only way I get anything showing up while editing the TOC manually is with the "Generate ToC from Files" option. I know nothing about that, so I'm going to have to research some more. - I'm doing the conversion because that's what I've always done . But, really, it's primarily to increase the font size throughout the book. Under Common Options > Look & Feel > Fonts, I've increase the sizes there, under Heuristic Processing, I've enabled it to remove unnecessary hyphens, and under Structure Detection, I'm removing the first image and inserting my metadata at the start of the book (basically, to see my review that I keep in Calibre). Thanks, again. At least I now have a starting place to see if I can figure anything out. |
06-05-2021, 11:43 AM | #4 |
Well trained by Cats
Posts: 30,365
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Just to be clear.
Which TOC is missing? All, Inline, NCX. Kobo's really use the NCX when you tap the TOC icon. You don't need the inline one. (I've been removing those that don't offer More than the NCX one as it is just 2 taps away and you don't lose your place). FWIW You can add the TOC tool to your Calibre menubar and touchup the TOC (NCX) without editing the whole book. Broken links will show Red. The tool is very close to the one in the Editor |
06-05-2021, 12:57 PM | #5 |
Guru
Posts: 744
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
I don't know which TOC is missing. On the Forma, when I tap the center of the page is reading mode and then the TOC icon on the bottom, there's nothing there. In Calibre's Viewer, with the TOC window turned on, there's nothing there. But, good news: manually editing the TOC and telling it "Generate ToC from Files" fixes both the lack of TOC and the apparent lack of chapters. I'm also going to play around with that Modify ePub plugin to see if I can bypass converting as part of my normal workflow.
|
Advert | |
|
06-05-2021, 03:00 PM | #6 |
Resident Curmudgeon
Posts: 75,851
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
What is the book?
|
06-05-2021, 07:27 PM | #7 | |
Well trained by Cats
Posts: 30,365
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
The book must not have a decent markup for conversion. |
|
06-05-2021, 08:28 PM | #8 | |
Evangelist
Posts: 416
Karma: 2289864
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
|
Quote:
|
|
06-06-2021, 12:42 AM | #9 |
Guru
Posts: 744
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
I'm thrashing around with the downloaded epub file for this book seeing if I can figure anything out. I renamed a copy of it and changed it to a zip file. I see a toc.ncx (see below for contents). Looking in the various files, I don't see anything else resembling a TOC (I assume that would be an HTML TOC if I found one).
Here are the contents of the epub (zip) file: And here are the contents of the toc.ncx: Code:
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE ncx PUBLIC '-//NISO//DTD ncx 2005-1//EN' 'http://www.daisy.org/z3986/2005/ncx-2005-1.dtd'> <ncx xml:lang="en-US" version="2005-1" xmlns="http://www.daisy.org/z3986/2005/ncx/"> <head> <meta name="dtb:uid" content="1230000005335"></meta> <meta name="dtb:depth" content="0"></meta> <meta name="dtb:totalPageCount" content="0"></meta> <meta name="dtb:maxPageNumber" content="0"></meta> </head> <docTitle><text>City of Bones</text></docTitle> <docAuthor><text>Martha Wells</text></docAuthor> <navMap> <navPoint class="" playOrder="0" id="0dab3afb-ff16-498e-93d7-c32f0d1c6b92"> <navLabel><text>Start</text></navLabel> <content src="titlepage.xhtml"></content> </navPoint> </navMap> </ncx> |
06-06-2021, 03:22 AM | #10 |
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Which means there are no errors. The downloaded book has a single ToC entry. This is named "Start" and points to a file called "titlepage.xhtml".
What this means is that the creator of this version of the book did not build a full ToC. This isn't that uncommon. And it might be deliberate. But, it is more likely a mistake, or inexperience on the part of the book creator. The only things you can do is to generate the ToC yourself, or find an edition that has the ToC. And maybe report it to the publisher, supplier or author to get it fixed. |
06-07-2021, 06:03 PM | #11 |
Wizard
Posts: 2,285
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
|
Recent purchases by one author, (publisher St. Martin's Group), contain no TOC, utilizing only "Begin Reading" with one ridiculously long file. The only identifying code for chapter breaks is: <p class="page-break"></p> at the end of the phantom chapter. Drives me nuts. What is required in each chapter to be able to make a clickable TOC? I haven't yet found anything online that addresses this specifically. My knowledge and experience with HTML and CSS is limited and self-taught.
P.S. I've read the sticky on chapter detection/structure, but am not quite sure how to apply it. Edit: Copy/pasting code from another book seems to work. Laborious, but it works. Last edited by Skydog; 06-07-2021 at 06:49 PM. |
06-07-2021, 08:20 PM | #12 | |
Evangelist
Posts: 416
Karma: 2289864
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
|
Quote:
In your case it is easy, since you have those "<p class="page-break"></p>" lines where you want to split the file. Use that as a search term, go through the big file, and split at each one. Then use the ToC editor, and tell it to generate a ToC "from files". If you have reasonable headers at each chapter - first line of text, actually, it will use those to title the chapters. Some experimentation will show you how it goes, it's pretty easy. Then search out and get rid of those page-break lines. You could also do it in one go, using "Split at multiple locations" tool. Open that big file in the Editor and right-click anywhere in the code pane to get to the tool. Then use the wizard to make your X-path expression. You would use: Tag name=p attribute=class value=page-break in the wizard, then just click OK with the resulting expression. Caution: like any powerful tool, this can give you unexpected results, so know what is in that file in some detail before letting it rip. Last edited by retiredbiker; 06-07-2021 at 08:29 PM. |
|
06-07-2021, 08:24 PM | #13 | |
Resident Curmudgeon
Posts: 75,851
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
06-08-2021, 12:15 AM | #14 | |
Wizard
Posts: 2,285
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
|
Quote:
It's been years since I split a single file but I remember doing it in Sigil and somehow editing in Calibre. A lot of trial and error. Thank you again, retiredbiker, for your assistance. There is so much to learn with Calibre that I don't know what I don't know. |
|
06-09-2021, 09:26 AM | #15 |
Book E d i t o r
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
You could have renamed all the "page-break" codes to "chapter" and then converted the file, which would create separate files for each "chapter" code. Then create the TOC by generating "from files."
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Moon Reader, converted epubs and Table of Contents | darryl | Reading and Management | 1 | 12-15-2014 04:12 AM |
unwanted table of contents in converted book | asqueue | Conversion | 14 | 05-07-2014 06:23 PM |
table of contents code for converted oreilly chm | luckycharms | Conversion | 4 | 08-05-2011 09:31 AM |
access directly the table of contents of cbc converted into epub | Khawarizmi | Sony Reader | 4 | 12-27-2010 08:55 AM |
Table of Contents on ePub | Matt2012 | Ectaco jetBook | 3 | 03-13-2010 01:35 PM |