0


我正在尝试使用 asciidoctor-pdf 呈现文档,该文档的页脚带有章节标题/页码。从到目前为止找到的示例中,我得到了这个:

= Title of the book
:notitle:
:toc: left
:toclevels: 8 
:sectnums:
:sectnumlevels: 8
:source-highlighter: coderay 
:icons: font
:front-cover-image: pic.jpg

footer:
  height: 0.5in
  line_height: 1
  recto_content:
    right: '{chapter-title} | *{page-number}*'
  verso_content:
    left: '*{page-number}* | {chapter-title}

   == Chapter 1

但是它不会产生页脚。我已经尝试过使用页脚和 :footer top 指令。有什么帮助可能是错的吗?

4

1 回答 1

2

如果你想为你的 pdf 设置样式,你不能把你的设置放在 adoc 文件中。您必须使用 pdf 主题。你在这里找到一个很长的解释

一个非常简短的摘要看起来像

  1. basic-theme.yml在目录中创建一个文件themes例如 basic-theme.yml
  2. 把你的页脚设置basic-theme.yml
  3. 使用您的样式asciidoctor-pdf -a pdf-stylesdir=themes -a pdf-style=basic 详细信息
于 2018-09-20T09:02:52.820 回答