我正在使用asciidoc来整理一些用户文档。我需要一个PDF;我在Ubuntu上使用asciidoctor-pdf (Asciidoctor PDF 1.5.0.alpha.18使用Asciidoctor 1.5.5)
我有asciidoc项目符号列表;一些列表项目是穿插着小屏幕截图的文本说明。如果可能的话,我希望每个列表项都留在同一页上。
它们不会将所有内容都放在同一页面上:
[options="unbreakable"]
* Use the virtual keyboard to enter the letters and numbers of your network password: +
image:ss/ss_password_done_blurred.png[]这会将所有内容放在同一页上,但会在整个列表项周围放置一个框:
====
* Use the virtual keyboard to enter the letters and numbers of your network password: +
image:ss/ss_password_done_blurred.png[]
====有没有办法让普通段落或列表项变得牢不可破(或保持在一起)?
我是否需要使用不同于asciidoctor-pdf的工具链??
发布于 2019-07-20 08:53:09
首先想到的是隐藏示例块的边框和背景,只要块样式足以将您的内容保持在一起即可。类似于:
example:
border_color: ffffff
border_radius: 0
border_width: 0
background_color: ffffff
padding: 0Asciidoctor还提供的DocBook > PDF链可能更适合您,如果您期望有更多像这样的需求。在这个过程的另一端,您可以使用XSLT,它比基于Prawn的asciidoctor-pdf配置强大得多。请注意,该路由可能需要对输出进行更多的定制,以使其看起来像asciidoctor-pdf那样的现代/优雅(IMO,无从属关系)。
https://stackoverflow.com/questions/57064291
复制相似问题