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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
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: 254
Karma: 686
Join Date: Oct 2007
Device: SONY PRS 350!
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: http://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:	201
Size:	596.9 KB
ID:	21632   Click image for larger version

Name:	rebuilt-viewers.jpg
Views:	187
Size:	538.1 KB
ID:	21633  
Attached Files
File Type: zip rebuilt-source.zip (9.0 KB, 129 views)
File Type: epub Capítulo I - Unknown.epub (11.0 KB, 130 views)
brewt is offline   Reply With Quote
Old 01-18-2009, 03:09 PM   #2
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: 25,809
Karma: 5006091
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If the rebuilt file is rendering correctly in calibre and web browsers in general, then the problem is a bug in the way ADE processes the CSS.

The main change in the rebuilt file CSS comes from font rescaling. Try setting the base font size to zero in the calibre conversion preferences before re-converting the file and see if that helps. (You don't need font size rescaling if your original file has good font sizes in the first place).
kovidgoyal is offline   Reply With Quote
 
Enthusiast
Old 01-18-2009, 03:30 PM   #3
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!
Quote:
Originally Posted by kovidgoyal View Post
Try setting the base font size to zero in the calibre conversion preferences before re-converting the file and see if that helps. (You don't need font size rescaling if your original file has good font sizes in the first place).

YOOOUUUUU are a ROCK STAR!!!!!!

-bjc

Happy. Fina-frickin'-ly.
Attached Thumbnails
Click image for larger version

Name:	WOO HOO.jpg
Views:	205
Size:	193.7 KB
ID:	21645  
Attached Files
File Type: epub Capítulo I - Unknown.epub (10.9 KB, 136 views)
brewt is offline   Reply With Quote
Old 01-18-2009, 04:00 PM   #4
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: 25,809
Karma: 5006091
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Glad it worked
kovidgoyal 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
Css Drop Caps does not work in an Epub on a Reader brewt ePub 63 09-07-2012 12:46 AM
Opus Fonts directory for Calibre -> External CSS fiery Bookeen 12 02-20-2011 10:05 PM
newbiq Q about Drop Caps and Calibre NASCARaddicted Calibre 2 01-14-2010 07:03 PM
calibre and drag and drop drizzt709 Calibre 2 02-07-2009 11:09 PM
Using CSS in Word to make a Drop Cap work in an Epub brewt ePub 3 01-31-2009 06:00 PM


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


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