diff --git a/.Rbuildignore b/.Rbuildignore index 65cc072fb..e0addeb57 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,3 +1,4 @@ +^appveyor\.yml$ ^.*\.Rproj$ ^\.Rproj\.user$ ^\.travis\.yml$ diff --git a/DESCRIPTION b/DESCRIPTION index 321903a79..f1b2d5af3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -31,7 +31,8 @@ Authors@R: c( person("Dalton", "Hance", role = c("aut"), email = "dhance@usgs.gov"), person("Daniel", "NĂ¼st", role = c("aut", "cph"), email = "daniel.nuest@uni-muenster.de", comment = c(ORCID = "0000-0002-0024-5046")), person("Petter", "Uvesten", role = c("aut", "cph"), email = "petter.uvesten.7362@student.lu.se"), - person("Elio", "Campitelli", role = c("aut", "cph"), email = "elio.campitelli@cima.fcen.uba.ar", comment = c(ORCID = "0000-0002-7742-9230")) + person("Elio", "Campitelli", role = c("aut", "cph"), email = "elio.campitelli@cima.fcen.uba.ar", comment = c(ORCID = "0000-0002-7742-9230")), + person("John", "Muschelli", role = c("aut", "cph"), email = "muschellij2@gmail.com", comment = c(ORCID = "0000-0001-6469-1750")) ) Description: A suite of custom R Markdown formats and templates for authoring journal articles and conference submissions. diff --git a/NAMESPACE b/NAMESPACE index 53b922fab..2fc5b948e 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -13,6 +13,7 @@ export(copernicus_journal_abbreviations) export(ctex) export(ctex_template) export(elsevier_article) +export(frontiers_article) export(ieee_article) export(jss_article) export(mdpi_article) diff --git a/NEWS b/NEWS index 628ff1ce8..5a107ac23 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ rticles 0.7 --------------------------------------------------------------------- +- Added the template for the Frontiers Journals (@muschellij2, @zkamvar, #209). + - Added the template for the AGU Journals (thanks, @eliocamp, #199). - Updated the template for PLOS to version 3.5 (thanks, @uvesten, #196). diff --git a/R/frontiers_article.R b/R/frontiers_article.R new file mode 100644 index 000000000..a71a210b5 --- /dev/null +++ b/R/frontiers_article.R @@ -0,0 +1,19 @@ +#' Frontiers open access journal format. +#' +#' Format for creating Frontiers journal articles. Adapted from +#' \href{http://home.frontiersin.org/about/author-guidelines}{http://home.frontiersin.org/about/author-guidelines}. +#' +#' @inheritParams rmarkdown::pdf_document +#' @param ... Additional arguments to \code{rmarkdown::pdf_document} +#' +#' @return R Markdown output format to pass to +#' \code{\link[rmarkdown:render]{render}} +#' +#' @export +frontiers_article <- function(..., + keep_tex = TRUE) { + + inherit_pdf_document(..., + template = find_resource("frontiers_article", "template.tex"), + keep_tex = keep_tex) +} diff --git a/README.md b/README.md index e2a832b8a..4274722cd 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,8 @@ The **rticles** package provides a suite of custom [R Markdown](http://rmarkdown - [The R Journal](https://journal.r-project.org/) articles +- [Frontiers](https://www.frontiersin.org/) articles + Under the hood, LaTeX templates are used to ensure that documents conform precisely to submission standards. At the same time, composition and formatting can be done using lightweight [markdown](https://rmarkdown.rstudio.com/authoring_basics.html) syntax, and R code and its output can be seamlessly included using [knitr](https://yihui.name/knitr/). Using **rticles** requires the prerequisites described below. You can get most of these automatically by installing the latest release of RStudio (instructions for using **rticles** without RStudio are also provided). diff --git a/inst/rmarkdown/templates/frontiers_article/resources/template.tex b/inst/rmarkdown/templates/frontiers_article/resources/template.tex new file mode 100755 index 000000000..58b106261 --- /dev/null +++ b/inst/rmarkdown/templates/frontiers_article/resources/template.tex @@ -0,0 +1,120 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% This is just an example/guide for you to refer to when submitting manuscripts to Frontiers, it is not mandatory to use Frontiers .cls files nor frontiers.tex % +% This will only generate the Manuscript, the final article will be typeset by Frontiers after acceptance. +% % +% % +% When submitting your files, remember to upload this *tex file, the pdf generated with it, the *bib file (if bibliography is not within the *tex) and all the figures. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%% Version 3.4 Generated 2018/06/15 %%% +%%% You will need to have the following packages installed: datetime, fmtcount, etoolbox, fcprefix, which are normally inlcuded in WinEdt. %%% +%%% In http://www.ctan.org/ you can find the packages and how to install them, if necessary. %%% +%%% NB logo1.jpg is required in the path in order to correctly compile front page header %%% + +\documentclass[utf8]{frontiersSCNS} % for Science, Engineering and Humanities and Social Sciences articles +%\documentclass[utf8]{frontiersHLTH} % for Health articles +%\documentclass[utf8]{frontiersFPHY} % for Physics and Applied Mathematics and Statistics articles + +%\setcitestyle{square} % for Physics and Applied Mathematics and Statistics articles +\usepackage{url,hyperref,lineno,microtype,subcaption} +\usepackage[onehalfspacing]{setspace} + +\linenumbers + + +% BELOW TAKEN FROM rticles plos template +% +% amsmath package, useful for mathematical formulas +\usepackage{amsmath} +% amssymb package, useful for mathematical symbols +\usepackage{amssymb} + +% hyperref package, useful for hyperlinks +\usepackage{hyperref} + +% graphicx package, useful for including eps and pdf graphics +% include graphics with the command \includegraphics +\usepackage{graphicx} + +% Sweave(-like) +\usepackage{fancyvrb} +\DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl} +\DefineVerbatimEnvironment{Soutput}{Verbatim}{} +\DefineVerbatimEnvironment{Scode}{Verbatim}{fontshape=sl} +\newenvironment{Schunk}{}{} +\DefineVerbatimEnvironment{Code}{Verbatim}{} +\DefineVerbatimEnvironment{CodeInput}{Verbatim}{fontshape=sl} +\DefineVerbatimEnvironment{CodeOutput}{Verbatim}{} +\newenvironment{CodeChunk}{}{} + +% cite package, to clean up citations in the main text. Do not remove. +\usepackage{cite} + +\usepackage{color} + +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} + +% Below is from frontiers +% +\bibliographystyle{frontiersinSCNS} +% Use doublespacing - comment out for single spacing +%\usepackage{setspace} +%\doublespacing + + +% Leave a blank line between paragraphs instead of using \\ + + +\def\keyFont{\fontsize{8}{11}\helveticabold } + + +%% ** EDIT HERE ** +%% PLEASE INCLUDE ALL MACROS BELOW + +%% END MACROS SECTION + +$for(header-includes)$ +$header-includes$ +$endfor$ + +$if(highlighting-macros)$ +$highlighting-macros$ +$endif$ + +\def\Authors{ +$for(author)$ + $author.name$\,\textsuperscript{$author.affiliation$$if(author.email)$*$endif$}$sep$, +$endfor$ +} + +\def\Address{ +$for(affiliation)$ + + \textsuperscript{$affiliation.id$} $if(affiliation.department)$$affiliation.department$, $endif$$if(affiliation.institution)$$affiliation.institution$, $endif$ $if(affiliation.city)$$affiliation.city$, $endif$ $if(affiliation.state)$$affiliation.state$, $endif$ $if(affiliation.country)$$affiliation.country$$endif$ + $endfor$} + +$for(author)$ + $if(author.email)$\def\corrAuthor{$author.name$}\def\corrAddress{$if(author.institution)$$author.institution$\\$endif$$if(author.street)$$author.street$\\$endif$$author.city$, $if(author.state)$$author.state$, $endif$$author.zip$ $if(author.country)$$author.country$$endif$}\def\corrEmail{$author.email$}$endif$ + $if(author.etal)$\def\firstAuthorLast{$author.etal$ {et~al.}}$endif$ +$endfor$ + + +\begin{document} +\onecolumn +\firstpage{1} + +\title[$runtitle$]{$title$} +\author[\firstAuthorLast]{\Authors} +\address{} %This field will be automatically populated +\correspondance{} %This field will be automatically populated + +\extraAuth{}% If there are more than 1 corresponding author, comment this line and uncomment the next one. +%\extraAuth{corresponding Author2 \\ Laboratory X2, Institute X2, Department X2, Organization X2, Street X2, City X2 , State XX2 (only USA, Canada and Australia), Zip Code2, X2 Country X2, email2@uni2.edu} + + +\maketitle + +$body$ + +\end{document} diff --git a/inst/rmarkdown/templates/frontiers_article/skeleton/frontiers.csl b/inst/rmarkdown/templates/frontiers_article/skeleton/frontiers.csl new file mode 100644 index 000000000..ca296a949 --- /dev/null +++ b/inst/rmarkdown/templates/frontiers_article/skeleton/frontiers.csl @@ -0,0 +1,160 @@ + + diff --git a/inst/rmarkdown/templates/frontiers_article/skeleton/frontiersFPHY.cls b/inst/rmarkdown/templates/frontiers_article/skeleton/frontiersFPHY.cls new file mode 100755 index 000000000..50d039c4b --- /dev/null +++ b/inst/rmarkdown/templates/frontiers_article/skeleton/frontiersFPHY.cls @@ -0,0 +1,955 @@ +\newcommand\classname{frontiersFPHY} %this file is based in bioninfo.cls +\newcommand\lastmodifieddate{2016/01/11} +\newcommand\versionnumber{2.6} + +% For printing crop marks +\newif\if@cropmarkson \@cropmarksontrue + +\NeedsTeXFormat{LaTeX2e}[2013/26/03] +\ProvidesClass{\classname}[\lastmodifieddate\space\versionnumber] + +\setlength{\paperheight}{11truein} +\setlength{\paperwidth}{8.5truein} + +\newif\if@final + +\DeclareOption{draft}{\PassOptionsToPackage{draft}{graphicx}} +\DeclareOption{paper}{\PassOptionsToPackage{paper}{graphicx}} +\DeclareOption{a4paper}{\PassOptionsToPackage{a4}{crop}} +\DeclareOption{centre}{\PassOptionsToPackage{center}{crop}} +\DeclareOption{crop}{\PassOptionsToPackage{cam}{crop}\global\@cropmarksontrue} +\DeclareOption{nocrop}{\PassOptionsToPackage{off}{crop}\global\@cropmarksonfalse} +\DeclareOption{info}{\PassOptionsToPackage{info}{crop}} +\DeclareOption{noinfo}{\PassOptionsToPackage{noinfo}{crop}} +\DeclareOption{final}{\global\@finaltrue} +\DeclareOption{utf8}{\PassOptionsToPackage{utf8}{inputenc}} + +\ExecuteOptions{a4paper,nocrop,centre,info,paper} + +\ProcessOptions + +% Load all necessary packages +\RequirePackage{inputenc,crop,graphicx,amsmath,array,color,amssymb,flushend,stfloats,amsthm,chngpage,times,datetime,parskip} +\def\helvetica{\fontfamily{phv}\selectfont} +\def\helveticaitalic{\fontfamily{phv}\itshape\selectfont} +\def\helveticabold{\fontfamily{phv}\bfseries\selectfont} +\def\helveticabolditalic{\fontfamily{phv}\bfseries\itshape\selectfont} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage[labelsep=quad,indention=10pt]{caption} +\usepackage[labelfont=bf,list=true]{subcaption} + +\newcommand\@ptsize{0} + +% Set twoside printing +\@twosidetrue + +% Marginal notes are on the outside edge +\@mparswitchfalse + +\reversemarginpar + +\renewcommand\normalsize{% + \@setfontsize\normalsize{12}{12}% + \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ + \abovedisplayshortskip \z@ \@plus3\p@ + \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ + \belowdisplayskip \abovedisplayskip + \let\@listi\@listI} +\normalsize +\let\@bls\baselineskip + +\newcommand\small{% + \@setfontsize\small{11}{12}% + \abovedisplayskip 11\p@ minus 3\p@ + \belowdisplayskip \abovedisplayskip + \abovedisplayshortskip \z@ plus 2\p@ + \belowdisplayshortskip 4\p@ plus 2\p@ minus2\p@ + \def\@listi{\topsep 4.5\p@ plus 2\p@ minus 1\p@ + \itemsep \parsep + \topsep 4\p@ plus 2\p@ minus 2\p@}} + +\newcommand\footnotesize{% + \@setfontsize\footnotesize{8}{10}% + \abovedisplayskip 6\p@ minus 3\p@ + \belowdisplayskip\abovedisplayskip + \abovedisplayshortskip \z@ plus 3\p@ + \belowdisplayshortskip 6\p@ plus 3\p@ minus 3\p@ + \def\@listi{\topsep 3\p@ plus 1\p@ minus 1\p@ + \parsep 2\p@ plus 1\p@ minus 1\p@\itemsep \parsep}} + +\def\scriptsize{\@setfontsize\scriptsize{11pt}{11pt}} +\def\tiny{\@setfontsize\tiny{10pt}{11pt}} +\def\large{\@setfontsize\large{13pt}{14pt}} +\def\Large{\@setfontsize\Large{14pt}{16}} +\def\LARGE{\@setfontsize\LARGE{15pt}{17pt}} +\def\huge{\@setfontsize\huge{22pt}{22pt}} +\def\Huge{\@setfontsize\Huge{30pt}{30pt}} + + + + +\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} +\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} +\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} +\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} +\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} +\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} +\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} + +% Line spacing +\setlength\lineskip{1\p@} +\setlength\normallineskip{1\p@} +\renewcommand\baselinestretch{} + +% Set inter-para skips +\setlength\smallskipamount{3\p@ \@plus 1\p@ \@minus 1\p@} +\setlength\medskipamount{6\p@ \@plus 2\p@} +\setlength\bigskipamount{12\p@ \@plus 4\p@ \@minus 4\p@} + +% Paragraph dimensions and inter-para spacing +\setlength\parindent{3mm} +\setlength{\parskip}{\medskipamount} + +% Page break penalties +\@lowpenalty 51 +\@medpenalty 151 +\@highpenalty 301 + +% Disallow widows and orphans +\clubpenalty 10000 +\widowpenalty 10000 + +% Disable page breaks before equations, allow pagebreaks after +% equations and discourage widow lines before equations. +\displaywidowpenalty 100 +\predisplaypenalty 10000 +\postdisplaypenalty 2500 + +% Allow breaking the page in the middle of a paragraph +\interlinepenalty 0 + +% Disallow breaking the page after a hyphenated line +\brokenpenalty 10000 + +% Hyphenation; don't split words into less than three characters +\lefthyphenmin=3 +\righthyphenmin=3 + +% +% Set page layout dimensions +% +\setlength\headheight{16\p@} % height of running head +\setlength\topmargin{1.3pc} % head margin +\addtolength\topmargin{-1in} % subtract out the 1 inch driver margin + +\setlength\topskip{10\p@} % height of first line of text +\setlength\headsep{19\p@} % space below running head -- + +\setlength\footskip{34\p@} % space above footer line +\setlength\maxdepth{1\topskip} % pages can be short or deep by half a line? + +\setlength\textwidth{42pc} % text measure excluding margins + +\setlength\textheight{56\baselineskip} % 54 lines on a full page, +\addtolength\textheight{\topskip} % including the first + % line on the page + +% Set the margins +\setlength\marginparsep{3\p@} +\setlength\marginparpush{3\p@} +\setlength\marginparwidth{35\p@} + +\setlength\oddsidemargin{4.5pc} +\addtolength\oddsidemargin{-1in} % subtract out the 1 inch driver margin +\setlength\@tempdima{\paperwidth} +\addtolength\@tempdima{-\textwidth} +\addtolength\@tempdima{-4.5pc} +\setlength\evensidemargin{\@tempdima} +\addtolength\evensidemargin{-1in} + +\setlength\columnsep{1.5pc} % space between columns for double-column text +\setlength\columnseprule{0\p@} % width of rule between two columns + +% Footnotes +\setlength\footnotesep{9\p@} % space between footnotes +% space between text and footnote +\setlength{\skip\footins}{12\p@ \@plus 6\p@ \@minus 1\p@} + +% Float placement parameters + +% The total number of floats that can be allowed on a page. +\setcounter{totalnumber}{10} +% The maximum number of floats at the top and bottom of a page. +\setcounter{topnumber}{5} +\setcounter{bottomnumber}{5} +% The maximum part of the top or bottom of a text page that can be +% occupied by floats. This is set so that at least four lines of text +% fit on the page. +\renewcommand\topfraction{.9} +\renewcommand\bottomfraction{.9} +% The minimum amount of a text page that must be occupied by text. +% This should accomodate four lines of text. +\renewcommand\textfraction{.06} +% The minimum amount of a float page that must be occupied by floats. +\renewcommand\floatpagefraction{.94} + +% The same parameters repeated for double column output +\renewcommand\dbltopfraction{.9} +\renewcommand\dblfloatpagefraction{.9} + +% Space between floats +\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@} +% Space between floats and text +\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} +% Space above and below an inline figure +\setlength\intextsep {18\p@ \@plus 2\p@ \@minus 2\p@} + +% For double column floats +\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} +\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} + +% Space left at top, bottom and inbetween floats on a float page. +\setlength\@fptop{0\p@} % no space above float page figures +\setlength\@fpsep{12\p@ \@plus 1fil} +\setlength\@fpbot{0\p@} + +% The same for double column +\setlength\@dblfptop{0\p@} +\setlength\@dblfpsep{12\p@ \@plus 1fil} +\setlength\@dblfpbot{0\p@} + +% Override settings in mathtime back to TeX defaults +\DeclareMathSizes{5} {5} {5} {5} +\DeclareMathSizes{6} {6} {5} {5} +\DeclareMathSizes{7} {7} {5} {5} +\DeclareMathSizes{8} {8} {6} {5} +\DeclareMathSizes{9} {9} {6.5} {5} +\DeclareMathSizes{10} {10} {7.5} {5} +\DeclareMathSizes{12} {12} {9} {7} + +% Page styles +\def\ps@headings + {% + \def\@oddfoot{\vbox to 12.5\p@{\rule{\textwidth}{0.5\p@}\vss + \hbox to \textwidth{\helveticabold\small {Frontiers}\hfill \thepage}% + }}% + \def\@evenfoot{\vbox to 12.5\p@{\rule{\textwidth}{0.5\p@}\vss + \hbox to \textwidth{\helvetica\small {\color{red}This is a provisional file, not the final typeset article}\hfill\helveticabold\color{black}\thepage}% + }}% + \def\@evenhead{\vbox{\hbox to \textwidth{\fontsize{11}{10}\selectfont + \helveticabold{\fontshape{it}\selectfont + \strut\firstAuthorLast}\hfill\strut\rightmark}\vspace{6.5\p@}\rule{\textwidth}{0.5\p@}}}% + \def\@oddhead{\vbox{\hbox to \textwidth{\fontsize{11}{10}\selectfont + \helveticabold{\fontshape{it}\selectfont + \strut\firstAuthorLast}\hfill\strut\rightmark}\vspace{6.5\p@}\rule{\textwidth}{0.5\p@}}}% + \def\titlemark##1{\markboth{##1}{##1}}% + \def\authormark##1{\gdef\leftmark{##1}}% + } + +\def\ps@opening + {% + \def\@oddfoot{\vbox to 13\p@{\hbox{\rule{\textwidth}{1\p@}}\vss + \hbox to \textwidth{\helvetica + \fontsize{7}{9}\fontshape{n}\selectfont \space % + \hfill\small\helveticabold\thepage}% + }}% + \def\@evenfoot{\vbox to 13\p@{\rule{\textwidth}{1\p@}\vss + \hbox to \textwidth{\helvetica\thepage\hfill + \fontsize{7}{9}\fontshape{n}\selectfont \space }% + }}% + \let\@evenhead\relax + \let\@oddhead\relax} + +% Page range +\newif\iflastpagegiven \lastpagegivenfalse +\newcommand\firstpage[1]{% + \gdef\@firstpage{#1}% + \ifnum\@firstpage>\c@page + \setcounter{page}{#1}% + \ClassWarning{BIO}{Increasing pagenumber to \@firstpage}% + \else \ifnum\@firstpage<\c@page + \ClassWarning{BIO}{Firstpage lower than pagenumber}\fi\fi + \xdef\@firstpage{\the\c@page}% + } +\def\@firstpage{1} +\def\pagenumbering#1{% + \global\c@page \@ne + \gdef\thepage{\csname @#1\endcsname \c@page}% + \gdef\thefirstpage{% + \csname @#1\endcsname \@firstpage}% + \gdef\thelastpage{% + \csname @#1\endcsname \@lastpage}% + } + +\newcommand\lastpage[1]{\xdef\@lastpage{#1}% + \global\lastpagegiventrue} +\def\@lastpage{0} +\def\setlastpage{\iflastpagegiven\else + \edef\@tempa{@lastpage@}% + \expandafter + \ifx \csname \@tempa \endcsname \relax + \gdef\@lastpage{0}% + \else + \xdef\@lastpage{\@nameuse{@lastpage@}}% + \fi + \fi } +\def\writelastpage{% + \iflastpagegiven \else + \immediate\write\@auxout% + {\string\global\string\@namedef{@lastpage@}{\the\c@page}}% + \fi + } +\def\thepagerange{% + \ifnum\@lastpage =0 {\ \bf ???} \else + \ifnum\@lastpage = \@firstpage \ \thefirstpage\else + \thefirstpage--\thelastpage \fi\fi} + +\AtBeginDocument{\setlastpage + \pagenumbering{arabic}% + } +\AtEndDocument{% + \writelastpage + \if@final + \clearemptydoublepage + \else + \clearpage + \fi} + +% +% Sectional units +% + +% Counters +\newcounter{section} +\newcounter{subsection}[section] +\newcounter{subsubsection}[subsection] +\newcounter{paragraph}[subsubsection] +\newcounter{subparagraph}[paragraph] +\newcounter{figure} +\newcounter{subfigure} +\newcounter{table} + +% Form of the numbers +\newcommand\thepage{\arabic{page}} +\renewcommand\thesection{\arabic{section}} +\renewcommand\thesubsection{{\thesection.\arabic{subsection}}} +\renewcommand\thesubsubsection{{\thesubsection.\arabic{subsubsection}}} +\renewcommand\theparagraph{\thesubsubsection.\arabic{paragraph}} +\renewcommand\thesubparagraph{\theparagraph.\arabic{subparagraph}} +\renewcommand\theequation{\arabic{equation}} + +% Form of the words +\newcommand\contentsname{Contents} +\newcommand\listfigurename{List of Figures} +\newcommand\listtablename{List of Tables} +\newcommand\partname{Part} +\newcommand\appendixname{Appendix} +\newcommand\abstractname{Abstract} +\newcommand\refname{References} +\newcommand\bibname{References} +\newcommand\indexname{Index} +\newcommand\figurename{Figure} +\newcommand\tablename{Table} + +% Clearemptydoublepage should really clear the running heads too +\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}\cleardoublepage}} + +% Frontmatter, mainmatter and backmatter + +\newif\if@mainmatter \@mainmattertrue + +\newcommand\frontmatter{% + \clearpage + \@mainmatterfalse + \pagenumbering{roman}} + +\newcommand\mainmatter{% + \clearpage + \@mainmattertrue + \pagenumbering{arabic}} + +\newcommand\backmatter{% + \clearpage + \@mainmatterfalse} + + \newdateformat{mydate}{\THEDAY \ \monthname[ \THEMONTH] \THEYEAR} + \newdateformat{mydate2}{\monthname[\THEMONTH] \THEYEAR} + +%******** +% TITLE * +%******** +\newlength{\dropfromtop} +\setlength{\dropfromtop}{\z@} + +% Application Notes +\newif\if@appnotes +\newcommand{\application}{% +% \setlength{\dropfromtop}{-2.25pc}% + \global\@appnotestrue} + +% Short Title is for the Title of the Article +% Title is for the Title of the Journal + +\long\def\title{\@ifnextchar[{\short@title}{\@@title}} +\def\short@title[#1]{\titlemark{#1}\@@@title} +\def\@@title#1{\authormark{#1}\@@@title{#1}} +\long\def\@@@title#1{\gdef\@title{#1}} + +\long\def\author{\@ifnextchar[{\short@uthor}{\@uthor}} +\def\short@uthor[#1]{\authormark{#1}\@@author} +\def\@uthor#1{\authormark{#1}\@@author{#1}} +\long\def\@@author#1{\gdef\@author{#1}} + +\def\vol#1{\global\def\@vol{#1}} +\def\issue#1{\global\def\@issue{#1}} +\def\address#1{\global\def\@issue{#1}} +\def\history#1{\global\def\@history{#1}} +\def\correspondance#1{\global\def\@correspondance{#1}} +\def\extraAuth#1{\global\def\@extraAuth{#1}} +\def\address#1{\global\def\@address{#1}} + + +\def\date#1{\gdef\@date{#1}} + +% To define special colors + +%*********** +% Colors * +%*********** + +% Other colors +\definecolor{black}{cmyk}{0, 0, 0, 1} +\definecolor{gray}{cmyk}{0, 0, 0, 0.25} +\definecolor{darkgray}{cmyk}{0, 0, 0, 0.5} +\newlength{\extraspace} +\setlength{\extraspace}{\z@} + +\newcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 3mm\noindent +% \@textsuperscript{\normalfont\@thefnmark}\raggedright##1}% + \@textsuperscript{\normalfont\@thefnmark}##1}% + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{opening}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@address\@empty + \global\let\@history\@empty + \global\let\@extraAuth\@empty + \global\let\@topic\@empty + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\@pubyear\@empty + \global\let\address\relax + \global\let\topic\relax + \global\let\extraAuth\relax + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\pubyear\relax + \global\let\@copyrightline\@empty + \global\let\and\relax + \@afterindentfalse\@afterheading +} + +\newlength{\aboveskipchk}%for checking oddpage or evenpage top skip +\setlength{\aboveskipchk}{\z@}% + +\def\@maketitle{% + \let\footnote\thanks + \clearemptydoublepage + \checkoddpage\ifcpoddpage\setlength{\aboveskipchk}{-7pc}\else\setlength{\aboveskipchk}{-3pc}\fi%for checking oddpage or evenpage top skip%% + \vspace*{\aboveskipchk}% + \vspace{\dropfromtop}% + \hbox to \textwidth{% + + \parbox[t]{15pc}{% + \helvetica + \hfil + \flushleft \includegraphics[width=12pc,angle=0]{./logo1.pdf} + +}} + + \rule{\textwidth}{1\p@}\par% + \helvetica + \hbox to \textwidth{% + \parbox[t]{36.5pc}{% + \vspace*{1sp} + {\helveticabold\fontsize{20}{21}\color{black}\selectfont\raggedright \@title \par}% + \vspace{4.5\p@} + {\helveticabold\fontsize{12}{15}\selectfont\raggedright \@author \par}% + \vspace{4\p@} + {\helvetica\fontsize{12}{12}\selectfont\raggedright\slshape\@address \Address \\ \par}% + \vspace{6\p@} + {\helvetica\fontsize{12}{10}\selectfont\raggedright {Correspondence*:\\ }\@correspondance \corrAuthor \\ \corrEmail \par} + \vspace{4\p@} + {\helvetica\fontsize{12}{12}\selectfont\raggedright\@extraAuth \par}% + \vspace{8\p@} + }% + } + \vspace{14.5\p@}% + } + +%*********** +% Abstract * +%*********** +\newcommand{\absection}[1]{% + \par\noindent{\bfseries #1}\space\ignorespaces} + +\newenvironment{abstract}{% + \begingroup + \let\section\absection + \fontfamily{\sfdefault}\fontsize{12}{12}\sffamily\selectfont + {\fontseries{b}\selectfont ABSTRACT}\par} +{\endgroup\smallskip\@afterheading\@afterindentfalse\vskip 12pt plus -2pt minus 2pt} + +% Section macros + +% Lowest level heading that takes a number by default +\setcounter{secnumdepth}{5} + +\renewcommand{\@seccntformat}[1]{\csname the#1\endcsname\quad} + +\def\section{% + \@startsection{section}{1}{\z@} + {-10\p@ plus -3\p@}{3\p@} + {\reset@font\raggedright\helveticabold\fontsize{13}{13}\color{black}\selectfont\MakeUppercase}} + +\def\subsection{% + \@startsection{subsection}{2}{\z@} + {2\p@ plus -1\p@}{2\p@} + {\reset@font\raggedright\mathversion{bold}\helveticabold\fontsize{11.5}{12}}} + +\def\subsubsection{% + \@startsection{subsubsection}{3}{\z@} + {1\p@ plus -1\p@}{1\p@} + {\reset@font\raggedright\mathversion{bold}\helvetica\fontsize{11.5}{12}}} + + \def\paragraph{% + \@startsection{paragraph}{4}{\z@} + {1\p@ plus -1\p@}{1\p@} + {\reset@font\itshape\helveticabold\fontsize{11.5}{12}}} + + \def\subparagraph{% + \@startsection{subparagraph}{5}{\z@} + {1\p@ plus -1\p@}{1\p@} + {\reset@font\itshape\helvetica\fontsize{11.5}{12}}} + +\def\textcolon{\text{\rm :}} + +% ******************** +% Figures and tables * +% ******************** + +% Table and array parameters +\setlength\arraycolsep{.5em} +\setlength\tabcolsep{.5em} +\setlength\arrayrulewidth{.5pt} +\setlength\doublerulesep{2.5pt} +\setlength\extrarowheight{\z@} +\renewcommand\arraystretch{1} + +%\newlength{\abovecaptionskip} +%\newlength{\belowcaptionskip} +%\setlength{\abovecaptionskip}{13pt} +%\setlength{\belowcaptionskip}{10.5pt} + +\long\def\@makecaption#1#2{\vspace{\abovecaptionskip}% + \begingroup + \normalsize + \textbf{#1.}\enskip{#2}\par + \endgroup} + + +% Table rules +\def\toprule{\noalign{\ifnum0=`}\fi\hrule \@height 0.5pt \hrule \@height 6pt \@width 0pt \futurelet + \@tempa\@xhline} +\def\midrule{\noalign{\ifnum0=`}\fi \hrule \@height 6.75pt \@width 0pt \hrule \@height 0.5pt + \hrule \@height 6pt \@width 0pt \futurelet \@tempa\@xhline} +\def\botrule{\noalign{\ifnum0=`}\fi \hrule \@height 5.75pt \@width 0pt \hrule \@height 0.5pt \futurelet + \@tempa\@xhline} +\def\hrulefill{\leavevmode\leaders\hrule height .5pt\hfill\kern\z@} + +\def\thefigure{\@arabic\c@figure} +\def\fps@figure{tbp} +\def\ftype@figure{1} +\def\ext@figure{lof} +\def\fnum@figure{\figurename~\thefigure} +\def\figure{\@float{figure}} +\let\endfigure\end@float +\@namedef{figure*}{\@dblfloat{figure}} +\@namedef{endfigure*}{\end@dblfloat} +\def\thetable{\@arabic\c@table} +\def\fps@table{tbp} +\def\ftype@table{2} +\def\ext@table{lot} +\def\fnum@table{Table~\thetable} +\def\table{\let\source\tablesource\@float{table}} +\def\endtable{\end@float} +\@namedef{table*}{\@dblfloat{table}} +\@namedef{endtable*}{\end@dblfloat} + +\newif\if@rotate \@rotatefalse +\newif\if@rotatecenter \@rotatecenterfalse +\def\rotatecenter{\global\@rotatecentertrue} +\def\rotateendcenter{\global\@rotatecenterfalse} +\def\rotate{\global\@rotatetrue} +\def\endrotate{\global\@rotatefalse} +\newdimen\rotdimen +\def\rotstart#1{\special{ps: gsave currentpoint currentpoint translate + #1 neg exch neg exch translate}} +\def\rotfinish{\special{ps: currentpoint grestore moveto}} +\def\rotl#1{\rotdimen=\ht#1\advance\rotdimen by \dp#1 + \hbox to \rotdimen{\vbox to\wd#1{\vskip \wd#1 + \rotstart{270 rotate}\box #1\vss}\hss}\rotfinish} +\def\rotr#1{\rotdimen=\ht #1\advance\rotdimen by \dp#1 + \hbox to \rotdimen{\vbox to \wd#1{\vskip \wd#1 + \rotstart{90 rotate}\box #1\vss}\hss}\rotfinish} + +\newif\ifsub@@figure \sub@@figuretrue +\def\thesubfigure{\@arabic\c@figure\alph{subfigure}} +\def\fps@subfigure{tbp} +\def\ftype@subfigure{1} +\def\ext@subfigure{lof} +\def\fnum@subfigure{Figure \thesubfigure} +\def\subfigure{\ifsub@@figure\global\sub@@figurefalse\stepcounter{figure}\fi% + \@float{subfigure}} +\let\endsubfigure\end@float +\@namedef{subfigure*}{\ifsub@@figure\global\sub@@figurefalse% + \stepcounter{figure}\fi \@dblfloat{subfigure}} +\@namedef{endsubfigure*}{\end@dblfloat} + +\def\endfigure{\global\sub@@figuretrue\end@float} +\@namedef{endfigure*}{\global\sub@@figuretrue\end@dblfloat} + +\newdimen\tempdime +\newbox\temptbox + +% From ifmtarg.sty +% Copyright Peter Wilson and Donald Arseneau, 2000 +\begingroup +\catcode`\Q=3 +\long\gdef\@ifmtarg#1{\@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil} +\long\gdef\@xifmtarg#1#2Q#3#4#5\@nil{#4} +\long\gdef\@ifnotmtarg#1{\@xifmtarg#1QQ\@firstofone\@gobble\@nil} +\endgroup + +\def\tablesize{\@setfontsize\tablesize{10\p@}{10\p@}} + +\newenvironment{processtable}[3]{\setbox\temptbox=\hbox{{\tablesize #2}}% +\tempdime\wd\temptbox\@processtable{#1}{#2}{#3}{\tempdime}} +{\relax} + +\newcommand{\@processtable}[4]{% +\if@rotate +\setbox4=\vbox to \hsize{\vss\hbox to \textheight{% +\begin{minipage}{#4}% +\@ifmtarg{#1}{}{\caption{#1}}{\tablesize #2}% +\vskip7\p@\noindent +\parbox{#4}{\fontsize{10}{10}\selectfont #3\par}% +\end{minipage}}\vss}% +\rotr{4} +\else +\hbox to \hsize{\hss\begin{minipage}[t]{#4}% +\vskip2.9pt +\@ifmtarg{#1}{}{\caption{#1}}{\tablesize #2}% +\vskip6\p@\noindent +\parbox{#4}{\fontsize{8}{9}\selectfont #3\par}% +\end{minipage}\hss}\fi}% + +\newcolumntype{P}[1]{>{\raggedright\let\\\@arraycr\hangindent1em}p{#1}} + +% ****************************** +% List numbering and lettering * +% ****************************** +\def\labelenumi{{\rm\arabic{enumi}.}} +\def\theenumi{\arabic{enumi}} +\def\labelenumii{{\rm\alph{enumii}.}} +\def\theenumii{\alph{enumii}} +\def\p@enumii{\theenumi} +\def\labelenumiii{{\rm(\arabic{enumiii})}} +\def\theenumiii{\roman{enumiii}} +\def\p@enumiii{\theenumi(\theenumii)} +\def\labelenumiv{{\rm(\arabic{enumiv})}} +\def\theenumiv{\Alph{enumiv}} +\def\p@enumiv{\p@enumiii\theenumiii} +\def\labelitemi{{\small$\bullet$}} +\def\labelitemii{{\small$\bullet$}} +\def\labelitemiii{{\small$\bullet$}} +\def\labelitemiv{{\small$\bullet$}} + +\def\@listI{\leftmargin\leftmargini \topsep\medskipamount} +\let\@listi\@listI +\@listi +\def\@listii{\topsep\z@\leftmargin\leftmarginii} +\def\@listiii{\leftmargin\leftmarginiii \topsep\z@} +\def\@listiv{\leftmargin\leftmarginiv \topsep\z@} +\def\@listv{\leftmargin\leftmarginv \topsep\z@} +\def\@listvi{\leftmargin\leftmarginvi \topsep\z@} + +\setlength{\leftmargini}{3mm} +\setlength{\leftmarginii}{\z@} +\setlength{\leftmarginiii}{\z@} +\setlength{\leftmarginiv}{\z@} + +% Changes to the list parameters for enumerate +\def\enumargs{% + \partopsep \z@ + \itemsep 3\p@ + \parsep \z@ + \labelsep 0.5em + \listparindent \parindent + \itemindent \z@ + \topsep 2\p@ +} + +\def\enumerate{% + \@ifnextchar[{\@numerate}{\@numerate[0]}} + +\def\@numerate[#1]{% + \ifnum \@enumdepth >3 \@toodeep\else + \advance\@enumdepth \@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth} + \list{\csname label\@enumctr\endcsname}{% + \enumargs + \setlength{\leftmargin}{\csname leftmargin\romannumeral\the\@enumdepth\endcsname} + \usecounter{\@enumctr} + \settowidth\labelwidth{#1} + \addtolength{\leftmargin}{\labelwidth} + \addtolength{\leftmargin}{\labelsep} + \def\makelabel##1{\hss \llap{##1}}}% + \fi + } +\let\endenumerate\endlist + +% Changes to the list parameters for itemize +\def\itemargs{% + \partopsep \z@ + \itemsep 3\p@ + \parsep \z@ + \labelsep 0.5em + \rightmargin \z@ + \listparindent \parindent + \itemindent \z@ + \topsep 2\p@ +} + +\def\itemize{% + \@ifnextchar[{\@itemize}{\@itemize[$\bullet$]}} + +\def\@itemize[#1]{% + \ifnum \@itemdepth >3 \@toodeep\else + \advance\@itemdepth \@ne + \edef\@itemctr{item\romannumeral\the\@itemdepth} + \list{\csname label\@itemctr\endcsname}{% + \itemargs + \setlength{\leftmargin}{\csname leftmargin\romannumeral\the\@itemdepth\endcsname} + \settowidth\labelwidth{#1} + \addtolength{\leftmargin}{\labelwidth} + \addtolength{\leftmargin}{\labelsep} + \def\makelabel##1{\hss \llap{##1}}}% + \fi + } +\let\enditemize\endlist + +\newenvironment{unlist}{% + \begin{list}{}% + {\setlength{\labelwidth}{\z@}% + \setlength{\labelsep}{\z@}% + \setlength{\topsep}{\medskipamount}% + \setlength{\itemsep}{3\p@}% + \setlength{\leftmargin}{2em}% + \setlength{\itemindent}{-2em}}} +{\end{list}} + + +% *********************** +% Quotes and Quotations * +% *********************** +\def\quotation{\par\begin{list}{}{ + \setlength{\topsep}{\medskipamount} + \setlength{\leftmargin}{2em}% + \setlength{\rightmargin}{\z@}% + \setlength\labelwidth{0pt}% + \setlength\labelsep{0pt}% + \listparindent\parindent}% + \item[]} +\def\endquotation{\end{list}} +\let\quote\quotation +\let\endquote\endquotation + +\skip\@mpfootins = \skip\footins +\fboxsep=6\p@ +\fboxrule=1\p@ + +% ******************* +% Table of contents * +% ******************* +\newcommand\@pnumwidth{4em} +\newcommand\@tocrmarg{2.55em plus 1fil} +\newcommand\@dotsep{1000} +\setcounter{tocdepth}{4} + +\def\numberline#1{\hbox to \@tempdima{{#1}}} + +\def\@authortocline#1#2#3#4#5{% + \vskip 1.5\p@ + \ifnum #1>\c@tocdepth \else + {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip + \parindent #2\relax\@afterindenttrue + \interlinepenalty\@M + \leavevmode + \@tempdima #3\relax + \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip + {\itshape #4}\nobreak + \leaders\hbox{$\m@th + \mkern \@dotsep mu\hbox{.}\mkern \@dotsep + mu$}\hfill + \nobreak + \hb@xt@\@pnumwidth{\hfil}% + \par}% + \fi} + +\newcommand*\l@author{\@authortocline{2}{0pt}{30pt}} +\newcommand*\l@section{\@dottedtocline{3}{11pt}{20pt}} +\newcommand*\l@subsection{\@dottedtocline{4}{31pt}{29pt}} +\newcommand*\l@subsubsection[2]{} + + + +% *********** +% Footnotes * +% *********** + +\def\footnoterule{\noindent\rule{\columnwidth}{0.5pt}} +\def\@makefnmark{\@textsuperscript{\normalfont\@thefnmark}}% +\newcommand\@makefntext[1]{\noindent{\@makefnmark}\enskip#1} + +% *********** +% References * +% *********** + +\providecommand{\newblock}{} +\newenvironment{thebibliography}{% + \section{\bibname}% + \begingroup + \small + \begin{list}{}{% + \setlength{\topsep}{\z@}% + \setlength{\labelsep}{\z@}% + \settowidth{\labelwidth}{\z@}% + \setlength{\leftmargin}{4mm}% + \setlength{\itemindent}{-4mm}}\small} +{\end{list}\endgroup} + +\usepackage[numbers,square]{natbib} +\renewcommand\@biblabel[1]{\textbf [#1] } + +% ********** +% Appendix * +% ********** +\newif\ifappend +\def\appendix{\par + \setcounter{section}{0} + \setcounter{subsection}{0} + \appendtrue +} + +%Math parameters + +\setlength{\jot}{5\p@} +\mathchardef\@m=1500 % adapted value + +\def\frenchspacing{\sfcode`\.\@m \sfcode`\?\@m \sfcode`\!\@m + \sfcode`\:\@m \sfcode`\;\@m \sfcode`\,\@m} + +% Theorems +\def\th@plain{% +%% \let\thm@indent\noindent % no indent +\thm@headfont{\quad\scshape}% heading font is bold +\thm@notefont{\upshape\mdseries}% same as heading font +\thm@headpunct{.}% no period after heading +\thm@headsep 5\p@ plus\p@ minus\p@\relax +\itshape % body font +} + +\vbadness=9999 +\tolerance=9999 +\doublehyphendemerits=10000 +\doublehyphendemerits 640000 % corresponds to badness 800 +\finalhyphendemerits 1000000 % corresponds to badness 1000 + +\flushbottom +\frenchspacing +\ps@headings +\twocolumn + +% Screen PDF compatability +\newcommand{\medline}[1]{% + \unskip\unskip\ignorespaces} + + +%%%%for smaller size text +\newenvironment{methods}{% + \begingroup +\def\section{% + \@startsection{section}{1}{\z@} + {-24\p@ plus -3\p@}{4\p@} + {\reset@font\raggedright\helveticabold\fontsize{10}{12}\selectfont\MakeUppercase}} + \def\subsection{% + \@startsection{subsection}{2}{\z@} + {-5\p@ plus -2\p@}{4\p@} + {\reset@font\raggedright\mathversion{bold}\fontseries{b}\fontsize{10}{12}\selectfont}} + \def\subsubsection{% + \@startsection{subsubsection}{3}{\z@} + {-6\p@ plus -1\p@}{-1em} + {\reset@font\normalfont\normalsize\itshape}} +\footnotesize + \par} +{\par\endgroup\bigskip\@afterheading\@afterindentfalse} + + + +\graphicspath{{g:/artwork/oup/bioinfo/}} + +\language=2 + +\hyphenation{Figure Table Figures Tables} + +\newcommand{\href}[2]{#2} + +\renewenvironment{proof}[1][\proofname]{\par + \normalfont \topsep6\p@\@plus6\p@\relax + \labelsep 0.5em + \trivlist + \item[\hskip\labelsep\hskip1em\textsc{#1}.]\ignorespaces +}{\endtrivlist\@endpefalse} + +%%Different Bonds + +\def\sbond{\ensuremath{\raise.25ex\hbox{${-}\!\!\!\!{-}$}}\kern -.9pt} +\def\dbond{\ensuremath{\raise.25ex\hbox{=$\!$=}}} +\def\tbond{\ensuremath{\raise.20ex\hbox{${\equiv}\!\!\!{\equiv}$}}} + +\newcommand{\query}[2][0pt]{}% + +\renewcommand{\dag}{{\mathversion{normal}$^{\dagger}$}} + +\endinput diff --git a/inst/rmarkdown/templates/frontiers_article/skeleton/frontiersHLTH.cls b/inst/rmarkdown/templates/frontiers_article/skeleton/frontiersHLTH.cls new file mode 100755 index 000000000..41529cfcb --- /dev/null +++ b/inst/rmarkdown/templates/frontiers_article/skeleton/frontiersHLTH.cls @@ -0,0 +1,956 @@ +\newcommand\classname{frontiersHLTH} %this file is based in bioninfo.cls +\newcommand\lastmodifieddate{2016/01/11} +\newcommand\versionnumber{2.6} + +% For printing crop marks +\newif\if@cropmarkson \@cropmarksontrue + +\NeedsTeXFormat{LaTeX2e}[2013/26/03] +\ProvidesClass{\classname}[\lastmodifieddate\space\versionnumber] + +\setlength{\paperheight}{11truein} +\setlength{\paperwidth}{8.5truein} + +\newif\if@final + +\DeclareOption{draft}{\PassOptionsToPackage{draft}{graphicx}} +\DeclareOption{paper}{\PassOptionsToPackage{paper}{graphicx}} +\DeclareOption{a4paper}{\PassOptionsToPackage{a4}{crop}} +\DeclareOption{centre}{\PassOptionsToPackage{center}{crop}} +\DeclareOption{crop}{\PassOptionsToPackage{cam}{crop}\global\@cropmarksontrue} +\DeclareOption{nocrop}{\PassOptionsToPackage{off}{crop}\global\@cropmarksonfalse} +\DeclareOption{info}{\PassOptionsToPackage{info}{crop}} +\DeclareOption{noinfo}{\PassOptionsToPackage{noinfo}{crop}} +\DeclareOption{final}{\global\@finaltrue} +\DeclareOption{utf8}{\PassOptionsToPackage{utf8}{inputenc}} + +\ExecuteOptions{a4paper,nocrop,centre,info,paper} + +\ProcessOptions + +% Load all necessary packages +\RequirePackage{inputenc,crop,graphicx,amsmath,array,color,amssymb,flushend,stfloats,amsthm,chngpage,times,datetime,parskip} +\def\helvetica{\fontfamily{phv}\selectfont} +\def\helveticaitalic{\fontfamily{phv}\itshape\selectfont} +\def\helveticabold{\fontfamily{phv}\bfseries\selectfont} +\def\helveticabolditalic{\fontfamily{phv}\bfseries\itshape\selectfont} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage[labelsep=quad,indention=10pt]{caption} +\usepackage[labelfont=bf,list=true]{subcaption} + +\newcommand\@ptsize{0} + +% Set twoside printing +\@twosidetrue + +% Marginal notes are on the outside edge +\@mparswitchfalse + +\reversemarginpar + +\renewcommand\normalsize{% + \@setfontsize\normalsize{12}{12}% + \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ + \abovedisplayshortskip \z@ \@plus3\p@ + \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ + \belowdisplayskip \abovedisplayskip + \let\@listi\@listI} +\normalsize +\let\@bls\baselineskip + +\newcommand\small{% + \@setfontsize\small{11}{12}% + \abovedisplayskip 11\p@ minus 3\p@ + \belowdisplayskip \abovedisplayskip + \abovedisplayshortskip \z@ plus 2\p@ + \belowdisplayshortskip 4\p@ plus 2\p@ minus2\p@ + \def\@listi{\topsep 4.5\p@ plus 2\p@ minus 1\p@ + \itemsep \parsep + \topsep 4\p@ plus 2\p@ minus 2\p@}} + +\newcommand\footnotesize{% + \@setfontsize\footnotesize{8}{10}% + \abovedisplayskip 6\p@ minus 3\p@ + \belowdisplayskip\abovedisplayskip + \abovedisplayshortskip \z@ plus 3\p@ + \belowdisplayshortskip 6\p@ plus 3\p@ minus 3\p@ + \def\@listi{\topsep 3\p@ plus 1\p@ minus 1\p@ + \parsep 2\p@ plus 1\p@ minus 1\p@\itemsep \parsep}} + +\def\scriptsize{\@setfontsize\scriptsize{11pt}{11pt}} +\def\tiny{\@setfontsize\tiny{10pt}{11pt}} +\def\large{\@setfontsize\large{13pt}{14pt}} +\def\Large{\@setfontsize\Large{14pt}{16}} +\def\LARGE{\@setfontsize\LARGE{15pt}{17pt}} +\def\huge{\@setfontsize\huge{22pt}{22pt}} +\def\Huge{\@setfontsize\Huge{30pt}{30pt}} + + + + +\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} +\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} +\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} +\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} +\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} +\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} +\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} + +% Line spacing +\setlength\lineskip{1\p@} +\setlength\normallineskip{1\p@} +\renewcommand\baselinestretch{} + +% Set inter-para skips +\setlength\smallskipamount{3\p@ \@plus 1\p@ \@minus 1\p@} +\setlength\medskipamount{6\p@ \@plus 2\p@} +\setlength\bigskipamount{12\p@ \@plus 4\p@ \@minus 4\p@} + +% Paragraph dimensions and inter-para spacing +\setlength\parindent{3mm} +\setlength{\parskip}{\medskipamount} + +% Page break penalties +\@lowpenalty 51 +\@medpenalty 151 +\@highpenalty 301 + +% Disallow widows and orphans +\clubpenalty 10000 +\widowpenalty 10000 + +% Disable page breaks before equations, allow pagebreaks after +% equations and discourage widow lines before equations. +\displaywidowpenalty 100 +\predisplaypenalty 10000 +\postdisplaypenalty 2500 + +% Allow breaking the page in the middle of a paragraph +\interlinepenalty 0 + +% Disallow breaking the page after a hyphenated line +\brokenpenalty 10000 + +% Hyphenation; don't split words into less than three characters +\lefthyphenmin=3 +\righthyphenmin=3 + +% +% Set page layout dimensions +% +\setlength\headheight{16\p@} % height of running head +\setlength\topmargin{1.3pc} % head margin +\addtolength\topmargin{-1in} % subtract out the 1 inch driver margin + +\setlength\topskip{10\p@} % height of first line of text +\setlength\headsep{19\p@} % space below running head -- + +\setlength\footskip{34\p@} % space above footer line +\setlength\maxdepth{1\topskip} % pages can be short or deep by half a line? + +\setlength\textwidth{42pc} % text measure excluding margins + +\setlength\textheight{56\baselineskip} % 54 lines on a full page, +\addtolength\textheight{\topskip} % including the first + % line on the page + +% Set the margins +\setlength\marginparsep{3\p@} +\setlength\marginparpush{3\p@} +\setlength\marginparwidth{35\p@} + +\setlength\oddsidemargin{4.5pc} +\addtolength\oddsidemargin{-1in} % subtract out the 1 inch driver margin +\setlength\@tempdima{\paperwidth} +\addtolength\@tempdima{-\textwidth} +\addtolength\@tempdima{-4.5pc} +\setlength\evensidemargin{\@tempdima} +\addtolength\evensidemargin{-1in} + +\setlength\columnsep{1.5pc} % space between columns for double-column text +\setlength\columnseprule{0\p@} % width of rule between two columns + +% Footnotes +\setlength\footnotesep{9\p@} % space between footnotes +% space between text and footnote +\setlength{\skip\footins}{12\p@ \@plus 6\p@ \@minus 1\p@} + +% Float placement parameters + +% The total number of floats that can be allowed on a page. +\setcounter{totalnumber}{10} +% The maximum number of floats at the top and bottom of a page. +\setcounter{topnumber}{5} +\setcounter{bottomnumber}{5} +% The maximum part of the top or bottom of a text page that can be +% occupied by floats. This is set so that at least four lines of text +% fit on the page. +\renewcommand\topfraction{.9} +\renewcommand\bottomfraction{.9} +% The minimum amount of a text page that must be occupied by text. +% This should accomodate four lines of text. +\renewcommand\textfraction{.06} +% The minimum amount of a float page that must be occupied by floats. +\renewcommand\floatpagefraction{.94} + +% The same parameters repeated for double column output +\renewcommand\dbltopfraction{.9} +\renewcommand\dblfloatpagefraction{.9} + +% Space between floats +\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@} +% Space between floats and text +\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} +% Space above and below an inline figure +\setlength\intextsep {18\p@ \@plus 2\p@ \@minus 2\p@} + +% For double column floats +\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} +\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} + +% Space left at top, bottom and inbetween floats on a float page. +\setlength\@fptop{0\p@} % no space above float page figures +\setlength\@fpsep{12\p@ \@plus 1fil} +\setlength\@fpbot{0\p@} + +% The same for double column +\setlength\@dblfptop{0\p@} +\setlength\@dblfpsep{12\p@ \@plus 1fil} +\setlength\@dblfpbot{0\p@} + +% Override settings in mathtime back to TeX defaults +\DeclareMathSizes{5} {5} {5} {5} +\DeclareMathSizes{6} {6} {5} {5} +\DeclareMathSizes{7} {7} {5} {5} +\DeclareMathSizes{8} {8} {6} {5} +\DeclareMathSizes{9} {9} {6.5} {5} +\DeclareMathSizes{10} {10} {7.5} {5} +\DeclareMathSizes{12} {12} {9} {7} + +% Page styles +\def\ps@headings + {% + \def\@oddfoot{\vbox to 12.5\p@{\rule{\textwidth}{0.5\p@}\vss + \hbox to \textwidth{\helveticabold\small {Frontiers}\hfill \thepage}% + }}% + \def\@evenfoot{\vbox to 12.5\p@{\rule{\textwidth}{0.5\p@}\vss + \hbox to \textwidth{\helvetica\small {\color{red}This is a provisional file, not the final typeset article}\hfill\helveticabold\color{black}\thepage}% + }}% + \def\@evenhead{\vbox{\hbox to \textwidth{\fontsize{11}{10}\selectfont + \helveticabold{\fontshape{it}\selectfont + \strut\firstAuthorLast}\hfill\strut\rightmark}\vspace{6.5\p@}\rule{\textwidth}{0.5\p@}}}% + \def\@oddhead{\vbox{\hbox to \textwidth{\fontsize{11}{10}\selectfont + \helveticabold{\fontshape{it}\selectfont + \strut\firstAuthorLast}\hfill\strut\rightmark}\vspace{6.5\p@}\rule{\textwidth}{0.5\p@}}}% + \def\titlemark##1{\markboth{##1}{##1}}% + \def\authormark##1{\gdef\leftmark{##1}}% + } + +\def\ps@opening + {% + \def\@oddfoot{\vbox to 13\p@{\hbox{\rule{\textwidth}{1\p@}}\vss + \hbox to \textwidth{\helvetica + \fontsize{7}{9}\fontshape{n}\selectfont \space % + \hfill\small\helveticabold\thepage}% + }}% + \def\@evenfoot{\vbox to 13\p@{\rule{\textwidth}{1\p@}\vss + \hbox to \textwidth{\helvetica\thepage\hfill + \fontsize{7}{9}\fontshape{n}\selectfont \space }% + }}% + \let\@evenhead\relax + \let\@oddhead\relax} + +% Page range +\newif\iflastpagegiven \lastpagegivenfalse +\newcommand\firstpage[1]{% + \gdef\@firstpage{#1}% + \ifnum\@firstpage>\c@page + \setcounter{page}{#1}% + \ClassWarning{BIO}{Increasing pagenumber to \@firstpage}% + \else \ifnum\@firstpage<\c@page + \ClassWarning{BIO}{Firstpage lower than pagenumber}\fi\fi + \xdef\@firstpage{\the\c@page}% + } +\def\@firstpage{1} +\def\pagenumbering#1{% + \global\c@page \@ne + \gdef\thepage{\csname @#1\endcsname \c@page}% + \gdef\thefirstpage{% + \csname @#1\endcsname \@firstpage}% + \gdef\thelastpage{% + \csname @#1\endcsname \@lastpage}% + } + +\newcommand\lastpage[1]{\xdef\@lastpage{#1}% + \global\lastpagegiventrue} +\def\@lastpage{0} +\def\setlastpage{\iflastpagegiven\else + \edef\@tempa{@lastpage@}% + \expandafter + \ifx \csname \@tempa \endcsname \relax + \gdef\@lastpage{0}% + \else + \xdef\@lastpage{\@nameuse{@lastpage@}}% + \fi + \fi } +\def\writelastpage{% + \iflastpagegiven \else + \immediate\write\@auxout% + {\string\global\string\@namedef{@lastpage@}{\the\c@page}}% + \fi + } +\def\thepagerange{% + \ifnum\@lastpage =0 {\ \bf ???} \else + \ifnum\@lastpage = \@firstpage \ \thefirstpage\else + \thefirstpage--\thelastpage \fi\fi} + +\AtBeginDocument{\setlastpage + \pagenumbering{arabic}% + } +\AtEndDocument{% + \writelastpage + \if@final + \clearemptydoublepage + \else + \clearpage + \fi} + +% +% Sectional units +% + +% Counters +\newcounter{section} +\newcounter{subsection}[section] +\newcounter{subsubsection}[subsection] +\newcounter{paragraph}[subsubsection] +\newcounter{subparagraph}[paragraph] +\newcounter{figure} +\newcounter{subfigure} +\newcounter{table} + +% Form of the numbers +\newcommand\thepage{\arabic{page}} +\renewcommand\thesection{\arabic{section}} +\renewcommand\thesubsection{{\thesection.\arabic{subsection}}} +\renewcommand\thesubsubsection{{\thesubsection.\arabic{subsubsection}}} +\renewcommand\theparagraph{\thesubsubsection.\arabic{paragraph}} +\renewcommand\thesubparagraph{\theparagraph.\arabic{subparagraph}} +\renewcommand\theequation{\arabic{equation}} + +% Form of the words +\newcommand\contentsname{Contents} +\newcommand\listfigurename{List of Figures} +\newcommand\listtablename{List of Tables} +\newcommand\partname{Part} +\newcommand\appendixname{Appendix} +\newcommand\abstractname{Abstract} +\newcommand\refname{References} +\newcommand\bibname{References} +\newcommand\indexname{Index} +\newcommand\figurename{Figure} +\newcommand\tablename{Table} + +% Clearemptydoublepage should really clear the running heads too +\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}\cleardoublepage}} + +% Frontmatter, mainmatter and backmatter + +\newif\if@mainmatter \@mainmattertrue + +\newcommand\frontmatter{% + \clearpage + \@mainmatterfalse + \pagenumbering{roman}} + +\newcommand\mainmatter{% + \clearpage + \@mainmattertrue + \pagenumbering{arabic}} + +\newcommand\backmatter{% + \clearpage + \@mainmatterfalse} + + \newdateformat{mydate}{\THEDAY \ \monthname[ \THEMONTH] \THEYEAR} + \newdateformat{mydate2}{\monthname[\THEMONTH] \THEYEAR} + +%******** +% TITLE * +%******** +\newlength{\dropfromtop} +\setlength{\dropfromtop}{\z@} + +% Application Notes +\newif\if@appnotes +\newcommand{\application}{% +% \setlength{\dropfromtop}{-2.25pc}% + \global\@appnotestrue} + +% Short Title is for the Title of the Article +% Title is for the Title of the Journal + +\long\def\title{\@ifnextchar[{\short@title}{\@@title}} +\def\short@title[#1]{\titlemark{#1}\@@@title} +\def\@@title#1{\authormark{#1}\@@@title{#1}} +\long\def\@@@title#1{\gdef\@title{#1}} + +\long\def\author{\@ifnextchar[{\short@uthor}{\@uthor}} +\def\short@uthor[#1]{\authormark{#1}\@@author} +\def\@uthor#1{\authormark{#1}\@@author{#1}} +\long\def\@@author#1{\gdef\@author{#1}} + +\def\vol#1{\global\def\@vol{#1}} +\def\issue#1{\global\def\@issue{#1}} +\def\address#1{\global\def\@issue{#1}} +\def\history#1{\global\def\@history{#1}} +\def\correspondance#1{\global\def\@correspondance{#1}} +\def\extraAuth#1{\global\def\@extraAuth{#1}} +\def\address#1{\global\def\@address{#1}} + + +\def\date#1{\gdef\@date{#1}} + +%*********** +% Colors * +%*********** + +% Other colors +\definecolor{black}{cmyk}{0, 0, 0, 1} +\definecolor{gray}{cmyk}{0, 0, 0, 0.25} +\definecolor{darkgray}{cmyk}{0, 0, 0, 0.5} +\newlength{\extraspace} +\setlength{\extraspace}{\z@} + +\newcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 3mm\noindent +% \@textsuperscript{\normalfont\@thefnmark}\raggedright##1}% + \@textsuperscript{\normalfont\@thefnmark}##1}% + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{opening}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@address\@empty + \global\let\@history\@empty + \global\let\@extraAuth\@empty + \global\let\@topic\@empty + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\@pubyear\@empty + \global\let\address\relax + \global\let\topic\relax + \global\let\extraAuth\relax + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\pubyear\relax + \global\let\@copyrightline\@empty + \global\let\and\relax + \@afterindentfalse\@afterheading +} + +\newlength{\aboveskipchk}%for checking oddpage or evenpage top skip +\setlength{\aboveskipchk}{\z@}% + +\def\@maketitle{% + \let\footnote\thanks + \clearemptydoublepage + \checkoddpage\ifcpoddpage\setlength{\aboveskipchk}{-7pc}\else\setlength{\aboveskipchk}{-3pc}\fi%for checking oddpage or evenpage top skip%% + \vspace*{\aboveskipchk}% + \vspace{\dropfromtop}% + \hbox to \textwidth{% + + \parbox[t]{15pc}{% + \helvetica + \hfil + \flushleft \includegraphics[width=12pc,angle=0]{./logo1.pdf} + +}} + \rule{\textwidth}{1\p@}\par% + \helvetica + \hbox to \textwidth{% + \parbox[t]{36.5pc}{% + \vspace*{1sp} + {\helveticabold\fontsize{20}{21}\color{black}\selectfont\raggedright \@title \par}% + \vspace{4.5\p@} + {\helveticabold\fontsize{12}{15}\selectfont\raggedright \@author \par}% + \vspace{4\p@} + {\helvetica\fontsize{12}{12}\selectfont\raggedright\slshape\@address \Address \\ \par}% + \vspace{6\p@} + {\helvetica\fontsize{12}{10}\selectfont\raggedright {Correspondence*:\\ }\@correspondance \corrAuthor \\ \corrEmail \par} + \vspace{4\p@} + {\helvetica\fontsize{12}{12}\selectfont\raggedright\@extraAuth \par}% + \vspace{8\p@} + }% + } + \vspace{14.5\p@}% + } + +%*********** +% Abstract * +%*********** +\newcommand{\absection}[1]{% + \par\noindent{\bfseries #1}\space\ignorespaces} + +\newenvironment{abstract}{% + \begingroup + \let\section\absection + \fontfamily{\sfdefault}\fontsize{12}{12}\sffamily\selectfont + {\fontseries{b}\selectfont ABSTRACT}\par} +{\endgroup\smallskip\@afterheading\@afterindentfalse\vskip 12pt plus -2pt minus 2pt} + +% Section macros + +% Lowest level heading that takes a number by default +\setcounter{secnumdepth}{5} + +\renewcommand{\@seccntformat}[1]{\csname the#1\endcsname\quad} + +\def\section{% + \@startsection{section}{1}{\z@} + {-10\p@ plus -3\p@}{3\p@} + {\reset@font\raggedright\helveticabold\fontsize{13}{13}\color{black}\selectfont\MakeUppercase}} + +\def\section{% + \@startsection{section}{1}{\z@} + {-10\p@ plus -3\p@}{3\p@} + {\reset@font\raggedright\helveticabold\fontsize{13}{13}\color{black}\selectfont\MakeUppercase}} + +\def\subsection{% + \@startsection{subsection}{2}{\z@} + {2\p@ plus -1\p@}{2\p@} + {\reset@font\raggedright\mathversion{bold}\helveticabold\fontsize{11.5}{12}}} + +\def\subsubsection{% + \@startsection{subsubsection}{3}{\z@} + {1\p@ plus -1\p@}{1\p@} + {\reset@font\raggedright\mathversion{bold}\helvetica\fontsize{11.5}{12}}} + + \def\paragraph{% + \@startsection{paragraph}{4}{\z@} + {1\p@ plus -1\p@}{1\p@} + {\reset@font\itshape\helveticabold\fontsize{11.5}{12}}} + + \def\subparagraph{% + \@startsection{subparagraph}{5}{\z@} + {1\p@ plus -1\p@}{1\p@} + {\reset@font\itshape\helvetica\fontsize{11.5}{12}}} + +\def\textcolon{\text{\rm :}} + +% ******************** +% Figures and tables * +% ******************** + +% Table and array parameters +\setlength\arraycolsep{.5em} +\setlength\tabcolsep{.5em} +\setlength\arrayrulewidth{.5pt} +\setlength\doublerulesep{2.5pt} +\setlength\extrarowheight{\z@} +\renewcommand\arraystretch{1} + +%\newlength{\abovecaptionskip} +%\newlength{\belowcaptionskip} +%\setlength{\abovecaptionskip}{13pt} +%\setlength{\belowcaptionskip}{10.5pt} + +\long\def\@makecaption#1#2{\vspace{\abovecaptionskip}% + \begingroup + \normalsize + \textbf{#1.}\enskip{#2}\par + \endgroup} + +% Table rules +\def\toprule{\noalign{\ifnum0=`}\fi\hrule \@height 0.5pt \hrule \@height 6pt \@width 0pt \futurelet + \@tempa\@xhline} +\def\midrule{\noalign{\ifnum0=`}\fi \hrule \@height 6.75pt \@width 0pt \hrule \@height 0.5pt + \hrule \@height 6pt \@width 0pt \futurelet \@tempa\@xhline} +\def\botrule{\noalign{\ifnum0=`}\fi \hrule \@height 5.75pt \@width 0pt \hrule \@height 0.5pt \futurelet + \@tempa\@xhline} +\def\hrulefill{\leavevmode\leaders\hrule height .5pt\hfill\kern\z@} + +\def\thefigure{\@arabic\c@figure} +\def\fps@figure{tbp} +\def\ftype@figure{1} +\def\ext@figure{lof} +\def\fnum@figure{\figurename~\thefigure} +\def\figure{\@float{figure}} +\let\endfigure\end@float +\@namedef{figure*}{\@dblfloat{figure}} +\@namedef{endfigure*}{\end@dblfloat} +\def\thetable{\@arabic\c@table} +\def\fps@table{tbp} +\def\ftype@table{2} +\def\ext@table{lot} +\def\fnum@table{Table~\thetable} +\def\table{\let\source\tablesource\@float{table}} +\def\endtable{\end@float} +\@namedef{table*}{\@dblfloat{table}} +\@namedef{endtable*}{\end@dblfloat} + +\newif\if@rotate \@rotatefalse +\newif\if@rotatecenter \@rotatecenterfalse +\def\rotatecenter{\global\@rotatecentertrue} +\def\rotateendcenter{\global\@rotatecenterfalse} +\def\rotate{\global\@rotatetrue} +\def\endrotate{\global\@rotatefalse} +\newdimen\rotdimen +\def\rotstart#1{\special{ps: gsave currentpoint currentpoint translate + #1 neg exch neg exch translate}} +\def\rotfinish{\special{ps: currentpoint grestore moveto}} +\def\rotl#1{\rotdimen=\ht#1\advance\rotdimen by \dp#1 + \hbox to \rotdimen{\vbox to\wd#1{\vskip \wd#1 + \rotstart{270 rotate}\box #1\vss}\hss}\rotfinish} +\def\rotr#1{\rotdimen=\ht #1\advance\rotdimen by \dp#1 + \hbox to \rotdimen{\vbox to \wd#1{\vskip \wd#1 + \rotstart{90 rotate}\box #1\vss}\hss}\rotfinish} + +\newif\ifsub@@figure \sub@@figuretrue +\def\thesubfigure{\@arabic\c@figure\alph{subfigure}} +\def\fps@subfigure{tbp} +\def\ftype@subfigure{1} +\def\ext@subfigure{lof} +\def\fnum@subfigure{Figure \thesubfigure} +\def\subfigure{\ifsub@@figure\global\sub@@figurefalse\stepcounter{figure}\fi% + \@float{subfigure}} +\let\endsubfigure\end@float +\@namedef{subfigure*}{\ifsub@@figure\global\sub@@figurefalse% + \stepcounter{figure}\fi \@dblfloat{subfigure}} +\@namedef{endsubfigure*}{\end@dblfloat} + +\def\endfigure{\global\sub@@figuretrue\end@float} +\@namedef{endfigure*}{\global\sub@@figuretrue\end@dblfloat} + +\newdimen\tempdime +\newbox\temptbox + +% From ifmtarg.sty +% Copyright Peter Wilson and Donald Arseneau, 2000 +\begingroup +\catcode`\Q=3 +\long\gdef\@ifmtarg#1{\@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil} +\long\gdef\@xifmtarg#1#2Q#3#4#5\@nil{#4} +\long\gdef\@ifnotmtarg#1{\@xifmtarg#1QQ\@firstofone\@gobble\@nil} +\endgroup + +\def\tablesize{\@setfontsize\tablesize{10\p@}{10\p@}} + +\newenvironment{processtable}[3]{\setbox\temptbox=\hbox{{\tablesize #2}}% +\tempdime\wd\temptbox\@processtable{#1}{#2}{#3}{\tempdime}} +{\relax} + +\newcommand{\@processtable}[4]{% +\if@rotate +\setbox4=\vbox to \hsize{\vss\hbox to \textheight{% +\begin{minipage}{#4}% +\@ifmtarg{#1}{}{\caption{#1}}{\tablesize #2}% +\vskip7\p@\noindent +\parbox{#4}{\fontsize{10}{10}\selectfont #3\par}% +\end{minipage}}\vss}% +\rotr{4} +\else +\hbox to \hsize{\hss\begin{minipage}[t]{#4}% +\vskip2.9pt +\@ifmtarg{#1}{}{\caption{#1}}{\tablesize #2}% +\vskip6\p@\noindent +\parbox{#4}{\fontsize{8}{9}\selectfont #3\par}% +\end{minipage}\hss}\fi}% + +\newcolumntype{P}[1]{>{\raggedright\let\\\@arraycr\hangindent1em}p{#1}} + +% ****************************** +% List numbering and lettering * +% ****************************** +\def\labelenumi{{\rm\arabic{enumi}.}} +\def\theenumi{\arabic{enumi}} +\def\labelenumii{{\rm\alph{enumii}.}} +\def\theenumii{\alph{enumii}} +\def\p@enumii{\theenumi} +\def\labelenumiii{{\rm(\arabic{enumiii})}} +\def\theenumiii{\roman{enumiii}} +\def\p@enumiii{\theenumi(\theenumii)} +\def\labelenumiv{{\rm(\arabic{enumiv})}} +\def\theenumiv{\Alph{enumiv}} +\def\p@enumiv{\p@enumiii\theenumiii} +\def\labelitemi{{\small$\bullet$}} +\def\labelitemii{{\small$\bullet$}} +\def\labelitemiii{{\small$\bullet$}} +\def\labelitemiv{{\small$\bullet$}} + +\def\@listI{\leftmargin\leftmargini \topsep\medskipamount} +\let\@listi\@listI +\@listi +\def\@listii{\topsep\z@\leftmargin\leftmarginii} +\def\@listiii{\leftmargin\leftmarginiii \topsep\z@} +\def\@listiv{\leftmargin\leftmarginiv \topsep\z@} +\def\@listv{\leftmargin\leftmarginv \topsep\z@} +\def\@listvi{\leftmargin\leftmarginvi \topsep\z@} + +\setlength{\leftmargini}{3mm} +\setlength{\leftmarginii}{\z@} +\setlength{\leftmarginiii}{\z@} +\setlength{\leftmarginiv}{\z@} + +% Changes to the list parameters for enumerate +\def\enumargs{% + \partopsep \z@ + \itemsep 3\p@ + \parsep \z@ + \labelsep 0.5em + \listparindent \parindent + \itemindent \z@ + \topsep 2\p@ +} + +\def\enumerate{% + \@ifnextchar[{\@numerate}{\@numerate[0]}} + +\def\@numerate[#1]{% + \ifnum \@enumdepth >3 \@toodeep\else + \advance\@enumdepth \@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth} + \list{\csname label\@enumctr\endcsname}{% + \enumargs + \setlength{\leftmargin}{\csname leftmargin\romannumeral\the\@enumdepth\endcsname} + \usecounter{\@enumctr} + \settowidth\labelwidth{#1} + \addtolength{\leftmargin}{\labelwidth} + \addtolength{\leftmargin}{\labelsep} + \def\makelabel##1{\hss \llap{##1}}}% + \fi + } +\let\endenumerate\endlist + +% Changes to the list parameters for itemize +\def\itemargs{% + \partopsep \z@ + \itemsep 3\p@ + \parsep \z@ + \labelsep 0.5em + \rightmargin \z@ + \listparindent \parindent + \itemindent \z@ + \topsep 2\p@ +} + +\def\itemize{% + \@ifnextchar[{\@itemize}{\@itemize[$\bullet$]}} + +\def\@itemize[#1]{% + \ifnum \@itemdepth >3 \@toodeep\else + \advance\@itemdepth \@ne + \edef\@itemctr{item\romannumeral\the\@itemdepth} + \list{\csname label\@itemctr\endcsname}{% + \itemargs + \setlength{\leftmargin}{\csname leftmargin\romannumeral\the\@itemdepth\endcsname} + \settowidth\labelwidth{#1} + \addtolength{\leftmargin}{\labelwidth} + \addtolength{\leftmargin}{\labelsep} + \def\makelabel##1{\hss \llap{##1}}}% + \fi + } +\let\enditemize\endlist + +\newenvironment{unlist}{% + \begin{list}{}% + {\setlength{\labelwidth}{\z@}% + \setlength{\labelsep}{\z@}% + \setlength{\topsep}{\medskipamount}% + \setlength{\itemsep}{3\p@}% + \setlength{\leftmargin}{2em}% + \setlength{\itemindent}{-2em}}} +{\end{list}} + + +% *********************** +% Quotes and Quotations * +% *********************** +\def\quotation{\par\begin{list}{}{ + \setlength{\topsep}{\medskipamount} + \setlength{\leftmargin}{2em}% + \setlength{\rightmargin}{\z@}% + \setlength\labelwidth{0pt}% + \setlength\labelsep{0pt}% + \listparindent\parindent}% + \item[]} +\def\endquotation{\end{list}} +\let\quote\quotation +\let\endquote\endquotation + +\skip\@mpfootins = \skip\footins +\fboxsep=6\p@ +\fboxrule=1\p@ + +% ******************* +% Table of contents * +% ******************* +\newcommand\@pnumwidth{4em} +\newcommand\@tocrmarg{2.55em plus 1fil} +\newcommand\@dotsep{1000} +\setcounter{tocdepth}{4} + +\def\numberline#1{\hbox to \@tempdima{{#1}}} + +\def\@authortocline#1#2#3#4#5{% + \vskip 1.5\p@ + \ifnum #1>\c@tocdepth \else + {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip + \parindent #2\relax\@afterindenttrue + \interlinepenalty\@M + \leavevmode + \@tempdima #3\relax + \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip + {\itshape #4}\nobreak + \leaders\hbox{$\m@th + \mkern \@dotsep mu\hbox{.}\mkern \@dotsep + mu$}\hfill + \nobreak + \hb@xt@\@pnumwidth{\hfil}% + \par}% + \fi} + +\newcommand*\l@author{\@authortocline{2}{0pt}{30pt}} +\newcommand*\l@section{\@dottedtocline{3}{11pt}{20pt}} +\newcommand*\l@subsection{\@dottedtocline{4}{31pt}{29pt}} +\newcommand*\l@subsubsection[2]{} + + + +% *********** +% Footnotes * +% *********** + +\def\footnoterule{\noindent\rule{\columnwidth}{0.5pt}} +\def\@makefnmark{\@textsuperscript{\normalfont\@thefnmark}}% +\newcommand\@makefntext[1]{\noindent{\@makefnmark}\enskip#1} + +% *********** +% References * +% *********** + +\providecommand{\newblock}{} +\newenvironment{thebibliography}{% + \section{\bibname}% + \begingroup + \small + \begin{list}{}{% + \setlength{\topsep}{\z@}% + \setlength{\labelsep}{\z@}% + \settowidth{\labelwidth}{\z@}% + \setlength{\leftmargin}{4mm}% + \setlength{\itemindent}{-4mm}}\small} +{\end{list}\endgroup} + +\usepackage[numbers,round]{natbib} +\renewcommand\@biblabel[1]{\textbf #1 .} + +% ********** +% Appendix * +% ********** +\newif\ifappend % Are we in the Appendix? +\def\appendix{\par + \setcounter{section}{0} + \setcounter{subsection}{0} + \appendtrue +} + +%Math parameters + +\setlength{\jot}{5\p@} +\mathchardef\@m=1500 % adapted value + +\def\frenchspacing{\sfcode`\.\@m \sfcode`\?\@m \sfcode`\!\@m + \sfcode`\:\@m \sfcode`\;\@m \sfcode`\,\@m} + +% Theorems +\def\th@plain{% +%% \let\thm@indent\noindent % no indent +\thm@headfont{\quad\scshape}% heading font is bold +\thm@notefont{\upshape\mdseries}% same as heading font +\thm@headpunct{.}% no period after heading +\thm@headsep 5\p@ plus\p@ minus\p@\relax +\itshape % body font +} + +\vbadness=9999 +\tolerance=9999 +\doublehyphendemerits=10000 +\doublehyphendemerits 640000 % corresponds to badness 800 +\finalhyphendemerits 1000000 % corresponds to badness 1000 + +\flushbottom +\frenchspacing +\ps@headings +\twocolumn + +% Screen PDF compatability +\newcommand{\medline}[1]{% + \unskip\unskip\ignorespaces} + + +%%%%for smaller size text +\newenvironment{methods}{% + \begingroup +\def\section{% + \@startsection{section}{1}{\z@} + {-24\p@ plus -3\p@}{4\p@} + {\reset@font\raggedright\helveticabold\fontsize{10}{12}\selectfont\MakeUppercase}} + \def\subsection{% + \@startsection{subsection}{2}{\z@} + {-5\p@ plus -2\p@}{4\p@} + {\reset@font\raggedright\mathversion{bold}\fontseries{b}\fontsize{10}{12}\selectfont}} + \def\subsubsection{% + \@startsection{subsubsection}{3}{\z@} + {-6\p@ plus -1\p@}{-1em} + {\reset@font\normalfont\normalsize\itshape}} +\footnotesize + \par} +{\par\endgroup\bigskip\@afterheading\@afterindentfalse} + + + +\graphicspath{{g:/artwork/oup/bioinfo/}} + +\language=2 + +\hyphenation{Figure Table Figures Tables} + +\newcommand{\href}[2]{#2} + +\renewenvironment{proof}[1][\proofname]{\par + \normalfont \topsep6\p@\@plus6\p@\relax + \labelsep 0.5em + \trivlist + \item[\hskip\labelsep\hskip1em\textsc{#1}.]\ignorespaces +}{\endtrivlist\@endpefalse} + +%%Different Bonds + +\def\sbond{\ensuremath{\raise.25ex\hbox{${-}\!\!\!\!{-}$}}\kern -.9pt} +\def\dbond{\ensuremath{\raise.25ex\hbox{=$\!$=}}} +\def\tbond{\ensuremath{\raise.20ex\hbox{${\equiv}\!\!\!{\equiv}$}}} + +\newcommand{\query}[2][0pt]{}% + +\renewcommand{\dag}{{\mathversion{normal}$^{\dagger}$}} + +\endinput diff --git a/inst/rmarkdown/templates/frontiers_article/skeleton/frontiersSCNS.cls b/inst/rmarkdown/templates/frontiers_article/skeleton/frontiersSCNS.cls new file mode 100755 index 000000000..2f0522345 --- /dev/null +++ b/inst/rmarkdown/templates/frontiers_article/skeleton/frontiersSCNS.cls @@ -0,0 +1,955 @@ +\newcommand\classname{frontiersSCNS} %this file is based in bioninfo.cls +\newcommand\lastmodifieddate{2016/11/10} +\newcommand\versionnumber{2.6} + +% For printing crop marks +\newif\if@cropmarkson \@cropmarksontrue + +\NeedsTeXFormat{LaTeX2e}[2013/26/03] +\ProvidesClass{\classname}[\lastmodifieddate\space\versionnumber] + +\setlength{\paperheight}{11truein} +\setlength{\paperwidth}{8.5truein} + +\newif\if@final + +\DeclareOption{draft}{\PassOptionsToPackage{draft}{graphicx}} +\DeclareOption{paper}{\PassOptionsToPackage{paper}{graphicx}} +\DeclareOption{a4paper}{\PassOptionsToPackage{a4}{crop}} +\DeclareOption{centre}{\PassOptionsToPackage{center}{crop}} +\DeclareOption{crop}{\PassOptionsToPackage{cam}{crop}\global\@cropmarksontrue} +\DeclareOption{nocrop}{\PassOptionsToPackage{off}{crop}\global\@cropmarksonfalse} +\DeclareOption{info}{\PassOptionsToPackage{info}{crop}} +\DeclareOption{noinfo}{\PassOptionsToPackage{noinfo}{crop}} +\DeclareOption{final}{\global\@finaltrue} +\DeclareOption{utf8}{\PassOptionsToPackage{utf8}{inputenc}} + +\ExecuteOptions{a4paper,nocrop,centre,info,paper} + +\ProcessOptions + +% Load all necessary packages +\RequirePackage{inputenc,crop,graphicx,amsmath,array,color,amssymb,flushend,stfloats,amsthm,chngpage,times,datetime,parskip} +\def\helvetica{\fontfamily{phv}\selectfont} +\def\helveticaitalic{\fontfamily{phv}\itshape\selectfont} +\def\helveticabold{\fontfamily{phv}\bfseries\selectfont} +\def\helveticabolditalic{\fontfamily{phv}\bfseries\itshape\selectfont} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage[labelsep=quad,indention=10pt]{caption} +\usepackage[labelfont=bf,list=true]{subcaption} + +\newcommand\@ptsize{0} + +% Set twoside printing +\@twosidetrue + +% Marginal notes are on the outside edge +\@mparswitchfalse + +\reversemarginpar + +\renewcommand\normalsize{% + \@setfontsize\normalsize{12}{12}% + \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ + \abovedisplayshortskip \z@ \@plus3\p@ + \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ + \belowdisplayskip \abovedisplayskip + \let\@listi\@listI} +\normalsize +\let\@bls\baselineskip + + +\newcommand\small{% + \@setfontsize\small{11}{12}% + \abovedisplayskip 11\p@ minus 3\p@ + \belowdisplayskip \abovedisplayskip + \abovedisplayshortskip \z@ plus 2\p@ + \belowdisplayshortskip 4\p@ plus 2\p@ minus2\p@ + \def\@listi{\topsep 4.5\p@ plus 2\p@ minus 1\p@ + \itemsep \parsep + \topsep 4\p@ plus 2\p@ minus 2\p@}} + +\newcommand\footnotesize{% + \@setfontsize\footnotesize{8}{10}% + \abovedisplayskip 6\p@ minus 3\p@ + \belowdisplayskip\abovedisplayskip + \abovedisplayshortskip \z@ plus 3\p@ + \belowdisplayshortskip 6\p@ plus 3\p@ minus 3\p@ + \def\@listi{\topsep 3\p@ plus 1\p@ minus 1\p@ + \parsep 2\p@ plus 1\p@ minus 1\p@\itemsep \parsep}} + +\def\scriptsize{\@setfontsize\scriptsize{11pt}{11pt}} +\def\tiny{\@setfontsize\tiny{10pt}{11pt}} +\def\large{\@setfontsize\large{13pt}{14pt}} +\def\Large{\@setfontsize\Large{14pt}{16}} +\def\LARGE{\@setfontsize\LARGE{15pt}{17pt}} +\def\huge{\@setfontsize\huge{22pt}{22pt}} +\def\Huge{\@setfontsize\Huge{30pt}{30pt}} + + +\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} +\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} +\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} +\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} +\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} +\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} +\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} + +% Line spacing +\setlength\lineskip{1\p@} +\setlength\normallineskip{1\p@} +\renewcommand\baselinestretch{} + + +% Set inter-para skips +\setlength\smallskipamount{3\p@ \@plus 1\p@ \@minus 1\p@} +\setlength\medskipamount{6\p@ \@plus 2\p@} +\setlength\bigskipamount{12\p@ \@plus 4\p@ \@minus 4\p@} + +% Paragraph dimensions and inter-para spacing +\setlength\parindent{3mm} +\setlength{\parskip}{\medskipamount} + +% Page break penalties +\@lowpenalty 51 +\@medpenalty 151 +\@highpenalty 301 + +% Disallow widows and orphans +\clubpenalty 10000 +\widowpenalty 10000 + +% Disable page breaks before equations, allow pagebreaks after +% equations and discourage widow lines before equations. +\displaywidowpenalty 100 +\predisplaypenalty 10000 +\postdisplaypenalty 2500 + +% Allow breaking the page in the middle of a paragraph +\interlinepenalty 0 + +% Disallow breaking the page after a hyphenated line +\brokenpenalty 10000 + +% Hyphenation; don't split words into less than three characters +\lefthyphenmin=3 +\righthyphenmin=3 + +% +% Set page layout dimensions +% +\setlength\headheight{16\p@} % height of running head +\setlength\topmargin{1.3pc} % head margin +\addtolength\topmargin{-1in} % subtract out the 1 inch driver margin + +\setlength\topskip{10\p@} % height of first line of text +\setlength\headsep{19\p@} % space below running head -- + +\setlength\footskip{34\p@} % space above footer line +\setlength\maxdepth{1\topskip} % pages can be short or deep by half a line? + +\setlength\textwidth{42pc} % text measure excluding margins + +\setlength\textheight{56\baselineskip} % 54 lines on a full page, +\addtolength\textheight{\topskip} % including the first + % line on the page + +% Set the margins +\setlength\marginparsep{3\p@} +\setlength\marginparpush{3\p@} +\setlength\marginparwidth{35\p@} + +\setlength\oddsidemargin{4.5pc} +\addtolength\oddsidemargin{-1in} % subtract out the 1 inch driver margin +\setlength\@tempdima{\paperwidth} +\addtolength\@tempdima{-\textwidth} +\addtolength\@tempdima{-4.5pc} +\setlength\evensidemargin{\@tempdima} +\addtolength\evensidemargin{-1in} + +\setlength\columnsep{1.5pc} % space between columns for double-column text +\setlength\columnseprule{0\p@} % width of rule between two columns + +% Footnotes +\setlength\footnotesep{9\p@} % space between footnotes +% space between text and footnote +\setlength{\skip\footins}{12\p@ \@plus 6\p@ \@minus 1\p@} + +% Float placement parameters + +% The total number of floats that can be allowed on a page. +\setcounter{totalnumber}{10} +% The maximum number of floats at the top and bottom of a page. +\setcounter{topnumber}{5} +\setcounter{bottomnumber}{5} +% The maximum part of the top or bottom of a text page that can be +% occupied by floats. This is set so that at least four lines of text +% fit on the page. +\renewcommand\topfraction{.9} +\renewcommand\bottomfraction{.9} +% The minimum amount of a text page that must be occupied by text. +% This should accomodate four lines of text. +\renewcommand\textfraction{.06} +% The minimum amount of a float page that must be occupied by floats. +\renewcommand\floatpagefraction{.94} + +% The same parameters repeated for double column output +\renewcommand\dbltopfraction{.9} +\renewcommand\dblfloatpagefraction{.9} + +% Space between floats +\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@} +% Space between floats and text +\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} +% Space above and below an inline figure +\setlength\intextsep {18\p@ \@plus 2\p@ \@minus 2\p@} + +% For double column floats +\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} +\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} + +% Space left at top, bottom and inbetween floats on a float page. +\setlength\@fptop{0\p@} % no space above float page figures +\setlength\@fpsep{12\p@ \@plus 1fil} +\setlength\@fpbot{0\p@} + +% The same for double column +\setlength\@dblfptop{0\p@} +\setlength\@dblfpsep{12\p@ \@plus 1fil} +\setlength\@dblfpbot{0\p@} + +% Override settings in mathtime back to TeX defaults +\DeclareMathSizes{5} {5} {5} {5} +\DeclareMathSizes{6} {6} {5} {5} +\DeclareMathSizes{7} {7} {5} {5} +\DeclareMathSizes{8} {8} {6} {5} +\DeclareMathSizes{9} {9} {6.5} {5} +\DeclareMathSizes{10} {10} {7.5} {5} +\DeclareMathSizes{12} {12} {9} {7} + +% Page styles +\def\ps@headings + {% + \def\@oddfoot{\vbox to 12.5\p@{\rule{\textwidth}{0.5\p@}\vss + \hbox to \textwidth{\helveticabold\small {Frontiers}\hfill \thepage}% + }}% + \def\@evenfoot{\vbox to 12.5\p@{\rule{\textwidth}{0.5\p@}\vss + \hbox to \textwidth{\helvetica\small {\color{red}This is a provisional file, not the final typeset article}\hfill\helveticabold\color{black}\thepage}% + }}% + \def\@evenhead{\vbox{\hbox to \textwidth{\fontsize{11}{10}\selectfont + \helveticabold{\fontshape{it}\selectfont + \strut\firstAuthorLast}\hfill\strut\rightmark}\vspace{6.5\p@}\rule{\textwidth}{0.5\p@}}}% + \def\@oddhead{\vbox{\hbox to \textwidth{\fontsize{11}{10}\selectfont + \helveticabold{\fontshape{it}\selectfont + \strut\firstAuthorLast}\hfill\strut\rightmark}\vspace{6.5\p@}\rule{\textwidth}{0.5\p@}}}% + \def\titlemark##1{\markboth{##1}{##1}}% + \def\authormark##1{\gdef\leftmark{##1}}% + } + +\def\ps@opening + {% + \def\@oddfoot{\vbox to 13\p@{\hbox{\rule{\textwidth}{1\p@}}\vss + \hbox to \textwidth{\helvetica + \fontsize{7}{9}\fontshape{n}\selectfont \space % + \hfill\small\helveticabold\thepage}% + }}% + \def\@evenfoot{\vbox to 13\p@{\rule{\textwidth}{1\p@}\vss + \hbox to \textwidth{\helvetica\thepage\hfill + \fontsize{7}{9}\fontshape{n}\selectfont \space }% + }}% + \let\@evenhead\relax + \let\@oddhead\relax} + +% Page range +\newif\iflastpagegiven \lastpagegivenfalse +\newcommand\firstpage[1]{% + \gdef\@firstpage{#1}% + \ifnum\@firstpage>\c@page + \setcounter{page}{#1}% + \ClassWarning{BIO}{Increasing pagenumber to \@firstpage}% + \else \ifnum\@firstpage<\c@page + \ClassWarning{BIO}{Firstpage lower than pagenumber}\fi\fi + \xdef\@firstpage{\the\c@page}% + } +\def\@firstpage{1} +\def\pagenumbering#1{% + \global\c@page \@ne + \gdef\thepage{\csname @#1\endcsname \c@page}% + \gdef\thefirstpage{% + \csname @#1\endcsname \@firstpage}% + \gdef\thelastpage{% + \csname @#1\endcsname \@lastpage}% + } + +\newcommand\lastpage[1]{\xdef\@lastpage{#1}% + \global\lastpagegiventrue} +\def\@lastpage{0} +\def\setlastpage{\iflastpagegiven\else + \edef\@tempa{@lastpage@}% + \expandafter + \ifx \csname \@tempa \endcsname \relax + \gdef\@lastpage{0}% + \else + \xdef\@lastpage{\@nameuse{@lastpage@}}% + \fi + \fi } +\def\writelastpage{% + \iflastpagegiven \else + \immediate\write\@auxout% + {\string\global\string\@namedef{@lastpage@}{\the\c@page}}% + \fi + } +\def\thepagerange{% + \ifnum\@lastpage =0 {\ \bf ???} \else + \ifnum\@lastpage = \@firstpage \ \thefirstpage\else + \thefirstpage--\thelastpage \fi\fi} + +\AtBeginDocument{\setlastpage + \pagenumbering{arabic}% + } +\AtEndDocument{% + \writelastpage + \if@final + \clearemptydoublepage + \else + \clearpage + \fi} + + +% +% Sectional units +% + +% Counters +\newcounter{section} +\newcounter{subsection}[section] +\newcounter{subsubsection}[subsection] +\newcounter{paragraph}[subsubsection] +\newcounter{subparagraph}[paragraph] +\newcounter{figure} +\newcounter{subfigure} +\newcounter{table} + +% Form of the numbers +\newcommand\thepage{\arabic{page}} +\renewcommand\thesection{\arabic{section}} +\renewcommand\thesubsection{{\thesection.\arabic{subsection}}} +\renewcommand\thesubsubsection{{\thesubsection.\arabic{subsubsection}}} +\renewcommand\theparagraph{\thesubsubsection.\arabic{paragraph}} +\renewcommand\thesubparagraph{\theparagraph.\arabic{subparagraph}} +\renewcommand\theequation{\arabic{equation}} + +% Form of the words +\newcommand\contentsname{Contents} +\newcommand\listfigurename{List of Figures} +\newcommand\listtablename{List of Tables} +\newcommand\partname{Part} +\newcommand\appendixname{Appendix} +\newcommand\abstractname{Abstract} +\newcommand\refname{References} +\newcommand\bibname{References} +\newcommand\indexname{Index} +\newcommand\figurename{Figure} +\newcommand\tablename{Table} + +% Clearemptydoublepage should really clear the running heads too +\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}\cleardoublepage}} + +% Frontmatter, mainmatter and backmatter + +\newif\if@mainmatter \@mainmattertrue + +\newcommand\frontmatter{% + \clearpage + \@mainmatterfalse + \pagenumbering{roman}} + +\newcommand\mainmatter{% + \clearpage + \@mainmattertrue + \pagenumbering{arabic}} + +\newcommand\backmatter{% + \clearpage + \@mainmatterfalse} + + \newdateformat{mydate}{\THEDAY \ \monthname[\THEMONTH] \THEYEAR} + \newdateformat{mydate2}{\monthname[\THEMONTH] \THEYEAR} + +%******** +% TITLE * +%******** +\newlength{\dropfromtop} +\setlength{\dropfromtop}{\z@} + +% Application Notes +\newif\if@appnotes +\newcommand{\application}{% +% \setlength{\dropfromtop}{-2.25pc}% + \global\@appnotestrue} + +% Short Title is for the Title of the Article +% Title is for the Title of the Journal + +\long\def\title{\@ifnextchar[{\short@title}{\@@title}} +\def\short@title[#1]{\titlemark{#1}\@@@title} +\def\@@title#1{\authormark{#1}\@@@title{#1}} +\long\def\@@@title#1{\gdef\@title{#1}} + +\long\def\author{\@ifnextchar[{\short@uthor}{\@uthor}} +\def\short@uthor[#1]{\authormark{#1}\@@author} +\def\@uthor#1{\authormark{#1}\@@author{#1}} +\long\def\@@author#1{\gdef\@author{#1}} + +\def\vol#1{\global\def\@vol{#1}} +\def\issue#1{\global\def\@issue{#1}} +\def\address#1{\global\def\@issue{#1}} +\def\history#1{\global\def\@history{#1}} +\def\correspondance#1{\global\def\@correspondance{#1}} +\def\extraAuth#1{\global\def\@extraAuth{#1}} +\def\address#1{\global\def\@address{#1}} + + +\def\date#1{\gdef\@date{#1}} + +%*********** +% Colors * +%*********** + +% Other colors +\definecolor{black}{cmyk}{0, 0, 0, 1} +\definecolor{gray}{cmyk}{0, 0, 0, 0.25} +\definecolor{darkgray}{cmyk}{0, 0, 0, 0.5} +\newlength{\extraspace} +\setlength{\extraspace}{\z@} + +\newcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 3mm\noindent +% \@textsuperscript{\normalfont\@thefnmark}\raggedright##1}% + \@textsuperscript{\normalfont\@thefnmark}##1}% + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{opening}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@address\@empty + \global\let\@history\@empty + \global\let\@extraAuth\@empty + \global\let\@topic\@empty + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\@pubyear\@empty + \global\let\address\relax + \global\let\topic\relax + \global\let\extraAuth\relax + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\pubyear\relax + \global\let\@copyrightline\@empty + \global\let\and\relax + \@afterindentfalse\@afterheading +} + +\newlength{\aboveskipchk}%for checking oddpage or evenpage top skip +\setlength{\aboveskipchk}{\z@}% + +\def\@maketitle{% + \let\footnote\thanks + \clearemptydoublepage + \checkoddpage\ifcpoddpage\setlength{\aboveskipchk}{-7pc}\else\setlength{\aboveskipchk}{-3pc}\fi%for checking oddpage or evenpage top skip%% + \vspace*{\aboveskipchk}% + \vspace{\dropfromtop}% + \hbox to \textwidth{% + + \parbox[t]{15pc}{% + \helvetica + \hfil + \flushleft \includegraphics[width=12pc,angle=0]{./logo1.pdf} + + +}} + + \rule{\textwidth}{1\p@}\par% + \helvetica + \hbox to \textwidth{% + \parbox[t]{36.5pc}{% + \vspace*{1sp} + {\helveticabold\fontsize{20}{21}\color{black}\selectfont\raggedright \@title \par}% + \vspace{4.5\p@} + {\helveticabold\fontsize{12}{15}\selectfont\raggedright \@author \par}% + \vspace{4\p@} + {\helvetica\fontsize{12}{12}\selectfont\raggedright\slshape\@address \Address \\ \par}% + \vspace{6\p@} + {\helvetica\fontsize{12}{10}\selectfont\raggedright {Correspondence*:\\ }\@correspondance \corrAuthor \\ \corrEmail \par} + \vspace{4\p@} + {\helvetica\fontsize{12}{12}\selectfont\raggedright\@extraAuth \par}% + \vspace{8\p@} + }% + } + \vspace{14.5\p@}% + } + +%*********** +% Abstract * +%*********** +\newcommand{\absection}[1]{% + \par\noindent{\bfseries #1}\space\ignorespaces} + +\newenvironment{abstract}{% + \begingroup + \let\section\absection + \fontfamily{\sfdefault}\fontsize{12}{12}\sffamily\selectfont + {\fontseries{b}\selectfont ABSTRACT}\par} +{\endgroup\smallskip\@afterheading\@afterindentfalse\vskip 12pt plus -2pt minus 2pt} + +% Section macros + +% Lowest level heading that takes a number by default +\setcounter{secnumdepth}{5} + +\renewcommand{\@seccntformat}[1]{\csname the#1\endcsname\quad} + +\def\section{% + \@startsection{section}{1}{\z@} + {-10\p@ plus -3\p@}{3\p@} + {\reset@font\raggedright\helveticabold\fontsize{13}{13}\color{black}\selectfont\MakeUppercase}} + +\def\subsection{% + \@startsection{subsection}{2}{\z@} + {2\p@ plus -1\p@}{2\p@} + {\reset@font\raggedright\mathversion{bold}\helveticabold\fontsize{11.5}{12}}} + +\def\subsubsection{% + \@startsection{subsubsection}{3}{\z@} + {1\p@ plus -1\p@}{1\p@} + {\reset@font\raggedright\mathversion{bold}\helvetica\fontsize{11.5}{12}}} + + \def\paragraph{% + \@startsection{paragraph}{4}{\z@} + {1\p@ plus -1\p@}{1\p@} + {\reset@font\itshape\helveticabold\fontsize{11.5}{12}}} + + \def\subparagraph{% + \@startsection{subparagraph}{5}{\z@} + {1\p@ plus -1\p@}{1\p@} + {\reset@font\itshape\helvetica\fontsize{11.5}{12}}} + +\def\textcolon{\text{\rm :}} + +% ******************** +% Figures and tables * +% ******************** + +% Table and array parameters +\setlength\arraycolsep{.5em} +\setlength\tabcolsep{.5em} +\setlength\arrayrulewidth{.5pt} +\setlength\doublerulesep{2.5pt} +\setlength\extrarowheight{\z@} +\renewcommand\arraystretch{1} + +%\newlength{\abovecaptionskip} +%\newlength{\belowcaptionskip} +%\setlength{\abovecaptionskip}{13pt} +%\setlength{\belowcaptionskip}{10.5pt} + +\long\def\@makecaption#1#2{\vspace{\abovecaptionskip}% + \begingroup + \normalsize + \textbf{#1.}\enskip{#2}\par + \endgroup} + + +% Table rules +\def\toprule{\noalign{\ifnum0=`}\fi\hrule \@height 0.5pt \hrule \@height 6pt \@width 0pt \futurelet + \@tempa\@xhline} +\def\midrule{\noalign{\ifnum0=`}\fi \hrule \@height 6.75pt \@width 0pt \hrule \@height 0.5pt + \hrule \@height 6pt \@width 0pt \futurelet \@tempa\@xhline} +\def\botrule{\noalign{\ifnum0=`}\fi \hrule \@height 5.75pt \@width 0pt \hrule \@height 0.5pt \futurelet + \@tempa\@xhline} +\def\hrulefill{\leavevmode\leaders\hrule height .5pt\hfill\kern\z@} + +\def\thefigure{\@arabic\c@figure} +\def\fps@figure{tbp} +\def\ftype@figure{1} +\def\ext@figure{lof} +\def\fnum@figure{\figurename~\thefigure} +\def\figure{\@float{figure}} +\let\endfigure\end@float +\@namedef{figure*}{\@dblfloat{figure}} +\@namedef{endfigure*}{\end@dblfloat} +\def\thetable{\@arabic\c@table} +\def\fps@table{tbp} +\def\ftype@table{2} +\def\ext@table{lot} +\def\fnum@table{Table~\thetable} +\def\table{\let\source\tablesource\@float{table}} +\def\endtable{\end@float} +\@namedef{table*}{\@dblfloat{table}} +\@namedef{endtable*}{\end@dblfloat} + +\newif\if@rotate \@rotatefalse +\newif\if@rotatecenter \@rotatecenterfalse +\def\rotatecenter{\global\@rotatecentertrue} +\def\rotateendcenter{\global\@rotatecenterfalse} +\def\rotate{\global\@rotatetrue} +\def\endrotate{\global\@rotatefalse} +\newdimen\rotdimen +\def\rotstart#1{\special{ps: gsave currentpoint currentpoint translate + #1 neg exch neg exch translate}} +\def\rotfinish{\special{ps: currentpoint grestore moveto}} +\def\rotl#1{\rotdimen=\ht#1\advance\rotdimen by \dp#1 + \hbox to \rotdimen{\vbox to\wd#1{\vskip \wd#1 + \rotstart{270 rotate}\box #1\vss}\hss}\rotfinish} +\def\rotr#1{\rotdimen=\ht #1\advance\rotdimen by \dp#1 + \hbox to \rotdimen{\vbox to \wd#1{\vskip \wd#1 + \rotstart{90 rotate}\box #1\vss}\hss}\rotfinish} + +\newif\ifsub@@figure \sub@@figuretrue +\def\thesubfigure{\@arabic\c@figure\alph{subfigure}} +\def\fps@subfigure{tbp} +\def\ftype@subfigure{1} +\def\ext@subfigure{lof} +\def\fnum@subfigure{Figure \thesubfigure} +\def\subfigure{\ifsub@@figure\global\sub@@figurefalse\stepcounter{figure}\fi% + \@float{subfigure}} +\let\endsubfigure\end@float +\@namedef{subfigure*}{\ifsub@@figure\global\sub@@figurefalse% + \stepcounter{figure}\fi \@dblfloat{subfigure}} +\@namedef{endsubfigure*}{\end@dblfloat} + +\def\endfigure{\global\sub@@figuretrue\end@float} +\@namedef{endfigure*}{\global\sub@@figuretrue\end@dblfloat} + +\newdimen\tempdime +\newbox\temptbox + +% From ifmtarg.sty +% Copyright Peter Wilson and Donald Arseneau, 2000 +\begingroup +\catcode`\Q=3 +\long\gdef\@ifmtarg#1{\@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil} +\long\gdef\@xifmtarg#1#2Q#3#4#5\@nil{#4} +\long\gdef\@ifnotmtarg#1{\@xifmtarg#1QQ\@firstofone\@gobble\@nil} +\endgroup + +\def\tablesize{\@setfontsize\tablesize{10\p@}{10\p@}} + +\newenvironment{processtable}[3]{\setbox\temptbox=\hbox{{\tablesize #2}}% +\tempdime\wd\temptbox\@processtable{#1}{#2}{#3}{\tempdime}} +{\relax} + +\newcommand{\@processtable}[4]{% +\if@rotate +\setbox4=\vbox to \hsize{\vss\hbox to \textheight{% +\begin{minipage}{#4}% +\@ifmtarg{#1}{}{\caption{#1}}{\tablesize #2}% +\vskip7\p@\noindent +\parbox{#4}{\fontsize{10}{10}\selectfont #3\par}% +\end{minipage}}\vss}% +\rotr{4} +\else +\hbox to \hsize{\hss\begin{minipage}[t]{#4}% +\vskip2.9pt +\@ifmtarg{#1}{}{\caption{#1}}{\tablesize #2}% +\vskip6\p@\noindent +\parbox{#4}{\fontsize{8}{9}\selectfont #3\par}% +\end{minipage}\hss}\fi}% + +\newcolumntype{P}[1]{>{\raggedright\let\\\@arraycr\hangindent1em}p{#1}} + +% ****************************** +% List numbering and lettering * +% ****************************** +\def\labelenumi{{\rm\arabic{enumi}.}} +\def\theenumi{\arabic{enumi}} +\def\labelenumii{{\rm\alph{enumii}.}} +\def\theenumii{\alph{enumii}} +\def\p@enumii{\theenumi} +\def\labelenumiii{{\rm(\arabic{enumiii})}} +\def\theenumiii{\roman{enumiii}} +\def\p@enumiii{\theenumi(\theenumii)} +\def\labelenumiv{{\rm(\arabic{enumiv})}} +\def\theenumiv{\Alph{enumiv}} +\def\p@enumiv{\p@enumiii\theenumiii} +\def\labelitemi{{\small$\bullet$}} +\def\labelitemii{{\small$\bullet$}} +\def\labelitemiii{{\small$\bullet$}} +\def\labelitemiv{{\small$\bullet$}} + +\def\@listI{\leftmargin\leftmargini \topsep\medskipamount} +\let\@listi\@listI +\@listi +\def\@listii{\topsep\z@\leftmargin\leftmarginii} +\def\@listiii{\leftmargin\leftmarginiii \topsep\z@} +\def\@listiv{\leftmargin\leftmarginiv \topsep\z@} +\def\@listv{\leftmargin\leftmarginv \topsep\z@} +\def\@listvi{\leftmargin\leftmarginvi \topsep\z@} + +\setlength{\leftmargini}{3mm} +\setlength{\leftmarginii}{\z@} +\setlength{\leftmarginiii}{\z@} +\setlength{\leftmarginiv}{\z@} + +% Changes to the list parameters for enumerate +\def\enumargs{% + \partopsep \z@ + \itemsep 3\p@ + \parsep \z@ + \labelsep 0.5em + \listparindent \parindent + \itemindent \z@ + \topsep 2\p@ +} + +\def\enumerate{% + \@ifnextchar[{\@numerate}{\@numerate[0]}} + +\def\@numerate[#1]{% + \ifnum \@enumdepth >3 \@toodeep\else + \advance\@enumdepth \@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth} + \list{\csname label\@enumctr\endcsname}{% + \enumargs + \setlength{\leftmargin}{\csname leftmargin\romannumeral\the\@enumdepth\endcsname} + \usecounter{\@enumctr} + \settowidth\labelwidth{#1} + \addtolength{\leftmargin}{\labelwidth} + \addtolength{\leftmargin}{\labelsep} + \def\makelabel##1{\hss \llap{##1}}}% + \fi + } +\let\endenumerate\endlist + +% Changes to the list parameters for itemize +\def\itemargs{% + \partopsep \z@ + \itemsep 3\p@ + \parsep \z@ + \labelsep 0.5em + \rightmargin \z@ + \listparindent \parindent + \itemindent \z@ + \topsep 2\p@ +} + +\def\itemize{% + \@ifnextchar[{\@itemize}{\@itemize[$\bullet$]}} + +\def\@itemize[#1]{% + \ifnum \@itemdepth >3 \@toodeep\else + \advance\@itemdepth \@ne + \edef\@itemctr{item\romannumeral\the\@itemdepth} + \list{\csname label\@itemctr\endcsname}{% + \itemargs + \setlength{\leftmargin}{\csname leftmargin\romannumeral\the\@itemdepth\endcsname} + \settowidth\labelwidth{#1} + \addtolength{\leftmargin}{\labelwidth} + \addtolength{\leftmargin}{\labelsep} + \def\makelabel##1{\hss \llap{##1}}}% + \fi + } +\let\enditemize\endlist + +\newenvironment{unlist}{% + \begin{list}{}% + {\setlength{\labelwidth}{\z@}% + \setlength{\labelsep}{\z@}% + \setlength{\topsep}{\medskipamount}% + \setlength{\itemsep}{3\p@}% + \setlength{\leftmargin}{2em}% + \setlength{\itemindent}{-2em}}} +{\end{list}} + + +% *********************** +% Quotes and Quotations * +% *********************** +\def\quotation{\par\begin{list}{}{ + \setlength{\topsep}{\medskipamount} + \setlength{\leftmargin}{2em}% + \setlength{\rightmargin}{\z@}% + \setlength\labelwidth{0pt}% + \setlength\labelsep{0pt}% + \listparindent\parindent}% + \item[]} +\def\endquotation{\end{list}} +\let\quote\quotation +\let\endquote\endquotation + +\skip\@mpfootins = \skip\footins +\fboxsep=6\p@ +\fboxrule=1\p@ + +% ******************* +% Table of contents * +% ******************* +\newcommand\@pnumwidth{4em} +\newcommand\@tocrmarg{2.55em plus 1fil} +\newcommand\@dotsep{1000} +\setcounter{tocdepth}{4} + +\def\numberline#1{\hbox to \@tempdima{{#1}}} + +\def\@authortocline#1#2#3#4#5{% + \vskip 1.5\p@ + \ifnum #1>\c@tocdepth \else + {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip + \parindent #2\relax\@afterindenttrue + \interlinepenalty\@M + \leavevmode + \@tempdima #3\relax + \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip + {\itshape #4}\nobreak + \leaders\hbox{$\m@th + \mkern \@dotsep mu\hbox{.}\mkern \@dotsep + mu$}\hfill + \nobreak + \hb@xt@\@pnumwidth{\hfil}% + \par}% + \fi} + +\newcommand*\l@author{\@authortocline{2}{0pt}{30pt}} +\newcommand*\l@section{\@dottedtocline{3}{11pt}{20pt}} +\newcommand*\l@subsection{\@dottedtocline{4}{31pt}{29pt}} +\newcommand*\l@subsubsection[2]{} + + + +% *********** +% Footnotes * +% *********** + +\def\footnoterule{\noindent\rule{\columnwidth}{0.5pt}} +\def\@makefnmark{\@textsuperscript{\normalfont\@thefnmark}}% +\newcommand\@makefntext[1]{\noindent{\@makefnmark}\enskip#1} + +% *********** +% References * +% *********** + +\providecommand{\newblock}{} +\newenvironment{thebibliography}{% + \section{\bibname}% + \begingroup + \small + \begin{list}{}{% + \setlength{\topsep}{\z@}% + \setlength{\labelsep}{\z@}% + \settowidth{\labelwidth}{\z@}% + \setlength{\leftmargin}{4mm}% + \setlength{\itemindent}{-4mm}}\small} +{\end{list}\endgroup} + +\RequirePackage{natbib} + + +% ********** +% Appendix * +% ********** +\newif\ifappend +\def\appendix{\par + \setcounter{section}{0} + \setcounter{subsection}{0} + \appendtrue +} + +%Math parameters + +\setlength{\jot}{5\p@} +\mathchardef\@m=1500 % adapted value + +\def\frenchspacing{\sfcode`\.\@m \sfcode`\?\@m \sfcode`\!\@m + \sfcode`\:\@m \sfcode`\;\@m \sfcode`\,\@m} + +% Theorems +\def\th@plain{% +%% \let\thm@indent\noindent % no indent +\thm@headfont{\quad\scshape}% heading font is bold +\thm@notefont{\upshape\mdseries}% same as heading font +\thm@headpunct{.}% no period after heading +\thm@headsep 5\p@ plus\p@ minus\p@\relax +\itshape % body font +} + +\vbadness=9999 +\tolerance=9999 +\doublehyphendemerits=10000 +\doublehyphendemerits 640000 % corresponds to badness 800 +\finalhyphendemerits 1000000 % corresponds to badness 1000 + +\flushbottom +\frenchspacing +\ps@headings +\twocolumn + +% Screen PDF compatability +\newcommand{\medline}[1]{% + \unskip\unskip\ignorespaces} + + +%%%%for smaller size text +\newenvironment{methods}{% + \begingroup +\def\section{% + \@startsection{section}{1}{\z@} + {-24\p@ plus -3\p@}{4\p@} + {\reset@font\raggedright\helveticabold\fontsize{10}{12}\selectfont\MakeUppercase}} + \def\subsection{% + \@startsection{subsection}{2}{\z@} + {-5\p@ plus -2\p@}{4\p@} + {\reset@font\raggedright\mathversion{bold}\fontseries{b}\fontsize{10}{12}\selectfont}} + \def\subsubsection{% + \@startsection{subsubsection}{3}{\z@} + {-6\p@ plus -1\p@}{-1em} + {\reset@font\normalfont\normalsize\itshape}} +\footnotesize + \par} +{\par\endgroup\bigskip\@afterheading\@afterindentfalse} + + + +\graphicspath{{g:/artwork/oup/bioinfo/}} + +\language=2 + +\hyphenation{Figure Table Figures Tables} + +\newcommand{\href}[2]{#2} + +\renewenvironment{proof}[1][\proofname]{\par + \normalfont \topsep6\p@\@plus6\p@\relax + \labelsep 0.5em + \trivlist + \item[\hskip\labelsep\hskip1em\textsc{#1}.]\ignorespaces +}{\endtrivlist\@endpefalse} + +%%Different Bonds + +\def\sbond{\ensuremath{\raise.25ex\hbox{${-}\!\!\!\!{-}$}}\kern -.9pt} +\def\dbond{\ensuremath{\raise.25ex\hbox{=$\!$=}}} +\def\tbond{\ensuremath{\raise.20ex\hbox{${\equiv}\!\!\!{\equiv}$}}} + +\newcommand{\query}[2][0pt]{}% + +\renewcommand{\dag}{{\mathversion{normal}$^{\dagger}$}} + +\endinput diff --git a/inst/rmarkdown/templates/frontiers_article/skeleton/logo1.pdf b/inst/rmarkdown/templates/frontiers_article/skeleton/logo1.pdf new file mode 100644 index 000000000..dc6c6a332 Binary files /dev/null and b/inst/rmarkdown/templates/frontiers_article/skeleton/logo1.pdf differ diff --git a/inst/rmarkdown/templates/frontiers_article/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/frontiers_article/skeleton/skeleton.Rmd new file mode 100644 index 000000000..70309a4d7 --- /dev/null +++ b/inst/rmarkdown/templates/frontiers_article/skeleton/skeleton.Rmd @@ -0,0 +1,169 @@ +--- +title: "Article Title" +runtitle: "Short Title" +author: + - name: First Author + affiliation: '1' + etal: LASTNAME # First author's last name. + - name: Co-Author + affiliation: '2' + - name: Co-Author + affiliation: '1,3' + email: email@uni.edu # Indicates corresponding Author + institution: Laboratory X, Institute X, Department X, Organization X + street: Street X + city: City X + state: State XX # only USA, Australia, Canada + zip: Zip Code X + country: Country X +affiliation: + - id: '1' + department: Department X + institution: Institution X + city: City X + state: State XX # only USA, Australia, Canada + country: Country X + - id: '2' + department: Department X + institution: Institution X + city: City X + state: State XX # only USA, Australia, Canada + country: Country X + - id: '3' + department: Department X + institution: Institution X + city: City X + state: State XX # only USA, Australia, Canada + country: Country X +output: rticles::frontiers_article +csl: frontiers.csl +bibliography: test.bib +--- + +\begin{abstract} + +Abstract length and content varies depending on article type. Refer to +\url{http://www.frontiersin.org/about/AuthorGuidelines} for abstract requirement +and length according to article type. + +%All article types: you may provide up to 8 keywords; at least 5 are mandatory. +\tiny + \keyFont{ \section{Keywords:} Text Text Text Text Text Text Text Text } + +\end{abstract} + + +# Introduction {-} +Cite fancy references [@Neuro2013]. As demonstrated in @Gene2012, citations can +also be automatically reference. Multiple references are separated by semicolons +[@Neuro2013; @Neurobot2013]. + +# Results {-} + + + +## Subsection 1 {-} + +You can use `R` chunks directly to plot graphs. + +```{r graph, echo = TRUE, message=FALSE, fig.show = "hide"} +x <- 0:100 +set.seed(999) +y <- 2 * (x + rnorm(length(x), sd = 3) + 3) +plot(x, y) +``` + +## Subsection 2 {-} + +Frontiers requires figures to be submitted individually, in the same order as +they are referred to in the manuscript. Figures will then be automatically +embedded at the bottom of the submitted manuscript. Kindly ensure that each +table and figure is mentioned in the text and in numerical order. Permission +must be obtained for use of copyrighted material from other sources (including +the web). Please note that it is compulsory to follow figure instructions. +Figures which are not according to the guidelines will cause substantial delay +during the production process. + +# Discussion + +# Disclosure/Conflict-of-Interest Statement {-} + + + +The authors declare that the research was conducted in the absence of any +commercial or financial relationships that could be construed as a potential +conflict of interest. + +# Author Contributions {-} + + + +The statement about the authors and contributors can be up to several sentences +long, describing the tasks of individual authors referred to by their initials +and should be included at the end of the manuscript before the References +section. + + +# Acknowledgments {-} + +Funding: + +# Supplemental Data + +Supplementary Material should be uploaded separately on submission, if there are +Supplementary Figures, please include the caption in the same file as the +figure. LaTeX Supplementary Material templates can be found in the Frontiers +LaTeX folder + +# References + +A reference list should be automatically created here. However it won't. Pandoc +will place the list of references at the end of the document instead. There are +no convenient solution for now to force Pandoc to do otherwise. The easiest way +to get around this problem is to edit the LaTeX file created by Pandoc before +compiling it again using the traditional LaTeX commands. + +# Figures {-} + +```{r, Figure-1, ref.label = "graph", results = "hide", echo = FALSE, message = FALSE, fig.height=4, fig.width=4, fig.align='center', fig.cap='Figure caption', out.width = "85mm", out.height = "85mm"} +# You can also refer to code chunks from above to place figures at the bottom. +``` + diff --git a/inst/rmarkdown/templates/frontiers_article/skeleton/test.bib b/inst/rmarkdown/templates/frontiers_article/skeleton/test.bib new file mode 100755 index 000000000..cbe76bbfc --- /dev/null +++ b/inst/rmarkdown/templates/frontiers_article/skeleton/test.bib @@ -0,0 +1,34 @@ +@Article{ Neuro2013, + author = "Author1 LastName1 and Author2 LastName2 and Author3 LastName2", + title = "Article Title", + volume = "30", + number = "30", + pages = "10127--10134", + year = "2013", + doi = "10.3389/fnins.2013.12345", + URL = "http://www.frontiersin.org/Neuroscience/10.3389/fnins.2013.12345/abstract", + journal = "Frontiers in Neuroscience" +} + +@Article{ Gene2012, + author = "Name OtherAuthor and Name S. Coauthor", + title = "Article Title", + volume = "30", + number = "49", + pages = "16417--16418", + year = "2012", + doi = "10.3389/fgene.2012.54321", + URL = "http://www.frontiersin.org/Genetics/10.3389/fgene.2012.54321/abstract", + journal = "Frontiers in Genetics" +} + +@Article{ Neurobot2013, +author = "Name4 Author4 and Name5 Author5", + title = "Title of the Article", + volume = "7", + number = "25", + year = "2013", + doi = "10.3389/fnbot.2013.56789", + URL = "http://www.frontiersin.org/Neurorobotics/10.3389/fnbot.2013.56789/abstract", + journal = "Frontiers in Neurorobotics" +} diff --git a/inst/rmarkdown/templates/frontiers_article/template.yaml b/inst/rmarkdown/templates/frontiers_article/template.yaml new file mode 100644 index 000000000..8725672ff --- /dev/null +++ b/inst/rmarkdown/templates/frontiers_article/template.yaml @@ -0,0 +1,4 @@ +name: Frontiers Journal Article +description: > + Template for Frontiers journal article +create_dir: true diff --git a/man/acm_article.Rd b/man/acm_article.Rd index fc6a832c7..4110b4bd7 100644 --- a/man/acm_article.Rd +++ b/man/acm_article.Rd @@ -7,21 +7,18 @@ acm_article(...) } \arguments{ -\item{...}{Arguments to \code{rmarkdown::pdf_document}} +\item{...}{Arguments to \code{rmarkdown::pdf_document()}.} } \value{ -R Markdown output format to pass to \code{\link[rmarkdown:render]{render}} +An R Markdown output format. } \description{ Format for creating an Association for Computing Machinery (ACM) articles. Adapted from -\href{http://www.acm.org/publications/article-templates/proceedings-template.html}{http://www.acm.org/publications/article-templates/proceedings-template.html}. +\url{http://www.acm.org/publications/article-templates/proceedings-template.html}. } \examples{ - \dontrun{ -library(rmarkdown) -draft("MyArticle.Rmd", template = "acm_article", package = "rticles") +rmarkdown::draft("MyArticle.Rmd", template = "acm_article", package = "rticles") } - } diff --git a/man/frontiers_article.Rd b/man/frontiers_article.Rd new file mode 100644 index 000000000..936c62815 --- /dev/null +++ b/man/frontiers_article.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/frontiers_article.R +\name{frontiers_article} +\alias{frontiers_article} +\title{Frontiers open access journal format.} +\usage{ +frontiers_article(..., keep_tex = TRUE) +} +\arguments{ +\item{...}{Additional arguments to \code{rmarkdown::pdf_document}} + +\item{keep_tex}{Keep the intermediate tex file used in the conversion to PDF} +} +\value{ +R Markdown output format to pass to + \code{\link[rmarkdown:render]{render}} +} +\description{ +Format for creating Frontiers journal articles. Adapted from +\href{http://home.frontiersin.org/about/author-guidelines}{http://home.frontiersin.org/about/author-guidelines}. +} diff --git a/tests/testit/test-formats.R b/tests/testit/test-formats.R index 10a7419f6..0550612c2 100644 --- a/tests/testit/test-formats.R +++ b/tests/testit/test-formats.R @@ -46,3 +46,4 @@ test_format("amq_article") test_format("mdpi_article") test_format("mnras_article") test_format("copernicus_article") +test_format("frontiers_article")