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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-14-2009, 10:02 AM   #31
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by Jellby View Post
I wonder if there is a way to have reader-specific CSS code, some rules that would be applied only by ADE, or only by Calibre... that would allow to work around known bugs or limitations.
Or Adobe could just fix DE...

We've reached the point where we can't use the features included in the standard just because the market leader for epub reading software (it's a rather small market, I agree) doesn't implement them... or worse, breaks them.

DE == IE?
Valloric is offline   Reply With Quote
Old 01-14-2009, 10:33 AM   #32
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,197
Karma: 4800739
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Valloric View Post
Or Adobe could just fix DE...
Yes, but I was trying to be realistic
Jellby is offline   Reply With Quote
Old 01-14-2009, 11:28 AM   #33
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 622
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by Jellby View Post
I wonder if there is a way to have reader-specific CSS code, some rules that would be applied only by ADE, or only by Calibre... that would allow to work around known bugs or limitations.
Actually, the OPS spec almost provides such a thing. Check out the section on OPS Inline XML Islands. If AdobeDE correctly handles <ops:switch/> elements (I'm not sure that it does) and there's a non-default required-namespace it considers itself to handle (which I don't know what would be), then you can use that to <link/> in an AdobeDE-specific stylesheet. Hiding alternate <ops:case/> elements from renderers which don't understand it may be a bit of a challenge, but I think should be possible without too much kludgery.

Semi-alternatively, I'm planning to add <ops:switch/> pre-processing to Calibre e-book generation. So if you need to tweak the style sheet for Mobipocket, LIT, etc generation, you can specify the tweaking stylesheet right in the markup and just include it as-per-normal in the OPF-manifested book content.
llasram is offline   Reply With Quote
Old 01-14-2009, 12:32 PM   #34
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,131
Karma: 5381911
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The calibre epub engine supports javascript, so you can easily optimize your books for calibre.
kovidgoyal is offline   Reply With Quote
Old 01-14-2009, 12:41 PM   #35
Peter Sorotokin
speaking for myself
Peter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it is
 
Posts: 139
Karma: 2166
Join Date: Feb 2008
Location: San Francisco Bay Area
Device: PRS-505
OK, I finally got some time to look at what actually happens in the code. The problem is caused by a long-standing bug in our code and a particular nesting of spans.

The bug that we have is that if a float happens in the middle of the line, our engine always pushes it down, without attempting to shift it to the left or to the right.

Now the particular span nesting that this example uses has a span with a leading margin that contains a float as a first element. That margin is counted as content, so the float bug kicks in and the float gets pushed down.

A workaround is simply to put margin after on an element after the float, e.g.

<p><span class="drop">I</span><span class="first">n</span> the ancient city of London...
Peter Sorotokin is offline   Reply With Quote
Old 01-14-2009, 12:50 PM   #36
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,197
Karma: 4800739
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Peter Sorotokin View Post
OK, I finally got some time to look at what actually happens in the code. The problem is caused by a long-standing bug in our code and a particular nesting of spans.
It's great to have some kind of official-ish answer, thank you very much. Your suggested workaround seems about the cleanest workaround possible (something cleaner would be a solution, not a workaround ).

A solution, of course, would be better, and while you're at it, you could fix the "display: oeb-page-header" thing
Jellby is offline   Reply With Quote
Old 01-14-2009, 01:06 PM   #37
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by Peter Sorotokin View Post
OK, I finally got some time to look at what actually happens in the code.
Wait... complaining actually worked? Haven't you people learned anything from Microsoft?

Seriously though, thanks for checking it out. At least we know someone at Adobe cares. That's a step in the right direction.
Valloric is offline   Reply With Quote
Old 01-14-2009, 04:16 PM   #38
igorsk
Wizard
igorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfolded
 
Posts: 3,443
Karma: 52235
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
Hi Peter, any news on full justification support?
igorsk is offline   Reply With Quote
Old 01-14-2009, 07:41 PM   #39
Peter Sorotokin
speaking for myself
Peter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it is
 
Posts: 139
Karma: 2166
Join Date: Feb 2008
Location: San Francisco Bay Area
Device: PRS-505
Quote:
Originally Posted by igorsk View Post
Hi Peter, any news on full justification support?
Can't talk about future, remember?
Peter Sorotokin is offline   Reply With Quote
Old 01-14-2009, 07:50 PM   #40
Peter Sorotokin
speaking for myself
Peter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it is
 
Posts: 139
Karma: 2166
Join Date: Feb 2008
Location: San Francisco Bay Area
Device: PRS-505
Quote:
Originally Posted by Valloric View Post
Wait... complaining actually worked? Haven't you people learned anything from Microsoft?

Seriously though, thanks for checking it out. At least we know someone at Adobe cares. That's a step in the right direction.
Nice and simple test cases that are easy to run in debugger tend to get looked at, that's all. Complaining is not as effective.

And I am not fixing the bug - not yet at least. This is a fairly obsure use of CSS and this example does not work correctly in Opera and Mozilla. We have more serious glitches to address first.
Peter Sorotokin is offline   Reply With Quote
Old 01-15-2009, 04:13 AM   #41
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,197
Karma: 4800739
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Peter Sorotokin View Post
This is a fairly obsure use of CSS and this example does not work correctly in Opera and Mozilla. We have more serious glitches to address first.
Does not? I tested with Opera and Firefox and it seemed to work fine, at least it did what I expected.
Jellby is offline   Reply With Quote
Old 01-15-2009, 10:12 AM   #42
Peter Sorotokin
speaking for myself
Peter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it isPeter Sorotokin knows what time it is
 
Posts: 139
Karma: 2166
Join Date: Feb 2008
Location: San Francisco Bay Area
Device: PRS-505
Quote:
Originally Posted by Jellby View Post
Does not? I tested with Opera and Firefox and it seemed to work fine, at least it did what I expected.
Here is Firefox 3.0.5, note missing negative margin:


Here is Opera 9.62, has exact the same bug as ADE:
Peter Sorotokin is offline   Reply With Quote
Old 01-15-2009, 10:50 AM   #43
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,197
Karma: 4800739
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Peter Sorotokin View Post
Here is Opera 9.62, has exact the same bug as ADE:
Strange, this is Opera 9.60 for linux (attached).

Firefox 2.0.0.18, indeed, does not show the negative margin.
Attached Thumbnails
Click image for larger version

Name:	snapshot.png
Views:	129
Size:	6.6 KB
ID:	21347  
Jellby is offline   Reply With Quote
Old 01-15-2009, 01:18 PM   #44
brewt
Boo-Frickety-Hoo-Erizer
brewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enough
 
brewt's Avatar
 
Posts: 254
Karma: 686
Join Date: Oct 2007
Device: SONY PRS 350!
Peter - thanks for checking in on us and helping out. We appreciate the Float Bug Workaround for Drop Caps in Digital Editions (FBWfDCiDE).

Since our old friend Word (now with 300% more evil) doesn't do these things like this at all, and Indesign places Word Docs (taking with it the above-mentioned evil), is there a way to create the Drop Cap from within Indesign that would work in the Epub?

And on the (I know - touchy) subject of "glitches", may we recommend employing our friend Kovid Goyal? Not that I speak for him, but as an admirer, his efforts toward this whole digital reading thing have been pretty darn good....

-bjc
brewt is offline   Reply With Quote
Old 01-15-2009, 03:11 PM   #45
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,197
Karma: 4800739
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Well, I applied the workaround to this book (since it's not illustrated, it's a smaller test file, but it's in Spanish). Could you people try it with different readers? It works fine with Opera here at home.

Things to look at:

All chapters: The drop cap should occupy around 3 lines, the top of the cap should more or less about the same height as the top of the first line. The drop cap should have the same indent as normal paragraphs, there should be some space between the cap and the text on the right, except for the first line (minimal space here). Chapter III is "standard".

Chapters I, IV... : The first line should be moved farther to the left, according to the shape of the A or L.

Chapter II: There must be a space in "A fines" (meaning the space in the first line is a bit larger than in Chapter I). To get this I used "white-space: pre" (and an entity for the space to prevent my text editor to wrap the line and thus add a spurious linebreak).

Chapters XXVII, XXXIII...: Here there is some punctuation before the drop cap. It should be the same font as the normal text, and more or less vertically aligned with the first line (I don't think there is a way to get this exactly without fixing the line-height for the normal text, which I want to avoid). In this case, the "predrop" text is indentend as normal paragraphs, the drop cap goes after that.

Chapter XXIX: Hmm... I'm not sure here... The second paragraph (starting with "--¡Elvira!"), depending on the line width, could begin still to the right of the drop cap, and this is a bit weird. If I wanted to prevent this, forcing the second paragraph to begin below the drop cap, would it be possible?

EDIT: I updated the file, it is now in post #50 (link).

Last edited by Jellby; 01-16-2009 at 08:40 AM.
Jellby is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
converting to epub with my css fbrzvnrnd Calibre 3 04-15-2010 02:46 AM
ePub to ePub - just replace CSS? ChristopherTD Calibre 21 02-11-2010 02:50 AM
newbiq Q about Drop Caps and Calibre NASCARaddicted Calibre 2 01-14-2010 07:03 PM
Using CSS in Word to make a Drop Cap work in an Epub brewt ePub 3 01-31-2009 06:00 PM
css drop caps coming out of calibre brewt Calibre 3 01-18-2009 04:00 PM


All times are GMT -4. The time now is 05:32 PM.


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