我想使用.csl-file来格式化带有预订的引用。将csl: some-style.csl添加到index.Rmd会影响到gitbook的输出,但不会影响到pdf_book。我知道我可以指定biblio-style,但这只接受一些标准样式,而不是csl-文件。有合适的解决办法吗?
复制步骤:
.csl下载一些https://www.zotero.org/styles文件并复制到项目的根目录。csl: my_csl_file.csl添加到index.Rmd中的标头。index.Rmd中的标头
---
title: "A Minimal Book Example"
author: "Yihui Xie"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
documentclass: book
bibliography: [book.bib, packages.bib]
csl: american-sociological-review.csl
link-citations: yes
description: "This is a minimal example of using the bookdown package to write a book. The output format for this example is bookdown::gitbook."
---HTML输出(正确):

PDF输出(不正确):


发布于 2018-03-07 06:40:39
我也有同样的问题。以下程序对我有效:
chicago-author-date-de.cslcitation_package: nonepandoc_args: [ "--csl", "chicago-author-date-de.csl" ]biblio-style: apalike# References {-}替换06-引用的内容。这是我的_output.yml文件:
bookdown::gitbook:
css: style.css
pandoc_args: [ "--csl", "chicago-author-date-de.csl" ]
config:
toc:
before: |
<li><a href="./">A Minimal Book Example</a></li>
after: |
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
download: ["pdf", "epub"]
bookdown::pdf_book:
includes:
in_header: preamble.tex
latex_engine: xelatex
citation_package: none
pandoc_args: [ "--csl", "chicago-author-date-de.csl" ]
keep_tex: yes
bookdown::epub_book:
pandoc_args: [ "--csl", "chicago-author-date-de.csl" ]https://stackoverflow.com/questions/48965247
复制相似问题