executablebooks / MyST-Parser

An extended commonmark compliant parser, with bridges to docutils/sphinx
https://myst-parser.readthedocs.io
MIT License
759 stars 196 forks source link

Documentation about Tables appears to be wrong #814

Open diggidende opened 1 year ago

diggidende commented 1 year ago

Describe the gap in the current documentation

The documentation about tables suggests to use the following notation for tables with captions (see https://github.com/executablebooks/MyST-Parser/blob/master/docs/syntax/tables.md?plain=1#L40):

:::{table} Table caption
:widths: auto
:align: center

| foo | bar |
| --- | --- |
| baz | bim |
:::

But running Sphinx (with the MyST extension) to produce HTML does not produce the expected result, see screenshot (using the Furo theme): image

After replacing the colons ::: by backticks ``` (and removing :align: center - which is the default anyways) the results look as expected: image

Interestingly, on the same page in section 4, the documentation suggests to use backticks (rather than colons) for CSV tables, so there is some inconsistency (see https://myst-parser.readthedocs.io/en/latest/syntax/tables.html#csv-tables)

Describe the solution you'd like

Please review of the documentation of tables, and correct it where necessary.

welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada: