Skip to content

Commit

Permalink
Update references to rjournal_web_article -> rjournal_article
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchelloharawild committed Oct 4, 2023
1 parent 6353188 commit f7fd1a1
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 10 deletions.
8 changes: 7 additions & 1 deletion R/rj_article.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@ rjournal_article <- function(toc = FALSE, self_contained = FALSE,
if(!is.null(metadata$csl)) warning("Please do not use custom CSL formatting, if there is an issue with the default styling please contact [email protected]")
metadata$csl <- metadata$csl %||% system.file("rjournal.csl", package = "rjtools", mustWork = TRUE)

metadata$output <- replace_names(metadata$output, c("rjtools::rjournal_web_article" = "distill::distill_article"))
metadata$output <- replace_names(
metadata$output,
c(
"rjtools::rjournal_web_article" = "distill::distill_article",
"rjtools::rjournal_article" = "distill::distill_article",
)
)

# Replace metadata with modified copy
article_metadata <<- metadata
Expand Down
2 changes: 1 addition & 1 deletion R/rj_pdf_issue.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ rjournal_pdf_issue <- function(..., render_all = FALSE) {
callr::r(function(input){
rmarkdown::render(
input,
output_format = "rjtools::rjournal_web_article"
output_format = "rjtools::rjournal_article"
)
}, args = list(input = art_rmd))
}
Expand Down
2 changes: 2 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ reference:
- title: R Markdown article format
desc: Functions to build HTML and PDF R Journal articles
contents:
- rjournal_article
- rjournal_web_article
- rjournal_pdf_article
- title: Prepare article submission
desc: Functions to help building a zip file of relevant materials for submission
contents:
Expand Down
2 changes: 1 addition & 1 deletion inst/paper-with-errors/paper-with-errors.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ author:
- Somewhere, Australia
type: package
output:
rjtools::rjournal_web_article
rjtools::rjournal_article
bibliography: RJreferences.bib

---
Expand Down
2 changes: 1 addition & 1 deletion inst/rmarkdown/templates/rjournal/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ author:
orcid: 0000-0002-0912-0225
type: package
output:
rjtools::rjournal_web_article:
rjtools::rjournal_article:
self_contained: yes
toc: no
bibliography: RJreferences.bib
Expand Down
2 changes: 1 addition & 1 deletion inst/sample-article/article.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ author:
- Somewhere, Australia
type: package
output:
rjtools::rjournal_web_article
rjtools::rjournal_article
bibliography: article.bib
---

Expand Down
2 changes: 1 addition & 1 deletion tests/bad-article/article.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ author:
- Somewhere, Australia
type: package
output:
rjtools::rjournal_web_article
rjtools::rjournal_article
bibliography: article.bib
---

Expand Down
2 changes: 1 addition & 1 deletion vignettes/create_article.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ install.packages(c("plotly", "ggplot2", "kableExtra", "palmerpenguins"))
The R Journal uses `pandoc-citeproc` to handle the Citation Style Language (CSL) style.
If you're knitting the document within RStudio (which we recommend), this is automatically handled. However, if you're using the command line, you'll need to ensure the `pandoc-citeproc` extension is installed properly on your system.

The `rjtools::rjournal_web_article` output specified in the article YAML will create the article in both html and pdf formats. Additional files created during the knit are (assuming file name of `quokka-bilby`):
The `rjtools::rjournal_article` output specified in the article YAML will create the article in both html and pdf formats. Additional files created during the knit are (assuming file name of `quokka-bilby`):

- **quokka-bilby.html**: the html article
- **quokka-bilby.pdf**: the pdf article
Expand Down
8 changes: 5 additions & 3 deletions vignettes/format-details.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This has these components:
- output format lines should look like
```
output:
rjtools::rjournal_web_article
rjtools::rjournal_article
```
- `bibliography: RJreferences.bib`

Expand Down Expand Up @@ -205,7 +205,7 @@ Custom `css` is discouraged, because all articles should look similar. However,

If you are already writing your articles using Rmarkdown, and have written your article using the `rticles::rjournal_article` style it is straightforward to make the switch to the `rjtools` styling. These are the steps that you need to follow:

1. change output formats to `rjtools::rjournal_web_article` to switch to the new style,
1. change output formats to `rjtools::rjournal_article` to switch to the new style,
2. remove any latex specific functionality,
3. change figure, table references to `\@ref()` and
4. add the `rjournal.csl` and `rjournal.css` template files to your folder, updating YAML to utilise them, and
Expand Down Expand Up @@ -237,7 +237,9 @@ Examples for your paper should be computed relatively quickly, which often means

If you have a large file that you believe should be used for the paper, you could store the file elsewhere, on your own GitHub repo, or on a data file share service like [Figshare](https://help.figshare.com/article/guide-to-sharing-data-on-figshare-plus), and add download and handling code to your paper.

# Handling slow computationsThe editorial team needs to re-build your article to check that results are reproducible, and the editor will need to re-build your article when it is organised into an issue. Try to ensure that your code runs quickly. If you need to have a code chunk that takes several minutes or more to run, consider turning the chunk off, providing an intermediate state that is loaded into the next chunk. Generally, we advise against using the `cache` feature of Rmarkdown because when multiple articles are built in the issue construction it might render your article inadequately.
# Handling slow computations

The editorial team needs to re-build your article to check that results are reproducible, and the editor will need to re-build your article when it is organised into an issue. Try to ensure that your code runs quickly. If you need to have a code chunk that takes several minutes or more to run, consider turning the chunk off, providing an intermediate state that is loaded into the next chunk. Generally, we advise against using the `cache` feature of Rmarkdown because when multiple articles are built in the issue construction it might render your article inadequately.

# Trouble-shooting

Expand Down

0 comments on commit f7fd1a1

Please sign in to comment.