如何使用多说明符格式化 asciidoc 中的列

How to use multi specifiers to format column in asciidoc

在 AsciiDoc 手册 23.2. Column Formatting 中,它说:

To apply a specifier to a column, you must set the cols attribute and assign it a value. A column specifier can contain any of the following components:

  • multiplier
  • align
  • width
  • style

Each component is optional.

但我没有找到使用多个说明符的示例。

例如,我想在下面 table.

中同时使用宽度和样式说明符
[cols="h,a,a",options="header"]
|=== 
|   | compare times     | move times
| 1 | n-1               | 2n-2
| 2 | (n-1)(n+4)/4      | (n-1)(n+8)/4
| 3 | (n-1)(n+2)/2      | (n-1)(n+4)/2
|=== 

由于第一列的文本很少,所以我想给它添加属性[cols="1,4,4"]

我不知道如何实现,有人可以帮助我吗?

您链接到的 Asciidoctor 文档部分包含复合列格式说明符的多个示例,包括相对宽度、居中、left/right 对齐、垂直对齐和样式。

对于您的 table,您的 cols 规格应为:

[cols="1h,4a,4a", options="header"]