Package 'rticles'

Title: Article Formats for R Markdown
Description: A suite of custom R Markdown formats and templates for authoring journal articles and conference submissions.
Authors: JJ Allaire [aut], Yihui Xie [aut] , Christophe Dervieux [aut, cre] , Posit Software, PBC [cph, fnd], R Foundation [aut, cph], Hadley Wickham [aut], Journal of Statistical Software [aut, cph], Ramnath Vaidyanathan [aut, cph], Association for Computing Machinery [aut, cph], Carl Boettiger [aut, cph], Elsevier [aut, cph], Karl Broman [aut, cph], Kirill Mueller [aut, cph], Bastiaan Quast [aut, cph], Randall Pruim [aut, cph], Ben Marwick [aut, cph], Charlotte Wickham [aut, cph], Oliver Keyes [aut, cph], Miao Yu [aut, cph], Daniel Emaasit [aut, cph], Thierry Onkelinx [aut, cph], Alessandro Gasparini [aut, cph] , Marc-Andre Desautels [aut, cph], Dominik Leutnant [aut, cph] , MDPI [aut, cph], Taylor and Francis [aut, cph], Oğuzhan Öğreden [aut] , Dalton Hance [aut], Daniel Nüst [aut, cph] , Petter Uvesten [aut, cph], Elio Campitelli [aut, cph] , John Muschelli [aut, cph] , Alex Hayes [aut] , Zhian N. Kamvar [aut, cph] , Noam Ross [aut, cph] , Robrecht Cannoodt [aut, cph] (<https://orcid.org/0000-0003-3641-729X>, rcannood), Duncan Luguern [aut], David M. Kaplan [aut, ctb] (<https://orcid.org/0000-0001-6087-359X>, dmkaplan2000), Sebastian Kreutzer [aut] , Shixiang Wang [aut, ctb] , Jay Hesselberth [aut, ctb] , Alfredo Hernández [ctb] , Stefano Coretta [ctb] (<https://orcid.org/0000-0001-9627-5532>, stefanocoretta), Greg Macfarlane [ctb] (gregmacfarlane), Matthias Templ [ctb] (<https://orcid.org/0000-0002-8638-5276>, matthias-da), Alvaro Uzaheta [ctb] (auzaheta), JooYoung Seo [ctb] , Callum Arnold [ctb] (arnold-c), Rob Hyndman [aut] , Dmytro Perepolkin [ctb] (<https://orcid.org/0000-0001-8558-6183>, dmi3kno), Tom Palmer [ctb] (<https://orcid.org/0000-0003-4655-4511>, remlapmot)
Maintainer: Christophe Dervieux <[email protected]>
License: GPL-3
Version: 0.27.3
Built: 2024-10-24 04:29:23 UTC
Source: https://github.com/rstudio/rticles

Help Index


R Markdown output formats for (journal) articles

Description

Most article formats are based on rmarkdown::pdf_document(), with a custom Pandoc LaTeX template and different default values for other arguments (e.g., keep_tex = TRUE).

Usage

acm_article(...)

acs_article(
  ...,
  keep_tex = TRUE,
  md_extensions = c("-autolink_bare_uris"),
  fig_caption = TRUE
)

aea_article(..., keep_tex = TRUE, md_extensions = c("-autolink_bare_uris"))

agu_article(
  ...,
  keep_tex = TRUE,
  citation_package = "natbib",
  highlight = NULL,
  md_extensions = c("-autolink_bare_uris", "-auto_identifiers")
)

amq_article(
  ...,
  latex_engine = "xelatex",
  keep_tex = TRUE,
  fig_caption = TRUE,
  md_extensions = c("-autolink_bare_uris")
)

ams_article(..., keep_tex = TRUE, md_extensions = c("-autolink_bare_uris"))

asa_article(..., keep_tex = TRUE, citation_package = "natbib")

arxiv_article(..., keep_tex = TRUE)

bioinformatics_article(..., keep_tex = TRUE, citation_package = "natbib")

biometrics_article(..., keep_tex = TRUE, citation_package = "natbib")

ctex_article(..., template = "default", latex_engine = "xelatex")

ctex(..., template = "default", latex_engine = "xelatex")

elsevier_article(
  ...,
  keep_tex = TRUE,
  md_extensions = c("-autolink_bare_uris"),
  citation_package = "natbib"
)

frontiers_article(..., keep_tex = TRUE, citation_package = "natbib")

glossa_article(..., keep_tex = TRUE, latex_engine = "xelatex")

ims_article(
  journal = c("aoas", "aap", "aop", "aos", "sts"),
  keep_tex = TRUE,
  citation_package = "natbib",
  md_extensions = c("-autolink_bare_uris"),
  pandoc_args = NULL,
  ...
)

informs_article(..., keep_tex = TRUE, citation_package = "natbib")

iop_article(..., keep_tex = TRUE, citation_package = "natbib")

jasa_article(
  ...,
  keep_tex = TRUE,
  latex_engine = "xelatex",
  citation_package = "natbib"
)

lipics_article(
  ...,
  latex_engine = "xelatex",
  keep_tex = TRUE,
  citation_package = "natbib",
  md_extensions = c("-autolink_bare_uris", "-auto_identifiers")
)

lncs_article(..., keep_tex = TRUE, citation_package = c("default", "natbib"))

jedm_article(..., keep_tex = TRUE, citation_package = "natbib")

mdpi_article(
  ...,
  keep_tex = TRUE,
  latex_engine = "pdflatex",
  pandoc_args = NULL,
  citation_package = "natbib"
)

mnras_article(..., keep_tex = TRUE, fig_caption = TRUE)

peerj_article(..., keep_tex = TRUE)

pihph_article(
  ...,
  keep_tex = TRUE,
  latex_engine = "xelatex",
  citation_package = "biblatex"
)

plos_article(..., keep_tex = TRUE, md_extensions = c("-autolink_bare_uris"))

pnas_article(..., keep_tex = TRUE)

sage_article(..., highlight = NULL, citation_package = "natbib")

sim_article(
  ...,
  highlight = NULL,
  citation_package = "natbib",
  latex_engine = "xelatex"
)

springer_article(
  ...,
  keep_tex = TRUE,
  citation_package = "natbib",
  number_sections = TRUE,
  latex_engine = "pdflatex",
  pandoc_args = NULL
)

tf_article(..., keep_tex = TRUE, citation_package = "natbib")

trb_article(..., keep_tex = TRUE, citation_package = "natbib")

wellcomeor_article(
  ...,
  number_sections = FALSE,
  keep_tex = TRUE,
  citation_package = "natbib"
)

isba_article(
  ...,
  keep_tex = TRUE,
  highlight = NULL,
  citation_package = "natbib"
)

Arguments

..., number_sections, keep_tex, latex_engine, citation_package, highlight, fig_caption, md_extensions, template, pandoc_args

Arguments passed to rmarkdown::pdf_document().

journal

one of "aoas", "aap", "aop", "aos", "sts" for ims_article

Value

An R Markdown output format.

Details

You can find more details about each output format below.

acm_article

Format for creating an Association for Computing Machinery (ACM) articles. Adapted from https://www.acm.org/publications/proceedings-template.

acs_article

Format for creating an American Chemical Society (ACS) Journal articles. Adapted from ⁠https://pubs.acs.org/page/4authors/submission/tex.html⁠

aea_article

Format for creating submissions to the American Economic Association (AER, AEJ, JEL, PP).

agu_article

Format for creating a American Geophysical Union (AGU) article. Adapted from https://www.agu.org/publish-with-agu/publish#1.

amq_article

Ce format a été adapté du format du bulletin de l'AMQ.

ams_article

Format for creating an American Meteorological Society (AMS) Journal articles. Adapted from https://www.ametsoc.org/ams/index.cfm/publications/authors/journal-and-bams-authors/author-resources/latex-author-info/.

asa_article

This format was adapted from The American Statistician (TAS) format, but it should be fairly consistent across American Statistical Association (ASA) journals.

arxiv_article

Adapted from the George Kour's format for arXiv and bio-arXiv preprints. So far as I'm aware, entirely unofficial but still a staple.

bioinformatics_article

Format for creating submissions to a Bioinformatics journal. Adapted from https://academic.oup.com/bioinformatics/pages/submission_online.

biometrics_article

This format was adapted from the Biometrics journal.

ctex_article

A wrapper function for rmarkdown::pdf_document() and the default value of latex_engine is changed to xelatex, so it works better for typesetting Chinese documents with the LaTeX package ctex. The function ctex is an alias of ctex_article.

elsevier_article

Format for creating submissions to Elsevier journals. Adapted from https://www.elsevier.com/researcher/author/policies-and-guidelines/latex-instructions.

It requires a minimum version of 2.10 for Pandoc.

frontiers_article

Format for creating Frontiers journal articles. Adapted from https://www.frontiersin.org/about/author-guidelines.

glossa_article

Format for creating submissions to Glossa: a journal of general linguistics. Author Guidelines are available on www.glossa-journal.org. Template is adapted from https://github.com/guidovw/Glossalatex.

ims_article

Format for creating submissions to the Institute of Mathematical Statistics IMS journals and publications. Adapted from https://github.com/vtex-soft/texsupport.ims-aoas.

The argument journal accepts the acronym of any of the journals in IMS:

  • aap: The Annals of Applied Probability

  • aoas: The Annals of Applied Statistics

  • aop: The Annals of Probability

  • aos: The Annals of Statistics

  • sts: Statistical Science

informs_article

Format for creating submissions to INFORMS journals. Adapted from ‘⁠https://pubsonline.informs.org/authorportal/latex-style-files⁠’.

It requires a minimum version of 2.10 for Pandoc.

iop_article

Format for creating submissions to IOP journals. Adapted from ‘⁠https://publishingsupport.iopscience.iop.org/questions/latex-template/⁠’. Please read the guidelines at this link when preparing your article.

jasa_article

Format for creating submissions to the Journal of the Acoustical Society of America. Adapted from https://acousticalsociety.org/preparing-latex-manuscripts/.

lipics_article

Format for creating submissions to LIPIcs - Leibniz International Proceedings Informatics - articles. Adapted from the official Instructions for Authors at https://submission.dagstuhl.de/documentation/authors and the template from the archive authors-lipics-v2019.zip downloaded with version tag v2019.2. The template is provided under The LaTeX Project Public License (LPPL), Version 1.3c.

lncs_article

Format for creating submissions to LNCS - Lecture Notes in Computer Science - articles. Adapted from the official Instructions for Authors at https://www.springer.com/gp/computer-science/lncs/conference-proceedings-guidelines and the template from the archive LaTeX2e+Proceedings+Templates+download.zip downloaded with version tag 2.21.

jedm_article

Format for creating Journal of Educational Data Mining (JEDM) articles. Adapted from https://jedm.educationaldatamining.org/index.php/JEDM/information/authors.

mdpi_article

Format for creating submissions to Multidisciplinary Digital Publishing Institute (MDPI) journals. Adapted from https://www.mdpi.com/authors/latex.

Possible arguments for the YAML header are:

  • title title of the manuscript

  • author list of authors, containing name, affil, and orcid (optional)

  • affiliation list containing num, address, and email for defining author affiliations

  • authorcitation string with last name and first intial of authors as expected to be shown in a reference

  • firstnote can include firstnote through eightnote that correspond to footnote marks in affil

  • correspondence contact information of the corresponding author

  • journal short name (case sensitive) of the journal, see template for options

  • type usually "article" but see template for options

  • status usually "submit"

  • simplesummary optional, may depend on specific journal

  • abstract abstract, limited to 200 words

  • keywords 3 to 10 keywords seperated with a semicolon

  • acknowledgement acknowledgement backmatter (optional)

  • authorcontributions report authorship contributions (optional)

  • funding research funding statement

  • institutionalreview IRB statements (optional)

  • informedconsent Informed consent statements for human research (optional)

  • dataavailability Links to datasets or archives (optional)

  • conflictsofinterest Conflict of interest statement (see journal instructions)

  • sampleavailability Sample availability statement (optional)

  • supplementary Supplementary data statement, see template for example (optional)

  • abbreviations list of abbreviations containing short and long

  • bibliography BibTeX .bib file

  • appendix name of appendix tex file

  • endnote boolean, if TRUE will print list of endnotes if included in text (optional)

  • header-includes: custom additions to the header, before the ⁠\begin{document}⁠ statement

  • include-after: for including additional LaTeX code before the ⁠\end{document}⁠ statement

mnras_article

Format for creating an Monthly Notices of Royal Astronomical Society (MNRAS) Journal articles. Adapted from https://ras.ac.uk.

peerj_article

Format for creating submissions to The PeerJ Journal. This was adapted from the PeerJ Overleaf Template.

pihph_article

Format for creating submissions to the Papers in Historical Phonology (http://journals.ed.ac.uk/pihph/about/submissions). Adapted from https://github.com/pihph/templates. This format works well with latex_engine = "xelatex" and citation_package="biblatex", which are the default. It may not work correctly if you change these value. In that case, please open an issue and, a PR to contribute a change in the template.

plos_article

Format for creating submissions to PLOS journals. Adapted from https://journals.plos.org/ploscompbiol/s/latex.

pnas_article

Format for creating submissions to PNAS journals.

sage_article

Format for creating submissions to Sage Journals. Based on the official Sage Journals Class. Available at ⁠https://uk.sagepub.com/sites/default/files/sage_latex_template_4.zip⁠.

Possible arguments for the YAML header are:

  • title title of the manuscript

  • runninghead short author list for header

  • author list of authors, containing name and num

  • address list containing num and org for defining author affiliations

  • corrauth corresponding author name and address

  • email correspondence email

  • abstract abstract, limited to 200 words

  • keywords keywords for the article

  • bibliography BibTeX .bib file name

  • classoption options of the sagej class

  • header-includes: custom additions to the header, before the ⁠\begin{document}⁠ statement

  • include-after: for including additional LaTeX code before the ⁠\end\{document}⁠ statement

sim_article

Format for creating submissions to Statistics in Medicine. Based on the official Statistics in Medicine at ⁠https://authorservices.wiley.com/author-resources/Journal-Authors/Prepare/new-journal-design.html⁠.

This format uses xelatex by default as PDF engine to support the specific NJD fonts, per guideline.

Possible arguments for the YAML header are:

  • title title of the manuscript

  • author list of authors, containing name and num

  • address list containing num and org for defining author affiliations

  • presentaddress not sure what they mean with this

  • corres author and address for correspondence

  • authormark short author list for header

  • received, revised, accepted dates of submission, revision, and acceptance of the manuscript

  • abstract abstract, limited to 250 words

  • keywords up to 6 keywords

  • abbreviations, list of abbreviations and description separated by a comma

  • bibliography BibTeX .bib file

  • classoption options of the WileyNJD class

  • longtable set to true to include the longtable package, used by default from pandoc to convert markdown to LaTeX code

  • header-includes: custom additions to the header, before the ⁠\begin{document}⁠ statement

  • include-after: for including additional LaTeX code before the ⁠\end{document}⁠ statement

springer_article

This format was adapted from the Springer Macro package for Springer Journals.

tf_article

Format for creating submissions to a Taylor & Francis journal. Adapted from ‘⁠https://www.tandf.co.uk/journals/authors/InteractCADLaTeX.zip⁠’.

trb_article

Format for creating submissions to the Transportation Research Board Annual Meeting. Adapted from ‘⁠https://www.overleaf.com/latex/templates/transportation-research-board-trb-latex-template/jkfndnnkkksw⁠’, which in turn is hosted at ‘⁠https://github.com/chiehrosswang/TRB_LaTeX_tex⁠

wellcomeor_article

Format for creating submissions to Wellcome Open Research. Adapted from <overleaf.com/latex/templates/wellcome-open-research-article-template/hsmhhbpxvvbj>.

isba_article

Format for creating submissions to Bayesian analysis. Based on the official Bayesian analysis class. Template shows how to use this format as a base format for bookdown::pdf_book, but it can very well be used on its own (with limitations that figure referencing will not work). Note that the template sets md_extensions to exclude -autolink_bare_uris because otherwise author emails produce error

Possible arguments for the YAML header are:

  • title title of the manuscript. Shorter version of the title can be provided as runtitle.

  • classoption should equal ba or ⁠ba,preprint⁠ for supplementary article.“

  • author list of authors, containing firstname, lastname, email, url, affiliationref (as code) and footnoterefs (as list of codes)

  • affiliations list containing ref (code for defining author affiliations), institution name and address itself

  • footnotes a list of two-element entries: ref and text

  • abstract abstract, limited to 250 words

  • MSC2020primary, MSC2020primary lists of codes from MCS2020 database

  • keywords a list of keywords

  • supplements a list of entries with two elements title and description

  • doi DOI of the article

  • arxiv Arxiv id

  • acknowledgements acknowledgement text, limited to 250 words

  • bibliography BibTeX .bib file

  • longtable set to true to include the longtable package, used by default from pandoc to convert markdown to LaTeX code

  • header-includes: custom additions to the header, before the ⁠\begin{document}⁠ statement

  • include-after: for including additional LaTeX code before the ⁠\end{document}⁠ statement

Examples

## Not run: 
rmarkdown::draft("MyArticle.Rmd", template = "acm", package = "rticles")
rmarkdown::draft("MyArticle.Rmd", template = "asa", package = "rticles")

## End(Not run)

Austrian Journal of Statistics (AJS) format.

Description

Format for creating a Austrian Journal of Statistics (AJS) article. Adapted from https://www.jstatsoft.org/about/submissions.

Usage

ajs_article(
  ...,
  keep_tex = TRUE,
  citation_package = "natbib",
  pandoc_args = NULL
)

Arguments

...

Arguments to rmarkdown::pdf_document()

keep_tex

Keep the intermediate tex file used in the conversion to PDF. Note that this argument does not control whether to keep the auxiliary files (e.g., ‘.aux’) generated by LaTeX when compiling ‘.tex’ to ‘.pdf’. To keep these files, you may set options(tinytex.clean = FALSE).

citation_package

The LaTeX package to process citations, natbib or biblatex. Use default if neither package is to be used, which means citations will be processed via the command pandoc-citeproc.

pandoc_args

Additional command line options to pass to pandoc


Copernicus journals format.

Description

Format for creating submissions to Copernicus journals.

Usage

copernicus_article(
  ...,
  keep_tex = TRUE,
  highlight = NULL,
  citation_package = "natbib",
  md_extensions = c("-autolink_bare_uris", "-auto_identifiers")
)

copernicus_journal_abbreviations(journal_name = "*")

Arguments

...

Additional arguments to rmarkdown::pdf_document(). Note: extra_dependencies are not allowed as Copernicus does not support additional packages included via \usepackage{}.

keep_tex

Keep the intermediate tex file used in the conversion to PDF. Note that this argument does not control whether to keep the auxiliary files (e.g., ‘.aux’) generated by LaTeX when compiling ‘.tex’ to ‘.pdf’. To keep these files, you may set options(tinytex.clean = FALSE).

highlight

Syntax highlighting style passed to Pandoc.

Supported built-in styles include "default", "tango", "pygments", "kate", "monochrome", "espresso", "zenburn", "haddock", and "breezedark".

Two custom styles are also included, "arrow", an accessible color scheme, and "rstudio", which mimics the default IDE theme. Alternatively, supply a path to a ‘⁠.theme⁠’ file to use a custom Pandoc style. Note that custom theme requires Pandoc 2.0+.

Pass NULL to prevent syntax highlighting.

citation_package

The LaTeX package to process citations, natbib or biblatex. Use default if neither package is to be used, which means citations will be processed via the command pandoc-citeproc.

md_extensions

Markdown extensions to be added or removed from the default definition of R Markdown. See the rmarkdown_format for additional details.

journal_name

A regular expression to filter the by the journal name, see pattern in base::grep(); defaults to *.

Details

This was adapted from https://publications.copernicus.org/for_authors/manuscript_preparation.html.

An number of required and optional manuscript sections, e.g. acknowledgements, competinginterests, or authorcontribution, must be declared using the respective properties of the R Markdown header - see skeleton file.

Version: Based on copernicus_package.zip in the version 7.8, 18 March 2024, using copernicus.cls in version 10.1.11, 03 January.

Copernicus journal abbreviations: You can use the function copernicus_journal_abbreviations() to get the journal abbreviation for all journals supported by the Copernicus article template.

Important note: The online guidelines by Copernicus are the official resource. Copernicus is not responsible for the community contributions made to support the template in this package. Copernicus converts all typeset TeX files into XML, the expressions and markups have to be highly standardized. Therefore, please keep the following in mind:

  • Please provide only one figure file for figures with several panels, and please do not use ⁠\subfloat⁠ or similar commands.

  • Please use only commands in which words, numbers, etc. are within braces (e.g. ⁠\textrm{TEXT}⁠ instead of ⁠\rm TEXT⁠).

  • For algorithms, please use the syntax given in template.tex or provide your algorithm as a figure.

  • Please do not define new commands.

  • Supported packages (⁠\usepackage{}⁠) are already integrated in the copernicus.cls. Please do not insert additional ones in your .tex file.

  • If you opt for syntax highlighting for your preprint or other reasons, please do not forget to use highlight = NULL for your final file upload once your manuscript was accepted for publication.

  • Spaces in labels (⁠\label{}⁠) are not allowed; please make sure that no label name is assigned more than once.

  • Please do not use ⁠\paragraph{}⁠; only ⁠\subsubsection{}⁠ is allowed.

  • It is not possible to add tables in colour.

Value

An R Markdown output format.

Note

If you use rmarkdown::pdf_document(), all internal references (i.e. tables and figures) must use ⁠\ref{}⁠ whereas with bookdown::pdf_document2(), you can additionally use ⁠\@ref()⁠.

References

Manuscript preparation guidelines for authors. https://publications.copernicus.org/for_authors/manuscript_preparation.html

Examples

names(copernicus_journal_abbreviations())
copernicus_journal_abbreviations(journal_name = "Science Data")
## Not run: 
library("rmarkdown")
draft("MyArticle.Rmd", template = "copernicus", package = "rticles")
render("MyArticle/MyArticle.Rmd")

## End(Not run)

IEEE Transactions journal format.

Description

Format for creating submissions to IEEE Transaction journals. Adapted from https://www.ieee.org/publications_standards/publications/authors/author_templates.html

Usage

ieee_article(
  draftmode = c("final", "draft", "draftcls", "draftclsnofoot"),
  hyphenfixes = "op-tical net-works semi-conduc-tor",
  IEEEspecialpaper = "",
  with_ifpdf = FALSE,
  with_cite = FALSE,
  with_amsmath = FALSE,
  with_algorithmic = FALSE,
  with_subfig = FALSE,
  with_array = FALSE,
  with_dblfloatfix = FALSE,
  keep_tex = TRUE,
  pandoc_args = NULL,
  md_extensions = c("-autolink_bare_uris"),
  ...
)

Arguments

draftmode

Specify the draft mode to control spacing and whether images should be rendered. Valid options are: "final" (default), "draft", "draftcls", or "draftclsnofoot".

hyphenfixes

A character value that provides the correct hyphenations for ambiguous words. Separate new words with spaces.

IEEEspecialpaper

A character value containing the publication's special paper designation.

with_ifpdf

A logical value turning on (TRUE) or off (FALSE) the ifpdf LaTeX package.

with_cite

A logical value turning on (TRUE) or off (FALSE) the cite LaTeX package.

with_amsmath

A logical value turning on (TRUE) or off (FALSE) the amsmath LaTeX package.

with_algorithmic

A logical value turning on (TRUE) or off (FALSE) the algorithmic LaTeX package.

with_subfig

A logical value turning on (TRUE) or off (FALSE) the subfig LaTeX package.

with_array

A logical value turning on (TRUE) or off (FALSE) the array LaTeX package.

with_dblfloatfix

A logical value turning on (TRUE) or off (FALSE) the dblfloatfix LaTeX package.

keep_tex

Keep the intermediate tex file used in the conversion to PDF. Note that this argument does not control whether to keep the auxiliary files (e.g., ‘.aux’) generated by LaTeX when compiling ‘.tex’ to ‘.pdf’. To keep these files, you may set options(tinytex.clean = FALSE).

pandoc_args

Additional command line options to pass to pandoc

md_extensions

Markdown extensions to be added or removed from the default definition of R Markdown. See the rmarkdown_format for additional details.

...

Additional arguments to rmarkdown::pdf_document()

Details

Presently, only the "conference" paper mode offered by the IEEEtran.cls is supported.

References

Shell, Michael. "How to use the IEEEtran LATEX class." Journal of LATEX Class Files 1.11 (2002): 10-20. http://mirrors.rit.edu/CTAN/macros/latex/contrib/IEEEtran/IEEEtran_HOWTO.pdf


Journal of Open Source Software (JOSS) format.

Description

Format for creating a Journal of Open Source Software (JOSS) or Journal of Open Source Education (JOSE) articles. Adapted from 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.

Usage

joss_article(
  journal = "JOSS",
  keep_md = TRUE,
  latex_engine = "xelatex",
  pandoc_args = NULL,
  ...
)

Arguments

journal

one of "JOSS" or"JOSE"

keep_md

Whether to retain the intermediate markdown and images. Defaults to TRUE.

latex_engine

LaTeX engine for producing PDF output. Options are "pdflatex", "lualatex", "xelatex" and "tectonic".

pandoc_args

Additional command line options to pass to pandoc

...

Arguments passed to rmarkdown::pdf_document()

Details

The following variables may be set in YAML metadata to populate fields in the article PDF, but are only necessary fo local preview: ⁠formatted_doi, citation_author, year, volume, issue, page, submitted, published, review_url, repository⁠, and archive_doi.


List available journals

Description

List available journal names in this package.

Usage

journals()

Details

These names can be useful in two ways:

Value

A character vector of the journal names.

Examples

rticles::journals()

Journal of Statistical Software (JSS) format.

Description

Format for creating a Journal of Statistical Software (JSS) articles. Adapted from https://www.jstatsoft.org/about/submissions.

Usage

jss_article(
  ...,
  keep_tex = TRUE,
  citation_package = "natbib",
  pandoc_args = NULL
)

Arguments

...

Arguments to rmarkdown::pdf_document()

keep_tex

Keep the intermediate tex file used in the conversion to PDF. Note that this argument does not control whether to keep the auxiliary files (e.g., ‘.aux’) generated by LaTeX when compiling ‘.tex’ to ‘.pdf’. To keep these files, you may set options(tinytex.clean = FALSE).

citation_package

The LaTeX package to process citations, natbib or biblatex. Use default if neither package is to be used, which means citations will be processed via the command pandoc-citeproc.

pandoc_args

Additional command line options to pass to pandoc


Oxford University Press.

Description

Format for creating submissions to many Oxford University Press journals. Adapted from https://academic.oup.com/pages/authoring/journals/preparing_your_manuscript and https://academic.oup.com/icesjms/pages/General_Instructions. and the oup-authoring-template available on CTAN at https://www.ctan.org/pkg/oup-authoring-template.

Usage

oup_article(
  oup_version = 0,
  journal = NULL,
  number_sections = FALSE,
  citation_package = ifelse(oup_version == 0, "default", "natbib"),
  papersize = c("large", "medium", "small"),
  document_style = c("contemporary", "modern", "traditional"),
  namedate = FALSE,
  onecolumn = FALSE,
  number_lines = FALSE,
  number_lines_options = NULL,
  keep_tex = TRUE,
  md_extensions = c("-autolink_bare_uris"),
  pandoc_args = NULL,
  ...
)

Arguments

oup_version

set to 0 (default) to use the 2009 OUP ouparticle.cls included or set to 1 to use the newer 2020 OUP package oup-authoring-template available on CTAN.

journal

journal Title. (Only useful for oup_version > 0).

number_sections

It will be passed to rmarkdown::pdf_document(). Set to TRUE by default when oup_version = 1 is used.

citation_package

The LaTeX package to process citations, natbib or biblatex. Use default if neither package is to be used, which means citations will be processed via the command pandoc-citeproc.

papersize

one of "large" (default), "medium", or "small" setting output page size. (Only useful for oup_version > 0)

document_style

one of "contemporary" (default), "modern", or "traditional" setting overall style of document. (Only useful for oup_version > 0)

namedate

a logical variable indicating if natbib citations should be in name-date format. Defaults to FALSE. (Only useful for oup_version > 0)

onecolumn

a logical variable indicating if one column formatting should be used. Defaults to FALSE. (Only useful for oup_version > 0)

number_lines, number_lines_options

Control the usage of CTAN package lineno in the template. Use number_lines =TRUE to activate and set number_lines_options to change options. (Only useful for oup_version > 0)

keep_tex

Keep the intermediate tex file used in the conversion to PDF. Note that this argument does not control whether to keep the auxiliary files (e.g., ‘.aux’) generated by LaTeX when compiling ‘.tex’ to ‘.pdf’. To keep these files, you may set options(tinytex.clean = FALSE).

md_extensions

Markdown extensions to be added or removed from the default definition of R Markdown. See the rmarkdown_format for additional details.

pandoc_args

Additional command line options to pass to pandoc

...

Additional arguments to rmarkdown::pdf_document()

Details

Note that for

  • oup_version=0, citation_package="default" by default,

  • oup_version=1, citation_package="natbib" by default and citation_package="biblatex" is not supported.

Pandoc requirement

oup_version = 1 requires a minimum version of 2.10.

Examples

## Not run: 
# Use old template based on `ouparticle.cls`
rmarkdown::draft("MyArticle.Rmd", template = "oup_v0", package = "rticles")
# Use new template based on `oup-authoring-template` CTAN package
rmarkdown::draft("MyArticle.Rmd", template = "oup_v1", package = "rticles")

## End(Not run)

R Journal format.

Description

[Deprecated]

This function is now deprecated in favor of the rjtools package which is now officialy recommanded by R Journal https://rjournal.github.io/submissions.html. See below for document

Usage

rjournal_article(..., keep_tex = TRUE, citation_package = "natbib")

Arguments

...

Arguments to rmarkdown::pdf_document().

keep_tex

Keep the intermediate tex file used in the conversion to PDF. Note that this argument does not control whether to keep the auxiliary files (e.g., ‘.aux’) generated by LaTeX when compiling ‘.tex’ to ‘.pdf’. To keep these files, you may set options(tinytex.clean = FALSE).

citation_package

The LaTeX package to process citations, natbib or biblatex. Use default if neither package is to be used, which means citations will be processed via the command pandoc-citeproc.

About this format and the R Journal requirements

Format for creating R Journal articles. Adapted from https://journal.r-project.org/submissions.html.

This file is only a basic article template. For full details of The R Journal style and information on how to prepare your article for submission, see the Instructions for Authors

rticles::rjournal_article will help you build the correct files requirements:

  • A R file will be generated automatically using knitr::purl - see https://bookdown.org/yihui/rmarkdown-cookbook/purl.html for more information.

  • A tex file will be generated from this Rmd file and correctly included in RJwapper.tex as expected to build RJwrapper.pdf.

  • All figure files will be kept in the default rmarkdown ⁠*_files⁠ folder. This happens because keep_tex = TRUE by default in rticles::rjournal_article

  • Only the bib filename is to be modified. An example bib file is included in the template (RJreferences.bib) and you will have to name your bib file as the tex, R, and pdf files.

About YAML header fields

This section documents some of the YAML fields that can be used with this formats.

The author field in the YAML header

FIELD TYPE DESCRIPTION
name required name and surname of the author
affiliation required name of the author's affiliation
address required at least one address line for the affiliation
url optional an additional url for the author or the main affiliation
orcid optional the authors ORCID if available
email required the author's e-mail address
affiliation2 optional name of the author's 2nd affiliation
address2 optional address lines belonging to the author's 2nd affiliation

Please note: Only one url, orcid and email can be provided per author.

Other YAML fields

FIELD TYPE DESCRIPTION
bibliography with default the BibTeX file with the reference entries

Royal Society Open Science journal format.

Description

Format for creating submissions to Royal Society Open Science journals.

Usage

rsos_article(
  ...,
  keep_tex = TRUE,
  latex_engine = "xelatex",
  pandoc_args = NULL,
  includes = NULL,
  fig_crop = TRUE
)

Arguments

...

Additional arguments to rmarkdown::pdf_document()

keep_tex

Keep the intermediate tex file used in the conversion to PDF. Note that this argument does not control whether to keep the auxiliary files (e.g., ‘.aux’) generated by LaTeX when compiling ‘.tex’ to ‘.pdf’. To keep these files, you may set options(tinytex.clean = FALSE).

latex_engine

LaTeX engine for producing PDF output. Options are "pdflatex", "lualatex", "xelatex" and "tectonic".

pandoc_args

Additional command line options to pass to pandoc

includes

Named list of additional content to include within the document (typically created using the includes function).

fig_crop

Whether to crop PDF figures with the command pdfcrop. This requires the tools pdfcrop and ghostscript to be installed. By default, fig_crop = TRUE if these two tools are available.

Author(s)

Thierry Onkelinx, [email protected]


Royal Statistical Society Journal Format

Description

Format for creating articles for Royal Statistical Society adapted from https://rss.org.uk/news-publication/publications/journals/submit-paper/.

Usage

rss_article(..., keep_tex = TRUE, citation_package = "natbib")

Arguments

...

Arguments to rmarkdown::pdf_document()

keep_tex

Keep the intermediate tex file used in the conversion to PDF. Note that this argument does not control whether to keep the auxiliary files (e.g., ‘.aux’) generated by LaTeX when compiling ‘.tex’ to ‘.pdf’. To keep these files, you may set options(tinytex.clean = FALSE).

citation_package

The LaTeX package to process citations, natbib or biblatex. Use default if neither package is to be used, which means citations will be processed via the command pandoc-citeproc.


Split character string into table

Description

It takes a character string with names separated by comma (e.g. journal's names) and turns them into a table

Usage

string_to_table(x, n, split_regex = ", ?")

Arguments

x

string to split and convert to table

n

number of bucket to create. It will be the number of column in the resulting data.frame

split_regex

defaults to ⁠, ?⁠. Pass to split in base::strsplit().

Details

If the number of elements can't be split equally in the n column, blank cells will be created and all placed in the last column.

Value

a dataframe of n columns

Examples

string_to_table(paste(letters, collapse = ", "), 3)