MyST-Parser icon indicating copy to clipboard operation
MyST-Parser copied to clipboard

Tables go off page in PDF

Open uvidyadharan opened this issue 1 year ago • 4 comments

Describe the bug

context I am trying to generate a pdf of my sphinx documentation. I am using the xelatex engine. There are many tables in the markdown file I am using.

expectation I expect for the table to automatically be split into two pages.

bug Instead the table gets cut off after going into the table footer.

problem This is a problem for people using tables that want to make pdfs because they cannot use large tables. image

Reproduce the bug

File in question: Managing-a-Smartphone-Robot-Controller.md

git clone https://github.com/uvidyadharan/ftcdocs.git
cd ftcdocs/docs
git switch myst
make latexpdf

Open ftcdocs.pdf, go to page 263

List your environment

myst-parser==0.18.0 Sphinx==5.1.0 WSL Ubuntu-20.04

uvidyadharan avatar Jul 25 '22 13:07 uvidyadharan

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 Jul 25 '22 13:07 welcome[bot]

Hey @uvidyadharan, thanks for the feedback, however I fear that this may not be something that myst-parser itself can directly affect, since the conversion to LaTeX is handled upstream by Sphinx.

It would be good if you could/we could confirm if this is also an issue using sphinx's "built-in" restructuredtext (.rst) file format, i.e. like https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#tables, and seeing if there is the same outcome. Then we can know whether to forward this issue on to sphinx

chrisjsewell avatar Jul 25 '22 13:07 chrisjsewell

Thanks for the quick reply @chrisjsewell . I checked and you are correct. When I tried doing the same in an rst table the same problem came up as seen below. However when I looked more at it I realized that in rst there is a long table option for tables that breaks it up into multiple pages. Although it is too wide in some sections I believe that is something that can be configured such that it does not happen. I have added the result below. image image

uvidyadharan avatar Jul 25 '22 13:07 uvidyadharan

Would there be anyway to do something similar to :class: longtable in MyST?

uvidyadharan avatar Jul 25 '22 16:07 uvidyadharan