Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 08-31-2014, 06:05 PM   #1
RyanMcSwain
Junior Member
RyanMcSwain began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2014
Device: multiple
Raised Drop Cap Image Followed by Small Caps

EDIT: I figured it out! https://www.mobileread.com/forums/sho...54&postcount=7

I have what appears to be a very specific problem in creating my ePub. I've been wrestling with it all day, and I can't find a solution. I've managed to get them to float left as a drop cap, but the formatting gets wonky so I'd rather keep them raised.

I'm attempting to use images as raised drop caps followed by small caps, but no matter what I do I get a line break following the image. I was able to get it to work in my mobi, but I can't get it to work across ePub devices (I'm testing on the iPhone) (edit: specifically in iBooks). I've tried using different classes and a million other solutions, and I'm out of ideas.

Here's the relevant css:
Code:
.scrivener15 {
font-variant: small-caps
}
.dropfix {
float:none; 
width: 25%;
}
Here's a sample of the html:
Code:
<div class="dropfix"><img alt=" " src="../Images/o-drop-cap-quote.gif" width="100%" /></div>

  <p class="scrivener15">f course it’s going to hurt.”</p>
I created the file with Scrivener and I'm tweaking it in Sigil.

Any help would be very appreciated. I guess I can experiment with removing the small caps, but I'd like to keep them if possible. Thanks!

Last edited by RyanMcSwain; 09-01-2014 at 01:38 AM. Reason: Specify which app I'm testing with
RyanMcSwain is offline   Reply With Quote
Old 08-31-2014, 07:13 PM   #2
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,660
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by RyanMcSwain View Post
I have what appears to be a very specific problem in creating my ePub. I've been wrestling with it all day, and I can't find a solution. I've managed to get them to float left as a drop cap, but the formatting gets wonky so I'd rather keep them raised.

I'm attempting to use images as raised drop caps followed by small caps, but no matter what I do I get a line break following the image. I was able to get it to work in my mobi, but I can't get it to work across ePub devices (I'm testing in on the iPhone). I've tried using different classes and a million other solutions, and I'm out of ideas.

Here's the relevant css:
Code:
.scrivener15 {
font-variant: small-caps
}
.dropfix {
float:none; 
width: 25%;
}
Here's a sample of the html:
Code:
<div class="dropfix"><img alt=" " src="../Images/o-drop-cap-quote.gif" width="100%" /></div>

  <p class="scrivener15">f course it’s going to hurt.”</p>
I created the file with Scrivener and I'm tweaking it in Sigil.

Any help would be very appreciated. I guess I can experiment with removing the small caps, but I'd like to keep them if possible. Thanks!
Read the following posts:

https://www.mobileread.com/forums/sho...8&postcount=20

https://www.mobileread.com/forums/sho...51&postcount=9

https://www.mobileread.com/forums/sho...28&postcount=9

Regards
Rubén
RbnJrg is offline   Reply With Quote
Advert
Old 08-31-2014, 08:22 PM   #3
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,364
Karma: 78877538
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Also, before others point this out, saying that you have problems on an iPhone is meaningless. Realize there are MANY eReader programs available for the Apple iDevices, each of which have so own idiosyncrasies.
PeterT is offline   Reply With Quote
Old 08-31-2014, 10:45 PM   #4
RyanMcSwain
Junior Member
RyanMcSwain began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2014
Device: multiple
Quote:
Originally Posted by PeterT View Post
Also, before others point this out, saying that you have problems on an iPhone is meaningless. Realize there are MANY eReader programs available for the Apple iDevices, each of which have so own idiosyncrasies.
You're right, of course, and I apologize. I'm specifically testing on iBooks, as I understand it's one of the most picky. I'm not having problems with other previewers.
RyanMcSwain is offline   Reply With Quote
Old 08-31-2014, 10:50 PM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,385
Karma: 145491800
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
If this is something you are doing for just yourself, I suggest you stop using iBooks and switch to Marvin or Bluefire Reader and you'll find both do work that much better then iBooks.
JSWolf is offline   Reply With Quote
Advert
Old 08-31-2014, 11:14 PM   #6
RyanMcSwain
Junior Member
RyanMcSwain began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2014
Device: multiple
Quote:
Originally Posted by JSWolf View Post
If this is something you are doing for just yourself, I suggest you stop using iBooks and switch to Marvin or Bluefire Reader and you'll find both do work that much better then iBooks.
This is for a book I'm publishing. I have everything else finished--just trying to make the best-looking ePub I can. This chapter-start formatting is the last thing I need to do.

I'm trying to use variable sizes so the raised drop caps looks good on different screens. My problem is that in order to use percentage widths I can't use inline css classes. That means I'm forced into a line break after the image.

I'm probably missing something obvious. Is there a way to make float:none work inside an ePub with a percentage width?
RyanMcSwain is offline   Reply With Quote
Old 08-31-2014, 11:32 PM   #7
RyanMcSwain
Junior Member
RyanMcSwain began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2014
Device: multiple
Looks like I finally figured it out! I was definitely missing the obvious.

Code:
.scrivener15 {
font-variant: small-caps
}
.dropfix {
display: inline;
   width: auto;
   height: 4em;
}

<p class="scrivener15"><img class="dropfix" alt="“O" src="../Images/HIGH-QUALITY-drop-cap-quote.gif" /><span>f course it’s going to hurt.”</span></p>
RyanMcSwain is offline   Reply With Quote
Old 09-01-2014, 03:28 PM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,385
Karma: 145491800
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Then here's what you'll have to do. You'll have to make one version for iBooks and one version for everything else. iBooks is an oddity unto itself and you do have to code differently there (not always, but a good portion of the time).

For example, font-variant: small-caps will not work with ADE based Readers/apps. So you either have to embed a font with a true small-cap font or fake it in the CSS like most publishers do.
JSWolf is offline   Reply With Quote
Old 09-03-2014, 09:31 PM   #9
RyanMcSwain
Junior Member
RyanMcSwain began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2014
Device: multiple
Quote:
Originally Posted by JSWolf View Post
Then here's what you'll have to do. You'll have to make one version for iBooks and one version for everything else. iBooks is an oddity unto itself and you do have to code differently there (not always, but a good portion of the time).

For example, font-variant: small-caps will not work with ADE based Readers/apps. So you either have to embed a font with a true small-cap font or fake it in the CSS like most publishers do.
Just wanted to thank you for this heads up, JSWolf. I've finally finished going through and implementing this change (using advice from the wiki here), and I'm thrilled with how well it has turned out.

Thanks again to everyone for weighing in.
RyanMcSwain is offline   Reply With Quote
Old 09-04-2014, 03:15 AM   #10
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by JSWolf View Post
Then here's what you'll have to do. You'll have to make one version for iBooks and one version for everything else. iBooks is an oddity unto itself and you do have to code differently there (not always, but a good portion of the time).
I'd be curious what situations you've run into where such extreme measures are needed. I've generally found iBooks to be extremely spec compliant, with the exception of having to add extra files to tell it to not ignore CSS styling, a few annoying SVG bugs, and an occasional need to add

Code:
-webkit-line-box-contain: block inline replaced !important;
styles to work around behavior when floating boxes end up at page boundaries.
dgatwood is offline   Reply With Quote
Old 09-04-2014, 10:12 AM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,385
Karma: 145491800
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by dgatwood View Post
I'd be curious what situations you've run into where such extreme measures are needed. I've generally found iBooks to be extremely spec compliant, with the exception of having to add extra files to tell it to not ignore CSS styling, a few annoying SVG bugs, and an occasional need to add

Code:
-webkit-line-box-contain: block inline replaced !important;
styles to work around behavior when floating boxes end up at page boundaries.
The best person to ask about the idiosyncrasies of iBooks is Hitch. Using iBooks to view your ePub as to how it looks is like converting the ePub to AZW3 to view it on a Kindle to see how the ePub looks. I'm not saying that iBooks doesn't work. But iBooks works in it's own way enough of the time that what you do in ADE doesn't work in iBooks.

Last edited by JSWolf; 09-04-2014 at 10:15 AM.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
KF8 and raised cap mandy314 Kindle Formats 15 04-21-2014 08:10 PM
Drop cap bug on Paperwhite dgatwood Kindle Formats 11 04-10-2014 04:14 AM
Aura HD Drop Cap coding help, please MacEachaidh Kobo Reader 13 08-15-2013 01:18 PM
Inexplicable small cap formatting John123 Workshop 4 01-16-2013 08:33 AM
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 03:33 AM.


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