Skip to content

Commit 6c5d802

Browse files
eliocampyihui
authored andcommitted
Adds AGU journals template (#199)
1 parent 24d069f commit 6c5d802

File tree

13 files changed

+2764
-1
lines changed

13 files changed

+2764
-1
lines changed

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ Authors@R: c(
3030
person("Oğuzhan", "Öğreden", role = c("aut"), comment = c(ORCID = "0000-0002-9949-3348")),
3131
person("Dalton", "Hance", role = c("aut"), email = "dhance@usgs.gov"),
3232
person("Daniel", "Nüst", role = c("aut", "cph"), email = "daniel.nuest@uni-muenster.de", comment = c(ORCID = "0000-0002-0024-5046")),
33-
person("Petter", "Uvesten", role = c("aut", "cph"), email = "petter.uvesten.7362@student.lu.se")
33+
person("Petter", "Uvesten", role = c("aut", "cph"), email = "petter.uvesten.7362@student.lu.se"),
34+
person("Elio", "Campitelli", role = c("aut", "cph"), email = "elio.campitelli@cima.fcen.uba.ar", comment = c(ORCID = "0000-0002-7742-9230"))
3435
)
3536
Description: A suite of custom R Markdown formats and templates for
3637
authoring journal articles and conference submissions.

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
export(acm_article)
44
export(acs_article)
55
export(aea_article)
6+
export(agu_article)
67
export(amq_article)
78
export(ams_article)
89
export(asa_article)

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
rticles 0.7
22
---------------------------------------------------------------------
33

4+
- Added the template for the AGU Journals (thanks, @eliocamp, #199).
5+
46
- Updated the template for PLOS to version 3.5 (thanks, @uvesten, #196).
57

68
- No longer hardcode the LaTeX engine to `xelatex` in `rsos_article()` (thanks, @bensprung, #198).

R/agu_article.R

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#' American Geophysical Union (AGU) format
2+
#'
3+
#' Format for creating a American Geophysical Union (AGU) article.
4+
#' Adapted from
5+
#' \href{https://publications.agu.org/author-resource-center/checklists-and-templates/}{https://publications.agu.org/author-resource-center/checklists-and-templates/}.
6+
#'
7+
#' @inheritParams rmarkdown::pdf_document
8+
#' @param ... Arguments to \code{rmarkdown::pdf_document}
9+
#'
10+
#' @return R Markdown output format to pass to \code{\link[rmarkdown:render]{render}}
11+
#'
12+
#' @examples
13+
#'
14+
#' \dontrun{
15+
#' library(rmarkdown)
16+
#' draft("MyArticle.Rmd", template = "agu_article", package = "rticles")
17+
#' }
18+
#'
19+
#' @export
20+
agu_article <- function(..., keep_tex = TRUE, citation_package = 'natbib',
21+
highlight = NULL, md_extensions = c("-autolink_bare_uris",
22+
"-auto_identifiers")) {
23+
template <- find_resource("agu_article", "template.tex")
24+
inherit_pdf_document(template = template,
25+
keep_tex = keep_tex,
26+
citation_package = citation_package,
27+
md_extensions = md_extensions,
28+
highlight = highlight,
29+
...)
30+
}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ The **rticles** package provides a suite of custom [R Markdown](http://rmarkdown
2424

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

27+
- [AGU](https://sites.agu.org/) journal submissions
28+
2729
- [AMS](https://www.ametsoc.org/) articles
2830

2931
- [Biometrics](http://www.biometrics.tibs.org/) articles
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
%% March 2018
2+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3+
% AGUJournalTemplate.tex: this template file is for articles formatted with LaTeX
4+
%
5+
% This file includes commands and instructions
6+
% given in the order necessary to produce a final output that will
7+
% satisfy AGU requirements, including customized APA reference formatting.
8+
%
9+
% You may copy this file and give it your
10+
% article name, and enter your text.
11+
%
12+
%
13+
% Step 1: Set the \documentclass
14+
%
15+
% There are two options for article format:
16+
%
17+
% PLEASE USE THE DRAFT OPTION TO SUBMIT YOUR PAPERS.
18+
% The draft option produces double spaced output.
19+
%
20+
21+
%% To submit your paper:
22+
\documentclass[$for(classoption)$$classoption$$sep$,$endfor$]{agujournal2018}
23+
\usepackage{apacite}
24+
\usepackage{url} %this package should fix any errors with URLs in refs.
25+
%%%%%%%
26+
% As of 2018 we recommend use of the TrackChanges package to mark revisions.
27+
% The trackchanges package adds five new LaTeX commands:
28+
%
29+
% \note[editor]{The note}
30+
% \annote[editor]{Text to annotate}{The note}
31+
% \add[editor]{Text to add}
32+
% \remove[editor]{Text to remove}
33+
% \change[editor]{Text to remove}{Text to add}
34+
%
35+
% complete documentation is here: http://trackchanges.sourceforge.net/
36+
%%%%%%%
37+
38+
39+
%% Enter journal name below.
40+
%% Choose from this list of Journals:
41+
%
42+
% JGR: Atmospheres
43+
% JGR: Biogeosciences
44+
% JGR: Earth Surface
45+
% JGR: Oceans
46+
% JGR: Planets
47+
% JGR: Solid Earth
48+
% JGR: Space Physics
49+
% Global Biogeochemical Cycles
50+
% Geophysical Research Letters
51+
% Paleoceanography and Paleoclimatology
52+
% Radio Science
53+
% Reviews of Geophysics
54+
% Tectonics
55+
% Space Weather
56+
% Water Resources Research
57+
% Geochemistry, Geophysics, Geosystems
58+
% Journal of Advances in Modeling Earth Systems (JAMES)
59+
% Earth's Future
60+
% Earth and Space Science
61+
% Geohealth
62+
%
63+
% ie, \journalname{Water Resources Research}
64+
65+
\journalname{$journal$}
66+
67+
$for(header-includes)$
68+
$header-includes$
69+
$endfor$
70+
71+
\begin{document}
72+
73+
%% ------------------------------------------------------------------------ %%
74+
% Title
75+
%
76+
% (A title should be specific, informative, and brief. Use
77+
% abbreviations only if they are defined in the abstract. Titles that
78+
% start with general keywords then specific terms are optimized in
79+
% searches)
80+
%
81+
%% ------------------------------------------------------------------------ %%
82+
83+
% Example: \title{This is a test title}
84+
85+
\title{$title$}
86+
87+
%% ------------------------------------------------------------------------ %%
88+
%
89+
% AUTHORS AND AFFILIATIONS
90+
%
91+
%% ------------------------------------------------------------------------ %%
92+
93+
% Authors are individuals who have significantly contributed to the
94+
% research and preparation of the article. Group authors are allowed, if
95+
% each author in the group is separately identified in an appendix.)
96+
97+
% List authors by first name or initial followed by last name and
98+
% separated by commas. Use \affil{} to number affiliations, and
99+
% \thanks{} for author notes.
100+
% Additional author notes should be indicated with \thanks{} (for
101+
% example, for current addresses).
102+
103+
% Example: \authors{A. B. Author\affil{1}\thanks{Current address, Antartica}, B. C. Author\affil{2,3}, and D. E.
104+
% Author\affil{3,4}\thanks{Also funded by Monsanto.}}
105+
106+
\authors{
107+
$for(authors)$
108+
$authors.name$
109+
\affil{$authors.affil$}
110+
$if(authors.thanks)$
111+
\thanks{$authors.thanks$}
112+
$endif$
113+
$endfor$
114+
}
115+
116+
117+
% \affiliation{1}{First Affiliation}
118+
% \affiliation{2}{Second Affiliation}
119+
% \affiliation{3}{Third Affiliation}
120+
% \affiliation{4}{Fourth Affiliation}
121+
122+
$for(affiliations)$
123+
\affiliation{$affiliations.number$}{$affiliations.name$}
124+
$endfor$
125+
%(repeat as many times as is necessary)
126+
127+
%% Corresponding Author:
128+
% Corresponding author mailing address and e-mail address:
129+
130+
% (include name and email addresses of the corresponding author. More
131+
% than one corresponding author is allowed in this LaTeX file and for
132+
% publication; but only one corresponding author is allowed in our
133+
% editorial system.)
134+
135+
% Example: \correspondingauthor{First and Last Name}{email@address.edu}
136+
$for(corresponding_author)$
137+
\correspondingauthor{$corresponding_author.name$}{$corresponding_author.email$}
138+
$endfor$
139+
140+
%% Keypoints, final entry on title page.
141+
142+
% List up to three key points (at least one is required)
143+
% Key Points summarize the main points and conclusions of the article
144+
% Each must be 100 characters or less with no special characters or punctuation
145+
146+
% Example:
147+
% \begin{keypoints}
148+
% \item List up to three key points (at least one is required)
149+
% \item Key Points summarize the main points and conclusions of the article
150+
% \item Each must be 100 characters or less with no special characters or punctuation
151+
% \end{keypoints}
152+
153+
\begin{keypoints}
154+
$for(keypoints)$
155+
\item $keypoints$
156+
$endfor$
157+
\end{keypoints}
158+
159+
%% ------------------------------------------------------------------------ %%
160+
%
161+
% ABSTRACT
162+
%
163+
% A good abstract will begin with a short description of the problem
164+
% being addressed, briefly describe the new data or analyses, then
165+
% briefly states the main conclusion(s) and how they are supported and
166+
% uncertainties.
167+
%% ------------------------------------------------------------------------ %%
168+
169+
%% \begin{abstract} starts the second page
170+
171+
\begin{abstract}
172+
$abstract$
173+
\end{abstract}
174+
175+
$body$
176+
177+
$if(bibliography)$
178+
\bibliography{$bibliography$}
179+
$endif$
180+
181+
182+
\end{document}

0 commit comments

Comments
 (0)