Skip to content

Commit 963d0d1

Browse files
authored
Fix #322: ctex_article() correctly uses the default Pandoc template now (#323)
1 parent 383659d commit 963d0d1

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Authors@R: c(
4949
Description: A suite of custom R Markdown formats and templates for
5050
authoring journal articles and conference submissions.
5151
License: GPL-3
52-
Imports: utils, rmarkdown (>= 1.16), knitr, yaml, tinytex (>= 0.19), xfun
52+
Imports: utils, rmarkdown (>= 1.18), knitr, yaml, tinytex (>= 0.19), xfun
5353
SystemRequirements: GNU make
5454
URL: https://github.com/rstudio/rticles
5555
BugReports: https://github.com/rstudio/rticles/issues

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
rticles 0.16
22
---------------------------------------------------------------------
33

4-
4+
- Fixed `ctex_article()` to correctly use the default Pandoc template as intended in the PR #307, which introduced the bug #322 (thanks, @baketbek @cderv #323).
55

66
rticles 0.15
77
---------------------------------------------------------------------

R/article.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ NULL
1717
#' Machinery (ACM) articles. Adapted from
1818
#' \url{https://www.acm.org/publications/proceedings-template}.
1919
#' @param
20-
#' ...,keep_tex,latex_engine,citation_package,highlight,fig_caption,md_extensions
20+
#' ...,keep_tex,latex_engine,citation_package,highlight,fig_caption,md_extensions,template
2121
#' Arguments passed to \code{rmarkdown::\link{pdf_document}()}.
2222
#' @return An R Markdown output format.
2323
#' @examples \dontrun{
@@ -143,8 +143,10 @@ biometrics_article <- function(..., keep_tex = TRUE, citation_package = 'natbib'
143143
#' function \code{ctex} is an alias of \code{ctex_article}.
144144
#' @export
145145
#' @rdname article
146-
ctex_article <- function(..., latex_engine = 'xelatex') {
147-
pdf_document_format('ctex', latex_engine = latex_engine, ...)
146+
ctex_article <- function(..., template = 'default', latex_engine = 'xelatex') {
147+
pdf_document_format(
148+
'ctex', latex_engine = latex_engine, template = template, ...
149+
)
148150
}
149151

150152
#' @export

inst/rmarkdown/templates/ctex/skeleton/skeleton.Rmd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ documentclass: ctexart
88
keywords:
99
- 中文
1010
- R Markdown
11-
documentclass: ctexart
1211
output:
1312
rticles::ctex:
1413
fig_caption: yes

man/article.Rd

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

tests/testit/test-formats.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ test_format("asa")
4040
test_format("bioinformatics")
4141
test_format("biometrics")
4242
test_format("copernicus")
43+
test_format("ctex")
4344
test_format("elsevier")
4445
test_format("frontiers")
4546
test_format("ieee")

0 commit comments

Comments
 (0)