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 05-08-2013, 12:18 AM   #1
EliW
Junior Member
EliW began at the beginning.
 
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.
EliW is offline   Reply With Quote
Old 05-08-2013, 12:32 AM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by EliW View Post
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.
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.
DoctorOhh is offline   Reply With Quote
Advert
Old 05-08-2013, 12:40 AM   #3
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,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
--no-inline-toc prevents calibre from generating an inline toc in the MOBI file.
kovidgoyal is offline   Reply With Quote
Old 05-08-2013, 10:39 AM   #4
EliW
Junior Member
EliW began at the beginning.
 
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
EliW is offline   Reply With Quote
Old 05-08-2013, 07:52 PM   #5
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by EliW View Post
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
Your at the point where you need to follow the guidelines in this sticky post: How to ask a question about conversion problems.
DoctorOhh is offline   Reply With Quote
Advert
Old 05-08-2013, 09:28 PM   #6
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: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by EliW View Post
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
There are books with The TOC before the Cover or titlepage?
Near the front sounds normal WHEN a book has a TOC ( I just looked at some of my MMPB's... No TOC )
theducks is online now   Reply With Quote
Old 05-08-2013, 10:30 PM   #7
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by theducks View Post
There are books with The TOC before the Cover or titlepage?
Near the front sounds normal WHEN a book has a TOC ( I just looked at some of my MMPB's... No TOC )
Read the first post.
DoctorOhh is offline   Reply With Quote
Old 05-08-2013, 10:46 PM   #8
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,856
Karma: 22666666
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.
kovidgoyal is offline   Reply With Quote
Old 05-09-2013, 08:25 AM   #9
EliW
Junior Member
EliW began at the beginning.
 
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.
EliW is offline   Reply With Quote
Old 05-09-2013, 10:45 AM   #10
EliW
Junior Member
EliW began at the beginning.
 
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
Attached Files
File Type: epub 151.epub (1.45 MB, 221 views)
File Type: mobi 151.mobi (403.3 KB, 205 views)
File Type: txt calibre.txt (1.2 KB, 235 views)
EliW is offline   Reply With Quote
Old 05-09-2013, 10:57 AM   #11
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: 29,800
Karma: 54830978
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'
theducks is online now   Reply With Quote
Old 05-09-2013, 11:25 AM   #12
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,856
Karma: 22666666
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.
kovidgoyal is offline   Reply With Quote
Old 05-09-2013, 11:28 AM   #13
EliW
Junior Member
EliW began at the beginning.
 
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?
EliW is offline   Reply With Quote
Old 05-09-2013, 11:47 AM   #14
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,856
Karma: 22666666
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.
kovidgoyal is offline   Reply With Quote
Old 05-09-2013, 03:50 PM   #15
EliW
Junior Member
EliW began at the beginning.
 
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
EliW is offline   Reply With Quote
Reply

Tags
epub, mobi, table of contents, toc


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 03:17 PM.


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