docbook - 如何从简单的 'asciidoctor file.txt -o file.html' 命令设置 Asciidoc toc.section.depth 值?

标签 docbook tableofcontents asciidoc asciidoctor

This FAQ section描述了如何设置目录中显示的“节深度”/“TOC 级别”/toclevel。但是,我不知道如何在我的简单中实现它:

$ asciidoctor my.txt -o my.html

命令。有人吗?

最佳答案

toclevels 属性对此进行控制。

来自 https://asciidoctor.org/docs/user-manual/#user-toc-levels :

By default, the TOC will display level 1 and level 2 section titles. You can set a different depth with the toclevels attribute.

:toc:
:toclevels: 4
  1. The toc attribute must be set in order to use toclevels.
  2. toclevels is set and assigned the value 4 in the document’s header. The TOC will list the titles of the section 1, 2, 3, and 4 levels when the document is rendered.

关于docbook - 如何从简单的 'asciidoctor file.txt -o file.html' 命令设置 Asciidoc toc.section.depth 值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31255103/

相关文章:

docbook - 无法从 DB5 文档中删除命名空间,无法继续 xsl :message on line 162 of docbook. xsl 处出现错误:

xml - 使用预先创建的 PDF 页面作为书籍封面

python - 实现自定义 pretty-print 的最佳方法

html - CSS 样式化目录

excel - 如何从Word文件中提取标题到Excel?

github - AsciiDoc:如何将 youtube 视频嵌入到 github 风格的 asciidoc 中?

xslt - 从 DocBook 中的 'list of figures' 中删除引用

markdown - 潘多克 : How to add a table before the table of content?

asciidoc - 如何在 AsciiDoc 中为图形添加空白标题

atom-editor - 如何通过位于不同文件夹中的许多 .adoc 文件正确引用图像