diff --git a/DESCRIPTION b/DESCRIPTION index 11ecddbd7..a13b4d3ed 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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. diff --git a/NAMESPACE b/NAMESPACE index 8a5aca5df..53b922fab 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -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) diff --git a/NEWS b/NEWS index 0de0803b4..ae9122124 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ rticles 0.7 --------------------------------------------------------------------- +- Added the template for the AGU Journals (thanks, @eliocamp, #199). + - 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). diff --git a/R/agu_article.R b/R/agu_article.R new file mode 100644 index 000000000..705b650dd --- /dev/null +++ b/R/agu_article.R @@ -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") + inherit_pdf_document(template = template, + keep_tex = keep_tex, + citation_package = citation_package, + md_extensions = md_extensions, + highlight = highlight, + ...) +} diff --git a/README.md b/README.md index cc95abbb3..e2a832b8a 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/inst/rmarkdown/templates/agu_article/resources/template.tex b/inst/rmarkdown/templates/agu_article/resources/template.tex new file mode 100644 index 000000000..569fc4edc --- /dev/null +++ b/inst/rmarkdown/templates/agu_article/resources/template.tex @@ -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[$for(classoption)$$classoption$$sep$,$endfor$]{agujournal2018} +\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} diff --git a/inst/rmarkdown/templates/agu_article/skeleton/agujournal2018.cls b/inst/rmarkdown/templates/agu_article/skeleton/agujournal2018.cls new file mode 100644 index 000000000..63d398246 --- /dev/null +++ b/inst/rmarkdown/templates/agu_article/skeleton/agujournal2018.cls @@ -0,0 +1,1302 @@ +\def\currversion{August 23, 2018} + + %****************************************************************% + %* *% + %* AGU Class File for all AGU Journals *% + %* *% + %* Written by Amy Hendrickson *% + %* TeXnology Inc.: 617 738-8029 *% + %* amyh@texnology.com *% + %* http://www.texnology.com *% + %* *% + %****************************************************************% + +%%% Updates by Dangerous Curve typesetting@dangerouscurve.org +%%% +%%% 2017-07-14 +%%% (Changes marked DC) +%%% +%%% Use BibLaTeX for change to APA style. +%%% Removed tracking-changes code. +%%% +%%% +%%% 2017-12-16 +%%% +%%% Remove biblatex. +%%% Use apacite instead of agufull08, + +%%% 2018-07-17 / NRV +%%% thanks to John Haiducek for help with citep error + + + +\ProvidesClass{agujournal2018} + [08/23/2018] + +%% SEARCH BELOW FOR THE NUMBER TO FIND PARTICULAR MACRO GROUP + + %% Macro Contents: + %% 0) Usepackage graphicx, colorx, other .sty files which we'll need to have available. + + %% 1) Setting Default Dimensions + + %% 2) Global Parameters + + %% 3) Setting and Using Options + + %% 4) Font Family declarations + + %% 5) Running heads, Footnotes + + %% 6) Title Page: Journal Name, + %% Title, Authors, Affils, Corresponding Authors, Author Notes, Key Points; abstract + + %% 7) Section Commands + + %% 8) Figure and Table Captions + + %% 9) Listing + + %% 10) Etc.: Hyphenation Library, Quote, Extract + + %% 11) End Article: Appendix, Glossary, Acronyms, Notation, Acknowledgments + + %% 12) Bibliography, References + + %% 13) Track Changes + + %% 14) Supporting Information + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% 0) Bringing in packages that we will need: + +%% Nicer font choice than Computer Modern: +%\RequirePackage{newtxtext,newtxmath} + +%% always will want this available +\RequirePackage{graphicx} + +%% to get illustrations to print, in spite of being in Draft mode: +\setkeys{Gin}{draft=false} + +%% xcolor.sty +\RequirePackage{xcolor} +\RequirePackage{url} + +%% for better track changes +\RequirePackage{trackchanges} + +%% used for running head which is in light gray + +\definecolor{ltgray}{cmyk}{.12,0,0,.3} + +%% Line numbering +\RequirePackage{lineno} +%% add more space between text and number: +\advance\linenumbersep 12pt + +%% this package makes paragraphs indent after section heads +\RequirePackage{indentfirst} + +%% \RaggedRight makes the right margin go in and out; if this is commented out +%% the default will be a right justified margin. +\RequirePackage{ragged2e} +\RaggedRightParindent=24pt +\advance\RaggedRightRightskip 24pt +\RaggedRight + +%% Defines \sidewaystable and \sidewaysfigure, preferred by AGU +\RequirePackage{rotating} +\newif\ifturnofflinenums +\let\savesidewaystable\sidewaystable +\let\savesidewaysfigure\sidewaysfigure +%% turns off line numbers in rotated tables and figures, aesthetic consideration, +%% not necessary. +\def\sidewaystable{\turnofflinenumstrue\savesidewaystable\centering} +\def\sidewaysfigure{\turnofflinenumstrue\savesidewaysfigure\centering} + +%%xx Use apacite. DC +%% Formats bibliography, this .sty file needs to be entered later +% \RequirePackage{natbib} + +\PassOptionsToPackage{normalem}{ulem} +\RequirePackage{ulem} + +%% <== End Bringing in Packages + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% 1) Setting Default Dimensions + + %% Comment + %% parindent= indentation for every new paragraph + %% parskip= distance between paragraphs. Giving `plus .1pt' allows + %% a little stretch between paragraphs. If you don't like this stretch + %% you can set \parskip=0pt + +\parindent=24pt +\parskip=8pt % plus .1pt + + %% Comment + %% \textheight is distance from bottom of text, exclusive of running + %% foot, to top of text, exclusive of running head. + +\textheight = 9.25in + %% Comment + %% \textwidth= Width of text in normal page. Can change this width locally + %% with either \leftskip/\rightskip or change in \hsize, but will + %% still be able to return to the normal width by setting \hsize=\textwidth + %% Running head normally uses \textwidth as its width so that a change + %% in \hsize in text will not change width of running head or feet. + +\textwidth 5.5in + + %% Comment + %% \voffset moves the printed page up or down on the physical page. +\advance\voffset-.25in + + %% Comment + %% \hoffset moves the printed page left or right on the physical page. +\advance\hoffset.35in + + %% Comment + %% Setting page dimensions + %% See p. 84-- 85 in LaTeX Companion, Goosins, Mittlebach and Samarin + %% or p. 555--556 in A Guide to LaTeX, Kopka and Daly, both Addison Wesley + %% books. + + %% \topmargin space between top of page and running head + + %% \headheight height of running head + + %% \headsep space between running head and text + + %% \topskip space between top of text and baseline of first line + %% of text + + %% \footskip space between text and baseline of page number + + %% \columnsep space between two column text + + %% \columnseprule width of optional rule between columns, usually set to 0pt + + %% \footnotesep Distance between two footnotes + + %% \skip\footins Distance between text and footnote + + %% \floatsep Distance between float and another + %% float for single col floats. + + %% \textfloatsep Distance between float and text at top + %% or bottom of page. + + %% \intextsep Distance between float and text if float is mid page + %% or mid column + + %% \dblfloatsep For float spanning both columns in two column text, + %% above or below both columns, space between float and and float. + + +\topmargin0pt +\headheight 8pt +\headsep 6pt +\topskip 10pt +\footskip 36pt + +\columnsep 10pt +\columnseprule 0pt + +\footnotesep 6.65pt +\skip\footins 24pt plus .1pt minus .1pt + +\floatsep 12pt plus 2pt minus 2pt +\textfloatsep 36pt plus 2pt minus 4pt +\intextsep 24pt plus 2pt minus 2pt + +\dblfloatsep 12pt plus 2pt minus 2pt +\dbltextfloatsep 20pt plus 2pt minus 4pt + +%% float placement, used by output routine +\@fptop 0pt plus 1fil +\@fpsep 8pt plus 2fil +\@fpbot 0pt plus 1fil +\@dblfptop 0pt plus 1fil +\@dblfpsep 8pt plus 2fil +\@dblfpbot 0pt plus 1fil + + %% When using \marginpar, how wide can marginal note be? + +\marginparwidth .75in + + %% When using \marginpar, how much horizontal space between marginal + %% note and text + + \setlength\marginparsep{40\p@} + + %% When to push marginal note on to next page, minimum vertical space between + %% two marginal notes + +\setlength\marginparpush{5\p@} + + %% space added before trivlist, which is used in many other + %% macros, (for instance, verbatim environment) + %% if macro is called in vertical mode, otherwise only parskip + %% is added. Can set this without stretch if you don't like + %% the stretchy space added. + +\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@} + + %% Comment + %% Setting parameters that control float placement + %% + %% \topnumber counter holds the maximum number of + %% floats that can appear on the top of a text page. + %% + %% \topfraction indicates the maximum part of a text page that can be + %% occupied by floats at the top. + %% + %% \bottomnumber counter holds the maximum number of + %% floats that can appear on the bottom of a text page. + %% + %% \bottomfraction indicates the maximum part of a text page that can be + %% occupied by floats at the bottom. + %% + %% \totalnumber indicates the maximum number of floats that can appear on + %% any text page. + %% + %% \textfraction indicates the minimum part of a text page that has to be + %% occupied by text. + %% + %% \floatpagefraction indicates the minimum part of a page that has to be + %% occupied by floating objects before a `float page' is produced. + %% + %% \dbltopnumber counter holds the maximum number of + %% two column floats that can appear on the top of a two column text + %% page. + %% + %% \dbltopfraction indicates the maximum part of a two column text page that + %% can be occupied by two column floats at the top. + %% + %% \dblfloatpagefraction indicates the minimum part of a page that has to be + %% occupied by two column wide floating objects before a `float + %% page' is produced. + %%% + +\setcounter{topnumber}{10} +\def\topfraction{.9} +\setcounter{bottomnumber}{10} +\def\bottomfraction{.1} +\setcounter{totalnumber}{10} +\def\textfraction{.2} +\def\floatpagefraction{.5} +\setcounter{dbltopnumber}{2} +\def\dbltopfraction{.7} +\def\dblfloatpagefraction{.5} + + %% Setting Array and Table Spacing + %% distance between columns in array +\setlength\arraycolsep{5\p@} + + %% distance between columns in tabular +\tabcolsep 6pt + + %% width of lines in array +\setlength\arrayrulewidth{.4\p@} + + %% horizontal space between two lines in array +\setlength\doublerulesep{2\p@} + + %% space between two lines in tabular +\setlength\tabbingsep{\labelsep} + + %% Minipage + %% minipage space +\skip\@mpfootins = \skip\footins + + %% Framebox \fbox{} or \framebox{} + %% space between line in framebox and text within it +\setlength\fboxsep{3\p@} + + %% width of ruled line in framebox +\setlength\fboxrule{.4\p@} + + +%%%%%%%%%%%%%%% <<== end dimensions + +% 2) %%% Global parameters ==>> + + %% Makes sure that there will not be any widow or club lines, + %% smaller numbers allow them occassionally, but you probably need + %% these set to 10000 so that there are never any + +\widowpenalty10000 +\clubpenalty10000 + + %% How many levels deep do you want sections to be numbered-- higher number + %% means more levels will be numbered. Here was are asking only for + %% sections to be numbered, not subsections, or subsubsection etc. +\setcounter{secnumdepth}{4} + + + %% To make left and right page position differently, and have + %% running heads be different on even and odd pages +\@twosidetrue + + %% Marginal notes should be on the left on even numbered pages; on + %% right on odd numbered pages. +\@mparswitchtrue + + %% Starting with one column text +\@twocolumnfalse + + %% openbib will allow separate lines for parts of bibliography + %% entries, default is to run different parts of bib entry into a + %% paragraph form. + +\newif\if@openbib +\@openbibfalse + + %% Conditionals that we can set and use later +\newif\if@openright +\newif\if@mainmatter +\newif\if@restonecol +\newif\if@titlepage +\newif\ifdraft +\newif\ifnumlines + + %% Comment + %% Set Names, to be used later, usually in more than one + %% macro. +\newcommand{\bibname}{Bibliography} +\newcommand{\figurename}{Figure} +\newcommand{\tablename}{Table} +\newcommand{\appendixname}{Appendix} + +%%% <== end global parameters + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 3) Declare Options and Use Default Options +\DeclareOption{draft}{\global\drafttrue} +\DeclareOption{linenumbers}{\global\numlinestrue} +\DeclareOption{final}{\setlength\overfullrule{0pt}\global\draftfalse} + +\ExecuteOptions{letterpaper,10pt,onecolumn,final,openright} +\ProcessOptions + +\ifnumlines +\linenumbers*[1] +\fi + +%% <==== End Setting Options + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% 4) Font Family Info + +%% Comment +%% When \ifdraft is true it will make the baselineskip = \draftskip + +\newcount\draftskip +\draftskip=20 + +\newcommand{\@ptsize}{} + + %% Comment + %% Set font sizes, normal baselineskip, for the range of sizes, + %% changing baselineskip to be larger if draft option is true + %% \setfontsize takes the first arg as the size of the font and + %% the second as the size of the baselineskip + %% \abovedisplayskip and \belowdisplayskip is the space before and + %% after an equation, adjusted in some sizes. + + %% \Huge 25pt + %% \huge 20pt + %% \LARGE 17pt + %% \Large 14pt + %% \large 12pt + %% \normalsize 10 pt font + %% \small 9pt + %% \footnotesize 8pt + %% \scriptsize 7pt font + %% \tiny 5pt font + + +\renewcommand\normalsize{% +\ifdraft + \@setfontsize\normalsize\@xpt{\draftskip} +\else + \@setfontsize\normalsize\@xpt{12} +\fi + \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ + \abovedisplayshortskip \z@ \@plus3\p@ + \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ + \belowdisplayskip \abovedisplayskip + \let\@listi\@listI} +\normalsize + +\newcommand\bignormalsize{\@setfontsize\bignormalsize{10.5pt}{12}} + +\newcommand\small{% +\ifdraft + \@setfontsize\small\@ixpt{\draftskip}% +\else + \@setfontsize\small\@ixpt{14}% +\fi + \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ + \abovedisplayshortskip \z@ \@plus2\p@ + \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ + \def\@listi{\leftmargin\leftmargini + \topsep 4\p@ \@plus2\p@ \@minus2\p@ + \parsep 2\p@ \@plus\p@ \@minus\p@ + \itemsep \parsep}% + \belowdisplayskip \abovedisplayskip +} + +\newcommand\footnotesize{% +\ifdraft + \@setfontsize\footnotesize\@viiipt{\draftskip}% +\else + \@setfontsize\footnotesize\@viiipt{12}% +\fi + \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@ + \abovedisplayshortskip \z@ \@plus\p@ + \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@ + \def\@listi{\leftmargin\leftmargini + \topsep 3\p@ \@plus\p@ \@minus\p@ + \parsep 2\p@ \@plus\p@ \@minus\p@ + \itemsep \parsep}% + \belowdisplayskip \abovedisplayskip +} + +\newcommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt} +\newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt} +\newcommand\large{\ifdraft +\@setfontsize\large\@xiipt{\draftskip} +\else +\@setfontsize\large\@xiipt{14} +\fi +} + +\newcommand\Large{\ifdraft +\@setfontsize\Large\@xivpt{\draftskip} +\else +\@setfontsize\Large\@xivpt{18} +\fi} + +\newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}} +\newcommand\huge{\@setfontsize\huge\@xxpt{25}} +\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}} + +%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% These definitions accomodate older font typeface commands, +%% that are still in use. + +\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} +\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} +\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} +\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} +\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} +\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} +\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} +\DeclareRobustCommand{\cal}{\@fontswitch{\relax}{\mathcal}} +\DeclareRobustCommand{\mit}{\@fontswitch{\relax}{\mathnormal}} + +%% end font family declarations +%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 5) Running heads and footnotes + +%% Running heads ===>>> + + %% unless we need these, leave these uncommented + \let\@mkboth\@gobbletwo + \let\chaptermark\@gobble + \let\sectionmark\@gobble + %% + +\def\ps@headings{\def\@oddfoot{\centerline{\small --\the\c@page--}} +\let\@evenfoot\@oddfoot +%% \thejournalname set with \journalname{} command; if not you will get a request to set +%% the journal name with \journalname{} +\def\@oddhead{\vbox to 0pt{\vss\centerline{\color{ltgray}\small manuscript +submitted to {\it \thejournalname}}\vskip24pt}} +\let\@evenhead\@oddhead +} + + + +%% After ps@headings is defined, now we use it to activate the definitions +\ps@headings + +%%% Footnotes + + %% save these definitions so that we can use them if + %% we don't like the redefinition +\let\savefootnote\footnote +\let\savefootnotetext\footnotetext + + %%% ruled line above footnote + + \renewcommand{\footnoterule}{% + \kern-3\p@ + \hrule width .4\columnwidth + \kern 2.6\p@} + + \let\savefootnoterule\footnoterule + +% turn off footnote rule, line at bottom of page above footnotes + \let\footnoterule\relax + +% can turn it back on by uncommenting +\let\footnoterule\savefootnoterule + +% Making footnote indent 1em +\long\def\@makefntext#1{% +\noindent\hspace*{1em}\@makefnmark\,#1} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 6) Title Page: + %% Journal Name, running heads; + %% Title, Authors, Affils, Corresponding Authors, Author Notes, Key Points; + %% Starting article with abstract. + +%% Set journal name: +\def\journalname#1{\def\thejournalname{#1}} +\journalname{Please set Journal Name by using {\tt\string\journalname}} + + +%% Article Title +\def\title#1{\global\c@footnote=0\relax% +{\centering \Large\bf #1 \vskip14pt} +\def\thetitle{#1}} + +\def\authors#1{{\centering \normalsize\bf #1\vskip12pt}} +\def\affil#1{$^{#1}$\ignorespaces} +\def\affiliation#1#2{\vskip-.5\parskip\relax{\centering{\footnotesize +$^{#1}$#2\relax}\vskip-\parskip}} + +\def\correspondingauthor#1#2{{\let\@thefnmark\relax\@footnotetext{\noindent\vrule +height 18pt width0pt\relax\hbox to-8pt{}{\small +Corresponding author: #1, +{\tt #2}}}}} + +%% Used to send footnote to bottom of page when entered in \authors{} field. +\def\thanks#1{{\renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\noindent\hskip-9pt\hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}\footnote{#1}\ + }} + +\def\keypoints{\vskip24pt\vskip1sp\subsection*{Key Points:} +\begin{itemize}} +\def\endkeypoints{\end{itemize}} + +\def\abstract{\newpage\noindent{\bf Abstract}\vskip-\parskip +\global\c@footnote=0\relax% +\noindent\ignorespaces} +\def\endabstract{\vskip18pt} + +%% <== End Title page and Abstract + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 7) Section Commands + +% SectionCounters, Header Level Counters ===>> + + %% the argument in square brackets is for the command that will reset + %% counter to zero +\newcounter {section} +\newcounter {subsection}[section] +\newcounter {subsubsection}[subsection] +\newcounter {paragraph}[subsubsection] +\newcounter {subparagraph}[paragraph] + + + %% Header Level Counters ==>> + %% Change to any level will change the levels below + + +\renewcommand{\thesection} {\arabic{section}} +\renewcommand{\thesubsection} {\thesection.\arabic{subsection}} +\renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}} +\renewcommand{\theparagraph} {\thesubsubsection.\arabic{paragraph}} +\renewcommand{\thesubparagraph} {\theparagraph.\arabic{subparagraph}} + +\newcommand{\@chapapp}{\chaptername} + + %%% <<== End Header Level Counters + + %% Definition printed here so that you can see what the various arguments are + %% when used for \section, \subsection, etc, below + %% \newcommand{\section}{\@startsection {section}{1}{\z@}...} + + +% \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} +% optional * [ALTHEADING]{HEADING} +% Generic command to start a section. +% NAME : e.g., 'subsection' +% LEVEL : a number, denoting depth of section -- e.g., chapter=1, +% section = 2, etc. +% INDENT : Indentation of heading from left margin +% BEFORESKIP : Absolute value = skip to leave above the heading. +% If negative, then paragraph indent of text following +% heading is suppressed. +% AFTERSKIP : if positive, then skip to leave below heading, else +% negative of skip to leave to right of run-in heading. +% STYLE : commands to set style +% If '*' missing, then increments the counter. If it is present, then +% there should be no [ALTHEADING] argument. +% Uses the counter 'secnumdepth' whose value is the highest section +% level that is to be numbered. + + %% Startsection calls \@sect, the engine that formats each section + + %% the minus dimensions are used to tell LaTeX not to indent + %% the text following the section head + %% (silly, isn't it? but built into LaTeX) + %% You can add things like underline or uppercase to the last arg + %% to get those effects in a section head + +%% adds a little space after the section number, before following text. +\def\@seccntformat#1{\csname the#1\endcsname\ \ } + +\newcommand\section{\@startsection {section}{1}{\z@}% + {\ifdraft18pt plus 1pt minus + 1pt\else 12pt plus 1pt minus 1pt\fi}% + {1sp}% + {\bignormalsize\bfseries\boldmath}} + +\newcommand\subsection{\@startsection{subsection}{2}{\parindent}% + {\ifdraft 12pt\else 8pt\fi}% + {1sp}% + {\normalfont\bf\boldmath}} + +\newcommand\subsubsection{\@startsection{subsubsection}{3}{\parindent}% + {\ifdraft 12pt\else 8pt\fi}% + {1sp}% + {\normalfont\itshape\bfseries}} + +\newcommand\paragraph{\@startsection{paragraph}{4}{\parindent}% + {3pt plus 1pt minus 1pt}% + {-1em}% + {\normalfont\normalsize\itshape}} + +\newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% + {3pt plus 1pt minus 1pt}% + {-1em}% + {\normalfont\normalsize\itshape}} + + %%% <<=== end section commands + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% 8) Figure and Table Captions ==>>> + +\long\def\@caption#1[#2]#3{% + \par + \begingroup + \@parboxrestore + \normalsize +\linenumbers + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \endgroup} +\def\@float#1{% + \@ifnextchar[% + {\@xfloat{#1}}% + {\edef\reserved@a{\noexpand\@xfloat{#1}[\csname fps@#1\endcsname]}% + \reserved@a}} +\def\@dblfloat{% + \if@twocolumn\let\reserved@a\@dbflt\else\let\reserved@a\@float\fi + \reserved@a} + + %% Name of Figure or Table is set with \figurename or \tablename above + %% \@float is what puts the text at the top or bottom of the page + %% \@dblfloat is for floats in two column text + +\newcounter{figure} +\renewcommand{\thefigure}{\arabic{figure}} + +\def\fps@figure{tbp} % position figure at top, bottom, or on its own page +\def\ftype@figure{1} % used for placing float in page +\def\ext@figure{lof} % send info to .lof file +\def\fnum@figure{\figurename~~\thefigure} % \figurename, defined above, + %% and the current state of figure counter + + %% \begin{figure} calls up float and gives it the {figure} argument, + %% which is then used to call up the definitions above, by using + %% \csname fps@\captype\endcsname, for instance, to get \fps@figure; + %% adjusting the macro to do different things depending on whether + %% figure, table, environment, or other term is used. + +\newenvironment{figure} + {\@float{figure}} + {\end@float} + + %% figure in two column text +\newenvironment{figure*} + {\@dblfloat{figure}} + {\end@dblfloat} + + %% Similar as the sequence of definitions above used for figure +\newcounter{table} +\renewcommand{\thetable}{\@arabic\c@table} +\def\fps@table{tbp} +\def\ftype@table{2} +\def\ext@table{lot} +\def\fnum@table{\tablename~\thetable} +\newenvironment{table} + {\@float{table}} + {\end@float} +\newenvironment{table*} + {\@dblfloat{table}} + {\end@dblfloat} + + %%%%%%%%%%%%%%%% + %% Setting space between caption in table or figure and the + %% table or figure +\newlength\abovecaptionskip +\newlength\belowcaptionskip +\setlength\abovecaptionskip{10\p@} +\setlength\belowcaptionskip{10\p@} + + %% to test in caption to see whether it is a figure or table +\def\xfigure{figure} + + %% Variation on LaTeX code + %% Skips below caption + %% an extra 3pt if it is a table to give extra space between caption + %% and table, since caption for table goes above table. + + %% \sbox\@tempboxa sets a temporary box so that we can measure + %% the width of the caption; if width is greater than .9\hsize + %% then make it format in a paragraph, otherwise center it. + + %% Test to see if it a figure or table: \ifx\@captype\xfigure + %% If figure, \vskip\belowcaptionskip + +\long\def\@makecaption#1#2{% +{\small +\ifx\@captype\xfigure +\vskip\abovecaptionskip\fi +{\ifturnofflinenums\else\ifnumlines\internallinenumbers\fi\fi + \sbox\@tempboxa{\bf#1.\quad \rm #2}% + \ifdim \wd\@tempboxa >.9\hsize +\bf #1.\quad\rm\relax #2\par + \else +{\centering + \bf #1.\rm\quad #2 +\vskip1sp} + \fi} +%% +\ifx\@captype\xfigure\else + \vskip\belowcaptionskip\fi +}} + + + %% Code to get text in tables to extend all the way to left and right + %% of table. The LaTeX table macros are made to allow space to the + %% left and the right of tables to accomodate vertical ruled lines. But + %% most publishers don't want vertical ruled lines. If the authors + %% don't use the ruled lines there would be extra white space without + %% the changes below. This code is very complicated, but you can see + %% the changed part. + +\def\xtable{table} +\def\@array[#1]#2{\setbox\@arstrutbox=\hbox{\vrule + height\arraystretch \ht\strutbox + depth\arraystretch \dp\strutbox + width\z@}\@mkpream{#2}\edef\@preamble{\halign \noexpand\@halignto +\bgroup% +\tabskip\z@\@arstrut\@preamble +\ifx\@captype\xtable\hskip-\tabcolsep\fi %% <==== Changed +\tabskip\z@ \cr}% +\let\@startpbox\@@startpbox \let\@endpbox\@@endpbox% + \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi% + \bgroup\let\par\relax% + \let\@sharp##\let\protect\relax \lineskip\z@\baselineskip\z@\@preamble} + + + %% Variation on code found in Latex.tex +\def\new@tabacol{\edef\@preamble{\@preamble\hskip0pt}} + +\def\@tabclassz{\ifcase \@lastchclass\@acolampacol% +\or \@ampacol \or + \or \or \@addamp \or \@acolampacol\or \@firstampfalse +\ifx\@captype\xtable \new@tabacol\else\@tabacol \fi% +\fi% +\edef\@preamble{\@preamble% + \ifcase \@chnum% + \hfil\ignorespaces\@sharp\unskip\hfil% + \or \ignorespaces\@sharp\unskip\hfil% + \or \hfil\hskip\z@ \ignorespaces\@sharp\unskip\fi}} + + %% This puts extra space between horizontal lines in tables. + %% If you want to use vertical lines in tables, you should use + %% \savehline rather than \hline, otherwise the vertical and + %% horizontal lines will not abutt. + + %% \noalign is a command that allows the uses to put something + %% between lines in a table. +\let\savehline\hline +\def\hline{\noalign{\vskip3pt}\savehline\noalign{\vskip3pt}} + + %% Simple macro for table notes, that makes sure that there is + %% a little space between the table and the notes, and that they + %% print in footnotesize. +\def\tablenotes{\vskip2pt\footnotesize} +\let\endtablenotes\relax + + %%% <<=== end Figure and Table Captions + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% 9) Listing, ==>> +\def\@listI{\leftmargin\leftmargini + \parsep 0\p@ %\@plus2\p@ \@minus0\p@ + \topsep 4\p@ %\@plus2\p@ \@minus0\p@ + \itemsep1\p@ %\@plus2\p@ \@minus0\p@ +} +\let\@listi\@listI +\@listi + +\def\@listii {\leftmargin\leftmarginii + \labelwidth\leftmarginii + \advance\labelwidth-\labelsep + \topsep 4\p@ \@plus2\p@ \@minus\p@ + \parsep 2\p@ \@plus\p@ \@minus\p@ + \itemsep \parsep} +\def\@listiii{\leftmargin\leftmarginiii + \labelwidth\leftmarginiii + \advance\labelwidth-\labelsep + \topsep 2\p@ \@plus\p@\@minus\p@ + \parsep \z@ + \partopsep \p@ \@plus\z@ \@minus\p@ + \itemsep \topsep} +\def\@listiv {\leftmargin\leftmarginiv + \labelwidth\leftmarginiv + \advance\labelwidth-\labelsep} +\def\@listv {\leftmargin\leftmarginv + \labelwidth\leftmarginv + \advance\labelwidth-\labelsep} +\def\@listvi {\leftmargin\leftmarginvi + \labelwidth\leftmarginvi + \advance\labelwidth-\labelsep} + + %% amount left edge of text is indented relative to normal text + %% i is for first level in, ii is for second level in, etc. +\setlength\leftmargini {28pt} +\setlength\leftmarginii {11pt} +\setlength\leftmarginiii {1.87em} +\setlength\leftmarginiv {1.7em} +\setlength\leftmarginv {1em} +\setlength\leftmarginvi {1em} + + + %% default indentation for first level itemized lists +\setlength\leftmargin {\leftmargini} + + %% horizontal distance between item and following text +\setlength \labelsep {6pt} + + %% how wide should item be? +\setlength \labelwidth{\leftmargini} + + %% subtract width of label separation +\addtolength\labelwidth{-\labelsep} + + %% more listing defaults +\leftmargin\leftmargini +\labelwidth\leftmargini\advance\labelwidth-\labelsep + + +\@beginparpenalty -\@lowpenalty +\@endparpenalty -\@lowpenalty +\@itempenalty -\@lowpenalty + + %% defining listing markers for enumerate +\renewcommand{\theenumi}{\arabic{enumi}} +\renewcommand{\theenumii}{\alph{enumii}} +\renewcommand{\theenumiii}{\roman{enumiii}} +\renewcommand{\theenumiv}{\Alph{enumiv}} + + %% using listing markers for enumerate +\newcommand{\labelenumi}{\theenumi.\hskip-2pt} +\newcommand{\labelenumii}{(\theenumii)} +\newcommand{\labelenumiii}{\theenumiii.} +\newcommand{\labelenumiv}{\theenumiv.} + + %% crossreferencing for listing markers +\renewcommand{\p@enumii}{\theenumi} +\renewcommand{\p@enumiii}{\theenumi(\theenumii)} +\renewcommand{\p@enumiv}{\p@enumiii\theenumiii} + + %% listing markers for itemize (no crossreferencing needed) +\newcommand{\labelitemi}{\raise.4ex\hbox{\tiny$\bullet$}} +\newcommand{\labelitemii}{\normalfont\bfseries --} +\newcommand{\labelitemiii}{$\m@th\ast$} +\newcommand{\labelitemiv}{$\m@th\cdot$} + + %% Setting up description listing environment +\newenvironment{description} + {\list{}{\labelwidth\z@ \itemindent-\leftmargin + \let\makelabel\descriptionlabel}} + {\endlist} + +\newcommand*{\descriptionlabel}[1]{\hspace\labelsep + \normalfont\bfseries #1} + +%%% <<=== end of listing commands + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% 10) ETC.: Month/year, Hyphenation Library, Quote, Quotation, Extract + +%% Month and Year + +% Nice example of \ifcase which takes a counter and activates +% the slot following the counter that matches the same number; +% \month expands to a number, so ifcase will activate the slot +% matching that number. Can use it for setting date in draft +% footnote if desired. Not activated at this time. + +\newcommand{\today}{\ifcase\month\or + January\or February\or March\or April\or May\or June\or + July\or August\or September\or October\or November\or December\fi + \space\number\day, \number\year} + +% Hyphenation Library +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Hyphenation Library, add to this +%% list if desired + +\hyphenation{ +dem-o-graph-ics +mi-cro-ec-o-nom-ic +or-gan-i-za-tion +or-gan-i-za-tions +ra-tion-ale +sys-tem-at-i-cal-ly +} + + +%%%% Quote, Quotation, Extract + %% \newenvironment produces a \begin{}..\end{} macro set. + %% \newenvironment{}{} + %% {} + + %% For long quotation which runs more than one paragraph, + %% uses list environment to indent text, supplies dummy + %% item, \item[], since one item is required for every listing + %% environment or you will get an error message. + + %% quotation indents new paragraphs, while quote does not. + +\newenvironment{quotation} + {\small +\list{}{\listparindent 1.5em% + \itemindent \listparindent + \rightmargin \leftmargin + \parsep \z@ \@plus\p@}% + \item[]} + {\endlist} +\newenvironment{quote} + {\small +\list{}{\rightmargin\leftmargin}% + \item[]} + {\endlist} + + %% If \begin{extract}...\end{extract} is used you will get the same + %% results as \begin{quotation}...\end{quotation} + +\let\extract\quotation +\let\endextract\endquotation + + %% <<== end ETC.: Month/year, Hyphenation Library, Quote, Quotation, Extract + +%%%%%%%%% +% 11) End Article: Appendix, Glossary, Acronyms, Notation, Acknowledgments + +% Appendix: +\newcounter{appendnum} + +\newif\ifappendon +\newif\ifupperappend + +\def\appendix{% +\def\@currentlabel{\Alph{section}:} %xx Doesn't do much. Missing trailing space. DC +\@addtoreset{equation}{section} +\@addtoreset{table}{section} +\@addtoreset{figure}{section} +%% +\renewcommand{\thesection}{\Alph{section}} %xx Redefined below (by orginal author, not DC). DC +\renewcommand{\theequation}{\Alph{section}.\arabic{equation}} +\renewcommand{\thefigure}{\Alph{section}.\arabic{figure}} +\renewcommand{\thetable}{\Alph{section}.\arabic{table}} +\global\appendontrue\goodbreak +\global\c@section=0 +\global\c@equation=0 +\def\thesection{\Alph{section}} %xx What puts the : in \ref. Taken out now. DC +\def\thesubsection{\Alph{section}.\@arabic{\c@subsection}} +\def\thesubsubsection{\thesubsection.\@arabic{\c@subsubsection}} +\def\thesubsubsubsection{\thesubsubsection.\@arabic{\c@subsubsection}} +} +%%%%% end appendix + +%% Glossary +\def\glossary{\bgroup +\section*{Glossary} +\description +\def\term##1{\item[##1]}} +\def\endglossary{\enddescription\vskip12pt\egroup} +%% + +%% Acronyms +\def\acronyms{\bgroup +\section*{Acronyms} +\description +\def\acro##1{\item[##1]}} +\def\endacronyms{\enddescription\vskip12pt\egroup} + +%% Notation +\def\notation{\bgroup +\section*{Notation} +\description +\def\notation##1{\item[\boldmath ##1]}} +\def\endnotation{\enddescription\vskip12pt\egroup} + +%% Acknowledgments +\def\acknowledgments{\vskip12pt\noindent{\bf +Acknowledgments\vrule depth 6pt +width0pt\relax}\\*\noindent\ignorespaces} + +%%% <<=== end Appendix, Glossary, Acronyms, Notation, Acknowledgments + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% 12) %% Bibliography, References ===>> + +%% Set bibliography style: This brings in agufull08.bst to format +%% bibliography when using BibTeX. +%\bibliographystyle{agufull08} +% +\bibliographystyle{apacite} + +%% In case you want to enter bib entries without using bibtex +\def\references{\thebibliography{}\item[]} +\let\endreferences\endthebibliography + +\def\@cite#1#2{{#1\if@tempswa , #2\fi}} + +\def\@citex[#1]#2{% + \let\@citea\@empty + \@cite{\@for\@citeb:=#2\do + {\@citea\def\@citea{,\penalty\@m\ }% + \edef\@citeb{\expandafter\@firstofone\@citeb}% + \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi + \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}% + \G@refundefinedtrue + \@latex@warning + {Citation `\@citeb' on page \thepage \space undefined}}% + %% + %% This is changed from the default so that lengthy citations can + %% be broken across lines + {%\hbox{ +\csname b@\@citeb\endcsname%} +}}}{#1}} + +\newdimen\bibindent +\setlength\bibindent{1.5em} + +\def\refname{References} +\newenvironment{thebibliography}[1] + {\section*{\refname + \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}% + \list{\@biblabel{\@arabic\c@enumiv}}% + {\settowidth\labelwidth{\@biblabel{#1}}% + \leftmargin\labelwidth + \advance\leftmargin\labelsep + \@openbib@code + \usecounter{enumiv}% + \let\p@enumiv\@empty + \renewcommand\theenumiv{\@arabic\c@enumiv}}% + \sloppy + \clubpenalty4000 + \@clubpenalty \clubpenalty + \widowpenalty4000% + \sfcode`\.\@m} + {\def\@noitemerr + {\@latex@warning{Empty `thebibliography' environment}}% + \endlist} + +\def\newblock{\hskip .11em\@plus.33em\@minus.07em} + + + + +% Formats bibliography, this .sty file needs to be entered here +%\RequirePackage{natbib} + % +% When using NatBib, this sets brackets for citations: +%\renewcommand\NAT@open{(} \renewcommand\NAT@close{)} %xx Parens by default, but not using anyways. DC + +\RequirePackage[natbibapa]{apacite} +%\let\cite\shortcite %xx So get et al. with three authors the first time. +%\let\citep\cite %xx A natbib command. +%\let\citet\citeA %xx Ditto. +%\requirepackage{URL} + +%% end Bibliography, and References + +%%%%%%%%%%%%%%%%%%%%%%%%%%xx Removed. DC + +%%% Track Changes +%%% Amy Hendrickson, Feb 2016 +% +%\providecolor{trackcolor}{rgb}{1,0,0} +%\providecolor{explain}{rgb}{.5,0,.5} +% +%\newcount\refchangenumber +% +%\def\added{\@ifnextchar[{\xadded}{\yadded}} +% +%\long\def\xadded[#1]#2{% +%\ifdraft{\global\advance\refchangenumber by 1\relax% +%\ifnumlines +%\xdef\doit{\noexpand\linelabel{\the\refchangenumber}}\doit\else% +%\xdef\doit{\noexpand\label{\the\refchangenumber}{}{}{}}\doit\fi% +%\color{trackcolor}(Added: #2)}%% +%\expandafter\gdef\csname +%changenum\the\refchangenumber\endcsname{Added: [#1] +%\textcolor{trackcolor}{#2}, }\else#2\fi} +% +%\long\def\yadded#1{% +%\ifdraft{\global\advance\refchangenumber by 1\relax% +%\ifnumlines +%\xdef\doit{\noexpand\linelabel{\the\refchangenumber}}\doit\else% +%\xdef\doit{\noexpand\label{\the\refchangenumber}{}{}{}}\doit\fi% +%\color{trackcolor}(Added: #1)}%% +%\expandafter\gdef\csname changenum\the\refchangenumber\endcsname{Added: +%\textcolor{trackcolor}{#1}, }\else#1\fi} +% +%\def\deleted{\@ifnextchar[{\xdeleted}{\ydeleted}} +% +%\long\def\xdeleted[#1]#2{% +%\ifdraft{\global\advance\refchangenumber by 1\relax% +%\ifnumlines +%\xdef\doit{\noexpand\linelabel{\the\refchangenumber}}\doit\else% +%\xdef\doit{\noexpand\label{\the\refchangenumber}{}{}{}}\doit\fi% +%\color{trackcolor}(Deleted: \sout{#2})}%% +%\expandafter\gdef\csname +%changenum\the\refchangenumber\endcsname{Deleted: [#1] +%\textcolor{trackcolor}{#2}, }\else#2\fi} +% +%\long\def\ydeleted#1{ +%\ifdraft +%\global\advance\refchangenumber by 1 +%\ifnumlines\xdef\doit{\noexpand\linelabel{\the\refchangenumber}}\doit\else% +%\xdef\doit{\noexpand\label{\the\refchangenumber}}\doit\fi% +%{\color{trackcolor}(Deleted: \sout{#1})}% +%\expandafter\def\csname changenum\the\refchangenumber\endcsname{Deleted: +%{\color{trackcolor}\sout{#1}}, }\fi} +% +%\def\replaced{\@ifnextchar[{\xreplaced}{\yreplaced}} +% +%\long\def\xreplaced[#1]#2#3{% +%\ifdraft +%\global\advance\refchangenumber by 1 +%\ifnumlines\xdef\doit{\noexpand\linelabel{\the\refchangenumber}}\doit\else% +%\xdef\doit{\noexpand\label{\the\refchangenumber}}\doit\fi% +%{\color{trackcolor}(Replaced: \sout{#2}} +%{\color{black}replaced with:} {\color{trackcolor} #3)}% +%\expandafter\gdef\csname +%changenum\the\refchangenumber\endcsname{Replaced: [#1] +%{\color{trackcolor}\sout{#2}} {\color{black} replaced with:} +%{\color{trackcolor}#3}, }\else#3\fi} +% +%\long\def\yreplaced#1#2{% +%\ifdraft +%\global\advance\refchangenumber by 1 +%\ifnumlines\xdef\doit{\noexpand\linelabel{\the\refchangenumber}}\doit\else% +%\xdef\doit{\noexpand\label{\the\refchangenumber}}\doit\fi% +%{\color{trackcolor}(Replaced: \sout{#1}} +%{\color{black}replaced with:} {\color{trackcolor} #2)}% +%\expandafter\gdef\csname changenum\the\refchangenumber\endcsname{Replaced: +%{\color{trackcolor}\sout{#1}} {\color{black} replaced with:} +%{\color{trackcolor}#2}, }\else#2\fi} +% +%\global\@mparswitchfalse +%\def\explain{\@ifnextchar[{\xexplain}{\yexplain}} +% +%%% +%\def\xexplain[#1]#2{\ifdraft\marginpar{\noindent{\color{red}\llap{\boldmath$\leftarrow$}\draftfalse\normalsize +%\baselineskip=11pt\relax[#1] #2\vskip1sp}}\fi} +% +%\def\yexplain#1{\ifdraft\marginpar{\noindent{\color{red}\llap{\boldmath$\leftarrow$}\draftfalse\normalsize +%\baselineskip=11pt\relax#1\vskip1sp}}\fi} +% +% +%\newcount\listchangenum +% +%\def\listofchanges{ +%\clearpage +%\ifdraft +%\ifnum\refchangenumber>0 +%\ifnumlines\nolinenumbers\fi +%\vskip36pt +%\vtop{\hrule +%\noindent{\vrule height 9pt width0pt depth 6pt\large\bf List of Changes} +%\hrule +%\vskip18pt} +%\nobreak +%{\parskip=4pt \parindent-18pt \leftskip=18pt +%\loop +%\vskip-1pt\relax +%\global\advance\listchangenum by 1\relax +%\expandafter\ifx\csname changenum\the\listchangenum\endcsname\relax +%\else +%\csname changenum\the\listchangenum\endcsname\ on page +%\pageref{\the\listchangenum}% +%\ifnumlines +%\setbox0=\hbox{\lineref{\the\listchangenum}}% +%\ifdim\wd0>20pt% +%\else% +%, line\ +%\lineref{\the\listchangenum}% +%\fi\fi. +%\repeat} +%\fi\fi +%\thispagestyle{empty} +%} +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 14) Supporting Information +\def\supportinginfo#1{\newpage +{\large\bf\noindent Supporting Information for\vskip-6pt\noindent``#1''} +\vskip12pt} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Start page numbering, formatting + +\pagenumbering{arabic} +\widowpenalty=10000 +\clubpenalty=10000 +\ifdraft +\RaggedRight +\fi +\endinput + + + + + + + + + + + + + + diff --git a/inst/rmarkdown/templates/agu_article/skeleton/agutest.bib b/inst/rmarkdown/templates/agu_article/skeleton/agutest.bib new file mode 100644 index 000000000..783295c37 --- /dev/null +++ b/inst/rmarkdown/templates/agu_article/skeleton/agutest.bib @@ -0,0 +1,44 @@ +@article{Nuncio2011, +abstract = {Topographic meandering of Antarctic Circumpolar Current (ACC) is found to be an impediment in the propagation of Antarctic Circumpolar Wave (ACW) in the Indian Ocean sector of Antarctica. Reasons for this are attributed to the southward advection of the ACW anomalies associated with the topographic meandering of the ACC. The southward meandering of ACC facilitates warming up of the region east of 20°E by about 1°C during winter, thereby reducing the sea ice; these processes interfere with the eastward propagating positive sea‐ice anomalies, and reduce its strength. Warming of ocean induced by topographic meandering leads to upward vertical velocities between 40°–60°E, where the ocean surface velocities are weak and southward, and the vertical/meridional advection of temperature dominates the zonal advection in the atmosphere. This results in the decoupling of the ACW in the region east of 40°E. In regions out side the Indian Ocean sector, vertical advection is minimum and zonal velocity of ACC becomes positive, which facilitates the ACW propagation in the Central Pacific, Ross and Weddell Seas.}, +author = {Nuncio, M. and Luis, Alvarinho J. and Yuan, X.}, +doi = {10.1029/2011GL046898}, +file = {:home/elio/Documents/Papers/Nuncio, Luis, Yuan{\_}2011{\_}Topographic meandering of Antarctic Circumpolar Current and Antarctic Circumpolar Wave in the ice-ocean-atmosphe.pdf:pdf}, +issn = {00948276}, +journal = {Geophysical Research Letters}, +keywords = {http://dx.doi.org/10.1029/2011GL046898, doi:10.102}, +number = {13}, +pages = {1--5}, +title = {{Topographic meandering of Antarctic Circumpolar Current and Antarctic Circumpolar Wave in the ice-ocean-atmosphere system}}, +volume = {38}, +year = {2011} +} +@article{Levitus2012, +author = {Levitus, Sydney and Yarosh, Evgeney S. and Zweng, Melissa Marie and Antonov, John I. and Boyer, Tim P. and Baranova, Olga K. and Garcia, Hernan Eduardo and Locarnini, Ricardo Alejandro and Mishonov, Alexey V. and Reagan, James and Seidov, Dan}, +doi = {10.1029/2012GL051106}, +file = {:home/elio/Documents/Papers/Levitus et al.{\_}2012{\_}World ocean heat content and thermosteric sea level change (0-2000), 1955-2010.pdf:pdf}, +issn = {0094-8276}, +journal = {Geophysical Research Letters}, +keywords = {Climate Change,climate variability,ocean heat content}, +mendeley-tags = {Climate Change}, +pages = {1--5}, +title = {{World ocean heat content and thermosteric sea level change (0-2000), 1955-2010}}, +url = {http://www.agu.org/pubs/crossref/pip/2012GL051106.shtml}, +volume = {39}, +year = {2012} +} +@article{Raphael2004, +abstract = {In this study 500 hPa geopotential heights from the NCAR-NCEP Reanalysis are used to calculate an index describing the spatial and temporal characteristics of zonal wave three (ZW3) in the high latitude Southern Hemisphere atmosphere. The index spans the period 1958 – 2001. Wavelet analysis of the index shows the strong interannual variation which is characteristic of ZW3 and also reveals significant, high amplitude decadal-scale variation. This interannual variation takes the form of marked fluctuation in sign and magnitude of the index. It appears to occur when there are rapid changes from strongly meridional to strongly zonal flow or vice versa. Initial indications are that some of this variability may be associated with ENSO events.}, +author = {Raphael, Marilyn N}, +doi = {10.1029/2004GL020365}, +file = {:home/elio/Documents/Papers//Raphael{\_}2004{\_}A zonal wave 3 index for the Southern Hemisphere.pdf:pdf}, +isbn = {0094-8276}, +issn = {00948276}, +journal = {Geophysical Research Letters}, +keywords = {0325),1610 Global Change: Atmosphere (0315,1620 Global Change: Climate dynamics (3309),3319 Meteorology and Atmospheric Dynamics: General,3364 Meteorology and Atmospheric Dynamics: Synopti}, +number = {23}, +pages = {1--4}, +title = {{A zonal wave 3 index for the Southern Hemisphere}}, +url = {http://doi.wiley.com/10.1029/2004GL020365}, +volume = {31}, +year = {2004} +} diff --git a/inst/rmarkdown/templates/agu_article/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/agu_article/skeleton/skeleton.Rmd new file mode 100755 index 000000000..527741309 --- /dev/null +++ b/inst/rmarkdown/templates/agu_article/skeleton/skeleton.Rmd @@ -0,0 +1,229 @@ +--- +# 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 +journal: "JGR: Atmospheres" +# Use draft to submit a paper +classoption: "draft,linenumbers" +# 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 +title: "The title of my paper" +# First name or initial followed by last name +# 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. +# Additional author notes should be indicated with +authors: + - name: Andrew N. Other + affil: 1 + thanks: Andrew's thanks + - name: Fred T. Secondauthor + affil: 1 + thanks: "Current address: Some other place, Germany" + - name: I. Ken Groupleader + affil: "1, 2" +affiliations: + - number: 1 + name: "The first affiliation" + - number: 2 + name: "The second affiliation" +# 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. +corresponding_author: + - name: I. Ken Groupleader + email: groupleader@fancy.university.com +keypoints: + - "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" +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. +output: + rticles::agu_article +bibliography: agutest.bib +header-includes: + - \usepackage{soulutf8} # For UTF8 chars in TrackChanges +# AGU recommends using the trackchanges LaTeX package in the edition process +# which is available from this link: +# https://publications.agu.org/files/2019/02/January-14-2019-latex-templates.zip +--- + +```{r echo=FALSE} +# Some recommended settings. +knitr::opts_chunk$set( + echo = FALSE, + fig.pos = 'h', + out.extra = "", # To force the use of figure enviroment + fig.cap = "Please caption every figure" +) + +``` + +Suggested section heads + +# Introduction + +The main text should start with an introduction. Except for short manuscripts (such as comments and replies), the text should be divided into sections, each with its own heading. + +Headings should be sentence fragments and do not begin with a lowercase letter or number. Capitalize the first letter of each word (except for prepositions, conjunctions, and articles that are three or fewer letters). + +# Materials and Methods + +Here is text on Materials and Methods. + +Do not use bulleted lists; enumerated lists are okay. Use #. for list for a cleaner LaTeX output. + +#. First element + +#. Second element + +## A descriptive heading about methods + +Please use ONLY \\citet and \\citep for reference citations. +DO NOT use other cite commands (e.g., \\cite, \\citeyear, \\nocite, \\citealp, etc.). +Example \\citet and \\citep: + ...as shown by \citet{Levitus2012}, \citet{Nuncio2011} and \citet{Raphael2004} + ...as shown by \citep{Levitus2012}, \citep{Nuncio2011}, \citep{Raphael2004}. + ...has been shown \citep[e.g.,][]{Levitus2012, Nuncio2011, Raphael2004}. + +# Data + +Or section title might be a descriptive heading about data + +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/ + +# Results + +Or section title might be a descriptive heading about the results + +Enter Figures and Tables near as possible to where they are first mentioned: +DO NOT USE \\psfrag or \\subfigure commands. +DO NOT USE \\newcommand, \\renewcommand, or \\def, etc. + +```{r} +plot(pressure) +``` + +Example table + +\begin{table} + \caption{Time of the Transition Between Phase 1 and Phase 2$^{a}$} + \centering + \begin{tabular}{l c} + \hline + Run & Time (min) \\ + \hline + $l1$ & 260 \\ + $l2$ & 300 \\ + $l3$ & 340 \\ + $h1$ & 270 \\ + $h2$ & 250 \\ + $h3$ & 380 \\ + $r1$ & 370 \\ + $r2$ & 390 \\ + \hline + \multicolumn{2}{l}{$^{a}$Footnote text here.} + \end{tabular} + \end{table} + +AGU prefers the use of {sidewaystable} over {landscapetable} as it causes fewer problems. + +```{r, fig.env = "sidewaysfigure"} +plot(pressure) +``` + +\begin{sidewaystable} +\caption{Caption here} +\label{tab:signif_gap_clos} +\begin{tabular}{ccc} +one&two&three\\ +four&five&six +\end{tabular} +\end{sidewaystable} + +If using numbered lines, please surround equations with \\begin{linenomath\*}... \\end{linenomath\*} + +\begin{linenomath*} +\begin{equation} +y|{f} \sim g(m, \sigma) +\end{equation} +\end{linenomath*} + +# Conclusions + +\appendix +\section{Here is a sample appendix} + +Optional Appendix goes here + +Optional Glossary, Notation or Acronym section goes here: + +Glossary is only allowed in Reviews of Geophysics + +\begin{glossary} +\term{Term} + Term Definition here +\term{Term} + Term Definition here +\term{Term} + Term Definition here +\end{glossary} + + +\begin{acronyms} +\acro{Acronym} + Definition here +\acro{EMOS} + Ensemble model output statistics +\acro{ECMWF} + Centre for Medium-Range Weather Forecasts +\end{acronyms} + +\begin{notation} +\notation{$a+b$} Notation Definition here +\notation{$e=mc^2$} +Equation in German-born physicist Albert Einstein's theory of special +relativity that showed that the increased relativistic mass ($m$) of a +body comes from the energy of motion of the body—that is, its kinetic +energy ($E$)—divided by the speed of light squared ($c^2$). +\end{notation} + + +\acknowledgments +The acknowledgments must list: +A statement that indicates to the reader where the data +supporting the conclusions can be obtained (for example, in the +references, tables, supporting information, and other databases). + +All funding sources related to this work from all authors + +Any real or perceived financial conflicts of interests for any author + +Other affiliations for any author that may be perceived as having a conflict of +interest with respect to the results of this paper. + +It is also the appropriate place to thank colleagues and other contributors. + +AGU does not normally allow dedications. diff --git a/inst/rmarkdown/templates/agu_article/skeleton/trackchanges.sty b/inst/rmarkdown/templates/agu_article/skeleton/trackchanges.sty new file mode 100644 index 000000000..3eb0f566f --- /dev/null +++ b/inst/rmarkdown/templates/agu_article/skeleton/trackchanges.sty @@ -0,0 +1,922 @@ +%% +%% This file is part of TrackChanges +%% Copyright 2006-2009 +%% Novimir Antoniuk Pablant +%% Felix Salfner +%% +%% http://trackchanges.sourceforge.net/ +%% +%% Portions of this code adapted from the 'soul' package. +%% Copyright (C) 1998-2003 Melchior FRANZ +%% +%% TrackChanges is free software: you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation, either version 2 of the License, or +%% (at your option) any later version. +%% +%% TrackChanges is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with TrackChanges. If not, see . +%% +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% trackchanges.sty +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% A graphical interface has been written to allow the changes made +%% using this style file to be interactively accepted, rejected +%% or changed. +%% trackchanges.py +%% +%% To find the latest versions this latex style file and the +%% associated files file go to: +%% http://trackchanges.sourceforge.net/ +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Usage: +%% +%% Help files are included as part of this package: +%% ./documentation/web/html_css/help.html +%% +%% TrackChanges adds the following 5 commands to allow for collaborative +%% editing of LaTeX documents. +%% +%% \add[editor]{text to add} +%% \remove[editor]{text to remove} +%% \change[editor]{text to remove}{text to add} +%% \annote[editor]{text to annotate}{note} +%% \note[editor]{note} +%% +%% In all cases 'editor' is optional. +%% +%% In order to have comments color coded by editor, the editors must +%% be added in the preamble. +%% +%% \addeditor{editor} +%% +%% +%% Options +%% +%% There are 5 display options. These are specified with the +%% \usepackage[options]{trackchanges) +%% +%% finalold +%% Ignore all of the edits. +%% The document will look as if the edits had not been added. +%% finalnew +%% Accept all of the edits. +%% Notes will not be shown in the final output. +%% footnotes +%% Added text will be shown inline. Removed text and notes +%% will be shown as footnotes. +%% This is the default option. +%% margins +%% Added text will be shown inline. Removed text and notes +%% will be shown in the margin. +%% Margin notes will be aligned with the edits when possible. +%% inline +%% All edits will be shown inline. +%% +%% The following two options are to be used with the 'margins' +%% display style. They are used to make more space for the margin +%% notes. By default the margins are left as in the original +%% document. +%% +%% movemargins +%% Move the text over to the left hand side. +%% The textwidth will stay the same. +%% adjustmargins +%% Reduce the textwidth and move the text over to the left +%% hand side.This option will produced the most space for +%% the margin notes. +%% +%% +%% Advanced Usage +%% +%% Certain types of commands cannot be used inside of the TrackChanges +%% edit commands without special handling. For more details see +%% the limitations section. +%% +%% This option can be used to deal with incompatible commands. +%% +%% ignoremode +%% +%% Additional commands can be added to the ignore list with the +%% following command. +%% +%% \tcignore{}{}{} +%% +%% The last argument specifies which, if any, arguments to pass +%% as plain text when the command is ignored. If the last +%% argument is zero, then all of the arguments will be ignored. +%% If \color and \textcolor were not already on the ignore +%% list then the following commands could be used to add them: +%% +%% \tcignore{\textcolor}{2}{2} +%% \tcignore{\color}{1}{0} +%% +%% +%% TrackChanges also requires special handling for font changing +%% commands. These type of commands may have to be registered +%% with track changes to be dealt with properly. To register a +%% new command use the following command. +%% +%% \tcregister{}{} +%% +%% All of the standard font switching command are registered by +%% default. If \bf and \emph were not already registered then +%% the following commands could be used to add them: +%% +%% \tcregister{\bf}{0} +%% \tcregister{\emph}{1} +%% +%% While register commands is primarily for font changing it may +%% work for other types of commands that are causing problems. +%% +%% +%% +%% Limitations +%% +%% - If another package is used that adjusts the margins, it +%% can take precedence over the TrackChanges handling. +%% To make sure TrackChanges has the last word, load it +%% after all other margin related packages. +%% +%% - Incompatable with the package 'ulem' +%% Use the package 'soul' instead for underlining/strikeout. +%% +%% - TrackChanges cannot handle certain kinds of commands inside +%% the edit commands. In particular \color, \textcolor and +%% any commands from the underlining package 'soul' will not work. +%% There are two ways to get around these issues. +%% 1. The 'ignoremode' option can be used. +%% This will tell TrackChanges to ignore certain commands +%% (Including the ones mentioned above). +%% Additional commands can be added to the ignore list with +%% the \tcignore command. +%% 2. Sometimes the problematic commands can be preceded by +%% \protect. This however can have strange behavior. +%% +%% - TrackChanges requires special handling for certain kinds of +%% commands inside of edit commands. These problematic commands +%% are generally font switching commands. All of the common +%% font switching commands (such as \emph, \textbf, etc.) +%% are already handled. If you run into an issue you can try +%% using \tcregister to register the problematic command. +%% +%% - No easy way to tell TrackChanges not to split footnotes +%% across multiple pages. +%% +%% - Some other packages that take over footnote handling may be +%% incompatible with TrackChanges. Using a footnote package +%% such as footmisc may fix these problems. +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% trackchanges version 0.6, 2007-06-13 +%% written by Felix Salfner +%% +%% trackchanges version 0.7, 2009-03-09 +%% rewritten by Novimir Pablant +%% +%% version 0.7.0, 2009-04-22 - Novimir Pablant +%% Overhauled how the editors are set up. Now each editor can be +%% added simply by using the /addeditor{name} command. +%% Color system completely overhauled, now uses the 'soul' package. +%% Added margin commands 'movemargins' and 'adjustmargins'. +%% Added an option ignoremode and a reimplementation of portions +%% of 'soul' to allow commands to be ignored inside edits. +%% Commands \tcignore and \tcregister were added. +%% Added depreciation warnings for TrackChanges v0.6 commands. +%% Numerous other internal changes. +%% +%% +%% --------------------------------------------------------------------- +%% To do: +%% - Add ability to set custom colors. +%% +%% - Create a better way of adding editors that does not have a +%% five editor limit. +%% +%% - Check if the package 'ulem' is loaded, and issue an error. +%% Right now I am checking if the \ulem command exists. +%% and issuing a warning. +%% +%% - Better error handling, error messages. +%% +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesPackage{trackchanges} + [2009/04/22 v0.7.0 TrackChanges file ] + +% Setup the required packages. +\RequirePackage{color} +\RequirePackage{ifthen} +\RequirePackage{calc} +\RequirePackage{soul} +\RequirePackage{morefloats} + +% I ran into some conflicts with other packages that deal +% with footnotes. Adding footmisc solved those problems for me. +%\RequirePackage{footmisc} +%\RequirePackage{manyfoot} + +%% +%% -------------- Setup the options +\newif\if@trackchanges +\@trackchangestrue +\newif\if@trackinmargins +\@trackinmarginsfalse +\newif\if@trackinline +\@trackinlinefalse +\newif\if@keepnew +\@keepnewfalse +\newif\if@movemargins +\@movemarginsfalse +\newif\if@adjustmargins +\@adjustmarginsfalse +\newif\if@TCignoremode +\@TCignoremodefalse + +\DeclareOption{finalold}{\@trackchangesfalse\@keepnewfalse} +\DeclareOption{finalnew}{\@trackchangesfalse\@keepnewtrue} +\DeclareOption{margins}{\@trackchangestrue\@trackinmarginstrue\@trackinlinefalse} +\DeclareOption{inline}{\@trackchangestrue\@trackinlinetrue\@trackinmarginsfalse} +\DeclareOption{footnotes}{\@trackchangestrue\@trackinmarginsfalse\@trackinlinefalse} + +\DeclareOption{movemargins}{\@movemarginstrue\@adjustmarginsfalse} +\DeclareOption{adjustmargins}{\@adjustmarginstrue\@movemarginstrue} + +\DeclareOption{ignoremode}{\@TCignoremodetrue} +\DeclareOption{ignoremodeoff}{\@TCignoremodefalse} + +%% This option exists for backwards compatibility with v0.6. +%% A depreciated warning will be displayed. +\DeclareOption{final}{\@trackchangesfalse\@keepnewfalse + \PackageWarningNoLine{trackchanges}{% + Option 'final' is depreciated.\MessageBreak% + Use 'finalold' instead% + }% +} + +\ProcessOptions + + +%% +%% -------------- Inhibit footnotes getting split across pages +%% This will inhibit splitting completely. +%% LaTeX will complain about `Underfull \vbox' unless +%% \raggedbottom is also used. +% +%\interfootnotelinepenalty=10000 +% +%% Default value is 100. + + +%% +%% -------------- Set options for the soul package +\setstcolor{red} +\setuloverlap{0pt} + +%% +%% -------------- Make an alias to the 'soulregister' command. +\let\tcregister\soulregister + +%% -------------- Setup new macros for the soul package. +%% Here we setup two new commands using soul package macros. +%% These will allow strikeout, and underline with colored +%% text. These are important as they ensure that color is +%% maintained even in situations such as a footnote getting +%% split across pages. + +%% This is where the color is actually added. +\def\SOUL@coloreverysyllable{% + \SOUL@textcolor{\the\SOUL@syllable% + \SOUL@setkern\SOUL@charkern% + }% +} + +%% This is where the color is actually added. +\def\SOUL@ulcoloreverysyllable{% + \SOUL@textcolor{\SOUL@uleverysyllable}% +} + +%% Here we define a new command with the text color. +\def\SOUL@settextcolor#1{% + \def\SOUL@textcolor{\textcolor{#1}}% +} + +%% This is the setup command for colored text. +\def\SOUL@colorsetup#1{% + \SOUL@settextcolor{#1}% + \SOUL@setup% + \let\SOUL@everysyllable\SOUL@coloreverysyllable% +} + +%% This is the setup command for strikeout with colored text. +\def\SOUL@stcolorsetup#1{% + \SOUL@settextcolor{#1}% + \SOUL@stsetup% + \let\SOUL@everysyllable\SOUL@ulcoloreverysyllable% +} + +%% This is the setup command for underline with colored text. +\def\SOUL@ulcolorsetup#1{% + \SOUL@settextcolor{#1}% + \SOUL@ulsetup% + \let\SOUL@everysyllable\SOUL@ulcoloreverysyllable% +} + +%% Here I define the new callables. + +%% Color with strikeout +\DeclareRobustCommand*{\stcolor}[1]{% + \SOUL@stcolorsetup{#1}% + \SOUL@% +} + +%% Color with underline +\DeclareRobustCommand*{\ulcolor}[1]{% + \SOUL@ulcolorsetup{#1}% + \SOUL@% +} + +%% Colored text +\DeclareRobustCommand*{\soulcolor}[1]{% + \SOUL@colorsetup{#1}% + \SOUL@% +} + +%% +%% -------------- Setup counters +\newcounter{userid} +\setcounter{userid}{-1} +\newcounter{changenumber}[page] +\setcounter{changenumber}{0} +\newcounter{storefootnote} +\newcounter{numeditors} +\setcounter{numeditors}{0} +\newcounter{maxeditors} +\setcounter{maxeditors}{5} + + +%% +%% ----------- Create commands for five users +\newcommand{\TC@editorOne}{n/n} +\newcommand{\TC@editorTwo}{n/n} +\newcommand{\TC@editorThree}{n/n} +\newcommand{\TC@editorFour}{n/n} +\newcommand{\TC@editorFive}{n/n} + + +%% +%% ----------- create commands to add an editor. +\newcommand{\addeditor}[1]{ + \matchuser{#1} + \ifthenelse{\value{userid} = -1} + {\addNewEditor{#1}}{} +} +\newcommand{\addNewEditor}[1]{ + \stepcounter{numeditors} + \setcounter{userid}{\value{numeditors}} + % Check the number of authors. + \ifthenelse{\value{numeditors} > \value{maxeditors}} + {\TC@WarningTooManyEditors} + {} + \ifthenelse{\value{userid} = 1} + {\renewcommand{\TC@editorOne}{#1}} + {\ifthenelse{\value{userid} = 2} + {\renewcommand{\TC@editorTwo}{#1}} + {\ifthenelse{\value{userid} = 3} + {\renewcommand{\TC@editorThree}{#1}} + {\ifthenelse{\value{userid} = 4} + {\renewcommand{\TC@editorFour}{#1}} + {\ifthenelse{\value{userid} = 5}% + {\renewcommand{\TC@editorFive}{#1}} + {} + } + } + } + } +} + + +%% +%% --------------- define text colors for different users +\newcommand{\usercolor}{% + \ifthenelse{\value{userid} = 0}% + {\definecolor{UserColor}{rgb}{0.33,0.11,0.46}}% Purple + {\ifthenelse{\value{userid} = 1}% + {\definecolor{UserColor}{rgb}{0.1,0.1,0.8}}% Blue + {\ifthenelse{\value{userid} = 2}% + {\definecolor{UserColor}{rgb}{0.0,0.6,0.0}}% Green + {\ifthenelse{\value{userid} = 3}% + {\definecolor{UserColor}{rgb}{0.68,0.17,0.5}}% Magenta + {\ifthenelse{\value{userid} = 4}% + {\definecolor{UserColor}{rgb}{0.13,0.60,0.65}}% Cyan + {\ifthenelse{\value{userid} = 5}% + {\definecolor{UserColor}{rgb}{0.86,0.50,0.12}}% Orange + {\definecolor{UserColor}{rgb}{0.13,0.70,0.50}}% Teal + }% + }% + }% + }% + }% +} + + +%% +%% -------------- set counter userid according to editor +\newcommand{\matchuser}[1]{% + \ifthenelse{\equal{#1}{}}% + {\setcounter{userid}{0}}% + {\ifthenelse{\equal{#1}{\TC@editorOne}}% + {\setcounter{userid}{1}}% + {\ifthenelse{\equal{#1}{\TC@editorTwo}}% + {\setcounter{userid}{2}}% + {\ifthenelse{\equal{#1}{\TC@editorThree}}% + {\setcounter{userid}{3}}% + {\ifthenelse{\equal{#1}{\TC@editorFour}}% + {\setcounter{userid}{4}}% + {\ifthenelse{\equal{#1}{\TC@editorFive}}% + {\setcounter{userid}{5}}% + {\setcounter{userid}{-1}}% + }% + }% + }% + }% + }% + \usercolor% +} + +%% --------------- Setup a command for the user label. +\newcommand{\UserLabel}{} +%% +\newcommand{\GetUserLabel}[1]{% + \ifthenelse{\equal{#1}{}}% + {}% + {\userco{\textit{#1}:}}% +} + + +%% +%% --------------- define commands to color text. +%% The first command works properly across paragraphs. +%% The second works well with the footnote. +%% +%% The last two use the soul package. +\newcommand{\usertext}[1]{\color{UserColor}{#1}\normalcolor} +\newcommand{\usertextfoot}[1]{\textcolor{UserColor}{#1}} +\newcommand{\userco}[1]{\soulcolor{UserColor}{#1}} +\newcommand{\userst}[1]{\stcolor{UserColor}{#1}} +\newcommand{\userul}[1]{\ulcolor{UserColor}{#1}} + + +%% +%% --------------- define command for margin text. +\newcommand{\marginText}[2]{% + \renewcommand{\baselinestretch}{0.8}% + \marginpar{\raggedright% + \footnotesize% + \textsuperscript{\thefootnote}% + \UserLabel~#2% + }% +} + + +%% +%% --------------- This need to be called at the beginning of every command. +\newcommand{\trackingstart}[1]{% + % Set the ignores if the 'ignore' option was set. + \if@TCignoremode% + \TC@SetIgnores% + \fi% + \setcounter{storefootnote}{\value{footnote}}% + \refstepcounter{changenumber}% + \matchuser{#1}% + \ifthenelse{\value{userid} = -1}% + {\TC@WarningUnknownEditor{#1}}% + {}% + \renewcommand{\thefootnote}{\usertextfoot{c\arabic{changenumber}}}% + \setulcolor{UserColor}% + \renewcommand{\UserLabel}{\GetUserLabel{#1}}% +} + + +%% +%% --------------- This need to be called at the end of every command. +\newcommand{\trackingend}{% + \setcounter{footnote}{\value{storefootnote}}% + % Reset the ignores if the 'ignore' option was set. + \if@TCignoremode% + \TC@ResetIgnores% + \fi% +} + + +%% +%% --------------- Define the frontend command: \add +%% usage: \add[Editor]{new text} +\newcommand{\add}[2][]{% + \if@trackchanges% + \trackingstart{#1}% + \if@trackinmargins% + \textsuperscript{\thefootnote}% + \marginText{#1}{\userco{\textit{Text added.}}}% + \else% + \if@trackinline% + {\footnotesize\textsuperscript{\UserLabel}}% + \else% + \footnote{\UserLabel~\userco{\textit{Text added.}}}% + \fi% + \fi% + \usertext{\ul{#2}}% + \trackingend% + \else% + %% if trackchanges is false ... + \if@keepnew% + %% Keep the new text. + #2% + \fi% + %% if keepnew is false do nothing. + \fi% +} + + +%% +%% --------------- Define the frontend command: \remove +%% usage: \remove[Editor]{original text} +\newcommand{\remove}[2][]{% + \if@trackchanges% + \trackingstart{#1}% + \if@trackinmargins% + \textsuperscript{\thefootnote}% + \marginText{#1}{\userst{#2}}% + \else% + \if@trackinline% + {\footnotesize\textsuperscript{\UserLabel}\usertext{\st{#2}}}% + \else% + \footnote{\UserLabel~\userst{#2}}% + \fi% + \fi% + \trackingend% + \else% + %% if trackchanges is false ... + \if@keepnew% + %% Remove the old text. + \else + %% Keep the old text. + #2% + \fi% + \fi% +} + + +%% +%% --------------- Define the frontend command: \change +%% usage: \change[Editor]{original text}{new text} +\newcommand{\change}[3][]{% + \if@trackchanges% + \trackingstart{#1}% + \if@trackinmargins% + \textsuperscript{\thefootnote}% + \marginText{#1}{\userst{#2}}% + \else% + \if@trackinline% + {\footnotesize\textsuperscript{\UserLabel}\usertext{\st{#2}}}% + \else% + \footnote{\UserLabel~\userst{#2}}% + \fi% + \fi% + \usertext{\ul{#3}}% + \trackingend% + \else% + %% if trackchanges is false ... + \if@keepnew% + %% Keep the new text. + #3% + \else + %% Keep the old text. + #2% + \fi% + \fi% +} + + +%% +%% --------------- Define frontend command: \annonte +%% usage: \annote[Editor]{highlighted text}{note text} +\newcommand{\annote}[3][]{% + % Make the underlining thicker and higher. + \setul{1pt}{0.3ex}% + \if@trackchanges% + \trackingstart{#1}% + \if@trackinmargins% + \textsuperscript{\thefootnote}% + \marginText{#1}{\userco{#3}}% + \ul{#2}% + \else% + \if@trackinline% + {\footnotesize\textsuperscript{\UserLabel}}% + \ul{#2}% + {\footnotesize\usertext{~[#3]}}% + \else% + \footnote{\UserLabel~\userco{#3}}% + \ul{#2}% + \fi% + \fi% + \trackingend% + \else% + %% if trackchanges is false ... just print text. + #2% + \fi% + % Reset the underlineing + \resetul% +} + + +%% +%% --------------- Define frontend command: \note +%% usage: \note[Editor]{note text} +\newcommand{\note}[2][]{% + \if@trackchanges% + \trackingstart{#1}% + \if@trackinmargins% + \textsuperscript{\thefootnote}% + \marginText{#1}{\userco{#2}}% + \else% + \if@trackinline% + {\footnotesize\textsuperscript{\UserLabel}}% + {\footnotesize\usertext{~[#2]}}% + \else% + \footnote{\UserLabel~\userco{#2}}% + \fi% + \fi% + \trackingend% + \else% + %% if trackchanges is false ... do not print notes + \fi% +} + + +%% +%% --------------- Define frontend command: \refneeded +%% usage: \refneeded[Editor]{note text} +\newcommand{\refneeded}[2][]{% + \if@trackchanges% + \trackingstart{#1}% + \if@trackinmargins% + \textsuperscript{\thefootnote}% + \marginText{#1}{\userco{REFERENCE NEEDED #2}}% + \else% + \if@trackinline% + {\footnotesize\textsuperscript{\UserLabel}}% + \ifthenelse{\equal{#2}{}}% + {{\footnotesize\usertext{~[REFERENCE NEEDED]}}}% + {{\footnotesize\usertext{~[REFERENCE NEEDED #2]}}}% + \else% + \footnote{\UserLabel~\userco{REFERENCE NEEDED #2}}% + \fi% + \fi% + \trackingend% + \else% + %% if trackchanges is false ... do not print notes + \fi% +} + + +%% +%% -------------- Setup for margin notes. +\newcommand{\setupMarginpar}{ + \setlength{\marginparwidth}{\paperwidth} + \addtolength{\marginparwidth}{-1in} + \addtolength{\marginparwidth}{-\oddsidemargin} + \addtolength{\marginparwidth}{-\hoffset} + \addtolength{\marginparwidth}{-\textwidth} + \addtolength{\marginparwidth}{-\marginparsep} + \addtolength{\marginparwidth}{-5mm} +} +\newcommand{\setupMoveMargins}{ + \setlength{\oddsidemargin}{-1in} + \addtolength{\oddsidemargin}{0.5in} +} +\newcommand{\setupAdjustMargins}{ + \setlength{\textwidth}{0.5\paperwidth} +} +\newcommand{\setupMargins}{ + \if@movemargins + \setupMoveMargins{} + \fi + \if@adjustmargins + \setupAdjustMargins{} + \fi + % The Margins are setup using \AtBeginDocument. +} + +%% --------------- Check that conflicting packages are not loaded. +\def\TC@checkCompatibility{ + \ifx\uline\undefined + \else + \TC@WarningUlem + \fi +} + +%% ---------------- Setup for actions to be taken after the style file has been read. +\AtEndOfPackage{ + \if@trackchanges + \if@trackinmargins + \setupMargins{} + \else + \fi + \fi +} + +%% ---------------- Setup for actions to be taken after the preamble. +\AtBeginDocument{ + \TC@checkCompatibility + \TC@checkDepreciated + \if@trackchanges + \if@trackinmargins + \setupMarginpar + \else + \fi + \fi +} + +%% +%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% --------------- Setup for backwards compatibility with v0.6 +\newcommand{\initialsOne}{} +\newcommand{\initialsTwo}{} +\newcommand{\initialsThree}{} +\newcommand{\initialsFour}{} +\newcommand{\initialsFive}{} + +%% --------------- Check for depreciated options +\def\TC@checkDepreciated{ + \ifthenelse{\equal{\initialsOne}{}} + {}{\TC@WarningDepreciatedInitials + \addeditor{\initialsOne}} + \ifthenelse{\equal{\initialsTwo}{}} + {}{\TC@WarningDepreciatedInitials + \addeditor{\initialsTwo}} + \ifthenelse{\equal{\initialsThree}{}} + {}{\TC@WarningDepreciatedInitials + \addeditor{\initialsThree}} + \ifthenelse{\equal{\initialsFour}{}} + {}{\TC@WarningDepreciatedInitials + \addeditor{\initialsFour}} + \ifthenelse{\equal{\initialsFive}{}} + {}{\TC@WarningDepreciatedInitials + \addeditor{\initialsFive}} +} + +%% +%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% --------------- Setup warnings. +\newcommand{\TC@WarningTooManyEditors}{% + \PackageWarningNoLine{trackchanges}{% + A maximum of \arabic{maxeditors} editors are supported.\MessageBreak% + Changes made by additional editors will all have\MessageBreak% + the same color coding% + }% +} +\newcommand{\TC@WarningUnknownEditor}[1]{% + \PackageWarning{trackchanges}{% + Editor '#1' unknown.\MessageBreak% + }% +} +\newcommand{\TC@WarningUlem}{% + \PackageWarningNoLine{trackchanges}{% + TrackChanges is not compatable with the \MessageBreak% + 'ulem' package.\MessageBreak% + Use the 'soul' package instead% + }% +} +\newcommand{\TC@WarningDepreciatedInitials}{% + \PackageWarningNoLine{trackchanges}{% + The '\noexpand\renewcommand{\noexpand\initialsNum}{name}' commands\MessageBreak% + are depreciated.\MessageBreak% + Use '\noexpand\addeditor{name}' instead.'% + }% +} + + +%% +%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Below are a set of definitions to add an ignore list to the soul +%% package. +%% +%% This is not a default as it reimplements some of the internals of +%% the soul package. If a new version of soul were to come out +%% this stuff might break. +\if@TCignoremode + + +%% These two function allow us to turn on and off the ignore list. +%% This is so we don't mess up soul for anyone else. +\def\TC@SetIgnores{% + \let\SOUL@ignores\TC@ignores% +} +\def\TC@ResetIgnores{% + \let\SOUL@ignores\TC@emptyignores% +} + +\newtoks\TC@ignores +\newtoks\TC@emptyignores + +%% The commands are separated by \\. The first number is the +%% number of inputs for the command. The command name +%% is given next. The last number specifies which input to +%% pass through. If the last number is zero nothing will be +%% passed. + +\TC@ignores={% + \\2\textcolor{2}% + \\1\color{0}% + \\1\ul{1}% + \\1\st{1}% + \\1\hl{1}% + \\1\caps{1}% + \\1\so{1}% +} +\TC@emptyignores={} + +%% Initialize soul not to use the ignore list. +\let\SOUL@ignores\TC@emptyignores + +%% This is a way to register new ignores. +\def\tcignore#1#2#3{{% + \edef\x{\global\TC@ignores={\the\TC@ignores + \noexpand\\#2\noexpand#1#3}}\x +}} + + +%% Here I redefine \SOUL@dotoken. +%% The new version also checks for ignores. +\def\SOUL@dotoken#1{% + \def\SOUL@@{\SOUL@addtoken{#1}}% + \def\\##1##2{% + \edef\SOUL@x{\string#1}% + \edef\SOUL@n{\string##2}% + \ifx\SOUL@x\SOUL@n + \def\SOUL@@{\SOUL@docmd{##1}{#1}}% + \else + \edef\SOUL@n{\string##2\space}% + \ifx\SOUL@x\SOUL@n + \def\SOUL@@{\SOUL@docmd{##1}{#1}}% + \fi + \fi + }% + \the\SOUL@cmds + \def\\##1##2##3{% + \edef\SOUL@x{\string#1}% + \edef\SOUL@n{\string##2}% + \ifx\SOUL@x\SOUL@n + \def\SOUL@@{\SOUL@doignore{##1}{#1}{##3}}% + \else + \edef\SOUL@n{\string##2\space}% + \ifx\SOUL@x\SOUL@n + \def\SOUL@@{\SOUL@doignore{##1}{#1}{##3}}% + \fi + \fi + }% + \the\SOUL@ignores% + \SOUL@@ +} + +%% This is where the actual ignoring is done. +\def\SOUL@doignore#1#2#3{% + \ifx2#1% + \SOUL@doword% + \def\SOUL@@##1##2{% + \ifx1#3% + \SOUL@do{##1}% + \else\ifx2#3% + \SOUL@do{##2}% + \fi\fi% + \SOUL@scan% + }% + \else\ifx1#1% + \SOUL@doword% + \def\SOUL@@##1{% + \ifx1#3% + \SOUL@do{##1}% + \fi% + \SOUL@scan% + }% + \else + \SOUL@doword + \let\SOUL@@\SOUL@scan + \fi\fi + \SOUL@@ +} + +\fi + +%% +%% +%% End of file trackchanges.sty diff --git a/inst/rmarkdown/templates/agu_article/template.yaml b/inst/rmarkdown/templates/agu_article/template.yaml new file mode 100644 index 000000000..0c12083f7 --- /dev/null +++ b/inst/rmarkdown/templates/agu_article/template.yaml @@ -0,0 +1,5 @@ +name: American Geophysical Union (AGU) Article Template +description: > + Template for creating an article for submission to AGU Journals. +create_dir: true + diff --git a/man/agu_article.Rd b/man/agu_article.Rd new file mode 100644 index 000000000..86e99b684 --- /dev/null +++ b/man/agu_article.Rd @@ -0,0 +1,42 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/agu_article.R +\name{agu_article} +\alias{agu_article} +\title{American Geophysical Union (AGU) format} +\usage{ +agu_article(..., keep_tex = TRUE, citation_package = "natbib", + highlight = NULL, md_extensions = c("-autolink_bare_uris", + "-auto_identifiers")) +} +\arguments{ +\item{...}{Arguments to \code{rmarkdown::pdf_document}} + +\item{keep_tex}{Keep the intermediate tex file used in the conversion to PDF} + +\item{citation_package}{The LaTeX package to process citations, \code{natbib} +or \code{biblatex}. Use \code{none} if neither package is to be used.} + +\item{highlight}{Syntax highlighting style. Supported styles include +"default", "tango", "pygments", "kate", "monochrome", "espresso", +"zenburn", and "haddock". Pass \code{NULL} to prevent syntax highlighting.} + +\item{md_extensions}{Markdown extensions to be added or removed from the +default definition or R Markdown. See the \code{\link{rmarkdown_format}} for +additional details.} +} +\value{ +R Markdown output format to pass to \code{\link[rmarkdown:render]{render}} +} +\description{ +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/}. +} +\examples{ + +\dontrun{ +library(rmarkdown) +draft("MyArticle.Rmd", template = "agu_article", package = "rticles") +} + +} diff --git a/tests/testit/test-formats.R b/tests/testit/test-formats.R index 804da1742..10a7419f6 100644 --- a/tests/testit/test-formats.R +++ b/tests/testit/test-formats.R @@ -28,6 +28,7 @@ test_format <- function(name, os_skip = NULL) { test_format("acm_article") test_format("acs_article") test_format("aea_article") +test_format("agu_article") test_format("ams_article") test_format("asa_article") test_format("biometrics_article")