View Single Post
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,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
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:	311
Size:	209.6 KB
ID:	164481  
jackie_w is offline   Reply With Quote