Skip to content

add jasa_article() #364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8496de9
add jasa_article()
Dec 26, 2020
b225c4f
fix package name
Jan 2, 2021
c88deda
remove unnecessary comment
Jan 7, 2021
5c9edaa
capitalise template name
Jan 7, 2021
ddc9935
remove font options from template
Jan 7, 2021
e1f53ec
remove biblatex
Jan 7, 2021
2e5e455
add comment for pandoc highlighting macros
Jan 7, 2021
94050bf
add yaml variable acknowledgements
Jan 7, 2021
7736eff
remove acknowledgements and appendix from skeleton
Jan 7, 2021
20b2f9d
use custom blocks for acknowledgements and appendices
Jan 7, 2021
8da2be7
add optional date
Jan 7, 2021
c4ee87b
use backtick fenced blocks for showing code
Jan 8, 2021
315d6fb
add preprint/reprint and their options in the yaml of jasa article
Jan 8, 2021
fa7abd7
remove unused acknowledgements code in jasa template
Jan 8, 2021
4239218
use markdown for appendices headings in jasa skeleton
Jan 8, 2021
5f9cd0f
avoid new pandoc syntax in jasa article
Jan 12, 2021
ce40de2
add bib examples in jasa articles; use natbib by default
Jan 12, 2021
ce83566
add figure and maths examples in jasa article
Jan 15, 2021
51e9f9a
include install of revtex4-1 for jasa template if tinytex
Jan 20, 2021
4649ed5
update revtex4-1 notice for non-TinyTex users
Jan 20, 2021
02de236
add acknowledgement to NEWS.md
cderv Jan 21, 2021
1d072d7
natbib is the default but can be changed
cderv Jan 21, 2021
2bd5526
Add PR number to README
cderv Jan 21, 2021
816557d
Add required code for Pandoc citeproc
cderv Jan 21, 2021
350d2cc
prerint_notice -> preprint_notice
cderv Jan 21, 2021
5bc2ba4
precision on the date
cderv Jan 21, 2021
9974ecc
Place the field after classoption comments
cderv Jan 21, 2021
969dd81
style
cderv Jan 21, 2021
5f77403
Let the doc install the package
cderv Jan 21, 2021
d4b3686
missing doc
cderv Jan 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ Authors@R: c(
person("Shixiang", "Wang", role = c("aut", "ctb"), email = "w_shixiang@163.com", comment = c(ORCID = "0000-0001-9855-7357")),
person('Jay', 'Hesselberth', role = c('aut', 'ctb'), email = 'jay.hesselberth@gmail.com', comment = c(ORCID = '0000-0002-6299-179X')),
person("Alfredo", "Hernández", role = c("ctb"), email = "aldomann.designs@gmail.com", comment = c(ORCID = "0000-0002-2660-4545")),
person("Christophe", "Dervieux", role = c("aut"), email = "cderv@rstudio.com", comment = c(ORCID = "0000-0003-4474-2498"))
person("Christophe", "Dervieux", role = c("aut"), email = "cderv@rstudio.com", comment = c(ORCID = "0000-0003-4474-2498")),
person("Stefano", "Coretta", role = c("ctb"), email = "stefano.coretta@gmail.com", comment = c(ORCID = "0000-0001-9627-5532", github = "stefanocoretta"))
)
Description: A suite of custom R Markdown formats and templates for
authoring journal articles and conference submissions.
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export(ctex_article)
export(elsevier_article)
export(frontiers_article)
export(ieee_article)
export(jasa_article)
export(joss_article)
export(journals)
export(jss_article)
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ fix for the LaTeX problem sanitized with the last `rticles` update (thanks, @RLu

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

- Add article template `jasa_article()` for the *Journal of the Acoustical Society of America* (JASA) (thanks, @stefanocoretta, #364)

rticles 0.17
---------------------------------------------------------------------

Expand Down
14 changes: 14 additions & 0 deletions R/article.R
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,20 @@ frontiers_article <- function(..., keep_tex = TRUE) {
pdf_document_format("frontiers", keep_tex = keep_tex, ...)
}

#' @section \code{jasa_article}: Format for creating submissions to the
#' Journal of the Acoustical Society of America. Adapted from
#' \url{https://acousticalsociety.org/preparing-latex-manuscripts/}.
#' @export
#' @rdname article
jasa_article <- function(
..., keep_tex = TRUE, latex_engine = "xelatex", citation_package = "natbib"
) {
pdf_document_format(
"jasa", keep_tex = keep_tex, latex_engine = latex_engine,
citation_package = citation_package, ...
)
}

#' @section \code{lipics_article}: Format for creating submissions to
#' LIPIcs - Leibniz International Proceedings Informatics - articles.
#' Adapted from the official Instructions for Authors at
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Currently included templates and their contributors are the following:
| [Elsevier](https://www.elsevier.com) | [@cboettig](https://github.com/cboettig) | [#27](https://github.com/rstudio/rticles/pull/27) | `elsevier_article()` |
| [Frontiers](https://www.frontiersin.org/) | [@muschellij2](https://github.com/muschellij2) | [#211](https://github.com/rstudio/rticles/pull/211) | `frontiers_article()` |
| [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()` |
| [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()` |
| [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()` |
| [JSS: Journal of Statistical Software](https://www.jstatsoft.org) | | | `jss_article()` |
| [LIPIcs](https://www.dagstuhl.de/en/publications/lipics) | [@nuest](https://github.com/nuest) | [#288](https://github.com/rstudio/rticles/pull/288) | `lipics_article()` |
Expand Down
203 changes: 203 additions & 0 deletions inst/rmarkdown/templates/jasa/resources/template.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% JASA LaTeX Template File
% To make articles using JASA.cls, Version 1.1
% September 14, 2019
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% Step 1:
%% Uncomment the style that you want to use:

%%%%%%% For Preprint
%% For manuscript, 12pt, one column style

\documentclass[$for(classoption)$$classoption$$sep$,$endfor$]{JASA}

%%%%% Preprint Options %%%%%
%% The track changes option allows you to mark changes
%% and will produce a list of changes, their line number
%% and page number at the end of the article.
%\documentclass[preprint,trackchanges]{JASA}


%% NumberedRefs is used for numbered bibliography and citations.
%% Default is Author-Year style.
%% \documentclass[preprint,NumberedRefs]{JASA}

%%%%%%% For Reprint
%% For appearance of finished article; 2 columns, 10 pt fonts

% \documentclass[reprint]{JASA}

%%%%% Reprint Options %%%%%

%% For testing to see if author has exceeded page length request, use 12pt option
%\documentclass[reprint,12pt]{JASA}


%% NumberedRefs is used for numbered bibliography and citations.
%% Default is Author-Year style.
% \documentclass[reprint,NumberedRefs]{JASA}

%% TurnOnLineNumbers
%% Make lines be numbered in reprint style:
% \documentclass[reprint,TurnOnLineNumbers]{JASA}

$if(natbib)$
\usepackage{natbib}
$endif$

$if(listings)$
\usepackage{listings}
$endif$
$if(lhs)$
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
$endif$

% Pandoc syntax highlighting
$if(highlighting-macros)$
$highlighting-macros$
$endif$

% Pandoc citation processing
$if(csl-refs)$
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
% for Pandoc 2.8 to 2.10.1
\newenvironment{cslreferences}%
{$if(csl-hanging-indent)$\setlength{\parindent}{0pt}%
\everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}%
{\par}
% For Pandoc 2.11+
\newenvironment{CSLReferences}[3] % #1 hanging-ident, #2 entry spacing
{% don't indent paragraphs
\setlength{\parindent}{0pt}
% turn on hanging indent if param 1 is 1
\ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi
% set entry spacing
\ifnum #2 > 0
\setlength{\parskip}{#2\baselineskip}
\fi
}%
{}
\usepackage{calc} % for calculating minipage widths
\newcommand{\CSLBlock}[1]{#1\hfill\break}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
$endif$

$if(verbatim-in-note)$
\usepackage{fancyvrb}
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$

$for(header-includes)$
$header-includes$
$endfor$

\begin{document}
%% the square bracket argument will send term to running head in
%% preprint, or running foot in reprint style.

\title[$if(shorttitle)$$shorttitle$$endif$]{$title$}

% ie
%\title[JASA/Sample JASA Article]{Sample JASA Article}

%% repeat as needed

$for(author)$
\author{$author.name$}
% ie
%\affiliation{Department1, University1, City, State ZipCode, Country}
\affiliation{$author.affiliation$}
%% for corresponding author
$if(author.email)$\email{$author.email$}$endif$
%% for additional information
$if(author.thanks)$\thanks{$author.thanks$}$endif$
$endfor$

% ie
% \author{Author Four}
% \email{author.four@university.edu}
% \thanks{Also at Another University, City, State ZipCode, Country.}

%% For preprint only,
% optional, if you want want this message to appear in upper left corner of title page
$if(preprint_notice)$\preprint{$preprint_notice$}$endif$

%ie
%\preprint{Author, JASA}

% optional, if desired:
%\date{\today}
$if(date)$\date{\today}$endif$

$if(abstract)$
\begin{abstract}
% Put your abstract here. Abstracts are limited to 200 words for
% regular articles and 100 words for Letters to the Editor. Please no
% personal pronouns, also please do not use the words ``new'' and/or
% ``novel'' in the abstract. An article usually includes an abstract, a
% concise summary of the work covered at length in the main body of the
% article.
$abstract$
\end{abstract}
$endif$

%% pacs numbers not used

\maketitle

% End of title page for Preprint option --------------------------------- %

%% See preprint.tex/.pdf or reprint.tex/.pdf for many examples

$for(include-before)$
$include-before$
$endfor$

% Body of the article
$body$

% -------------------------------------------------------------------------------------------------------------------
% Appendix (optional)

%\appendix
%\section{Appendix title}

%If only one appendix, please use
%\appendix*
%\section{Appendix title}


%=======================================================

%Use \bibliography{<name of your .bib file>}+
%to make your bibliography with BibTeX.

%=======================================================

$if(natbib)$
$if(bibliography)$
$if(biblio-title)$
$if(book-class)$
\renewcommand\bibname{$biblio-title$}
$else$
\renewcommand\refname{$biblio-title$}
$endif$
$endif$
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
$endif$
$endif$
$if(biblatex)$
\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
$endif$

$for(include-after)$
$include-after$
$endfor$

\end{document}
Loading