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-15-2009, 04:47 PM   #46
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
If I wanted to prevent this, forcing the second paragraph to begin below the drop cap, would it be possible?

This:

clear: left;

placed on the second paragraph should do the trick (but I have not tried it).
Peter Sorotokin is offline   Reply With Quote
Old 01-15-2009, 05:18 PM   #47
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 brewt View Post
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?
Frankly, I am not an expert on that. I mostly create my EPUBs by hand or from something called "FB2" (mostly used for Russian books). I think you really should treat InDesign export as a starting point; certainly styling scripts/tools are needed to do this sort of things.

Quote:
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....
Oh, there is nothing touchy about bugs, especially bugs in CSS layout. Word may be evil, but CSS is insane. Unfortunately, we are stuck with both.

Kovid - I think he is studying for PhD in physics (as I once did). I'd say being a scientist is more noble than being a software engineer, so first, let's see if he gets bored with academia. Besides, he may not be able to work on free ebook stuff if he is employed by Adobe, so be careful what you wish for.
Peter Sorotokin is offline   Reply With Quote
Old 01-15-2009, 05:23 PM   #48
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: 43,839
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Peter Sorotokin View Post
Kovid - I think he is studying for PhD in physics (as I once did). I'd say being a scientist is more noble than being a software engineer, so first, let's see if he gets bored with academia. Besides, he may not be able to work on free ebook stuff if he is employed by Adobe, so be careful what you wish for.
Don't know about noble, I will say it's harder What area of physics did you do your thesis in?
kovidgoyal is offline   Reply With Quote
Old 01-15-2009, 09:01 PM   #49
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 kovidgoyal View Post
Don't know about noble, I will say it's harder What area of physics did you do your thesis in?
Well, it is easier to sell programs than theories ;-)

I did plasma and gas dynamics in that place: http://www.lle.rochester.edu/. But I have bailed out after getting MS.
Peter Sorotokin is offline   Reply With Quote
Old 01-16-2009, 08:38 AM   #50
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: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Peter Sorotokin View Post
clear: left;
Thanks, I used it, but not explicitly in the second paragraph, but in a "p.initial + p" selector (hoping that reading systems will support adjacent sibling selectors). What do people think about this, is it better having the second paragraph starting beside the drop cap or having a vertical space before it?

I also changed the "predrop" code to make it a bit more portable (now the displacement is from the top of the drop cap, not from the bottom).
Attached Files
File Type: epub El doncel de don Enrique el Doliente.epub (441.3 KB, 459 views)
Jellby is offline   Reply With Quote
Old 01-16-2009, 12:48 PM   #51
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!
That looks pretty darn good. If I read your epub directly (sony pic).

I'm just having trouble getting the idea to work with my stuff now.


When I try to re-render your file in Calibre, I get the old problem in DE. (DE pic)

Maybe I'm missing something on some other level in rendering in calibre? If I wanted to rebuild your file in calibre (with modifications, say, adding double quotes) how would I rebuild it?

Calibre's Epub-to-epub got different results in DE/sony - my attempt at rebuilding it in calibre is attached. The Calibre Viewer seems to see the Calibre-rendered version ok, but DE has issues with it.

-bjc
Attached Thumbnails
Click image for larger version

Name:	chapter28.jpg
Views:	461
Size:	210.2 KB
ID:	21388   Click image for larger version

Name:	chapter28-calibre-rendered.jpg
Views:	458
Size:	177.7 KB
ID:	21389   Click image for larger version

Name:	chapter28-calibre-viewer.jpg
Views:	468
Size:	194.6 KB
ID:	21391  
Attached Files
File Type: epub El doncel de don Enrique el Doliente - Mariano José de Larra.epub (385.5 KB, 333 views)
brewt is offline   Reply With Quote
Old 01-16-2009, 02:53 PM   #52
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: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by brewt View Post
When I try to re-render your file in Calibre, I get the old problem in DE. (DE pic)
Is that my file run through Calibre and saved as a different epub file (maybe with modifications)? Does the DE pic correspond to the epub file you attached? Does DE render the original file correctly (the drop cap and the poetry fragment under the chapter heading)?

