Skip to content
lvjr edited this page Feb 8, 2022 · 5 revisions

LaTeX tables are implemented using TeX commands such as \halign, \noalign, \span, and \omit. In order to implement new features, many macro packages have modified the inner table commands inside LaTeX. This makes package code complicated, difficult to maintain, and often conflicts with each other.

At present, the LaTeX3 programming layer is basically mature. This tabularray package will discard the old \halign commands and directly use LaTeX3 functions to parse the table, and then typeset the entire table. Under the premise of being compatible with the basic syntax of LaTeX2 tables, this macro package will completely separate the contents and styles of the table, and the styles of the table can be completely set in keyval way.


排版 LaTeX 表格,功能最全面的要属 tabu 宏包。但是这个宏包多年未更新,从 2019 年开始与最新的 LaTeX 内核不再兼容,和其他宏包比如 xcolor 也会有冲突。

实际上,LaTeX 的表格都是使用 \halign\noalign\span\omit 等 TeX 命令实现的。各个宏包为实现新的功能,就得修改 LaTeX 内部的表格命令。这就导致宏包代码复杂,难以维护,且经常互相冲突。

目前 LaTeX3 编程框架已经基本成熟,这个 tabularray 宏包将抛弃旧有的 \halign 等命令,直接用 LaTeX3 函数解析表格内容和格式,然后排版出整个表格。这个宏包在兼容 LaTeX2 表格基本语法的前提下,将实现表格的内容与格式的彻底分离,可以用 keyval 方式完全设定表格的样式。


非常感谢耿楠老师提供和更新这个宏包的中文文档,你可以到这里下载中文文档。

Clone this wiki locally