作者:Yihui Xie
译者:郑宝童
日期:2021.05.26
2.9 Index
Currently the index is only supported for LaTeX/PDF output. To print an index after the book, you can use the LaTeX package makeidx in the preamble (see Section 4.1):
目前,该索引只支持LaTeX/PDF输出。要在书的后面打印索引,你可以在序言中使用LaTeX包makeidx(参见 4.1节):
\usepackage{makeidx}
\makeindex
Then insert \printindex
at the end of your book through the YAML option includes -> after_body
. An index entry can be created via the \index{}
command in the book body, e.g., \index{GIT}
.
然后通过YAML选项include -> after_body
在书的末尾插入\printindex
。一个索引条目可以通过在书体中的\index{}
命令来创建,例如,\index{GIT}。