[英]R bookdown: list of abbreviations with LaTeX nomenclature package
Generating an index in R bookdown works perfectly well. 在R bookdown中生成索引效果很好。
Adding a list of abbreviations with the nomenclature package is more difficult: I added to preamble.tex
使用命名包添加缩写列表更加困难:我添加到
preamble.tex
\usepackage{nomenclature}
\makenomenclature
And then I include a file calling the \\printnomenclature
macro via the after_body
include option in the yaml header. 然后,我通过yaml标头中的
after_body
include选项包含一个调用\\printnomenclature
宏的文件。
Actually, I already have a pretty good idea, what the problem is: Usually, one calls makeindex
when generating the nomenclature list with LaTeX. 实际上,我已经有了一个很好的主意,问题是什么:通常,在使用LaTeX生成命名列表时,人们会调用
makeindex
。 This magically works for the index, but for the nomenclature package, there seems to be a need for some manual work. 这对于索引是神奇的,但是对于命名包,似乎需要一些手动工作。
Since RStudio does not know about special makeindex
calls, you could install a tool like latexmk
and configure RStudio to use that by putting Sys.setenv(RSTUDIO_PDFLATEX = "latexmk")
somewhere in your main Rmd
file, cf Is there a way to add chapter bibliographies using bookdown? 由于RStudio不知道特殊的
makeindex
调用,因此您可以安装latexmk
类的工具,并通过将Sys.setenv(RSTUDIO_PDFLATEX = "latexmk")
放在主Rmd
文件中的某个位置来配置RStudio以使用该工具,请参见是否可以添加章节书目使用书本?
[Not tested since you do not provide a minimal example.] [未经测试,因为您没有提供最小的示例。]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.