Skip to content

Commit c1a3da6

Browse files
author
Stefano Coretta
authored
add jasa_article() (#364)
1 parent 3365349 commit c1a3da6

File tree

15 files changed

+6821
-1
lines changed

15 files changed

+6821
-1
lines changed

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ Authors@R: c(
4444
person("Shixiang", "Wang", role = c("aut", "ctb"), email = "w_shixiang@163.com", comment = c(ORCID = "0000-0001-9855-7357")),
4545
person('Jay', 'Hesselberth', role = c('aut', 'ctb'), email = 'jay.hesselberth@gmail.com', comment = c(ORCID = '0000-0002-6299-179X')),
4646
person("Alfredo", "Hernández", role = c("ctb"), email = "aldomann.designs@gmail.com", comment = c(ORCID = "0000-0002-2660-4545")),
47-
person("Christophe", "Dervieux", role = c("aut"), email = "cderv@rstudio.com", comment = c(ORCID = "0000-0003-4474-2498"))
47+
person("Christophe", "Dervieux", role = c("aut"), email = "cderv@rstudio.com", comment = c(ORCID = "0000-0003-4474-2498")),
48+
person("Stefano", "Coretta", role = c("ctb"), email = "stefano.coretta@gmail.com", comment = c(ORCID = "0000-0001-9627-5532", github = "stefanocoretta"))
4849
)
4950
Description: A suite of custom R Markdown formats and templates for
5051
authoring journal articles and conference submissions.

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export(ctex_article)
1717
export(elsevier_article)
1818
export(frontiers_article)
1919
export(ieee_article)
20+
export(jasa_article)
2021
export(joss_article)
2122
export(journals)
2223
export(jss_article)

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ fix for the LaTeX problem sanitized with the last `rticles` update (thanks, @RLu
2121

2222
- Update all templates regarding CSLReference environment following changes in Pandoc's default template.
2323

24+
- Add article template `jasa_article()` for the *Journal of the Acoustical Society of America* (JASA) (thanks, @stefanocoretta, #364)
25+
2426
rticles 0.17
2527
---------------------------------------------------------------------
2628

R/article.R

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,20 @@ frontiers_article <- function(..., keep_tex = TRUE) {
175175
pdf_document_format("frontiers", keep_tex = keep_tex, ...)
176176
}
177177

178+
#' @section \code{jasa_article}: Format for creating submissions to the
179+
#' Journal of the Acoustical Society of America. Adapted from
180+
#' \url{https://acousticalsociety.org/preparing-latex-manuscripts/}.
181+
#' @export
182+
#' @rdname article
183+
jasa_article <- function(
184+
..., keep_tex = TRUE, latex_engine = "xelatex", citation_package = "natbib"
185+
) {
186+
pdf_document_format(
187+
"jasa", keep_tex = keep_tex, latex_engine = latex_engine,
188+
citation_package = citation_package, ...
189+
)
190+
}
191+
178192
#' @section \code{lipics_article}: Format for creating submissions to
179193
#' LIPIcs - Leibniz International Proceedings Informatics - articles.
180194
#' Adapted from the official Instructions for Authors at

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Currently included templates and their contributors are the following:
4040
| [Elsevier](https://www.elsevier.com) | [@cboettig](https://github.com/cboettig) | [#27](https://github.com/rstudio/rticles/pull/27) | `elsevier_article()` |
4141
| [Frontiers](https://www.frontiersin.org/) | [@muschellij2](https://github.com/muschellij2) | [#211](https://github.com/rstudio/rticles/pull/211) | `frontiers_article()` |
4242
| [IEEE Transaction](http://www.ieee.org/publications_standards/publications/authors/author_templates.html) | [@Emaasit](https://github.com/Emaasit), [@espinielli](https://github.com/espinielli), [@nathanweeks](https://github.com/nathanweeks), [@DunLug](https://github.com/DunLug) | [#97](https://github.com/rstudio/rticles/pull/97), [#169](https://github.com/rstudio/rticles/pull/169), [#227](https://github.com/rstudio/rticles/pull/227), [#263](https://github.com/rstudio/rticles/pull/263), [#264](https://github.com/rstudio/rticles/pull/264), [#265](https://github.com/rstudio/rticles/pull/265) | `ieee_article()` |
43+
| [JASA: Journal of the Acoustical Society of America](https://asa.scitation.org/journal/jas) | [@stefanocoretta](https://github.com/stefanocoretta) | [#364](https://github.com/rstudio/rticles/pull/364) | `jasa_article()` |
4344
| [JOSS: Journal of Open Source Software](https://joss.theoj.org/) [JOSE: Journal of Open Source Education](https://jose.theoj.org/) | [@noamross](https://github.com/noamross) | [#229](https://github.com/rstudio/rticles/pull/229) | `joss_article()` |
4445
| [JSS: Journal of Statistical Software](https://www.jstatsoft.org) | | | `jss_article()` |
4546
| [LIPIcs](https://www.dagstuhl.de/en/publications/lipics) | [@nuest](https://github.com/nuest) | [#288](https://github.com/rstudio/rticles/pull/288) | `lipics_article()` |
Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2+
% JASA LaTeX Template File
3+
% To make articles using JASA.cls, Version 1.1
4+
% September 14, 2019
5+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6+
7+
%% Step 1:
8+
%% Uncomment the style that you want to use:
9+
10+
%%%%%%% For Preprint
11+
%% For manuscript, 12pt, one column style
12+
13+
\documentclass[$for(classoption)$$classoption$$sep$,$endfor$]{JASA}
14+
15+
%%%%% Preprint Options %%%%%
16+
%% The track changes option allows you to mark changes
17+
%% and will produce a list of changes, their line number
18+
%% and page number at the end of the article.
19+
%\documentclass[preprint,trackchanges]{JASA}
20+
21+
22+
%% NumberedRefs is used for numbered bibliography and citations.
23+
%% Default is Author-Year style.
24+
%% \documentclass[preprint,NumberedRefs]{JASA}
25+
26+
%%%%%%% For Reprint
27+
%% For appearance of finished article; 2 columns, 10 pt fonts
28+
29+
% \documentclass[reprint]{JASA}
30+
31+
%%%%% Reprint Options %%%%%
32+
33+
%% For testing to see if author has exceeded page length request, use 12pt option
34+
%\documentclass[reprint,12pt]{JASA}
35+
36+
37+
%% NumberedRefs is used for numbered bibliography and citations.
38+
%% Default is Author-Year style.
39+
% \documentclass[reprint,NumberedRefs]{JASA}
40+
41+
%% TurnOnLineNumbers
42+
%% Make lines be numbered in reprint style:
43+
% \documentclass[reprint,TurnOnLineNumbers]{JASA}
44+
45+
$if(natbib)$
46+
\usepackage{natbib}
47+
$endif$
48+
49+
$if(listings)$
50+
\usepackage{listings}
51+
$endif$
52+
$if(lhs)$
53+
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
54+
$endif$
55+
56+
% Pandoc syntax highlighting
57+
$if(highlighting-macros)$
58+
$highlighting-macros$
59+
$endif$
60+
61+
% Pandoc citation processing
62+
$if(csl-refs)$
63+
\newlength{\csllabelwidth}
64+
\setlength{\csllabelwidth}{3em}
65+
\newlength{\cslhangindent}
66+
\setlength{\cslhangindent}{1.5em}
67+
% for Pandoc 2.8 to 2.10.1
68+
\newenvironment{cslreferences}%
69+
{$if(csl-hanging-indent)$\setlength{\parindent}{0pt}%
70+
\everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}%
71+
{\par}
72+
% For Pandoc 2.11+
73+
\newenvironment{CSLReferences}[3] % #1 hanging-ident, #2 entry spacing
74+
{% don't indent paragraphs
75+
\setlength{\parindent}{0pt}
76+
% turn on hanging indent if param 1 is 1
77+
\ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi
78+
% set entry spacing
79+
\ifnum #2 > 0
80+
\setlength{\parskip}{#2\baselineskip}
81+
\fi
82+
}%
83+
{}
84+
\usepackage{calc} % for calculating minipage widths
85+
\newcommand{\CSLBlock}[1]{#1\hfill\break}
86+
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
87+
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}}
88+
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
89+
$endif$
90+
91+
$if(verbatim-in-note)$
92+
\usepackage{fancyvrb}
93+
\VerbatimFootnotes % allows verbatim text in footnotes
94+
$endif$
95+
96+
$for(header-includes)$
97+
$header-includes$
98+
$endfor$
99+
100+
\begin{document}
101+
%% the square bracket argument will send term to running head in
102+
%% preprint, or running foot in reprint style.
103+
104+
\title[$if(shorttitle)$$shorttitle$$endif$]{$title$}
105+
106+
% ie
107+
%\title[JASA/Sample JASA Article]{Sample JASA Article}
108+
109+
%% repeat as needed
110+
111+
$for(author)$
112+
\author{$author.name$}
113+
% ie
114+
%\affiliation{Department1, University1, City, State ZipCode, Country}
115+
\affiliation{$author.affiliation$}
116+
%% for corresponding author
117+
$if(author.email)$\email{$author.email$}$endif$
118+
%% for additional information
119+
$if(author.thanks)$\thanks{$author.thanks$}$endif$
120+
$endfor$
121+
122+
% ie
123+
% \author{Author Four}
124+
% \email{author.four@university.edu}
125+
% \thanks{Also at Another University, City, State ZipCode, Country.}
126+
127+
%% For preprint only,
128+
% optional, if you want want this message to appear in upper left corner of title page
129+
$if(preprint_notice)$\preprint{$preprint_notice$}$endif$
130+
131+
%ie
132+
%\preprint{Author, JASA}
133+
134+
% optional, if desired:
135+
%\date{\today}
136+
$if(date)$\date{\today}$endif$
137+
138+
$if(abstract)$
139+
\begin{abstract}
140+
% Put your abstract here. Abstracts are limited to 200 words for
141+
% regular articles and 100 words for Letters to the Editor. Please no
142+
% personal pronouns, also please do not use the words ``new'' and/or
143+
% ``novel'' in the abstract. An article usually includes an abstract, a
144+
% concise summary of the work covered at length in the main body of the
145+
% article.
146+
$abstract$
147+
\end{abstract}
148+
$endif$
149+
150+
%% pacs numbers not used
151+
152+
\maketitle
153+
154+
% End of title page for Preprint option --------------------------------- %
155+
156+
%% See preprint.tex/.pdf or reprint.tex/.pdf for many examples
157+
158+
$for(include-before)$
159+
$include-before$
160+
$endfor$
161+
162+
% Body of the article
163+
$body$
164+
165+
% -------------------------------------------------------------------------------------------------------------------
166+
% Appendix (optional)
167+
168+
%\appendix
169+
%\section{Appendix title}
170+
171+
%If only one appendix, please use
172+
%\appendix*
173+
%\section{Appendix title}
174+
175+
176+
%=======================================================
177+
178+
%Use \bibliography{<name of your .bib file>}+
179+
%to make your bibliography with BibTeX.
180+
181+
%=======================================================
182+
183+
$if(natbib)$
184+
$if(bibliography)$
185+
$if(biblio-title)$
186+
$if(book-class)$
187+
\renewcommand\bibname{$biblio-title$}
188+
$else$
189+
\renewcommand\refname{$biblio-title$}
190+
$endif$
191+
$endif$
192+
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
193+
$endif$
194+
$endif$
195+
$if(biblatex)$
196+
\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
197+
$endif$
198+
199+
$for(include-after)$
200+
$include-after$
201+
$endfor$
202+
203+
\end{document}

0 commit comments

Comments
 (0)