Skip to content

Commit fc089cc

Browse files
authored
Try fixing SIM format (#594)
1 parent 1cd1a1c commit fc089cc

File tree

12 files changed

+45
-8
lines changed

12 files changed

+45
-8
lines changed

DESCRIPTION

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

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ supported by the `copernicus.cls`, and fix an issue where the section headers we
3636

3737
## MINOR CHANGES
3838

39+
- Patch `WileyNDJ` template used in `sim_article()` to fix an issue with `etex` package not being useful anymore in recent LaTeX distributions (#593).
40+
3941
- Update all templates to work with Pandoc 3.2.1 by adding the definition of new `\pandocbounded` command used by Pandoc's LaTeX writers (see more at https://github.com/jgm/pandoc/releases/tag/3.2.1 and https://github.com/jgm/pandoc/issues/9660) (#571, #576).
4042

4143
# rticles 0.27

inst/rmarkdown/templates/sim/resources/template.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
\documentclass[AMA,STIX1COL$for(classoption)$,$classoption$$endfor$]{WileyNJD-v5}
1+
\documentclass[AMA,Times1COL$for(classoption)$,$classoption$$endfor$]{WileyNJD-v5}
22

33
$if(longtable)$
44
\usepackage{longtable}
-201 KB
Binary file not shown.
Binary file not shown.
-171 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

inst/rmarkdown/templates/sim/skeleton/WileyNJD-v5.cls

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,11 @@
352352
\ProcessOptions
353353
\LoadClass[twoside,fleqn,onecolumn]{article}%
354354

355-
\usepackage{etex}%
356-
\reserveinserts{28}% included etex package and \reserveinserts{...} to avoid no room for \newinserts, \newcounts or \newskips etc.
355+
\usepackage{etex}
356+
% Modification by as etex is not used anymore in modern LaTeX
357+
\@ifundefined{reserveinserts}{}{%
358+
\reserveinserts{28}%
359+
}
357360
\RequirePackage{graphicx,multicol}%
358361
\RequirePackage{multirow}%
359362
\RequirePackage{cuted}%

tests/testit/test-formats.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ test_format <- function(name, output_options = NULL, skip = NULL) {
1010
# work in a temp directory
1111
dir <- tempfile()
1212
dir.create(dir)
13-
oldwd <- setwd(dir)
14-
on.exit(setwd(oldwd), add = TRUE)
13+
withr::local_dir(dir)
1514

1615
# create a draft of the format
1716
testdoc <- paste0(name, "_article", ".Rmd")
@@ -24,7 +23,7 @@ test_format <- function(name, output_options = NULL, skip = NULL) {
2423
"Rendering the ", name, " format...",
2524
if (!is.null(output_options)) " (with output options)"
2625
)
27-
output_file <- rmarkdown::render(testdoc, output_options = output_options, quiet = TRUE)
26+
output_file <- rmarkdown::render(testdoc, output_options = output_options, quiet = !interactive())
2827
assert(paste(name, "format works"), {
2928
file.exists(output_file)
3029
})
@@ -77,7 +76,7 @@ test_format("rjournal")
7776
test_format("rsos")
7877
test_format("rss")
7978
test_format("sage")
80-
test_format("sim", skip = TRUE) # sim format currently broken
79+
test_format("sim")
8180
test_format("springer", skip = !rmarkdown::pandoc_available("2.11.4"))
8281
test_format("tf", output_options = list(reference_style = "CAD"))
8382
test_format("tf", output_options = list(reference_style = "APA"))

0 commit comments

Comments
 (0)