From bc8a23932e02cb4da517606fbc9abafcdc4fe08d Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Sun, 5 Aug 2018 16:13:39 -0500 Subject: [PATCH] fix #182: support syntax highlighting in ieee_article() and acm_article() --- DESCRIPTION | 2 +- NEWS | 2 ++ .../templates/acm_article/resources/template.tex | 8 +++++++- .../templates/ieee_article/resources/template.tex | 6 ++++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 44d76baec..73df66348 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rticles Type: Package Title: Article Formats for R Markdown -Version: 0.5.2 +Version: 0.5.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 b/NEWS index 8214343a6..1e8baae5f 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ rticles 0.6 (unreleased) - Added the template for the SAGE Journals (thanks, @oguzhanogreden, #181). +- Supports syntax highlighting in the `ieee_article()` and `acm_article()` formats (thanks, @rainer-rq-koelle, #182). + rticles 0.5 --------------------------------------------------------------------- diff --git a/inst/rmarkdown/templates/acm_article/resources/template.tex b/inst/rmarkdown/templates/acm_article/resources/template.tex index 24947fb30..7ba28b814 100755 --- a/inst/rmarkdown/templates/acm_article/resources/template.tex +++ b/inst/rmarkdown/templates/acm_article/resources/template.tex @@ -56,8 +56,14 @@ \conferenceinfo{} {} \CopyrightYear{} \crdata{} + +% Pandoc syntax highlighting +$if(highlighting-macros)$ +$highlighting-macros$ +$endif$ + $for(header-includes)$ -$header-includes$ +$header-includes$ $endfor$ \begin{document} diff --git a/inst/rmarkdown/templates/ieee_article/resources/template.tex b/inst/rmarkdown/templates/ieee_article/resources/template.tex index 7ffd3f151..325e97459 100755 --- a/inst/rmarkdown/templates/ieee_article/resources/template.tex +++ b/inst/rmarkdown/templates/ieee_article/resources/template.tex @@ -388,6 +388,12 @@ $else$ \setcounter{secnumdepth}{0} $endif$ + +% Pandoc syntax highlighting +$if(highlighting-macros)$ +$highlighting-macros$ +$endif$ + % Pandoc header $for(header-includes)$ $header-includes$