如何在bookdown中文Bookdown Chinese example上指定csl参考书目样式,例如zotero one CSL。
我将csl文件下载到工作目录,并在index.Rmd YAML标头中指定为
bibliography: book.bib
biblio-style: chinese-gb7714-2005-numeric
或
bibliography: book.bib
biblio-style: chinese-gb7714-2005-numeric.csl
但Rstudio向我发起了承诺:
Error: Failed to build the bibliography via bibtex
Please delete bookdown.Rmd after you finish debugging the error.
Execution halted
Exited with status 1.
当我把它改成
时bibliography: book.bib
csl: chinese-gb7714-2005-numeric
或
bibliography: book.bib
csl: chinese-gb7714-2005-numeric.csl
我可以构建这本书,但是参考列表样式不是CSL期望的样式。
所有YAML标题
---
title: "题名"
author: "姓名"
date: "`r Sys.Date()`"
bibliography: book.bib
description: "矮脚黄"
documentclass: ctexbook
geometry:
- b5paper
- tmargin=2.5cm
- bmargin=2.5cm
- lmargin=3.5cm
- rmargin=2.5cm
github-repo: yihui/bookdown-chinese
indent: 2m
link-citations: yes
lof: no
lot: no
colorlinks: yes
site: bookdown::bookdown_site
biblio-style: unsrt
whitespace: none
---
更新
答案 0 :(得分:1)
你可能错过了两行:
的完整程序
- 在_output.yml
中设置citation_package: none
- 在_output.yml中添加所有格式(gitbook,pdf_book,epub_book)行
pandoc_args: [ "--csl", "chinese-gb7714-2005-numeric.csl" ]