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 02-28-2019, 03:16 PM   #1
tbrosz
Member
tbrosz is on a distinguished road
 
Posts: 15
Karma: 50
Join Date: Aug 2012
Device: Kindle keyboard
Incorporating NCX file into Epub3 book for backward compatibility

I am getting requests for Epub3 files that still have an NCX file for backward compatibility. I am converting from original .docx files, with a simple hyperlink TOC added for in-book use. The converter uses "Heading1" and other signals to build the actual Epub3 TOC in the nav.xhtml file.

While the Epub3 conversion works well except for some minor after-conversion .xhtml edits needed, there doesn't seem to be any conversion option to seamlessly add an additional NCX file during the conversion process.

I can tack an NCX file into the book using the TOC editor, but EpubCheck 4.1.1 has problems with it, and it reads in the Calibre viewer as two consecutive TOCs.

Could the Calibre converter maybe add an option somewhere for "add NCX file to Epub3 for backward compatibility?" Or is there already one somewhere I've missed, like a plug-in?
tbrosz is offline   Reply With Quote
Old 02-28-2019, 04:58 PM   #2
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Deleted. Sorry... I missed the bit where you said you'd already tried the calibre TOC Editor.

I just tried adding an NCX to an epub3 using the TOC Editor. EpubCheck 4.1.1 doesn't have any problems with it and neither does the calibre Viewer.

Last edited by jackie_w; 02-28-2019 at 05:04 PM.
jackie_w is offline   Reply With Quote
Advert
Old 02-28-2019, 05:08 PM   #3
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,693
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@tbrosz - I was about to suggest trying the ToC editor in Sigil, but I see jackie's updated her post.

But it might be worth a try if you can't get calibre to do it.

BR
BetterRed is online now   Reply With Quote
Old 02-28-2019, 09:26 PM   #4
tbrosz
Member
tbrosz is on a distinguished road
 
Posts: 15
Karma: 50
Join Date: Aug 2012
Device: Kindle keyboard
Quote:
Originally Posted by jackie_w View Post
Deleted. Sorry... I missed the bit where you said you'd already tried the calibre TOC Editor.

I just tried adding an NCX to an epub3 using the TOC Editor. EpubCheck 4.1.1 doesn't have any problems with it and neither does the calibre Viewer.
Which specific box did you click on the "Generate TOC" commands?
tbrosz is offline   Reply With Quote
Old 02-28-2019, 09:27 PM   #5
tbrosz
Member
tbrosz is on a distinguished road
 
Posts: 15
Karma: 50
Join Date: Aug 2012
Device: Kindle keyboard
Quote:
Originally Posted by BetterRed View Post
@tbrosz - I was about to suggest trying the ToC editor in Sigil, but I see jackie's updated her post.

But it might be worth a try if you can't get calibre to do it.

BR
When I opened the file in Sigil, it actually automatically added an NCX file. Calibre didn't seem to like it, though, when I opened it over there again. I'm still exploring this.
tbrosz is offline   Reply With Quote
Advert
Old 03-01-2019, 07:21 AM   #6
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by tbrosz View Post
Which specific box did you click on the "Generate TOC" commands?
I think you're over-complicating it If you open the TOC of the epub3-with-no-NCX with the calibre TOC Editor then you don't need to 'Generate' anything. Just immediately re-save it by pressing the 'OK' button. Calibre will auto-magically create an NCX which matches the NAV and do any necessary housekeeping (e.g. OPF update).
jackie_w is offline   Reply With Quote
Old 03-01-2019, 12:45 PM   #7
tbrosz
Member
tbrosz is on a distinguished road
 
Posts: 15
Karma: 50
Join Date: Aug 2012
Device: Kindle keyboard
Quote:
Originally Posted by jackie_w View Post
I think you're over-complicating it If you open the TOC of the epub3-with-no-NCX with the calibre TOC Editor then you don't need to 'Generate' anything. Just immediately re-save it by pressing the 'OK' button. Calibre will auto-magically create an NCX which matches the NAV and do any necessary housekeeping (e.g. OPF update).
Holy smoking flatfish. That worked.

I have an NCX file, it passes the online Validator check, and it reads normally in the viewer.

Talk about a hidden feature! I spent hours sweeping the menus for a button or a conversion setting to specifically do this.

I will run this through to the publisher and see if it works for them. You are my hero of the day. How did you find this out in the first place?
tbrosz is offline   Reply With Quote
Old 03-01-2019, 01:25 PM   #8
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,713
Karma: 5703586
Join Date: Nov 2009
Device: many
FWIW, Sigil will createan empty NCX for any epub3 without one, and there is a single epub3 menu "Generate NCX from Nav" thay you can use to populate that empty NCX right before saving if you so desire.
KevinH is offline   Reply With Quote
Old 03-01-2019, 02:50 PM   #9
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by tbrosz View Post
How did you find this out in the first place?
Mostly just by using the calibre Editor to edit/cleanup an awful lot of personal epubs. Glad it worked for you
jackie_w is offline   Reply With Quote
Old 05-03-2023, 11:24 AM   #10
ydonse
Member
ydonse began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Oct 2021
Device: none
Awesome, it worked for me as well.
However i would like Calibre to generate it when I convert a docx to epub through cli. Do anyone know if it is possible ?
ydonse is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
table of content file link not add in toc.ncx file bhambhu Conversion 0 01-14-2016 01:40 AM
Help with toc.ncx file please AlexBell ePub 7 09-04-2013 02:11 AM
ncx file to html/xhtml file javochase Conversion 1 06-23-2011 06:57 PM
EPUB3 Compatibility dpayment PocketBook 18 06-19-2011 08:33 AM


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


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