bookdown references working in pdf but not html

Viewed 47

I have a bookdown project where some references are correctly processed for pdf but not for html. For example, this markup:

Authors and modelers have successfully used this framework to derive models that have won Kaggle competitions [@Raimondi2010], have been implemented in diagnostic tools [@jahani2016comparison,@luo2016automatically], are being used as the backbone of investment algorithms [@stankovic2015investment], and are being used as a screening tool to assess the safety of new pharmaceutical products [@thomson2011not].

produces this in html

Authors and modelers have successfully used this framework to derive models that have won Kaggle competitions (Raimondi 2010), have been implemented in diagnostic tools (Jahani and Mahdavi 2016,@luo2016automatically), are being used as the backbone of investment algorithms (Stanković, Marković, and Stojanović 2015), and are being used as a screening tool to assess the safety of new pharmaceutical products (Thomson et al. 2011).

and this in pdf

Authors and modelers have successfully used this framework to derive models that have won Kaggle competitions (Raimondi, 2010), have been implemented in diagnostic tools (Jahani and Mahdavi, 2016, Luo (2016)), are being used as the backbone of investment algorithms (Stanković et al., 2015), and are being used as a screening tool to assess the safety of new pharmaceutical products (Thomson et al., 2011).

A reprex can be found here and my system uses:

## R version 3.6.0 (2019-04-26)
## Platform: x86_64-apple-darwin15.6.0 (64-bit)
## Running under: macOS High Sierra 10.13.6
## 
## Locale: en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8
## 
## Package version:
##   base64enc_0.1.3 bookdown_0.11.1 digest_0.6.19   evaluate_0.14  
##   glue_1.3.1      graphics_3.6.0  grDevices_3.6.0 highr_0.8      
##   htmltools_0.3.6 jsonlite_1.6    knitr_1.23      magrittr_1.5   
##   markdown_1.0    methods_3.6.0   mime_0.7        Rcpp_1.0.1     
##   rmarkdown_1.13  stats_3.6.0     stringi_1.4.3   stringr_1.4.0  
##   tinytex_0.13    tools_3.6.0     utils_3.6.0     xfun_0.7       
##   yaml_2.2.0

> rmarkdown::pandoc_version()
[1] ‘2.0.5’

(edit - pandoc version)

1 Answers

Multiple citations must be separated by semicolons instead of commas, e.g.,

[@jahani2016comparison; @luo2016automatically]

See Pandoc's manual for the official documentation and examples.

Related