jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.91k stars 3.39k forks source link

LaTeX writer - support new table features #6313

Open jgm opened 4 years ago

jgm commented 4 years ago

Adjust LaTeX writer to support new table features introduced in jgm/pandoc-types#66 including table attributes (including identifier), rowspan, colspan, table head and foot, multiple header lines, row headers, captions that allow block-level content and include an optional short caption.

stroobandt commented 4 years ago

The CALS table model

Perhaps of interest to this discussion is the the CALS table model. CALS started out as a United States Department of Defense (DoD) initiative for creating a DTD standard for representing tables in SGML/XML.

CALS allows for cell merging.

CALS is also the historic precursor of the HTML table model. A little known fact is that CALS is supported in LaTeX through the cals package. In fact, it is easier to use and offers more capabilities than the more commonly employed tabularx package in LaTeX.

Here is the documentation of the cals package in LaTeX:

the-solipsist commented 4 years ago

Just FYI: There's an existing open issue on the CALS table model: https://github.com/jgm/pandoc/issues/890 (opened by @stroobandt himself in 2013).

stroobandt commented 4 years ago

@the-solipsist Thanks for pulling CALS out of the woodwork again!

It surely is a nice standard to work from and it is already supported in at least LaTeX and, by definition, in HTML. Furthermore, it allows to merge cells. This is currently not supported in Pandoc Markdown.

If the CALS standard is good enough for the US military, it is probably also good enough for the rest of us.

tarleb commented 3 years ago

Possibly incomplete list of missing features:

Should we open separate issues for each of these? Implementing table footers might be an excellent first issue.