Skip to content
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

Add IOP template #462

Merged
merged 10 commits into from
Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rticles
Type: Package
Title: Article Formats for R Markdown
Version: 0.22.3
Version: 0.22.4
Authors@R: c(
person("JJ", "Allaire", role = "aut", email = "jj@rstudio.com"),
person("Yihui", "Xie", role = c("aut"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export(ieee_article)
export(ims_article)
export(informs_article)
export(isba_article)
export(iop_article)
export(jasa_article)
export(jedm_article)
export(joss_article)
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

- New `informs_article()` template for submissions to INFORMS journals (thanks, @robjhyndman, #460).

- New `iop_article()` template for submissions to IOP journals (thanks, @robjhyndman, #462).

- New `isba_article()` template for submissions to Bayesian Analysis journal (thanks, @dmi3kno, #461).

- Update Copernicus Publications template to version 6.6 from 2022-01-18 (@RLumSK, #463, #464)
Expand Down
11 changes: 11 additions & 0 deletions R/article.R
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,17 @@ informs_article <- function(..., keep_tex = TRUE, citation_package = "natbib") {
)
}

#' @section `iop_article`: Format for creating submissions to
#' IOP journals. Adapted from \samp{https://publishingsupport.iopscience.iop.org/questions/latex-template/}.
robjhyndman marked this conversation as resolved.
Show resolved Hide resolved
#' Please read the guidelines at this link when preparing your article.
#' @export
#' @rdname article
iop_article <- function(..., keep_tex = TRUE, citation_package = "natbib") {
robjhyndman marked this conversation as resolved.
Show resolved Hide resolved
pdf_document_format(
"iop", keep_tex = keep_tex, citation_package = citation_package, ...
)
}

#' @section `jasa_article`: Format for creating submissions to the
#' Journal of the Acoustical Society of America. Adapted from
#' <https://acousticalsociety.org/preparing-latex-manuscripts/>.
Expand Down
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Currently included templates and their contributors are the following:
| [IMS: Institute of Mathematical Statistics](https://imstat.org/) [AoAS: Annals of Applied Statistics](https://imstat.org/journals-and-publications/annals-of-applied-statistics/) | [\@auzaheta](https://github.com/auzaheta)| [\#372](https://github.com/rstudio/rticles/pull/372) | `ims_article()`|
| [INFORMS: Institute for Operations Research and the Management Sciences](https://informs.org/) | [\@robjhyndman](https://github.com/robjhyndman)| [\#460](https://github.com/rstudio/rticles/pull/460) | `informs_article()`|
| [ISBA: International Society for Bayesian Analysis](https://bayesian.org/) | [\@dmi3nko](https://github.com/dmi3kno)| [\#461](https://github.com/rstudio/rticles/pull/461) | `informs_article()`|
| [IOP: Institute of Physics](https://iopscience.iop.org) | [\@robjhyndman](https://github.com/robjhyndman)| [\#462](https://github.com/rstudio/rticles/pull/462) | `iop_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()` |
| [Journal of Educational Data Mining](https://jedm.educationaldatamining.org/index.php/JEDM/about/submissions) journal submissions | [\@jooyoungseo](https://github.com/jooyoungseo) | [#251](https://github.com/rstudio/rticles/pull/251) | `jedm_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()` |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Currently included templates and their contributors are the following:
| [IMS: Institute of Mathematical Statistics](https://imstat.org/) [AoAS: Annals of Applied Statistics](https://imstat.org/journals-and-publications/annals-of-applied-statistics/) | [@auzaheta](https://github.com/auzaheta) | [\#372](https://github.com/rstudio/rticles/pull/372) | `ims_article()` |
| [INFORMS: Institute for Operations Research and the Management Sciences](https://informs.org/) | [@robjhyndman](https://github.com/robjhyndman) | [\#460](https://github.com/rstudio/rticles/pull/460) | `informs_article()` |
| [ISBA: International Society for Bayesian Analysis](https://bayesian.org/) | [@dmi3nko](https://github.com/dmi3kno) | [\#461](https://github.com/rstudio/rticles/pull/461) | `informs_article()` |
| [IOP: Institute of Physics](https://iopscience.iop.org) | [@robjhyndman](https://github.com/robjhyndman) | [\#462](https://github.com/rstudio/rticles/pull/462) | `iop_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()` |
| [Journal of Educational Data Mining](https://jedm.educationaldatamining.org/index.php/JEDM/about/submissions) journal submissions | [@jooyoungseo](https://github.com/jooyoungseo) | [\#251](https://github.com/rstudio/rticles/pull/251) | `jedm_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()` |
Expand Down
144 changes: 144 additions & 0 deletions inst/rmarkdown/templates/iop/resources/template.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Author template for Institute of Physics (IOP) Journal articles
%% Adapted for rticles by Rob J Hyndman Rob.Hyndman@monash.edu. Dec 2021
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[$if(fontsize)$$fontsize$$else$$if(twocolumn)$10pt$else$12pt$endif$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{iopart}

%% BEGIN MY ADDITIONS %%
\pdfminorversion=4
\usepackage{hyperref, graphicx, booktabs, longtable}
% Bibliography allowing natbib with Harvard or Vancouver
$if(natbib)$
\usepackage{har2nat} % loads 'natbib' automatically
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$dcu$endif$}
\providecommand\newblock{} % suppress some meaningless warnings
$else$
$if(biblatex)$
% BibLaTeX setup, recommended
\usepackage[backend=biber,
style=$if(biblio-style)$$biblio-style$$else$authoryear$endif$,
mincrossrefs=50,
maxcitenames=3,
maxbibnames=50,
useprefix=true,
doi=false]{biblatex}
$for(bibliography)$
\addbibresource{$bibliography$}
$endfor$
% remember to include the .bib extension
% remember to run biber rather than bibtex if using this option
\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{99}}}
$endif$ %biblatex
$endif$ %natbib

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

% tightlist command for lists without linebreak
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}

$if(tables)$
% From pandoc table feature
\usepackage{array}
$if(multirow)$
\usepackage{multirow}
$endif$
\usepackage{calc} % for calculating minipage widths
% Correct order of tables after \paragraph or \subparagraph
\usepackage{etoolbox}
$endif$

$if(csl-refs)$
% Pandoc citation processing
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newlength{\cslentryspacingunit} % times entry-spacing
\setlength{\cslentryspacingunit}{\parskip}
% 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}[2] % #1 hanging-ident, #2 entry spacing
{% don't indent paragraphs
\setlength{\parindent}{0pt}
% turn on hanging indent if param 1 is 1
\ifodd #1
\let\oldpar\par
\def\par{\hangindent=\cslhangindent\oldpar}
\fi
% set entry spacing
\setlength{\parskip}{#2\cslentryspacingunit}
}%
{}
\usepackage{calc}
\newcommand{\CSLBlock}[1]{#1\hfill\break}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
$endif$

%% END MY ADDITIONS %%

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


%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%

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

$endfor$

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

$for(authors)$
\author{$authors.name$$if(authors.footnote)$\footnote{$authors.footnote$}$endif$}
$if(authors.address)$\address{$authors.address$}$endif$
$if(authors.email)$\ead{$authors.email$}$endif$
$endfor$

\begin{abstract}
$abstract$
\end{abstract}

$if(msc)$\ams{$msc$}$endif$

\vspace{0.5cm}\noindent\textit{Keywords}: $for(keywords)$$keywords$$sep$, $endfor$

\maketitle

$if(twocolumn)$\ioptwocol$endif$

$body$

$if(acknowledgments)$
\ack{$acknowledgments$}
$endif$

$if(biblatex)$
\printbibliography
$else$
$if(bibliography)$
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
$endif$
$endif$


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

$endfor$


\end{document}
1 change: 1 addition & 0 deletions inst/rmarkdown/templates/iop/skeleton/iopams.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
%% %% This is file `iopams.sty'%% File to include AMS fonts and extra definitions for bold greek %% characters for use with iopart.cls%%\NeedsTeXFormat{LaTeX2e}\ProvidesPackage{iopams}[1997/02/13 v1.0]\RequirePackage{amsgen}[1995/01/01]\RequirePackage{amsfonts}[1995/01/01]\RequirePackage{amssymb}[1995/01/01]\RequirePackage{amsbsy}[1995/01/01]%\iopamstrue % \newif\ifiopams in iopart.cls & iopbk2e.cls% % allows optional text to be in author guidelines%% Bold lower case Greek letters%\newcommand{\balpha}{\boldsymbol{\alpha}}\newcommand{\bbeta}{\boldsymbol{\beta}}\newcommand{\bgamma}{\boldsymbol{\gamma}}\newcommand{\bdelta}{\boldsymbol{\delta}}\newcommand{\bepsilon}{\boldsymbol{\epsilon}}\newcommand{\bzeta}{\boldsymbol{\zeta}}\newcommand{\bfeta}{\boldsymbol{\eta}}\newcommand{\btheta}{\boldsymbol{\theta}}\newcommand{\biota}{\boldsymbol{\iota}}\newcommand{\bkappa}{\boldsymbol{\kappa}}\newcommand{\blambda}{\boldsymbol{\lambda}}\newcommand{\bmu}{\boldsymbol{\mu}}\newcommand{\bnu}{\boldsymbol{\nu}}\newcommand{\bxi}{\boldsymbol{\xi}}\newcommand{\bpi}{\boldsymbol{\pi}}\newcommand{\brho}{\boldsymbol{\rho}}\newcommand{\bsigma}{\boldsymbol{\sigma}}\newcommand{\btau}{\boldsymbol{\tau}}\newcommand{\bupsilon}{\boldsymbol{\upsilon}}\newcommand{\bphi}{\boldsymbol{\phi}}\newcommand{\bchi}{\boldsymbol{\chi}}\newcommand{\bpsi}{\boldsymbol{\psi}}\newcommand{\bomega}{\boldsymbol{\omega}}\newcommand{\bvarepsilon}{\boldsymbol{\varepsilon}}\newcommand{\bvartheta}{\boldsymbol{\vartheta}}\newcommand{\bvaromega}{\boldsymbol{\varomega}}\newcommand{\bvarrho}{\boldsymbol{\varrho}}\newcommand{\bvarzeta}{\boldsymbol{\varsigma}} %NB really sigma\newcommand{\bvarsigma}{\boldsymbol{\varsigma}}\newcommand{\bvarphi}{\boldsymbol{\varphi}}%% Bold upright capital Greek letters%\newcommand{\bGamma}{\boldsymbol{\Gamma}}\newcommand{\bDelta}{\boldsymbol{\Delta}}\newcommand{\bTheta}{\boldsymbol{\Theta}}\newcommand{\bLambda}{\boldsymbol{\Lambda}}\newcommand{\bXi}{\boldsymbol{\Xi}}\newcommand{\bPi}{\boldsymbol{\Pi}}\newcommand{\bSigma}{\boldsymbol{\Sigma}}\newcommand{\bUpsilon}{\boldsymbol{\Upsilon}}\newcommand{\bPhi}{\boldsymbol{\Phi}}\newcommand{\bPsi}{\boldsymbol{\Psi}}\newcommand{\bOmega}{\boldsymbol{\Omega}}%% Bold versions of miscellaneous symbols%\newcommand{\bpartial}{\boldsymbol{\partial}}\newcommand{\bell}{\boldsymbol{\ell}}\newcommand{\bimath}{\boldsymbol{\imath}}\newcommand{\bjmath}{\boldsymbol{\jmath}}\newcommand{\binfty}{\boldsymbol{\infty}}\newcommand{\bnabla}{\boldsymbol{\nabla}}\newcommand{\bdot}{\boldsymbol{\cdot}}%% Symbols for caption%\renewcommand{\opensquare}{\mbox{$\square$}}\renewcommand{\opentriangle}{\mbox{$\vartriangle$}}\renewcommand{\opentriangledown}{\mbox{$\triangledown$}}\renewcommand{\opendiamond}{\mbox{$\lozenge$}}\renewcommand{\fullsquare}{\mbox{$\blacksquare$}}\newcommand{\fulldiamond}{\mbox{$\blacklozenge$}}\newcommand{\fullstar}{\mbox{$\bigstar$}}\newcommand{\fulltriangle}{\mbox{$\blacktriangle$}}\newcommand{\fulltriangledown}{\mbox{$\blacktriangledown$}}\endinput%% %% End of file `iopams.sty'.
Expand Down
Loading