diff --git a/.gitignore b/.gitignore index fcbe7509f..3b8b5877f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ reference inst/doc .vscode + +/.luarc.json diff --git a/DESCRIPTION b/DESCRIPTION index 767d28788..d43394acc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: rticles Title: Article Formats for R Markdown -Version: 0.27.6 +Version: 0.27.7 Authors@R: c( person("JJ", "Allaire", , "jj@posit.co", role = "aut"), person("Yihui", "Xie", , "xie@yihui.name", role = "aut", diff --git a/NEWS.md b/NEWS.md index 6904b73a5..f8b76e121 100644 --- a/NEWS.md +++ b/NEWS.md @@ -8,6 +8,15 @@ - Update `mdpi_article()` to latest version of September 2024 (thanks, @nielsbock, #573, #580). +- Update `ams_article()` to latest version 6.1 with some breaking changes: + - Pandoc v2.10 is required with the template now + - Removed metadata no more used : + - `journal`, `layout`, `exauthors`, `author1`, `author2`, `currentaddress`, `affiliation`) + - Authors related variable are now `authors` and `affiliations` fields which accept multi authors. See the new skeleton by creating new template with `rmarkdown::draft("Untiltle.Rmd", "ams", "rticles")`. + - Only `natbib` is supported now in `citation_package` + - Some knitr options are made default in the format: `fig.path = ""`, `out.extra = ""`, `echo = FALSE`. They can be overriden in the document. + - Specific markdown syntax are available in template for `acknowledgments`, `datastatement`, `appendix`. See the new skeleton by creating new template with `rmarkdown::draft("Untiltle.Rmd", "ams", "rticles")`. + # rticles 0.27 - `joss_article()` now correctly works as `base_format` for `bookdown::pdf_book()` (thanks, @mlysy, #564). diff --git a/R/ams_article.R b/R/ams_article.R new file mode 100644 index 000000000..142423f7c --- /dev/null +++ b/R/ams_article.R @@ -0,0 +1,61 @@ +#' American Meteorological Society journals format. +#' +#' Format for creating submissions to American Meteorological Society journals. +#' +#' @inheritParams rmarkdown::pdf_document +#' @param citation_package only natbib is supported with this template. +#' @param ... Additional arguments to [rmarkdown::pdf_document()]. **Note**: `extra_dependencies` are not +#' allowed as Copernicus does not support additional packages included via \code{\\usepackage{}}. +#' +#' @return An R Markdown output format. +#' @details This was adapted from +#' . +#' +#' The template require some default knitr option to be change: +#' +#' * `echo = FALSE` as no R code should be shown +#' * `fig.path = ""` as all directory paths need to be removed from figure names +#' * `out.extra = ""` to force figure labels with knitr +#' +#' @examples +#' \dontrun{ +#' library("rmarkdown") +#' draft("MyArticle.Rmd", template = "ams", package = "rticles") +#' render("MyArticle/MyArticle.Rmd") +#' } +#' @export +ams_article <- function(..., keep_tex = TRUE, citation_package = "natbib", md_extensions = c("-autolink_bare_uris", "-auto_identifiers"), pandoc_args = NULL) { + + rmarkdown::pandoc_available('2.10', TRUE) + + if (citation_package != "natbib") { + stop("AMS template supports only `natbib` for citation processing.") + } + + pandoc_args <- c( + pandoc_args, + "--lua-filter", find_resource("ams", "ams.lua") + ) + + base <- pdf_document_format( + "ams", keep_tex = keep_tex, md_extensions = md_extensions, citation_package = 'natbib', + pandoc_args = pandoc_args, ... + ) + pre_knit <- base$pre_knit + base$pre_knit <- function(input, metadata, ...) { + if (is.function(pre_knit)) pre_knit(input, metadata, ...) + old_meta <- c("journal", "layout", "exauthors", "author1", "author2", "currentaddress", "affiliation") + # check old arg + metadata_used <- old_meta %in% names(metadata) + if (any(metadata_used)) { + warning("You are probably using an old version of the template - please update to new skeleton or keep using rticles 0.27.", immediate. = TRUE, call. = FALSE) + warning("Some metadata are no more used in new AMS template: ", knitr::combine_words(old_meta[metadata_used]), ". They will be ignored.", immediate. = TRUE, call. = FALSE) + } + } + base$knitr$opts_chunk <- merge_list(base$knitr$opts_chunk, list( + fig.path = "", # AMS required + out.extra = "", # To force figure labels + echo = FALSE # Don't show R code + )) + return(base) +} diff --git a/R/article.R b/R/article.R index 7b0d3359d..0e7688af9 100644 --- a/R/article.R +++ b/R/article.R @@ -86,19 +86,6 @@ amq_article <- function(..., latex_engine = "xelatex", keep_tex = TRUE, ) } -#' @section `ams_article`: Format for creating an American Meteorological -#' Society (AMS) Journal articles. Adapted from -#' . -#' @export -#' @rdname article -ams_article <- function(..., keep_tex = TRUE, - md_extensions = c("-autolink_bare_uris")) { - pdf_document_format( - "ams", - keep_tex = keep_tex, md_extensions = md_extensions, ... - ) -} - #' @section `asa_article`: This format was adapted from The American #' Statistician (TAS) format, but it should be fairly consistent across #' American Statistical Association (ASA) journals. diff --git a/inst/rmarkdown/templates/ams/resources/ams.lua b/inst/rmarkdown/templates/ams/resources/ams.lua new file mode 100644 index 000000000..a1ac4e560 --- /dev/null +++ b/inst/rmarkdown/templates/ams/resources/ams.lua @@ -0,0 +1,70 @@ +local function getLetter(counter) + if counter < 1 or counter > 26 then + return nil -- Return nil for invalid input + end + local letter = string.char(counter + 64) -- 64 is used because ASCII value of 'A' is 65 + return letter +end + +local function process_div(div) + if div.classes:includes("acknowledgments") then + if #div.content and #div.content[1].content then + div.content[1].content:insert(1, pandoc.RawInline("latex", "\\acknowledgments\n")) + elseif #div.content then + div.content:insert(1, pandoc.RawInline("latex", "\\acknowledgments\n")) + end + return div.content + end + if div.classes:includes("datastatement") then + if #div.content and #div.content[1].content then + div.content[1].content:insert(1, pandoc.RawInline("latex", "\\datastatement\n")) + elseif #div.content then + div.content:insert(1, pandoc.RawInline("latex", "\\datastatement\n")) + end + return div.content + end + if div.classes:includes("appendix") then + nb_appendix = 0 + div.content:walk({ + Header = function(h) + if h.level == 1 then + nb_appendix = nb_appendix + 1 + end + end + }) + if nb_appendix > 0 then + local counter = 0 + return div.content:walk({ + traverse = 'topdown', + Header = function(h) + if h.level == 1 then + counter = counter + 1 + local appendix + if nb_appendix == 1 then + appendix = pandoc.RawInline("latex", "\\appendix\n") + else + appendix = pandoc.RawInline("latex", string.format("\\appendix[%s]\n", getLetter(counter))) + end + h.content:insert(1, pandoc.RawInline("latex", "\\appendixtitle{")) + h.content:insert(pandoc.RawInline("latex", "}")) + h.content:insert(1, appendix) + return { h.content } + elseif h.level == 2 then + local star = "" + if h.classes:includes("unnumbered") then + star = "*" + end + h.content:insert(1, pandoc.RawInline("latex", string.format("\\subsection%s{", star))) + h.content:insert(pandoc.RawInline("latex", "}")) + return { h.content} + end + end + }) + end + end + return div.content +end + +return { + Div = process_div, +} diff --git a/inst/rmarkdown/templates/ams/resources/template.tex b/inst/rmarkdown/templates/ams/resources/template.tex index fbecc58ba..577f7c4b6 100644 --- a/inst/rmarkdown/templates/ams/resources/template.tex +++ b/inst/rmarkdown/templates/ams/resources/template.tex @@ -1,68 +1,21 @@ -\documentclass[$layout$]{ametsoc} -\usepackage{color} -\usepackage{hyperref} -\journal{$journal$} -% Please choose a journal abbreviation to use above from the following list: -% -% jamc (Journal of Applied Meteorology and Climatology) -% jtech (Journal of Atmospheric and Oceanic Technology) -% jhm (Journal of Hydrometeorology) -% jpo (Journal of Physical Oceanography) -% jas (Journal of Atmospheric Sciences) -% jcli (Journal of Climate) -% mwr (Monthly Weather Review) -% wcas (Weather, Climate, and Society) -% waf (Weather and Forecasting) -% bams (Bulletin of the American Meteorological Society) -% ei (Earth Interactions) - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%Citations should be of the form ``author year'' not ``author, year'' -\bibpunct{(}{)}{;}{a}{}{,} -\title{$title$} +%% Version 6.1, 1 September 2021 +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% TemplateV6.1.tex -- LaTeX-based blank template for submissions to the +% American Meteorological Society +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% PREAMBLE +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -$if(author1)$ -\authors{$author1$ -$if(correspondingauthor)$ -\correspondingauthor{$author1$,$correspondingauthor$} -$endif$ -$if(author2)$ -and $author2$ -$if(currentaddress)$ -\thanks{$currentaddress$} -$endif$ -$endif$ -} -$endif$ -$if(affiliation)$ -\affiliation{$affiliation$} -$endif$ -$if(extraauthor)$ - \extraauthor{Extra Author} -$endif$ -$if(exaffiliation)$ - \extraaffil{$exaffiliation$} -$endif$ +%% Start with one of the following: +% 1.5-SPACED VERSION FOR SUBMISSION TO THE AMS +\documentclass[$if(twocol)$twocol$endif$]{ametsocV6.1} -$if(email)$ -$email$ -$endif$ +% TWO-COLUMN JOURNAL PAGE LAYOUT---FOR AUTHOR USE ONLY +% \documentclass[twocol]{ametsocV6.1} -$for(exauthors)$ -\extraauthor{$exauthors.name$ -$if(exauthors.correspondingauthor)$ -\correspondingauthor{$exauthors.name$,$exauthors.correspondingauthor$} -$endif$ -$if(exauthors.currentaddress)$ -\thanks{$exauthors.currentaddress$} -$endif$} -$if(exauthors.exaffiliation)$ -\extraaffil{$exauthors.exaffiliation$} -$endif$ -$if(exauthors.email)$ -$exauthors.email$ -$endif$ -$endfor$ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% $if(highlighting-macros)$ % Pandoc syntax highlighting @@ -201,16 +154,180 @@ $header-includes$ $endfor$ +%%% To be entered by author: + +%% May use \\ to break lines in title: + +\title{$title$} + +%% Enter authors' names and affiliations as you see in the examples below. +% +%% Use \correspondingauthor{} and \thanks{} (\thanks command to be used for affiliations footnotes, +%% such as current affiliation, additional affiliation, deceased, co-first authors, etc.) +%% immediately following the appropriate author. +% +%% Note that the \correspondingauthor{} command is NECESSARY. +%% The \thanks{} commands are OPTIONAL. +% +%% Enter affiliations within the \affiliation{} field. Use \aff{#} to indicate the affiliation letter at both the +%% affiliation and at each author's name. Use \\ to insert line breaks to place each affiliation on its own line. + +%\authors{Author One,\aff{a}\correspondingauthor{Author One, email@email.com} +%Author Two,\aff{a} +%Author Three,\aff{b} +%Author Four,\aff{a} +%Author Five\thanks{Author Five's current affiliation: NCAR, Boulder, Colorado},\aff{c} +%Author Six,\aff{c} +%Author Seven,\aff{d} +% and Author Eight\aff{a,d} +%} +% +%\affiliation{\aff{a}{First Affiliation}\\ +%\aff{b}{Second Affiliation}\\ +%\aff{c}{Third Affiliation}\\ +%\aff{d}{Fourth Affiliation} +%} + +% Credit to https://stackoverflow.com/a/67609365 for different last-author case. +\authors{ +$for(authors/allbutlast)$ +$it.name$$if(it.current)$\thanks{$it.current$}$endif$,\aff{$it.aff$}$if(it.email)$\correspondingauthor{$it.name$, $it.email$}$endif$ +$endfor$ +$for(authors/last)$ +and~ +$it.name$$if(it.current)$\thanks{$it.current$}$endif$\aff{$it.aff$}$if(it.email)$\correspondingauthor{$it.name$, $it.email$}$endif$ +$endfor$ +} + +% Credit to https://stackoverflow.com/a/67609365 for different last-affiliation case. +\affiliation{ +$for(affiliations/allbutlast)$\aff{$it.aff$}{$it.name$}$sep$\\ +$endfor$ +} + +%%% To be entered by author: + +%% May use \\ to break lines in title: + +\title{$title$} + +%% Enter authors' names and affiliations as you see in the examples below. +% +%% Use \correspondingauthor{} and \thanks{} (\thanks command to be used for affiliations footnotes, +%% such as current affiliation, additional affiliation, deceased, co-first authors, etc.) +%% immediately following the appropriate author. +% +%% Note that the \correspondingauthor{} command is NECESSARY. +%% The \thanks{} commands are OPTIONAL. +% +%% Enter affiliations within the \affiliation{} field. Use \aff{#} to indicate the affiliation letter at both the +%% affiliation and at each author's name. Use \\ to insert line breaks to place each affiliation on its own line. + +%\authors{Author One,\aff{a}\correspondingauthor{Author One, email@email.com} +%Author Two,\aff{a} +%Author Three,\aff{b} +%Author Four,\aff{a} +%Author Five\thanks{Author Five's current affiliation: NCAR, Boulder, Colorado},\aff{c} +%Author Six,\aff{c} +%Author Seven,\aff{d} +% and Author Eight\aff{a,d} +%} +% +%\affiliation{\aff{a}{First Affiliation}\\ +%\aff{b}{Second Affiliation}\\ +%\aff{c}{Third Affiliation}\\ +%\aff{d}{Fourth Affiliation} +%} + +% Credit to https://stackoverflow.com/a/67609365 for different last-author case. +\authors{ +$for(authors/allbutlast)$ +$it.name$$if(it.current)$\thanks{$it.current$}$endif$,\aff{$it.aff$}$if(it.email)$\correspondingauthor{$it.name$, $it.email$}$endif$ +$endfor$ +$for(authors/last)$ +and~ +$it.name$$if(it.current)$\thanks{$it.current$}$endif$\aff{$it.aff$}$if(it.email)$\correspondingauthor{$it.name$, $it.email$}$endif$ +$endfor$ +} + +% Credit to https://stackoverflow.com/a/67609365 for different last-affiliation case. +\affiliation{ +$for(affiliations)$\aff{$it.aff$}{$it.name$}$sep$\\ +$endfor$ +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% ABSTRACT +% +% Enter your abstract here +% Abstracts should not exceed 250 words in length! +% \abstract{$abstract$} + \begin{document} + +%% Necessary! \maketitle + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% SIGNIFICANCE STATEMENT/CAPSULE SUMMARY +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% If you are including an optional significance statement for a journal article or a required capsule summary for BAMS +% (see www.ametsoc.org/ams/index.cfm/publications/authors/journal-and-bams-authors/formatting-and-manuscript-components for details), +% please apply the necessary command as shown below: +% +% Significance Statement (all journals except BAMS) +% +%\statement +% Enter significance statement here, no more than 120 words. See \url{www.ametsoc.org/index.cfm/ams/publications/author-information/significance-statements/} for details. +% + +$if(statement)$ +%$if(twocol)$\twocolsig$else$\statement$endif$ +$statement$ +$endif$ % FIXME, AMS template says to use twocolsig instead of sig for twocol, but there is no sig, is two col twocolstatement or twocolsig? + +%% Capsule (BAMS only) +%% +%\capsule +% Enter BAMS capsule here, no more than 30 words. See \url{www.ametsoc.org/index.cfm/ams/publications/author-information/formatting-and-manuscript-components/#capsule} for details. +% + +$if(capsule)$ +%$if(twocol)$\twocolcapsule$else$\capsule$endif$ +$capsule$ +$endif$ + +%% * * If using twocol mode, you will need to use the commands "twocolsig" and "twocolcapsule" in place of "sig" and "capsule" +%% to ensure that the text box correctly spans across both columns. +% + $for(include-before)$ $include-before$ $endfor$ + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% MAIN BODY OF PAPER +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% + $body$ + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% REFERENCES +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Make your BibTeX bibliography by using these commands: +% \bibliographystyle{ametsocV6} +% \bibliography{references} + +\bibliographystyle{ametsocV6} +\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} + $for(include-after)$ $include-after$ $endfor$ + \end{document} diff --git a/inst/rmarkdown/templates/ams/skeleton/FigOne.pdf b/inst/rmarkdown/templates/ams/skeleton/FigOne.pdf new file mode 100644 index 000000000..e4c37ba29 Binary files /dev/null and b/inst/rmarkdown/templates/ams/skeleton/FigOne.pdf differ diff --git a/inst/rmarkdown/templates/ams/skeleton/FigTwo.pdf b/inst/rmarkdown/templates/ams/skeleton/FigTwo.pdf new file mode 100644 index 000000000..daf4263c9 Binary files /dev/null and b/inst/rmarkdown/templates/ams/skeleton/FigTwo.pdf differ diff --git a/inst/rmarkdown/templates/ams/skeleton/american-meteorological-society.csl b/inst/rmarkdown/templates/ams/skeleton/american-meteorological-society.csl deleted file mode 100644 index 88d8fe786..000000000 --- a/inst/rmarkdown/templates/ams/skeleton/american-meteorological-society.csl +++ /dev/null @@ -1,245 +0,0 @@ - - diff --git a/inst/rmarkdown/templates/ams/skeleton/ametsocV6.1.cls b/inst/rmarkdown/templates/ams/skeleton/ametsocV6.1.cls new file mode 100644 index 000000000..b16ccba94 --- /dev/null +++ b/inst/rmarkdown/templates/ams/skeleton/ametsocV6.1.cls @@ -0,0 +1,1186 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Version 6.1, 1 September 2021 +% ametsocV6.1.cls +% Article Class for >> AMS Journals << +% +% +% Copyright 2021, American Meteorological Society +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% The Current Maintainer of this work is the American Meteorological Society. +% This work consists of the files ametsocV6.1.cls, ametsocV6.bst, amsdocsV6.1.pdf, and AMS_RefsV6.pdf. +%%%%%%%%%%%%%%%%%%%%%%% +%% Options + +\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} + +\newif\ifdraft +\DeclareOption{draft}{\global\drafttrue +\renewcommand\baselinestretch{1.75} +\def\arraystretch{1.5} +\@twocolumnfalse +\setlength\overfullrule{5pt}} + +\DeclareOption{twocol}{\setlength\overfullrule{0pt} +\renewcommand\baselinestretch{1} +\def\arraystretch{1.15} +\brokenpenalty=5000 +\global\draftfalse +\@twocolumntrue +} + +\DeclareOption{onecolumn}{\@twocolumnfalse} +\DeclareOption{twocolumn}{\@twocolumntrue} + +%%%%%%%%%%%%% + +%% default options declared +\ExecuteOptions{letterpaper,twoside,onecolumn,draft} + +%% This is where options used with \documentclass[]{}, +%% ie, \documentclass[draft]{ammetsoc} +%% are activated: + +\ProcessOptions + +%%%%%%%%%% +%% Standard 10 point default settings: + +%% Font family settings +\renewcommand\normalsize{% +\ifdraft + \@setfontsize\normalsize{12pt}{12pt}% +\else + \@setfontsize\normalsize{9.85pt}{11.5}% +\baselineskip=11.5pt plus .1pt +\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\normaltextsize{% + \@setfontsize\normaltextsize{10.5pt}{12} + \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ + \abovedisplayshortskip \z@ \@plus3\p@ + \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ + \belowdisplayskip \abovedisplayskip + \let\@listi\@listI} + +\newcommand\small{% + \@setfontsize\small\@ixpt{11}% + \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\bigfootnotesize{% + \@setfontsize\bigfootnotesize{8.5pt}{9.5}% + \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\footnotesize{% + \@setfontsize\footnotesize\@viiipt{9.5}% + \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\bigtiny{\@setfontsize\bigtiny{5.5pt}\@vipt} +\newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt} +\newcommand\large{\@setfontsize\large\@xiipt{14}} +\newcommand\Large{\@setfontsize\Large\@xivpt{18}} +\newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}} +\newcommand\huge{\@setfontsize\huge\@xxpt{25}} +\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}} + +%% Font commands to accomodate +%% earlier TeX and LaTeX font conventions: +\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} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%% Page style settings + \parindent = 10pt + \parskip = 0\p@ %\@plus .0001pt + \textheight=9in %% +\advance\textheight-12pt %this works for first page +\advance\textheight-8pt + +\advance\textheight4pt + +\textwidth= 39pc + +\pdfpagewidth=7.87in +\pdfpageheight=10.5in + +\setlength\lineskip{1\p@} +\setlength\normallineskip{1\p@} + + +\setlength\headheight{12\p@} +\setlength\headsep {12\p@} +\setlength\topskip {10\p@} +\setlength\footskip{35\p@} + + +\setlength\maxdepth{.5\topskip} + +%%% Running head and foot definition. + +\def\currvolume{Please supply {\tt\string\volume\string{\string}}} +\def\currdate{Please supply {\tt\string\issuedate\string{\string}}} +\def\volume#1{\def\currvolume{Volume #1}} +\def\issuedate#1{\def\currdate{#1}} +\let\currvolume\relax +\let\currdate\relax + +\def\ps@plain{% + \def\@oddhead{\vbox{\ifdraft\else\iffirstpage\global\firstpagefalse +\vtop to0pt{\vss +\rlap{\hbox to\textwidth{\hfill\color{gray}\small +Generated using the official AMS \LaTeX\ template v6.1 two-column layout. This work has been submitted for publication. +\\ Copyright in this work may be transferred without further notice, and this version may no longer be accessible.\hfill}} +\vskip3pt +\hrule width \textwidth +\vskip18pt} +\fi\fi +\ifdraft\else +\vtop to 0pt{\vss +\rlap{\hbox to\textwidth{\footnotesize\sc\rlap{\currvolume}\hfill +%%% +%\uppercase{AMS Journal Name} +%%% +\hfill +\llap{\currdate}}} +\vss}\fi}}% + \def\@oddfoot{\hbox to\textwidth{\rlap{\ifdraft\small\else\scriptsize\fi +%\copyright \theyear\ +\ template}\hfill +\normalsize\ifdraft\thepage\hfill\else +\thepage\hfill\fi}}% + \let\@evenfoot\@empty + \let\@evenfoot\@empty} + + \def\ps@headings{% + \def\@oddfoot{\ifdraft\centerline{\thepage}\else\hfill\fi} + \let\@evenfoot\@oddfoot + \def\@evenhead{{\ifdraft\hfill\else\normalsize\thepage +\bigfootnotesize\sc\hfill +%\uppercase{AMS Journal Name} +\hfill \currvolume\fi}}% + \def\@oddhead{{\ifdraft\hfill\else\bigfootnotesize\sc\currdate\hfill \therunningheadauthors\hfill \normalsize\thepage +%\currvolume +\fi}}% +} + +%%%%%%%%%%%% +%% Names to be used in Bibliography, Figure and Table captions, and +%% Appendix + +\newcommand\refname{References} +\newcommand\figurename{{\sc Fig.}} +\newcommand\tablename{{\sc Table}} +%\newcommand\appendixname{Appendix} + +%%%%%%%%%%%%%%% +%% margin notes positioning +\setlength\marginparsep {10\p@} +\setlength\marginparpush{5\p@} +\setlength\marginparwidth {48\p@} + +%%%%%%%%%%%%%%% +%% needed by output routine + +\setlength\oddsidemargin {-19pt} +\evensidemargin\oddsidemargin + + +%%%%%%%%%%%%%%% +%% Footnote settings + +\renewcommand\footnoterule{% +\vskip11pt + \hrule\@width.2\columnwidth + \vskip10pt} + +\newcommand\@makefntext[1]{% + \parindent 1em% + \noindent + \hb@xt@1.8em{\hss\@makefnmark}#1} + +%% distance between footnotes +\setlength\footnotesep{6.65\p@} + +%% distance between text and baseline of first footnote +\setlength{\skip\footins}{6\p@ \@plus .1\p@ \@minus 2\p@ +} + +\skip\@mpfootins = \skip\footins + +%%%%%%%%%%%%%%% +%% distance between figures and tables and text +\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@} +\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} + +%% Separation used when you type \begin{figure}[h]...\end{figure} or +%% \begin{table}[h]...\end{table} +\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@} + +%% Separation used when you type \begin{figure*}...\end{figure*} or +%% \begin{table*}...\end{table*} +\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} + +%% Separation used when you type \begin{figure*}[h]...\end{figure*} or +%% \begin{table*}[h]...\end{table*} +\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} + +%%%%%%%%%% +%% float positioning, needed by output routine +\setlength\@fptop{0\p@ \@plus 1fil} +\setlength\@fpsep{8\p@ \@plus 2fil} +\setlength\@fpbot{0\p@ \@plus 1fil} +\setlength\@dblfptop{0\p@ \@plus 1fil} +\setlength\@dblfpsep{8\p@ \@plus 2fil} +\setlength\@dblfpbot{0\p@ \@plus 1fil} + +%%%%%%%%% +%% Listing defaults, +%% up to six levels of indentation + +%% add to top of new list if started in vertical mode +\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@} + +\def\@listi{\leftmargin\leftmargini + \parsep 4\p@ \@plus2\p@ \@minus\p@ + \topsep 8\p@ \@plus2\p@ \@minus4\p@ + \itemsep4\p@ \@plus2\p@ \@minus\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} + + +%% indentation of various levels of listing: +\setlength\leftmargini {2em} +\leftmargin \leftmargini + +\setlength\leftmarginii {2.2em} +\setlength\leftmarginiii {1.87em} +\setlength\leftmarginiv {1.7em} + + \setlength\leftmarginv {.5em} + \setlength\leftmarginvi {.5em} + +\setlength \labelsep {.5em} +\setlength \labelwidth{\leftmargini} +\addtolength\labelwidth{-\labelsep} + +\@beginparpenalty -\@lowpenalty +\@endparpenalty -\@lowpenalty +\@itempenalty -\@lowpenalty + +%% \begin{enumerate}\item \end{enumerate} +%% will use these defaults: + +\renewcommand\theenumi{\@arabic\c@enumi} +\renewcommand\theenumii{\@alph\c@enumii} +\renewcommand\theenumiii{\@roman\c@enumiii} +\renewcommand\theenumiv{\@Alph\c@enumiv} +\newcommand\labelenumi{\theenumi.} +\newcommand\labelenumii{(\theenumii)} +\newcommand\labelenumiii{\theenumiii.} +\newcommand\labelenumiv{\theenumiv.} +\renewcommand\p@enumii{\theenumi} +\renewcommand\p@enumiii{\theenumi(\theenumii)} +\renewcommand\p@enumiv{\p@enumiii\theenumiii} + +%% \begin{itemize}\item \end{itemize} +%% will use these defaults: + +\newcommand\labelitemi{\textbullet} +\newcommand\labelitemii{\normalfont\bfseries \textendash} +\newcommand\labelitemiii{\textasteriskcentered} +\newcommand\labelitemiv{\textperiodcentered} + +%% \begin{description}\item \end{description} +%% will use these defaults: + +\newenvironment{description} + {\list{}{\labelwidth\z@ \itemindent-\leftmargin + \let\makelabel\descriptionlabel}} + {\endlist} +\newcommand*\descriptionlabel[1]{\hspace\labelsep + \normalfont\bfseries #1} + +%%%%%%%%%% +%% Used within other commands for influencing +%% whether to start a new page. +\@lowpenalty 51 +\@medpenalty 151 +\@highpenalty 301 + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Float settings + +%% How many figures or tables at the top of page? +\setcounter{topnumber}{10} +%% How much space may be used by figures and tables at the top of page? +\renewcommand\topfraction{.95} + +%% Same, at the bottom of the page +\setcounter{bottomnumber}{10} +\renewcommand\bottomfraction{.95} + +%% How many figures/tables in total on one page? +\setcounter{totalnumber}{10} + +%% How much of the page should be text? +\renewcommand\textfraction{.01}%% How much of the page must reserved for text? +\renewcommand\floatpagefraction{.95} + +%% Similarly, but for double column figures or tables: +\setcounter{dbltopnumber}{2} +\renewcommand\dbltopfraction{.95} +\renewcommand\dblfloatpagefraction{.95} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%% Section head definitions +\setcounter{secnumdepth}{4} + +\newcounter {section} +\newcounter {subsection}[section] +\newcounter {subsubsection}[subsection] +\newcounter {paragraph}[subsubsection] +\newcounter {subparagraph}[paragraph] +\renewcommand \thesection {\@arabic\c@section} +\renewcommand\thesubsection {\@alph\c@subsection} +\renewcommand\thesubsubsection{\@arabic\c@subsubsection} +\renewcommand\theparagraph {(\@roman\c@paragraph)} +\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph} + +%% Innards of \@startsection, used for section fonts. +%% The change is to make italic small caps for subsubsection, have +%% upright section number + +\def\@sect#1#2#3#4#5#6[#7]#8{% + \ifnum #2>\c@secnumdepth + \let\@svsec\@empty + \else + \refstepcounter{#1}% + \protected@edef\@svsec{\@seccntformat{#1}\ifnum#2=4\else\ifnum#2=3)\else.\fi\fi\ \hskip1pt\relax}% + \fi + \@tempskipa #5\relax + \ifdim \@tempskipa>\z@ + \begingroup + #6{% + \@hangfrom{\hskip #3\relax\@svsec}% + \interlinepenalty \@M +%% the following line is the change from the latex.ltx default: +\ifnum#2=3\let\dothis\sc\else\let\dothis\relax\fi\dothis{#8} +\@@par}% + \endgroup + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}% + \else + \def\@svsechd{% + #6{\hskip #3\relax + \@svsec #8}% + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}}% + \fi + \@xsect{#5}} + +\newcommand\section{\@startsection {section}{1}{\z@}% + {-12pt \@plus -1ex \@minus -.2ex}% + {6pt}% + {\ifdraft\large\else\normalsize\fi\bfseries}} +\newcommand\subsection{\@startsection{subsection}{2}{\z@}% + {-12pt \@plus -1ex \@minus -.2ex}% + {6pt}% + {\ifdraft\large\else\normalsize\fi\it}} +\newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% + {-12pt \@plus -1ex \@minus -.2ex}% + {6pt}% + {\sc}}% +\newcommand\paragraph{\@startsection{paragraph}{4}{\z@}% + {6pt \@plus1ex \@minus.2ex}% + {-1em}% + {\normalfont\ifdraft\large\else\normaltextsize\fi\it}} +\newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% + {3.25ex \@plus1ex \@minus .2ex}% + {-1em}% + {\normalfont\normaltextsize\bfseries}} + + +%%%%%%%%%%%% +%% Quotation, Quote +\newenvironment{quotation} + {\list{}{\listparindent 1.5em% + \itemindent \listparindent + \rightmargin \leftmargin + \parsep \z@ \@plus\p@}% + \item\relax} + {\endlist} + +\newenvironment{quote} + {\list{}{\rightmargin\leftmargin}% + \item\relax} + {\endlist} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Setting table and array widths +%% (\begin{tabular}...\end{tabular} and +%% \begin{array}...\end{array} + +%% white space between columns in array +\setlength\arraycolsep{5\p@} + +%%%%%%%%%%% +%% white space between columns in tabular +\setlength\tabcolsep{6\p@} + +%%%%%%%%%%% +%% Width of ruled lines in array +\setlength\arrayrulewidth{.4\p@} + +%%%%%%%%%%% +%% Distance between two ruled lines +\setlength\doublerulesep{2\p@} + +%%%%%%%%%%% +\setlength\tabbingsep{\labelsep} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% \fbox{} settings + +%% determine how much space between ruled lines and text: +\setlength\fboxsep{3\p@} + +%% Width of ruled lines used by \fbox: +\setlength\fboxrule{.4\p@} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Declaring counters + +%% equations counter: +\renewcommand \theequation {\@arabic\c@equation} + +%% figure counter: +\newcounter{figure} +\renewcommand\thefigure{\@arabic\c@figure} + +%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Equation line spacing + +\everydisplay{\def\arraystretch{1.0}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Figures + +%% Choices for figure float placement if [] hasn't been +%% used for \begin{figure} +\def\fps@figure{tbp} +\def\draftspace{\renewcommand\baselinestretch{1.75}} +\def\twocolspace{\renewcommand\baselinestretch{1}} +%\renewcommand\baselinestretch{2.25} +\ifdraft\draftspace\else\twocolspace\fi + + +\def\ftype@figure{1} +\def\ext@figure{lof} %for List of Figures, which we won't use +\def\fnum@figure{\figurename~\thefigure} + +\newenvironment{figure} + {\@float{figure}} + {\end@float} +\newenvironment{figure*} + {\@dblfloat{figure}} + {\end@dblfloat} + +%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Tables +\newcounter{table} + +%% Choices for table float placement if [] hasn't been +%% used for \begin{table} +\def\fps@table{tbp} + +%\renewcommand\baselinestretch{2.25} +\ifdraft\draftspace\else\twocolspace\fi + +\def\ftype@table{2} +\def\ext@table{lot} % for List of Tables, which we won't use +\def\fnum@table{\tablename~\thetable} + +\newenvironment{table} + {\footnotesize\@float{table}} + {\end@float} + +\newenvironment{table*} + {\@dblfloat{table}} + {\end@dblfloat} + +%%% Figure and Table Captions +\newlength\abovecaptionskip +\newlength\belowcaptionskip +\setlength\abovecaptionskip{10\p@} +\setlength\belowcaptionskip{5\p@} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Bibliography +%%% Customized with natbib package + +\newdimen\bibindent +\setlength\bibindent{1.5em} +\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} +\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} +\let\@openbib@code\@empty + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% To get curr month/day/year + +\def\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} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Two-column defaults + +\setlength\columnsep{12\p@} +\setlength\columnseprule{0\p@} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Default page style: plain +%% Running heads and feet + +\pagestyle{headings} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Default page numbering + +\pagenumbering{arabic} + +%% default page style, some leaway for lines going into +%% margin, no ragged bottom +\ifdraft\else + \twocolumn\fi + \sloppy + \flushbottom + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% All the usepackages included in this style %%%%%%%%%%%%%%%%% +\usepackage{graphicx} +\usepackage{amsmath,amsfonts,amssymb,bm} +\usepackage{mathptmx}%{times} +\usepackage{newtxtext} +\usepackage{newtxmath} +\usepackage{epstopdf} +\usepackage[scaled=.97]{helvet} %% to get bold helvetica +\usepackage{fancyhdr} +\usepackage{natbib} +\def\bibfont{\ifdraft\normalsize\else\footnotesize\fi} +\usepackage{url} +\usepackage{xcolor} +\usepackage{indentfirst} +\usepackage{multicol} +\usepackage{ifthen} +\usepackage{rotating} +\usepackage{appendix} +%\usepackage{mdframed} +%\usepackage{cuted} +\usepackage{setspace} + + +%% Start line numbers immediately if in draft mode +\ifdraft +\usepackage{lineno} +\linenumbers +\fi + + + +%%%%%%%%%% Setting up title/running head info %%%%%%%%%%%%%%%% +\def\title#1{\def\thetitle{#1}} +\def\received#1{\ifdraft\def\thereceived{}\else\def\thereceived{#1}\fi} +\received{} +\def\authors#1{\def\theauthors{#1}} +\def\author#1{\def\theauthors{#1}} + +%\newcounter{extraauth} +\newcounter{loopnum} + +%\def\extraauthor#1{\global\advance\c@extraauth by 1 +%\expandafter\gdef\csname extraauthors\the\c@extraauth\endcsname{#1}} +% +%\let\extraauthors\extraauthor +% +%\def\extraaffil#1{\expandafter\gdef\csname extraaffil\the\c@extraauth\endcsname{#1}} +\newcommand\aff[1]{\textsuperscript{\rm#1}\,} +\def\affiliation#1{\def\theaffiliation{#1}} + +%\let\theextraaffil\relax +%\let\theextraauthor\relax +%\let\theextraauthors\relax + +\def\abstract#1{\def\theabstract{% +\centerline{\vtop{\ifdraft\normalsize\else \bigfootnotesize\fi\linewidth 5.25cm +\ifdraft\internallinenumbers\fi +\noindent{ABSTRACT:}\;\;\relax #1\vskip1sp}}}} + +\let\dothanks\relax + + +\def\correspondingauthor#1{% +\thanks{\ifdraft\internallinenumbers\normalsize\fi + \noindent{{\it Corresponding author}:}\ #1 +% \vskip1pt +% \noindent\theemail +}} + +\let\thecorrespondingauthor\relax + +%{\makeatletter +%\gdef\email{\bgroup\makeatletter\xemail} +%\gdef\xemail#1{\gdef\theemail{{\ifdraft\normalsize\else\footnotesize\fi E-mail: #1}}\egroup} +%} + +%\def\articledoi#1{\def\thedoi{{\ifdraft\normalsize\else\scriptsize\fi\sc DOI: #1}}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Significance statement/Capsule + + +%\newenvironment{sig} +%{ +%%\begin{strip} +%\begin{mdframed}[backgroundcolor=white, linecolor=white] +%{SIGNIFICANCE STATEMENT:}\;} +%{ +%\end{mdframed} +%%\end{strip} +%} +% +%\newenvironment{twocolsig} +%{ +%\begin{strip} +%\vspace*{-2cm} +%\begin{mdframed}[backgroundcolor=white, linecolor=white] +%{SIGNIFICANCE STATEMENT:}\;} +%{ +%\end{mdframed} +%\vspace*{-3mm} +%\end{strip} +%} +% +%\newenvironment{capsule} +%{ +%%\begin{strip} +%\begin{mdframed}[backgroundcolor=white, linecolor=white] +%{CAPSULE:}\;} +%{ +%\end{mdframed} +%%\end{strip} +%} +%\newenvironment{twocolcapsule} +%{ +%\begin{strip} +%\vspace*{-2cm} +%\begin{mdframed}[backgroundcolor=white, linecolor=white] +%{CAPSULE:}\;} +%{ +%\end{mdframed} +%\vspace*{-3mm} +%\end{strip} +%} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% \maketitle, \@maketitle, for beginning of article + +%% allows multiple \thanks in draft mode +\newcount\thanksnum +\newcount\savethanksnum +\def\thanksloop{\savethanksnum=\thanksnum +\thanksnum=1\relax +\loop +\ifnum\thanksnum<\savethanksnum +\ifx\expandafter\csname thanks\the\thanksnum\endcsname\relax +\else +\vskip1sp +\noindent\llap{}\csname thanks\the\thanksnum\endcsname +\global\advance\thanksnum by 1\fi +\repeat +\ifx\expandafter\csname thanks\the\thanksnum\endcsname\relax +\else +\vskip1sp +\noindent\llap{}\csname thanks\the\thanksnum\endcsname\ \vskip1sp\fi +} + + +%% allows multiple \extraauthor and \extraaffil + +%\def\extraloop{\c@loopnum=\c@extraauth +%\c@extraauth=1\relax +%\loop +%\ifnum\c@extraauth<\c@loopnum +%\ifx\expandafter\csname extraauthors\the\c@extraauth\endcsname\relax +%\else +%\vskip12pt +%\ifdraft\rm\else\sc\fi +%\csname extraauthors\the\c@extraauth\endcsname +%\vskip3pt +%{\it +%\csname extraaffil\the\c@extraauth\endcsname} +%\global\advance\c@extraauth by 1\fi +%\repeat +%\ifx\expandafter\csname extraauthors\the\c@extraauth\endcsname\relax +%\else +%\vskip12pt +%\ifdraft\rm\else\sc\fi +%\csname extraauthors\the\c@extraauth\endcsname +%\vskip3pt +%{\it \csname extraaffil\the\c@extraauth\endcsname} +%\fi +%} + +%% Makes title on first page of article, +%% allows switches for draft/twocol mode +\newif\iffirstpage +\newcommand\maketitle{\par +\global\firstpagetrue +\thispagestyle{fancy} +\lhead{\color{gray}Generated using the official AMS \LaTeX\ template v6.1 two-column layout. This work has been submitted for publication. Copyright in this work may be transferred without further notice, and this version may no longer be accessible.} +\ifdraft\lhead{\hfill\color{gray} Generated using the official AMS \LaTeX\ template v6.1 \hfill} \fi +\chead{} +\rhead{} +\lfoot{} +\cfoot{\thepage} +\rfoot{} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} + \begingroup + \renewcommand\thefootnote{}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\footnotesize\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1 + \vskip1sp +% \vskip1pt\footnoterule + \small + \vskip3pt +\ifdraft\else\dothanks\fi +}% +\ifdraft + \@maketitle +\@thanks +\else + \twocolumn[\@maketitle]% +\@thanks +\fi + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\theauthor\@empty + \global\let\@date\@empty + \global\let\thetitle\@empty + \global\let\title\relax + \global\let\author\relax +\normalsize +} + +%% Allows switches for draft/twocol mode +\def\@maketitle{% +\vglue61pt + \begin{center}% +\ifdraft +\def\thanks##1{\global\advance\thanksnum by 1 +\expandafter\gdef\csname thanks\the\thanksnum\endcsname{##1}} +\fi% + { +\vglue-4pt +\ifdraft\Large\else\large\fi\bf \thetitle \par}% + \vskip 12pt + {\normalsize\ifdraft\rm\else\sc\fi\theauthors% +} + \vskip 6pt +{\bigfootnotesize\it +\ifdraft\internallinenumbers\normalsize\fi +\theaffiliation +\ifdraft\normalsize\fi +%% +%{\normalsize +%\extraloop +%}\vskip5pt +%\fi +%% +\vskip14pt +\rm +\ifx\thereceived\empty\else +(\thereceived) +\vskip9pt +\fi +} +\end{center} +\ifdraft +\vfill +\thanksloop +\dothanks +\eject\fi +%\centerline{\ifdraft\normalsize\else\bigfootnotesize\fi\sc ABSTRACT} +%\vskip7pt +\theabstract +\vskip17pt +\ifdraft\newpage\fi +} + + +\advance\voffset-36pt + + +%% to be used in running heads for [twocol] option: +\def\runningheadauthors#1{% +\def\therunningheadauthors{{\spaceskip=1pt #1}}} +\runningheadauthors{Please use command {\tt\string\runningheadauthors\string{\string}}} +\runningheadauthors{} + +%% to be used in running heads for [twocol] option: +\def\and{\ \ \ A N D\ \ \ } + +%% Keeps single line at bottom of previous page or at top of current page +%% from occurring. +\clubpenalty=10000 +\widowpenalty=10000 + +%% It would be nice to use this, but it messes up the page makeup. +%% No hyphenation over page breaks +%\brokenpenalty=5000 + +%% bold helvetica, which will scale according to font family +%% where it is found: + +\def\sfbf#1{\leavevmode\hbox{\fontfamily{phv}\selectfont\bfseries #1}} + + +%% needed for small caps in italic for subsubsection head +%% Doing this in tikz saves having to import another font file + +\newcommand{\textscsl}[1]{% + \tikz[baseline=(N.base)]% + % The transform says: + % x' = 1x + 0.22y + 0pt + % y' = 0x + 1y + 0pt + % This gives a slant - adjust the value for each font! + \pgfsys@transformcm{1}{0}{0.22}{1}{0pt}{0pt}% + \node[inner sep=0pt] (N) {\textsc{#1}};% +} + +\def\listfigurename{\uppercase{List of Figures}} +\def\listtablename{\uppercase{List of Tables}} + +%% needed for draft version +%\newcommand\listoffigures{% +% \section*{\listfigurename +% \@mkboth{\MakeUppercase\listfigurename}% +% {\MakeUppercase\listfigurename}}% +%\baselineskip=18pt +%\normalsize +% \@starttoc{lof}% +% } +% +%\newcommand\listoftables{% +% \section*{\listtablename +% \@mkboth{\MakeUppercase\listtablename}% +% {\MakeUppercase\listtablename}}% +%\baselineskip=18pt +%\normalsize +% \@starttoc{lot}% +% } + +%% Handle table and figure captions somewhat differently; put +%% in line numbers when in draft mode, change font size for draft mode. + +%\def\appendcaption#1#2{\ifdraft +%\ifx\@captype\xtable +%\@makecaption{Table #1}{#2} +% \addcontentsline{\csname ext@table\endcsname}{table}% +% {\protect\numberline{#1}{\ignorespaces #2}}% +%\else +%\@makecaption{Fig. #1}{#2} +% \addcontentsline{\csname ext@figure\endcsname}{figure}% +% {\protect\numberline{#1}{\ignorespaces #2}}% +%\fi +%\else +%\caption{#2} +%\fi +%} + + +\def\xtable{table} +\long\def\@makecaption#1#2{% +\ifx\@captype\xtable \vskip4pt\else \vskip\abovecaptionskip\fi + \sbox\@tempboxa{\ifdraft\normaltextsize\else\footnotesize\fi #1. #2}% + \ifdim \wd\@tempboxa >\hsize +%% +\global\setbox0\vbox{ +\ifdraft\normaltextsize\internallinenumbers\baselineskip=20pt\else \footnotesize\fi +#1. #2 +} +\ifdim\ht0<24pt +\setbox1=\vbox{\unvbox0 +\global\setbox2=\lastbox} +\copy1 +\vskip-6pt +\centerline{\hbox{\unhbox2}} +\par +\else +\ifdraft\normaltextsize\else\footnotesize\fi +\ifdraft\internallinenumbers\baselineskip=20pt\fi +\hskip10pt #1. #2\par +\fi + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi +\ifx\@captype\xtable + \vskip\belowcaptionskip\fi} + + + +%% make section heads end with a period. +\def\@seccntformat#1{\csname the#1\endcsname} + +\def\acknowledgments{\paragraph*{Acknowledgments.}} +\def\acknowledgment{\paragraph*{Acknowledgment.}} + +\def\datastatement{\paragraph*{Data availability statement.}} + +\def\capsule{\paragraph*{\rm CAPSULE:}} +\def\statement{\paragraph*{\rm SIGNIFICANCE STATEMENT:}} + +%% tables, to make correct space around the horizontal lines at the +%% top, underneath the column headers, and at the bottom of the table. +\def\topline{\hline\hline\vrule height 10pt depth4pt width0pt\relax} +\def\midline{\hline\vrule height 10pt width0pt\relax} +\def\botline{\hline} + + +%% Allow two 1 col width tables or 1 col width figures to +%% be side by side in a two-column width illustration or table. + +\def\sidebyside#1#2{\hbox to\textwidth{% +\vbox{\hsize=.5\textwidth\advance\hsize -6pt #1}\hfill +\vbox{\let\internallinenumbers\relax\hsize=.5\textwidth\advance\hsize -6pt #2}}} + +%% Make tabular default fontsize be footnotesize. +\let\savetabular\tabular +\def\tabular{\footnotesize\baselineskip=12pt\savetabular} + +\@namedef{tabular*}#1{\def\@halignto{to#1} +\footnotesize\baselineskip12pt\@tabular} + +%%% The following commands are used for draft mode when +%%% figures and tables are sent to the end of the paper. +%%% These terms help format the list of tables and list of figures nicely. + + +\def\fignumberline#1#2{\bgroup +\normaltextsize\parindent=0pt\leftskip=42pt\noindent\hskip-42pt\hbox to 42pt{\bf Fig.~#1.\hfill}% +\advance\hsize -42pt +#2\xdotfill\currpage\hbox to -44pt{}\vskip1sp\egroup} + +\def\tabnumberline#1#2{\bgroup +\normaltextsize\parindent=0pt\leftskip=50pt\noindent\hskip-50pt\hbox to 50pt{\bf Table~#1.\hfill}% +\advance\hsize -88pt +#2\xdotfill\currpage\hbox to -50pt{}\vskip1sp\egroup} + + +\def\l@figure#1#2{% +\let\numberline\fignumberline +\def\currpage{#2}#1\vskip12pt} + +\def\l@table#1#2{% +\let\numberline\tabnumberline +\def\currpage{#2}#1\vskip12pt} + +%% Make meaning different depending on whether in draft or twocol mode. +\def\thanks#1{ + \protected@xdef\@thanks{\@thanks + \protect\footnotetext[\the\c@footnote]{% +\ifdraft\noexpand\internallinenumbers\fi#1}}% +} + +%% Wider space between dots than standard \dotfill +\def\xdotfill{% + \leavevmode + \cleaders \hb@xt@ 1.5em{\hss.\hss}\hfill + \kern\z@} + + + +\ifdraft +%%% only needed if line numbers are activated + +%%% from Brian Papa, ametsoc.sty + +% The following section defines a new command that helps to resolve the issue of missing line numbers preceding some +% equations when using various math display environments +% +\newcommand*\patchAmsMathEnvironmentForLineno[1]{% + \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname + \expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname + \renewenvironment{#1}% + {\linenomath\csname old#1\endcsname}% + {\csname oldend#1\endcsname\endlinenomath}}% +\newcommand*\patchBothAmsMathEnvironmentsForLineno[1]{% + \patchAmsMathEnvironmentForLineno{#1}% + \patchAmsMathEnvironmentForLineno{#1*}}% +\AtBeginDocument{% +\patchBothAmsMathEnvironmentsForLineno{equation}% +\patchBothAmsMathEnvironmentsForLineno{align}% +\patchBothAmsMathEnvironmentsForLineno{flalign}% +\patchBothAmsMathEnvironmentsForLineno{alignat}% +\patchBothAmsMathEnvironmentsForLineno{gather}% +\patchBothAmsMathEnvironmentsForLineno{multline}% +\patchBothAmsMathEnvironmentsForLineno{eqnarray}% +} +\fi + +%%%%%%%%%%%% +%% Appendix + +\newif\iffirstappendix +\newenvironment{appendix}[1][1]% +{\vskip12pt\goodbreak +\ifthenelse{\equal{#1}{1}}% +{\renewcommand\theequation{A\arabic{equation}}% +\setcounter{equation}{0}% reset counter +%\ifdraft\else +\setcounter{figure}{0}% reset counter +\setcounter{table}{0}% reset counter +\renewcommand\thefigure{A\arabic{figure}} +\renewcommand\thetable{A\arabic{table}} +%\fi +\setcounter{section}{0}% reset counter +\setcounter{subsection}{0}% reset counter +\renewcommand\thesection{A\arabic{section}} +\begin{center}% +{\textnormal APPENDIX}% +\end{center}}% +{\renewcommand\theequation{{#1}\arabic{equation}}% +\setcounter{equation}{0}% reset counter +\setcounter{section}{0}% reset counter +\setcounter{subsection}{0}% reset counter +\setcounter{figure}{0}% reset counter +\setcounter{table}{0}% reset counter +%\ifdraft\else +\renewcommand\thefigure{#1\arabic{figure}} +\renewcommand\thetable{#1\arabic{table}} +%\fi +\renewcommand\thesection{#1\arabic{section}} +\begin{center}% +{\textnormal APPENDIX #1}% +\end{center}} +}% + + + + +\long\def\appendixtitle#1{{\vskip-1pt\centering\bf #1\vskip6pt}} + +\bibpunct{(}{)}{;}{a}{}{,} + +\endinput diff --git a/inst/rmarkdown/templates/ams/skeleton/ametsocV6.bst b/inst/rmarkdown/templates/ams/skeleton/ametsocV6.bst new file mode 100644 index 000000000..3ff759c17 --- /dev/null +++ b/inst/rmarkdown/templates/ams/skeleton/ametsocV6.bst @@ -0,0 +1,1745 @@ +%% Updated 12 July 2023 +%% +%% This is file `ametsocV6.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% merlin.mbs (with options: `ay,nat,nm-rev1,jnrlst,nmlm,x8,m1,keyxyr,dt-beg,yr-com,yrp-col,note-yr,thtit-a,vol-2bf,vnum-sp,volp-com,pgsep-s,num-xser,numser,ser-vol,bkpg-x,pg-bk,pre-edn,agu-doi,doi,edparc,bkedcap,edby,edbyy,blk-tit,in-x,pp,ed,abr,ednx,ord,jabr,eprint,url,url-nt,em-it,nfss,') +%% ---------------------------------------- +%% *** Bibliography style for all AMS Journals and BAMS *** +%% +%% Copyright 1994-2005 Patrick W Daly +%% Updated 2021, 2023 Nicole Rietmann + % =============================================================== + % IMPORTANT NOTICE: + % This bibliographic style (bst) file has been generated from one or + % more master bibliographic style (mbs) files, listed above. + % + % This generated file can be redistributed and/or modified under the terms + % of the LaTeX Project Public License Distributed from CTAN + % archives in directory macros/latex/base/lppl.txt; either + % version 1 of the License, or any later version. + % =============================================================== + % Name and version information of the main mbs file: + % \ProvidesFile{merlin.mbs}[2005/10/17 4.14 (PWD, AO, DPC)] + % For use with BibTeX version 0.99a or later + %------------------------------------------------------------------- + % This bibliography style file is intended for texts in ENGLISH + % This is an author-year citation style bibliography. As such, it is + % non-standard LaTeX, and requires a special package file to function properly. + % Such a package is natbib.sty by Patrick W. Daly + % The form of the \bibitem entries is + % \bibitem[Jones et al.(1990)]{key}... + % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}... + % The essential feature is that the label (the part in brackets) consists + % of the author names, as they should appear in the citation, with the year + % in parentheses following. There must be no space before the opening + % parenthesis! + % With natbib v5.3, a full list of authors may also follow the year. + % In natbib.sty, it is possible to define the type of enclosures that is + % really wanted (brackets or parentheses), but in either case, there must + % be parentheses in the label. + % The \cite command functions as follows: + % \citet{key} ==>> Jones et al. (1990) + % \citet*{key} ==>> Jones, Baker, and Smith (1990) + % \citep{key} ==>> (Jones et al. 1990) + % \citep*{key} ==>> (Jones, Baker, and Smith, 1990) + % \citep[chap. 2]{key} ==>> (Jones et al. 1990, chap. 2) + % \citep[e.g.,][]{key} ==>> (e.g., Jones et al. 1990) + % \citep[e.g.,][p. 32]{key} ==>> (e.g., Jones et al., p. 32) + % \citeauthor{key} ==>> Jones et al. + % \citeauthor*{key} ==>> Jones, Baker, and Smith + % \citeyear{key} ==>> 1990 + %--------------------------------------------------------------------- + +ENTRY + { address + archive + author + booktitle + chapter + doi + edition + editor + eid + eprint + howpublished + department + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + type + url + volume + year + } + {} + { label extra.label sort.label short.list } +INTEGERS { output.state before.all mid.sentence after.sentence after.block } +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := +} +STRINGS { s t} +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {date.block} +{ + ":" * + add.blank +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\textit{" swap$ * "}" * } + if$ +} +FUNCTION {bolden} +{ duplicate$ empty$ + { pop$ "" } + { "\textbf{" swap$ * "}" * } + if$ +} +FUNCTION {tie.or.space.prefix} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ +} + +FUNCTION {capitalize} +{ "u" change.case$ "t" change.case$ } + +FUNCTION {space.word} +{ " " swap$ * " " * } + % Here are the language-specific definitions for explicit words. + % Each function has a name bbl.xxx where xxx is the English word. + % The language selected here is ENGLISH +FUNCTION {bbl.and} +{ "and"} + +FUNCTION {bbl.cand} +{ ", and"} + +FUNCTION {bbl.etal} +{ "et~al." } + +FUNCTION {bbl.editors} +{ "Eds." } + +FUNCTION {bbl.editor} +{ "Ed." } + +FUNCTION {bbl.edby} +{ "edited by" } + +FUNCTION {bbl.edition} +{ "ed." } + +FUNCTION {bbl.volume} +{ "Vol." } + +FUNCTION {bbl.of} +{ "of" } + +FUNCTION {bbl.number} +{ "No." } + +FUNCTION {bbl.nr} +{ "No." } + +FUNCTION {bbl.in} +{ "in" } + +FUNCTION {bbl.pages} +{ "pp." } + +FUNCTION {bbl.page} +{ "p." } + +FUNCTION {bbl.chapter} +{ "chap." } + +FUNCTION {bbl.techrep} +{ "Tech. Rep." } + +FUNCTION {bbl.mthesis} +{ "M.S. thesis" } + +FUNCTION {bbl.phdthesis} +{ "Ph.D. thesis" } + +FUNCTION {bbl.first} +{ "1st" } + +FUNCTION {bbl.second} +{ "2nd" } + +FUNCTION {bbl.third} +{ "3rd" } + +FUNCTION {bbl.fourth} +{ "4th" } + +FUNCTION {bbl.fifth} +{ "5th" } + +FUNCTION {bbl.st} +{ "st" } + +FUNCTION {bbl.nd} +{ "nd" } + +FUNCTION {bbl.rd} +{ "rd" } + +FUNCTION {bbl.th} +{ "th" } + +MACRO {jan} {"Jan."} + +MACRO {feb} {"Feb."} + +MACRO {mar} {"Mar."} + +MACRO {apr} {"Apr."} + +MACRO {may} {"May"} + +MACRO {jun} {"Jun."} + +MACRO {jul} {"Jul."} + +MACRO {aug} {"Aug."} + +MACRO {sep} {"Sep."} + +MACRO {oct} {"Oct."} + +MACRO {nov} {"Nov."} + +MACRO {dec} {"Dec."} + +FUNCTION {eng.ord} +{ duplicate$ "1" swap$ * + #-2 #1 substring$ "1" = + { bbl.th * } + { duplicate$ #-1 #1 substring$ + duplicate$ "1" = + { pop$ bbl.st * } + { duplicate$ "2" = + { pop$ bbl.nd * } + { "3" = + { bbl.rd * } + { bbl.th * } + if$ + } + if$ + } + if$ + } + if$ +} + +MACRO {acmcs} {"ACM Comput. Surv."} + +MACRO {acta} {"Acta Inf."} + +MACRO {cacm} {"Commun. ACM"} + +MACRO {ibmjrd} {"IBM J. Res. Dev."} + +MACRO {ibmsj} {"IBM Syst.~J."} + +MACRO {ieeese} {"IEEE Trans. Software Eng."} + +MACRO {ieeetc} {"IEEE Trans. Comput."} + +MACRO {ieeetcad} + {"IEEE Trans. Comput. Aid. Des."} + +MACRO {ipl} {"Inf. Process. Lett."} + +MACRO {jacm} {"J.~ACM"} + +MACRO {jcss} {"J.~Comput. Syst. Sci."} + +MACRO {scp} {"Sci. Comput. Program."} + +MACRO {sicomp} {"SIAM J. Comput."} + +MACRO {tocs} {"ACM Trans. Comput. Syst."} + +MACRO {tods} {"ACM Trans. Database Syst."} + +MACRO {tog} {"ACM Trans. Graphic."} + +MACRO {toms} {"ACM Trans. Math. Software"} + +MACRO {toois} {"ACM Trans. Office Inf. Syst."} + +MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} + +MACRO {tcs} {"Theor. Comput. Sci."} + +FUNCTION {bibinfo.check} +{ swap$ + duplicate$ missing$ + { + pop$ pop$ + "" + } + { duplicate$ empty$ + { + swap$ pop$ + } + { swap$ + pop$ + } + if$ + } + if$ +} +FUNCTION {bibinfo.warn} +{ swap$ + duplicate$ missing$ + { + swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ + "" + } + { duplicate$ empty$ + { + swap$ "empty " swap$ * " in " * cite$ * warning$ + } + { swap$ + pop$ + } + if$ + } + if$ +} +FUNCTION {format.eprint} +{ eprint duplicate$ empty$ + 'skip$ + { "\eprint" + archive empty$ + 'skip$ + { "[" * archive * "]" * } + if$ + "{" * swap$ * "}" * + } + if$ +} +STRINGS { bibinfo} +INTEGERS { nameptr namesleft numnames } + +FUNCTION {format.names} +{ 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + duplicate$ #1 > + { "{f.~}{vv~}{ll}{, jj}" } + { "{vv~}{ll}{, f.}{, jj}" } + if$ + format.name$ + bibinfo bibinfo.check + 't := + nameptr #1 > + { + nameptr #1 + #1 + = + numnames #8 + > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + { ", and Coauthors" * } + { ", and " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ +} +FUNCTION {format.names.ed} +{ + 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{f.~}{vv~}{ll}{, jj}" + format.name$ + bibinfo bibinfo.check + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { t "others" = + { " et~al." * } + { ", and " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ +} +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ +} + +FUNCTION {format.authors} +{ author "author" format.names +} +FUNCTION {get.bbl.editor} +{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } + +FUNCTION {format.editors} +{ editor "editor" format.names duplicate$ empty$ 'skip$ + { + "," * + " " * + get.bbl.editor + capitalize + % " " swap$ * "," * + * + } + if$ +} +FUNCTION {format.conf.pages} +{ pages "pages" bibinfo.check} + +FUNCTION {format.book.pages} +{ pages "pages" bibinfo.check + duplicate$ empty$ 'skip$ + { " " * bbl.pages * } + if$ +} +FUNCTION {format.doi} +{ doi "doi" bibinfo.check + duplicate$ empty$ 'skip$ + { + "\doi{" swap$ * "}" * + } + if$ +} +FUNCTION {format.note} +{ + url empty$ + 'skip$ + { "\urlprefix\url{" url * "}" * output } + if$ + note empty$ + { "" } + { note #1 #1 substring$ + duplicate$ "{" = + 'skip$ + { output.state mid.sentence = + { "l" } + { "u" } + if$ + change.case$ + } + if$ + note #2 global.max$ substring$ * "note" bibinfo.check + } + if$ +} + +FUNCTION {format.title} +{ title + duplicate$ empty$ 'skip$ + { "t" change.case$ } + if$ + "title" bibinfo.check +} +FUNCTION {format.full.names} +{'s := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}" format.name$ + 't := + nameptr #1 > + { + nameptr #1 + #1 + = + numnames #8 + > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { + numnames #2 > + { "," * } + 'skip$ + if$ + ", and " + * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {author.editor.key.full} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {author.key.full} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {editor.key.full} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ +} + +FUNCTION {make.full.names} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.full + { type$ "proceedings" = + 'editor.key.full + 'author.key.full + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem[{" write$ + label write$ + ")" make.full.names duplicate$ short.list = + { pop$ } + { * } + if$ + "}]{" * write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {if.digit} +{ duplicate$ "0" = + swap$ duplicate$ "1" = + swap$ duplicate$ "2" = + swap$ duplicate$ "3" = + swap$ duplicate$ "4" = + swap$ duplicate$ "5" = + swap$ duplicate$ "6" = + swap$ duplicate$ "7" = + swap$ duplicate$ "8" = + swap$ "9" = or or or or or or or or or +} +FUNCTION {n.separate} +{ 't := + "" + #0 'numnames := + { t empty$ not } + { t #-1 #1 substring$ if.digit + { numnames #1 + 'numnames := } + { #0 'numnames := } + if$ + t #-1 #1 substring$ swap$ * + t #-2 global.max$ substring$ 't := + numnames #5 = + { duplicate$ #1 #2 substring$ swap$ + #3 global.max$ substring$ + "\," swap$ * * + } + 'skip$ + if$ + } + while$ +} +FUNCTION {n.dashify} +{ + n.separate + 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ "" } + +FUNCTION {format.date} +{ year "year" bibinfo.check duplicate$ empty$ + { + "empty year in " cite$ * "; set to ????" * warning$ + pop$ "????" + } + 'skip$ + if$ + extra.label * + before.all 'output.state := + ", " swap$ * +} +FUNCTION {format.btitle} +{ title "title" bibinfo.check + duplicate$ empty$ 'skip$ + { + emphasize + } + if$ +} +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.volume volume tie.or.space.prefix + "volume" bibinfo.check * * + series "series" bibinfo.check + duplicate$ empty$ 'pop$ +%%% NO ITALIC SERIES { emphasize ", " * swap$ * } + {", " * swap$ * } + if$ + "volume and number" number either.or.check + } + if$ +} +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { number "number" bibinfo.check } + { output.state mid.sentence = + { bbl.number } + { bbl.number capitalize } + if$ + number tie.or.space.prefix "number" bibinfo.check * * + "," * " " * + series "series" bibinfo.check * + } + if$ + } + if$ + } + { "" } + if$ +} +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + +FUNCTION {convert.edition} +{ extract.num "l" change.case$ 's := + s "first" = s "1" = or + { bbl.first 't := } + { s "second" = s "2" = or + { bbl.second 't := } + { s "third" = s "3" = or + { bbl.third 't := } + { s "fourth" = s "4" = or + { bbl.fourth 't := } + { s "fifth" = s "5" = or + { bbl.fifth 't := } + { s #1 #1 substring$ is.num + { s eng.ord 't := } + { edition 't := } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + t +} + +FUNCTION {format.edition} +{ edition duplicate$ empty$ 'skip$ + { + convert.edition + output.state mid.sentence = + { "l" } + { "t" } + if$ change.case$ + "edition" bibinfo.check + " " * bbl.edition * + } + if$ +} +INTEGERS { multiresult } +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} +FUNCTION {format.pages} +{ pages duplicate$ empty$ 'skip$ + { duplicate$ multi.page.check + { + n.dashify + } + { + } + if$ + "pages" bibinfo.check + } + if$ +} +FUNCTION {format.journal.pages} +{ pages duplicate$ empty$ 'pop$ + { swap$ duplicate$ empty$ + { pop$ pop$ format.pages } + { + ", " * + swap$ + n.dashify + "pages" bibinfo.check + * + } + if$ + } + if$ +} +FUNCTION {format.journal.eid} +{ eid "eid" bibinfo.check + duplicate$ empty$ 'pop$ + { swap$ duplicate$ empty$ 'skip$ + { + ", " * + } + if$ + swap$ * + } + if$ +} +FUNCTION {format.vol.num.pages} +{ volume field.or.null + duplicate$ empty$ 'skip$ + { + "volume" bibinfo.check + } + if$ + number "number" bibinfo.check duplicate$ empty$ 'skip$ + { + swap$ duplicate$ empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + swap$ + "~(" swap$ * ")" * + } + if$ * + bolden + eid empty$ + { format.journal.pages } + { format.journal.eid } + if$ +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + 'format.pages + { type empty$ + { bbl.chapter } + { type "l" change.case$ + "type" bibinfo.check + } + if$ + chapter tie.or.space.prefix + "chapter" bibinfo.check + * * + pages empty$ + 'skip$ + { ", " * format.pages * } + if$ + } + if$ +} + +FUNCTION {format.booktitle} +{ + booktitle "booktitle" bibinfo.check + emphasize +} +FUNCTION {format.bktitle} +{ + booktitle "booktitle" bibinfo.check +} +FUNCTION {format.in.ed.booktitle} +{ format.booktitle duplicate$ empty$ 'skip$ + { + editor "editor" format.names.ed duplicate$ empty$ 'pop$ + { + get.bbl.editor + swap$ "," * + " " * swap$ * + swap$ + "," * + " " * swap$ + * } + if$ + word.in swap$ * + } + if$ +} +FUNCTION {format.thesis.type} +{ type duplicate$ empty$ + 'pop$ + { swap$ pop$ + "t" change.case$ "type" bibinfo.check + } + if$ +} +FUNCTION {format.tr.number} +{ number "number" bibinfo.check + type duplicate$ empty$ + { pop$ bbl.techrep } + 'skip$ + if$ + "type" bibinfo.check + swap$ duplicate$ empty$ + { pop$ "t" change.case$ } + { tie.or.space.prefix * * } + if$ +} +FUNCTION {format.article.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.book.crossref} +{ volume duplicate$ empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + pop$ word.in + } + { bbl.volume + capitalize + swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * + } + if$ + " \cite{" * crossref * "}" * +} +FUNCTION {format.incoll.inproc.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.org.or.pub} +{ 't := + "" + address empty$ t empty$ and + 'skip$ + { + t empty$ + { address "address" bibinfo.check * + } + { t * + address empty$ + 'skip$ + { ", " * address "address" bibinfo.check * } + if$ + } + if$ + } + if$ +} +FUNCTION {format.publisher.address} +{ publisher "publisher" bibinfo.warn format.org.or.pub +} + +FUNCTION {format.organization.address} +{ format.org.or.pub organization "organization" bibinfo.check +} + +FUNCTION {article} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.title "title" output.check + new.sentence + crossref missing$ + { + journal + "journal" bibinfo.check + emphasize + "journal" output.check + format.vol.num.pages output + format.doi output + } + { format.article.crossref output.nonnull + format.pages output + } + if$ +% format.note output + format.eprint output + fin.entry +} +FUNCTION {book} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check + editor format.key output + %add.blank + } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + format.date "year" output.check + date.block + format.btitle "title" output.check + crossref missing$ + { format.bvolume output + new.sentence + format.edition output + format.number.series output + format.publisher.address output + } + { + new.sentence + format.book.crossref output.nonnull + } + if$ + format.book.pages output + format.doi output + format.note output + format.eprint output + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + format.authors output + author format.key output + format.date "year" output.check + date.block + format.title "title" output.check + new.sentence + howpublished "howpublished" bibinfo.check output + address "address" bibinfo.check output + format.book.pages output + format.doi output + format.note output + format.eprint output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check + editor format.key output + } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + format.date "year" output.check + date.block + format.btitle "title" output.check + crossref missing$ + { + format.bvolume output + format.chapter.pages "chapter and pages" output.check + new.sentence + format.edition output + format.number.series output + format.publisher.address output + } + { + format.chapter.pages "chapter and pages" output.check + new.sentence + format.book.crossref output.nonnull + } + if$ + format.doi output + format.note output + format.eprint output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.title "title" output.check + new.sentence + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output + format.edition output + format.publisher.address output + format.chapter.pages output + } + { format.incoll.inproc.crossref output.nonnull + format.chapter.pages output + } + if$ + format.doi output + format.note output + format.eprint output + fin.entry +} +FUNCTION {inproceedings} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.title "title" output.check + new.sentence + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + + publisher empty$ + { format.organization.address output } + { format.publisher.address output + organization "organization" bibinfo.check output + + } + if$ + format.bvolume output + howpublished "howpublished" bibinfo.check output + format.pages output + format.number.series output + } + { format.incoll.inproc.crossref output.nonnull + format.pages output + } + if$ + format.doi output + format.note output + format.eprint output + fin.entry +} +FUNCTION {conference} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.title "title" output.check + new.sentence + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + + publisher empty$ + { format.organization.address output } + { format.publisher.address output + organization "organization" bibinfo.check output + } + if$ + format.bvolume output + howpublished "howpublished" bibinfo.check output + format.conf.pages output + format.number.series output + } + { format.incoll.inproc.crossref output.nonnull + format.conf.pages output + } + if$ + format.doi output + format.note output + format.eprint output + fin.entry +} +FUNCTION {manual} +{ output.bibitem + format.authors output + author format.key output + format.date "year" output.check + date.block + format.btitle "title" output.check + new.sentence + address "address" bibinfo.check output + organization "organization" bibinfo.check output + format.edition output + format.doi output + format.note output + format.eprint output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.title + "title" output.check + new.sentence + bbl.mthesis format.thesis.type output.nonnull + department "department" bibinfo.warn output + school "school" bibinfo.warn output + format.book.pages output + address "address" bibinfo.check output + format.doi output + format.note output + format.eprint output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + author format.key output + format.date "year" output.check + date.block + format.number.series output + new.sentence + format.title output + new.sentence + format.publisher.address output + format.note output + format.book.pages output + howpublished "howpublished" bibinfo.check output + format.doi output + format.eprint output + fin.entry +} + +FUNCTION {atlas} +{ output.bibitem + format.authors output "author" output.check + author format.key output + format.date "year" output.check + date.block + format.number.series output + new.sentence + format.btitle "title" output.check + format.publisher.address output + format.note output +% format.book.pages output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.title + "title" output.check + new.sentence + bbl.phdthesis format.thesis.type output.nonnull + school "school" bibinfo.warn output + format.book.pages output + address "address" bibinfo.check output + format.doi output + format.note output + format.eprint output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + format.editors output + editor format.key output + format.date "year" output.check + date.block + format.btitle "title" output.check + format.bvolume output + format.number.series output + publisher empty$ + { format.organization.address output } + { organization "organization" bibinfo.check output + format.publisher.address output + } + if$ + format.doi output + format.note output + format.eprint output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.title + "title" output.check + new.sentence + format.tr.number output.nonnull + howpublished "howpublished" bibinfo.check output + institution "institution" bibinfo.warn output +address "address" bibinfo.check output + format.book.pages output + new.sentence + format.doi output + format.note output + format.eprint output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.title "title" output.check + format.doi output + format.note "note" output.check + format.eprint output + fin.entry +} + +FUNCTION {default.type} { misc } +READ +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} +INTEGERS { len } +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} +FUNCTION {format.lab.names} +{ 's := + "" 't := + s #1 "{vv~}{ll}" format.name$ + s num.names$ duplicate$ + #2 > + { pop$ + " " * bbl.etal * + } + { #2 < + 'skip$ + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { + " " * bbl.etal * + } + { bbl.and space.word * s #2 "{vv~}{ll}" format.name$ + * } + if$ + } + if$ + } + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.label} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.short.authors} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.label + 'author.key.label + if$ + } + if$ + 'short.list := +} + +FUNCTION {calc.label} +{ calc.short.authors + short.list + "(" + * + year duplicate$ empty$ + short.list key field.or.null = or + { pop$ "" } + 'skip$ + if$ + * + 'label := +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" + format.name$ 't := + nameptr #1 > + { + nameptr #1 + #1 + = + numnames #8 + > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + " " * + namesleft #1 = t "others" = and + { "zzzzz" * } + { t sortify * } + if$ + } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {editor.sort} +{ editor empty$ + { key empty$ + { "to sort, need editor or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ +} +FUNCTION {presort} +{ calc.label + label sortify + " " + * + type$ "book" = + type$ "inbook" = + or + 'author.editor.sort + { type$ "proceedings" = + 'editor.sort + 'author.sort + if$ + } + if$ + #1 entry.max$ substring$ + 'sort.label := + sort.label + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} +SORT +STRINGS { last.label next.extra } +INTEGERS { last.extra.num number.label } +FUNCTION {initialize.extra.label.stuff} +{ #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'last.extra.num := + #0 'number.label := +} +FUNCTION {forward.pass} +{ last.label label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + label 'last.label := + } + if$ + number.label #1 + 'number.label := +} +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + extra.label 'next.extra := + extra.label + duplicate$ empty$ + 'skip$ + { "{\natexlab{" swap$ * "}}" * } + if$ + 'extra.label := + label extra.label * 'label := +} +EXECUTE {initialize.extra.label.stuff} +ITERATE {forward.pass} +REVERSE {reverse.pass} +FUNCTION {bib.sort.order} +{ sort.label + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} +ITERATE {bib.sort.order} +SORT +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" number.label int.to.str$ * "}" * + write$ newline$ + "\providecommand{\natexlab}[1]{#1}" + write$ newline$ + "\providecommand{\url}[1]{\texttt{#1}}" + write$ newline$ + "\renewcommand{\UrlFont}{\rmfamily}" + write$ newline$ + "\providecommand{\urlprefix}{URL }" + write$ newline$ + "\expandafter\ifx\csname urlstyle\endcsname\relax" + write$ newline$ + " \providecommand{\doi}[1]{https://doi.org/\discretionary{}{}{}#1}\else" + write$ newline$ + " \providecommand{\doi}{https://doi.org/\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi" + write$ newline$ + "\providecommand{\eprint}[2][]{\url{#2}}" + write$ newline$ +} +EXECUTE {begin.bib} +EXECUTE {init.state.consts} +ITERATE {call.type$} +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} +EXECUTE {end.bib} +%% End of customized bst file +%% +%% End of file `ametsoc_V2.bst'. diff --git a/inst/rmarkdown/templates/ams/skeleton/amstest.bib b/inst/rmarkdown/templates/ams/skeleton/amstest.bib deleted file mode 100644 index 40cc7e4d4..000000000 --- a/inst/rmarkdown/templates/ams/skeleton/amstest.bib +++ /dev/null @@ -1,436 +0,0 @@ -%% -% JOURNAL ABBREVIATIONS -% -@STRING{AMS = "Amer.\ Meteor.\ Soc."} -@STRING{AGU = "Amer.\ Geophys.\ Union"} -@STRING{AIP = "Amer. Inst. Phys."} -@STRING{ADGEO = "Adv.\ Geosci."} -@STRING{AFM = "Agric.\ For.\ Meteor."} -@STRING{AM = "Ann.\ Meteor."} -@STRING{AN = "Astrophys.\ Norv."} % Astrophysica Norvegica -@STRING{AO = "Atmos.--Ocean"} % Atmosphere--Ocean, published by Canadian Meteorological Society (CMOS) -@STRING{AR = "Atmos.\ Res."} % Atmospheric Research -@STRING{ARFM = "Annu.\ Rev.\ Fluid Mech."} -@STRING{AUMET = "Aust.\ Meteor.\ Mag."} -@STRING{BAMS = "Bull.\ Amer.\ Meteor.\ Soc."} -@STRING{CAP = "Contrib.\ Atmos.\ Phys."} -@STRING{CC = "Climate Change"} % Climate Change -@STRING{CCH = "Climatic Change"} % Climatic Change -@STRING{CDYN = "Climate Dyn."} -@STRING{CHAOS = "Chaos"} -@STRING{COL = "Collier's"} -@STRING{CRS = "Cont.\ Shelf Res."} -@STRING{DAO = "Dyn.\ Atmos.\ Oceans"} -@STRING{ECO = "Ecology"} -@STRING{EI = "Earth Interact."} -@STRING{GA = "Geophysica"} % Geophysica, published by Geophysical Society of Finland -@STRING{GEOMAG = "Geophys.\ Mag."} -@STRING{GN = "Geophys.\ Norv."} % Geophysica Norvegica -@STRING{GRL = "Geophys.\ Res.\ Lett."} -@STRING{GEOINT = "Geofis.\ Int."} % Geofisica Internacional (Mexican journal -- vols. 3--5 contained proceedings from a hurricane conference -@STRING{GEOPUB = "Geofys.\ Publ."} -@STRING{GPC = "Global Planet.\ Change"} -@STRING{HP = "Health Phys."} -@STRING{IAOP = "Izv.\ Atmos.\ Ocean.\ Phys.\ (Engl.\ Transl.)"} -@STRING{IJC = "Int.\ J.\ Climatol."} -@STRING{JAM = "J.\ Appl.\ Meteor."} % renamed to name below in 2006 -@STRING{JAMC = "J.\ Appl.\ Meteor.\ Climatol."} % Journal of Applied Meteorology and Climatology (this journal used to be called the Journal of Applied Meteorology before 2006) -@STRING{JAS = "J.\ Atmos.\ Sci."} -@STRING{JAOT = "J.\ Atmos.\ Oceanic Technol."} -@STRING{JCAM = "J.\ Climate Appl.\ Meteor."} % from 1983--87, now JAMC -@STRING{JCLI = "J.\ Climate"} -@STRING{JCR = "J.\ Coastal Res."} -@STRING{JFM = "J.\ Fluid\ Mech."} -@STRING{JEM = "J.\ Eng.\ Math."} % Journal of Engineering Mathematics -@STRING{JGR = "J.\ Geophys.\ Res."} -@STRING{JHM = "J.\ Hydrometeor."} -@STRING{JMS = "J.\ Mar.\ Syst."} -@STRING{JM = "J.\ Meteor."} -@STRING{JMR = "J.\ Mar.\ Res."} -@STRING{JMSJ = "J.\ Meteor.\ Soc.\ Japan"} -@STRING{JPO = "J.\ Phys.\ Oceanogr."} -@STRING{JOCEAN = "J.\ Oceanogr."} % Journal of Oceanography -@STRING{JOSJ = "J.\ Oceanogr.\ Soc.\ Japan"} -@STRING{JSE = "J.\ Struct.\ Eng."} % Journal of Structural Engineering at ASCE -@STRING{JTM = "J.\ Tropical Meteor."} -@STRING{JWEIA = "J.\ Wind Eng.\ Ind.\ Aerodyn."} -@STRING{MA = "Meteor.\ Appl."} -@STRING{MAP = "Meteor.\ Atmos.\ Phys."} -@STRING{METMON = "Meteor.\ Monogr."} -@STRING{METZEIT = "Meteor.\ Z."} -@STRING{MWL = "Mar.\ Wea.\ Log"} -@STRING{MWR = "Mon.\ Wea.\ Rev."} -@STRING{NAT = "Nature"} -@STRING{NHR = "Nat.\ Hazards Rev."} -@STRING{NWD = "Natl.\ Weather Dig."} -@STRING{OA = "Oceanol. Aeta"} -@STRING{OCEAN = "Oceanography"} % a quarterly journal of The Oceanography Society -@STRING{PAG = "Pure Appl.\ Geophys."} -@STRING{PF = "Phys.\ Fluids"} -@STRING{PHYSD = "Physica D"} -@STRING{PMG = "Pap.\ Meteor.\ Geophys."} % Papers in Meteorology and Geophysics -@STRING{PNAS = "Proc.\ Natl.\ Acad.\ Sci.\ (USA)"} -@STRING{PRE = "Phys.\ Rev.\ E"} -@STRING{PRSA = "Proc.\ Roy.\ Soc."} -@STRING{PT = "Phys.\ Today"} -@STRING{PTRS = "Philos.\ Trans.\ Roy.\ Soc.\ London"} -@STRING{QJRMS = "Quart.\ J.\ Roy.\ Meteor.\ Soc."} -@STRING{RGEO = "Rev. Geophys."} -@STRING{SCI = "Science"} -@STRING{SOLA = "SOLA"} % Scientific Online Letters on the Atmosphere -@STRING{TAGU = "Eos, Trans.\ Amer.\ Geophys.\ Union"} -@STRING{TELLUS = "Tellus"} -@STRING{TCFD = "Theor.\ Comput.\ Fluid Dyn."} -@STRING{WEA = "Weather"} -@STRING{WW = "Weatherwise"} -@STRING{WF = "Wea.\ Forecasting"} -@STRING{WMOB = "WMO Bull."} - -%Journal article database entry -@ARTICLE{Hubert_Whitney1971, - AUTHOR = {Hubert, L. F., and Whitney, Jr., L. F.}, - YEAR = {1971}, - TITLE = {Wind estimation from geostationary satellite pictures}, - JOURNAL = MWR, - VOLUME = {99}, - PAGES = {665-672} -} -%Journal article database entry (9+ authors) -@ARTICLE{poe12, - AUTHOR = {C. P{\"{o}}hlker and K. T. Wiedemann and B. Sinha and M. Shiraiwa and S. S. Gunthe and - M. Smith and H. Su and P. Artaxo and Q. Chen and Y. Cheng and W. Elbert and M. K. Gilles and A. L. D. Kilcoyne - and R. C. Moffet and M. Weigand and S. T. Martin and U. P{\"{o}}schl and M. O. Andreae}, - TITLE = {Biogenic Potassium Salt Particles as Seeds for Secondary Organic Aerosol in the {Amazon}}, - JOURNAL = {Science}, - YEAR = {2012}, - VOLUME = 337, - PAGES = {1075--1078} -} -%Journal article database entry with DOI -@ARTICLE{alexander:2002, - AUTHOR = {M. A. Alexander and I. Blad{\'{e}} and M. Newman and J. R. Lanzante and N.-C. Lau and J. D. Scott}, - TITLE = {{T}he Atmospheric Bridge: {T}he Influence of {ENSO} Teleconnections on Air--Sea Interaction over the Global Oceans}, - JOURNAL = {J. Climate}, - YEAR = {2002}, - VOLUME = {15}, - PAGES = {2205-2231}, - DOI = {10.1175/1520-0442(2002)015<2205:tabtio>2.0.co;2} -} -%Journal article database entry with EID and DOI -@ARTICLE {Gershunov2012, - AUTHOR = {A. Gershunov and K. Guirguis}, - YEAR = {2012}, - TITLE = {California heat waves in the present and future}, - JOURNAL = GRL, - VOLUME = {39}, - EID = {L18710}, - DOI = {10.1029/2012GL052979} -} -%Book database entry -@BOOK{Oke1979, - AUTHOR = {T. R. Oke}, - YEAR = 1979, - TITLE = {Boundary Layer Climates}, - PUBLISHER = {Wiley and Sons}, - PAGES = {372} -} -%Book database entry -@BOOK{Chorin_Marsden1993, - AUTHOR = {A. J. Chorin and J. E. Marsden}, - TITLE = {A Mathematical Introduction to Fluid Dynamics}, - YEAR = {1993}, - PUBLISHER = {Springer-Verlag}, - EDITION = {3}, - PAGES = {169} -} -% Chapter in a book database entry -@INCOLLECTION{Kauranne1990, - AUTHOR = {T. Kauranne}, - YEAR = 1990, - TITLE = {An introduction to parallel processing in meteorology}, - BOOKTITLE = {The Dawn of Massively Parallel Processing in Meteorology}, - EDITOR = {G. R. Hoffman and D. K. Maretis}, - PUBLISHER = {Springer-Verlag}, - PAGES = {3-20} -} -%Multivolume book database entry -@BOOK{Courant_Hilbert1953, - AUTHOR = {R. Courant and D. Hilbert}, - YEAR = 1953, - TITLE = {Methods of Mathematical Physics}, - VOLUME = 1, - PUBLISHER = {Wiley-Interscience}, - PAGES = 560 -} -%Multivolume book database entry -@BOOK{Pettersson1956, - AUTHOR = {S. Pettersson}, - YEAR = 1956, - TITLE = {Weather Analysis and Forecasting}, - VOLUME = 2, - SERIES = {Motion and Motion Systems}, - PUBLISHER = {McGraw Hill}, - PAGES = 428 -} - -%Chapter in multivolume book entry -@INCOLLECTION{Tukey1993, -AUTHOR = {J. W. Tukey}, - YEAR = 1993, - TITLE = {The problem of multiple comparisons}, - BOOKTITLE = {{Multiple Comparisons: 1948--1983}}, - EDITOR = {H. I. Braun}, - VOLUME = {VIII}, - SERIES = {\textit{The Collected Works of John W. Tukey}}, - EDITION = {2}, - PUBLISHER = {Chapman Hall}, - PAGES = {1-300}} - - -%Series database entry -@BOOK{Andrews_Holton_Leovoy1987, - AUTHOR = {D. G. Andrews and J. R. Holton and C. B. Leovy}, - YEAR = 1987, - TITLE = {Middle Atmosphere Dynamics}, - SERIES = {International Geophysical Series}, - VOLUME = 40, - PUBLISHER = {Academic Press}, - PAGES = 489 -} -%Chapter of a volume in a series entry -@INCOLLECTION{Hartmann1993, - AUTHOR = {D. L. Hartmann}, - YEAR = 1993, - TITLE = {Radiative effects of clouds on earth's climate}, - BOOKTITLE = {{Aerosol--Cloud--Climate Interactions}}, - EDITOR = {P. V. Hobbs}, - SERIES = {International Geophysics Series}, - VOLUME = {54}, - PUBLISHER = {Academic Press}, - PAGES = {151-173} -} -%Report database entry -@TECHREPORT{Gannon1978, - AUTHOR = {P. T. Gannon}, - YEAR = 1978, - TITLE = {Influences of earth surface and cloud properties in the south {F}lorida sea breeze}, - TYPE = {NOAA Tech. Rep.}, - NUMBER = {ERL402-NHELM2}, - INSTITUTION = {NOAA}, - ADDRESS = {Silver Spring, MD}, - PAGES = 91, - NOTE = {[NTIS PB-297398.]} -} -%Note database entry -@TECHREPORT{Anthes1987, - AUTHOR = {R. A. Anthes and E.-Y. Hsie and Y.-H. Kuo}, - YEAR = 1987, - TITLE = {Description of the {P}enn {S}tate/{NCAR} {M}esoscale {M}odel {V}ersion 4 ({MM4})}, - TYPE = {NCAR Tech. Note}, - NUMBER = {NCAR/TN-282+STR}, - PAGES = 66, - NOTE = {[doi:10.5065/D64B2Z90]} -} -%Memo database entry -@TECHREPORT{Ferber1986, -AUTHOR = {G.~J. Ferber and J.~L. Heffter and R.~R. Draxler and R.~J. Lagomarsino and F.~L. Thomas and R.~N. Dietz}, - YEAR = 1986, - TITLE = {{Cross-Appalachian Tracer Experiment (CAPTEX ‘83) final report}}, - TYPE = {NOAA Tech. Memo.}, - NUMBER = {ERL ARL-142}, - INSTITUTION = {NOAA/Air Resources Laboratory}, - ADDRESS = {Silver Spring, MD}, - PAGES = 60, - NOTE = {[Available online at \url{http://www.arl.noaa.gov/documents/reports/arl-142.pdf}.]} -} -%Memo database entry -@TECHREPORT{Chen1979, - AUTHOR = {T. C. Chen}, - YEAR = 1979, - TITLE = {On the Kinetic Energy of the Divergent and Nondivergent Flow in the Atmosphere}, - TYPE = {Tech. {M}emo to the {N}ational {S}cience {F}oundation}, - HOWPUBLISHED = {Grant GA-161660}, - INSTITUTION = {Iowa State University}, - ADDRESS = {Ames, IA}, - PAGES = 143 -} -%Report database entry -@TECHREPORT{Wentz1990, - AUTHOR = {F. J. Wentz}, - YEAR = 1990, - TITLE = {West Coast Storm Forecasting with {SSM/I}. {V}ol. {I}}, - TYPE = {Final {T}ech. {R}ep.}, - INSTITUTION = {Remote Sensing Systems}, - PAGES = 42, - NOTE = {[Available from Remote Sensing Systems, 1101 College Ave., Suite 220, Santa Rosa, CA 95404.]} -} -%Article in report entry -@INPROCEEDINGS{Shibata2002, -AUTHOR = {A. Shibata}, - YEAR = 2002, - TITLE = {{AMSR/AMSR-E} sea surface wind speed algorithm}, - BOOKTITLE = {{\rm Improving our understanding of climate change: {Observing} our water planet using {AMSR} and {AMSR-E}}}, - PUBLISHER = {{Japan Aerospace Exploration Agency EORC Bull./Tech. Rep.}}, - PAGES = {45-46}, - NOTE = {[Available online at \url{http://sharaku.eorc.jaxa.jp/AMSR/doc/alg/8_alg.pdf}.]} -} -%Preprints database entry -@INPROCEEDINGS{Lhermitte_Gilet1976, - AUTHOR = {R. Lhermitte and M. Gilet}, - YEAR = 1976, - TITLE = {Aquisition and Processing of Tri-{D}oppler Radar Data}, - BOOKTITLE = {{\rm Preprints,} 17th Conf.\ on Radar Meteorology}, - ADDRESS = {Seattle, WA}, - ORGANIZATION = AMS, - PAGES = {1-6}, -} -%Proceeding database entry -@INPROCEEDINGS{Liu2006, -AUTHOR = {Y. Liu and V. Bringi and M. Maki}, - YEAR = 2006, - TITLE = {Improved rain attenuation correction algorithms for radar reflectivity and differential reflectivity with adaptation to drop shape model variation}, - BOOKTITLE = {Proc. IEEE Int. Conf. on Geoscience and Remote Sensing Symp. 2006}, - ADDRESS = {Denver, CO}, - ORGANIZATION = {Institute of Electrical and Electronics Engineers}, - PAGES = {1910-1913} -} -%Extended Abastracts database entry -@INPROCEEDINGS{FukutaEA1984, - AUTHOR = {N. Fukuta and H. S. Chang and J. L. Sutherland and D. A. Griffith}, - YEAR = 1984, - TITLE = {Comparative Airborne Tests of Vapor-Activated Methaldehyde and Silver Iodide Particles in Supercooled Stratus Clouds}, - BOOKTITLE = {Extended Abstracts, Ninth Conf. on Weather Modification}, - ADDRESS = {Park City, UT}, - ORGANIZATION = AMS, - PAGES = {6-7} -} -%Conference Preprints/Proceedings/Extended Abstracts online database entry -@CONFERENCE{Kuji_Nakajima2002, -AUTHOR = {M. Kuji and T. Nakajima}, - YEAR = 2002, - TITLE = {Retrieval of cloud geometrical parameters using remote sensing data}, - BOOKTITLE = {11th Conf. on Cloud Physics}, - ADDRESS = {Ogden, UT}, - ORGANIZATION = {Amer. Meteor. Soc.}, - PAGES = {JP1.7}, - NOTE = {[Available online at \url{http://ams.confex.com/ams/pdfpapers/39550.pdf}.]} -} -%Thesis Ph.D. database entry -@PHDTHESIS{Cheng1993, - AUTHOR = {X. Cheng}, - YEAR = 1993, - TITLE = {Linear and Nonlinear Aspects of {N}orthern {H}emisphere Wintertime Variability in the 500 mb Height Field}, - SCHOOL = {University of Washington}, - PAGES = 180, - NOTE = {[Available from University Microfilm, 305 N. Zeeb Rd., Ann Arbor, MI 48106.]} -} -%Thesis Master's database entry -@MASTERSTHESIS{Hirschberg1988, - AUTHOR = {P. Hirschberg}, - YEAR = 1988, - TITLE = {The Saline Flow into the {A}tlantic}, - DEPARTMENT = {Dept. of Oceanographic Studies}, - SCHOOL = {The Pennsylvania State University}, - PAGES = 207, - NOTE = {[NTIS PH-358930-2.]} -} -%Thesis database entry -@MASTERSTHESIS{Estournel1988, - AUTHOR = {C. Estournel}, - YEAR = 1988, - TITLE = {Etude de la phase nocturne de la couche limite atmospherique}, - TYPE = {These doctorat d'etat 1361}, - SCHOOL = {Universit{\'e} Paul Sabatier}, - PAGES = 161, - NOTE = {[Available from Universit{\'e} Paul Sabatier, 118 route de Narbonne 31062, Toulouse, France.]} -} -%Monograph database entry -@INCOLLECTION{Braham1981, - AUTHOR = {Braham, Jr., R. R.}, - YEAR = 1981, - TITLE = {Urban Precipitation Processes}, - BOOKTITLE = {{Metromex: A Review and Summary}}, - SERIES = {\textit {Meteor. Monogr.}}, - NUMBER = 40, - PUBLISHER = {Amer. Meteor. Soc.}, - PAGES = {75-116} -} -%Entire monograph entry (AGU) -@BOOK{Seidov2001, - EDITOR = {D. Seidov and B. J. Haupt and M. Maslin}, - YEAR = 1987, - TITLE = {{The Oceans and Rapid Climate Change: Past, Present, and Future}}, - SERIES = {\textit{Geophys. Monogr.}}, - VOLUME = 126, - PUBLISHER = {Amer. Geophys. Union}, - PAGES = 294 -} -%Entire monograph entry (AMS) -@BOOK{Blumen1990, - EDITOR = {W. Blumen}, - YEAR = 1990, - TITLE = {{Atmospheric Processes over Complex Terrain}}, - SERIES = {\textit{Meteor. Monogr.}}, - NUMBER = 45, - PUBLISHER = {Amer. Meteor. Soc.}, - PAGES = 323 -} -%Atlas database entry -@BOOK{Levitus1982, - AUTHOR = {S. Levitus}, - YEAR = 1982, - TITLE = {Climatological Atlas of the World Ocean}, - PUBLISHER = {National Oceanic and Atmospheric Administration}, - PAGES = 173 -} -%Atlas database entry -@INCOLLECTION{Bumpus_Lauzier1965, - AUTHOR = {D. F. Bumpus and L. M. Lauzier}, - YEAR = 1965, - TITLE = {Surface circulation on the continental shelf off eastern {N}orth {A}merica between {N}ewfoundland and {F}lorida}, - BOOKTITLE = {Serial Atlas of the Marine Environment}, - PUBLISHER = {American Geographical Society}, - NOTE = {{F}olio 7, {P}late 8, 4 pp} -} -%Website database entry -@MISC{AMS2013, - AUTHOR = {{American Meteorological Society}}, - YEAR = {cited 2013}, - TITLE = {{Authors Guide: References}}, - NOTE = {[Available online at \url{http://www2.ametsoc.org/ams/index.cfm/publications/authors/journal-and-bams-authors/journal-and-bams-authors-guide/references/}]} -} -%Software database entry -@MISC{Smith1991, - AUTHOR = {J. Smith}, - YEAR = 1991, - TITLE = {{FORTRAN} {H}-extended {V}ersion 2.3}, - NOTE = {IBM} -} -%Digital media database entry -@MISC{Jackson_Cosh, - AUTHOR = {T. J. Jackson and M. H. Cosh}, - YEAR = 2003, - TITLE = {{SMEX02} watershed soil moisture data, {W}alnut {C}reek, {I}owa}, - PUBLISHER = {National Snow and Ice Data Center, Boulder, CO}, - NOTE = {digital media. [Available online at \url{http://nsidc.org/data/nsidc-0143.html}.]} -} -%Corrigendum database entry -@ARTICLE{Charlton_Polvani2007, - AUTHOR = {A. J. Charlton and L. M. Polvani}, - YEAR = 2007, - TITLE = {{A new look at stratospheric sudden warmings. Part I: Climatology and modeling benchmarks}}, - JOURNAL = {J. Climate}, - VOLUME = 20, - PAGES = {449-469}, - DOI = {10.1175/JCLI3996.1}, - NOTE = {{C}orrigendum, \textbf{24,} 5951, doi:10.1175/JCLI-D-11-00348.1} -} -%In press database entry -@ARTICLE{Santanello2013, - AUTHOR = {Santanello, Jr., J. A., and S. V. Kumar and C. D. Peters-Lidard and K. Harrison and S. Zhou}, - YEAR = 2013, - TITLE = {Impact of Land Model Calibration on Coupled Land--Atmosphere Prediction}, - JOURNAL = {J. Hydrometeor.}, - DOI = {10.1175/JHM-D-12-0127.1}, - NOTE = {in press} -} diff --git a/inst/rmarkdown/templates/ams/skeleton/references.bib b/inst/rmarkdown/templates/ams/skeleton/references.bib new file mode 100644 index 000000000..40c72defc --- /dev/null +++ b/inst/rmarkdown/templates/ams/skeleton/references.bib @@ -0,0 +1,145 @@ +% +% JOURNAL ABBREVIATIONS +% +@STRING{AMS = "Amer.\ Meteor.\ Soc."} +@STRING{AGU = "Amer.\ Geophys.\ Union"} +@STRING{AIP = "Amer. Inst. Phys."} +@STRING{ADGEO = "Adv.\ Geosci."} +@STRING{AFM = "Agric.\ For.\ Meteor."} +@STRING{AM = "Ann.\ Meteor."} +@STRING{AN = "Astrophys.\ Norv."} % Astrophysica Norvegica +@STRING{AO = "Atmos.--Ocean"} % Atmosphere--Ocean, published by Canadian Meteorological Society (CMOS) +@STRING{AR = "Atmos.\ Res."} % Atmospheric Research +@STRING{ARFM = "Annu.\ Rev.\ Fluid Mech."} +@STRING{AUMET = "Aust.\ Meteor.\ Mag."} +@STRING{BAMS = "Bull.\ Amer.\ Meteor.\ Soc."} +@STRING{CAP = "Contrib.\ Atmos.\ Phys."} +@STRING{CC = "Climate Change"} % Climate Change +@STRING{CCH = "Climatic Change"} % Climatic Change +@STRING{CDYN = "Climate Dyn."} +@STRING{CHAOS = "Chaos"} +@STRING{COL = "Collier's"} +@STRING{CRS = "Cont.\ Shelf Res."} +@STRING{DAO = "Dyn.\ Atmos.\ Oceans"} +@STRING{ECO = "Ecology"} +@STRING{EI = "Earth Interact."} +@STRING{GA = "Geophysica"} % Geophysica, published by Geophysical Society of Finland +@STRING{GEOMAG = "Geophys.\ Mag."} +@STRING{GN = "Geophys.\ Norv."} % Geophysica Norvegica +@STRING{GRL = "Geophys.\ Res.\ Lett."} +@STRING{GEOINT = "Geofis.\ Int."} % Geofisica Internacional (Mexican journal -- vols. 3--5 contained proceedings from a hurricane conference +@STRING{GEOPUB = "Geofys.\ Publ."} +@STRING{GPC = "Global Planet.\ Change"} +@STRING{HP = "Health Phys."} +@STRING{IAOP = "Izv.\ Atmos.\ Ocean.\ Phys.\ (Engl.\ Transl.)"} +@STRING{IJC = "Int.\ J.\ Climatol."} +@STRING{JAM = "J.\ Appl.\ Meteor."} % renamed to name below in 2006 +@STRING{JAMC = "J.\ Appl.\ Meteor.\ Climatol."} % Journal of Applied Meteorology and Climatology (this journal used to be called the Journal of Applied Meteorology before 2006) +@STRING{JAS = "J.\ Atmos.\ Sci."} +@STRING{JAOT = "J.\ Atmos.\ Oceanic Technol."} +@STRING{JCAM = "J.\ Climate Appl.\ Meteor."} % from 1983--87, now JAMC +@STRING{JCLI = "J.\ Climate"} +@STRING{JCR = "J.\ Coastal Res."} +@STRING{JFM = "J.\ Fluid\ Mech."} +@STRING{JEM = "J.\ Eng.\ Math."} % Journal of Engineering Mathematics +@STRING{JGR = "J.\ Geophys.\ Res."} +@STRING{JHM = "J.\ Hydrometeor."} +@STRING{JMS = "J.\ Mar.\ Syst."} +@STRING{JM = "J.\ Meteor."} +@STRING{JMR = "J.\ Mar.\ Res."} +@STRING{JMSJ = "J.\ Meteor.\ Soc.\ Japan"} +@STRING{JPO = "J.\ Phys.\ Oceanogr."} +@STRING{JOCEAN = "J.\ Oceanogr."} % Journal of Oceanography +@STRING{JOSJ = "J.\ Oceanogr.\ Soc.\ Japan"} +@STRING{JSE = "J.\ Struct.\ Eng."} % Journal of Structural Engineering at ASCE +@STRING{JTM = "J.\ Tropical Meteor."} +@STRING{JWEIA = "J.\ Wind Eng.\ Ind.\ Aerodyn."} +@STRING{MA = "Meteor.\ Appl."} +@STRING{MAP = "Meteor.\ Atmos.\ Phys."} +@STRING{METMON = "Meteor.\ Monogr."} +@STRING{METZEIT = "Meteor.\ Z."} +@STRING{MWL = "Mar.\ Wea.\ Log"} +@STRING{MWR = "Mon.\ Wea.\ Rev."} +@STRING{NAT = "Nature"} +@STRING{NHR = "Nat.\ Hazards Rev."} +@STRING{NWD = "Natl.\ Weather Dig."} +@STRING{OA = "Oceanol. Aeta"} +@STRING{OCEAN = "Oceanography"} % a quarterly journal of The Oceanography Society +@STRING{PAG = "Pure Appl.\ Geophys."} +@STRING{PF = "Phys.\ Fluids"} +@STRING{PHYSD = "Physica D"} +@STRING{PMG = "Pap.\ Meteor.\ Geophys."} % Papers in Meteorology and Geophysics +@STRING{PNAS = "Proc.\ Natl.\ Acad.\ Sci.\ (USA)"} +@STRING{PRE = "Phys.\ Rev.\ E"} +@STRING{PRSA = "Proc.\ Roy.\ Soc."} +@STRING{PT = "Phys.\ Today"} +@STRING{PTRS = "Philos.\ Trans.\ Roy.\ Soc.\ London"} +@STRING{QJRMS = "Quart.\ J.\ Roy.\ Meteor.\ Soc."} +@STRING{RGEO = "Rev. Geophys."} +@STRING{SCI = "Science"} +@STRING{SOLA = "SOLA"} % Scientific Online Letters on the Atmosphere +@STRING{TAGU = "Eos, Trans.\ Amer.\ Geophys.\ Union"} +@STRING{TELLUS = "Tellus"} +@STRING{TCFD = "Theor.\ Comput.\ Fluid Dyn."} +@STRING{WEA = "Weather"} +@STRING{WW = "Weatherwise"} +@STRING{WF = "Wea.\ Forecasting"} +@STRING{WMOB = "WMO Bull."} + +%% SAMPLE REFERENCES. Insert your own reference database below the line. + +@article{Becker+Schmitz2003, + author = {E. Becker and G. Schmitz}, + title = {Climatological effects of orography and land--sea heating contrasts on the gravity + wave--driven circulation of the mesosphere}, + journal = {J. Atmos. Sci.}, + year = {2003}, + volume = 60, + pages = {103--118}, + doi = {10.1175/1520-0469(2003)060<0103:CEOOAL>2.0.CO;2}} + +@CONFERENCE{Kuji_Nakajima2002, +AUTHOR = {M. Kuji and T. Nakajima}, + YEAR = 2002, + TITLE = {Retrieval of cloud geometrical parameters using remote sensing data}, + BOOKTITLE = {11th Conf. on Cloud Physics}, + ADDRESS = {Ogden, UT}, + ORGANIZATION = {Amer. Meteor. Soc.}, + PAGES = {JP1.7}, + NOTE = {\url{http://ams.confex.com/ams/pdfpapers/39550.pdf}}} + +@article {MeixnerEA2002, + author = {T. Meixner and L. A. Bastidas and H. V. Gupta and R. C. Bales}, + title = {Multicriteria parameter estimation for models of stream chemical composition}, + journal = {Water Resour. Res.}, + volume = {38}, + doi = {10.1029/2000WR000112}, + eid = {1027}, + year = {2002}} + +@article{Knutti2008, + author={R. Knutti and M. R. Allen and P. Friedlingstein and J. M. Gregory and G. C. Hegerl and G. A. Meeh and M. Meinshausen and J. M. Murphy and G.-K. Plattne and S. C. B. Raper and T. F. Stocker and P. A. Stott and H. Teng and and T. M. L. Wigley}, + title={A review of uncertainties in global temperature projections over the twenty-first century}, + journal = {J. Climate}, + year = {2008}, + volume = 21, + pages = {2651--2663}, + doi = {10.1175/2007JCLI2119.1}} + +@article {EmeryEA1986, +author = {Emery, W. J. and Thomas, A. C. and Collins, M. J. and Crawford, W. R. and Mackas, D. L.}, +title = {An objective method for computing advective surface velocities from sequential infrared satellite images}, +journal = {J. Geophys. Res.}, +volume = {91}, +doi = {10.1029/JC091iC11p12865}, +pages = {12865--12878}, +year = {1986} +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + + + + + diff --git a/inst/rmarkdown/templates/ams/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/ams/skeleton/skeleton.Rmd index 79e93b8c1..3ca603c4a 100644 --- a/inst/rmarkdown/templates/ams/skeleton/skeleton.Rmd +++ b/inst/rmarkdown/templates/ams/skeleton/skeleton.Rmd @@ -1,211 +1,456 @@ --- -journal: jhm -layout: draft +twocol: FALSE # Use FALSE for submission. title: Title here -author1: Andrew N. Other -author2: Fred T. Secondauthor -currentaddress: "Current address: Some other place, Germany" -affiliation: "American Meteorological Society,Boston, Massachusetts" -exauthors: - - name: Ping Lu - exaffiliation: Princeton University - correspondingauthor: "American Meteorological Society, 45 Beacon St., Boston, MA 02108." - email: \email{groupleader@unknown.uu} - - name: Miao Yu - exaffiliation: University of Waterloo - currentaddress: "Current address: Some other place, Canada" +authors: + - name: Author One + aff: a + - name: Author Two + aff: a + - name: Author Three + aff: b + - name: Author Four + aff: a + - name: Author Five + current: "Author Five's current affiliation: NCAR, Boulder, Colorado" + aff: c + - name: Author Six + aff: d + - name: Author Seven + aff: d + - name: Author Eight + aff: a,d +affiliations: # Match aff to aff in authors + - aff: a + name: First Affiliation + - aff: b + name: Second Affiliation + - aff: c + name: Third Affiliation + - aff: d + name: Fourth Affiliation +# Abstracts should not exceed 250 words in length. It should be raw latex and not markdown syntax abstract: | - Enter the text of your abstract here. This is a sample American Meteorological Society (AMS) \LaTeX\ template. This document provides authors with instructions on the use of the AMS \LaTeX\ template. Authors should refer to the file amspaper.tex to review the actual \LaTeX\ code used to create this document. The template.tex file should be modified by authors for their own manuscript. -bibliography: amstest.bib -csl: american-meteorological-society.csl + Enter the text of your abstract here. This is a sample American Meteorological Society (AMS) \LaTeX\ template. This document provides authors with instructions on the use of the AMS \LaTeX\ template. Authors should refer to the file amspaper.tex to review the actual \LaTeX\ code used to create this document. The template.tex file should be modified by authors for their own manuscript. +statement: | + Enter significance statement here, no more than 120 words. See \url{www.ametsoc.org/index.cfm/ams/publications/author-information/significance-statements/} for details. +capsule: | + Enter BAMS capsule here, no more than 30 words. See \url{www.ametsoc.org/index.cfm/ams/publications/author-information/formatting-and-manuscript-components/\#capsule} for details +bibliography: references.bib output: rticles::ams_article --- -# Introduction - -This document will provide authors with the basic American Meteorological Society (AMS) formatting guidelines. This document was created using \LaTeX\ and demonstrates how to use the \LaTeX\ template when submitting a manuscript to the AMS. The following sections will outline the guidelines and formatting for text, math, figures, and tables while using \LaTeX\/ for a submission to the AMS. An attempt to compile amspaper.tex should be made before using the template. The files have been tested on Windows, Linux, and Mac OS using \TeX\ Live 2011 (available online at \url{http://www.tug.org/texlive/}). Feedback and questions should be sent to latex@ametsoc.org. Additional information is available on the AMS \LaTeX\ Submission Info web page (\url{http://www2.ametsoc.org/ams/index.cfm/publications/authors/journal-and-bams-authors/author-resources/latex-author-info/}). - -Authors should use the empty template.tex to begin their paper. A valuable source of \LaTeX\ information is the {TeX Frequently Asked Questions} page (available online at \url{faq.tug.org}). - -# Formatting text and sections - -The text should be divided into sections, each with a separate heading and consecutive numbering. Note, however, that single secondary, tertiary, and quaternary sections remain unnumbered. Each section heading should be placed on a separate line using the appropriate \LaTeX\ commands. - -## Secondary headings {-} - -Secondary headings labeled with letters are formatted using the `## Secondary headings {-}` for a single subsection within a section or `## Secondary headings` for multiple subsections within one section. - -### Tertiary headings {-} - -Tertiary headings are formatted using the `### Tertiary headings {-}` for single a subsubsection within a subsection or `### Tertiary headings` for multiple subsubsections within a subsection. -\paragraph*{Quaternary headings} -Quaternary headings are formatted using the `\paragraph*{Quaternary headings}` for a single paragraph within a subsubsection or `\paragraph{Quaternary headings}` for multiple paragraphs within a subsection. - -# Citations - -Citations to standard references in text should consist of the name of the author and the year of publication, for example, @poe12 or [@poe12;@alexander:2002;@Gershunov2012] using the appropriate `@key` or `[@key]` commands, respectively. A variety of citation formats can be used with the natbib package; however, the AMS prefers that authors use only the `@key` and `[@key]` commands. References should be entered in the references.bib file. For a thorough discussion of how to enter references into the references.bib database file following AMS style, please refer to the **AMS_Refs.pdf** document included in this package. - -# Formatting math - -The following sections will outline the basic formatting rules for mathematical symbols and units. In addition, a review of the amspaper.tex file will show how this is done with the use of \LaTeX\ commands. The AMS template provides the American Mathematical Society math, font, symbol, and boldface packages for use in math mode. - -## Mathematical symbols - -Symbols must be of the same font style both in text discussion and in displayed equations or terms (and figures should be prepared to match). Scalar single-character symbols are set italic, Greek, or script. Examples are $u$, $L$ [note that $\upsilon$ (Greek upsilon) is used instead of *v* (italic "vee") to avoid confusion with $\nu$ (Greek nu) often used for viscosity; this is handled automatically when in \LaTeX\ math mode], $w$, $x$, $y$, $z$, $f$, $g$, $r$, indices such as $i$ or $j$, and constants such as $C_D$, $k$, or $K$. Multiple-character scalar variables, abbreviations, nondimensional numbers, and acronyms for variables are set regular nonitalic: $\mathrm{LWC}$, $\mathrm{Re}$, $\mathrm{Ro}$, $\mathrm{BT}$, $\mathrm{abs}$, $\mathrm{obs}$, $\mathrm{max}$, $\mathrm{min}$, $\mathrm{Re}$/$\mathrm{Im}$ (real/imaginary), etc. For vectors, use boldface nonitalic Times Roman as in $\mathbf{V}$, $\mathbf{v}$, or $\mathbf{x}$, and $\mathbf{i}$, $\mathbf{j}$, and $\mathbf{k}$ unit vectors. Do not use the \LaTeX\ $\backslash vec$ command to denote vectors. For matrix notation, use nonitalic boldface Arial (or sans serif) font as in $\pmb{\mathsf{A}}$, $\pmb{\mathsf{B}}$, or $\pmb{\mathsf{M}}$. Note that you will need to use the $\backslash$pmb command for boldface sans serif; the $\backslash$bm command will not work. All mathematical operator abbreviations/acronyms are set lowercase regular Roman font, except $O$ (on the order of): $\sin$, $\cos$, $\tan$, $\tanh$, $\mathrm{cov}$, $\Pr$ (for probability; note same as Prandtl number), $\mathrm{const}$ (for constant), $\mathrm{c.c.}$ (complex conjugate). +# Introduction -## Units +It has now become our basic knowledge that the extratropical atmosphere is +driven strongly by the horizontal potential temperature gradient that arises +from the differential solar heating (e.g., Lorenz 1955). The horizontal gradient +in the potential temperature, often referred to as baroclinicity, is a measure +of upper-level wind steering via thermal wind and a measure of baroclinic +instability in the atmosphere. Baroclinicity in the lower atmosphere in classic +theories of atmospheric stability is measured by a combination of the static +stability and horizontal temperature gradient, the latter of which is equivalent +to vertical shear in the horizontal wind through the thermal wind balance +(Charney 1947; Eady 1949). In its original form, the Eady's maximum growth rate +for baroclinic instability $B_{GRMax}$ is defined by $B_{GRMax} = 0.31(|f|/N)(\partial U/\partial_z)$ +in a zonally homogeneous steady mean state, where $U$ is the mean zonal flow, $f$ is the Coriolis parameter, and $N$ is the +`Brunt--V\"ais\"al\"a`{=latex} frequency. Charney's formula is slightly different from the +Eady's, but still incorporates the same effects (Table \ref{t1}). + +```{=latex} +\begin{table} +\begin{tabular*}{\hsize}{@{\extracolsep\fill}lcccccc@{}} +\topline +Month& EOF1& Split &EOF2& Split& EOF3& EOF4\\ +\midline +\ Jan& 29& NG& 24& GD& 10& 5\\ +\ Feb& 39& GD& 20& GD& \phantom{1}7 &6\\ +\ Mar& 31& GD& 14& NG& 10& 6\\ +\ Apr& 23& GD& 14& NG& 10& 7\\ +\ May& 19& GD& 12& NG& 10& 7\\ +\ Jun& 19& GD& 12& NG& 10& 9\\ +\ Jul& 18& NG &13& NG& \phantom{1}9& 7\\ +\ Aug& 18& NG& 13& NG& 11& 9\\ +\ Sep &17& NG& 13& NG& 10& 8\\ +\ Oct &16& NG& 13& GD& \phantom{1}8& 7\\ +\ Nov &19 &NG& 16& NG& 11& 8\\ +\ Dec& 33& GD& 18& GD& 10& 6\\ +\botline +\end{tabular*} +\caption{Percentage of variance explained by the first four +EOFs for the North Pacific Bx. The degree of separation between +EOF1 and EOF2 and EOF2 and EOF3, based on the North et al. +(1982) criterion, is indicated by good (GD) and not good or marginal +(NG).}\label{t1} +\end{table} +``` -Units are always set on a single line with a space separating the denominator, which is set with a superscript $-1$, $-2$, and so on, rather than using a slash for "per." Examples are g kg$^{-1}$, m$^2$ s$^{-1}$, Wm$^{-2}$, g m$^{-3}$, and m s$^{-1}$ (note that ms$^{-1}$ is the unit for "per millisecond"). +Lindzen and Farrell (1980) first applied the Eady's parameter to atmospheric +data to successfully estimate the maximum growth rate of baroclinic instability +in the troposphere. Hoskins and Valdes (1990) used its localized version (i.e., +$U$, $N$, and $f$ are all local Eulerian mean values) as the central parameter +in their study of the Northern Hemispheric storm tracks. This local version, or +its simplified version, has been used successfully as an indicator of baroclinic +wave generation in diagnostic studies of stormtracks in recent years as well +(Nakamura and Sampe 2002; Nakamura and Shimpo 2004; Nakamura et al. 2004). In +our study, the North Atlantic part of which was reported in Nakamura and Yamane +(2009, hereafter Part I), we define the near-surface baroclinic vector, +$\mathbf{B}=B^x\mathbf{i} + B^y\mathbf{j}$, where +$B^x= -(g/\theta N)(\partial\theta/\partial y)$ and $B^y = (g/\theta N)(\partial\theta/\partial x)$ +with $\theta$ being the monthly-mean potential temperature at 2 m above the +surface, and use it as the central quantity of the diagnoses. Unless stated +otherwise, ``anomalies'' refer to deviations from the climatology hereafter. +Though its meridional component does not appear in any classic theory of +baroclinic instability, a theory that does incorporate the effect of $B^y$ shows +its important role in enhancing baroclinic wave generation locally to the east +of the mean trough (Niehaus 1980). In the North Atlantic storm track region, we +indeed found that the substantial zonal gradient in the surface temperature in +and around the Labrador Sea plays a major role in the large-scale atmospheric +state. + +# The sea surface temperature + +The sea surface temperature (SST) is an important factor in determining +$\mathbf{B}$ in the storm-track regions (e.g., Hoskins and Valdes 1990; Nakamura +et al. 2004; Part I). SST anomalies (SSTAs) around an oceanic front along the +Gulf Stream (GS), Kuroshio Extension (KE), or Oyashio Extension (OE) can have a +profound impact on $\mathbf{B}$ along the storm tracks. + +## A subtle point + +A subtle but important point that has to be considered carefully in this regard +is the spatial scale and the location of SSTAs with respect to the climatology, +since it is the anomalous surface temperature gradient whose structure has a +spatial scale of the atmospheric Rossby deformation radius that can exert +significant influence on the large-scale atmospheric flow. + +### Changes in the temperature + +The high sensitivity of $\mathbf{B}$ to changes in the temperature contrast +across the front and changes in the width of the front, and the uncertainty in +the impact of SSTAs of small spatial scales on $\mathbf{B}$ make it difficult to +assess the effective B anomalies that are attributable to the SSTAs from the +available data. Moreover, it is uncertain exactly how the SSTAs in the presence +or absence of the land surface temperature anomalies may or may not produce +$\mathbf{B}$ anomalies that are significant to the atmosphere. + +#### Complicating factor + +The complicating factor introduced by the land surface must be taken into +account when studying potential roles of extratropical SSTAs in the +extratropical atmospheric anomalies. +Lau (1988) investigated patterns of anomalous storm track activity and +associated low-frequency flow anomalies by computing empirical orthogonal +functions (EOFs) for high-frequency 500-hPa geopotential height for the Northern +Hemisphere winters. He found that both North Atlantic and North Pacific storm +tracks have a pattern of meridional shift and a pattern of increased or +decreased eddy activity in the first two EOFs.He also found that these changes +in the storm tracks have symbiotic relationships with the background flows and +have substantial impacts on the mean flow. Part I approached the issue of the +stormtrack and low-frequency flow variability in connection with SSTAs in the +extratropics, focusing on $\mathbf{B}$ as the key parameter of diagnoses, and +found similar patterns of variability in the eddy activity and low-frequency +flow in the North Atlantic basin. Much of this variability was connected to +SSTAs in the vicinity of the Gulf Stream in cold months (Part I). Since the +winter North Pacific basin has a storm track andmean flow that appear to be +related to the oceanic fronts, Kuroshio--Oyashio Extensions (KOE) in this case, +in a manner essentially the same as those in the North Atlantic basin related to +the GS,we have attempted to find similar results for the North Pacific basin. In +this regard, we have chosen not to project our results onto the major mode of +variability in the extratropical North Pacific basin, the North Pacific decadal +variability (PDV), so that our presentation and discussion are mostly confined +to the wave--mean flow dynamics of monthly time scale or shorter. + + +Our approach to the search for a link between anomalies in the KOE and the +overlying atmosphere is as follows: (i) identify dominant patterns in anomalous +$\mathbf{B}$ in the storm track for each calendarmonth and identify years in +which the anomaly fits the pattern well, (ii) composite anomalies in the +monthly-mean circulation and highfrequency transients in the atmosphere to +obtain a typical atmospheric state that accompanies the patterns of anomalous +$\mathbf B$, (iii) composite SSTA to obtain a typical oceanic state that +accompanies and precedes the patterns of anomalous $\mathbf B$, and (iv) +composite anomalous net surface heat flux that accompanies and precedes the +pattern of anomalous $\mathbf B$. With this approach, we obtain typical pictures +of anomalous states in the atmosphere and oceans with anomalous $\mathbf{B}$ as +their connecting interface. Section 2 describes the data and procedure to +compute $\mathbf B$. Section 3 describes the climatology and variance of +$\mathbf B$. Dominant patterns of $\mathbf B$ are shown in section 4, followed +by composited anomalies in various atmospheric fields and SST in section 5. +Finally, we present our discussion on the results, examining a potential +cause--effect relationship between anomalies in the SST and atmosphere in +section 6. + +```{=latex} +\begin{figure*}[t] +\centerline{\includegraphics[width=\textwidth]{FigOne.pdf}} + +\caption{Climatology of $Bx (10^{-6} s^{-1}$, color) and $U^{200}$(m s$^-1$, +contours) for (a) February and (b) August; $\overline{V'\theta'}^{850}$ +(K m s$^-1$, color) and +$\overline{V'V'}^{200}$ +(m$^2$ s$^{-1}$, contours) for (c) February and (d) August; MR$^{z850}$ +(10$^{-3}$ m$^2$ s$-2$, color) and $U^{1000}$ (m s$^{-1}$, contours) +for (e) February and (f) August; +and SST (K, color) and $F_h$ [10$^5$ J m$^{-2}$ (6 h)$^{-1}$] for (g) +February and (h) August. Red rectangles indicate the domain of EOF +calculations.} \label{fig1} +\end{figure*} +``` -## Equations +Figure \ref{fig1} shows the climatology of $Bx$, $U^{200}$, +$\overline{V'\theta'}^{850}$, $\overline{V'\theta'}^{200}$, $MR^{z850}$, +$U^{1000}$, SST, and $F_h$ for February and August as examples of the reference +state in the winter and summer. The numeric superscript indicates the pressure +level in hPa. The seasonal mean is visibly more diffused in structure, +particularly for Bx, than those shown in Fig.~\ref{fig1}. There are no surprises +in the overall picture of Bx. The regions of large land--sea temperature +contrast and the oceanic fronts show very large Bx in cold months. The position +of Bx maximum in the storm track region is found along theKOEregion throughout +the year. The zonally elongated band of large Bx in the storm track is generally +wider in cold months than in warm months. In fact, large Bx values that +presumably accompany the Kuroshio and its extension in the cold months vanish in +the summer (Figs. \ref{fig1}a,b). The seasonal variation in the Bx values in the +storm track basically follows that of the north--south differential +heating--largest in the winter and smallest in the summer. As reported by +Nakamura et al. (2004), the $U^{200}$ maximum is displaced southward from the Bx +maximum visibly in winter months (Fig. \ref{fig2}a), although U200 is generally +large over the area of large Bx in the core of the storm track. The southward +displacement of the U200 maximum from the Bx maximum in the storm track is less +pronounced or even reversed in warmer months (Fig. \ref{fig2}b). We note that +the structure of the climatological Bx generally reflects those of +($\partial{\theta^{2{\textrm m}}}/\partial{y}$) with some exceptions where the +surface slope contributes significantly to Bx in isolated areas over the land, +most notably around the Himalayas. + +```{=latex} +\begin{figure*}[p] +\centerline{\includegraphics{FigTwo.pdf}} +\caption{As in Fig.~10, but for (a),(b) September EOF1; (c),(d) September EOF2; (e),(f) October EOF1; (g),(h) October EOF2; and +(i),(j) December EOF2.}\label{fig2} +\end{figure*} +``` -Brief equations or terms set inline in text must be set as a single-line expression because page proofs are not double spaced, for example, $\rho^{-1}p/x$ or $(1/{\rho})p/x$ or $(a-b)/(c+d)$; that is, use a superscript $-1$ for the denominator. In case of a more complicated term or equation, it should be set as an unnumbered display equation, such as +The position and structure of the storm track as indicated by +$\overline{V'\theta'}^{850}$ and $\overline{V'V'}^{200}$ are, at least for the +winter, essentially the same as those reported in earlier studies on the storm +tracks (e.g., Chang et al. 2002). The maxima in $\overline{V'\theta'}^{850}$ and +$\overline{V'V'}^{200}$ are located in the band of large Bx. + + +# Data and calculation procedures + +The data used to calculate $\mathbf{B}$ are the monthly-mean temperature at 2 m +above the surface ($T^{2m}$) and temperature at pressure levels available from +the 40-yr European Centre for Medium-Range Weather Forecasts (ECMWF) Re-Analysis +(ERA-40; Uppala et al.~2005). We chose the ERA-40 $T^{2m}$ data rather than the +National Centers for Environmental Prediction--National Center for Atmospheric +Research (NCEP--NCAR) reanalysis products for its explicit inclusion of the +observed near-surface temperature in producing the $T^{2m}$ data. The +monthly-mean surface pressure data from the NCEP--NCAR reanalyses (Kalnay et al. +1996) were used to determine the pressure levels to be used for $\mathbf B$ +calculation, and to calculate $\theta$ at 2 m above the surface from $T^{2m}$. +We used the NCEP--NCAR surface pressure data for convenience, since we had +already compiled the dataset for calculating transient eddy fluxes to be +mentioned later and the ERA-40 surface pressure data are not readily available. +We later compared the NCEP--NCAR monthly-mean sea level pressure with that of +ERA-40, and found the difference between the two products to be immaterial for +the purpose of the current study. We also used ERA-40 monthly-mean horizontal +wind and geopotential height at pressure levels, net surface heat flux, Fh (the +sum of latent heat flux, sensible heat flux, solar radiation, and the thermal +radiation), and Hadley Centre sea surface temperature data (Rayner et al. 2003) +to compile anomaly composites accompanying anomalous patterns in $\mathbf B$. In +addition, we used 6-hourly temperature and wind data from the NCEP--NCAR +reanalyses to compute various eddy fields. The accuracy of the Fh data used here +is, as true for other reanalyses surface heat flux products, may not be so high +to produce reliable anomaly composites. + + +We computed $\mathbf{B}$ near the surface by calculating the horizontal gradient +in $\theta^{2{\textrm m}}$, using the centered finite differencing, and +calculating $N$ from the lowest three vertical pressure levels that are location +dependent because of topography. Both $\nabla\theta^{2{\textrm m}}$ and $N$ were +calculated locally as in Hoskins and Valdes (1990) and Nakamura and Shimpo +(2004). The entire 45 yr from September 1957 to August 2002 were used for the +Northern Hemisphere. To resolve the dominant modes in $\mathbf{B}$ arising from +the land--sea temperature contrast, one may need much higher horizontal +resolution in the data. The relatively coarse horizontal resolution of the data +may artificially suppress the significance of the variability associated with +the land--sea temperature contrast.One should keep this limitation in mind. The +6-hourly bandpassed (period of 2--7 days) eddy fields and ultra-low-frequency +(period of 30 days and longer) background fields were computed from the NCEP-- +NCAR reanalyses, using simple time filters (Lau and Lau 1984) first. The +filtered time series were then visually examined against the raw time series +and, then, used to calculate the slowly evolving bandpassed meridional velocity +variance ($\overline{V'V'}$), meridional temperature flux +($\overline{V'\theta'}$), and the three-dimensional transient wave activity flux +defined on a zonally varying basic state by Plumb (1986). The wave activity flux +consists of the zonal and meridional advective fluxes (MU and MV), the zonal and +meridional radiative fluxes (MRx and MRy), and the radiative vertical flux +(MRz). The flux is essentially the Eliassen--Palm flux (Eliassen and Palm 1961) +in a zonally inhomogeneous mean flow (Plumb 1986). The wave activity flux was +calculated from February 1948 to November 2004 only for the extratropics +poleward of 208 latitude. Also, it was calculated only from 850 to 30 hPa +because of the double differentiation with respect to pressure required for the +calculation. The flux of particular interest in this study is the vertical +component. Here MR$^z$ is defined by $$ -x=\frac{2b\pm\sqrt{b^{2}-4ac}}{2c}. +MR^z= +\frac{ +pf \cos\phi} +{p^0|\nabla h\bar q|(d\theta_0/dz)} +\left(\frac{\partial\bar q}{\partial x} +\overline{U'\theta'} + +\frac{\partial\bar q}{\partial y} +\overline{V'\theta'}\right), $$ -Otherwise, numbered display equations can be entered using the appropriate equation command, such as - +where $q$ is quasigeostrophic potential vorticity, $p$ is the pressure, $p^0$ is +the reference surface pressure set to 1000 hPa here, $\theta_0$ is the +area-weighted ultra-low-frequency hemispheric mean potential temperature at each +height, u9 is the bandpassed potential temperature, and z is the geopotential +height. An overbar denotes an ultra-low frequency component and a prime denotes +bandpassed component. The 6-hourly time series of wave fluxes was computed by +using the time series of ultra-low-frequency fields as the basic-state and +high-frequency fields as eddies. In short, the time series was calculated by +changing the meaning of an overbar from the time mean state to an +ultra-low-frequency state, and changing the meaning of a prime from a departure +from the mean to a high-frequency state. The 6-hourly eddy time series was +averaged over each month to produce monthly-mean time series. This dataset +allows us to examine anomalous eddy fields accompanying anomalous $\mathbf B$ in +specific months. The climatology for the eddy fields was computed from 46 yr, +January 1958 to December 2003. The calculation of the wave activity and its flux +is described in detail by Nakamura et al. (2010). + + +# Climatology and variance + +The climatology and variance of $Bx$ and $By$ were computed for each calendar +month and examined closely for their spatial and temporal structures. The +monthly climatology, rather than the seasonal climatology, is used as the +reference in our study, to avoid contamination of the diagnostic results arising +from differences in the climatology between two successive months. Unlike in the +North Atlantic basin reported in Part I, we found the impact of $By$ variations +on the large-scale atmospheric state in the North Pacific basin much weaker than +that of Bx variations, presumably because of themore zonal orientation of the +KOE in comparison to the Gulf Stream and North Atlantic Current. In the +following, thus, we focus our presentation on the climatology and variations of +$Bx$ and their impact on the large-scale atmospheric state. + +Sample citations: \citet{Becker+Schmitz2003}, \citet{Knutti2008}, +and \citep{MeixnerEA2002,Kuji_Nakajima2002,EmeryEA1986}. + +\clearpage + +::: acknowledgments +We thank two anonymous reviewers for their comments, which helped +to improve the manuscript. +::: + +::: datastatement +Start data availability statement here. +::: + +::: appendix + +# Appendix Title + +## Appendix section head {.unnumbered} + +Here is a sample appendix with an equation [see Eq. \eqref{eqA1}]. Lorem ipsum +dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut +labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + +```{=latex} \begin{equation} -x=\frac{2b\pm\sqrt{b^{2}-4ac}}{2c}. +\frac{ +pf \cos\phi} +{p^0|\nabla h\bar q|(d\theta_0/dz)}\label{eqA1} \end{equation} +``` -Lists of equations are punctuated as written English, and commas, semicolons, and periods are placed where appropriate. Conjunctions such as "and", "while", "when", or "for" are also typically placed before the final element in a mathematical phrase, as befits the intended mathematical meaning. - -## Figures and tables - -The AMS prefers that all figures and tables are placed **at the end of the document** prior to submission. A list of tables and a list of figures will appear near the end of the PDFfile, before the actual tables and figures. These lists are necessary for submission. - -For appendix figures and tables, special commands are needed to manually change the numbering to ensure that each appendix figure or table is numbered as part of the respective appendix and not as a continuation of the main paper. Use the command `\appendcaption{}` instead of the usual `caption{}` to adjust the numbering; for example, for Table A1, you would use the command `\appendcaption{A1}`. - -Note that the normal `\ref{}` command cannot be used to cite appendix figures and tables as the numbering will be incorrect. Callouts for appendix figures and tables in the text will need to be written out as plain text, for example, Fig. A1 and Table A1. - -### Figures - -The insertion of a sample figure (Fig. \ref{f1}) -and caption is given below (in the .tex document) and at the end of the document. Standard figure sizes are 19 (one column), 27, 33, and 39 (two columns) picas. - -\begin{figure}[h] +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis +nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu +fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in +culpa qui officia deserunt mollit anim id est laborum. + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis +nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +Here is an example appendix figure (see Fig. \ref{figA1}). +```{=latex} +\begin{figure} \centerline{\includegraphics[width=19pc]{figure01.pdf}} - \caption{Enter the caption for your figure here. Repeat as - necessary for each of your figures.}\label{f1} +\caption{Here is an appendix, single column figure caption.}\label{figA1} \end{figure} - -```{r,echo=FALSE,fig.cap='test the rmd output',fig.align='center',fig.width=3.17} -plot(1:10) ``` -### Tables -Each table must be numbered, provided with a caption, and mentioned specifically in the text. -See below (in the .tex document) and at the end of the document for the formatting of a sample table (Table -\ref{t1}). - -\begin{table}[h] -\caption{This is a sample table caption and table layout.}\label{t1} -\begin{center} -\begin{tabular}{ccccrrcrc} -\topline -$N$ & $X$ & $Y$ & $Z$\\ -\midline - 0000 & 0000 & 0010 & 0000 \\ - 0005 & 0004 & 0012 & 0000 \\ - 0010 & 0009 & 0020 & 0000 \\ - 0015 & 0016 & 0036 & 0002 \\ - 0020 & 0030 & 0066 & 0007 \\ - 0025 & 0054 & 0115 & 0024 \\ -\botline -\end{tabular} -\end{center} -\end{table} - -\acknowledgments -Keep acknowledgments (note correct spelling: no e between the g and m) as brief as possible. In general, acknowledge only direct help in writing or research. Financial support (e.g., grant numbers) for the work done, for an author, or for the laboratory where the work was performed is best acknowledged here rather than as footnotes to the title or to an author's name. Contribution numbers (if the work has been published by the author's institution or organization) should be included as footnotes on the title page, -not in the acknowledgments. - -Please use The authors thank \ldots rather than The authors would like to thank \ldots. - -The author thanks Mats Dahlgren for version one of \textsf{achemso}, and Donald Arseneau for the code taken from \textsf{cite} to move citations after punctuation. Many users have provided feedback on the class, which is reflected in all of the different demonstrations shown in this document. +# Second Appendix Title -\appendix[A] +## Sample appendix section head -\appendixtitle{Title of Appendix} +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis +nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat +[see Eq. \eqref{eqB1}]]. Duis aute irure dolor in reprehenderit in voluptate +velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat +cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est +laborum. -## Appendix section - -The AMS template allows authors to format an unlimited number of appendixes. To format a single appendix, use the `\appendix` command with no additional argument. Otherwise, add the appropriate one-letter argument to the `\appendix` command (e.g. `\appendix[A]`, `\appendix[B]`, `\appendix[C]`, etc.) corresponding to the appropriate appendix. - -The title of the appendix can be formatted using the `\appendixtitle{} ` command. The `##` , `###` and `\paragraph` commands are used to create sections within the appendix. (Note that the appendix title takes the place of `#` in the appendix, so the first section should begin with `##` instead of `#`.) - -Equations are automatically numbered appropriately for each appendix. Here is an example of the first equation in appendix A, automatically labeled (\ref{eq:1}): - -\begin{equation} -\label{eq:1} -x=\frac{2b\pm\sqrt{b^{2}-4ac}}{2c}. +```{=latex} +\begin{equation}\label{eqB1} +\left(\frac{\partial\bar q}{\partial x} +\overline{U'\theta'} + +\frac{\partial\bar q}{\partial y} +\overline{V'\theta'}\right) \end{equation} +``` -For appendix figures and tables, special commands are needed to manually change the numbering to ensure that each appendix figure or table is numbered as part of the appendix and not as a continuation of the main paper. Use the command `\appendcaption{}` instead of the usual `\caption{}` to adjust the numbering; for example, for Table A1, you would use the command `\appendcaption{A1}`. In-text callouts for each appendix figure and table will need to be written as plain text;the usual `\ref{}` command cannot be used. - -\appendix[B] -\appendixtitle{File Structure of the AMS \LaTeX\ Package} - -## AMS \LaTeX\ files -You will be provided with a tarred, zipped \LaTeX\ package containing 3 files. These files are - -\begin{description} - -\item - your-paper-name.Rmd template for your paper -\item - amstest.bib an example of a bibliographic database file. -\item - figure01.pdf are sample figures. - -\end{description} - -## Help for Authors - -Questions and feedback concerning the use of the AMS \LaTeX\ files should be directed to latex@ametsoc.org or yufreecas@gmail.com(for rmarkdown issues). Additional information is available on the AMS \LaTeX\ Submission Info web page (\url{http://www2.ametsoc.org/ams/index.cfm/publications/authors/journal-and-bams-authors/author-resources/latex-author-info/}). - -\appendix[C] -\appendixtitle{Building a PDF and Submitting Your \LaTeX\ Manuscript Files to the AMS} - -## Building your own PDF - -There are a variety of different methods and programs that will create a final PDF from your \LaTeX\ files. The easiest method is to download one of the freely available text editors/compilers such as Rstudio to compile your files into a PDF. - -## Submitting your files to the AMS for peer review - -The AMS uses the Editorial Manager system for all author submissions for peer review. Editorial Manager uses the freely available \TeX\ Live 2011 distribution. This system will automatically generate a PDF from your submitted \LaTeX\ files and figures(not Rmd file, tex files will be produced when you successful knit your Rmd file). - -You should not upload your own PDF into the system. If the system does not build the PDF from your files correctly, refer to the AMS \LaTeX\ FAQ page first for possible solutions. If your PDF still does not build correctly after trying the solutions on the FAQ page, email latex@ametsoc.org for help. +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis +nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu +fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in +culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit +amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et +dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco +laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in +reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. +Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia +deserunt mollit anim id est laborum. -## Other software -As mentioned above, there is a variety of software that can be used to edit .tex files and build a PDF. The AMS does not support \LaTeX\/-related WYSIWYG software, such as Scientific Workplace, or WYSIWYM software, such as LyX. \TeX\ Live (available online at \\ \url{http://www.tug.org/texlive/}) is recommended for users needing an up-to-date \LaTeX\ distribution with software that includes an editor and the ability to automatically generate a PDF. +## Sample appendix section head -# References {-} -\bibliography{references} +Second appendix example. Here an example appendix table (see Table \ref{tB1}). -\begin{table} -\appendcaption{A1}{Here is the appendix table caption.} +```{=latex} +\begin{table}[h] \centering -\begin{tabular}{ccc} +\begin{tabular}{lc} \topline -$1$ & $2$ & $3$ \\ +Month& Yr of positive phase\\ \midline -a&b&c \\ -d&e&f \\ +\ \ Jan& 1961, 1969, 1978, 1979, 1988, 1990, 1992, 1994\\ +\ \ Feb& 1964, 1977, 1978, 1980, 1983, 1986, 1988, 2000, 2001\\ +\ \ Mar& 1970, 1973, 1979, 1980, 1984, 1988, 2000\\ +\ \ Apr& 1959, 1961, 1962, 1963, 1968, 1972, 1983, 2002\\ +\ \ May& 1971, 1984, 1993, 1996, 2000\\ +\ \ Jun& 1981, 1983, 1984, 1993, 1998\\ +\ \ Jul& 1961, 1972, 1973, 1978, 1994, 2000\\ +\ \ Aug& 1967, 1970, 1973, 1978, 1994, 1999\\ +\ \ Sep& 1975, 1977, 1988, 1989, 1994, 1998, 1999\\ +\ \ Oct& 1962, 1977, 1998, 1999, 2001\\ +\ \ Nov& 1985, 1986, 1987, 1988, 1991, 1998\\ +\ \ Dec& 1957, 1968, 1972, 1978, 1979, 1990\\ \botline \end{tabular} +\caption{Years selected for anomaly composites for the positive +phase of $B^x$ EOF1.}\label{tB1} \end{table} +``` +::: -\begin{figure} -\centerline{(illustration here)} -\appendcaption{A1}{Here is the appendix figure caption.} -\end{figure} - -\begin{figure} -\centerline{(illustration here)} -\appendcaption{B1}{Here is the appendix figure caption.} -\end{figure} diff --git a/man/ams_article.Rd b/man/ams_article.Rd new file mode 100644 index 000000000..1ee859267 --- /dev/null +++ b/man/ams_article.Rd @@ -0,0 +1,56 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ams_article.R +\name{ams_article} +\alias{ams_article} +\title{American Meteorological Society journals format.} +\usage{ +ams_article( + ..., + keep_tex = TRUE, + citation_package = "natbib", + md_extensions = c("-autolink_bare_uris", "-auto_identifiers"), + pandoc_args = NULL +) +} +\arguments{ +\item{...}{Additional arguments to \code{\link[rmarkdown:pdf_document]{rmarkdown::pdf_document()}}. \strong{Note}: \code{extra_dependencies} are not +allowed as Copernicus does not support additional packages included via \code{\\usepackage{}}.} + +\item{keep_tex}{Keep the intermediate tex file used in the conversion to PDF. +Note that this argument does not control whether to keep the auxiliary +files (e.g., \file{.aux}) generated by LaTeX when compiling \file{.tex} to +\file{.pdf}. To keep these files, you may set \code{options(tinytex.clean = +FALSE)}.} + +\item{citation_package}{only natbib is supported with this template.} + +\item{md_extensions}{Markdown extensions to be added or removed from the +default definition of R Markdown. See the \code{\link[rmarkdown]{rmarkdown_format}} for +additional details.} + +\item{pandoc_args}{Additional command line options to pass to pandoc} +} +\value{ +An R Markdown output format. +} +\description{ +Format for creating submissions to American Meteorological Society journals. +} +\details{ +This was adapted from +\url{https://www.ametsoc.org/index.cfm/ams/publications/author-information/latex-author-info/}. + +The template require some default knitr option to be change: +\itemize{ +\item \code{echo = FALSE} as no R code should be shown +\item \code{fig.path = ""} as all directory paths need to be removed from figure names +\item \code{out.extra = ""} to force figure labels with knitr +} +} +\examples{ +\dontrun{ +library("rmarkdown") +draft("MyArticle.Rmd", template = "ams", package = "rticles") +render("MyArticle/MyArticle.Rmd") +} +} diff --git a/man/article.Rd b/man/article.Rd index c03ef1e45..a1b6f8acb 100644 --- a/man/article.Rd +++ b/man/article.Rd @@ -6,7 +6,6 @@ \alias{aea_article} \alias{agu_article} \alias{amq_article} -\alias{ams_article} \alias{asa_article} \alias{arxiv_article} \alias{bioinformatics_article} @@ -64,8 +63,6 @@ amq_article( md_extensions = c("-autolink_bare_uris") ) -ams_article(..., keep_tex = TRUE, md_extensions = c("-autolink_bare_uris")) - asa_article(..., keep_tex = TRUE, citation_package = "natbib") arxiv_article(..., keep_tex = TRUE) @@ -217,12 +214,6 @@ Economic Association (AER, AEJ, JEL, PP). l'AMQ. } -\section{\code{ams_article}}{ - Format for creating an American Meteorological -Society (AMS) Journal articles. Adapted from -\url{https://www.ametsoc.org/ams/index.cfm/publications/authors/journal-and-bams-authors/author-resources/latex-author-info/}. -} - \section{\code{asa_article}}{ This format was adapted from The American Statistician (TAS) format, but it should be fairly consistent across diff --git a/tests/testit/test-formats.R b/tests/testit/test-formats.R index 9ac05cd5b..2a76510ae 100644 --- a/tests/testit/test-formats.R +++ b/tests/testit/test-formats.R @@ -40,7 +40,7 @@ test_format("aea") test_format("agu") test_format("ajs", skip = !rmarkdown::pandoc_available("2.7")) test_format("amq") -test_format("ams", output_options = list(citation_package = "default"), skip = rmarkdown::pandoc_available("3.1.7")) # ISSUE TO SOLVE WITH NATBIB / CITEPROC - See #444 +test_format("ams", skip = !rmarkdown::pandoc_available("2.10")) test_format("arxiv") test_format("asa") test_format("bioinformatics")