【问题标题】:ASCIIDOC PDF Generation Footnote renders in the text and not to end of pageASCIIDOC PDF 生成脚注呈现在文本中而不是页面末尾
【发布时间】:2018-04-06 18:40:25
【问题描述】:

我在这里的第一个问题很兴奋

在我的 ASCIIDOC 代码中

Big Name{wj}footnote:[Big because X] is found.

这完美呈现到生成 html 的(一个很长的)页面的末尾。

Big Name⁠ [1] is found. 

<a lot of other text till the end of the one long html page>

--
1. Big because X

但生成 PDF 时它会呈现为文本:

Big Name⁠ [1: Big because X] is found. 

为什么 PDF 生成不同? 如何控制 PDF 生成过程中的渲染类型?

我用

asciidoctor sample.adoc
asciidoctor -r asciidoctor-pdf -b pdf sample.adoc

asciidoctor -v
Asciidoctor 1.5.4 [http://asciidoctor.org]
Runtime Environment (ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)

【问题讨论】:

标签: pdf-generation asciidoc footnotes


【解决方案1】:

asciidoctor-pdf 中似乎存在错误(请参阅https://github.com/asciidoctor/asciidoctor-pdf/issues/73)。

但是,我可以使用 asciidoctor-fopub 生成脚注(和其他与书籍相关的结构)(请参阅https://github.com/asciidoctor/asciidoctor-fopub)。

所以在下载fopub后,你必须先将adoc转换为xml,然后再将xml转换为pdf

因此命令将类似于以下内容:

asciidoctor -b docbook -a data-uri! your_document.adoc
/path/to/fopub your_document.xml

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-01-28
    • 2011-11-28
    • 2022-11-24
    • 1970-01-01
    • 2014-05-11
    • 2016-07-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多