jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34k stars 3.35k forks source link

typst: table colspan not supported #9466

Closed pzeinlinger closed 5 months ago

pzeinlinger commented 7 months ago

The latex writer does not support the colspan attribute.

Minimal example available here https://pandoc.org/try/?params=%7B%22text%22%3A%22%3Ctable%3E%5Cn%3Cthead%3E%5Cn%3Ctr+class%3D%5C%22header%5C%22%3E%5Cn%3Cth%3E%3Cp%3E1%3C%2Fp%3E%3C%2Fth%3E%5Cn%3Cth%3E%3Cp%3E2%3C%2Fp%3E%3C%2Fth%3E%5Cn%3Cth%3E%3Cp%3E3%3C%2Fp%3E%3C%2Fth%3E%5Cn%3Cth%3E%3Cp%3E4%3C%2Fp%3E%3C%2Fth%3E%5Cn%3C%2Ftr%3E%5Cn%3C%2Fthead%3E%5Cn%3Ctbody%3E%5Cn%3Ctr%3E%5Cn%3Ctd+colspan%3D%5C%224%5C%22%3EColumn+1-4%3C%2Ftd%3E%5Cn%3C%2Ftr%3E%5Cn%3C%2Ftbody%3E%5Cn%3C%2Ftable%3E%5Cn%22%2C%22to%22%3A%22typst%22%2C%22from%22%3A%22html%22%2C%22standalone%22%3Afalse%2C%22embed-resources%22%3Afalse%2C%22table-of-contents%22%3Afalse%2C%22number-sections%22%3Afalse%2C%22citeproc%22%3Afalse%2C%22html-math-method%22%3A%22plain%22%2C%22wrap%22%3A%22auto%22%2C%22highlight-style%22%3Anull%2C%22files%22%3A%7B%7D%2C%22template%22%3Anull%7D

Typst has had support for col spanning cells with the external tablex package for some time now and has recently included it into the standard table as well https://github.com/typst/typst/pull/3239.

jgm commented 7 months ago

That change is not yet in any released version. When it is released, we can try to support it. The LaTeX writer can support colspans, but the typst parser does not recognize them since there is still no official support for them.

pzeinlinger commented 5 months ago

Typst v0.11 has recently been released: https://github.com/typst/typst/releases/tag/v0.11.0 Support for colspans is now natively available.

jgm commented 5 months ago

I've already added commits that support colspans and rowspans for typst (both input and output). It's not yet in a released version of pandoc but it will be in the next release. So, closing this.