You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mdast table specification is very simplistic and too limited for publication-quality tables. While the goal need not be to support every edge case supported by html tables, there are a few small improvements that could help a lot.
This specification assumes (1) first row of the table is header, everything else is standard, (2) rows and columns all have equal numbers of cells (no spans), and (3) cell alignment is consistent for the column
There are already a few changes to tables in myst-spec to allow more flexibility, with some similarities to HTML:
header is a boolean field on each cell - header cells can be anywhere, not just the first row
align is a field on each cell as well - left/right/center alignment is not necessarily constant on the entire column
align on the table is a single value which refers to alignment of the table itself (I think this should be removed, see below)
Proposed changes
Remove align from table node: this is confusing since it conflicts with mdast table alignment. We should only have align on cells (for the cell content) and the parent container (for alignment of the table itself)
Add colspan and rowspan to cells to allow them to span multiple rows / columns
Add a way to specify column width (and row height?)
The text was updated successfully, but these errors were encountered:
The
mdast
table specification is very simplistic and too limited for publication-quality tables. While the goal need not be to support every edge case supported by html tables, there are a few small improvements that could help a lot.mdast spec
See https://github.com/syntax-tree/mdast#table and https://github.com/syntax-tree/mdast-util-gfm-table
This specification assumes (1) first row of the table is header, everything else is standard, (2) rows and columns all have equal numbers of cells (no spans), and (3) cell alignment is consistent for the column
current myst-spec
See https://executablebooks.github.io/myst-spec/features/tables.html#tables
There are already a few changes to tables in myst-spec to allow more flexibility, with some similarities to HTML:
header
is a boolean field on each cell - header cells can be anywhere, not just the first rowalign
is a field on each cell as well - left/right/center alignment is not necessarily constant on the entire columnalign
on the table is a single value which refers to alignment of the table itself (I think this should be removed, see below)Proposed changes
align
from table node: this is confusing since it conflicts with mdast table alignment. We should only havealign
on cells (for the cell content) and the parent container (for alignment of the table itself)colspan
androwspan
to cells to allow them to span multiple rows / columnswidth
(and rowheight
?)The text was updated successfully, but these errors were encountered: