Skip to content

Commit e3b0c39

Browse files
muschellij2yihui
authored andcommitted
Added Frontiers Article (#211)
* added frontiers * added appveyor * updated test * fixing frontiers_article * GNU make sysreq turned to make only * changed example in frontiers_article to not depend on ggplot2 * fixing appveyor to keep the travis yaml * revert to GNU make for acm_article/skeleton/Makefile * added warnings_are_errors: true * added new version of frontiers template * updated the template to work with the newlines * removed highlight * added changes necessary for PR * needed description parentheses fixed * false trigger * renaming workaround * renaming workaround * Delete appveyor.yml * removed the logo.eps and replaced with pdf * added all the templates for frontiers
1 parent 05522af commit e3b0c39

18 files changed

+3406
-8
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
^appveyor\.yml$
12
^.*\.Rproj$
23
^\.Rproj\.user$
34
^\.travis\.yml$

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ Authors@R: c(
3131
person("Dalton", "Hance", role = c("aut"), email = "dhance@usgs.gov"),
3232
person("Daniel", "Nüst", role = c("aut", "cph"), email = "daniel.nuest@uni-muenster.de", comment = c(ORCID = "0000-0002-0024-5046")),
3333
person("Petter", "Uvesten", role = c("aut", "cph"), email = "petter.uvesten.7362@student.lu.se"),
34-
person("Elio", "Campitelli", role = c("aut", "cph"), email = "elio.campitelli@cima.fcen.uba.ar", comment = c(ORCID = "0000-0002-7742-9230"))
34+
person("Elio", "Campitelli", role = c("aut", "cph"), email = "elio.campitelli@cima.fcen.uba.ar", comment = c(ORCID = "0000-0002-7742-9230")),
35+
person("John", "Muschelli", role = c("aut", "cph"), email = "muschellij2@gmail.com", comment = c(ORCID = "0000-0001-6469-1750"))
3536
)
3637
Description: A suite of custom R Markdown formats and templates for
3738
authoring journal articles and conference submissions.

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export(copernicus_journal_abbreviations)
1313
export(ctex)
1414
export(ctex_template)
1515
export(elsevier_article)
16+
export(frontiers_article)
1617
export(ieee_article)
1718
export(jss_article)
1819
export(mdpi_article)

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
rticles 0.7
22
---------------------------------------------------------------------
33

4+
- Added the template for the Frontiers Journals (@muschellij2, @zkamvar, #209).
5+
46
- Added the template for the AGU Journals (thanks, @eliocamp, #199).
57

68
- Updated the template for PLOS to version 3.5 (thanks, @uvesten, #196).

R/frontiers_article.R

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#' Frontiers open access journal format.
2+
#'
3+
#' Format for creating Frontiers journal articles. Adapted from
4+
#' \href{http://home.frontiersin.org/about/author-guidelines}{http://home.frontiersin.org/about/author-guidelines}.
5+
#'
6+
#' @inheritParams rmarkdown::pdf_document
7+
#' @param ... Additional arguments to \code{rmarkdown::pdf_document}
8+
#'
9+
#' @return R Markdown output format to pass to
10+
#' \code{\link[rmarkdown:render]{render}}
11+
#'
12+
#' @export
13+
frontiers_article <- function(...,
14+
keep_tex = TRUE) {
15+
16+
inherit_pdf_document(...,
17+
template = find_resource("frontiers_article", "template.tex"),
18+
keep_tex = keep_tex)
19+
}

README.md

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

6161
- [The R Journal](https://journal.r-project.org/) articles
6262

63+
- [Frontiers](https://www.frontiersin.org/) articles
64+
6365
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/).
6466

6567
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).
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2+
% 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 %
3+
% This will only generate the Manuscript, the final article will be typeset by Frontiers after acceptance.
4+
% %
5+
% %
6+
% 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.
7+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8+
9+
%%% Version 3.4 Generated 2018/06/15 %%%
10+
%%% You will need to have the following packages installed: datetime, fmtcount, etoolbox, fcprefix, which are normally inlcuded in WinEdt. %%%
11+
%%% In http://www.ctan.org/ you can find the packages and how to install them, if necessary. %%%
12+
%%% NB logo1.jpg is required in the path in order to correctly compile front page header %%%
13+
14+
\documentclass[utf8]{frontiersSCNS} % for Science, Engineering and Humanities and Social Sciences articles
15+
%\documentclass[utf8]{frontiersHLTH} % for Health articles
16+
%\documentclass[utf8]{frontiersFPHY} % for Physics and Applied Mathematics and Statistics articles
17+
18+
%\setcitestyle{square} % for Physics and Applied Mathematics and Statistics articles
19+
\usepackage{url,hyperref,lineno,microtype,subcaption}
20+
\usepackage[onehalfspacing]{setspace}
21+
22+
\linenumbers
23+
24+
25+
% BELOW TAKEN FROM rticles plos template
26+
%
27+
% amsmath package, useful for mathematical formulas
28+
\usepackage{amsmath}
29+
% amssymb package, useful for mathematical symbols
30+
\usepackage{amssymb}
31+
32+
% hyperref package, useful for hyperlinks
33+
\usepackage{hyperref}
34+
35+
% graphicx package, useful for including eps and pdf graphics
36+
% include graphics with the command \includegraphics
37+
\usepackage{graphicx}
38+
39+
% Sweave(-like)
40+
\usepackage{fancyvrb}
41+
\DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl}
42+
\DefineVerbatimEnvironment{Soutput}{Verbatim}{}
43+
\DefineVerbatimEnvironment{Scode}{Verbatim}{fontshape=sl}
44+
\newenvironment{Schunk}{}{}
45+
\DefineVerbatimEnvironment{Code}{Verbatim}{}
46+
\DefineVerbatimEnvironment{CodeInput}{Verbatim}{fontshape=sl}
47+
\DefineVerbatimEnvironment{CodeOutput}{Verbatim}{}
48+
\newenvironment{CodeChunk}{}{}
49+
50+
% cite package, to clean up citations in the main text. Do not remove.
51+
\usepackage{cite}
52+
53+
\usepackage{color}
54+
55+
\providecommand{\tightlist}{%
56+
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
57+
58+
% Below is from frontiers
59+
%
60+
\bibliographystyle{frontiersinSCNS}
61+
% Use doublespacing - comment out for single spacing
62+
%\usepackage{setspace}
63+
%\doublespacing
64+
65+
66+
% Leave a blank line between paragraphs instead of using \\
67+
68+
69+
\def\keyFont{\fontsize{8}{11}\helveticabold }
70+
71+
72+
%% ** EDIT HERE **
73+
%% PLEASE INCLUDE ALL MACROS BELOW
74+
75+
%% END MACROS SECTION
76+
77+
$for(header-includes)$
78+
$header-includes$
79+
$endfor$
80+
81+
$if(highlighting-macros)$
82+
$highlighting-macros$
83+
$endif$
84+
85+
\def\Authors{
86+
$for(author)$
87+
$author.name$\,\textsuperscript{$author.affiliation$$if(author.email)$*$endif$}$sep$,
88+
$endfor$
89+
}
90+
91+
\def\Address{
92+
$for(affiliation)$
93+
94+
\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$
95+
$endfor$}
96+
97+
$for(author)$
98+
$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$
99+
$if(author.etal)$\def\firstAuthorLast{$author.etal$ {et~al.}}$endif$
100+
$endfor$
101+
102+
103+
\begin{document}
104+
\onecolumn
105+
\firstpage{1}
106+
107+
\title[$runtitle$]{$title$}
108+
\author[\firstAuthorLast]{\Authors}
109+
\address{} %This field will be automatically populated
110+
\correspondance{} %This field will be automatically populated
111+
112+
\extraAuth{}% If there are more than 1 corresponding author, comment this line and uncomment the next one.
113+
%\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}
114+
115+
116+
\maketitle
117+
118+
$body$
119+
120+
\end{document}
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-US">
3+
<info>
4+
<title>Frontiers journals</title>
5+
<id>http://www.zotero.org/styles/frontiers</id>
6+
<link href="http://www.zotero.org/styles/frontiers" rel="self"/>
7+
<link href="http://www.frontiersin.org/about/AuthorGuidelines" rel="documentation"/>
8+
<author>
9+
<name>Sebastian Karcher</name>
10+
</author>
11+
<contributor>
12+
<name>Julian Onions</name>
13+
<email>julian.onions@gmail.com</email>
14+
</contributor>
15+
<category citation-format="author-date"/>
16+
<category field="generic-base"/>
17+
<summary>Style for the Open Access Frontiers in ... Journals</summary>
18+
<updated>2012-09-27T22:06:38+00:00</updated>
19+
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
20+
</info>
21+
<macro name="editor">
22+
<names variable="editor" delimiter=", ">
23+
<label form="short" prefix=", "/>
24+
<name and="text" initialize-with=". " delimiter=", " prefix=" "/>
25+
</names>
26+
</macro>
27+
<macro name="author">
28+
<names variable="author">
29+
<name name-as-sort-order="all" and="text" sort-separator=", " initialize-with=". " delimiter=", " delimiter-precedes-last="always"/>
30+
<label form="short" prefix=" "/>
31+
<substitute>
32+
<names variable="editor"/>
33+
<text variable="title"/>
34+
</substitute>
35+
</names>
36+
</macro>
37+
<macro name="author-short">
38+
<names variable="author">
39+
<name form="short" and="text" delimiter=", " initialize-with=". "/>
40+
<substitute>
41+
<names variable="editor"/>
42+
<names variable="translator"/>
43+
<text variable="title"/>
44+
</substitute>
45+
</names>
46+
</macro>
47+
<macro name="access">
48+
<choose>
49+
<if variable="DOI">
50+
<text variable="DOI" prefix="doi:"/>
51+
</if>
52+
<else-if variable="URL">
53+
<text value="Available at:" suffix=" "/>
54+
<text variable="URL"/>
55+
<group prefix=" [" suffix="]">
56+
<text term="accessed" text-case="capitalize-first" suffix=" "/>
57+
<date variable="accessed">
58+
<date-part name="month" suffix=" "/>
59+
<date-part name="day" suffix=", "/>
60+
<date-part name="year"/>
61+
</date>
62+
</group>
63+
</else-if>
64+
</choose>
65+
</macro>
66+
<macro name="title">
67+
<choose>
68+
<if type="book">
69+
<text variable="title" font-style="italic" suffix="."/>
70+
</if>
71+
<else-if type="chapter">
72+
<text variable="title" quotes="true" suffix=","/>
73+
</else-if>
74+
<else>
75+
<text variable="title" suffix="."/>
76+
</else>
77+
</choose>
78+
</macro>
79+
<macro name="publisher">
80+
<group delimiter=": ">
81+
<text variable="publisher-place"/>
82+
<text variable="publisher"/>
83+
</group>
84+
</macro>
85+
<macro name="year-date">
86+
<date variable="issued">
87+
<date-part name="year"/>
88+
</date>
89+
</macro>
90+
<macro name="edition">
91+
<choose>
92+
<if is-numeric="edition">
93+
<group delimiter=" ">
94+
<number variable="edition" form="ordinal"/>
95+
<text term="edition" form="short"/>
96+
</group>
97+
</if>
98+
<else>
99+
<text variable="edition" suffix="."/>
100+
</else>
101+
</choose>
102+
</macro>
103+
<citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" collapse="year">
104+
<layout prefix="(" suffix=")" delimiter="; ">
105+
<group delimiter=", ">
106+
<text macro="author-short"/>
107+
<text macro="year-date"/>
108+
<text variable="locator"/>
109+
</group>
110+
</layout>
111+
</citation>
112+
<bibliography hanging-indent="true" et-al-min="11" et-al-use-first="10">
113+
<sort>
114+
<key macro="author"/>
115+
<key variable="title"/>
116+
</sort>
117+
<layout suffix=".">
118+
<text macro="author"/>
119+
<date variable="issued" prefix=" (" suffix=").">
120+
<date-part name="year"/>
121+
</date>
122+
<choose>
123+
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
124+
<group delimiter=" " prefix=" ">
125+
<text macro="title"/>
126+
<text macro="edition"/>
127+
<text macro="editor"/>
128+
<text macro="publisher"/>
129+
</group>
130+
</if>
131+
<else-if type="chapter paper-conference" match="any">
132+
<group delimiter=" " prefix=" ">
133+
<text macro="title"/>
134+
<text term="in"/>
135+
<text variable="container-title" font-style="italic"/>
136+
<text variable="collection-title" suffix="."/>
137+
</group>
138+
<text macro="editor"/>
139+
<group suffix=".">
140+
<text macro="publisher" prefix=" (" suffix=")"/>
141+
<group prefix=", ">
142+
<text variable="page"/>
143+
</group>
144+
</group>
145+
</else-if>
146+
<else>
147+
<text macro="title" prefix=" " suffix="."/>
148+
<group delimiter=", " prefix=" " suffix=".">
149+
<group delimiter=" ">
150+
<text variable="container-title" form="short" font-style="italic"/>
151+
<text variable="volume"/>
152+
</group>
153+
<text variable="page"/>
154+
</group>
155+
</else>
156+
</choose>
157+
<text prefix=" " macro="access"/>
158+
</layout>
159+
</bibliography>
160+
</style>

0 commit comments

Comments
 (0)