Mobileread
Question re: vertical scrolling margins in Apple Books
#1  seannymurrs 12-28-2020, 11:03 AM
I’m in the process of trying to figure out the best app/device/format in which to read my collection of ebooks. Since most of my devices reside in the Apple ecosystem, I’ve tried giving Apple Books a shot. When reading on my iPhone, I prefer to use vertical scrolling rather than turning the page due to the aspect ratio of the device. I’ve noticed that some books have absurdly wide margins when viewed this way (see my attached screenshot for an example). I’ve found that converting the epub to epub (I know that sounds redundant), and using the tablet output profile, will fix this margins issue. Unfortunately, it tends to add other formatting issues in the process (such as chapter headings no longer looking correct or weird formatting for block indented text). I’ve also attached a screenshot showing what I mean by this.

I don’t really know enough about the structure of an epub file to know how to begin troubleshooting this issue. I’m hoping someone here could point me in the right direction on how to fix the original issue with wide margins without messing up the rest of the ebook in the process.

show attachment » show attachment »
Reply 

#2  DNSB 12-28-2020, 03:58 PM
Not sure if you have the capability yet but if you do, edit your message and use the Attachments tool to attach the image instead of placing it in the message.
Reply 

#3  seannymurrs 12-28-2020, 04:15 PM
Sorry about that. It doesn’t look like I have the ability to edit my post. I’d delete it and repost, but I’m not sure if I can delete the post either.
Reply 

#4  issybird 12-28-2020, 04:30 PM
I’ve attached the images. If you run into an issue with a post that you can’t fix (can’t edit, wrong place) report the post and a mod will attend to it.
Reply 

#5  Jellby 12-29-2020, 04:28 AM
I'd guess that side margins are specified as a percent. According to the CSS specification a percent side margin is sized relative to the height of the element (which in the absence of more information could be the screen). Maybe in scroll mode the height is the whole book or chapter, which then makes the side margins larger. (Ignore this, it's actually the other way around.)

I don't think there's an automated solution to fix that and only that. But if you know the basics of CSS and peek into the book's code, it should be relatively easy to find and fix the offending rules (I usually remove all side margins in <p>, and <body>, and add a 2mm margin in @page).
Reply 

#6  seannymurrs 12-29-2020, 08:45 AM
Quote Jellby
I'd guess that side margins are specified as a percent. According to the CSS specification a percent side margin is sized relative to the height of the element (which in the absence of more information could be the screen). Maybe in scroll mode the height is the whole book or chapter, which then makes the side margins larger.

I don't think there's an automated solution to fix that and only that. But if you know the basics of CSS and peek into the book's code, it should be relatively easy to find and fix the offending rules (I usually remove all side margins in <p>, and <body>, and add a 2mm margin in @page).
Thanks! I’ll give it a peek in Calibre and do some trial and error. Thanks again for pointing me in the right direction.
Reply 

#7  Jellby 12-30-2020, 11:08 AM
Please ignore what I said, it's bullshit. It's the other way around, percent in top/bottom margins is relative to the width. If you're getting larger margins in scroll mode, it could be that the reading software is applying a different default stylesheet, or that the style is doing something strange.

Still the solution would probably be the same: examine the CSS and fix some rules.
Reply 

Today's Posts | Search this Thread | Login | Register