03-27-2020, 10:56 AM | #1 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Oct 2011
Device: iPhone
|
Create and use my Table of Contents
So let's say I use ebook-convert to convert a bunch of HTML files into an EPUB, and let's say the Table of Contents isn't correct. So I use ebook-edit to fix the TOC the way I want it, and I can capture my toc.ncx file.
Next time I use ebook-convert, how can I say "There is a file toc.ncx . Use it as the TOC" ? |
03-27-2020, 12:13 PM | #2 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
it will do it automatically when you convert an epub with an ncx
|
03-27-2020, 12:53 PM | #3 | ||
Enthusiast
Posts: 27
Karma: 10
Join Date: Oct 2011
Device: iPhone
|
Quote:
Quote:
|
||
03-27-2020, 03:06 PM | #4 |
Guru
Posts: 731
Karma: 7000000
Join Date: Aug 2017
Location: Italy
Device: Kindle Paperwhite, Kobo Elipsa, Pocketbook Color PB633, Inkpad Color
|
You can enhance the Maximum TOC links in the conversion settings, at the voice "Table of Contents" (My calibre is in Italian so I am not sure about the exact English terminology)
|
03-27-2020, 07:25 PM | #5 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Oct 2011
Device: iPhone
|
|
03-27-2020, 08:01 PM | #6 |
Bibliophagist
Posts: 35,393
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
From your orignal post, it seems you want to use an external file to be used to replace the toc.ncx in the epub when converting an epub to epub. At best a horrible idea and likely to lead to having to rebuild the toc.ncx file. If nothing else, can you guarantee after conversion, that you will have the same number of text files with the same file names? And the "chapter names" will be the same?
|
03-27-2020, 08:18 PM | #7 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Oct 2011
Device: iPhone
|
|
03-27-2020, 11:06 PM | #8 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I said when you convert *EPUB*.
ncx files are meaningless when you convert HTML. If you really want to convert a collection of HTML files, then make an OPF file that refers to them and convert that. The OPF file can also refer to an NCX in the usual way, though I dont recall if the HTML input plugin will actually use that or not. Probably will. |
03-28-2020, 07:42 PM | #9 | |
Enthusiast
Posts: 27
Karma: 10
Join Date: Oct 2011
Device: iPhone
|
So you're answering the question you want to answer, and not the question I asked.
Quote:
|
|
03-28-2020, 10:51 PM | #10 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
03-29-2020, 02:37 AM | #11 | ||
Bibliophagist
Posts: 35,393
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Quote:
Spoiler:
Anyhow, I'm outta here. “To argue with a man who has renounced the use and authority of reason is like administering medicine to the dead, or endeavoring to convert an atheist by scripture.” —Thomas Paine, The American Crisis |
||
03-29-2020, 05:14 PM | #12 | |
Enthusiast
Posts: 27
Karma: 10
Join Date: Oct 2011
Device: iPhone
|
Quote:
If I take five HTML files and generate an EPUB, the EPUB will have a Table of Contents and a toc.ncx. If I take the same five HTML files and re-generate the EPUB, why wouldn't I expect the TOC be the same? |
|
03-29-2020, 07:01 PM | #13 | ||
Bibliophagist
Posts: 35,393
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
To quote your original post: Quote:
You might want to take the time to look at the documentation. Here's a link to the Open Packaging Format (OPF) 2.0.1 v1.0.1 Section 2.4.1.2 as a starter. Last edited by DNSB; 03-29-2020 at 07:08 PM. |
||
03-29-2020, 11:30 PM | #14 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
I rarely do conversions. But, when I edit a book, I make sure I can regenerate the ToC at any time and will get the desired result. I usually just use h1, h2 and h3 to do this. But, occasionally will use other tags if that is the best way to do it. The only I can think of to use a prebuilt ToC is if the files are basically identical. And the simplest way I can think to use it would be to replace the ToC file after the conversion. But, I think that what I would really do is to make sure the input files and conversion parameters used would produce the result I desired. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How can I create subsections in Table of Contents | SampleAndy | Sigil | 3 | 05-18-2017 05:42 PM |
Can´t create an html table of contents on Sigil | Danila | Sigil | 2 | 02-16-2017 03:29 PM |
how to create Table of Contents? | Small Elephant | Amazon Kindle | 2 | 11-17-2012 01:17 AM |
Create a table of contents? | RobLikesBrunch | Amazon Kindle | 13 | 03-09-2009 07:59 PM |
Is there a way to create a table of contents for notes | timezone | iRex | 0 | 08-03-2008 03:54 PM |