4

I'm writing with Sigil an ebook with several tables, different sizes and extensions.

Is there a code in HTML or CSS to have table headings row to repeat thru several "pages" (depending on how big is the font, the more or less pages there will be with table data)?

I would like to use the code with EPUB 2 standard, and it should be compatible with as many e-readers as possible.

1

Great question.

First, you should be making epub3 files because generally epub3 files work on epub2 reading systems. All epub2 readers can view epub3 files -- though perhaps not optimally.

My current book production method lets me show table headers across different pages, but only for printed books. So I know exactly what you're talking about. One idea is just to distribute it as a pdf instead of as an epub.

Here is what I have learned:

  1. epub3 specification does not have any requirement for this kind of feature. CSS does not appear to support it.
  2. You may find information about how to accomplish the same thing by checking accessibility guidelines. Unsighted people need a way to navigate complex tables, and ideally a solution to address this concern will also address your concern. https://idpf.github.io/a11y-guidelines/content/xhtml/tables.html

Tables are a problem that still need solving in reading systems, as most reading systems aren't able to provide extended horizontal or vertical scrolling to facilitate rendering. As a result, large tables get rendered in the available space – leaving rows and columns to spill across page views – compromising the quality of the ebook for sighted readers in trying to aid accessible devices.

Matt Garrish described this problem in his Epub3 Best Practices book. As of 2013 (the time he wrote the book), there wasn't a real solution. He suggested using the headers attribute, i.e., TD headers="batting-averages" to give extra information which an assistive technology could highlight. He wrote,

There's also no reason why this functionality can't be equally useful to sighted readers, except that it's rarely made available. You've already seen the problem of visually rendering table data on small screens, and there's an obvious solution here to the problem a sighted reader will have of seeing perhaps only a few cells at a time and not having the visual context of what they're looking at. But whether mainstream devices begin taking advantage of this information to solve these problems remains to be seen.

From my own perspective, here are some possible ways to come close to solving the problem: 1)use CSS media queries to detect big vs. small devices and then change the styling accordingly. (maybe hide/reveal text?). 2)Use a fixed layout epub file rather than a responsive layout. (I don't recommend this, but it is a solution that works in kindle-land), 3)use typical clues to "remind" readers which columns go with what. For example, alternate columns can be colored, so it's easier for the reader to refer to headers on a previous page. 4)You might be able to force page breaks with css and then simply create two separate tables with headings where the second table is a continuation of the first or 5)you might simply use redundant labels throughout the table to remind the reader what is what. 6)you might put a warning (best viewed on devices with resolution larger than .....)

This is definitely a problem, and in my opinion, it needs to be solved by the specification first, and then the reading systems need to implement it. As I mentioned before, I believe this problem is an accessibility problem, so I would stay on top of the accessibility guidelines and the readers with the best support for accessibility.

  • First, thanks for your prompt response. Second, on the answer, I cannot use epub3 because my editorial house has a standard which forces to use epub2. On the other hand, – LobaLuna Oct 23 '16 at 3:21
  • Moderator, please erase previous comments. I'm getting used to this editor.<br />@idiotprogrammer First of all, thanks for your prompt response!<br />Second, I should say that my editorial house enforces epub2 as a standars, so epub3 is out of the question.<br />You explained perfectly the situation and possible workarounds. I'll take option 6, because it seems the most elegant solution to me. I suppose the next step should be to expose this «problem to the IDPF epub group and cross fingers for the likely chance to have it in the next spec round definition.<br />Thanks, idiotprogrammer! – LobaLuna Oct 23 '16 at 3:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.