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 06-14-2018, 09:06 PM   #1
mjdz
Junior Member
mjdz knows what time it ismjdz knows what time it ismjdz knows what time it ismjdz knows what time it ismjdz knows what time it ismjdz knows what time it ismjdz knows what time it ismjdz knows what time it ismjdz knows what time it ismjdz knows what time it ismjdz knows what time it is
 
Posts: 2
Karma: 2010
Join Date: Jun 2016
Device: iPhone, Samsung Tablet, Windows PC
Calibre Conversion Removes Original Paragraph Styles

When I convert an E-Book to the ePUB format from some other format (Mobi or AZW3, for example), Calibre creates a completely brand new set of paragraph styles, and it also adds a set of Calibre style classes. All of the original paragraph styles are removed from the converted E-Book.

Often, there are so many new Calibre paragraph style codes (Calibre2 through Calibre30, for example), that editing the new ePUB book is nearly impossible for me. I can't figure out which Calibre styles are for Heading1, Heading2, the Table of Contents, and the body text.

Also, I don't understand why there must be Calibre style classes as well as Calibre paragraph styles.

Question: Is there any way to make Calibre just accept the original paragraph style names, leaving those names alone while converting a book to ePUB? This would make life so much easier.

Thanks for your help.
mjdz is offline   Reply With Quote
Advert
Old 06-15-2018, 01:27 AM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,571
Karma: 13662888
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by mjdz View Post
Question: Is there any way to make Calibre just accept the original paragraph style names, leaving those names alone while converting a book to ePUB?
I may be wrong, but to the best of my understanding the answer to your question is no.
DoctorOhh is offline   Reply With Quote
Old 06-15-2018, 03:29 PM   #3
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 4,487
Karma: 21301182
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Aura One, Aura H2O, Aura HD, Nexus 7 HD, iPad Air, Tolino epos
Quote:
Originally Posted by mjdz View Post
When I convert an E-Book to the ePUB format from some other format (Mobi or AZW3, for example), Calibre creates a completely brand new set of paragraph styles, and it also adds a set of Calibre style classes. All of the original paragraph styles are removed from the converted E-Book.

Question: Is there any way to make Calibre just accept the original paragraph style names, leaving those names alone while converting a book to ePUB? This would make life so much easier.
For AZW3 format, you can try the KindleUnpack plugin for calibre.
DNSB is online now   Reply With Quote
Old 06-15-2018, 05:10 PM   #4
jackie_w
Wizard
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: 4,320
Karma: 9528437
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, Kobo AuraHD/Aura6"/H2O/GloHD/KA1/ClaraHD
Quote:
Originally Posted by mjdz View Post
Question: Is there any way to make Calibre just accept the original paragraph style names, leaving those names alone while converting a book to ePUB? This would make life so much easier.
It all depends on the styles contained in your source book.

Someone feel free to contradict me if I've got any of the following wrong.

A mobi does not contain any style class names so a mobi->epub conversion has no choice other than create new class names for the epub, usually "calibren" plus "bold" and "italic" as span classes.

Calibre always assigns a class to 'bare' tags, e.g. <body> or <h2> will end up as <body class="calibren"> and <h2 class="calibren"> after conversion.

Calibre always flattens CSS so it will not retain styling like p+p {text-indent:1em} or h2>p{...}. They will be converted to new calibren classes.

And also ... I think if calibre finds, say, 5 style class names, all with the same style content, 4 of the class names will be removed during conversion and the first class name used for all of them.

Other than the above my experience is that these days calibre does a reasonable job of trying to retain style class names. For example, see the attached image of a Before vs. After analysis of tag/class combos after an epub->epub conversion of a random book in my library.
Attached Thumbnails
Click image for larger version

Name:	style_classes_KDiff.jpg
Views:	25
Size:	209.6 KB
ID:	164481  
jackie_w is offline   Reply With Quote
Old 06-16-2018, 01:21 AM   #5
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 4,487
Karma: 21301182
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Aura One, Aura H2O, Aura HD, Nexus 7 HD, iPad Air, Tolino epos
Quote:
Originally Posted by jackie_w View Post
And also ... I think if calibre finds, say, 5 style class names, all with the same style content, 4 of the class names will be removed during conversion and the first class name used for all of them.

Other than the above my experience is that these days calibre does a reasonable job of trying to retain style class names. For example, see the attached image of a Before vs. After analysis of tag/class combos after an epub->epub conversion of a random book in my library.
As near as I've been able to tell, calibre will happily create multiple near identical classes. A bit of renaming and deleting unused classes cleans that up with relatively little effort. Ditto for the <div> tags that calibre is overly fond of.
DNSB is online now   Reply With Quote
Reply

Tags
classes, conversion, styles

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to keep paragraph indents in Calibre epub>docx conversion? Gregg Bell Conversion 3 02-09-2017 07:40 PM
I lose paragraph spacing in epub>docx Calibre conversion Gregg Bell Conversion 9 02-09-2017 07:40 PM
Conversion removes all my edits in book LucyOne Conversion 2 04-16-2014 05:45 AM
Mobi conversion removes borders Hekate Conversion 6 08-21-2013 10:11 AM
Question: paragraph spacing and CSS styles rhino79 ePub 3 05-06-2013 05:06 PM


All times are GMT -4. The time now is 11:30 AM.


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