View Single Post
Old 01-18-2009, 02:54 PM   #1
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: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
css drop caps coming out of calibre

I've moved from my original thread, because this looks to me to be a calibre-specific question.


Jellby, llasram and Peter seem to have worked out my original problem with drop caps in an epub in general. They demonstrated a working example that appears correctly in ADE, Sony and Calibre Reading software. (Message 54 from this page: https://www.mobileread.com/forums/sho...t=35928&page=4). See attached [ original viewers.jpg ]

But when I try to recreate it using Calibre to generate the files (even using their original source directly, without modification) I get a different result in ADE. See attached [rebuilt-viewers.jpg ]

If I open the xhtml outputed by calibre in a browser, the drop cap works properly. As do the margins, italics, etc. So the re-writing of the css by calibre doesn't seem to completely break it, but is it possible that ADE doesn't like the multiple cross references of the css? (guessing?)

Original xhtml:

Quote:
<p class="initial"><span class="drop">A</span><span class="first
afterA">ntes</span> de enseñar el primer cabo de nuestra...</p>
Linking to original style.css:

Quote:
p.initial {
text-indent: 0;
}
span.drop {
font-size: 400%;
font-weight: bold;
line-height: 1;
height: 1em;
float: left;
margin: -0.1em 0.125em -0.1em 0.25em;
}
span.first {
margin-left: -0.5em;
white-space: pre;
}
span.afterA {
margin-left: -1.0em;
}

Rebuilt xhtml:

Quote:
<p class="initial"><span class="drop" id="cfs_1">A</span><span class="first
afterA">ntes</span> de enseñar el primer cabo de nuestra ...</p>
Rebuilt style_0_0.css:

Quote:
p.initial {
text-indent: 0
}
span.drop {
font-weight: bold;
line-height: 1;
height: 1em;
float: left;
margin: -0.1em 0.125em -0.1em 0.25em
}
span.first {
margin-left: -0.5em;
white-space: pre
}
span.afterA {
margin-left: -1.0em
}
Cross references to rebuilt Capitulo01_1.css:

Quote:
#cfs_1 {
font-size: 400.000000%
}
-bjc
---looking for a decent wall for a little head bashing.......
Attached Thumbnails
Click image for larger version

Name:	original viewers.jpg
Views:	503
Size:	596.9 KB
ID:	21632   Click image for larger version

Name:	rebuilt-viewers.jpg
Views:	463
Size:	538.1 KB
ID:	21633  
Attached Files
File Type: zip rebuilt-source.zip (9.0 KB, 311 views)
File Type: epub Capítulo I - Unknown.epub (11.0 KB, 358 views)
brewt is offline   Reply With Quote