引用文件包:biblatex在R bookdown中不工作

引用文件包:biblatex在R bookdown中不工作,r,bookdown,biblatex,R,Bookdown,Biblatex,编辑:经过一些调查,这个问题实际上是关于输出yml中的以下选项: citation-package: biblatex bibliography: [likertimputebiblio.bib, packages.bib] biblatexoptions: [maxcitenames=2] csl: harvard-university-of-wolverhampton.csl link-citations: true nocite: | @R-bookdown site: book

编辑:经过一些调查,这个问题实际上是关于输出yml中的以下选项:

citation-package: biblatex
bibliography: [likertimputebiblio.bib, packages.bib]
biblatexoptions: [maxcitenames=2]
csl: harvard-university-of-wolverhampton.csl
link-citations: true
nocite: | 
  @R-bookdown
site: bookdown::bookdown_site
documentclass: book
header-includes:
  - \usepackage[backend=bibtex, maxcitenames=2, style=authoryear]{biblatex}
如果没有此选项,bookdown将使用默认的citeproc,并且不清楚如何修改作者数量。但是,当使用此选项时,引用不再起作用,并且我的文档只包含粗体的引用名称,而不包含内联引用。所以我真的需要知道为什么引用包:biblatex不起作用

====下面的原始问题

我无法使bookdown遵守我的maxcitename=2设置。我尝试过使用这个输出yml

output: 
  bookdown::pdf_book:
    includes:
      in_header: preamble.tex
    keep_tex: yes
    toc_depth: 3
    toc_appendix: yes
在Premission.tex文件中使用此行:

\usepackage[backend=bibtex, maxcitenames=2, style=authoryear]{biblatex}
我还尝试使用此输出yml:

citation-package: biblatex
bibliography: [likertimputebiblio.bib, packages.bib]
biblatexoptions: [maxcitenames=2]
csl: harvard-university-of-wolverhampton.csl
link-citations: true
nocite: | 
  @R-bookdown
site: bookdown::bookdown_site
documentclass: book
header-includes:
  - \usepackage[backend=bibtex, maxcitenames=2, style=authoryear]{biblatex}
我还尝试了这个输出yml:

citation-package: biblatex
bibliography: [likertimputebiblio.bib, packages.bib]
biblatexoptions: [maxcitenames=2]
csl: harvard-university-of-wolverhampton.csl
link-citations: true
nocite: | 
  @R-bookdown
site: bookdown::bookdown_site
documentclass: book
header-includes:
  - \usepackage[backend=bibtex, maxcitenames=2, style=authoryear]{biblatex}
但似乎什么都不管用


请帮忙。谢谢。

经过不懈的努力,这个问题终于找到了解决办法

设置输出yml时,缩进到输出:等下

citation_package: biblatex
。。。内联引用未能链接到.bib文件,因此引用名称仅以粗体显示,并且无法进行任何内联引用

预期的解决方案应该是使用附加选项:

biblatexoptions: [backend=bibtex, maxcitenames=2]
(maxcitenames=2是我希望使用biblatex的主要原因),但这失败了,错误为“option backend not Recognited” 最后,解决方案是修改目录中的默认模板

C:\Program Files\R-3.4.0\library\rmarkdown\rmd\latex
在第100行,从

\usepackage$if(biblio-style)$[style=$biblio-style$]$endif${biblatex}


我想向软件包作者建议,这是一个需要修复的bug,因为backend=bibtex是一个有效的选项,应该已经通过了

请准确描述它是如何破坏的?这只是一个例子吗?如果没有更多信息,我们无法判断。或者,生成的.tex文件是什么样子的?它包括你的标题吗?如果是这样的话,那么这可能不是一个簿记问题。嗨,这似乎是一个类似于所描述的问题。然而,它认为这是一个预订问题,因为这是一个类似的问题,但不完全相同。maxcitenames对autheryear格式使用默认的3。如果我在preamble.tex文件中使用该行,那么它将按预期显示在main.tex文件中。然而,如果在输出yml中使用它,它不会被拉入。我确实认为这是一个簿记问题,因为我看到main.tex文件中的名称呈现不正确,因为它们已经被部分处理过了。此外,这一行\usepackage[backend=bibtex,maxcitenames=2,style=authoryear]{biblatex}在knitr编译的R swave文件(.Rnw)中工作得非常好,而且,我现在发现,包含引文的输出yml_package:biblatex(与include处于相同的缩进级别)实际上会破坏所有的文本内引文。它们只是用粗体的围兜出现。