The current "grid" table format in Tabulate's documentation says:
It corresponds to grid_tables in Pandoc Markdown extensions
It is true that the tables are similar to each other, but there is a nasty interaction between the padding that Tabulate provides and how Pandoc interprets grid tables. Specifically, the documentation for Pandoc's grid_tables states:
The cells of grid tables may contain arbitrary block elements (multiple paragraphs, code blocks, lists, etc.).
So each cell in the grid table is treated as essentially a new Markdown scope. In the Markdown spec, Markdown indented by 4 spaces is treated as a verbatim code block. For a column of integers, Tabulate will default to right-aligning the content in the cells, which Pandoc then interprets as a verbatim code block instead of standard text. For example:
I think Tabulate should provide a new output format, pandoc_grid or grid_tables or something that produces a table similar to existing grid tables, but with cell content always left-aligned and inserting appropriate :s in the row below the header to select the alignment that Pandoc will use.
The current
"grid"
table format in Tabulate's documentation says:It is true that the tables are similar to each other, but there is a nasty interaction between the padding that Tabulate provides and how Pandoc interprets grid tables. Specifically, the documentation for Pandoc's
grid_tables
states:So each cell in the grid table is treated as essentially a new Markdown scope. In the Markdown spec, Markdown indented by 4 spaces is treated as a verbatim code block. For a column of integers, Tabulate will default to right-aligning the content in the cells, which Pandoc then interprets as a verbatim code block instead of standard text. For example:
is rendered as:
Forcing Tabulate to left-align the cells does allow it to render properly:
But Pandoc does support syntax for right-aligning cell content (using a colon, similar to
pipe
tables):I think Tabulate should provide a new output format,
pandoc_grid
orgrid_tables
or something that produces a table similar to existinggrid
tables, but with cell content always left-aligned and inserting appropriate:
s in the row below the header to select the alignment that Pandoc will use.