Skip to content

Commit c687c96

Browse files
robjhyndmancderv
andauthored
Add IOP template (#462)
Co-authored-by: Christophe Dervieux <christophe.dervieux@gmail.com>
1 parent 5e16c9f commit c687c96

File tree

16 files changed

+1419
-1
lines changed

16 files changed

+1419
-1
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: rticles
22
Type: Package
33
Title: Article Formats for R Markdown
4-
Version: 0.22.3
4+
Version: 0.22.4
55
Authors@R: c(
66
person("JJ", "Allaire", role = "aut", email = "jj@rstudio.com"),
77
person("Yihui", "Xie", role = c("aut"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export(ieee_article)
2222
export(ims_article)
2323
export(informs_article)
2424
export(isba_article)
25+
export(iop_article)
2526
export(jasa_article)
2627
export(jedm_article)
2728
export(joss_article)

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

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

9+
- New `iop_article()` template for submissions to IOP journals (thanks, @robjhyndman, #462).
10+
911
- New `isba_article()` template for submissions to Bayesian Analysis journal (thanks, @dmi3kno, #461).
1012

1113
- Update Copernicus Publications template to version 6.6 from 2022-01-18 (@RLumSK, #463, #464)

R/article.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,17 @@ informs_article <- function(..., keep_tex = TRUE, citation_package = "natbib") {
256256
)
257257
}
258258

259+
#' @section `iop_article`: Format for creating submissions to
260+
#' IOP journals. Adapted from \samp{https://publishingsupport.iopscience.iop.org/questions/latex-template/}.
261+
#' Please read the guidelines at this link when preparing your article.
262+
#' @export
263+
#' @rdname article
264+
iop_article <- function(..., keep_tex = TRUE, citation_package = "natbib") {
265+
pdf_document_format(
266+
"iop", keep_tex = keep_tex, citation_package = citation_package, ...
267+
)
268+
}
269+
259270
#' @section `jasa_article`: Format for creating submissions to the
260271
#' Journal of the Acoustical Society of America. Adapted from
261272
#' <https://acousticalsociety.org/preparing-latex-manuscripts/>.

README.Rmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Currently included templates and their contributors are the following:
6363
| [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()`|
6464
| [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()`|
6565
| [ISBA: International Society for Bayesian Analysis](https://bayesian.org/) | [\@dmi3nko](https://github.com/dmi3kno)| [\#461](https://github.com/rstudio/rticles/pull/461) | `informs_article()`|
66+
| [IOP: Institute of Physics](https://iopscience.iop.org) | [\@robjhyndman](https://github.com/robjhyndman)| [\#462](https://github.com/rstudio/rticles/pull/462) | `iop_article()`|
6667
| [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()` |
6768
| [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()` |
6869
| [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()` |

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Currently included templates and their contributors are the following:
8989
| [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()` |
9090
| [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()` |
9191
| [ISBA: International Society for Bayesian Analysis](https://bayesian.org/) | [@dmi3nko](https://github.com/dmi3kno) | [\#461](https://github.com/rstudio/rticles/pull/461) | `informs_article()` |
92+
| [IOP: Institute of Physics](https://iopscience.iop.org) | [@robjhyndman](https://github.com/robjhyndman) | [\#462](https://github.com/rstudio/rticles/pull/462) | `iop_article()` |
9293
| [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()` |
9394
| [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()` |
9495
| [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()` |
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2+
%% Author template for Institute of Physics (IOP) Journal articles
3+
%% Adapted for rticles by Rob J Hyndman Rob.Hyndman@monash.edu. Dec 2021
4+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5+
\documentclass[$if(fontsize)$$fontsize$$else$$if(twocolumn)$10pt$else$12pt$endif$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{iopart}
6+
7+
%% BEGIN MY ADDITIONS %%
8+
\pdfminorversion=4
9+
\usepackage{hyperref, graphicx, booktabs, longtable}
10+
% Bibliography allowing natbib with Harvard or Vancouver
11+
$if(natbib)$
12+
\usepackage{har2nat} % loads 'natbib' automatically
13+
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$dcu$endif$}
14+
\providecommand\newblock{} % suppress some meaningless warnings
15+
$else$
16+
$if(biblatex)$
17+
% BibLaTeX setup, recommended
18+
\usepackage[backend=biber,
19+
style=$if(biblio-style)$$biblio-style$$else$authoryear$endif$,
20+
mincrossrefs=50,
21+
maxcitenames=3,
22+
maxbibnames=50,
23+
useprefix=true,
24+
doi=false]{biblatex}
25+
$for(bibliography)$
26+
\addbibresource{$bibliography$}
27+
$endfor$
28+
% remember to include the .bib extension
29+
% remember to run biber rather than bibtex if using this option
30+
\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{99}}}
31+
$endif$ %biblatex
32+
$endif$ %natbib
33+
34+
$if(highlighting-macros)$
35+
% Pandoc syntax highlighting
36+
$highlighting-macros$
37+
$endif$
38+
39+
% tightlist command for lists without linebreak
40+
\providecommand{\tightlist}{%
41+
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
42+
43+
$if(tables)$
44+
% From pandoc table feature
45+
\usepackage{array}
46+
$if(multirow)$
47+
\usepackage{multirow}
48+
$endif$
49+
\usepackage{calc} % for calculating minipage widths
50+
% Correct order of tables after \paragraph or \subparagraph
51+
\usepackage{etoolbox}
52+
$endif$
53+
54+
$if(csl-refs)$
55+
% Pandoc citation processing
56+
\newlength{\cslhangindent}
57+
\setlength{\cslhangindent}{1.5em}
58+
\newlength{\csllabelwidth}
59+
\setlength{\csllabelwidth}{3em}
60+
\newlength{\cslentryspacingunit} % times entry-spacing
61+
\setlength{\cslentryspacingunit}{\parskip}
62+
% for Pandoc 2.8 to 2.10.1
63+
\newenvironment{cslreferences}%
64+
{$if(csl-hanging-indent)$\setlength{\parindent}{0pt}%
65+
\everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}%
66+
{\par}
67+
% For Pandoc 2.11+
68+
\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing
69+
{% don't indent paragraphs
70+
\setlength{\parindent}{0pt}
71+
% turn on hanging indent if param 1 is 1
72+
\ifodd #1
73+
\let\oldpar\par
74+
\def\par{\hangindent=\cslhangindent\oldpar}
75+
\fi
76+
% set entry spacing
77+
\setlength{\parskip}{#2\cslentryspacingunit}
78+
}%
79+
{}
80+
\usepackage{calc}
81+
\newcommand{\CSLBlock}[1]{#1\hfill\break}
82+
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
83+
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
84+
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
85+
$endif$
86+
87+
%% END MY ADDITIONS %%
88+
89+
$for(header-includes)$
90+
$header-includes$
91+
$endfor$
92+
93+
94+
%%%%%%%%%%%%%%%%
95+
\begin{document}
96+
%%%%%%%%%%%%%%%%
97+
98+
$for(include-before)$
99+
$include-before$
100+
101+
$endfor$
102+
103+
\title$if(shorttitle)$[$shorttitle$]$endif${$title$}
104+
105+
$for(authors)$
106+
\author{$authors.name$$if(authors.footnote)$\footnote{$authors.footnote$}$endif$}
107+
$if(authors.address)$\address{$authors.address$}$endif$
108+
$if(authors.email)$\ead{$authors.email$}$endif$
109+
$endfor$
110+
111+
\begin{abstract}
112+
$abstract$
113+
\end{abstract}
114+
115+
$if(msc)$\ams{$msc$}$endif$
116+
117+
\vspace{0.5cm}\noindent\textit{Keywords}: $for(keywords)$$keywords$$sep$, $endfor$
118+
119+
\maketitle
120+
121+
$if(twocolumn)$\ioptwocol$endif$
122+
123+
$body$
124+
125+
$if(acknowledgments)$
126+
\ack{$acknowledgments$}
127+
$endif$
128+
129+
$if(biblatex)$
130+
\printbibliography
131+
$else$
132+
$if(bibliography)$
133+
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
134+
$endif$
135+
$endif$
136+
137+
138+
$for(include-after)$
139+
$include-after$
140+
141+
$endfor$
142+
143+
144+
\end{document}

inst/rmarkdown/templates/iop/skeleton/iopams.sty

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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'.

0 commit comments

Comments
 (0)