Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-19-2023, 12:22 PM   #1
dunxd
Member
dunxd began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Oct 2022
Device: Kindle Paperwhite 1st Generation
Post How to generate NCX table of contents when importing books

I have setup Calibre to convert added books to EPub format. However, I notice that this does not create a NCX ToC in the books, which is creating some issues in another project I am working on.

When I click Edit ToC for a book, and then click Ok, the NCX file is created in the EPub and the EPub then works in my project.

I would like NCX creation to happen automatically when converting to EPub, but I am not sure which option (if any) will do this. Can anyone help?
dunxd is offline   Reply With Quote
Old 04-19-2023, 01:04 PM   #2
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,114
Karma: 53500872
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
NCX is required for epub2.
BUT
there may not be any entries other than start.
Conversion takes the input and converts.
No identifiable TOC (coded links) in the source and there will probably not be any entries. Just because there is a page that says Contents on it, does not make it one to conversions (or the device).

In those cases, a Human (you ) will be needed. You can add the Calibre TOC tool to your toolbar. This edits only the TOC of EPUB or AZW3
theducks is online now   Reply With Quote
Advert
Old 04-19-2023, 01:19 PM   #3
dunxd
Member
dunxd began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Oct 2022
Device: Kindle Paperwhite 1st Generation
I don't think I have been understood.

Yes, I am aware that I can use the TOC tool to create and edit ToCs. However, I note that when conversion to EPub happens, no ncx file is created. Only nav.xhtml is created.

If I click on the TOC tool for this book, and then immediately click Ok, tox.ncx file is created. Great, but I need to remember to do that for all my books!

My question, is there a setting that will do this automatically when converting to EPub format, so that I don't have an extra step every time?
dunxd is offline   Reply With Quote
Old 04-19-2023, 01:28 PM   #4
dunxd
Member
dunxd began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Oct 2022
Device: Kindle Paperwhite 1st Generation
Ok, if I use EPub v2 then a toc.ncx file is included after conversion. If I use EPub v3 then nax.xhtml file is included instead. When clicking the Edit ToC button and clicking ok, the tox.ncx is added. It is not required in EPub v3, but according to https://idpf.org/epub/30/spec/epub30...cx-superseded:

Quote:
EPUB 3 Publications may include an NCX (as defined in OPF 2.0.1) for EPUB 2 Reading System forwards compatibility purposes
I would like to do this when converting to EPub v3 docs - is there a way to make this happen in Calibre?
dunxd is offline   Reply With Quote
Old 04-19-2023, 02:34 PM   #5
readx
Connoisseur
readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.
 
Posts: 82
Karma: 118402
Join Date: Jul 2009
Device: Cybook Gen3
Set the Output options to epub 2 and not 3 and you will be fine
Click image for larger version

Name:	screen.png
Views:	72
Size:	52.0 KB
ID:	201139
readx is offline   Reply With Quote
Advert
Old 04-19-2023, 02:49 PM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 71,892
Karma: 122094787
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by readx View Post
Set the Output options to epub 2 and not 3 and you will be fine
Attachment 201139
But if the OP wants ePub 3, then the OP won't be fine.
JSWolf is offline   Reply With Quote
Old 04-19-2023, 06:01 PM   #7
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,114
Karma: 53500872
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 JSWolf View Post
But if the OP wants ePub 3, then the OP won't be fine.
Then they don't need a NCX
theducks is online now   Reply With Quote
Old 04-19-2023, 06:18 PM   #8
dunxd
Member
dunxd began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Oct 2022
Device: Kindle Paperwhite 1st Generation
I want EPub 3 files that contain NCX for backwards compatibility. That is allowed in the format, but not required. In the O'Reilly book EPub 3 Best Practices, the authors say:
Quote:
In order to enable an EPUB 3 to be rendered by an EPUB 2 reading system, it has to include an NCX even though it also has to have a nav to conform to EPUB 3. Until EPUB 2 reading systems have become obsolete (no sign of that in the near future), publishers generally need to include both.
It's fine to tell me that getting this automatically included in conversions isn't currently possible in Calibre. I haven't been able to find an option to enable it - but there are a lot of places to find options...
dunxd is offline   Reply With Quote
Old 04-21-2023, 03:22 AM   #9
ps67
Guru
ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.
 
