尝试创建引文时(在 RStudio 版本 1.2.1335 中)将 RMarkdown 文件编织为 PDF 失败(对于 pandoc 版本 2.8.0.1 和 R 版本 3.6.1)。(例如,在编织到 HTML 时不会发生这种情况。)
这是一个小代表。前任。在 RMarkdown 中:
---
title: "Rep. Ex. for 'LaTeX Error: Environment cslreferences undefined'"
output:
pdf_document: default
bibliography: report.bib
---
```{r generate-bibtex-file, include=FALSE}
knitr::write_bib(file = "report.bib", prefix = "")
```
# Used R version
R 3.6.1 [@base]
# References
Run Code Online (Sandbox Code Playgroud)
编织它作为最终输出(在我的机器上):
"C:/PROGRA~1/Pandoc/pandoc" +RTS -K512m -RTS RepEx.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output RepEx.tex --template "C:\Users\ gcb7\Documents\R\win-library\3.6\rmarkdown\rmd\latex\default-1.17.0.2.tex" --highlight-style tango --pdf-engine pdflatex --variable graphics=yes --lua-filter " C:/Users/gcb7/Documents/R/win-library/3.6/rmarkdown/rmd/lua/pagebreak.lua" …