05-20-2010, 10:05 AM | #1 |
Junior Member
Posts: 8
Karma: 10
Join Date: Dec 2009
Device: Kindle 2
|
[Old Thread] calibre detects chapters, doesn't add to TOC
I have a .lit ebook that I want to convert to .mobi to read on my Kindle. The .lit ebook has 27 chapters, all of which show up in the TOC.
I have attempted to convert using both version 0.6.52 & 0.6.53 on Windows XP (service pack 3). My .mobi output has "pagebreaks" and / or "rulers" at each chapter as would be expected. When I view the .mobi file, the chapters are perfectly detected. I have looked at the four debug folders. calibre is correctly breaking the ebook into 28 distinct .htm files (named 000 throught 027). Each of these .htm files starts with <h1>Chapter X</h1> and contains the text of that chapter and that chapter only. The 000 .htm file appears to contain the TOC information. However, I cannot get a TOC to generate to save my life. I have tried a number of combinations of xPath expressions in both the "Detect Chapters" box and the "Level 1 TOC" box. I currently am using an xPath expression that says: //*[re:test(., "CHAPTER", "i")] for structure detection. I have tried copying that directly into the "Level 1 TOC" box with no success. I have tried //h:h1, and even //* but I cannot get it to create a TOC. Any ideas? |
05-20-2010, 10:25 AM | #2 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Try setting your "Level 1 TOC" box to //h:h1
|
Advert | |
|
05-20-2010, 11:26 AM | #3 |
Junior Member
Posts: 8
Karma: 10
Join Date: Dec 2009
Device: Kindle 2
|
I had already tried that. I just tried it again and no luck.
Thanks. |
05-20-2010, 01:09 PM | #4 |
creator of calibre
Posts: 44,279
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
In MOBI files the tOC is in the metadata, not in the content of the book.
|
05-20-2010, 01:18 PM | #5 |
Junior Member
Posts: 8
Karma: 10
Join Date: Dec 2009
Device: Kindle 2
|
Ok. But, I cannot even get it to generate a TOC, wherever it resides.
I have never had a book that detects chapters correctly but won't generate TOC. That's where I am stuck. Usually, if my xPath expressions won't detect chapters, I don't get a TOC. If I can detect chapters, the TOC has always been generated. Not this time. |
Advert | |
|
05-20-2010, 03:50 PM | #6 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Have you also tried ticking the "Force use of auto-generated TOC" on the [Convert]-[TOC} page? Just a thought.
|
05-20-2010, 04:23 PM | #7 |
Junior Member
Posts: 8
Karma: 10
Join Date: Dec 2009
Device: Kindle 2
|
Good thought. I just re-ran the conversion and it did the same thing.
I am at a loss. |
05-20-2010, 04:33 PM | #8 |
creator of calibre
Posts: 44,279
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
without either the original file or the conversion logs it's impossible to help you further
|
05-20-2010, 08:45 PM | #9 |
Junior Member
Posts: 8
Karma: 10
Join Date: Dec 2009
Device: Kindle 2
|
I would love some further help. I was hoping I simply was missing a setting or a technique.
I, however, have no idea how to provide the conversion logs. |
05-20-2010, 09:13 PM | #10 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Convert your file.
When it's finished, click on the Jobs box in the bottom right of the GUI. Highlight the conversion job you've just run and click on the "Job Details" button. Copy-paste the window contents here for someone more technical than me to have a look at. |
05-20-2010, 09:26 PM | #11 | |||
Junior Member
Posts: 8
Karma: 10
Join Date: Dec 2009
Device: Kindle 2
|
Thanks jackie! I didn't know that information existed. Here is the first part of the conversion log.
Quote:
Quote:
Quote:
Last edited by Corey.Langner; 05-20-2010 at 09:30 PM. |
|||
05-20-2010, 10:26 PM | #12 |
creator of calibre
Posts: 44,279
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Your clue are these lines
Failed to mark chapter Traceback (most recent call last): File "site-packages\calibre\ebooks\oeb\transforms\structure.p y", line 93, in detect_chapters File "lxml.etree.pyx", line 673, in lxml.etree._Element.addprevious (src/lxml/lxml.etree.c:31716) TypeError: Only processing instructions and comments can be siblings of the root element they indicate that your file has very poor markup, look for something like content outside the <html> tags |
05-21-2010, 05:58 PM | #13 |
Junior Member
Posts: 8
Karma: 10
Join Date: Dec 2009
Device: Kindle 2
|
Thanks. I guess I lack the stomach to dig into that.
I will convert to .rtf, let Word change the Chapter marks to <H3> style and then convert to .mobi. Thanks again for all the help. |
09-25-2011, 12:59 AM | #14 |
Junior Member
Posts: 8
Karma: 10
Join Date: Sep 2011
Device: Nook for PC
|
I'm having the same problem, and I didn't understand what you asked Corey Langner to do. What do you mean by "content outside html tags"? I've seen multiple questions about this and the answers are all so technical, I'm like, yeah, whatever. Maybe I'll click "no toc" ...
Thanks -- Alisa |
09-25-2011, 01:55 AM | #15 | |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Welcome to Mobileread.
Quote:
Start by reading this sticky post and if you still need help create a new thread and outline exactly what trouble you are having. |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unnamed chapters in toc | AlisaC | Calibre | 0 | 09-24-2011 11:30 PM |
TOC Chapters | taraboom11 | Calibre | 4 | 03-03-2011 08:10 PM |
Text to HTML (or any e-book format, really) program that detects chapters? | JeremyR | Workshop | 11 | 02-10-2011 09:29 PM |
azw to mobi: Not detecting chapters/page break at chapters and no TOC | RachDvn | Calibre | 3 | 01-16-2011 09:53 AM |
TOC not identifying all chapters | shilpa | Calibre | 6 | 08-05-2009 11:29 AM |