This documents provides a quick introduction to using the starticles
generic scientific article rmarkdown
template. Though the template can be used by itself for many types of
scientific documents and likely for submitting publications to many
journals, it is primarily intended as a starter format for writing a
scientific publication before one has chosen a specific target journal.
Once an article has been written, the format can be quickly adapted for
use with the rticles package
(generally inside a bookdown::pdf_document2
wrapper).
The latest version of this package can be installed from Github executing the following command in R:
::install_github("dmkaplan2000/starticles",build_vignettes=TRUE) remotes
You can access the template by one of two approaches:
Via Rstudio using File
\(\rightarrow\) New file
\(\rightarrow\) R Markdown...
\(\rightarrow\)
From Template
and choosing the
Generic scientific article {starticles}
template.
Within an interactive R session with:
::draft("MYARTICLENAME.Rmd","generic_article","starticles",edit=FALSE) rmarkdown
The first approach will prompt you for the name of a directory where the generic article template will be installed.
The second approach will create a directory named
MYARTICLENAME
within which you will find the Rmarkdown file
MYARTICLENAME.Rmd
.
In both cases, there will be a directory containing the core
Rmarkdown template document (extension .Rmd
), as well as a
LaTeX pandoc template (extension .tex
), a sample BibTeX
file (extension .bib
) and a citation style file for
formatting references (extension .csl
).
The Rmarkdown document (.Rmd
) is the principal
file that should be edited to create your article. It contains numerous
comments on how to use the format and should be largely self-explanatory
if you are familiar with Rmarkdown.
The LaTeX pandoc template (.tex
) should
generally not be modified unless you are an advanced user.
The BibTeX file (.bib
) should be replaced by
one containing the references for your article and the appropriate entry
of the YAML header of the Rmarkdown document should be modified to
reflect the name of the BibTeX file. There are many ways to generate a
BibTeX file, but I have found Zotero, Better BibTeX for
Zotero and the R package citr to be quite useful.
The citation style file (.csl
) provided with
the package is quite functional, but many more formats are available at
the Zotero style repository.
The template also allows one to use the natbib
citation
style provided by LaTeX.
Once the template has been created, you would modify the Rmarkdown
document and render it as a PDF file using either the Knit
button in Rstudio or via the command-line:
::render("MYARTICLENAME/MYARTICLENAME.Rmd") rmarkdown