bgamari / tabular

A fork of the Haskell tabular package.
Other
3 stars 1 forks source link

merged group header cells #4

Open amigalemming opened 2 months ago

amigalemming commented 2 months ago

It would be nice to write tables like these:

--     || memtest || time test
--     || 1  | 2  ||  1  |  2
-- ====++====+====++=====+====
...

To this end, the Group constructor could be extended to

Group Properties (Either [Header h] [(h, Header h)])

where [Header h] maintains the current meaning and [(h, Header h)] adds a row or column with merged group headers. HTML supports this, LaTeX supports this only for rows, I think, and in CSV one had to pad with empty cells.

But maybe this functionality is too complicated and out of scope for this library.

amigalemming commented 2 months ago

No, data structure should be:

Group Properties (Maybe h) [Header h]

because I want to be able to give a super-header to all headers, but I do not need single group headers above leaf headers.