我有一个关于如何在Asciidoc中布局一些半表格数据的查询。
我目前拥有的逐字Asciidoc就是这个,包括一些来自周围叙述的常规文本(来自关于Java GC的部分,使用一个非常简化的案例研究):
The heap parameters are set up as shown, and we assume that they do not change over time.
Of course a real application would normally have a dynamically resizing heap, but this
example is to illustrate a simple case study.
----
Overall heap size: 2G
Old generation: 1.5G
Young generation: 500M
Eden: 400M
S1: 50M
S2: 50M
----
After the application has reached its steady state, the following GC metrics
are observed:
----
Allocation rate: 100M/s
Young GC time: 0ms
Full GC time: 100ms
Object lifetime: 200ms
----
So at steady state, a young GC will occur every 4 seconds.
我的问题是:这是解决这个问题的唯一方法吗?还有哪些其他方法?我是一个相当熟练的Asciidoc用户,但一直磕磕绊绊地看待新功能,这让我觉得也许我可以采用另一种布局方法。
答案 0 :(得分:2)
如果要以一种很好的方式格式化数据,可以将数据格式化为表格。指定“分隔符分隔符”(dsv
)作为格式,您将获得一个漂亮的表格。
此外,您可以指定分隔符以确保仅使用:
(第二个示例):
The heap parameters are set up as shown, and we assume that they do not change over time.
Of course a real application would normally have a dynamically resizing heap, but this
example is to illustrate a simple case study.
[format="dsv"]
|====
Overall heap size: 2G
Old generation: 1.5G
Young generation: 500M
Eden: 400M
S1: 50M
S2: 50M
|====
After the application has reached its steady state, the following GC metrics
are observed:
[format="dsv",separator=":"]
|====
Allocation rate: 100M/s
Young GC time: 0ms
Full GC time: 100ms
Object lifetime: 200ms
|====
So at steady state, a young GC will occur every 4 seconds.
这使您还可以在表格的属性中指定对齐,宽度和其他单元格属性:http://www.methods.co.nz/asciidoc/chunked/ch23.html
这就是你要找的地方吗?