07-16-2018, 10:46 PM | #16 |
A Hairy Wizard
Posts: 3,095
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
|
And, of course, it doesn't scale with font size changes. I admit I didn't read the whole thread but when people use an indent/margin of x pixels (or worse inches like some meatgrinder conversions) then changing the font size makes the indent/margin look all out of proportion.
|
07-17-2018, 06:29 AM | #17 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
I have been happy to use pixels for margins for some years now and was not aware of such blatant defects. Thanks for pointing them even if I shall keep my way.
|
07-17-2018, 06:46 PM | #18 |
A Hairy Wizard
Posts: 3,095
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
|
lol...no one's trying to force you to change! But others might take note and realize they shouldn't follow the dark path - even if they have cookies.
You probably haven't noticed a problem with px because you have the number of px for your margins set to look good with your normal font size. I'm certainly guilty of that. I code to what looks good to me on my device with my settings. But if you want to serve a greater variety of people then using units that scale seems to be the better choice. |
07-18-2018, 04:55 AM | #19 | |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
I found an article that goes your way that I cite here for fairness purposes. while some other experts advise to use pixel again... Last edited by roger64; 07-18-2018 at 06:36 AM. |
|
07-18-2018, 11:54 AM | #20 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Your links aren't working, the second one, it's trying to link to your anchor text. I'm curious to read your referenced article. Hitch |
|
07-18-2018, 12:37 PM | #21 | |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
there is one: anti-pixel https://medium.com/@julienetienne/pi...d-faa87cd8c8b9 and the second one (just use pixels) https://benfrain.com/just-use-pixels/ Last edited by roger64; 07-18-2018 at 12:41 PM. |
|
07-18-2018, 09:47 PM | #22 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
As you're happy reading PDFs on an eReader, then, you have an already-perfect solution. Hitch |
|
07-19-2018, 02:25 AM | #23 | |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
The two articles are mainly focused on websites display not on ebooks display. I quoted them because they provide examples which are easy to reproduce. Do not dismiss the W3school recommendation to use em, % or px for screen display that I quoted above (for the latter, not for font-size). I do not know how old it is though but it is still part of the current documentation. https://www.w3.org/Style/Examples/007/units.en.html So, the use of px for the display of margins should just be a matter of choice not a "dark side" crusade... Last edited by roger64; 07-19-2018 at 04:03 AM. |
|
07-19-2018, 05:53 AM | #24 |
Wizard
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Sorry for the late response. Poetry is a problem which caused me a lot of grief a few years ago. I'm sure there was a discussion in the forum then, and I and others developed some markup as shown on the attached text file - the CSS is first, of course, and the verse is the epigraph to chapter 18 of Daniel Deronda by George Eliot that I'm working on now.
I think one of the advantages of this system is that the lines break on a 6" reader, but are less like to break on a tablet or an iPad. I'm interested in any refinements that might be suggested. Last edited by AlexBell; 07-19-2018 at 07:27 PM. |
07-19-2018, 07:16 AM | #25 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Thanks Alex for your input which put us back on the main topic from where we had a little drifted...
There are indeed some similarities: - One paragraph, one verse, that's also what I finally chose, even if it looks a little code-heavy. But that affords to take care of some very long verses. - Use of a -smaller- negative indent. - One div to encompass each stanza |
07-19-2018, 07:29 PM | #26 |
Wizard
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Thanks, Roger. I should mention that I have corrected the post: I wrote that the lines indent when I meant that the lines break.
|
07-20-2018, 10:09 AM | #27 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
But...you change ePUBs to PDFs, to "perfectly" suit your device, so you seem to be making choices that are quite different than what everyone else is doing, for eReaders. Honestly, I find trying to read PDFS on a device incredibly tedious. Spoiler:
I'm surprised that you don't, but, whatever floats your boat.
Nonetheless, anytime you use px in an environment over which you have limited control--and over which others do have the ability to exert some control--I think you're running a risk that the resulting appearance, or even functionality, of the book could have some unfortunate unintended consequences. Sure, for some things--like the ubiquitous search for The One Drop Cap To Rule Them All--the job can be made far easier by the use of measurements in px, but...when I think about that (the Drop, I mean), while we can write mq's today, that will address pretty much every device, and thus make the px measurements not so potentially problematic, what happens when a new device is introduced, by Amazon, or the Fire is adjusted to a new size, shape, aspect ratio, screensize, etc.? Or the same for any line of devices? What happens if the Yadda-yadda Reader comes out with a 600ppi screen? Yes, yes, I know, that's fantastic, in the traditional meaning of the word, and useless, as well, due to limitations in the human eye, but I cannot be the only person here who remembers all too well what happened to books with internal images and fleurons, when all the Kindles went from 72ppi to 330ppi, right? And 200-300px wide images, that were half-screen-width, on a K2 or KK, were suddenly less than an inch wide? And fleurons looked like specks? I freely admit that it's been years since I personally tried using px measurements, in any book I was working on. So, I don't have a bunch of examples immediately to hand, or to brain. I don't think it's as simple as, "it's a bunch of CSS jockeys arguing, and there's no dark side." And lastly, I don't think that this discussion is that far OT. We're talking about poetry--which is invariably a PITA (no? What's your solution for line-length line-wrapping, due to font sizing, when the poet has created his poetry centered? How do you distinquish between the poet's intentional new lines, and those caused by lack of horizontal space? I know it sounds stupid--but there isn't a solution. You'd think that would be the easiest layout, right, in so many ways? Phlllbbbfffftttttt.) Anytime you deal with poetry that is anything other than typical stanzas, left-aligned, you run into these types of issues, and most of us have (stupidly) taken on some visual poetry at some point in time. Px and Poetry seem to go together, in the realm of trying to address the myriad issues, so I don't feel that this is an OT discussion, given the realms of headaches that poetry inflicts upon those folks trying to make it work in the digital world. JMHO, since I can't bring a bunch of examples to the party. For now. Hitch |
|
07-20-2018, 03:31 PM | #28 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
I think that every unit, between em, px and %, has its advantages and drawbacks. Everywhere you have to compromise more or less.
Yes px margins are not perfect. Some drawbacks have been signalled, mainly if you apply big changes in font-size. But, for other reasons, this also exists for em. If it was perfect, why should have people invented rem? px is just an acceptable choice for margins, not worth making a fuss. I use Prince PDF to convert specially prepared ePub to 9×12 PDF. I use my custom font (slightly darkened), with excellent typography (crengine for koreader suffers from some CSS glitches). I am fastidious enough to spend between 30 minutes to one hour (for complex books) to first rebuild any book I intend to read my way. But, then, I really enjoy reading them. I know it can't be a generic approach but it's mine. small images: using % Sometimes however, I like to use % instead of pixels. If I use px for margins, I prefer using % for image display (full page images are not concerned here: I use svg wrappers for them). For smaller images, there are several solutions: - use pixels and let the renderer do its job, which it will do -hopefully. However you have also to take into account the size of the images, which can be pretty tedious. - using max-width values just prevent some mishaps but cannot apply for all images. - I chose to add individual width percentage to inline style*. I use an unpublished plugin which prorates automatically the percentage width of all these images (and adds "height: auto") for a 3/4 ratio. The display is excellent for all devices with this shape (ex: 600/800). It's not universal though: in landscape mode, for exotic shapes of screen, it does not fit so well. This is the price of the compromise. But, thanks to this, the display of images on my PDF is pretty good.It's a quick and dirty solution and very handy for me (just one click away for all smaller images). Feel free to disagree. * to get the highest CSS priority poetry As far as poetry is concerned, I certainly do not pretend having found the solution. The one presented here just can help for one use case but poetry offers myriads of them which require other specific solutions, and even then... Last edited by roger64; 07-22-2018 at 03:09 AM. Reason: * |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Poetry | roger64 | ePub | 7 | 02-11-2014 10:37 AM |
Just Poetry | newone | Self-Promotions by Authors and Publishers | 0 | 04-02-2012 01:34 PM |
Anyone for poetry? | Graham Coulson | Lounge | 1 | 10-08-2011 06:02 AM |
Got POETRY? | Dr. Drib | Writers' Corner | 36 | 04-02-2009 11:18 AM |