Skip to content

Commit 65517dd

Browse files
committed
Merge pull request #27 from cboettig/elsevier
Add the Elsevier template (requested in #24)
2 parents e6da408 + 55167b5 commit 65517dd

19 files changed

+2298
-7
lines changed

DESCRIPTION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ Description: More about what it does (maybe more than one line)
99
License: GPL-3
1010
Imports:
1111
rmarkdown
12+
RoxygenNote: 5.0.1

NAMESPACE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# Generated by roxygen2 (4.1.1): do not edit by hand
1+
# Generated by roxygen2: do not edit by hand
22

33
export(acm)
44
export(acs)
55
export(ctex_template)
6+
export(elsevier)
67
export(frontiers_article)
78
export(jss_article)
89
export(plos_article)

R/elsevier_article.R

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#' elsevier
2+
3+
#' use the Elsevier template
4+
#'
5+
#' @param ... additional arguments to \code{rmarkdown::pdf_document}
6+
#' @export
7+
elsevier <- function(...) {
8+
template <- find_resource("elsevier", "template.tex")
9+
10+
md_extensions <- c("+ascii_identifiers", "+tex_math_single_backslash", "-autolink_bare_uris")
11+
base <- rmarkdown::pdf_document(template = template, keep_tex = TRUE, md_extensions = md_extensions, ...)
12+
base
13+
}
Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
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>Elsevier Harvard (without titles)</title>
5+
<id>http://www.zotero.org/styles/elsevier-harvard-without-titles</id>
6+
<link href="http://www.zotero.org/styles/elsevier-harvard-without-titles" rel="self"/>
7+
<link href="http://www.zotero.org/styles/elsevier-harvard" rel="template"/>
8+
<link href="http://www.elsevier.com/journals/biosensors-and-bioelectronics/0956-5663/guide-for-authors#68000" rel="documentation"/>
9+
<author>
10+
<name>David Kaplan</name>
11+
<email>david.kaplan@ird.fr</email>
12+
</author>
13+
<contributor>
14+
<name>Simon Kornblith</name>
15+
<email>simon@simonster.com</email>
16+
</contributor>
17+
<contributor>
18+
<name>Bruce D'Arcus</name>
19+
</contributor>
20+
<contributor>
21+
<name>Curtis M. Humphrey</name>
22+
</contributor>
23+
<contributor>
24+
<name>Richard Karnesky</name>
25+
<email>karnesky+zotero@gmail.com</email>
26+
<uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri>
27+
</contributor>
28+
<contributor>
29+
<name>Sebastian Karcher</name>
30+
</contributor>
31+
<category citation-format="author-date"/>
32+
<category field="biology"/>
33+
<category field="generic-base"/>
34+
<updated>2012-09-27T22:06:38+00:00</updated>
35+
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
36+
</info>
37+
<macro name="container">
38+
<choose>
39+
<if type="chapter paper-conference" match="any">
40+
<text term="in" prefix=", " suffix=": "/>
41+
<names variable="editor translator" delimiter=", " suffix=", ">
42+
<name name-as-sort-order="all" sort-separator=", " initialize-with="." delimiter=", " delimiter-precedes-last="always"/>
43+
<label form="short" text-case="capitalize-first" prefix=" (" suffix=")"/>
44+
</names>
45+
<group delimiter=", ">
46+
<text variable="container-title" text-case="title"/>
47+
<text variable="collection-title" text-case="title"/>
48+
</group>
49+
</if>
50+
<else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
51+
<group prefix=", " delimiter=", ">
52+
<text variable="container-title"/>
53+
<text variable="collection-title"/>
54+
</group>
55+
</else-if>
56+
<else-if type="article-journal article-magazine article-newspaper" match="none">
57+
<group prefix=". " delimiter=", ">
58+
<text variable="container-title" form="short"/>
59+
<text variable="collection-title"/>
60+
</group>
61+
</else-if>
62+
<else>
63+
<group delimiter=", ">
64+
<text variable="container-title" form="short"/>
65+
<text variable="collection-title"/>
66+
</group>
67+
</else>
68+
</choose>
69+
</macro>
70+
<macro name="author">
71+
<names variable="author">
72+
<name name-as-sort-order="all" sort-separator=", " initialize-with="." delimiter=", " delimiter-precedes-last="always"/>
73+
<label form="short" prefix=" (" suffix=")" text-case="capitalize-first"/>
74+
<substitute>
75+
<names variable="editor"/>
76+
<names variable="translator"/>
77+
<text macro="title"/>
78+
</substitute>
79+
</names>
80+
</macro>
81+
<macro name="author-short">
82+
<names variable="author">
83+
<name form="short" and="text" delimiter=", " initialize-with=". "/>
84+
<substitute>
85+
<names variable="editor"/>
86+
<names variable="translator"/>
87+
<choose>
88+
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
89+
<text variable="title" form="short" font-style="italic"/>
90+
</if>
91+
<else>
92+
<text variable="title" form="short" quotes="true"/>
93+
</else>
94+
</choose>
95+
</substitute>
96+
</names>
97+
</macro>
98+
<macro name="access">
99+
<choose>
100+
<if type="webpage">
101+
<group delimiter=" ">
102+
<text value="URL"/>
103+
<text variable="URL"/>
104+
<group prefix="(" suffix=").">
105+
<text term="accessed" suffix=" "/>
106+
<date variable="accessed">
107+
<date-part name="month" form="numeric" suffix="."/>
108+
<date-part name="day" suffix="."/>
109+
<date-part name="year" form="short"/>
110+
</date>
111+
</group>
112+
</group>
113+
</if>
114+
</choose>
115+
</macro>
116+
<macro name="title">
117+
<choose>
118+
<if type="report thesis" match="any">
119+
<text variable="title"/>
120+
<group prefix=" (" suffix=")">
121+
<text variable="genre"/>
122+
<text variable="number" prefix=" No. "/>
123+
</group>
124+
</if>
125+
<else-if type="bill book graphic legal_case legislation motion_picture report song speech" match="any">
126+
<text variable="title"/>
127+
<text macro="edition" prefix=", "/>
128+
</else-if>
129+
<else-if type="webpage">
130+
<text variable="title"/>
131+
<text value="WWW Document" prefix=" [" suffix="]"/>
132+
</else-if>
133+
<else-if type="article-journal article-magazine article-newspaper" match="none">
134+
<text variable="title"/>
135+
</else-if>
136+
</choose>
137+
</macro>
138+
<macro name="publisher">
139+
<group delimiter=", ">
140+
<text variable="publisher"/>
141+
<text variable="publisher-place"/>
142+
</group>
143+
</macro>
144+
<macro name="event">
145+
<choose>
146+
<if variable="event">
147+
<text term="presented at" text-case="capitalize-first" suffix=" "/>
148+
<text variable="event"/>
149+
</if>
150+
</choose>
151+
</macro>
152+
<macro name="issued">
153+
<choose>
154+
<if variable="issued">
155+
<date variable="issued">
156+
<date-part name="year"/>
157+
</date>
158+
</if>
159+
<else>
160+
<text term="no date" form="short"/>
161+
</else>
162+
</choose>
163+
</macro>
164+
<macro name="edition">
165+
<group delimiter=" ">
166+
<choose>
167+
<if is-numeric="edition">
168+
<number variable="edition" form="ordinal"/>
169+
</if>
170+
<else>
171+
<text variable="edition" suffix="."/>
172+
</else>
173+
</choose>
174+
<text value="ed"/>
175+
</group>
176+
</macro>
177+
<macro name="locators">
178+
<choose>
179+
<if type="article-journal article-magazine article-newspaper" match="any">
180+
<group prefix=" " delimiter=", ">
181+
<group>
182+
<text variable="volume"/>
183+
</group>
184+
<text variable="page"/>
185+
</group>
186+
</if>
187+
<else-if type="bill book graphic legal_case legislation motion_picture report song thesis" match="any">
188+
<group delimiter=", " prefix=". ">
189+
<text macro="event"/>
190+
<text macro="publisher"/>
191+
</group>
192+
</else-if>
193+
<else-if type="chapter paper-conference" match="any">
194+
<group delimiter=", " prefix=". ">
195+
<text macro="event"/>
196+
<text macro="publisher"/>
197+
<group>
198+
<label variable="page" form="short" suffix=" "/>
199+
<text variable="page"/>
200+
</group>
201+
</group>
202+
</else-if>
203+
<else-if type="patent">
204+
<text variable="number" prefix=". "/>
205+
</else-if>
206+
</choose>
207+
</macro>
208+
<citation et-al-min="3" et-al-use-first="1" disambiguate-add-givenname="true" disambiguate-add-year-suffix="true" collapse="year" cite-group-delimiter=", ">
209+
<sort>
210+
<key macro="author"/>
211+
<key macro="issued" sort="descending"/>
212+
</sort>
213+
<layout prefix="(" suffix=")" delimiter="; ">
214+
<group delimiter=", ">
215+
<text macro="author-short"/>
216+
<text macro="issued"/>
217+
<group delimiter=" ">
218+
<label variable="locator" form="short"/>
219+
<text variable="locator"/>
220+
</group>
221+
</group>
222+
</layout>
223+
</citation>
224+
<bibliography hanging-indent="true" entry-spacing="0" line-spacing="1">
225+
<sort>
226+
<key macro="author"/>
227+
<key macro="issued" sort="ascending"/>
228+
</sort>
229+
<layout>
230+
<group suffix=".">
231+
<text macro="author" suffix=","/>
232+
<text macro="issued" prefix=" "/>
233+
<group prefix=". ">
234+
<text macro="title"/>
235+
<text macro="container"/>
236+
<text macro="locators"/>
237+
</group>
238+
</group>
239+
<text macro="access" prefix=". "/>
240+
</layout>
241+
</bibliography>
242+
</style>

0 commit comments

Comments
 (0)