04-29-2017, 12:39 PM | #1 |
Enthusiast
Posts: 38
Karma: 342440
Join Date: Apr 2017
Device: Sigil
|
My first EPUB! Need advice on best practices
Hi. I'm new here.
I'm in the process of creating my first EPUB using Sigil, and I have to say that I am thoroughly enjoying the process! I used to construct XHTML 1.0 Strict and CSS2 websites, so constructing an EPUB is coming quite naturally to me. I just conducted a Web search for a CSS template to use in my EPUB. I found one that recommends this statement: Code:
@page {margin: 10px;} In other words, this is a fix for a known problem with Adobe Digital Editions. Questions
|
04-30-2017, 04:44 AM | #2 |
Addict
Posts: 206
Karma: 547516
Join Date: Mar 2008
Location: Berlin, Germany
Device: KObo Clara, Kobo Aura, PRS-T1, PB602, CyBook Gen3
|
There is a quite comprehensive article about ePub in the wiki.
https://wiki.mobileread.com/wiki/EPUB The article also contains tips of the special needs for all of the big name reading systems including ADE. |
Advert | |
|
04-30-2017, 06:23 AM | #3 |
Resident Curmudgeon
Posts: 73,957
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Most Readers that use ADE don't have the page numbers in the right margin or there is an option to turn them off.
Best practice is to allow the default values where possible such as margins, line-height, & font size. Current Readers allow for margin changes, line-height, and font size. So you really don't need to add in your own values. Plus, @page causes issues with ADE and the right hand page number in that it move the page number from the right side based on your @page. Oh and don't left justify. It looks awful. One more thing, don't use margin shorthands. Use the long form of margins. It helps with comparability. To ensure maximum comparability, keep your code as simple and clean as possible. Also, make sure it validates in the latest version of epubcheck. Do you want advice on formatting as well? |
04-30-2017, 06:40 AM | #4 | |
Enthusiast
Posts: 38
Karma: 342440
Join Date: Apr 2017
Device: Sigil
|
Quote:
Please tell me if I understand you correctly . . .
Code:
margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px;
Yes, please, formatting advice would be very much appreciated. |
|
04-30-2017, 06:41 AM | #5 | |
Enthusiast
Posts: 38
Karma: 342440
Join Date: Apr 2017
Device: Sigil
|
Quote:
|
|
Advert | |
|
04-30-2017, 10:16 AM | #6 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
Also, some readers like left justify, others not. It is a personal opinion. Some want a small margin on each page, others don't. It is also a personal opinion. Now, shorthand in CSS is better to be avoided because indeed some readers cannot handle it correctly. I also recommend to keep formatting as simple as possible. Think about using relative instead of fixed values for certain styling such as font-size. It gives the reader much more flexibility. |
|
04-30-2017, 10:18 AM | #7 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
Use what you would like. Some like left justified, some like full justified. |
|
04-30-2017, 11:13 AM | #8 |
Well trained by Cats
Posts: 29,799
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
px (in, cm) is an absolute size. [Readers do not come in Absolute sizes, like paper ]
Avoid (when possible) Absolutes as they prevent scaling use em or %, as they will scale I have an older ADE device that ALWAYS shows those numbers in the right margin. I set the Body margin-right: 16px to give them space for 3 digits |
04-30-2017, 12:14 PM | #9 | |||
Resident Curmudgeon
Posts: 73,957
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Quote:
Quote:
|
|||
04-30-2017, 12:16 PM | #10 |
Resident Curmudgeon
Posts: 73,957
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
04-30-2017, 03:48 PM | #11 | |
Enthusiast
Posts: 38
Karma: 342440
Join Date: Apr 2017
Device: Sigil
|
Thanks for the help, guys.
I have a large EPUB, with lots of internal links. I need to clean up some tags using regex (delete lots of redundant classes). I merged all of the HTML files so that I can run regex for each fix just once instead of having to repeat it on each page individually. The problem is that when I split the files back up, many of the internal links stopped working! Why do the internal links not automatically update? As I was splitting the files back up, I got a warning like this: Quote:
|
|
04-30-2017, 04:11 PM | #12 |
Enthusiast
Posts: 38
Karma: 342440
Join Date: Apr 2017
Device: Sigil
|
Is there a way of checking internal links?
|
04-30-2017, 06:05 PM | #13 | |
A Hairy Wizard
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
There is no need to merge your html pages to run regex on all of them. All you need to do is select "All HTML Files" instead of "Current File" in the regex mode selector at the bottom. Cheers! |
|
04-30-2017, 06:07 PM | #14 |
A Hairy Wizard
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Going to "tools/reports" and then selecting "links" should give you a bunch of info. I also think hitting F7 (tools/Well Formed Check EPUB) might show up any broken links...but I'm not positive about that one.
...these tools would be in Sigil, of course. Last edited by Turtle91; 04-30-2017 at 06:10 PM. |
04-30-2017, 07:03 PM | #15 |
Wizard
Posts: 1,613
Karma: 6718479
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
|
All of the advice so far about margins should be taken to refer to page/screen level tags (e.g. <body>, ...), other that the good advise to not use the shorthand notation.
Margins applied to Heading tags (e.g. <h1>, ...) and containers such as <div> and <p> are another matter. With these, margin-top and margin-bottom are excellent way to insert vertical space, if you use em units, though added space is best (IMO) left to special cases with <p> and <div> tags (eg. <p class="section" where the section class has a margin-top of perhaps 1em). |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Page Margin Best Practices epub->mobi | BKh | Conversion | 0 | 08-09-2012 12:11 PM |
TOC best practices (InDesign to ePUb) | virtual_ink | ePub | 3 | 07-03-2011 01:50 PM |
Free book (nook/Kindle) - The Truth About Branding Practices [Business Advice] | ATDrake | Deals and Resources (No Self-Promotion or Affiliate Links) | 1 | 05-09-2011 03:22 AM |
EPUB Math: Best Practices for Mathematics in Ebooks | Adjust | News | 0 | 08-23-2010 10:17 PM |
EPUB best practices guide | Bob Russell | ePub | 25 | 04-01-2008 08:36 AM |