-
Notifications
You must be signed in to change notification settings - Fork 191
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
Markdown tables break texinfo builder because of float colspec #540
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
Same thing with text builder:
|
This could be fixed by removing the second parameter of MyST-Parser/myst_parser/docutils_renderer.py Line 912 in ee5ff3b
@@ -909,7 +909,7 @@
# column settings element
maxcols = len(header_row.children)
- colwidths = [round(100 / maxcols, 2)] * maxcols
+ colwidths = [round(100 / maxcols)] * maxcols
tgroup = nodes.tgroup(cols=len(colwidths))
table += tgroup
for colwidth in colwidths: But this may cause problems elsewhere. |
Heya, i.e. it uses the floor division operator: https://docs.python.org/3/reference/expressions.html#binary-arithmetic-operations, |
Describe the bug
context
When I run
make texinfo
using markdown tables...expectation
Build should succeed.
bug
But instead it fails with:
problem
This is a problem because it prevents from building info pages.
cause
MyST seems to generate incorrect colspecs, containing floats, when Sphinx texinfo builder seems to expect ints:
Maybe this should be fixed in Sphinx instead, by making sure
n
is an int here:https://github.com/sphinx-doc/sphinx/blob/223b1a94f2cd1d2af6297fa419ab96758ddd31e2/sphinx/writers/texinfo.py#L1014
Reproduce the bug
Here is a reproducer:
List your environment
all python programs installed via pip in a virtualenv:
The text was updated successfully, but these errors were encountered: