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 11-04-2013, 03:23 AM   #1
Zora
Enthusiast
Zora began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Oct 2008
Location: Honolulu
Device: iPod Touch, Nexus tablet
Setting margins for ADE

I used to check my finished epubs by viewing them in Calibre for the ePub version and in the Kindle app for the mobi version (after I had made sure that they passed the online ePub Validator). Someone with more formatting experience than I have told me that Adobe Digital Editions was the ePub reader to use for checking the appearance; this was the program that all the big publishers used.

So I downloaded and installed it on my desktop and ... I'm flummoxed by the fact the pages display with no margins at all. I get a white page on a black background, with the text snugging up to the left margin. I hate the look. I cannot figure out how to adjust ADE to display with margins. I am afraid to tweak my .css file, because the books do display properly in all other apps and on all devices. Not just for my apps and devices, but on those used by the readers who bought books I had formatted. No complaints.

Is this just one of those oddities I should ignore? Or is there a way to configure my app or tweak my .css?
Zora is offline   Reply With Quote
Old 11-04-2013, 04:24 AM   #2
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Post a sample of the book, and post the CSS.

There could potentially be an error in your CSS file. If there is one tiny mistake in your CSS, ADE will completely ignore everything in it, while other programs may be more forgiving.
Tex2002ans is offline   Reply With Quote
Advert
Old 11-04-2013, 04:57 AM   #3
Zora
Enthusiast
Zora began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Oct 2008
Location: Honolulu
Device: iPod Touch, Nexus tablet
I will not upload anything that belongs to a client, so I made a tiny epub with one chapter of Lorem ipsum It contains the stripped-down .css I use for most projects.
Attached Files
File Type: epub Sample.epub (64.2 KB, 162 views)
Zora is offline   Reply With Quote
Old 11-04-2013, 05:51 AM   #4
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
Add to CSS:

Code:
@page { margin: 2mm; }
or any other suitable amount.
Jellby is offline   Reply With Quote
Old 11-04-2013, 06:21 AM   #5
Zora
Enthusiast
Zora began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Oct 2008
Location: Honolulu
Device: iPod Touch, Nexus tablet
@page doesn't validate in Oxygen, my XML editor (which I use for assembling epubs). What does validate is page {left-margin:2em; right-margin:2em;} ...

And it doesn't make a damn bit of difference, in Calibre or ADE.
Zora is offline   Reply With Quote
Advert
Old 11-04-2013, 07:25 AM   #6
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Put the margins in the css thus:

p
{
text-indent: 1.5em ;
text-align: left;
margin-top:0;
margin-bottom:0;
margin-left: 1.5em; margin-right: 1.5em }

That should work.
mrmikel is offline   Reply With Quote
Old 11-04-2013, 07:53 AM   #7
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 Zora View Post
@page doesn't validate in Oxygen, my XML editor (which I use for assembling epubs).
Then Oyxgen is no good for validating ePub or CSS, because @page is part of the ePub spec, and the CSS 2.1 spec.

Quote:
What does validate is page {left-margin:2em; right-margin:2em;} ... And it doesn't make a damn bit of difference, in Calibre or ADE.
Of course, "page" without the @ means a style to be applied to an element called <page> (which is not allowed in XHTML anyway, but CSS doesn't give a damn about it).
Jellby is offline   Reply With Quote
Old 11-04-2013, 07:54 AM   #8
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 mrmikel View Post
Put the margins in the css thus:

p
{
text-indent: 1.5em ;
text-align: left;
margin-top:0;
margin-bottom:0;
margin-left: 1.5em; margin-right: 1.5em }

That should work.
But only for side margins, and you'd have to do the same with h1-h6, div, blockquote...
Jellby is offline   Reply With Quote
Old 11-04-2013, 08:51 AM   #9
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
But for many of those you may want to specify something different anyway. It also means no interaction between the page command and everything else, making troubleshooting less puzzling, for me at least.
mrmikel is offline   Reply With Quote
Old 11-04-2013, 08:56 AM   #10
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: 73,779
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
The problem I see is that you downloaded the WRONG version of ADE. You need to download ADE 2.0. ADE 2.0 does not allow a margin of 0 to butt up against the edge of the ADE window. You probably have ADE 1.7.2 which is an old version. Don't modify your code until after you see it in the correct (2.0) version of ADE.
JSWolf is offline   Reply With Quote
Old 11-04-2013, 12:38 PM   #11
Zora
Enthusiast
Zora began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Oct 2008
Location: Honolulu
Device: iPod Touch, Nexus tablet
Thanks JS Wolf. I downloaded ADE for the PC only a few months ago, but it appears that it dated quickly. I just now downloaded and installed the later version and all of a sudden I have margins

I do not need to modify my .css.
Zora is offline   Reply With Quote
Old 11-04-2013, 12:50 PM   #12
Zora
Enthusiast
Zora began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Oct 2008
Location: Honolulu
Device: iPod Touch, Nexus tablet
Quote:
Originally Posted by Jellby View Post
Then Oyxgen is no good for validating ePub or CSS, because @page is part of the ePub spec, and the CSS 2.1 spec.
I'll admit that the validation part is frustrating at times. The code I have for displaying the cover page works just fine everywhere, but does not validate in XHTML. I think I just need to add some tweaks; should ask in the Oxygen forums.

The reason I am using Oxygen, after trying out several other software programs, is that it gives me clean code (none of the junk that Sigil adds), it points out errors (with line numbers!), and it lets me work inside a zipped folder, without having to unzip the book to work on it and rezip it to look at the result. That saves untold time.

My current toolchain is Word or InDesign to HTML and NoteTabPro to clean up the HTML. I prepare an epub container in Oxygen, and then just cut and paste content from NoteTabPro to Oxygen. Goes from one large file to several files inside the zipped folder. The one large file is useful in applying global changes.
Zora is offline   Reply With Quote
Old 11-04-2013, 01:23 PM   #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: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by Zora View Post
The reason I am using Oxygen, after trying out several other software programs, is that it gives me clean code (none of the junk that Sigil adds),
??? what junk?
Toxaris is offline   Reply With Quote
Old 11-04-2013, 03:23 PM   #14
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Sigil adds virtually nothing that isn't required to make it valid. If you use the TOC editor, it may add a line or two to indicate that a particular heading isn't in the TOC, but that is about it. Sigil Flight Crew points out errors with line numbers also, though it may show the end of the problem instead of the beginning. With Sigil the whole book is unzipped when opened and rezipped only when saved. You can look at the result with book view even without saving, generally.

Calibre is another story entirely, adding all sorts of classes, etc.
mrmikel is offline   Reply With Quote
Old 11-04-2013, 04:53 PM   #15
Zora
Enthusiast
Zora began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Oct 2008
Location: Honolulu
Device: iPod Touch, Nexus tablet
When I used Sigil (some time ago) it added excess verbiage to the code, identifying it as coming from Sigil. I didn't like that. OK, I'm fussy, I'm OCD, I balance my petty cash and clean every day, I like the code to be as clean and minimal as possible

I probably should try it again.
Zora 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
Setting margins to none in Adobe viewer ? krzym1 PocketBook 3 08-24-2013 06:45 PM
PW - Margins Dr_Raspy Amazon Kindle 6 01-24-2013 03:45 AM
Margins Billi Calibre 22 01-22-2011 04:50 PM
Libre and ADE wide margins blakader Ectaco jetBook 5 10-19-2010 02:54 PM
Help with margins Switch Calibre 3 04-30-2010 02:53 AM


All times are GMT -4. The time now is 05:02 PM.


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