MathJax icon indicating copy to clipboard operation
MathJax copied to clipboard

implement colspan/rowspan

Open pkra opened this issue 10 years ago • 6 comments

Spec

pkra avatar Mar 17 '15 14:03 pkra

Blocks #390.

pkra avatar Apr 15 '15 14:04 pkra

Any reason this was closed? This is something I've been needing recently so that I can label rows and columns of matrices e.g. to do this sort've thing.

Jamesernator avatar Mar 17 '21 00:03 Jamesernator

I appreciate that this is a longstanding issue that has not seen much movement, which is probably the reason why it was closed. And naturally, every user is allowed to close their own issues.

On the other hand I agree with @Jamesernator that this is an important use case. And I can think of some others that might even go beyond row/columnspan. I will therefore reopen the issue.

zorkow avatar Mar 19 '21 16:03 zorkow

+1 for supporting at least columnspan and hence \multicolumn. The HTML render of the next-gen WebAssembly spec is currently broken by the lack of support for multicolumn, with no obvious workaround.

rossberg avatar Jun 13 '24 15:06 rossberg

+1 I can confirm that the current workarounds for \multicolumn are quite hacky and unreliable. Implementing it would enable more advanced alignments and layouts, which would be especially useful for forums and apps that support MathJax better than HTML (e.g., Obsidian.md).

I’m not sure how challenging it would be to implement the required colspan, but I might look into it when I have some time.

JWDhast avatar Jun 15 '25 11:06 JWDhast

@JWDhast, rowspan and colspan are certainly on the list of things to do, but it won't happen until after the v4.0 release, and I'm not sure when after that.

It is a significant challenge, and will likely require a complete rewrite of large portions of the table code in the output jax. The CHTML output will probably need to be changed to use a grid layout rather than the current table layout in order to make this work, for example. The table output code is already pretty complicated ignorer to handle all the various mtable attributes, alignment options, and line breaking within the cells. So it is not a small project.

dpvc avatar Jun 18 '25 15:06 dpvc