Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 08-03-2013, 01:21 AM   #166
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 1,351
Karma: 2619999
Join Date: Nov 2012
Location: New Zealand
Device: Kobo Glo
I think you need to use something like
Code:
p {line-height:1.0 !important}
unless you want to go through and remove the existing line-height directives.

However setting one fixed line height will seriously mess up a lot of books that use drop caps, small caps, etc. It is probably better to edit each book individually rather then try to use one rule for all.
GeoffR is offline   Reply With Quote
Old 08-03-2013, 03:28 AM   #167
davidfor
Wizard
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: 4,993
Karma: 4808702
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
Yes, as GeoffR says, editing the book and fixing this in the CSS is the best way to go. But, I can understand people not wanting to do that.

Forcing it like this could easily mess up other formatting. I would sat that is at least part of the reason that Kobo setting adjustments work the way they do.

I'm not sure about the "!important". I have had one report that it broke the CSS completely. But, with my quick and dirty tests, everything was OK.
davidfor is offline   Reply With Quote
Old 08-03-2013, 06:20 AM   #168
speakingtohe
Wizard
speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.
 
Posts: 4,586
Karma: 25107878
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
Quote:
Originally Posted by davidfor View Post
Using the CSS that jackie_w posted, was added to the stylesheet OK. But, it didn't do what you wanted.

I think the problem is the CSS rules. A calibre conversion creates style rules like:

Code:
.calibre2 {
    color: maroon;
    display: block;
    font-size: 2em;
    font-weight: 100;
    line-height: 200%;
    margin-bottom: 0.67em;
    margin-left: 0;
    margin-right: 0;
    margin-top: 3em;
    text-align: center
    }
Each of these are used with a tag. And each is used with only one tag. Exactly which tag the number style is used with depends on the formatting of the book. As some of the styles are used with the body, some with a paragraph and some with other tags, using "body.calibre2" will not work if "calibre2" is only used with a paragraph. Or at least, that is my understanding of CSS. Inspecting the epub like you have and seeing the style crossed out, supports this.

Try:

Code:
body, p, .calibre, .calibre1, .calibre2, .calibre3, .calibre4, body.book, body.epub {
line-height: 1.0
}
The only question is how many ".calibreXX" styles to put in. I have seen over 30 after a conversion.

Its possible that "p.calibre1" should be used. That should mean overriding the line-height only when the .calibreXX is used in a paragraph tag.
I will try that tomorrow. The main text in the epub was calibre5 and I could change line-height in the stylesheet.css using tweak and it would work fine.

As I said I am not at all strong in CSS. Just learn little bits when I have to

Just as an aside, line-height would be a very useful thing to have it change universally for many people IMO.

It is a great idea overall though.

Helen
speakingtohe is offline   Reply With Quote
Old 08-03-2013, 06:43 AM   #169
speakingtohe
Wizard
speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.
 
Posts: 4,586
Karma: 25107878
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
I do manage to convert most of my files as I want them using conversion settings or tweak pretty easily.

I have a vision impaired friend though and I thought this might be an easy way to do it all at once for him. Plus it could very nice for us with different brands of readers that only need to change things for the kobos.

Thanks for all of your great efforts and the outstanding support.

Helen
speakingtohe is offline   Reply With Quote
Old 08-03-2013, 06:47 AM   #170
davidfor
Wizard
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: 4,993
Karma: 4808702
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
Quote:
Originally Posted by speakingtohe View Post
Just as an aside, line-height would be a very useful thing to have it change universally for many people IMO.
Kobo's line height handling isn't popular. But stripping it completely could cause problems with display. What I've suggested seems to work here and will solve the worst problems. If it doesn't work for you, can you send me a sample epub?
davidfor is offline   Reply With Quote
Old 08-03-2013, 08:17 AM   #171
jackie_w
Wizard
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: 2,704
Karma: 3818505
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"
I see it got lively whilst I've been asleep!

@speakingtohe, Try googling 'CSS Specificity' if you want to know more about the problems being discussed here. But I warn you, it isn't a gripping page-turner The other problem is that even if you do have a perfect understanding of specificity it doesn't mean that it's possible to create something in the extra_css which will work for all your epubs. It will just help you understand why it's not helping - not much consolation.

@Geoff, David, I have previously tried the p {line-height 1.0 !important} trick but it resulted in the whole epub being displayed as if it didn't have a css file. I've just tried again with 3 random epubs - same result for all of them. Have you tried it with success? I had assumed (perhaps wrongly) that the !important in the extra_css may be conflicting with the several !importants Kobo have hard-coded in the fw (libnickel.so.1.0.0)

