From ee529ada1ee5dc144300383aa8f88364108b6679 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Thu, 5 Dec 2019 23:20:29 -0600 Subject: [PATCH] fix #260: add the cslreferences environment to all LaTeX templates --- DESCRIPTION | 2 +- NEWS.md | 2 ++ .../templates/acm_article/resources/template.tex | 9 +++++++++ .../templates/acs_article/resources/template.tex | 10 ++++++++++ .../templates/aea_article/resources/template.tex | 9 +++++++++ .../templates/agu_article/resources/template.tex | 9 +++++++++ .../templates/amq_article/resources/template.tex | 9 +++++++++ .../templates/ams_article/resources/template.tex | 10 ++++++++++ .../templates/asa_article/resources/template.tex | 9 +++++++++ .../biometrics_article/resources/template.tex | 9 +++++++++ .../copernicus_article/resources/template.tex | 9 +++++++++ inst/rmarkdown/templates/ctex/resources/template.tex | 10 ++++++++++ .../templates/elsevier_article/resources/template.tex | 10 ++++++++++ .../templates/frontiers_article/resources/template.tex | 9 +++++++++ .../templates/ieee_article/resources/template.tex | 9 +++++++++ .../templates/joss_article/resources/template.tex | 10 ++++++++++ .../templates/jss_article/resources/template.tex | 9 +++++++++ .../templates/mdpi_article/resources/template.tex | 9 +++++++++ .../templates/mnras_article/resources/template.tex | 9 +++++++++ .../templates/peerj_article/resources/template.tex | 9 +++++++++ .../templates/plos_article/resources/template.tex | 9 +++++++++ .../templates/pnas_article/resources/template.tex | 9 +++++++++ .../templates/rjournal_article/resources/template.tex | 9 +++++++++ .../templates/rsos_article/resources/template.tex | 9 +++++++++ .../templates/rss_article/resources/template.tex | 9 +++++++++ .../templates/sage_article/resources/template.tex | 9 +++++++++ .../templates/sim_article/resources/template.tex | 9 +++++++++ .../templates/springer_article/resources/template.tex | 9 +++++++++ .../templates/tf_article/resources/template.tex | 9 +++++++++ 29 files changed, 251 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5385cddcc..91b264b1e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rticles Type: Package Title: Article Formats for R Markdown -Version: 0.12.2 +Version: 0.12.3 Authors@R: c( person("JJ", "Allaire", role = "aut", email = "jj@rstudio.com"), person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), diff --git a/NEWS.md b/NEWS.md index 619866a42..a71d5d8f3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,8 @@ rticles 0.13 --------------------------------------------------------------------- +- Added the `cslreferences` environment to all templates (thanks, @bbauzile, #260). + - Updated the template for `elsevier_article()` to allow for two authors to share the same footnote (e.g. "these authors made equal contributions") and updated the corresponding skeleton to demonstrate how to use a shared footnote (thanks, @salauer, #255). rticles 0.12 diff --git a/inst/rmarkdown/templates/acm_article/resources/template.tex b/inst/rmarkdown/templates/acm_article/resources/template.tex index 7ba28b814..28cdbc9e1 100644 --- a/inst/rmarkdown/templates/acm_article/resources/template.tex +++ b/inst/rmarkdown/templates/acm_article/resources/template.tex @@ -62,6 +62,15 @@ $highlighting-macros$ $endif$ +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/acs_article/resources/template.tex b/inst/rmarkdown/templates/acs_article/resources/template.tex index 915581a0f..9808f1f1d 100644 --- a/inst/rmarkdown/templates/acs_article/resources/template.tex +++ b/inst/rmarkdown/templates/acs_article/resources/template.tex @@ -59,6 +59,16 @@ % avoid problems with \sout in headers with hyperref: \pdfstringdefDisableCommands{\renewcommand{\sout}{}} $endif$ + +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + % pandoc header $for(header-includes)$ $header-includes$ diff --git a/inst/rmarkdown/templates/aea_article/resources/template.tex b/inst/rmarkdown/templates/aea_article/resources/template.tex index 168777340..c37dd6079 100644 --- a/inst/rmarkdown/templates/aea_article/resources/template.tex +++ b/inst/rmarkdown/templates/aea_article/resources/template.tex @@ -25,6 +25,15 @@ \usepackage{hyperref} +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/agu_article/resources/template.tex b/inst/rmarkdown/templates/agu_article/resources/template.tex index ff563510b..292be2456 100644 --- a/inst/rmarkdown/templates/agu_article/resources/template.tex +++ b/inst/rmarkdown/templates/agu_article/resources/template.tex @@ -64,6 +64,15 @@ \journalname{$journal$} +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/amq_article/resources/template.tex b/inst/rmarkdown/templates/amq_article/resources/template.tex index c7fc209bf..9ca8df7a8 100644 --- a/inst/rmarkdown/templates/amq_article/resources/template.tex +++ b/inst/rmarkdown/templates/amq_article/resources/template.tex @@ -237,6 +237,15 @@ \everymath{\displaystyle} +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/ams_article/resources/template.tex b/inst/rmarkdown/templates/ams_article/resources/template.tex index c1f683025..91b54504f 100644 --- a/inst/rmarkdown/templates/ams_article/resources/template.tex +++ b/inst/rmarkdown/templates/ams_article/resources/template.tex @@ -62,6 +62,16 @@ $exauthors.email$ $endif$ $endfor$ + +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + % pandoc header $for(header-includes)$ $header-includes$ diff --git a/inst/rmarkdown/templates/asa_article/resources/template.tex b/inst/rmarkdown/templates/asa_article/resources/template.tex index 633ef99f0..67e51755e 100644 --- a/inst/rmarkdown/templates/asa_article/resources/template.tex +++ b/inst/rmarkdown/templates/asa_article/resources/template.tex @@ -28,6 +28,15 @@ $highlighting-macros$ $endif$ +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/biometrics_article/resources/template.tex b/inst/rmarkdown/templates/biometrics_article/resources/template.tex index b1d41afa6..b6999acfb 100644 --- a/inst/rmarkdown/templates/biometrics_article/resources/template.tex +++ b/inst/rmarkdown/templates/biometrics_article/resources/template.tex @@ -41,6 +41,15 @@ $highlighting-macros$ $endif$ +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + % tightlist command for lists without linebreak \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} diff --git a/inst/rmarkdown/templates/copernicus_article/resources/template.tex b/inst/rmarkdown/templates/copernicus_article/resources/template.tex index 224de52e3..1370f0f96 100644 --- a/inst/rmarkdown/templates/copernicus_article/resources/template.tex +++ b/inst/rmarkdown/templates/copernicus_article/resources/template.tex @@ -71,6 +71,15 @@ %\usepackage{subfig} %\usepackage{rotating} +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + % The "Technical instructions for LaTex" by Copernicus require _not_ to insert any additional packages. %$for(header-includes)$ %$header-includes$ diff --git a/inst/rmarkdown/templates/ctex/resources/template.tex b/inst/rmarkdown/templates/ctex/resources/template.tex index 02f589e64..c6f1b9017 100644 --- a/inst/rmarkdown/templates/ctex/resources/template.tex +++ b/inst/rmarkdown/templates/ctex/resources/template.tex @@ -142,6 +142,16 @@ \author{$for(author)$$author$$sep$ \and $endfor$} $endif$ \date{$date$} + +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/elsevier_article/resources/template.tex b/inst/rmarkdown/templates/elsevier_article/resources/template.tex index 33c5135a8..762fee023 100644 --- a/inst/rmarkdown/templates/elsevier_article/resources/template.tex +++ b/inst/rmarkdown/templates/elsevier_article/resources/template.tex @@ -135,6 +135,16 @@ $else$ \setcounter{secnumdepth}{0} $endif$ + +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + % Pandoc header $for(header-includes)$ $header-includes$ diff --git a/inst/rmarkdown/templates/frontiers_article/resources/template.tex b/inst/rmarkdown/templates/frontiers_article/resources/template.tex index 4bee83f9e..3e1f410d9 100644 --- a/inst/rmarkdown/templates/frontiers_article/resources/template.tex +++ b/inst/rmarkdown/templates/frontiers_article/resources/template.tex @@ -71,6 +71,15 @@ %% END MACROS SECTION +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/ieee_article/resources/template.tex b/inst/rmarkdown/templates/ieee_article/resources/template.tex index 7d34275ec..5b2bf4a64 100644 --- a/inst/rmarkdown/templates/ieee_article/resources/template.tex +++ b/inst/rmarkdown/templates/ieee_article/resources/template.tex @@ -394,6 +394,15 @@ $highlighting-macros$ $endif$ +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + % Pandoc header $for(header-includes)$ $header-includes$ diff --git a/inst/rmarkdown/templates/joss_article/resources/template.tex b/inst/rmarkdown/templates/joss_article/resources/template.tex index 2dafc2fa4..6742a3829 100644 --- a/inst/rmarkdown/templates/joss_article/resources/template.tex +++ b/inst/rmarkdown/templates/joss_article/resources/template.tex @@ -273,6 +273,16 @@ \newenvironment{LTR}{\beginL}{\endL} \fi $endif$ + +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/jss_article/resources/template.tex b/inst/rmarkdown/templates/jss_article/resources/template.tex index 60b648290..ca6b064ba 100644 --- a/inst/rmarkdown/templates/jss_article/resources/template.tex +++ b/inst/rmarkdown/templates/jss_article/resources/template.tex @@ -53,6 +53,15 @@ $endfor$ } +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + % Pandoc header $for(header-includes)$ $header-includes$ diff --git a/inst/rmarkdown/templates/mdpi_article/resources/template.tex b/inst/rmarkdown/templates/mdpi_article/resources/template.tex index 5a1c5774c..7a74891b7 100644 --- a/inst/rmarkdown/templates/mdpi_article/resources/template.tex +++ b/inst/rmarkdown/templates/mdpi_article/resources/template.tex @@ -150,6 +150,15 @@ %\setcounter{secnumdepth}{4} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/mnras_article/resources/template.tex b/inst/rmarkdown/templates/mnras_article/resources/template.tex index 90e1ce15e..87b0c7be9 100644 --- a/inst/rmarkdown/templates/mnras_article/resources/template.tex +++ b/inst/rmarkdown/templates/mnras_article/resources/template.tex @@ -53,6 +53,15 @@ % Please keep new commands to a minimum, and use \newcommand not \def to avoid % overwriting existing commands. Example: +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%% TITLE PAGE %%%%%%%%%%%%%%%%%%% diff --git a/inst/rmarkdown/templates/peerj_article/resources/template.tex b/inst/rmarkdown/templates/peerj_article/resources/template.tex index c9375ccc1..5e264b3e0 100644 --- a/inst/rmarkdown/templates/peerj_article/resources/template.tex +++ b/inst/rmarkdown/templates/peerj_article/resources/template.tex @@ -30,6 +30,15 @@ $highlighting-macros$ $endif$ +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + % Pandoc Header $for(header-includes)$ $header-includes$ diff --git a/inst/rmarkdown/templates/plos_article/resources/template.tex b/inst/rmarkdown/templates/plos_article/resources/template.tex index 8ba3765b1..7584a7468 100644 --- a/inst/rmarkdown/templates/plos_article/resources/template.tex +++ b/inst/rmarkdown/templates/plos_article/resources/template.tex @@ -173,6 +173,15 @@ $highlighting-macros$ $endif$ +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/pnas_article/resources/template.tex b/inst/rmarkdown/templates/pnas_article/resources/template.tex index bf3808ddf..1dba1378e 100644 --- a/inst/rmarkdown/templates/pnas_article/resources/template.tex +++ b/inst/rmarkdown/templates/pnas_article/resources/template.tex @@ -15,6 +15,15 @@ \usepackage{longtable} $endif$ +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/rjournal_article/resources/template.tex b/inst/rmarkdown/templates/rjournal_article/resources/template.tex index 438f30531..0a959eead 100644 --- a/inst/rmarkdown/templates/rjournal_article/resources/template.tex +++ b/inst/rmarkdown/templates/rjournal_article/resources/template.tex @@ -10,6 +10,15 @@ } $endif$ +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/rsos_article/resources/template.tex b/inst/rmarkdown/templates/rsos_article/resources/template.tex index a16b6e6af..ebb200e84 100644 --- a/inst/rmarkdown/templates/rsos_article/resources/template.tex +++ b/inst/rmarkdown/templates/rsos_article/resources/template.tex @@ -15,6 +15,15 @@ \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/rss_article/resources/template.tex b/inst/rmarkdown/templates/rss_article/resources/template.tex index f950922b4..e54e314dc 100644 --- a/inst/rmarkdown/templates/rss_article/resources/template.tex +++ b/inst/rmarkdown/templates/rss_article/resources/template.tex @@ -36,6 +36,15 @@ \usepackage[authoryear]{natbib} \bibpunct{(}{)}{;}{a}{}{,} +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/sage_article/resources/template.tex b/inst/rmarkdown/templates/sage_article/resources/template.tex index d534f43b1..1f0b13c8c 100644 --- a/inst/rmarkdown/templates/sage_article/resources/template.tex +++ b/inst/rmarkdown/templates/sage_article/resources/template.tex @@ -7,6 +7,15 @@ \usepackage{longtable} $endif$ +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/sim_article/resources/template.tex b/inst/rmarkdown/templates/sim_article/resources/template.tex index 0ca197ce0..d7577f866 100644 --- a/inst/rmarkdown/templates/sim_article/resources/template.tex +++ b/inst/rmarkdown/templates/sim_article/resources/template.tex @@ -4,6 +4,15 @@ \usepackage{longtable} $endif$ +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/springer_article/resources/template.tex b/inst/rmarkdown/templates/springer_article/resources/template.tex index 5f2852524..08922e6fc 100644 --- a/inst/rmarkdown/templates/springer_article/resources/template.tex +++ b/inst/rmarkdown/templates/springer_article/resources/template.tex @@ -34,6 +34,15 @@ $highlighting-macros$ $endif$ +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ diff --git a/inst/rmarkdown/templates/tf_article/resources/template.tex b/inst/rmarkdown/templates/tf_article/resources/template.tex index f047f417c..7e1185881 100644 --- a/inst/rmarkdown/templates/tf_article/resources/template.tex +++ b/inst/rmarkdown/templates/tf_article/resources/template.tex @@ -30,6 +30,15 @@ $highlighting-macros$ $endif$ +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newenvironment{cslreferences}% + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% + {\par} +$endif$ + $if(header-includes)$ $header-includes$ $endif$