03-31-2017, 06:47 AM | #61 | ||
Resident Curmudgeon
Posts: 73,987
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Quote:
|
||
03-31-2017, 08:46 AM | #62 |
Wizard
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
|
Completely platform-dependent. W3C originally recommended a 1.5x factor between each step in CSS1, then changed their mind and decided 1.2x was better in CSS2, and is now rethinking it yet again. That said, their new table translates to:
H6/xx-small: 0.6em x-small: 0.75em H5/small: 0.89em (8/9) H3/large: 1.2em H2/x-large: 1.5em H1/xx-large: 2em Just don't expect to see that etched in stone anywhere. It's a suggestion, not a set of ironclad rules, and implementations will differ. No, that's called paying attention to detail. If you want exactly 1em (absolute) of space between lines that are not 1em tall, you have to set the appropriate vertical margin to the reciprocal of the active font size. Simply saying "margin-top: 1em" won't do it; that 1em is relative to the element's current size, not an absolute value. In other words, the H2 element traditionally carries a 1em (relative) top and bottom margin. If it also carries the 1.5em (absolute) font size listed above, then the gap between two consecutive H2 elements will be 1.5em (absolute) - translating to "skip a line between H2 elements." Thus, if you want an actual 1em (absolute) space between those elements, you have to tinker with the margins by setting them to 0.6667em (relative). That way, 0.6667 x 1.5 = 1, and you get what you're after: a gap the size of a line of standard body text. Last edited by Rev. Bob; 03-31-2017 at 08:48 AM. |
Advert | |
|
03-31-2017, 10:44 AM | #63 |
Guru
Posts: 631
Karma: 7544080
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
|
If the original poster is still looking for a solution, I attach my private little hack of modify_epub. It is a totally stripped down thing, just searches for some regexes, removes fonts and smartens punctuation.
To individualize it, extract main.py and open it in a simple texteditor (notepad++ for example). Only thing that needs to be changed is in MY_REGEXES. What to do should be self-explinatory. No need to understand python, just copy/paste the lines and change the regex string. Now put the new main.py back in the archive and import it in calibre via "load plugin from file". There is now a button in the toolbar to do the search and replace stuff. Of course this is not rigidly tested and without any guaranties |
03-31-2017, 11:23 AM | #64 | |
Wizard
Posts: 2,082
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
|
Quote:
What works on paper does not necessary work on screen, especially small screens. The KISS principle works best bernie. |
|
03-31-2017, 04:31 PM | #65 | |
Wizard
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
|
Quote:
As for "Rube Goldberg solutions," if basic math qualifies as "overthinking" now, call me guilty. There are perfectly valid reasons to do what I described, and they usually fall under the header of making a book look better. Another example, although one I personally find a little too picky, is when a designer sets a rule for the "row of stars" used to separate scenes inside a chapter and makes the top margin a little bigger than the bottom margin. Why? Because the * character he's using isn't vertically centered; it already has some space at the bottom, and he's compensating for that. (I'd just use • if I was concerned with that, because the dot IS vertically centered.) In my experience, there are four stages to HTML/CSS layout enlightenment: 1. Relies on HTML default rendering for almost everything. 2. Starts tinkering with CSS to develop a basic visual style. 3. Goes completely into the weeds, realizing that he can theoretically control everything and determined to do exactly that. 4. Realizes that reality isn't theory and pulls back to a more minimalist style that's more flexible and robust while being able to deploy advanced techniques when called for. Stages two and four can look pretty similar, but too many of the ebooks I see are on stage three. They're determined to lock everything down, and in doing so, they suffer from what I call "overspecification." Quite frequently, those books will look and work a lot better if the excess rules are stripped out to give the reader more control. Knowing to apply a reciprocal to margins or to shave some bottom-margin from a row of asterisks is stage four. Defining line-height with absolute values that deny flexibility to readers is stage three. There's a pretty big difference there. |
|
Advert | |
|
03-31-2017, 04:41 PM | #66 | |
Well trained by Cats
Posts: 29,804
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
04-01-2017, 12:34 AM | #67 | |
Guru
Posts: 769
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
|
+1,000,000. I completely agree.
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Automatic routine when sending book to device (Kobo) | Doonge | Development | 4 | 11-14-2014 08:20 PM |
What’s your “image rehab” routine? | GrannyGrump | Workshop | 58 | 11-23-2013 03:01 AM |
help with some modifications | moller | Kindle Developer's Corner | 3 | 10-12-2012 02:31 PM |
Different Send to Device routine based on the library. | iatheia | Library Management | 10 | 01-24-2012 12:06 PM |
iLiad Registry modifications | Martijn | iRex Developer's Corner | 7 | 03-27-2008 05:37 PM |