使用 asciidoc ,我想在第三页上放一个目录。充其量,我只能设法把它放在第 2 页;在标题页之后。
我的期望是这样的事情应该有效:
= My book
A book to enjoy
== Preface
Enjoy my book
== Table of contents
:toc:
== Chapter One
It was the best of times ...
...但目录仍然在第 2 页结束。
是否可以选择放置目录的位置?
编辑:
我想要在不同页面上的 TOC 的原因是因为我正在复制一个模板,该模板在目录之前有一个部分。
最佳答案
有可能,但并非所有后端都支持 .
设置 :toc: macro
让您使用 toc::[]
文档中任意位置的宏。
由于在您的示例中您似乎想要自定义 TOC 标题,因此我使用了 :toc-title:
摆脱默认的 TOC 标题。
:toc: macro
:toc-title:
= My book
A book to enjoy
== Preface
Enjoy my book
== Table of contents
toc::[]
== Chapter One
It was the best of times ...
有关更多信息,请参阅:
你可以在这里测试代码:https://asciidoclive.com/
关于asciidoc - 不在标题页之后立即放置目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50031067/