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 05-25-2011, 03:09 PM   #1
Hatgirl
Addict
Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.
 
Hatgirl's Avatar
 
Posts: 289
Karma: 497605
Join Date: Oct 2008
Device: Sony PRS-300, Sony PRS-T1
Strange iBooks problem: only

I helped an author put together a free promotional ebook of some of his short stories. A reader has just gotten back to me with a weird problem in how the EPUB (attached) is displaying in iBooks:

Quote:
i am using the iBooks app on both the iPhone and the iPad.

basically each story has two pages of text before the next story just starts. if i change the text size i get more text per page, but still only 2 pages. I am confident that this is an iBooks issue.
Does anyone have any idea what's going on? I don't have access to an iPad or iPhone, and Apple in its infinite wisdom has not seen fit to release an emulator of any kind.

I hand-coded everything so the css is pretty clean. I of course have each individual story in its own xhtml file... I'm stumped.

*headdesk* I thought I could never hate anything more than kindlegen. It seems iBooks has managed it.
Attached Files
File Type: epub POG_Sampler.epub (405.9 KB, 96 views)
Hatgirl is offline   Reply With Quote
Old 05-25-2011, 03:12 PM   #2
Hatgirl
Addict
Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.
 
Hatgirl's Avatar
 
Posts: 289
Karma: 497605
Join Date: Oct 2008
Device: Sony PRS-300, Sony PRS-T1
... and I've managed to mess up the thread title *headdesk*

Could some friendly mod change that from "Strange iBooks problem: only" to "Strange iBooks problem: only some text displaying"
Hatgirl is offline   Reply With Quote
 
Enthusiast
Old 05-25-2011, 04:09 PM   #3
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,850
Karma: 2417001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
This has been reported before as an iBooks issue. I haven't seen a good cause or solution.
Toxaris is online now   Reply With Quote
Old 05-25-2011, 05:02 PM   #4
Hatgirl
Addict
Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.
 
Hatgirl's Avatar
 
Posts: 289
Karma: 497605
Join Date: Oct 2008
Device: Sony PRS-300, Sony PRS-T1
Quote:
Originally Posted by Toxaris View Post
This has been reported before as an iBooks issue. I haven't seen a good cause or solution.
That's one hell of an "issue"...

Can you point me in the direction of one these reports you mention? I haven't been able to find any other accounts of this problem. Maybe I'm using the wrong keywords...
Hatgirl is offline   Reply With Quote
Old 05-26-2011, 05:29 AM   #5
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,850
Karma: 2417001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
I got a report from an user and I know my CSS is correct. The other report I remember is from last week. There there were some issues with margins I believe but that was not the cause. It could be in the Sigil subforum.
Toxaris is online now   Reply With Quote
Old 06-10-2011, 02:28 PM   #6
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,850
Karma: 2417001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Just a thought, could it be that iBooks does not support @page?
Toxaris is online now   Reply With Quote
Old 06-10-2011, 07:23 PM   #7
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: 35,953
Karma: 17041886
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by Toxaris View Post
Just a thought, could it be that iBooks does not support @page?
There is a lot that iBooks doesn't support correctly.
JSWolf is offline   Reply With Quote
Old 06-11-2011, 03:43 AM   #8
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,850
Karma: 2417001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Since I don't own a device which supports iBooks, I cannot check. I would like to know, not that I will stop using it though...
Toxaris is online now   Reply With Quote
Old 06-11-2011, 12:20 PM   #9
koadic
Member
koadic doesn't litterkoadic doesn't litter
 
Posts: 16
Karma: 172
Join Date: Oct 2010
Device: prs-650
I think I see what may be causing your issue, but it is only speculation as I don't have an iPod/Pad/Phone to test it on. In the style.css, try removing the 'height: 100%;' from the 'html, body' section and see if that remedies your situation. I believe that it is limiting everything wrapped by the html and body tags (each xhtml file) to '100%' of one ePub 'page', although one 'page' usually equals two 'screens' at normal font sizes (which is what you're getting).
Code:
html, body { 
    height: 100%;
    margin: 0;
    padding:0;
    border-width:0;
  }
The only time I would use the 'height: 100%;' (in the .css) or 'height="100%"' (inline) is for an img tag that I want full screen, but in those cases I find it even better to use svg instead.


Another couple things I see that you might want to do differently in the style.css (coming from my own experience) are:

Try to eliminate adding 'margins' to the top of paragraphs, and instead try to only add to the bottom. If you must add to the top, try to use 'padding' instead. For instance, the first time I opened up the epub in ADE, one of the paragraphs with the 'centerplusgap' class only showed half of the line (vertically), as the specified 'margin-top' of 2em pushed the bottom half of the line below the screen. If you had used padding, that line would have been pushed to the next page instead.

In addition, since you already specified a margin-top (again, you should use padding instead) and -bottom for 'p', there is no need to do so for every additional p.class, you only need to include whatever you want changed from the initial settings (such as text-indent, as you change it from 2em to 0em, or adding a text-align).

Last edited by koadic; 06-11-2011 at 12:32 PM.
koadic is offline   Reply With Quote
Old 06-11-2011, 04:40 PM   #10
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,850
Karma: 2417001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
The height:100% should not pose any issues of course. If it is, put it on the silly list of iBooks.
Toxaris is online now   Reply With Quote
Old 06-11-2011, 07:34 PM   #11
Hatgirl
Addict
Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.
 
Hatgirl's Avatar
 
