Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-11-2020, 12:04 PM   #1
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,085
Karma: 412718
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?
phossler is offline   Reply With Quote
Old 11-11-2020, 12:18 PM   #2
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,553
Karma: 14325282
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.
hobnail is offline   Reply With Quote
Advert
Old 11-11-2020, 12:36 PM   #3
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 961
Karma: 1183425
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by phossler View Post
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?
Calibre editor has a built-in tool for that:

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).
thiago.eec is offline   Reply With Quote
Old 11-11-2020, 02:28 PM   #4
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,085
Karma: 412718
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.
phossler is offline   Reply With Quote
Old 11-11-2020, 03:18 PM   #5
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,553
Karma: 14325282
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by phossler View Post
@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
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.
hobnail is offline   Reply With Quote
Advert
Old 11-12-2020, 10:45 AM   #6
mikapanja
Perfectionist
mikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 70
Karma: 12802
Join Date: Apr 2014
Device: none
Quote:
Originally Posted by thiago.eec View Post
Calibre editor has a built-in tool for that:

Tools > Upgrade book internals

It... creates an xhtml navigation file... 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).
@ Kovid
Could the NCX removal be made optional, for backward compatibility?
mikapanja is offline   Reply With Quote
Old 11-14-2020, 11:39 AM   #7
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: 44,207
Karma: 23446406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by mikapanja View Post
@ Kovid
Could the NCX removal be made optional, for backward compatibility?
Not something I am interested, but patches welcome.
kovidgoyal is offline   Reply With Quote
Old 11-14-2020, 01:00 PM   #8
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 961
Karma: 1183425
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by kovidgoyal View Post
Not something I am interested, but patches welcome.
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.
thiago.eec is offline   Reply With Quote
Old 11-27-2020, 12:03 AM   #9
mikapanja
Perfectionist
mikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 70
Karma: 12802
Join Date: Apr 2014
Device: none
I see this option was added to Calibre 5.6. Thanks!
mikapanja is offline   Reply With Quote
Old 11-27-2020, 05:02 AM   #10
Winnito
Enthusiast
Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.
 
Winnito's Avatar
 
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
Winnito is offline   Reply With Quote
Old 11-27-2020, 05:32 AM   #11
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: 75,421
Karma: 133807966
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.
JSWolf is online now   Reply With Quote
Old 11-27-2020, 06:16 AM   #12
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Winnito View Post
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
The NCX ToC is an ePub2 requirement for navigation. In ePub3, this has changed to something else. But, ePub3 is largely backwards compatible with ePub2 and can be read using a reading app or device that does not understand ePub3. But, if the NCX does not exist, these apps/devices may not be able to open the books. Or, if they can, will not be to navigate through the book. You will probably be able to read from the start to end of the book, but won't be able to skip to another chapter.

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.
davidfor is offline   Reply With Quote
Old 11-27-2020, 06:21 AM   #13
Winnito
Enthusiast
Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.Winnito can tell if an avocado is ripe without touching it.
 
Winnito's Avatar
 
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.
Winnito is offline   Reply With Quote
Old 11-27-2020, 06:39 AM   #14
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: 75,421
Karma: 133807966
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 Winnito View Post
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.
Just a plain ePub 2 > ePub 3 actually gives you no advantages and does not give you nicer code or better standards. Actually, ePub 2 is better supported overall.
JSWolf is online now   Reply With Quote
Old 11-27-2020, 07:33 AM   #15
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 961
Karma: 1183425
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.
thiago.eec is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 05:56 PM.


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