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

Go Back   MobileRead Forums > Miscellaneous > Archive > OpenInkpot

Notices

 
 
Thread Tools Search this Thread
Old 06-20-2010, 01:47 PM   #1
mr ploppy
Feral Underclass
mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.
 
mr ploppy's Avatar
 
Posts: 3,622
Karma: 26821535
Join Date: Jan 2010
Location: Yorkshire, tha noz
Device: 2nd hand paperback
Smashwords on OI running on Hanvon N516

I have my defaults set to justified text with no indent at the beginning of a paragraph. Every book I get from Smashwords over rides this setting and has text left aligned with an indent. If I change the css to say align justify and indent 0 it loses all the space between paragraphs.

This is the css from one of them:

@namespace h "http://www.w3.org/1999/xhtml";
.c {
color: #000;
direction: ltr;
display: block;
font-weight: bold;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 1em;
orphans: 0;
text-align: left;
text-indent: 0.5in;
widows: 0
}
.c1 {
font-style: italic
}
.calibre {
color: #000;
display: block;
font-size: 1.125em;
margin-bottom: 0;
margin-left: 5pt;
margin-right: 5pt;
margin-top: 0;
page-break-before: always;
text-align: justify
}
.calibre1 {
display: block
}
.calibre2 {
border: 1px inset;
color: gray;
display: block;
height: 2px;
margin-bottom: 0.5em;
margin-left: auto;
margin-right: auto;
margin-top: 0.5em
}
.calibre3 {
color: #000;
direction: ltr;
display: block;
margin-bottom: 0.08in;
margin-left: 0;
margin-right: 0;
margin-top: 1em;
orphans: 0;
text-align: left;
widows: 0
}
.western {
color: #000;
direction: ltr;
display: block;
font-family: "Times New Roman", serif;
font-size: 0.88889em;
font-weight: bold;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 1em;
orphans: 0;
so-language: en-US;
text-align: left;
text-indent: 0.5in;
widows: 0
}
.western1 {
color: #000;
direction: ltr;
display: block;
font-family: "Times New Roman", serif;
font-size: 0.88889em;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 1em;
orphans: 0;
so-language: en-US;
text-align: left;
text-indent: 0.5in;
widows: 0
}
.western2 {
color: #000;
direction: ltr;
display: block;
font-family: "Times New Roman", serif;
font-size: 0.88889em;
line-height: 150%;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 1em;
orphans: 0;
so-language: en-US;
text-align: left;
text-indent: 0.5in;
widows: 0
}
.western3 {
color: #000;
direction: ltr;
display: block;
font-family: "Times New Roman", serif;
font-size: 0.88889em;
line-height: 0.14in;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 1em;
orphans: 0;
so-language: en-US;
text-align: left;
text-indent: 0.5in;
widows: 0
}
.western4 {
color: #000;
direction: ltr;
display: block;
font-family: "Times New Roman", serif;
font-size: 0.88889em;
font-style: italic;
line-height: 0.14in;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 1em;
orphans: 0;
so-language: en-US;
text-align: left;
text-indent: 0.5in;
widows: 0
}
.western5 {
color: #000;
direction: ltr;
display: block;
font-family: "Times New Roman", serif;
font-size: 0.88889em;
font-style: italic;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 1em;
orphans: 0;
so-language: en-US;
text-align: left;
text-indent: 0.5in;
widows: 0
}
a {
color: inherit;
text-decoration: inherit;
cursor: default
}
a[href] {
color: blue;
text-decoration: underline;
cursor: pointer
}
mr ploppy is offline  
Old 06-21-2010, 06:08 AM   #2
sourcejedi
Groupie
sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.
 
sourcejedi's Avatar
 
Posts: 155
Karma: 200000
Join Date: Dec 2009
Location: Britania
Device: Android
And what is your actual question? .

Do you want to hand-edit the CSS to replace the indents with vertical space? If so, then you want to set the "margin-bottom" property, no?

Alternatively you could run it through Calibre a second time . I believe Calibre allows you to configure paragraph formatting (although it unfortunately lacks an option for "strip the explicit formatting and let my e-reader decide, damnit").

Last edited by sourcejedi; 06-21-2010 at 06:10 AM.
sourcejedi is offline  
Advert
Old 06-21-2010, 06:14 AM   #3
mr ploppy
Feral Underclass
mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.
 
mr ploppy's Avatar
 
Posts: 3,622
Karma: 26821535
Join Date: Jan 2010
Location: Yorkshire, tha noz
Device: 2nd hand paperback
No, I was just wondering why that css would over ride the defaults I have set in OI and not let OI change them back again. It is something that only happens with Smashword books.
mr ploppy is offline  
Old 06-21-2010, 06:14 AM   #4
sourcejedi
Groupie
sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.
 
sourcejedi's Avatar
 