I don't see how it's possible to predict all the class names that may be assigned to any epub's 'standard paragraph' let alone every epub's standard paragraph.

Whether the plugin should allow line-height to be treated exactly the same way it does widows/orphans and @page - I'm not sure. I know I wouldn't use it because of the display problems Geoff pointed out -- but as long as users are told the pitfalls... People like me just wouldn't add a line-height setting in the extra_css and those with a strong preference the other way would.

P.S I forgot to say that the reason I included body.calibre, body.calibre1,... etc in my suggestion is that it's slightly easier to hazard a guess at the class calibre might use with the <body> tag. However, if you do conversions of conversions of conversions... maybe the calibrenn class just keeps increasing into double figures. Of course, my suggestion is only going to work if there aren't any line-heights set lower down the chain on <p>, <div> or even <blockquote> classes.

Last edited by jackie_w; 08-03-2013 at 08:33 AM.
jackie_w is online now   Reply With Quote
Old 08-03-2013, 09:01 AM   #172
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,262
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
@ All
calibre# styles are NOT universal (the specific number could be for any purpose within the book), so a brute-force, blanket solution will most likely mess something up within the book.

speakingtohe had one solution (the one I use: hand edit the CSS based upon what I see as usage in the book.)
Calibre conversion settings does have a Line-Height setting.

But 1.0 OMG
the lines almost touch each other on my PEz. Default (none) is what I mostly use except for when Charis font is used, then I must explicitly set 1.2 or the line spacing gets really wide.
theducks is offline   Reply With Quote
Old 08-03-2013, 09:18 AM   #173
jackie_w
Wizard
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: 2,704
Karma: 3818505
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"
Quote:
Originally Posted by theducks View Post
But 1.0 OMG the lines almost touch each other on my PEz.
From a personal POV I have to agree with you but you wouldn't believe how much forum sound & fury has been generated by the fact that 1.0 isn't available on the Kobo line-height slider. Unfortunately Kobo's defaults run from 1.3 to 3.0. 1.3 is rather high for a minimum. As for 3.0, words fail me...

I think we all know that hand-editing every epub is the only guaranteed flawless solution but most people don't want to take the time, which is hardly surprising.
jackie_w is online now   Reply With Quote
Old 08-03-2013, 09:39 AM   #174
speakingtohe
Wizard
speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.
 
Posts: 4,586
Karma: 25107878
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
Generally I like 1.1 and that is what my conversion setting is. 1.2 is fine except for some fonts and even there I don't care enough to reconvert, reload etc. I just change the font on the reader where available or carry on reading. 1-3 more lines per page is not a big deal to me.

But for my vision impaired friend with a big font, it seems he likes 1.0 and it often gives that one more line per page. With only a few lines per page one more is a lot

Helen
speakingtohe is offline   Reply With Quote
Old 08-03-2013, 09:45 AM   #175
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,262
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by jackie_w View Post
From a personal POV I have to agree with you but you wouldn't believe how much forum sound & fury has been generated by the fact that 1.0 isn't available on the Kobo line-height slider. Unfortunately Kobo's defaults run from 1.3 to 3.0. 1.3 is rather high for a minimum. As for 3.0, words fail me...

I think we all know that hand-editing every epub is the only guaranteed flawless solution but most people don't want to take the time, which is hardly surprising.
It takes me 2 minutes to fine tune a well crafted EPUB using a set of Saved CSS fragment clips and REGEX to modify or remove, IMHO unnecessary, attribute duplication.

Unfortunately, not all EPUBs are well crafted.
Coding nightmare would be a better description for some, with major stylistic inconsistencies from file to file within the book (and they actually charged money for the mess that was delivered to the customer (me). I have seen beautifully done FREE books. Beautiful in both Look and coding )

Last edited by theducks; 08-03-2013 at 09:49 AM. Reason: typo
theducks is offline   Reply With Quote
Old 08-03-2013, 10:12 AM   #176
jackie_w
Wizard
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: 2,704
Karma: 3818505
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"
Quote:
Originally Posted by theducks View Post
It takes me 2 minutes to fine tune a well crafted EPUB using a set of Saved CSS fragment clips and REGEX to modify or remove, IMHO unnecessary, attribute duplication.
Unfortunately the number of CSS-challenged users is exceeded by the number of REGEX-challenged users
jackie_w is online now   Reply With Quote
Old 08-03-2013, 10:24 AM   #177
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,262
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by jackie_w View Post
Unfortunately the number of CSS-challenged users is exceeded by the number of REGEX-challenged users
I give you REGEX. That is arcane

But edit(not create) a CSS?
It is mostly plain (US)English:
font-weight
font-style
margin-left
line-height
text-indent
text-align
color
border
padding
theducks is offline   Reply With Quote
Old 08-03-2013, 10:52 AM   #178
jackie_w
Wizard
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: 2,704
Karma: 3818505
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"
Quote:
Originally Posted by speakingtohe View Post
But for my vision impaired friend with a big font, it seems he likes 1.0 and it often gives that one more line per page. With only a few lines per page one more is a lot
Has your friend tried setting the calibre convert filter style option?
Convert - Look&Feel - Filter Style Info tab - Other CSS Properties set to line-height. This should remove all line-heights from the epub during the conversion.

I don't use it myself as I prefer the hand-edit approach but, on the same Look&Feel page, I do also have both the Minimum line height and Line Height boxes set to zero as I don't want to risk calibre adding even more unwanted line-heights.

Once all existing line-heights have been removed then a simple
div, p , blockquote {line-height: 1.0}
in the kobo_extra.css file should work for most epubs, with the caveat that Dropcaps and long chapter headings may no longer look too good.
jackie_w is online now   Reply With Quote
Old 08-03-2013, 08:38 PM   #179
davidfor
Wizard
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: 4,993
Karma: 4808702
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
Quote:
Originally Posted by jackie_w View Post
I see it got lively whilst I've been asleep!
As they say, you snooze you lose. But, now I have to catch up.
Quote:
@Geoff, David, I have previously tried the p {line-height 1.0 !important} trick but it resulted in the whole epub being displayed as if it didn't have a css file. I've just tried again with 3 random epubs - same result for all of them. Have you tried it with success? I had assumed (perhaps wrongly) that the !important in the extra_css may be conflicting with the several !importants Kobo have hard-coded in the fw (libnickel.so.1.0.0)
I tried this last night and it did what you said. I had tried "!important" on something else without problems. I will have to try some other settings to see what happens.
Quote:
I don't see how it's possible to predict all the class names that may be assigned to any epub's 'standard paragraph' let alone every epub's standard paragraph.

Whether the plugin should allow line-height to be treated exactly the same way it does widows/orphans and @page - I'm not sure. I know I wouldn't use it because of the display problems Geoff pointed out -- but as long as users are told the pitfalls... People like me just wouldn't add a line-height setting in the extra_css and those with a strong preference the other way would.
It's a thought, but I think it is more likely to have bad side effect than the widows/orphans.
Quote:
P.S I forgot to say that the reason I included body.calibre, body.calibre1,... etc in my suggestion is that it's slightly easier to hazard a guess at the class calibre might use with the <body> tag. However, if you do conversions of conversions of conversions... maybe the calibrenn class just keeps increasing into double figures. Of course, my suggestion is only going to work if there aren't any line-heights set lower down the chain on <p>, <div> or even <blockquote> classes.
Ok, but from looking at converted books, it won't help. Each generated class is only used for one type of tag. And the number increases as you go through the book. The body for the first file is always "calibre". I'm not sure if I have seen a second class generated for the body. If the conversion is setting line-height, it is set in the class used by the paragraph. That means overriding it could be a problem. I suppose adding "p.calibreNN" for the first 10 or even 20 numbers would catch most. And it shouldn't have a bad effect on the non paragraph uses of the lass.

Last edited by davidfor; 08-03-2013 at 08:43 PM.
davidfor is offline   Reply With Quote
Old 08-03-2013, 09:00 PM   #180
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,262
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
David
I have seen as many as 3 classes for body in a single CSS

calibre
calibre3

are the most common.

I am trying to remember if I have ever see a double digit body class one
theducks is offline   Reply With Quote
Reply

Tags
kobo

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
firmware update for kobo netronix device JDC Netronix 0 09-24-2012 11:10 AM
Error communicating with device - Kobo eReader after 0.8.56 update PoignantTuna Devices 3 06-21-2012 05:48 AM
[Device Interface Plugin] Update for Nook Color Driver jmricker Plugins 0 10-22-2011 10:11 AM
Kobo Desktop erased entire device database! - Don't dowload update MrsJoseph Kobo Reader 9 03-23-2011 11:38 AM
Sync Problems- Device status doesn't update to Kobo desktop... Wipes my bookmarks dashto Kobo Reader 1 11-26-2010 01:35 PM


All times are GMT -4. The time now is 04:53 PM.


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