Posts: 724
Karma: 7000000
Join Date: Aug 2017
Location: Italy
Device: Kindle Paperwhite, Kobo Elipsa, Pocketbook Color PB633, Inkpad Color
You can convert a a EPUB 2 into EPUB3 from Inside the editor:

Tools > Upgrade book internals.

It will ask You if You want to keep or remove the NCX index .
ps67 is offline   Reply With Quote
Old 04-21-2023, 02:30 PM   #10
dunxd
Member
dunxd began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Oct 2022
Device: Kindle Paperwhite 1st Generation
That is fine for one by one occasional conversions - I'm looking for a way to do it automatically when importing books from various different formats.
dunxd is offline   Reply With Quote
Old 06-08-2023, 11:41 AM   #11
dunxd
Member
dunxd began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Oct 2022
Device: Kindle Paperwhite 1st Generation
So why the inconsistency?

When I convert to ePub v3 manually as mentioned in the previous post, I have an option to keep or discard the NCX.
When I edit the ToC of an ePub v3 file an NCX file is created without me taking any other action.

When I set Calibre to convert to ePub v3 on import, no NCX is created and I can not find anywhere to change this behaviour.
dunxd is offline   Reply With Quote
Old 06-08-2023, 12:20 PM   #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: 42,991
Karma: 20900374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Why do you want to do this in bulk? There is no widely used EPUB 2 reader that needs it as far as I know and if there was one, you would be better of just using EPUB 2 in the first place.
kovidgoyal is offline   Reply With Quote
Old 06-08-2023, 12:59 PM   #13
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,052
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Open your epub3 ebook using the calibre editor. Under tools click Table of Contents--then edit Table of Contents If the toc looks correct then click ok. You will now have a toc.ncx file.

bernie
Quote:
Originally Posted by dunxd View Post
I have setup Calibre to convert added books to EPub format. However, I notice that this does not create a NCX ToC in the books, which is creating some issues in another project I am working on.

When I click Edit ToC for a book, and then click Ok, the NCX file is created in the EPub and the EPub then works in my project.

I would like NCX creation to happen automatically when converting to EPub, but I am not sure which option (if any) will do this. Can anyone help?
Attached Thumbnails
Click image for larger version

Name:	Screenshot at 2023-06-08 12-54-33.png
Views:	36
Size:	233.4 KB
ID:	201910   Click image for larger version

Name:	Screenshot at 2023-06-08 12-50-22.png
Views:	29
Size:	183.2 KB
ID:	201911   Click image for larger version

Name:	Screenshot at 2023-06-08 12-50-58.png
Views:	32
Size:	183.7 KB
ID:	201913  
gbm is offline   Reply With Quote
Old 06-08-2023, 05:32 PM   #14
dunxd
Member
dunxd began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Oct 2022
Device: Kindle Paperwhite 1st Generation
Not in bulk per se - I just don't want to have to do this manually each time I import one or more books.

Sure, I could use ePub v2 instead. Are you saying this is very hard to implement?
dunxd is offline   Reply With Quote
Old 06-08-2023, 09:30 PM   #15
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: 42,991
Karma: 20900374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by dunxd View Post
Not in bulk per se - I just don't want to have to do this manually each time I import one or more books.

Sure, I could use ePub v2 instead. Are you saying this is very hard to implement?
I am saying there is no point implementing it. There is no situation I know of where you need to use NCX + epub 3 where simply using epub 2 is not better. The actual content in an epub produced via conversion is identical regardless of epub 2/3.
kovidgoyal is offline   Reply With Quote
Reply

Tags
automation, epub conversion, ncx, toc problems

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why include only an NCX table of contents? Blood Black Workshop 35 09-20-2021 09:53 AM
Troubleshooting Kindle Paperwhite goes to table of contents when switching books JeremyR Amazon Kindle 8 10-21-2018 09:30 AM
How To Generate a New Table of Contents pypo Editor 2 03-02-2015 06:03 PM
Moving Table of Contents (tox.ncx) in Sigil LoabyPress Sigil 2 07-23-2012 05:19 PM
Books with TABLE OF CONTENTS dxt78 Amazon Kindle 9 12-11-2007 06:51 PM


All times are GMT -4. The time now is 07:28 AM.


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