![]() |
#1 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: May 2013
Device: iPad, iPhone, Kindle (Any), Desktop, etc
|
Can't tell ebook-convert to NOT generate inline TOC for Mobi
So, been beating my head against this. Here's my situation:
1. I have a fully formatted ePub, it has (of course) an internal .ncx file for table-of-contents purposes. 2. It also has a custom generated (by me) more minimal/formatted inline Table of Contents. 3. Whenever I run ebook-convert against it, to convert it to mobi. I get an inline TOC added, which matches the original .ncx, between the title page and the original inline TOC. The question is, how do I tell ebook-convert to stop doing this? I've tried --no-chapters-in-toc, --no-inline-toc, --max-toc-links 0, --toc-filter, and pretty much everything else I can. And it always generates that inline TOC. |
![]() |
![]() |
![]() |
#2 |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,889
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
I'm no expert but it seems to be acting like you are using the --mobi-toc-at-start option. Could Put generated Table of Contents at start of book instead of end be checked in the GUI under Preferences - Output Options - MOBI Output?
Last edited by DoctorOhh; 05-08-2013 at 12:48 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,199
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
--no-inline-toc prevents calibre from generating an inline toc in the MOBI file.
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: May 2013
Device: iPad, iPhone, Kindle (Any), Desktop, etc
|
kovidgoyal, I understand that from the documentation. However even when I use --no-inline-toc, it still puts the inline TOC into the document.
And as someone else pointed out, interestingly enough, it's putting it near the start. Not at the very beginning. But after teh cover image, and after the title page. But before my own inline TOC |
![]() |
![]() |
![]() |
#5 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,889
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,912
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Near the front sounds normal WHEN a book has a TOC ( I just looked at some of my MMPB's... No TOC ![]() |
|
![]() |
![]() |
![]() |
#7 |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,889
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
|
![]() |
![]() |
![]() |
#8 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,199
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you use --no-inline-toc and are still finding an inline toc in teh mobi, then that toc was present in the input document.
|
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: May 2013
Device: iPad, iPhone, Kindle (Any), Desktop, etc
|
DoctorOhh & kovidgoyal -- This is a copyright'd commercial work, hence why I hadn't provided it yet. But let me work on basically extracting all the 'content' out (just leaving headings), and generating the files. That way I could share them easily here without worrying about it ...
I will try to get that done today, to illustrate the problem. Thank you. |
![]() |
![]() |
![]() |
#10 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: May 2013
Device: iPad, iPhone, Kindle (Any), Desktop, etc
|
Everything
OK, Here is all of the information requested ... with copies of the files that are Lorem'd up most completely.
The files: 151.epub - This is the original file that I am starting with. You will note if you open it in any ebook reader, that it has an internal ncx style of full table-of-contents, but the inline-content based TOC is a handcrafted custom one. No auto-generated-looking TOC appears when viewing the document. When reading it, you see CoverImage, Title Page, Custom TOC, Content 151.mobi - This is the output of ebook-convert. Specifically with ' --no-inline-toc --mobi-file-type both'. Open this in any Kindle viewer (or the Previewer). And suddenly a new TOC is thrust into the document. Now when viewing the document you see: CoverImage, Title Page, AutoGeneratedTOC, Custom TOC, Content. calibre.txt - This is just the raw text output of ebook-convert when it runs. Thanks in advance, Eli |
![]() |
![]() |
![]() |
#11 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,912
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
You do seem to have an error (may not be this problem)
Code:
Hyperlink target u'ch007_split_000.xhtml#epilogue' |
![]() |
![]() |
![]() |
#12 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,199
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
As I said before, the toc you're referring to is in nav.xhtml in your epub. If you dont want it in your output file, dont include it in your input file.
|
![]() |
![]() |
![]() |
#13 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: May 2013
Device: iPad, iPhone, Kindle (Any), Desktop, etc
|
kovidgoyal. But the nav.xhtml in the epub doesn't show inline in the epub. Why therefore is it being injected inline in the mobi?
|
![]() |
![]() |
![]() |
#14 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,199
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Open it in an epub viewer that shows non-linear spine items and it will show inline. Read the relevant part of the epub spec on non-linear spine items, their display is at the discretion of the viewer application.
|
![]() |
![]() |
![]() |
#15 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: May 2013
Device: iPad, iPhone, Kindle (Any), Desktop, etc
|
Thanks kovidgoyal, I tested this by removing the references to nav.xhtml, and you are correct, they are not included then in the mobi.
I'll need to do some more research into a final solution for myself, because I am using pandoc to generate this ePub, and even when telling pandoc to not create a TOC, it's creating that nav.xhtml, and just setting it as non-linear. So either I need a find a way to tell it to not generate it at all, or as part of my automated process, after generating the epub (since every reader I've tested doesn't display the TOC). I would then need to unzip it, clean out the nav, rezip it) just to then run the mobi converter on it. Ah well. On the flip side, I don't guess there's any configuration options, or hope of a configuration option in ebook-convert to say "Ignore this one item", or even a more generic "ignore any non-linear items"? if I could just give it a filter option to say "when converting ignore any nav.xhtml" or 'ignore id="nav"' ... that would also solve my problems. Thanks, Eli |
![]() |
![]() |
![]() |
Tags |
epub, mobi, table of contents, toc |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibra convert to htmlz then back to mobi corrupts toc | twoten | Conversion | 0 | 07-13-2012 04:07 AM |
Have sigil not generate inline CSS | Hellmark | Sigil | 3 | 01-27-2012 01:16 PM |
Inline TOC from toc.ncx | elmago79 | Kindle Formats | 38 | 03-25-2011 12:56 PM |
Use Regex to Code an Inline TOC, from an External TOC's .ncx File | mostlynovels | ePub | 2 | 03-16-2011 12:15 PM |
Trying to make an Inline TOC | crutledge | Sigil | 2 | 05-09-2010 05:46 AM |