sphinx, rinohtype:获取条纹表

sphinx, rinohtype: Getting striped tables

我无法理解如何使用 rinohtype 中的样式表来设置条纹 tables。例如,下面的代码在使用 rst2pdf

时生成一个条纹 table
.. list-table:: Table Caption
    
    * - Header 1
      - Header 2
    * - Row 1
      - Row 2

default matcher定义table体细胞背景在偶数行table体细胞背景在奇数行 选择器。尝试为自定义样式 sheet 中的那些分配样式,如下所示:

[table body cell background on even row]
fill_color = #00FF00

[table body cell background on odd row]
fill_color = #FF0000

要了解特定选择器接受哪些样式属性,请在上面链接的手册部分的选择器列表中单击相关样式。请参阅 matcher.py 查看这些选择器的定义。