From 4bc9f25362d3df5a1a61cc8e524543f628c5f38c Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Mon, 28 Mar 2016 17:01:19 -0500 Subject: [PATCH] fixes #63: support bibliography for JSS articles --- inst/NEWS | 1 + .../jss_article/resources/template.tex | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/inst/NEWS b/inst/NEWS index 68e0e54af..add7d999f 100644 --- a/inst/NEWS +++ b/inst/NEWS @@ -4,6 +4,7 @@ rticles 0.2 (unreleased) - Add American Chemical Society (ACS) template +- Support bibliography for JSS articles (#63) rticles 0.1 --------------------------------------------------------------------- diff --git a/inst/rmarkdown/templates/jss_article/resources/template.tex b/inst/rmarkdown/templates/jss_article/resources/template.tex index af1e46c03..41cdf7d55 100644 --- a/inst/rmarkdown/templates/jss_article/resources/template.tex +++ b/inst/rmarkdown/templates/jss_article/resources/template.tex @@ -53,5 +53,22 @@ $body$ +$if(natbib)$ +$if(bibliography)$ +$if(biblio-title)$ +$if(book-class)$ +\renewcommand\bibname{$biblio-title$} +$else$ +\renewcommand\refname{$biblio-title$} +$endif$ +$endif$ +\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} +$endif$ +$endif$ + +$if(biblatex)$ +\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ +$endif$ + \end{document}