Skip to content

Commit

Permalink
close #206: make ieee_article() work with bookdown::pdf_book() by exp…
Browse files Browse the repository at this point in the history
…osing the `pandoc_args` argument (to avoid multiple matches of it)
  • Loading branch information
yihui committed Mar 14, 2019
1 parent 1182e00 commit e35d144
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rticles
Type: Package
Title: Article Formats for R Markdown
Version: 0.6.1
Version: 0.6.2
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")),
Expand Down
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ rticles 0.7

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

- 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).

rticles 0.6
---------------------------------------------------------------------

Expand Down
5 changes: 3 additions & 2 deletions R/ieee_article.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ ieee_article <- function(...,
with_array = FALSE,
with_dblfloatfix = FALSE,
keep_tex = TRUE,
pandoc_args = NULL,
md_extensions = c("-autolink_bare_uris")) {

args <- c()
Expand All @@ -69,7 +70,7 @@ ieee_article <- function(...,
args <- c(args, "hyphenfixes" = hyphenfixes)

# Avoid declaration of pandoc variable if field is empty
if(nchar(IEEEspecialpaper) > 1){
if (nchar(IEEEspecialpaper) > 1) {
args <- c(args, "IEEEspecialpaper" = IEEEspecialpaper)
}

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

inherit_pdf_document(...,
pandoc_args = pandoc_arg_list,
pandoc_args = c(pandoc_arg_list, pandoc_args),
template = find_resource("ieee_article", "template.tex"),
keep_tex = keep_tex,
md_extensions = md_extensions)
Expand Down
5 changes: 4 additions & 1 deletion man/ieee_article.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e35d144

Please sign in to comment.