Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 06-05-2021, 01:48 AM   #1
DaveLessnau
Connoisseur
DaveLessnau doesn't litterDaveLessnau doesn't litterDaveLessnau doesn't litter
 
Posts: 93
Karma: 212
Join Date: Sep 2013
Device: Kindle Voyage
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?
DaveLessnau is offline   Reply With Quote
Old 06-05-2021, 02:11 AM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 13,442
Karma: 65505905
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, Tolino epos
Quote:
Originally Posted by DaveLessnau View Post
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?
One item is that the copy that auto-synced would be a .kepub.epub which would open with the WebKit based renderer while the downloaded .epub would be opened with the RMSDK renderer.

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.
DNSB is offline   Reply With Quote
Advert
Old 06-05-2021, 10:49 AM   #3
DaveLessnau
Connoisseur
DaveLessnau doesn't litterDaveLessnau doesn't litterDaveLessnau doesn't litter
 
Posts: 93
Karma: 212
Join Date: Sep 2013
Device: Kindle Voyage
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.
DaveLessnau is offline   Reply With Quote
Old 06-05-2021, 11:43 AM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 26,317
Karma: 41365351
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Aura2, 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
theducks is offline   Reply With Quote
Old 06-05-2021, 12:57 PM   #5
DaveLessnau
Connoisseur
DaveLessnau doesn't litterDaveLessnau doesn't litterDaveLessnau doesn't litter
 
Posts: 93
Karma: 212
Join Date: Sep 2013
Device: Kindle Voyage
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.
DaveLessnau is offline   Reply With Quote
Advert
Old 06-05-2021, 03:00 PM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 63,320
Karma: 103125649
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
What is the book?
JSWolf is offline   Reply With Quote
Old 06-05-2021, 07:27 PM   #7
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 26,317
Karma: 41365351
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Aura2, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by DaveLessnau View Post
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.
That is a improperly empty NCX, the standard for EPUB2.
The book must not have a decent markup for conversion.
theducks is offline   Reply With Quote
Old 06-05-2021, 08:28 PM   #8
retiredbiker
Addict
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 223
Karma: 232318
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
Quote:
Originally Posted by DaveLessnau View Post
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.
My Kobo is most happy when the ToC and the files match. If your starting book has all the chapters as files, all you have to do is the "Generate ToC from Files" thing and it works fine. But a lot of books I get have multiple chapters buried within the html files--often with a perfectly good ToC done from headings or something--but that doesn't work as well on the Kobo, especially if the files are very large. So I edit those books to separate the chapters into files and rebuild the ToC. It usually only takes a few minutes, after doing it a few times.
retiredbiker is offline   Reply With Quote
Old 06-06-2021, 12:42 AM   #9
DaveLessnau
Connoisseur
DaveLessnau doesn't litterDaveLessnau doesn't litterDaveLessnau doesn't litter
 
Posts: 93
Karma: 212
Join Date: Sep 2013
Device: Kindle Voyage
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>
DaveLessnau is offline   Reply With Quote
Old 06-06-2021, 03:22 AM   #10
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 21,767
Karma: 37499227
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.
davidfor is offline   Reply With Quote
Old 06-07-2021, 06:03 PM   #11
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 1,790
Karma: 4595792
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Forma, LibraH20, AuraH20, Mini, Oasis3, Voyage, Nova2, Tab S5e, Nexus7
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.
Skydog is offline   Reply With Quote
Old 06-07-2021, 08:20 PM   #12
retiredbiker
Addict
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 223
Karma: 232318
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
Quote:
only "Begin Reading" with one ridiculously long file
I too dislike books like that, and my Forma dislikes them even more. If you have one huge file, the thing to do is open the book in the editor and split it up. Use the file split tool, located under the preview pane.

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.
retiredbiker is offline   Reply With Quote
Old 06-07-2021, 08:24 PM   #13
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 63,320
Karma: 103125649
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
Quote:
Originally Posted by Skydog View Post
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.
Discworld books are similar except the eBooks are not one long file. But there are no chapters, just section breaks.
JSWolf is offline   Reply With Quote
Old 06-08-2021, 12:15 AM   #14
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 1,790
Karma: 4595792
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Forma, LibraH20, AuraH20, Mini, Oasis3, Voyage, Nova2, Tab S5e, Nexus7
Quote:
Originally Posted by retiredbiker View Post
I too dislike books like that, and my Forma dislikes them even more. If you have one huge file, the thing to do is open the book in the editor and split it up. Use the file split tool, located under the preview pane.

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.
Thank you, retiredbiker, I should have read your post first. I am keeping a copy of your instructions for a few others books suffering from the same problem. Since I had not yet read your post, I converted epub->epub and had calibre create a TOC, not knowing what would happen. Then, I manually edited each chapter (76 of them). Nothing like doing things the hard way. Now, I will take the same original and apply your instructions just to see how the results compare.

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.
Skydog is offline   Reply With Quote
Old 06-09-2021, 09:26 AM   #15
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 422
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."
deback is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 01:26 PM.


MobileRead.com is a privately owned, operated and funded community.