Adding natbib options for PDF output

微笑、不失礼 提交于 2019-12-11 03:19:27

问题


Is there a way to specify natibib options when outputting a PDF with bookdown? I want the tex output to have the command

\usepackage[sort&compress]{natbib}

But there doesn't seem to be any way to specify it in the YAML. I can't add the command to my preamble, because the template already adds \usepackage{natbib}. What's the correct way to pass package options to natbib?


回答1:


As of this commit, the default LaTeX template supports natbib options in the YAML via the variable natbiboptions. I presume this will propagate to rmarkdown when pandoc gets it's next official update. Until then, you can set bookdown to use the new template and pass the geometry: "margins=1in" to get the default bookdown pdf style with custom natbib options.



来源:https://stackoverflow.com/questions/44770287/adding-natbib-options-for-pdf-output

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!