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 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
Location: Philadelphia, PA
Device: 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
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,864
Karma: 13806776
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: 35,311
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, 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 offline   Reply With Quote
Old 06-15-2018, 05:10 PM   #4
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,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
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:	263
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: 35,311
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, 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 offline   Reply With Quote
Reply

Tags
classes, conversion, styles


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 06:19 PM.


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