Skip to main content
Participant
July 21, 2023
Question

semantic html tables in EPUB export

  • July 21, 2023
  • 2 replies
  • 231 views

Hello all,

 

I am creating document in inDesign and I will be exporting it to the Epub fixed format. I am struggling to understand how can I create tables what would have td/tr/th elements instead of divs and spans.

 

Any advice on how to do so would be appreciated.

 

Best,

Gabi

This topic has been closed for replies.

2 replies

James Gifford—NitroPress
Legend
July 21, 2023

InDesign exports <table> and <td> elements, with simple <tr> bracketing, to reflowable EPUB at least, but does not use any other table elements. I can only infer a little about how ID structures tables internally, but it does not use <th>, <thead>, <tfoot> or other table structure.

 

In reflowable EPUB, you could manually or with some macros/scripts go in and resructure exported tables — I think EPUB will interpret the full structure in HTML/CSS form — but fixed EPUB is... so granualar and complex that it's essentially beyond post-export modification.

 

Why do you have a need for HTML-structured tables? What's your process and goal here?

Participant
July 21, 2023

Hi James,

 

Thank you for extensive reply. To be honest, I am testing our options, some auditing/goverment bodies require semantic HTML table elements to be used. It is quite minimal on what can pass, so what you mentioned being used within Reflowable would be sufficient. However, appearance wise Fixed layout is prefered. So I am trying to fit with regulations while still getting the wanted display method.

 

I inspected how Fixed layout HTML looks, I really do not think it is possible to change structure after exporting it.

 

If it is not possible to use Fixed with at least basic HTML table structure, I will look for alternatives.

 

Best,

Gabija

 

James Gifford—NitroPress
Legend
July 21, 2023

Yes, reflowable is basically just web page code, with lots of room for both code modification and styling. FXL is... an absurdly complex use of HTML to position each word, and sometimes each letter, using undesirable absolute/fixed methods. They are really two completely different methods except that most readers handle both.

 

You can get quite a bit of structure into reflowable, though. Not fixed pages, but well-ordered structure and hierarchy. It's pretty much unavoidable to use CSS styling to get from the approximation of InDesign export to that order and layout, though.

BobLevine
Community Expert
Community Expert
July 21, 2023

I'm not sure you can. Fixed layout EPUB is a mess with very limited reader support.

@James Gifford—NitroPress might pop in with an idea or two. Fixed Layout EPUB was something I was pretty excited about but this is not a format with a very promising future, I'm afraid.