Posts: 289
Karma: 497605
Join Date: Oct 2008
Device: Sony PRS-300, Sony PRS-T1
Quote:
Originally Posted by koadic View Post
I think I see what may be causing your issue, but it is only speculation as I don't have an iPod/Pad/Phone to test it on. In the style.css, try removing the 'height: 100%;' from the 'html, body' section and see if that remedies your situation. I believe that it is limiting everything wrapped by the html and body tags (each xhtml file) to '100%' of one ePub 'page', although one 'page' usually equals two 'screens' at normal font sizes (which is what you're getting).
Code:
html, body { 
    height: 100%;
    margin: 0;
    padding:0;
    border-width:0;
  }
The only time I would use the 'height: 100%;' (in the .css) or 'height="100%"' (inline) is for an img tag that I want full screen, but in those cases I find it even better to use svg instead.
Yeah, that was the obvious first candidate. I tried deleting that section of code as soon as I heard about the problem. I sent the new file to an iGuineaPig - no change. It seems I am just going to have to keep commenting out code until I figure out the source of the problem. Rather than irritate my iGuineaPig with 30 different files, I have had to accept that I am just going to have to get my hands on an iPad for a few hours

The combination of
Code:
html, body { height: 100%; margin: 0; padding:0; border-width: 0; }
@page { margin: 5pt; }
is very common in epub tutorials. Even on the MobileRead wiki itself.

Quote:
Originally Posted by koadic View Post
Another couple things I see that you might want to do differently in the style.css (coming from my own experience) are:

Try to eliminate adding 'margins' to the top of paragraphs, and instead try to only add to the bottom. If you must add to the top, try to use 'padding' instead. For instance, the first time I opened up the epub in ADE, one of the paragraphs with the 'centerplusgap' class only showed half of the line (vertically), as the specified 'margin-top' of 2em pushed the bottom half of the line below the screen. If you had used padding, that line would have been pushed to the next page instead.
Ah, but Kindlegen doesn't convert padding, only margins, and I had to provide a mobi version as well as an epub *sigh*

As for margin-top vs margin-bottom - have you ever used FBReader? For some reason it can't view margin-bottom, only margin-top. And a surprising number of cheap ereaders, like my awful Binatone LCD reader, use a version of FBReader (probably because it can run on Linux and is open source). So I tried to cater for that by picking margin-top instead of margin-bottom.

Quote:
Originally Posted by koadic View Post
In addition, since you already specified a margin-top (again, you should use padding instead) and -bottom for 'p', there is no need to do so for every additional p.class, you only need to include whatever you want changed from the initial settings (such as text-indent, as you change it from 2em to 0em, or adding a text-align).
Yeah, I'll hold my hand up to that as being just a particular quirk of mine. For some reason I find it easier to troubleshoot weird errors if I lockdown what I want in my unusual classes, even if that particular, say, indent, is already covered by my initial settings. OK, so it's not exactly best practice but it's helped me figure out quite a few odd problems so I'll stick with it

So, in summary, Apple, Amazon and cheap ereader makers are driving me insane :-D
Hatgirl is offline   Reply With Quote
Old 06-12-2011, 09:03 AM   #12
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,850
Karma: 2417001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Have you tried without the @page?
Toxaris is online now   Reply With Quote
Old 06-13-2011, 10:21 AM   #13
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,850
Karma: 2417001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
With some help I managed to change one of my epubs in a manner that iBooks sees all pages...

It is actually the combination of @page and height:100% which causes this problem.

Can anyone sent Apple the IDPF specifications together with a CSS tutorial?
Toxaris is online now   Reply With Quote
Old 06-17-2011, 06:43 PM   #14
Hatgirl
Addict
Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.Hatgirl ought to be getting tired of karma fortunes by now.
 
Hatgirl's Avatar
 
Posts: 289
Karma: 497605
Join Date: Oct 2008
Device: Sony PRS-300, Sony PRS-T1
Quote:
Originally Posted by Toxaris View Post
With some help I managed to change one of my epubs in a manner that iBooks sees all pages...

It is actually the combination of @page and height:100% which causes this problem.

Can anyone sent Apple the IDPF specifications together with a CSS tutorial?
Toxaris, you are completely right!

I managed to get my hands on an iPad this evening and tried a few css variations. As Toxaris said, removing the following code from my epub allows it to be viewed in iBooks:
Code:
html, body { 
    height: 100%;
    margin: 0;
    padding:0;
    border-width:0;
  }

@page {margin: 5pt;}
Right. So, the reason that code was in there was to remove any padding imposed by viewing software and make a margin on evey screen-page (not just ADE-page). I do want a 5pt margin in case the software doesn't impose a margin, so any ideas on the best way to achieve this?
Hatgirl is offline   Reply With Quote
Old 06-18-2011, 03:16 AM   #15
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: 5,902
Karma: 4269879
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Doesn't just this work?:

Code:
@page { margin: 5pt; }
html body { margin: 0; padding: 0; }
(Note there's no comma between "html" and "body", meaning "body inside html" instead of "body and html". I use this because in my Cybook, "body" alone seems to be overriden by some internal style of the reader, while "html body" has a higher priority and gets the effect done.)
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
ibooks margin problem redryder Conversion 2 04-16-2011 06:49 AM
Strange email problem Giggleton Calibre 10 03-06-2011 07:10 AM
Strange iBooks navigation Dwayne Smith Apple Devices 10 01-02-2011 05:53 PM
Just had a strange problem with my 505 kennyc Sony Reader 5 10-11-2009 07:14 AM
Strange problem with formatting daesdaemar Workshop 9 01-29-2009 05:11 PM


All times are GMT -4. The time now is 08:45 AM.


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