-
Notifications
You must be signed in to change notification settings - Fork 522
Add Wellcome OR latex template #436
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
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
766dbc7
Squash previous WellcomeOR commits to remove unwanted arXiv files
arnold-c 0249ad2
Merge remote-tracking branch 'rstudio/master' into wellcome-open-res
arnold-c 060e90c
Add comma to DESCRIPTION
arnold-c 4f51fb7
Add missing Pandoc list requirement and hyperref package to template
arnold-c b77fea0
Remove extraneous detail from template.yaml
arnold-c 538c45d
Update citations to allow for correct formatting of RMarkdown citations
arnold-c 37421b9
Update skeleton.Rmd to use Bookdown referencing system
arnold-c 6e8a48e
Update template for section numbering, author afilliations, and links
arnold-c 2be1390
Merge branch 'master' into arnold-c-wellcome-open-res
cderv 692b816
Update WellcomeOR hyperref setup to correctly color links
arnold-c d2a84ae
Allow WellcomeOR to change bib styles & update ref sec of skeleton
arnold-c e1fd1dd
Update inst/rmarkdown/templates/wellcomeor/skeleton/skeleton.Rmd
arnold-c faa2f5c
Add `$include-before$` to WellcomeOR
arnold-c 1ec1bf5
Remove elsevier vancouver csl from WellcomeOR
arnold-c 218ab89
Update inst/rmarkdown/templates/wellcomeor/template.yaml
arnold-c 36fdf8a
Add `include-after` to WellcomeOR
arnold-c 4bb1beb
Set WellcomeOR to always remove section numbering
arnold-c db4800b
WellcomeOR multiple author affiliations
arnold-c a0e5205
Add corresponding author and author emails to WellcomeOR template
arnold-c c69c812
Merge commit '080207e644bc7a1d4f6738ce2c2068beb7907575'
cderv e51d39b
Missing line to remove from merge commit
cderv 3a53681
Add missing tables part for Pandoc
cderv 4c3e81c
Update R/article.R
arnold-c d78ac83
Update NEWS.md
arnold-c f133984
Update R/article.R
arnold-c ba198ef
Update inst/rmarkdown/templates/wellcomeor/resources/template.tex
arnold-c bb5607b
Update inst/rmarkdown/templates/wellcomeor/resources/template.tex
arnold-c ccf8324
Update inst/rmarkdown/templates/wellcomeor/resources/template.tex
arnold-c f827901
Update inst/rmarkdown/templates/wellcomeor/skeleton/skeleton.Rmd
arnold-c d75fd4a
Update inst/rmarkdown/templates/wellcomeor/skeleton/skeleton.Rmd
arnold-c dc10956
Update inst/rmarkdown/templates/wellcomeor/resources/template.tex
arnold-c 36313cd
Update inst/rmarkdown/templates/wellcomeor/resources/template.tex
arnold-c 2edc851
Update inst/rmarkdown/templates/wellcomeor/skeleton/skeleton.Rmd
arnold-c d600ae7
Update R/article.R
arnold-c 18e034a
Update inst/rmarkdown/templates/wellcomeor/resources/template.tex
arnold-c 83c4433
Update inst/rmarkdown/templates/wellcomeor/resources/template.tex
arnold-c 89e518c
Build documentation
cderv 3c4ac51
Merged upstream/master into arnold-c-wellcome-open-res
cderv 080c257
wellcomeor is the first to use number_sections as argument
cderv 278ea85
Bump version
cderv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
195 changes: 195 additions & 0 deletions
195
inst/rmarkdown/templates/wellcomeor/resources/template.tex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,195 @@ | ||
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
| % | ||
| % Welcome to Overleaf --- just edit your article on the left, | ||
| % and we'll compile it for you on the right. If you give | ||
| % someone the link to this page, they can edit at the same | ||
| % time. See the help menu above for more info. Enjoy! | ||
| % | ||
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
| % | ||
| % For more detailed article preparation guidelines, please see: http://wellcomeopenresearch.org/for-authors/article-guidelines and http://wellcomeopenresearch.org/for-authors/data-guidelines | ||
| % Options for packages loaded elsewhere - from Pandoc's template | ||
| \PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref} | ||
| \PassOptionsToPackage{hyphens}{url} | ||
| $if(colorlinks)$ | ||
| \PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor} | ||
| $endif$ | ||
| \documentclass[10pt,a4paper,twocolumn]{article} | ||
| \usepackage{WellcomeOR_styles} | ||
|
|
||
| % hyperref required | ||
| \IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} | ||
|
|
||
| % Link coloring | ||
| % Link coloring | ||
| \hypersetup{ | ||
| $if(title-meta)$ | ||
| pdftitle={$title-meta$}, | ||
| $endif$ | ||
| $if(author-meta)$ | ||
| pdfauthor={$author-meta$}, | ||
| $endif$ | ||
| $if(lang)$ | ||
| pdflang={$lang$}, | ||
| $endif$ | ||
| $if(subject)$ | ||
| pdfsubject={$subject$}, | ||
| $endif$ | ||
| $if(keywords)$ | ||
| pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$}, | ||
| $endif$ | ||
| $if(colorlinks)$ | ||
| colorlinks=true, | ||
| linkcolor={$if(linkcolor)$$linkcolor$$else$Maroon$endif$}, | ||
| filecolor={$if(filecolor)$$filecolor$$else$Maroon$endif$}, | ||
| citecolor={$if(citecolor)$$citecolor$$else$Blue$endif$}, | ||
| urlcolor={$if(urlcolor)$$urlcolor$$else$Blue$endif$}, | ||
| $else$ | ||
| hidelinks, | ||
| $endif$ | ||
| pdfcreator={LaTeX via pandoc}} | ||
|
|
||
|
|
||
| $if(natbib)$ | ||
| \usepackage[$if(natbiboptions)$$natbiboptions$$else$numbers$endif$]{natbib} | ||
| $endif$ | ||
|
|
||
| % Pandoc toggle for numbering sections | ||
| $if(numbersections)$ | ||
| \setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} | ||
| $else$ | ||
| \setcounter{secnumdepth}{-\maxdimen} % remove section numbering | ||
| $endif$ | ||
|
|
||
| % Pandoc syntax highlighting | ||
| $if(highlighting-macros)$ | ||
| $highlighting-macros$ | ||
| $endif$ | ||
|
|
||
| % tightlist command for lists without linebreak | ||
| \providecommand{\tightlist}{% | ||
| \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} | ||
|
|
||
| $if(tables)$ | ||
| % From pandoc table feature | ||
| \usepackage{longtable,booktabs,array} | ||
| $if(multirow)$ | ||
| \usepackage{multirow} | ||
| $endif$ | ||
| \usepackage{calc} % for calculating minipage widths | ||
| % Correct order of tables after \paragraph or \subparagraph | ||
| \usepackage{etoolbox} | ||
| \makeatletter | ||
| \patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{} | ||
| \makeatother | ||
| % Allow footnotes in longtable head/foot | ||
| \IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}} | ||
| \makesavenoteenv{longtable} | ||
| $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}[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 \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}\break} | ||
| \newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} | ||
|
|
||
| $endif$ | ||
|
|
||
| $for(header-includes)$ | ||
| $header-includes$ | ||
| $endfor$ | ||
|
|
||
| \begin{document} | ||
|
|
||
| \title{$title$} | ||
| $if(titlenote)$ | ||
| \titlenote{$titlenote$} | ||
| $endif$ | ||
|
|
||
| $for(author)$ | ||
| \author[$for(author.affil)$$author.affil$$sep$,$endfor$$if(author.corresponding)$*$endif$]{$author.name$} | ||
| $endfor$ | ||
|
|
||
| $for(address)$ | ||
| \affil[$address.code$]{$address.address$} | ||
| $endfor$ | ||
|
|
||
|
|
||
| \maketitle | ||
| \thispagestyle{fancy} | ||
|
|
||
| $for(author)$ | ||
| $author.name$: $author.email$\\ | ||
| $endfor$ | ||
| * Corresponding author\\ | ||
|
|
||
| $for(include-before)$ | ||
| $include-before$ | ||
|
|
||
| $endfor$ | ||
|
|
||
| \begin{abstract} | ||
| $abstract$ | ||
| \end{abstract} | ||
|
|
||
| \section*{Keywords} | ||
| $keywords$ | ||
|
|
||
| \clearpage | ||
|
|
||
| $body$ | ||
|
|
||
|
|
||
| $if(natbib)$ | ||
| {\small\bibliographystyle{$if(biblio-style)$$biblio-style$$else$unsrtnat$endif$} | ||
| $if(bibliography)$ | ||
| \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} | ||
| $endif$ | ||
| $endif$ | ||
|
|
||
|
|
||
| % See this guide for more information on BibTeX: | ||
| % http://libguides.mit.edu/content.php?pid=55482&sid=406343 | ||
|
|
||
| % For more author guidance please see: | ||
| % http://wellcomeopenresearch.org/for-authors/article-guidelines | ||
|
|
||
| % When all authors are happy with the paper, use the | ||
| % ‘Submit to WELLCOME OPEN RESEARCH' button from the menu above | ||
| % to submit directly to the open life science journal Wellcome Open Research. | ||
|
|
||
| % Please note that this template results in a draft pre-submission PDF document. | ||
| % Articles will be professionally typeset when accepted for publication. | ||
|
|
||
| % We hope you find the Wellcome Open Research Overleaf template useful, | ||
| % please let us know if you have any feedback using the help menu above. | ||
|
|
||
arnold-c marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| $for(include-after)$ | ||
| $include-after$ | ||
|
|
||
| $endfor$ | ||
|
|
||
| \end{document} | ||
Binary file added
BIN
+656 KB
inst/rmarkdown/templates/wellcomeor/skeleton/WellcomeOR_logo_black.pdf
Binary file not shown.
98 changes: 98 additions & 0 deletions
98
inst/rmarkdown/templates/wellcomeor/skeleton/WellcomeOR_styles.sty
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| \ProvidesPackage{WellcomeOR_styles} | ||
| % Packages | ||
| \usepackage{authblk} | ||
| \usepackage[english]{babel} | ||
| \usepackage[utf8]{inputenc} | ||
| \usepackage[T1]{fontenc} | ||
| \usepackage[bitstream-charter]{mathdesign} | ||
| \usepackage{colortbl} | ||
| \usepackage[usenames,dvipsnames,table]{xcolor} | ||
| \usepackage{amsmath} | ||
| \usepackage{graphicx} | ||
| \usepackage{fancyhdr} | ||
| \usepackage{setspace} | ||
| \usepackage[labelsep=period,justification=justified]{caption} | ||
| \usepackage{lastpage} | ||
| \usepackage{xifthen} | ||
| \usepackage{todonotes} | ||
| \usepackage[hmargin=1.8cm,vmargin=2.2cm]{geometry} | ||
| \usepackage[nolists,nomarkers]{endfloat} | ||
| \AtBeginFigures{\rfoot{}} | ||
| \AtBeginTables{\rfoot{}} | ||
|
|
||
| % Define the versionDate and flogo commands | ||
| \newcommand{\versionDate}{\footnotesize Wellcome Open Research 2016 - DRAFT ARTICLE (PRE-SUBMISSION)} | ||
| \newcommand{\flogo}{\includegraphics[height=12pt]{WellcomeOR_logo_black}} | ||
|
|
||
| \definecolor{WORBlue}{HTML}{009BB2} | ||
| \definecolor{WORCerulean}{HTML}{60C0CE} | ||
| \definecolor{WORCyan}{HTML}{BAE2E2} | ||
|
|
||
| % Section heading styles | ||
| \usepackage[compact]{titlesec} | ||
|
|
||
| \titleformat*{\section}{\Large\usefont{OT1}{phv}{b}{n}\color{darkgray}} | ||
| \titleformat*{\subsection}{\large\usefont{OT1}{phv}{b}{n}} | ||
| \titleformat*{\subsubsection}{\large\usefont{OT1}{phv}{b}{n}} | ||
|
|
||
| % Section heading spacing (WORBlueuced space below headings) | ||
| \titlespacing\section{0pt}{3.5ex plus 1.2ex minus .2ex}{0ex} | ||
| \titlespacing\subsection{0pt}{3.25ex plus 1.2ex minus .2ex}{0ex} | ||
| \titlespacing\subsubsection{0pt}{3.25ex plus 1.2ex minus .2ex}{0ex} | ||
|
|
||
| % Caption style | ||
| \captionsetup{labelfont={color=WORBlue,bf},textfont={color=black,bf}} | ||
|
|
||
| % Table style | ||
| % \definecolor{DarkKhaki}{rgb}{0.74,0.72,0.42} | ||
| \colorlet{tableheadcolor}{WORCerulean} % Table header colour = 25% gray | ||
| \newcommand{\header}{\rowcolor{tableheadcolor}} % | ||
| \colorlet{tablerowcolor}{WORCyan} % Table row separator colour = 10% gray | ||
| \newcommand{\row}{\rowcolor{tablerowcolor}} % | ||
| \newenvironment{tabledata}[1][1]{% | ||
| \renewcommand*{\extrarowheight}{0.1cm}% | ||
| \tabular% | ||
| }{% | ||
| \endtabular | ||
| } | ||
|
|
||
| % Define a title note command | ||
| \newcommand\titlenote[1]{\renewcommand\@titlenote{#1}} | ||
| \newcommand\@titlenote{} | ||
|
|
||
| % Column separation | ||
| \setlength{\columnsep}{0.25in} | ||
|
|
||
| % Page margins, headers and footers | ||
| \pagestyle{fancy} | ||
| \setlength\parindent{0in} | ||
| %\setlength\parskip{0.1in} | ||
| \setlength\headheight{16.5pt} | ||
| \renewcommand{\footrulewidth}{1pt} | ||
| \lhead{\textsc{\flogo}} | ||
| \chead{} | ||
| \rhead{\versionDate} | ||
| \lfoot{} | ||
| \cfoot{} | ||
| \rfoot{\footnotesize Page \thepage\ of \pageref{LastPage}} | ||
| % | ||
| \renewenvironment{abstract}{% | ||
| \usefont{OT1}{phv}{m}{n} | ||
| \hfill\begin{minipage}{0.65\textwidth} | ||
| \rule{\textwidth}{1pt}\\ \textcolor{WORBlue}{\textbf{\abstractname}}} | ||
| {\par\noindent\rule{\textwidth}{1pt}\end{minipage}} | ||
| % | ||
| \makeatletter | ||
| \renewcommand\@maketitle{% | ||
| \begin{minipage}{0.95\textwidth} | ||
| \vskip 2em | ||
| \let\footnote\thanks | ||
| {\fontsize{20}{22}\usefont{OT1}{phv}{b}{n} \@title \par {\small{\@titlenote}} } | ||
| \vskip 1.5em | ||
| {\@author \par} | ||
| \end{minipage} | ||
| \vskip 1em \par | ||
| } | ||
| \makeatother | ||
| \renewcommand\Authfont{\fontsize{16}{18}\usefont{OT1}{phv}{b}{n}} | ||
| \renewcommand\Affilfont{\fontsize{10}{12}\usefont{OT1}{phv}{b}{n}} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| @BOOK{Smith:2012qr, | ||
| title = {{B}ook {T}itle}, | ||
| publisher = {Publisher}, | ||
| author = {Smith, J.~M. and Jones, A.~B.}, | ||
| year = {2012}, | ||
| edition = {7th}, | ||
| } | ||
|
|
||
| @ARTICLE{Smith:2013jd, | ||
| author = {Jones, A.~B. and Smith, J.~M.}, | ||
| title = {{A}rticle {T}itle}, | ||
| journal = {Journal title}, | ||
| year = {2013}, | ||
| volume = {13}, | ||
| pages = {123-456}, | ||
| number = {52}, | ||
| month = {March}, | ||
| publisher = {Publisher} | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.