Quote:
If I wanted to rebuild your file in calibre (with modifications, say, adding double quotes) how would I rebuild it?
I don't know... I just unzip, modify with a text editor, and zip again. It seems Calibre is generating .css files for each chapter (maybe with the properties you modified), but I don't see what could be confusing DE.
Jellby is offline   Reply With Quote
Old 01-16-2009, 04:03 PM   #53
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!
Clumsy of me:

The Sony pic is of your original epub. - Chapter 28.jpg
We've so far seen Sony and DE to render the drop caps similarly, and yes, DE did your original epub correctly, too.

The epub I attached was a straight re-render of the epub through calibre - I didn't change anything. Loaded it in, asked it to rebuild the epub.

The DE picture is of the re-rendered epub - the Sony viewer had the same problem on the re-rendered. - Chapter28-calibre-rendered.jpg

chapter28-calibre-viewer.jpg is of the calibre-re-rendered epub, in the calibre viewer.

Yes, calibre outputs 3 css's per html file. I've seen these css's exceed 1 meg in size, if I chose really aweful rtf files to start with.

I spent most of the morning trying to replicate your solution, and found that I couldn't get it to work by rendering in calibre.

-bjc
brewt is offline   Reply With Quote
Old 01-17-2009, 09:01 AM   #54
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: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Well, I bit the bullet and installed Digital Editions in a Windows computer, I have to transfer the files between computers for testing, though.

I noticed that DE does not seem to support "position: relative" which means the "predrop" class (Ch. XXX, XXXIII) was not working properly. I change the code into something that seems to work. I also noticed I had the width and height of the cover image mixed up.

Code:
span.predrop {
  font-size: 25%;
  font-weight: normal;
  vertical-align: top;
  line-height: 1.9;
  /*position: relative;
  top: 0.4em;*/ /*ADE does not support this*/
}
Other problems with DE are:

- It does not support "font-variant: small-caps", or at least the last sentence of the book is not rendered correctly.

- It breaks lines before an em-dash. This is incorrect in Spanish, where em-dashes are used very much like parentheses. Think of a linebreak just before a closing parenthesis.
Attached Files
File Type: epub El doncel de don Enrique el Doliente.epub (441.4 KB, 410 views)
Jellby is offline   Reply With Quote
Old 01-17-2009, 09:27 AM   #55
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: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by Jellby View Post
Well, I bit the bullet and installed Digital Editions in a Windows computer, I have to transfer the files between computers for testing, though.
Did running ADE under Wine not work for you?

Quote:
Originally Posted by Jellby View Post
- It does not support "font-variant: small-caps", or at least the last sentence of the book is not rendered correctly.
Indeed :-/.

Quote:
Originally Posted by Jellby View Post
- It breaks lines before an em-dash. This is incorrect in Spanish, where em-dashes are used very much like parentheses. Think of a linebreak just before a closing parenthesis.
Yah, it appears to consider before and after any em dash fair game for a break, even places where breaks would be inappropriate in English as well. I tried solving this by using the Unicode "Word Joiner" character, but ADE doesn't recognize it. Much less ideally, but actually working across multiple renderers, I wrapped non-breaking bits in <span/>s with "white-space: nowrap" set. Thus CSS:

Code:
.nobreak {
  white-space: nowrap;
}
And markup:

Code:
<p><span class="nobreak">—These</span> em dashes are like <span class="nobreak">parentheses!—</span></p>
llasram is offline   Reply With Quote
Old 01-17-2009, 09:42 AM   #56
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: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by llasram View Post
Did running ADE under Wine not work for you?
I have an oldish linux in this computer, and it's already a bit crammed. My last experiences with Wine here were rather disappointing (like all text disappearing, it was impossible what the menus and buttons were for), so I decided it was better to install it somewhere else.

