Table layouts for use with Pandoc

∥☆過路亽.° 提交于 2019-12-06 00:57:40

Indeed, Pandoc doesn't (currently) support col- or rowspans.

If you absolutely need cell-spans for multiple output formats, your best bet is to write your tables (inside pandoc markdown's codeblocks or a <div class="table">) in whatever format you desire (e.g. HTML or even reStructuredText). Then you can write one pandoc filter that converts this part of the pandoc AST to HTML, and another filter that converts it to LaTeX.

From https://github.com/jgm/pandoc/wiki/Pandoc-vs-Multimarkdown:
"Pandoc's pipe tables [...] do not have all of the features of MMD pipe tables (sections, colspan, rowspan, grouping)."

Therefore, maybe a workaround could be to handle (complex) tables in reStructuredText in seperate files and include them afterwards. This are just my 2¢ because I will likely have to face this task not until a few weeks. If you found a solution please post it! I'm very curious, greets!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!