Skip to content

Commit e35d144

Browse files
committed
close #206: make ieee_article() work with bookdown::pdf_book() by exposing the pandoc_args argument (to avoid multiple matches of it)
1 parent 1182e00 commit e35d144

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: rticles
22
Type: Package
33
Title: Article Formats for R Markdown
4-
Version: 0.6.1
4+
Version: 0.6.2
55
Authors@R: c(
66
person("JJ", "Allaire", role = "aut", email = "[email protected]"),
77
person("Yihui", "Xie", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0003-0645-5666")),

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ rticles 0.7
55

66
- No longer hardcode the LaTeX engine to `xelatex` in `rsos_article()` (thanks, @bensprung, #198).
77

8+
- Added an argument `pandoc_args` to `ieee_article()` so that users can pass custom Pandoc arguments. This also makes it work with `bookdown::pdf_book()` (thanks, @espinielli, #206).
9+
810
rticles 0.6
911
---------------------------------------------------------------------
1012

R/ieee_article.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ ieee_article <- function(...,
5959
with_array = FALSE,
6060
with_dblfloatfix = FALSE,
6161
keep_tex = TRUE,
62+
pandoc_args = NULL,
6263
md_extensions = c("-autolink_bare_uris")) {
6364

6465
args <- c()
@@ -69,7 +70,7 @@ ieee_article <- function(...,
6970
args <- c(args, "hyphenfixes" = hyphenfixes)
7071

7172
# Avoid declaration of pandoc variable if field is empty
72-
if(nchar(IEEEspecialpaper) > 1){
73+
if (nchar(IEEEspecialpaper) > 1) {
7374
args <- c(args, "IEEEspecialpaper" = IEEEspecialpaper)
7475
}
7576

@@ -95,7 +96,7 @@ ieee_article <- function(...,
9596
pandoc_arg_list <- mapply(pandoc_arg_variable, names(args), args)
9697

9798
inherit_pdf_document(...,
98-
pandoc_args = pandoc_arg_list,
99+
pandoc_args = c(pandoc_arg_list, pandoc_args),
99100
template = find_resource("ieee_article", "template.tex"),
100101
keep_tex = keep_tex,
101102
md_extensions = md_extensions)

man/ieee_article.Rd

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)