我正在使用 Markdown 渲染 html bookdown
,并使用紧凑的数字引用样式,例如,1, 2, 3
显示为1-3
. 我希望在每一页的底部显示link-citations: yes
参考资料(有没有办法在每一页上显示所有引用的参考文献,但需要注意的是只有第一个和最后一个会被链接?
注意:所有参考文献都正确显示在最终参考书目中。
重现:
download.file('https://raw.githubusercontent.com/jgm/pandoc-citeproc/7d824e2e0d4698cf8a6d5e784aa0df27a0f2888a/tests/biblio.bib', 'ex.bib')
download.file('https://raw.githubusercontent.com/citation-style-language/styles/31187daa2c010df338c2bf9b7b30070c91b7af95/nature.csl', 'nature.csl')
并编织一个包含以下内容的降价文件:
---
title: A title
author: An author
bibliography: ex.bib
link-citations: yes
output:
bookdown::gitbook:
pandoc_args: [ "--csl", "nature.csl" ]
---
# Intro
baz [@item1; @item2; @пункт3]
# Refs
会话信息
> sessioninfo::session_info()
─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
setting value
version R version 3.6.0 (2019-04-26)
os macOS Mojave 10.14.3
system x86_64, darwin15.6.0
ui RStudio
language (EN)
collate en_AU.UTF-8
ctype en_AU.UTF-8
tz Australia/Melbourne
date 2020-03-29
─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
package * version date lib source
assertthat 0.2.1 2019-03-21 [2] CRAN (R 3.6.0)
bookdown 0.17 2020-01-11 [1] CRAN (R 3.6.0)
cli 2.0.2 2020-02-28 [1] CRAN (R 3.6.0)
crayon 1.3.4 2017-09-16 [2] CRAN (R 3.6.0)
digest 0.6.25 2020-02-23 [1] CRAN (R 3.6.0)
evaluate 0.14 2019-05-28 [2] CRAN (R 3.6.0)
fansi 0.4.1 2020-01-08 [1] CRAN (R 3.6.0)
glue 1.3.2 2020-03-12 [1] CRAN (R 3.6.0)
htmltools 0.4.0 2019-10-04 [1] CRAN (R 3.6.0)
knitr 1.25 2019-09-18 [1] CRAN (R 3.6.0)
packrat 0.5.0 2018-11-14 [2] CRAN (R 3.6.0)
Rcpp 1.0.4 2020-03-17 [1] CRAN (R 3.6.0)
rlang 0.4.5 2020-03-01 [1] CRAN (R 3.6.0)
rmarkdown 1.16 2019-10-01 [1] CRAN (R 3.6.0)
rsconnect 0.8.15 2019-07-22 [2] CRAN (R 3.6.0)
rstudioapi 0.10 2019-03-19 [2] CRAN (R 3.6.0)
sessioninfo 1.1.1 2018-11-05 [2] CRAN (R 3.6.0)
withr 2.1.2 2018-03-15 [2] CRAN (R 3.6.0)
xfun 0.10 2019-10-01 [1] CRAN (R 3.6.0)
yaml 2.2.0 2018-07-25 [2] CRAN (R 3.6.0)
❯ pandoc --version
pandoc 2.9.2.1
Compiled with pandoc-types 1.20, texmath 0.12.0.1, skylighting 0.8.3.2
...
Copyright (C) 2006-2020 John MacFarlane
Web: https://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.
❯ pandoc-citeproc --version
pandoc-citeproc 0.17