Tra*_*cer 5 markdown cpu-word pandoc
我正在使用 Pandoc 2.10.1 从 Markdown 转换为 DOCX。我的源文件中有 2 个表,它们的样式应该不同。我知道:
Table,Table这个样式参考文档中的样式但我无法弄清楚的是,一个表应如何具有默认Table样式,而另一个表应如何具有MyGoodTable样式。我尝试过对一张桌子什么都不做,并将另一张桌子围在一个有围栏的 div 中,如下所示:
:::{custom-style=MyTableStyle}
+-----+-----+-----+
| A | B | C |
+=====+=====+=====+
| 10 | 11 | 12 |
+-----+-----+-----+
| 20 | 21 | 22 |
+-----+-----+-----+
| 30 | 31 | 33 |
+-----+-----+-----+
:::
Run Code Online (Sandbox Code Playgroud)
然而,这不起作用,即使我的参考文档具有MyTableStyle表格样式。
那么,文档中的一个表格如何具有一种样式,而同一文档中的另一个表格具有另一种样式呢?
Ale*_*lex -2
这实际上是Python-Markdown的解决方案,而不是 DOCX 的解决方案。但也许它可以以某种方式进行调整,或者对那些通过标题发现这个问题的人有用。
The default table stile:
Item No | Name | Description | Price
--------|------|-------------|------
1 | Chair | Kitchen chair | 101.50
2 | Table | Kitchen table | 450.00
The "plated" table style:
<div class="tablePlated"></div>
|Item No | Name | Description | Price|
|--------|------|-------------|------|
|1 | Chair | Kitchen chair | 101.50|
|2 | Table | Kitchen table | 450.00|
And the "gridded" table style:
<div class="tableGridded"></div>
Item No | Name | Description | Price
--------|------|-------------|------
1 | Chair | Kitchen chair | 101.50
2 | Table | Kitchen table | 450.00
Run Code Online (Sandbox Code Playgroud)
以下是 CSS 规则:
The default table stile:
Item No | Name | Description | Price
--------|------|-------------|------
1 | Chair | Kitchen chair | 101.50
2 | Table | Kitchen table | 450.00
The "plated" table style:
<div class="tablePlated"></div>
|Item No | Name | Description | Price|
|--------|------|-------------|------|
|1 | Chair | Kitchen chair | 101.50|
|2 | Table | Kitchen table | 450.00|
And the "gridded" table style:
<div class="tableGridded"></div>
Item No | Name | Description | Price
--------|------|-------------|------
1 | Chair | Kitchen chair | 101.50
2 | Table | Kitchen table | 450.00
Run Code Online (Sandbox Code Playgroud)
这是结果:
| 归档时间: |
|
| 查看次数: |
513 次 |
| 最近记录: |