Skip to content
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

Adds AGU journals template #199

Merged
merged 13 commits into from
Mar 14, 2019
Merged
Show file tree
Hide file tree
Changes from 7 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 @@ -30,7 +30,8 @@ Authors@R: c(
person("Oğuzhan", "Öğreden", role = c("aut"), comment = c(ORCID = "0000-0002-9949-3348")),
person("Dalton", "Hance", role = c("aut"), email = "dhance@usgs.gov"),
person("Daniel", "Nüst", role = c("aut", "cph"), email = "daniel.nuest@uni-muenster.de", comment = c(ORCID = "0000-0002-0024-5046")),
person("Petter", "Uvesten", role = c("aut", "cph"), email = "petter.uvesten.7362@student.lu.se")
person("Petter", "Uvesten", role = c("aut", "cph"), email = "petter.uvesten.7362@student.lu.se"),
person("Elio", "Campitelli", role = c("aut", "cph"), email = "elio.campitelli@cima.fcen.uba.ar", comment = c(ORCID = "0000-0002-7742-9230"))
)
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 @@ -3,6 +3,7 @@
export(acm_article)
export(acs_article)
export(aea_article)
export(agu_article)
export(amq_article)
export(ams_article)
export(asa_article)
Expand Down
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
rticles 0.7
---------------------------------------------------------------------

- Added the template for the AGU Journals (thanks, @eliocamp)

