Skip to content

Commit 766dbc7

Browse files
committed
Squash previous WellcomeOR commits to remove unwanted arXiv files
1 parent 320d850 commit 766dbc7

15 files changed

+594
-1
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Authors@R: c(
4646
person('Jay', 'Hesselberth', role = c('aut', 'ctb'), email = 'jay.hesselberth@gmail.com', comment = c(ORCID = '0000-0002-6299-179X')),
4747
person("Alfredo", "Hernández", role = c("ctb"), email = "aldomann.designs@gmail.com", comment = c(ORCID = "0000-0002-2660-4545")),
4848
person("Stefano", "Coretta", role = c("ctb"), email = "stefano.coretta@gmail.com", comment = c(ORCID = "0000-0001-9627-5532", github = "stefanocoretta")),
49-
person("Alvaro", "Uzaheta", role = c("ctb"), email = "alvaro.uzaheta@gess.ethz.ch", comment = c(github = "auzaheta"))
49+
person("Callum", "Arnold", role = c("ctb"), email = "cal.rk.arnold@gmail.com", comment = c(github = "arnold-c")),
5050
)
5151
Description: A suite of custom R Markdown formats and templates for
5252
authoring journal articles and conference submissions.

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export(sage_article)
3737
export(sim_article)
3838
export(springer_article)
3939
export(tf_article)
40+
export(wellcomeor_article)
4041
importFrom(rmarkdown,includes_to_pandoc_args)
4142
importFrom(rmarkdown,knitr_options)
4243
importFrom(rmarkdown,output_format)

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# rticles 0.21
22

