Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-30-2016, 01:36 PM   #1
BKh
Zealot
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
BKh's Avatar
 
Posts: 107
Karma: 1000
Join Date: Mar 2011
Device: Kindle
epub to azw3 Table of Contents flattens

I have an epub that I created in Sigil and I am converting it to azw3. When I do this, the css for the hard coded table of contents gets changed so that what should be indented subheadings becomes a "flat" list.

In this folder I have placed the original epub, the converted azw3, the conversion log, a screen shot of the output options, text files of just the html table of contents for the epub and azw3:

https://www.dropbox.com/sh/dnprfnbvf...dAu3hAeCa?dl=0

I have also included screen shots of the table of contents from each version.

Note, I originally used the css Sigil created for the toc, but the converted to azw3 results were the same. So then I added the indents as hard coded styles in each paragraph. That I what I have given here.

Thanks for reading, and please let me know if you need any other information.
BKh is offline   Reply With Quote
Old 10-30-2016, 02:58 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,845
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use the "Do not add Table of Contents to book" option in the azw3 output section of the conversion dialog.
kovidgoyal is offline   Reply With Quote
Advert
Old 10-30-2016, 03:32 PM   #3
BKh
Zealot
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
BKh's Avatar
 
Posts: 107
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Quote:
Originally Posted by kovidgoyal View Post
Use the "Do not add Table of Contents to book" option in the azw3 output section of the conversion dialog.
I did. See the screen shot I included with the original post:
https://www.dropbox.com/s/2ut3mw85wu...tions.jpg?dl=0

Sorry I didn't mention that explicitly in my OP.

Am I missing something?

Last edited by BKh; 10-30-2016 at 03:56 PM. Reason: clarification
BKh is offline   Reply With Quote
Old 10-30-2016, 11:39 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,845
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Your HTML ToC is not marked as a ToC in the OPF. You need to create a guide entry for it. And remove the two spurious Table of Contents entries in the ncx.
kovidgoyal is offline   Reply With Quote
Old 10-31-2016, 03:19 PM   #5
BKh
Zealot
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
BKh's Avatar
 
Posts: 107
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Dear Kovid,

Thanks for your help. I believe I have corrected the html toc to be listed in the guide section in the OPF
Code:
<guide>
    <reference href="Text/Rights.xhtml" title="Copyright Page" type="copyright-page"></reference>
    <reference href="Text/Title.xhtml" title="Text" type="text"></reference>
    <reference href="Text/Cover.xhtml" title="Cover" type="cover"></reference>
    <reference href="Text/TOC.xhtml" title="Table of Content" type="toc"></reference>
  </guide>
I don't see spurious Table of Contents entries in the ncx, but I'm not exactly sure what they would be, so . I should note that there are chapters in the book that have their own tables of contents, and their entries in the real table of contents contains the words "table of contents", but that shouldn't have anything to do with this.

(Side note: The Edit Book feature is AWESOME! Thank you)

So here is a part of the TOC.html file in the epub
Code:
<div class="sgc-toc-level-2">
  <a href="../Text/numerical-discourses-book-threes-fool.html">I. The Fool</a>
<div class="sgc-toc-level-3">
  <a href="../Text/numerical-discourses-book-threes-fool.html#sigil_toc_id_1">3:1 (1) Peril</a>
</div>
<div class="sgc-toc-level-3">
  <a href="../Text/numerical-discourses-book-threes-fool.html#sigil_toc_id_2">3:2 (2) Characteristics</a>
</div>
And here is the same part in the azw3:
Code:
<div class="sgc-toc-level1">
  <a href="part0007.html#6LJU1-b6266d1d9bb1475c93532ee14823c3f2">I. The Fool</a>
<div class="sgc-toc-level1">
  <a href="part0007.html#sigil_toc_id_1">3:1 (1) Peril</a>
</div>
<div class="sgc-toc-level1">
  <a href="part0007.html#sigil_toc_id_2">3:2 (2) Characteristics</a>
</div>
You can see that the sgc-toc-level-2 and sgc-toc-level-3 have both been changed to sgc-toc-level1

I guess what I keep not understanding is why the TOC.html file would be treated any different from the other html files since I already have the toc.ncx.

Thank you so much for your help and all the work you do with Calibre.

I have put the new files here along with the job record
https://www.dropbox.com/sh/dnprfnbvf...dAu3hAeCa?dl=0
BKh is offline   Reply With Quote
Advert
Old 10-31-2016, 11:02 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,845
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The spurious toc entries in the ncx are entries that point to incorrect locations in the book. Run the Check Book tool in the editor which will find at leat one of them. And turn off the option in the conversion dialog structure detection to remove fake margins.
kovidgoyal is offline   Reply With Quote
Reply

Tags
azw3, conversion


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
table of contents problem in epub to azw3 quizzz Conversion 0 02-22-2014 02:10 AM
2 Table of contents in one EPub? holdit Sigil 3 01-28-2014 01:33 PM
Touch no table of contents of epub 3.0 tshering Kobo Reader 6 10-27-2012 01:09 PM
Table of Contents on ePub Matt2012 Ectaco jetBook 3 03-13-2010 01:35 PM
EPUB Table of Contents Acey Calibre 7 11-19-2008 11:35 AM


All times are GMT -4. The time now is 11:24 AM.


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