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
- The
toc
attribute must be set in order to use toclevels.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/