在rmarkdownPDF和HTML中,我想要两个参考书目 - 一个用于论文/书籍,另一个用于我在研究中使用的软件.我发现了这个相关问题,但它没有回答我的问题,因为它涉及将两个*.bib文件组合成一个参考书目.
我已习惯<div id="refs"></div>按照此处的说明放置我的参考书目.可能第二个可以放置类似<div id="refs_2"></div>,但我无法弄清楚如何做到这一点,因为这"refs"似乎没有在任何地方定义.
我通常像这样在YAML标题中定义软件
nocite: |
@xie_knitr:_2018, @allaire_rmarkdown:_2018, @rstudio_team_rstudio:_2016,
@r_development_core_team_r:_2018
Run Code Online (Sandbox Code Playgroud)
所以我不必每次都经常将它复制粘贴到*.bib文件中(这适用于一个参考书目).理想情况下,这个列表nocite:会显示为另一个标题为"软件"的新参考书目,但我也会对两个*.bib文件解决方案感到满意.
该预期产出将是这样的:
有没有人这样做过,可以解释一下如何做到这一点?
[我的环境:Win 7 Pro/R 3.2.1/knitr_1.12.3/R Studio版本0.99.892]
我正在尝试.Rmd使用R Studio,Knit - > PDF格式撰写文章,我一直关注http://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html,详细了解如何获取pandoc和pandoc-citeproc制作参考文献部分和引文中的文字.
我的中文提供参考是在几个不同的.bib文件,这些文件在使用乳胶时.Rnw的文件,都是在发现我的本地texmf目录树下通过
\bibliography{statistics, graphics}
Run Code Online (Sandbox Code Playgroud)
我似乎无法使这项工作pandoc-citeproc.我的YAML标头具有以下内容,适用于一个 .bib文件,只要它与源.Rmd文件位于同一目录中:
---
title: "Notes on Testing Equality of Covariance Matrices"
author: "Michael Friendly"
date: '`r format(Sys.time(), "%B %d, %Y")`'
output:
pdf_document:
fig_caption: yes
keep_tex: yes
number_sections: yes
csl: apa.csl
bibliography: statistics.bib
---
Run Code Online (Sandbox Code Playgroud)
根据上面给出的链接中的建议,我试过:
bibliography: [statistics.bib,graphics.bib]
Run Code Online (Sandbox Code Playgroud)
这给了:
pandoc-citeproc.exe: "stdin" (line 50, column 12):
unexpected ":"
expecting letter, …Run Code Online (Sandbox Code Playgroud)