View Single Post
Old 01-31-2011, 03:41 AM   #16
sherman
Addict
sherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animals
 
Posts: 265
Karma: 6566
Join Date: Aug 2008
Location: New Plymouth - NZ
Device: Sony PRS-505/SC, B&N Nook, Sony PRS-650/BC, Kobo Glo
Tweak/fix epub css and/or xpgt

Hi folks.

Well, when I purchase a book, I like to retain all it's formatting and don't like doing an epub-to-epub conversion. However, most publishers don't do a "perfect" epub (in my opinion) and usually require a few css and xpgt tweaks before I load it on to my reader.

However, the publishers use a master template, so the changes I like to make to one book are identical to any other book by that publisher. This of course gets very repetitive very quickly...

So I was wondering if it were possible if someone was interested in making a plugin that would open an epub, run a series of find/replace operations on the css and xpgt files within and repackage the epub -- basically an "automated" Tweak Epub feature.

Example:
For some reason, Penguin books scale down the fonts by one "size". so a typical body paragraph has the following style
Code:
.tx {
font-size: small;
text-align: justify;
text-indent: 15px;
}
So therefore, when I make my alterations x-large becomes xx-large, large to x-large, medium to large, delete small, x-small to small, xx-small to x-small. I also like to change the indent to around 1.3em.

I also like to change the margins in the page-template.xpgt to 5px.



Any thoughts?
sherman is offline   Reply With Quote