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 01-12-2014, 07:05 AM   #1
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Question force an addition to main body css ?

via calibre extra css, I want to force the line
adobe-text-layout: optimizeSpeed;
to be added into the main body class

i.e. the class that typically appears at the start of each chapter as
<body class="calibre">
after a conversion

I am not quite sure of the syntax ?

I know this extra CSs entry will work for p class
p { adobe-text-layout: optimizeSpeed; }

so do I just replace "p" with "body" or is it not quite that simple ?

the reason for wanting this is to prevent hyphenation in e-readers that use ADE2 engine - like my new Sony T3. I read that it is useful also for some Nook devices - tha this how I found it.
cybmole is offline   Reply With Quote
Old 01-12-2014, 08:22 AM   #2
aleyx
Addict
aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.
 
Posts: 250
Karma: 20386
Join Date: Sep 2010
Location: France
Device: Bookeen Diva, Kobo Clara BW
Quote:
Originally Posted by cybmole View Post
so do I just replace "p" with "body" or is it not quite that simple ?
It is that simple.
aleyx is offline   Reply With Quote
Old 01-12-2014, 08:33 AM   #3
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
thanks - now is there an equally simple way to add it retrospectively to a few hundred previously-read books that I have in calibre library ?.

As I recall, each converted book stores the extra CSS used at the time so I'd have to zap that somehow & reconvert with only this 1 change ?

or is there a better way - reconverting each book seems like overkill ?
cybmole is offline   Reply With Quote
Old 01-12-2014, 08:47 AM   #4
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
related question. where I have a previosuly read book. I will have both epub and original-epub in calibre library. the latter is my pre-tweaked version that I prefer to leave untouched.

( my work flow for any book I want to read is to add book to Calibre library & immediately convert it , epub to epub, - thus creating a backup, before I do any format editing. that way I can always get back to the original ( de-Drmed but that's all) version if ever I need to. I never then re-convert I tweak as needed via sigil or the new calibre editor.

if I were to now reconvert such a book, what is used as the source - the epub or the original-epub? & can I influence that e.g. by temporarily turning off the "make an original-epub backup" feature ( assuming I can remember where to do that ? )

UPDATE - answering my own question. modify epub - tick only " append CSS" - ( with just this 1 line of CSS in my default common options calibre preferences - seems to do the trick, and works on batches of books.

Last edited by cybmole; 01-12-2014 at 09:29 AM.
cybmole is offline   Reply With Quote
Old 01-12-2014, 04:15 PM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Instead of converting everything, I recommend you use the Modify ePub plugin which comes with numerous fascinating features for doing an in-place modification of an ePub WITHOUT resorting to a full conversion. Conversions do all kinds of changes, not al of which you may like.

Specifically, the "append extra css" setting.

And Modify ePub settings for css are drawn from the defaults, not the saved conversion settings, if I understand it correctly.
eschwartz is offline   Reply With Quote
Old 01-17-2014, 02:35 AM   #6
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
i observe that append CSS option in modify epub adds duplicate code to both page-styles.css and stylesheets.css. stylesheet validation checks then fail e.g.

Property adobe-hyphenate doesn't exist : none

if I manually remove the additions only from page-styles.css than validation works OK - so the above line validates in stylesheets.css but not in page-styles.css

will have this duplicate code inserted lead to other problems i.e. is it safer not to do this

& is this a bug: should append really be adding code to 2 places, not just 1 ?
cybmole is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding body style to Extra CSS does nothing Barty Conversion 7 10-23-2013 11:06 PM
Glo Referencing to a CSS file on the main level of the device ibu Kobo Reader 0 09-06-2013 04:26 PM
Force a CSS Refresh? zephyrmays Sigil 15 02-03-2013 12:53 PM
How to change the font-size in the body tag in css? naisren Conversion 2 10-01-2012 05:52 PM
main menu, section menu, css for calibre mobipocket output naisren Calibre 2 08-23-2010 11:42 PM


All times are GMT -4. The time now is 09:22 AM.


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