View Single Post
Old 12-28-2016, 10:36 PM   #3
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: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
The only way I can think of to get close to what you want is through a conversion. The conversion can add, remove or change styles. But it will be exactly the same for all books using those conversion options.

As you have a Kobo ereader, you might get some of what you want through the driver. It has an option to append styles to every stylesheet in the book as they are sent. These are read from a file in the root of the device during the send-to-device process.

But, the problem with either of these, or automating a stylesheet replacement, is that the stylesheets in the books are not the same. If you replace the stylesheets in the book with a common one, you will probably still end up with a mess. I tend to edit and fix purchased books as I go. If they look clean on the device, I don't touch them. But, if there are errors of some sort, or weird formatting, I have a look. None of the stylesheets are the same. There are some common things because there are common tools (and you can always see when calibre is one of the), but none are compatible.

For example, for most, the normal paragraph has a class. This class name is different each book. And can be different for each chapter. Then, as you mention italics and bold, half the books use a span with a class for these, the others use the "i" and "b" tags, but usually have a class specified. And then there is whether the chapter headings are done with heading tags or paragraphs with different styles. If you were to replace the stylesheet in all these books with the same stylesheet, you would probably end up with even more of a mess than were you are now.

The conversion is probably the best you will do. But, it is probably depends on exactly the problem in the books. Missing italics on a Kobo ereader usually means there is an error in the stylesheet. But, it could be an error in the tags. I would suggest opening some that are causing problems in the calibre editor and running error check and seeing what it shows. Fixing those errors will probably get it displaying on the device properly. And will give you an idea of what the problems are and maybe a way to fix them all.
davidfor is offline   Reply With Quote