按照版主的要求,补充相关的文档内容:
主要文档内容:
---
title: "参考文献测试"
documentclass: ctexart
bibliography: Bib.bib
csl: chinese-gb7714-2005-numeric.csl
output:
word_document: default
rticles::ctex:
fig_caption: yes
number_sections: no
toc: no
---
引用两篇文献,一篇为[@du2002mixture],另一篇为[@Becker_2016]。
Bib.bib文档内容:
@phdthesis{du2002mixture,
title={Combined algorithms for fitting finite mixture distributions},
author={Du, J},
school={Hamilton: McMaster University},
year={2002}
}
@Manual{Becker_2016,
title = {mapdata: Extra Map Databases},
author = {Original S code by Richard A. Becker and Allan R. Wilks. R version by Ray Brownrigg.},
year = {2016},
note = {R package version 2.2-6},
url = {https://CRAN.R-project.org/package=mapdata},
}
csl文档(chinese-gb7714-2005-numeric.csl)可以在 <https://www.zotero.org/styles/> 网页搜索下载。
文档链接:
https://pan.baidu.com/s/11kz_Kp09XWL2wph2MulZhA
3个文档放在同一文件夹,然后运行:
rmarkdown::render("ReferenceTest.rmd")
出现如下错误:
processing file: ReferenceTest.rmd
|
| | 0%
|
|.................................................................| 100%
ordinary text without R code
output file: ReferenceTest.knit.md
"C:/PROGRA~2/Pandoc/pandoc" +RTS -K512m -RTS ReferenceTest.utf8.md --to docx --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash+smart --output ReferenceTest.docx --highlight-style tango --filter pandoc-citeproc
pandoc-citeproc: ParseError {errorContexts = [], errorMessage = "Failed reading: takeWhile1", errorPosition = 42:3 (2317)}
Error running filter pandoc-citeproc:
Filter returned error status 1
错误: pandoc document conversion failed with error 83
此外: Warning message:
运行命令'"C:/PROGRA~2/Pandoc/pandoc" +RTS -K512m -RTS ReferenceTest.utf8.md --to docx --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash+smart --output ReferenceTest.docx --highlight-style tango --filter pandoc-citeproc'的状态是83