Skip to content

Add JOSS and JOSE format #229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Sep 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ Authors@R: c(
person("Petter", "Uvesten", role = c("aut", "cph"), email = "[email protected]"),
person("Elio", "Campitelli", role = c("aut", "cph"), email = "[email protected]", comment = c(ORCID = "0000-0002-7742-9230")),
person("John", "Muschelli", role = c("aut", "cph"), email = "[email protected]", comment = c(ORCID = "0000-0001-6469-1750")),
person("Zhian N.", "Kamvar", role = c("aut", "cph"), email = "[email protected]", comment = c(ORCID = "0000-0003-1458-7108"))
person("Zhian N.", "Kamvar", role = c("aut", "cph"), email = "[email protected]", comment = c(ORCID = "0000-0003-1458-7108")),
person("Noam", "Ross", role = c("aut", "cph"), email = "[email protected]", comment = c(ORCID = "0000-0002-2136-0000"))
)
Description: A suite of custom R Markdown formats and templates for
authoring journal articles and conference submissions.
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export(ctex)
export(elsevier_article)
export(frontiers_article)
export(ieee_article)
export(joss_article)
export(jss_article)
export(mdpi_article)
export(mnras_article)
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
rticles 0.11
---------------------------------------------------------------------

- Added the Journal of Open Source Software (and Education) template (@noamross, #229).

- Tweaked the `tf_article` template to avoid using absolute full paths for figures in the "Figures" section (@jooyoungseo, #246).

rticles 0.10
Expand Down
44 changes: 44 additions & 0 deletions R/joss_article.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#' Journal of Open Source Software (JOSS) format.
#'
#' Format for creating a Journal of Open Source Software (JOSS) or Journal of
#' Open Source Education (JOSE) articles. Adapted
#' from \url{https://github.com/openjournals/whedon}. As these journals take
#' articles as markdown, this format can be used to generate markdown from
#' R Markdown and to locally preview how the article will appear as PDF.
#'
#' The following variables may be set in YAML metadata to populate fields in the
#' article PDF, but are only necccessary fo local preview:
#' \code{formatted_doi, citation_author, year, volume, issue, page, submitted, published,
#' review_url, repository}, and \code{archive_doi}.
#'
#' @inheritParams rmarkdown::pdf_document
#' @param journal one of "JOSS" or"JOSE"
#' @param keep_md Whether to retain the intermediate markdown and images.
#' Defaults to TRUE.
#' @param latex_engine,... Arguments passed to \code{rmarkdown::pdf_document}
#' @export
joss_article <- function(journal = "JOSS",
keep_md = TRUE,
latex_engine = "xelatex",
...) {

rmarkdown::pandoc_available('2.2', TRUE)

logo_path <- find_resource("joss_article", paste0(journal, "-logo.png"))
journalname <- ifelse(journal == "JOSS",
"Journal of Open Source Software",
"Journal of Open Source Education")

pdf_document_format(
"joss_article",
latex_engine = latex_engine,
citation_package = "none",
keep_md = keep_md,
pandoc_args = c(
"-V", paste0("logo_path=", logo_path),
"-V", paste0("journal_name=", journalname),
"-V", "graphics=true"
),
...)
}

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ The **rticles** package provides a suite of custom [R Markdown](http://rmarkdown

- [JSS](http://www.jstatsoft.org/) articles

- [JOSS](http://joss.theoj.org/) and [JOSE](https://jose.theoj.org/) articles

- [MDPI](http://www.mdpi.com) journal submissions

- [Monthly Notices of the Royal Astronomical Society](https://academic.oup.com/mnras) articles
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading