Live data from Hacker News

Pagination widows, or, why I'm embarrassed about my eBook (2023)

clagnut.com

11–20 of 137 posts

Re: Pagination widows, or, why I'm embarrassed about my eBook (2023)

#11
post #3

Pragmatism wins out of waiting for css properties to get implemented, and div display inline block works today in epubs and doesn't need to be backported to iBooks. https://ebooks.stackexchange.com/questions/7014/how-can-i-pr...

That's not pragmatism: that's poor judgement. That's a hack that shouldn't work at all; and if it does, it must¹ cause other problems, such as preventing breaks inside the entire first paragraph, or breaking graphically rather than linewise (that is, you could get the top half of one line on one page, and the rest on the next).

¹ As in, it's unavoidable if you've implemented layout in such a way.

Re: Pagination widows, or, why I'm embarrassed about my eBook (2023)

#12

The fact that it's a book about typography may mean the requirements are a little different, because I personally (and likely many others) don't really pay attention to such things.

First half of my career was at a company writing pagination systems for books/magazines and so I can now never not notice such things as widows, orphans, kerning...

Re: Pagination widows, or, why I'm embarrassed about my eBook (2023)

#14

In the page model, a heading says it needs only one line of vertical space, so if there’s a tiny bit of space at the bottom of the page it’ll get orphaned. (Vertical box space shown as ! and % for the heading and paragraph, respectively.) Page 1 Page 2 .. Paragraph..% .. ..text. % .. .. .. .. !Heading When instead it should be moved to the top of the next page: Page 1 Page 2 .. Heading ! .. Paragraph.. % .. ..text. %…

Don't they send the copy editor to kill all the widows and orphans anymore?

Re: Pagination widows, or, why I'm embarrassed about my eBook (2023)

#15
post #3

Pragmatism wins out of waiting for css properties to get implemented, and div display inline block works today in epubs and doesn't need to be backported to iBooks. https://ebooks.stackexchange.com/questions/7014/how-can-i-pr...

That's not pragmatism: that's poor judgement. That's a hack that shouldn't work at all; and if it does, it must¹ cause other problems, such as preventing breaks inside the entire first paragraph, or breaking graphically rather than linewise (that is, you could get the top half of one line on one page, and the rest on the next). — ¹ As in, it's unavoidable if you've implemented layout in such a way.

What's the name of this site again?

Re: Pagination widows, or, why I'm embarrassed about my eBook (2023)

#17
post #6

Earlier quoted context omitted.

I don't know if it would fix splitting across pages, but that sounds like negative margins. They've been in CSS forever. The basic idea: .heading { margin-bottom: 30px; } .paragraph { margin-top: -30px; } Also: > the heading could instead claim it needs three lines, which would ensure it would never be orphaned It wouldn't prevent being orphaned at this point in your idea. What if there was room for 3 lines at the en…

If the bottom of a page has room for a heading and 3 lines of text (or some number of lines that looks appealing) then that’s enough space for the heading to not be considered orphaned.

But without moving the paragraph up, there wouldn't be text there, just a big empty area.

Re: Pagination widows, or, why I'm embarrassed about my eBook (2023)

#18
post #6

In the page model, a heading says it needs only one line of vertical space, so if there’s a tiny bit of space at the bottom of the page it’ll get orphaned. (Vertical box space shown as ! and % for the heading and paragraph, respectively.) Page 1 Page 2 .. Paragraph..% .. ..text. % .. .. .. .. !Heading When instead it should be moved to the top of the next page: Page 1 Page 2 .. Heading ! .. Paragraph.. % .. ..text. %…

I don't know if it would fix splitting across pages, but that sounds like negative margins. They've been in CSS forever. The basic idea: .heading { margin-bottom: 30px; } .paragraph { margin-top: -30px; } Also: > the heading could instead claim it needs three lines, which would ensure it would never be orphaned It wouldn't prevent being orphaned at this point in your idea. What if there was room for 3 lines at the en…

I'm not sure the proposed approach would work, in particular on ebook readers. But if if does, I believe margins may not be the right way to do it. Padding might be however, because it is actually inside the box (while margins of elements may be "blended" inside the margins of their parents).

    h2 { padding-bottom: 3em; }
    h2 + p { margin-top: -3em; }
The problem is CSS doesn't support the lh unit yet so what's 3em here should actually be 3 times the height of a line, taking into account the font-family, the font-size, etc. Except maybe if line-height is explicitly set.

Re: Pagination widows, or, why I'm embarrassed about my eBook (2023)

#19
post #5

If you think it's bad that `break-*` isn't supported in Firefox or Chrome, wait till you see what your ebook looks like in Kindle, or worse, ADE-based readers, of which there are still many in use! Kindle, the reading device with by far the largest market share, is basically the IE6 of ereaders - too big to ignore, and at the same time dragging down the entire ebook ecosystem with its crappy renderer. Amazon has show…

Is there a caniuse for ebook readers?

Re: Pagination widows, or, why I'm embarrassed about my eBook (2023)

#20
Not to mention the ugly/unusable rendering of mathematical formulate in ebooks on my Kindle, which is gatherig dust.

Layouting is an art and a craft, and the fact that it's automated by people who lack the specialized knowledge, or for whom it is not a priority (quarter century old bug reports, really?) suggests that in 2025, you should still avoid ebooks if you care about quality and aesthetics.

This is a shame because e-ink is just becoming usable. Anyhow, long live the paper book!

Post reply on HN