![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Make an EPUB2 into an EPUB3
Experimenting /playing around with EPUB3
I know that I can convert epub-to-epub and select 3 for the output That replaces all class identifies with the generic "calibre-nn" and I lose my more descriptive ones 1. I don't think there is any way to avoid the class name replacement during conversion (although it'd be a nice option) 2. Is there something I can add/modify in the epub2 files or a file I could add that would make a 2 into a 3 for further Calibre editing? |
![]() |
![]() |
![]() |
#2 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,574
Karma: 14328510
Join Date: Nov 2019
Device: none
|
I've never used the plugin, but there's one for Sigil that will convert an epub2 into an epub3. Maybe it's available for the Calibre editor?
I don't know the specifics but thought it was merely a change of a few lines at the top of the file and changing its extension from html to xhtml (for all html files in the epub). But I'm sure there's more than that. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,180
Karma: 1306007
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
Tools > Upgrade book internals This won't change any of your classes. It basically adds the necessary info to your opf file, and creates an xhtml navigation file (which is mandatory for Epub3). It also removes the NCX toc, but you get it back (Tools > Table of Contents > Edit Table of Contents; then press OK without changing anything). |
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
@thiago.eec - thanks. I'll try that. Gotta be better than the 2 to 3 conversion
@hobnail - I used the Tools option and then "See What's Changed". It seems like it's changing some lines, adding/deleting files. More than I'd ever attempt manually Last edited by phossler; 11-11-2020 at 02:32 PM. |
![]() |
![]() |
![]() |
#5 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,574
Karma: 14328510
Join Date: Nov 2019
Device: none
|
When you use Calibre's Convert Books it first converts the html into a generic format, called xml, then it converts that xml into the new format, whatever it is. So in that conversion to xml lots of stuff is lost. There's a page about this in calibre's online manual.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Perfectionist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
|
Quote:
Could the NCX removal be made optional, for backward compatibility? |
|
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,118
Karma: 27110892
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,180
Karma: 1306007
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Since this is something I also wanted, and seemed simple enough, I made this PR:
https://github.com/kovidgoyal/calibre/pull/1287 Last edited by thiago.eec; 11-15-2020 at 02:54 PM. |
![]() |
![]() |
![]() |
#9 |
Perfectionist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
|
I see this option was added to Calibre 5.6. Thanks!
|
![]() |
![]() |
![]() |
#10 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 34
Karma: 130226
Join Date: Apr 2020
Device: Kindle Voyage
|
I'm not really sure that I understand the importance of NCX TOC (I'm a kindle user so maybe I should)....but how terrible is the idea of simply batch converting/upgrading all my epubs into epub3. Tnx
|
![]() |
![]() |
![]() |
#11 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,820
Karma: 143095220
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Why do you want to make an ePub 3 that's not backwards compatible? Besides, just delete the NCX. You would have to make an option to remove the NCX as it's a really bad idea to do this.
|
![]() |
![]() |
![]() |
#12 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
What you do depends on the purpose of the library and how you read the books. If this is your personal library and you will only ever use a Kindle for reading, it doesn't matter. Either can be converted to the Kindle format. If you read with something else, then you need to work out what formats they use. If you share the library, then you need to consider what they use to read with. Personally, I don't think there is any reason to do a batch conversion to ePub3. About the only reason I would do it is if were going to change to an ePub3 only app or device (I have never heard of one) or one that had a clear advantage for using ePub3. If you are doing a conversion to ePub for some other reason, then it probably won't harm to use ePub3. But, at this point, I would be retaining the NCX for the backwards compatibility. |
|
![]() |
![]() |
![]() |
#13 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 34
Karma: 130226
Join Date: Apr 2020
Device: Kindle Voyage
|
I store all/most of my ebooks in epub and then convert them into mobi or docx or whatever else I need. I almost never read in epub format except when opening in calibre. I guess was just wondering if epub3 can still convert flawlessly into other formats that need to use the TOC in some other way.
Reason for conversion? COVID19 extra free time, upgrading to better standard, having nicer file internals...dunno. |
![]() |
![]() |
![]() |
#14 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,820
Karma: 143095220
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#15 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,180
Karma: 1306007
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
I agree that just converting EPUB2 to EPUB3 gives you no advantages, because it won't code the necessary features that can make EPUB3 better. But in general, the EPUB3 format should be preferred, except for very old devices users.
Why EPUB3 should be preferred? 1) Almost all the devices* launched on the last decade or so can handle EPUB3 books. *For those that support EPUB format. 2) Provided you keep the NCX, even older devices will handle it too (although some fancy features may not work, like scripting). 3) EPUB3 offers a wider variety of options: HTML5, CSS3, MathML, media files (audio and video), scripted content, etc. 4) Better accessibility: you can use ARIA roles and descriptions, making it a lot better for impaired users. 5) Richer navigation: you can have List of Tables, Figures, Illustrations, Maps, etc... and the tradicional Table of Contents. 6) Many reading systems have specialized behavior for some epub:type attributes, like footnotes and page-list. The point is: EPUB3 will work on almost every device (backwards compatible), it can be converted very well to other formats, and have more features. In the end, there's almost no reason not to use it. Last edited by thiago.eec; 11-27-2020 at 07:36 AM. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to know if a book is epub2 or epub3 | ldmobi | Library Management | 9 | 07-17-2022 03:17 PM |
duplicate error epub3 but not epub2 | kaiaua | ePub | 3 | 05-24-2020 03:30 PM |
epub3 to epub2 | AlanHK | Sigil | 11 | 08-09-2017 05:06 AM |
Convert from epub3 to epub2 (yes, backwards) | BKh | Sigil | 23 | 05-15-2017 04:53 PM |
JAVASCRIPT support in ePub2/ePub3 | Raja1205 | ePub | 7 | 09-03-2012 06:48 AM |