3+
- New `wellcomeor_article()` for Wellcome Open Research articles
34
- All templates have now the `$highlighting-macros$` variables required for Pandoc highlighting (#435).
45

56
- Template for `tf_article()` gains a `classoption` variable (thanks, @statzhero, #434).

R/article.R

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,3 +418,13 @@ tf_article <- function(..., keep_tex = TRUE, citation_package = 'natbib') {
418418
"tf", keep_tex = keep_tex, citation_package = citation_package, ...
419419
)
420420
}
421+
422+
#' @section \code{wellcomeor_article}: Format for creating submissions to
423+
#' Wellcome Open Research. Adapted from \url{https://www.overleaf.com/project/6131911644b635ad3aaa4cb2}.
424+
#' @export
425+
#' @rdname article
426+
wellcomeor_article <- function(..., keep_tex = TRUE, citation_package = 'default') {
427+
pdf_document_format(
428+
"wellcomeor", keep_tex = keep_tex, citation_package = citation_package, ...
429+
)
430+
}

README.Rmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Currently included templates and their contributors are the following:
7777
| [SIM: Statistics in Medicine](https://onlinelibrary.wiley.com/journal/10970258) | [\@ellessenne](https://github.com/ellessenne)| [\#231](https://github.com/rstudio/rticles/pull/231) | `sim_article()`|
7878
| [Taylor & Francis](https://www.tandfonline.com/)| [\@dleutnant](https://github.com/dleutnant)| [\#218](https://github.com/rstudio/rticles/pull/218) | `tf_article()` |
7979
| [The R Journal](https://journal.r-project.org/) ||| `rjournal_article()` |
80+
| [Wellcome Open Research](https://wellcomeopenresearch.org) | [\@arnold-c](https://github.com/arnold-c) | | `r wellcomeor_article()`|
8081

8182
You can also get the list of available journal names with `rticles::journals()`.
8283

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2+
%
3+
% Welcome to Overleaf --- just edit your article on the left,
4+
% and we'll compile it for you on the right. If you give
5+
% someone the link to this page, they can edit at the same
6+
% time. See the help menu above for more info. Enjoy!
7+
%
8+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9+
%
10+
% For more detailed article preparation guidelines, please see: http://wellcomeopenresearch.org/for-authors/article-guidelines and http://wellcomeopenresearch.org/for-authors/data-guidelines
11+
12+
\documentclass[10pt,a4paper,twocolumn]{article}
13+
\usepackage{WellcomeOR_styles}
14+
15+
%% Default: numerical citations
16+
\usepackage[numbers]{natbib}
17+
18+
%% Uncomment this lines for superscript citations instead
19+
% \usepackage[super]{natbib}
20+
21+
%% Uncomment these lines for author-year citations instead
22+
% \usepackage[round]{natbib}
23+
% \let\cite\citep
24+
25+
% Pandoc syntax highlighting
26+
$if(highlighting-macros)$
27+
$highlighting-macros$
28+
$endif$
29+
% Pandoc citation processing
30+
$if(csl-refs)$
31+
\newlength{\csllabelwidth}
32+
\setlength{\csllabelwidth}{3em}
33+
\newlength{\cslhangindent}
34+
\setlength{\cslhangindent}{1.5em}
35+
% for Pandoc 2.8 to 2.10.1
36+
\newenvironment{cslreferences}%
37+
{$if(csl-hanging-indent)$\setlength{\parindent}{0pt}%
38+
\everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}%
39+
{\par}
40+
% For Pandoc 2.11+
41+
\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing
42+
{% don't indent paragraphs
43+
\setlength{\parindent}{0pt}
44+
% turn on hanging indent if param 1 is 1
45+
\ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi
46+
% set entry spacing
47+
\ifnum #2 > 0
48+
\setlength{\parskip}{#2\baselineskip}
49+
\fi
50+
}%
51+
{}
52+
\usepackage{calc} % for calculating minipage widths
53+
\newcommand{\CSLBlock}[1]{#1\hfill\break}
54+
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
55+
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
56+
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
57+
$endif$
58+
$for(header-includes)$
59+
$header-includes$
60+
$endfor$
61+
62+
\begin{document}
63+
64+
\title{$title$}
65+
$if(titlenote)$
66+
\titlenote{$titlenote$}
67+
$endif$
68+
69+
\author{
70+
$for(authors)$
71+
$authors.name$
72+
\affil{$authors.affil$}
73+
$endfor$
74+
}
75+
76+
\maketitle
77+
\thispagestyle{fancy}
78+
79+
\begin{abstract}
80+
$abstract$
81+
\end{abstract}
82+
83+
\section*{Keywords}
84+
$keywords$
85+
86+
87+
\clearpage
88+
89+
$body$
90+
91+
92+
{\small\bibliographystyle{unsrtnat}
93+
94+
\bibliography{$bibliography$}
95+
96+
97+
% See this guide for more information on BibTeX:
98+
% http://libguides.mit.edu/content.php?pid=55482&sid=406343
99+
100+
% For more author guidance please see:
101+
% http://wellcomeopenresearch.org/for-authors/article-guidelines
102+
103+
% When all authors are happy with the paper, use the
104+
% ‘Submit to WELLCOME OPEN RESEARCH' button from the menu above
105+
% to submit directly to the open life science journal Wellcome Open Research.
106+
107+
% Please note that this template results in a draft pre-submission PDF document.
108+
% Articles will be professionally typeset when accepted for publication.
109+
110+
% We hope you find the Wellcome Open Research Overleaf template useful,
111+
% please let us know if you have any feedback using the help menu above.
112+
113+
114+
\end{document}
Binary file not shown.
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
\ProvidesPackage{WellcomeOR_styles}
2+
% Packages
3+
\usepackage{authblk}
4+
\usepackage[english]{babel}
5+
\usepackage[utf8]{inputenc}
6+
\usepackage[T1]{fontenc}
7+
\usepackage[bitstream-charter]{mathdesign}
8+
\usepackage{colortbl}
9+
\usepackage[usenames,dvipsnames,table]{xcolor}
10+
\usepackage{amsmath}
11+
\usepackage{graphicx}
12+
\usepackage{fancyhdr}
13+
\usepackage{setspace}
14+
\usepackage[labelsep=period,justification=justified]{caption}
15+
\usepackage{lastpage}
16+
\usepackage{xifthen}
17+
\usepackage{todonotes}
18+
\usepackage[hmargin=1.8cm,vmargin=2.2cm]{geometry}
19+
\usepackage[nolists,nomarkers]{endfloat}
20+
\AtBeginFigures{\rfoot{}}
21+
\AtBeginTables{\rfoot{}}
22+
23+
% Define the versionDate and flogo commands
24+
\newcommand{\versionDate}{\footnotesize Wellcome Open Research 2016 - DRAFT ARTICLE (PRE-SUBMISSION)}
25+
\newcommand{\flogo}{\includegraphics[height=12pt]{WellcomeOR_logo_black}}
26+
27+
\definecolor{WORBlue}{HTML}{009BB2}
28+
\definecolor{WORCerulean}{HTML}{60C0CE}
29+
\definecolor{WORCyan}{HTML}{BAE2E2}
30+
31+
% Section heading styles
32+
\usepackage[compact]{titlesec}
33+
34+
\titleformat*{\section}{\Large\usefont{OT1}{phv}{b}{n}\color{darkgray}}
35+
\titleformat*{\subsection}{\large\usefont{OT1}{phv}{b}{n}}
36+
\titleformat*{\subsubsection}{\large\usefont{OT1}{phv}{b}{n}}
37+
38+
% Section heading spacing (WORBlueuced space below headings)
39+
\titlespacing\section{0pt}{3.5ex plus 1.2ex minus .2ex}{0ex}
40+
\titlespacing\subsection{0pt}{3.25ex plus 1.2ex minus .2ex}{0ex}
41+
\titlespacing\subsubsection{0pt}{3.25ex plus 1.2ex minus .2ex}{0ex}
42+
43+
% Caption style
44+
\captionsetup{labelfont={color=WORBlue,bf},textfont={color=black,bf}}
45+
46+
% Table style
47+
% \definecolor{DarkKhaki}{rgb}{0.74,0.72,0.42}
48+
\colorlet{tableheadcolor}{WORCerulean} % Table header colour = 25% gray
49+
\newcommand{\header}{\rowcolor{tableheadcolor}} %
50+
\colorlet{tablerowcolor}{WORCyan} % Table row separator colour = 10% gray
51+
\newcommand{\row}{\rowcolor{tablerowcolor}} %
52+
\newenvironment{tabledata}[1][1]{%
53+
\renewcommand*{\extrarowheight}{0.1cm}%
54+
\tabular%
55+
}{%
56+
\endtabular
57+
}
58+
59+
% Define a title note command
60+
\newcommand\titlenote[1]{\renewcommand\@titlenote{#1}}
61+
\newcommand\@titlenote{}
62+
63+
% Column separation
64+
\setlength{\columnsep}{0.25in}
65+
66+
% Page margins, headers and footers
67+
\pagestyle{fancy}
68+
\setlength\parindent{0in}
69+
%\setlength\parskip{0.1in}
70+
\setlength\headheight{16.5pt}
71+
\renewcommand{\footrulewidth}{1pt}
72+
\lhead{\textsc{\flogo}}
73+
\chead{}
74+
\rhead{\versionDate}
75+
\lfoot{}
76+
\cfoot{}
77+
\rfoot{\footnotesize Page \thepage\ of \pageref{LastPage}}
78+
%
79+
\renewenvironment{abstract}{%
80+
\usefont{OT1}{phv}{m}{n}
81+
\hfill\begin{minipage}{0.65\textwidth}
82+
\rule{\textwidth}{1pt}\\ \textcolor{WORBlue}{\textbf{\abstractname}}}
83+
{\par\noindent\rule{\textwidth}{1pt}\end{minipage}}
84+
%
85+
\makeatletter
86+
\renewcommand\@maketitle{%
87+
\begin{minipage}{0.95\textwidth}
88+
\vskip 2em
89+
\let\footnote\thanks
90+
{\fontsize{20}{22}\usefont{OT1}{phv}{b}{n} \@title \par {\small{\@titlenote}} }
91+
\vskip 1.5em
92+
{\@author \par}
93+
\end{minipage}
94+
\vskip 1em \par
95+
}
96+
\makeatother
97+
\renewcommand\Authfont{\fontsize{16}{18}\usefont{OT1}{phv}{b}{n}}
98+
\renewcommand\Affilfont{\fontsize{10}{12}\usefont{OT1}{phv}{b}{n}}

0 commit comments

Comments
 (0)