Skip to content

Commit

Permalink
add ams
Browse files Browse the repository at this point in the history
  • Loading branch information
yufree committed Nov 30, 2016
1 parent 666b3aa commit 5ec97e2
Show file tree
Hide file tree
Showing 8 changed files with 454 additions and 222 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
export(acm_article)
export(acs_article)
export(aea_article)
export(ams_article)
export(ctex)
export(ctex_template)
export(elsevier_article)
Expand Down
6 changes: 2 additions & 4 deletions R/ams_article.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@
#' @export
ams_article <- function(...,
keep_tex = TRUE,
md_extensions = c("-autolink_bare_uris"),
fig_caption = TRUE){
md_extensions = c("-autolink_bare_uris")){
pdf_document_format(...,
keep_tex = keep_tex,
md_extensions = md_extensions,
format = "ams_article",
template = "template.tex",
csl = "american-meteorological-society.csl",
fig_caption = fig_caption)
csl = "american-meteorological-society.csl")
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ The **rticles** package provides a suite of custom [R Markdown](http://rmarkdown

- [ACS](http://pubs.acs.org/) articles

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

- [Elsevier](https://www.elsevier.com) journal submissions

- [AEA](https://www.aeaweb.org/journals/policies/templates) journal submissions
Expand Down
42 changes: 24 additions & 18 deletions inst/rmarkdown/templates/ams_article/resources/template.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\documentclass{ametsoc}
\documentclass[$col$]{ametsoc}
\usepackage{color}
\usepackage{hyperref}
\journal{$journal$}
Expand All @@ -21,34 +21,40 @@
\bibpunct{(}{)}{;}{a}{}{,}
\title{$title$}

$if(authors.name)$
\authors{$authors.name$}
$if(author1)$
\authors{$author1$
$if(correspondingauthor)$
\correspondingauthor{$author1$,$correspondingauthor$}
$endif$

$if(authors.correspondingauthor)$
\correspondingauthor{$authors.correspondingauthor$}
$endif$

$if(authors.affiliation)$
\affiliation{$authors.affiliation$}
$if(author2)$
and $author2$
$if(currentaddress)$
\thanks{$currentaddress$}}
$endif$
$endif$
$if(affiliation)$
\affiliation{$affiliation$}
$endif$
$if(authors.exaffiliation)$
\extraaffil{$authors.exaffiliation$}
$if(extraauthor)$
\extraauthor{Extra Author}
$endif$
$if(exaffiliation)$
\extraaffil{$exaffiliation$}
$endif$

$if(authors.email)$
$if(email)$
$email$
$endif$

$for(exauthors)$
\extraauthor{$exauthors.name$}
\extraauthor{$exauthors.name$
$if(exauthors.correspondingauthor)$
\correspondingauthor{$exauthors.correspondingauthor$}
$endif$

$if(exauthors.affiliation)$
\affiliation{$exauthors.affiliation$}
\correspondingauthor{$exauthors.name$,$exauthors.correspondingauthor$}
$endif$
$if(exauthors.currentaddress)$
\thanks{$exauthors.currentaddress$}
$endif$}
$if(exauthors.exaffiliation)$
\extraaffil{$exauthors.exaffiliation$}
$endif$
Expand Down
Loading

0 comments on commit 5ec97e2

Please sign in to comment.