Quote:
Code:
<p><span class="nobreak">—These</span> em dashes are like <span class="nobreak">parentheses!—</span></p>
Oh, my! I refuse to add that sort of markup to my books. It gets even more confusing if you have:

<p>—These em dashes are <em>like parentheses</em>!—</p>

Since <em> and <span> have to be properly nested, you'd have to close and reopen the <em>.

EDIT: Another thing DE seems to do is ignore the "linear=no" spine property...

Last edited by Jellby; 01-17-2009 at 09:48 AM.
Jellby is offline   Reply With Quote
Old 01-17-2009, 10:01 AM   #57
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: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by Jellby View Post
I have an oldish linux in this computer, and it's already a bit crammed. My last experiences with Wine here were rather disappointing (like all text disappearing, it was impossible what the menus and buttons were for), so I decided it was better to install it somewhere else.
Ah, fair enough. If/when you have GNU/Linux running on a more newish computer, ADE under Wine 1.0.1 runs 100% perfectly, with no glitches whatsoever.

Quote:
Originally Posted by Jellby View Post
Oh, my! I refuse to add that sort of markup to my books. It gets even more confusing if you have:

<p>—These em dashes are <em>like parentheses</em>!—</p>

Since <em> and <span> have to be properly nested, you'd have to close and reopen the <em>.
Alas, yes :-/. You could use Word Joiner and programmatically transmute so-joined text into the admittedly unfortunate markup.

Quote:
Originally Posted by Jellby View Post
EDIT: Another thing DE seems to do is ignore the "linear=no" spine property...
To be fair though, the OPF spec does say that reader systems may ignore the distinction between primary (linear="yes") and auxiliary (linear="no") content.
llasram is offline   Reply With Quote
Old 01-17-2009, 10:48 AM   #58
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: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by llasram View Post
To be fair though, the OPF spec does say that reader systems may ignore the distinction between primary (linear="yes") and auxiliary (linear="no") content.
Yes, that's true, I just expected it to do something else...

Well, enough of talking about DE's shortcomings, this thread was about the drop caps, and I think the issue is solved for the moment, I'll be updating my epub files during the weekend.
Jellby is offline   Reply With Quote
Old 01-17-2009, 01:00 PM   #59
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!
Attached is a re-render of your message 54 epub out of calibre, with a screen shot in ADE of chapter 1 of the re-render, and a sreenshot of your original in ADE.

The header on your original xhtml looks like this:

Quote:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CapÃ*tulo I</title>
<link href="css/style.css" type="text/css" rel="stylesheet" />
</head>
<body>

When the xhtml comes out of calibre, the header looks like this:

Quote:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>CapÃ*tulo I</title>
<link href="resources/style_3_9.css" type="text/css" rel="stylesheet"/>
<link href="resources/Capitulo-01_0.css" type="text/css" charset="UTF-8" rel="stylesheet"/>
<link href="resources/Capitulo-01_1.css" type="text/css" charset="UTF-8" rel="stylesheet"/>
<link href="resources/Capitulo-01_2.css" type="text/css" charset="UTF-8" rel="stylesheet"/>

</head>
<body>

Could the lack of doctype in the re-render have anything to do with why it looks different? Or maybe the change to a content type?


-bjc
Charter Member, Deceased Equine Abuse Society.
Attached Thumbnails
Click image for larger version

Name:	message 54.jpg
Views:	436
Size:	261.2 KB
ID:	21493   Click image for larger version

Name:	message 54 original.jpg
Views:	450
Size:	218.3 KB
ID:	21497  
Attached Files
File Type: epub Índice - Unknown.epub (365.0 KB, 371 views)
brewt is offline   Reply With Quote
Old 01-18-2009, 03:34 PM   #60
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!
I WILL FINALLY DECLARE IT TO BE GOOD.

Mr Goyal pointed out a calibre-built solution in the settings for epub - set the Create Epub/Page Setup/Base Font Size to 0pt, and the llasram/Jellby/Peter solution works coming out of Calibre, too.

https://www.mobileread.com/forums/showthread.php?t=36688

-bjc

brewt 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 08:07 PM.


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