【发布时间】:2016-01-06 19:55:13
【问题描述】:
有一些像...这样的块的 AsciiDoc
----
this is a test
with *some* formatted/tabbed text in it
blah
----
...我希望文本显示为...
这是一个测试
其中包含 一些 格式化/选项卡式文本
废话
...“some”这个词是粗体的。
【问题讨论】:
标签: asciidoc asciidoctor
有一些像...这样的块的 AsciiDoc
----
this is a test
with *some* formatted/tabbed text in it
blah
----
...我希望文本显示为...
这是一个测试
其中包含 一些 格式化/选项卡式文本
废话
...“some”这个词是粗体的。
【问题讨论】:
标签: asciidoc asciidoctor
在 AsciiDoc 中,双 ---- 行表示 ListingBlocks,它只保留文本的某些格式方面(line 和 whitespace 格式化),根据AsciiDoc documentation on Delimited Blocks(with the exception of using[subs="quotes"],就像你noted in your answer)。
在分隔块中包含粗体格式的其他方法包括 “警告块”、ExampleBlock、OpenBlock、QuoteBlock 和 SidebarBlock options。
示例块:
**Admonition Block:**
[NOTE]
====
here *is* my text
====
**Example Block:**
====
here *is* my text
====
**Open Block:**
--
here *is* my text
--
**Quote Block:**
[quote, quote author]
____
here *is* my text
____
**Sidebar Block:**
****
here *is* my text
****
示例块输出:
【讨论】:
[subs="quotes"] 属性的好发现!
这是我想出的。这篇文章很有帮助...
http://www.methods.co.nz/asciidoc/faq.html#_how_can_i_format_text_inside_a_listing_block
[subs="quotes"]
----
this is a test
with *some* formatted/tabbed text in it
blah
----
除了向文本添加格式(在本例中为粗体)之外,这还允许我保留文本中的格式/空白。
【讨论】:
据我所知,这只能通过 docbook 代码实现,您可以看到 example here:
++++
<screen>hostname $ <userinput>date</userinput>
Sun Apr 1 12:34:56 GMT 1984</screen>
++++
当然,只有在您的引擎配置了screen 和userinput 的校正样式时,它才会起作用。
【讨论】: