I'm rendering html from markdown using bookdown
, and using a compact numeric citation style so that e.g., 1, 2, 3
is shown as 1-3
. I'd like references to be shown at the bottom of each page (link-citations: yes
), but only the first and last reference in the range are shown (only refs 1 and 3 are shown, see screenshot below). Is there a way to have all cited references displayed on each page, with the caveat that only the first and last would be linked?
NB: all refs are correctly shown on the final bibliography.
To reproduce:
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')
and knit a markdown file with the following content:
---
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
Session info
> 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