jupyter-book icon indicating copy to clipboard operation
jupyter-book copied to clipboard

Markdown tables ignore alignment

Open ThorpeJosh opened this issue 2 years ago • 4 comments

Describe the bug

context When I create a table in markdown

expectation I expected the alignment to render according to the markdown syntax for table alignment.

bug But instead all cell or column alignment is always left, despite specifying center or right

example

Jupyterbook docs Here the markdown syntax says the table should have the Validation column aligned right, as it is rendered here in Github below,

Training Validation
0 5
13720 2744

however the jupyterbooks render as shown in the link above is aligned left.

Reproduce the bug

  1. Go to Jupyterbook docs and copy the example table markdown code.
  2. Paste the markdown in a markdown file and render it in a jupyterbook, with default theme/settings.

List your environment

Jupyter Book : 0.12.2 External ToC : 0.2.4 MyST-Parser : 0.15.2 MyST-NB : 0.13.2 Sphinx Book Theme : 0.1.10 Jupyter-Cache : 0.4.3 NbClient : 0.5.11

ThorpeJosh avatar Feb 27 '22 23:02 ThorpeJosh

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:

welcome[bot] avatar Feb 27 '22 23:02 welcome[bot]

Heya this will be fixed once jupyter-book is updated to myst-parser 0.16: https://myst-parser.readthedocs.io/en/latest/develop/_changelog.html#improvements-to-table-rendering

chrisjsewell avatar Feb 28 '22 00:02 chrisjsewell

@chrisjsewell should this wait for the current myst-nb work to be released?

https://github.com/executablebooks/MyST-NB/pull/380

Or do you think it is worth tagging an intermediate release of myst-nb to move myst-parser from 0.15.2 to 0.16.1

mmcky avatar Apr 13 '22 07:04 mmcky

@chrisjsewell , I am new to Jupyterbook and also experience the same problem with all tables being left aligned instead of right (which I want for numeric columns). Any news on this issue? Here is my system info

$ jb --version
Jupyter Book      : 0.15.1
External ToC      : 0.3.1
MyST-Parser       : 0.18.1
MyST-NB           : 0.17.2
Sphinx Book Theme : 1.0.1
Jupyter-Cache     : 0.6.1
NbClient          : 0.7.3

I simply use this command jupyter-book build UvA-ACOI and use the default _config.yml

Thanks!

maartenmarx avatar Dec 18 '23 08:12 maartenmarx