Skip to content

Commit 0941076

Browse files
authored
Template for Oxford University Press (#271)
1 parent bf8ef78 commit 0941076

File tree

13 files changed

+1027
-1
lines changed

13 files changed

+1027
-1
lines changed

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ Authors@R: c(
3737
person("Zhian N.", "Kamvar", role = c("aut", "cph"), email = "[email protected]", comment = c(ORCID = "0000-0003-1458-7108")),
3838
person("Noam", "Ross", role = c("aut", "cph"), email = "[email protected]", comment = c(ORCID = "0000-0002-2136-0000")),
3939
person("Robrecht", "Cannoodt", role = c("aut", "cph"), email = "[email protected]", comment = c(ORCID = "0000-0003-3641-729X", github = "rcannood")),
40-
person("Duncan", "Luguern", role = c("aut"), email = "[email protected]")
40+
person("Duncan", "Luguern", role = c("aut"), email = "[email protected]"),
41+
person("David M.", "Kaplan", role = c("aut", "ctb"), email = "[email protected]", comment = c(ORCID = "0000-0001-6087-359X", github = "dmkaplan2000"))
4142
)
4243
Description: A suite of custom R Markdown formats and templates for
4344
authoring journal articles and conference submissions.

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export(joss_article)
1818
export(jss_article)
1919
export(mdpi_article)
2020
export(mnras_article)
21+
export(oup_article)
2122
export(peerj_article)
2223
export(plos_article)
2324
export(pnas_article)

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ rticles 0.14
99

1010
- `mnras.cls` was removed from this package because it exists on CTAN.
1111

12+
- Added Oxford University Press (OUP) template (thanks, @dmkaplan2000, #271).
13+
1214
rticles 0.13
1315
---------------------------------------------------------------------
1416

R/article.R

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,22 @@ mnras_article <- function(..., keep_tex = TRUE, fig_caption = TRUE) {
168168
)
169169
}
170170

171+
#' @section \code{oup_article}: Format for creating submissions to many Oxford University Press
172+
#' journals. Adapted from
173+
#' \url{https://academic.oup.com/journals/pages/authors/preparing_your_manuscript}
174+
#' and \url{https://academic.oup.com/icesjms/pages/General_Instructions}.
175+
#' @export
176+
#' @rdname article
177+
oup_article <- function(
178+
..., citation_package = 'natbib', keep_tex = TRUE,
179+
md_extensions = c("-autolink_bare_uris")
180+
) {
181+
pdf_document_format(
182+
"oup_article", citation_package = citation_package,
183+
keep_tex = keep_tex, md_extensions = md_extensions, ...
184+
)
185+
}
186+
171187
#' @section \code{peerj_article}: Format for creating submissions to The PeerJ
172188
#' Journal. This was adapted from the
173189
#' \href{https://www.overleaf.com/latex/templates/latex-template-for-peerj-journal-and-pre-print-submissions/ptdwfrqxqzbn}{PeerJ

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ The **rticles** package provides a suite of custom [R Markdown](http://rmarkdown
4949

5050
- [NNRAS](https://www.ras.org.uk/news-and-press/2641-new-version-of-the-mnras-latex-package) journal submissions
5151

52+
- [OUP](https://academic.oup.com/journals/pages/authors/preparing_your_manuscript) articles
53+
5254
- [PeerJ](https://peerj.com) articles
5355

5456
- [Royal Society Open Science](http://rsos.royalsocietypublishing.org/) journal submissions
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
\documentclass[$if(fontsize)$$fontsize$,$else$12pt,$endif$$if(spacing)$$spacing$,$else$halfline,$endif$$if(papersize)$$papersize$,$else$a4paper,$endif$$for(classoptions)$$classoptions$$sep$,$endfor$]{ouparticle}
2+
3+
% Packages I think are necessary for basic Rmarkdown functionality
4+
\usepackage{hyperref}
5+
\usepackage{graphicx}
6+
\usepackage{listings}
7+
\usepackage{color}
8+
\usepackage{fancyvrb}
9+
\usepackage{framed}
10+
11+
%% To allow better options for figure placement
12+
%\usepackage{float}
13+
14+
% Packages that are supposedly required by OUP sty file
15+
\usepackage{amssymb, amsmath, geometry, amsfonts, verbatim, endnotes, setspace}
16+
17+
% For code highlighting I think
18+
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
19+
\definecolor{shadecolor}{RGB}{248,248,248}
20+
\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}}
21+
\newcommand{\AlertTok}[1]{\textcolor[rgb]{0.94,0.16,0.16}{#1}}
22+
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
23+
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.77,0.63,0.00}{#1}}
24+
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}}
25+
\newcommand{\BuiltInTok}[1]{#1}
26+
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
27+
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textit{#1}}}
28+
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
29+
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
30+
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{#1}}}
31+
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{#1}}
32+
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}}
33+
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
34+
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{0.64,0.00,0.00}{\textbf{#1}}}
35+
\newcommand{\ExtensionTok}[1]{#1}
36+
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}}
37+
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
38+
\newcommand{\ImportTok}[1]{#1}
39+
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
40+
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{#1}}}
41+
\newcommand{\NormalTok}[1]{#1}
42+
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.81,0.36,0.00}{\textbf{#1}}}
43+
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}}
44+
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textit{#1}}}
45+
\newcommand{\RegionMarkerTok}[1]{#1}
46+
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
47+
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
48+
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
49+
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
50+
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
51+
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
52+
53+
% For making Rmarkdown lists
54+
\providecommand{\tightlist}{%
55+
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
56+
57+
58+
% Part for setting citation format package: natbib
59+
$if(natbib)$
60+
\usepackage{natbib}
61+
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
62+
$endif$
63+
64+
% Part for setting citation format package: biblatex
65+
$if(biblatex)$
66+
\usepackage[$if(biblio-citestyle)$citestyle=$biblio-citestyle$$else$citestyle=ieee$endif$$if(biblio-style)$,style=$biblio-style$$else$,style=numeric$endif$$if(citation_sorting)$,sorting=$citation_sorting$$endif$]{biblatex}
67+
$if(bibliography)$
68+
$for(bibliography)$
69+
\addbibresource{$bibliography$}
70+
$endfor$
71+
$endif$
72+
$endif$
73+
74+
% Pandoc header
75+
$for(header-includes)$
76+
$header-includes$
77+
$endfor$
78+
79+
\begin{document}
80+
81+
\title{$title$}
82+
83+
\author{%
84+
$for(authors)$
85+
\name{$authors.name$}$if(authors.address)$\address{$authors.address$}$endif$$if(authors.email)$\email{\href{mailto:$authors.email$}{$authors.email$}}$endif$$if(authors.thanks)$\thanks{$authors.thanks$}$else$$if(authors.corresponding_author)$\thanks{Corresponding author; Email: \href{mailto:$authors.email$}{$authors.email$}}$endif$$endif$
86+
$sep$\and
87+
$endfor$
88+
}
89+
90+
\abstract{$abstract$}
91+
92+
\date{$if(date)$$date$$else$\today$endif$}
93+
94+
\keywords{$for(keywords)$$keywords$$sep$; $endfor$}
95+
96+
\maketitle
97+
98+
99+
$for(include-before)$
100+
$include-before$
101+
$endfor$
102+
103+
$body$
104+
105+
$if(notes)$
106+
\begin{notes}
107+
$notes$
108+
\end{notes}
109+
$endif$
110+
111+
$if(acknowledgements)$
112+
\begin{notes}[Acknowledgements]
113+
$acknowledgements$
114+
\end{notes}
115+
$endif$
116+
117+
$if(natbib)$
118+
$if(bibliography)$
119+
120+
$if(biblio-title)$
121+
$if(book-class)$
122+
\renewcommand\bibname{$biblio-title$}
123+
$else$
124+
\renewcommand\refname{$biblio-title$}
125+
$endif$
126+
$endif$
127+
128+
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
129+
$endif$
130+
$endif$
131+
132+
$if(biblatex)$
133+
\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
134+
$endif$
135+
136+
$for(include-after)$
137+
$include-after$
138+
$endfor$
139+
140+
\end{document}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@article{Dirac1953888,
2+
title = "The lorentz transformation and absolute time",
3+
journal = "Physica ",
4+
volume = "19",
5+
number = "1-–12",
6+
pages = "888--896",
7+
year = "1953",
8+
doi = "10.1016/S0031-8914(53)80099-6",
9+
author = "P.A.M. Dirac"
10+
}
11+
12+
@article{Feynman1963118,
13+
title = "The theory of a general quantum system interacting with a linear dissipative system",
14+
journal = "Annals of Physics ",
15+
volume = "24",
16+
pages = "118--173",
17+
year = "1963",
18+
doi = "10.1016/0003-4916(63)90068-X",
19+
author = "R.P Feynman and F.L {Vernon Jr.}"
20+
}

0 commit comments

Comments
 (0)