- Updated the template for PLOS to version 3.5 (thanks, @uvesten, #196).

- No longer hardcode the LaTeX engine to `xelatex` in `rsos_article()` (thanks, @bensprung, #198).
Expand Down
30 changes: 30 additions & 0 deletions R/agu_article.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#' American Geophysical Union (AGU) format
#'
#' Format for creating a American Geophysical Union (AGU) article.
#' Adapted from
#' \href{https://publications.agu.org/author-resource-center/checklists-and-templates/}{https://publications.agu.org/author-resource-center/checklists-and-templates/}.
#'
#' @inheritParams rmarkdown::pdf_document
#' @param ... Arguments to \code{rmarkdown::pdf_document}
#'
#' @return R Markdown output format to pass to \code{\link[rmarkdown:render]{render}}
#'
#' @examples
#'
#' \dontrun{
#' library(rmarkdown)
#' draft("MyArticle.Rmd", template = "agu_article", package = "rticles")
#' }
#'
#' @export
agu_article <- function(..., keep_tex = TRUE, citation_package = 'natbib',
highlight = NULL, md_extensions = c("-autolink_bare_uris",
"-auto_identifiers")) {
template <- find_resource("agu_article", "template.tex")
fmt <- inherit_pdf_document(template = template,
yihui marked this conversation as resolved.
Show resolved Hide resolved
keep_tex = keep_tex,
citation_package = citation_package,
md_extensions = md_extensions,
highlight = highlight,
...)
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ The **rticles** package provides a suite of custom [R Markdown](http://rmarkdown

- [AEA](https://www.aeaweb.org/journals/policies/templates) journal submissions

- [AGU](https://sites.agu.org/) journal submissions

- [AMS](https://www.ametsoc.org/) articles

- [Biometrics](http://www.biometrics.tibs.org/) articles
Expand Down
182 changes: 182 additions & 0 deletions inst/rmarkdown/templates/agu_article/resources/template.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
%% March 2018
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% AGUJournalTemplate.tex: this template file is for articles formatted with LaTeX
%
% This file includes commands and instructions
% given in the order necessary to produce a final output that will
% satisfy AGU requirements, including customized APA reference formatting.
%
% You may copy this file and give it your
% article name, and enter your text.
%
%
% Step 1: Set the \documentclass
%
% There are two options for article format:
%
% PLEASE USE THE DRAFT OPTION TO SUBMIT YOUR PAPERS.
% The draft option produces double spaced output.
%

%% To submit your paper:
\documentclass[$options$]{agujournal2018}
yihui marked this conversation as resolved.
Show resolved Hide resolved
\usepackage{apacite}
\usepackage{url} %this package should fix any errors with URLs in refs.
%%%%%%%
% As of 2018 we recommend use of the TrackChanges package to mark revisions.
% The trackchanges package adds five new LaTeX commands:
%
% \note[editor]{The note}
% \annote[editor]{Text to annotate}{The note}
% \add[editor]{Text to add}
% \remove[editor]{Text to remove}
% \change[editor]{Text to remove}{Text to add}
%
% complete documentation is here: http://trackchanges.sourceforge.net/
%%%%%%%


%% Enter journal name below.
%% Choose from this list of Journals:
%
% JGR: Atmospheres
% JGR: Biogeosciences
% JGR: Earth Surface
% JGR: Oceans
% JGR: Planets
% JGR: Solid Earth
% JGR: Space Physics
% Global Biogeochemical Cycles
% Geophysical Research Letters
% Paleoceanography and Paleoclimatology
% Radio Science
% Reviews of Geophysics
% Tectonics
% Space Weather
% Water Resources Research
% Geochemistry, Geophysics, Geosystems
% Journal of Advances in Modeling Earth Systems (JAMES)
% Earth's Future
% Earth and Space Science
% Geohealth
%
% ie, \journalname{Water Resources Research}

\journalname{$journal$}

$for(header-includes)$
$header-includes$
$endfor$

\begin{document}

%% ------------------------------------------------------------------------ %%
% Title
%
% (A title should be specific, informative, and brief. Use
% abbreviations only if they are defined in the abstract. Titles that
% start with general keywords then specific terms are optimized in
% searches)
%
%% ------------------------------------------------------------------------ %%

% Example: \title{This is a test title}

\title{$title$}

%% ------------------------------------------------------------------------ %%
%
% AUTHORS AND AFFILIATIONS
%
%% ------------------------------------------------------------------------ %%

% Authors are individuals who have significantly contributed to the
% research and preparation of the article. Group authors are allowed, if
% each author in the group is separately identified in an appendix.)

% List authors by first name or initial followed by last name and
% separated by commas. Use \affil{} to number affiliations, and
% \thanks{} for author notes.
% Additional author notes should be indicated with \thanks{} (for
% example, for current addresses).

% Example: \authors{A. B. Author\affil{1}\thanks{Current address, Antartica}, B. C. Author\affil{2,3}, and D. E.
% Author\affil{3,4}\thanks{Also funded by Monsanto.}}

\authors{
$for(authors)$
$authors.name$
\affil{$authors.affil$}
$if(authors.thanks)$
\thanks{$authors.thanks$}
$endif$
$endfor$
}


% \affiliation{1}{First Affiliation}
% \affiliation{2}{Second Affiliation}
% \affiliation{3}{Third Affiliation}
% \affiliation{4}{Fourth Affiliation}

$for(affiliations)$
\affiliation{$affiliations.number$}{$affiliations.name$}
$endfor$
%(repeat as many times as is necessary)

%% Corresponding Author:
% Corresponding author mailing address and e-mail address:

% (include name and email addresses of the corresponding author. More
% than one corresponding author is allowed in this LaTeX file and for
% publication; but only one corresponding author is allowed in our
% editorial system.)

% Example: \correspondingauthor{First and Last Name}{email@address.edu}
$for(corresponding_author)$
\correspondingauthor{$corresponding_author.name$}{$corresponding_author.email$}
$endfor$

%% Keypoints, final entry on title page.

% List up to three key points (at least one is required)
% Key Points summarize the main points and conclusions of the article
% Each must be 100 characters or less with no special characters or punctuation

% Example:
% \begin{keypoints}
% \item List up to three key points (at least one is required)
% \item Key Points summarize the main points and conclusions of the article
% \item Each must be 100 characters or less with no special characters or punctuation
% \end{keypoints}

\begin{keypoints}
$for(keypoints)$
\item $keypoints$
$endfor$
\end{keypoints}

%% ------------------------------------------------------------------------ %%
%
% ABSTRACT
%
% A good abstract will begin with a short description of the problem
% being addressed, briefly describe the new data or analyses, then
% briefly states the main conclusion(s) and how they are supported and
% uncertainties.
%% ------------------------------------------------------------------------ %%

%% \begin{abstract} starts the second page

\begin{abstract}
$abstract$
\end{abstract}

$body$

$if(bibliography)$
\bibliography{$bibliography$}
$endif$


\end{document}
Loading