Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table node spec changes / enhancements #41

Open
3 tasks
fwkoch opened this issue Apr 12, 2022 · 0 comments
Open
3 tasks

table node spec changes / enhancements #41

fwkoch opened this issue Apr 12, 2022 · 0 comments
Labels

Comments

@fwkoch
Copy link
Member

fwkoch commented Apr 12, 2022

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 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?)
@rowanc1 rowanc1 added the Table label Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants