AsciiDoc在列表块中添加粗体文本

8

Have some AsciiDoc that has a block like...

----
  this is a test
    with *some* formatted/tabbed text in it
blah
----

...我希望文本显示为...

这是一个测试
    其中包含一些格式化/制表符文本
blah

...其中单词“一些”是粗体。

3个回答

4
在AsciiDoc中,双----行表示ListingBlocks,它们仅保留文本的某些格式方面(空格格式),根据AsciiDoc关于定界块的文档说明除了使用[subs="quotes"],正如您在回答中指出的那样)。
在定界块中包含粗体格式的其他方法包括"Admonition Block"ExampleBlockOpenBlockQuoteBlockSidebarBlock选项

示例块:

**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
****

示例区块输出:

示例区块输出


提示:本文是关于IT技术的相关内容翻译,请参考上述内容。

1
谢谢summea。我更新了问题以更好地反映我的问题。请查看下面的解决方案。如果您有更好的方法,请告诉我。 - Mark Locklear
1
@Lumbee,使用[subs="quotes"]属性真是个不错的发现! - summea

4

0
据我所知,这只能通过docbook代码实现,您可以在此处查看示例:。
++++
<screen>hostname $ <userinput>date</userinput>
Sun Apr  1 12:34:56 GMT 1984</screen>
++++

当然,只有在您的引擎配置了对screenuserinput的修正样式时,它才能起作用。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接