Posts: 155
Karma: 200000
Join Date: Dec 2009
Location: Britania
Device: Android
Btw I've noticed the same issue with FBReader myself - that there's no way to disable CSS - and it does annoy me too. If you're just trying to highlight this issue, then I'm right behind you .
sourcejedi is offline  
Old 06-21-2010, 06:22 AM   #5
sourcejedi
Groupie
sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.
 
sourcejedi's Avatar
 
Posts: 155
Karma: 200000
Join Date: Dec 2009
Location: Britania
Device: Android
Ah. Well, I think it's a general issue with CSS really. The FBReader settings only affect the default style. When the ebook includes CSS, that CSS overrides the default. AIUI, all Smashwords books use CSS which specifies how the paragraphs will be formatted.

If you're happy with other ebooks, then either

- they don't include explicit CSS for how to display paragraphs, OR
- they do include explicit CSS, but it happens to match your preferred style


It's not immediately obvious how to resolve it in FBReader. I would worry that if it tried to selectively ignore CSS, it would break if there was special styling in order to present poems... or if CSS is used to show scene breaks / "thought breaks" using extra space between paragraphs... that sort of thing.

Last edited by sourcejedi; 06-21-2010 at 06:31 AM.
sourcejedi is offline  
Advert
Old 06-21-2010, 08:10 AM   #6
mr ploppy
Feral Underclass
mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.mr ploppy ought to be getting tired of karma fortunes by now.
 
mr ploppy's Avatar
 
Posts: 3,622
Karma: 26821535
Join Date: Jan 2010
Location: Yorkshire, tha noz
Device: 2nd hand paperback
The ones that I make myself will have my preferred layout, but others won't. Being able to strip the paragraph indents without having to change the css was one of the things that attracted me to OI, and does work in other ebooks even if that is set in css.

Also, with the Smashwords, some of the format defaults change, whereas some don't. The css has the font set to Times/serif, but still displays in Arial for me. And the size setting in the css is ignored.
mr ploppy is offline  
Old 06-21-2010, 09:19 AM   #7
sourcejedi
Groupie
sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.
 
sourcejedi's Avatar
 
Posts: 155
Karma: 200000
Join Date: Dec 2009
Location: Britania
Device: Android
Quote:
Originally Posted by mr ploppy View Post
The ones that I make myself will have my preferred layout, but others won't. Being able to strip the paragraph indents without having to change the css was one of the things that attracted me to OI, and does work in other ebooks even if that is set in css.
In that case I don't know what FBReader is trying to do. I might find out, but it'd take some time. Sorry if I've wasted yours.


Quote:
Originally Posted by mr ploppy View Post
Also, with the Smashwords, some of the format defaults change, whereas some don't. The css has the font set to Times/serif, but still displays in Arial for me. And the size setting in the css is ignored.
I would expect that . I wouldn't trust fonts to work 100% - either because OI doesn't have the exact font being requested, or because FBReader just doesn't work as the author expected. And it wouldn't surprise me if FBReader simply ignored font sizes.
sourcejedi is offline  
Old 06-22-2010, 05:08 AM   #8
sourcejedi
Groupie
sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.
 
sourcejedi's Avatar
 
Posts: 155
Karma: 200000
Join Date: Dec 2009
Location: Britania
Device: Android
Hrm, I don't think FBReader is trying to do anything fancy. I missed an option earlier -

If you're happy with other ebooks, then either
1. the ebook doesn't include explicit CSS for how to display paragraphs, OR
2. the ebook does include explicit CSS, but it happens to match your preferred style, OR
3. FBReader doesn't support the CSS used in the ebook

The parsing code in FBReader only supports a subset of CSS. For example, it only supports selectors with a single tag and/or class. E.g. "p", ".calibre1", and "p.calibre1". Rules which rely on more complex selectors are going to be ignored. I expect there are more limitations I didn't notice.

I'd be happy to have a look at an example stylesheet + document fragment where FBReader overrides the CSS. But I'm betting on case 3). I don't believe

4) "fbreader correctly understands the CSS, and then uses a heuristic to decide that it should allow user settings to override it. fbreader's heuristic needs to be improved so that it will choose to override the paragraph formatting CSS used by Smashwords".
sourcejedi is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Video of Open Inkpot running on a Hanvon n516 mr ploppy General Discussions 0 05-21-2010 01:57 PM
Long review of Azbooka N516 (Hanvon n516) igorsk News 3 02-17-2010 07:25 AM
How do I get my books onto my Hanvon N516? lene1949 Calibre 1 01-02-2010 04:31 AM
hanvon n516 jjim Calibre 2 12-26-2009 10:07 AM
Hanvon N516 available for preorder Nate the great News 15 08-09-2009 01:34 PM


All times are GMT -4. The time now is 10:34 AM.


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