Live data from Hacker News

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

clagnut.com

1–10 of 137 posts

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

#2
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.     %
  ..                 ..
                     ..
Rather than being honest about needing one line…

  Heading     !
  Paragraph..  %
  ..text.      %
…the heading could instead claim it needs three lines, which would ensure it would never be orphaned:

  Heading     !
              !
              !
  Paragraph..  %
  ..text.      %
But now you have a big gap below the heading.

If you could then shift the paragraph up from where it should be in the flow such that the vertical space of the heading and paragraph overlapped…

  Heading      !
  Paragraph..  !%
  ..text.      !%
…then you’d get a heading that would never be orphaned on one line, but which looked as it if only used one line.

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

#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 shown little interest in improving it for over a decade now, while simultaneously fragmenting its own ecosystem with a variety of different proprietary formats that support different CSS and features.

ADE, while less common in new devices, is still very common in much older devices - B&N's eink Nooks were based on ADE at least as late as a few years ago. (Perhaps they still are?) ADE is closer to IE5 in terms of CSS support!

At Standard Ebooks we're often hamstrung in our attempts to make beautiful ebooks by these big players refusing to improve their renderers. We're forced to dumb down our CSS and use outdated techniques (like occasionally having to use tables for layout!) because ebook renderers are so bad.

iBooks is the top tier renderer, because as far as I can tell it's basically a wrapper for an up-to-date Webkit; next is Kobo - also Webkit-based - along with other Webkit-based indie apps. The rest of the big players are far, far, far distant.

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

#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 end of the first page?

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

#8
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…

I don't rate Kobo's renderer very highly. When the user turns on justifying body text, the device ends up justifying everything, including headings, and it just looks awkward.

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

#9
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…

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.

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

#10
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…

Neat, I didn't realize Kobo was WebKit-based, but given they offer a full browser (experimentally) on their readers, that makes sense. They also support some 'nice' ePub 3 features: fixed layouts so that comic books and manga work properly; right-to-left pagination for Japanese books, and vertical layout (also for Japanese books). Though, I feel like their page numbering gets mixed up with vertical layout (sometimes opening and reopening the book changes the # of pages, and I lose my spot...)
Post reply on HN