问题
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