]> git.lyx.org Git - lyx.git/blob - lib/templates/RJournal.lyx
RJournal template and layout: move ERTs to layout
[lyx.git] / lib / templates / RJournal.lyx
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
3 \begin_document
4 \begin_header
5 \textclass RJournal
6 \use_default_options true
7 \begin_modules
8 knitr
9 \end_modules
10 \maintain_unincluded_children false
11 \language english
12 \language_package none
13 \inputencoding auto
14 \fontencoding global
15 \font_roman default
16 \font_sans default
17 \font_typewriter default
18 \font_default_family default
19 \use_non_tex_fonts false
20 \font_sc false
21 \font_osf false
22 \font_sf_scale 100
23 \font_tt_scale 100
24
25 \graphics default
26 \default_output_format default
27 \output_sync 0
28 \bibtex_command default
29 \index_command default
30 \paperfontsize default
31 \spacing single
32 \use_hyperref false
33 \papersize default
34 \use_geometry false
35 \use_amsmath 1
36 \use_esint 1
37 \use_mhchem 1
38 \use_mathdots 1
39 \cite_engine natbib_authoryear
40 \use_bibtopic false
41 \use_indices false
42 \paperorientation portrait
43 \suppress_date false
44 \use_refstyle 1
45 \index Index
46 \shortcut idx
47 \color #008000
48 \end_index
49 \secnumdepth 3
50 \tocdepth 3
51 \paragraph_separation indent
52 \paragraph_indentation default
53 \quotes_language english
54 \papercolumns 1
55 \papersides 1
56 \paperpagestyle default
57 \tracking_changes false
58 \output_changes false
59 \html_math_output 0
60 \html_css_as_file 0
61 \html_be_strict false
62 \end_header
63
64 \begin_body
65
66 \begin_layout Standard
67 \begin_inset ERT
68 status open
69
70 \begin_layout Plain Layout
71
72 <<setup, include=FALSE>>=
73 \end_layout
74
75 \begin_layout Plain Layout
76
77 render_sweave() # use Schunk, Sinput and Soutput environments defined by
78  RJournal
79 \end_layout
80
81 \begin_layout Plain Layout
82
83 set_header(highlight = '') # no need for 
84 \backslash
85 usepackage{Sweave}
86 \end_layout
87
88 \begin_layout Plain Layout
89
90 @
91 \end_layout
92
93 \end_inset
94
95
96 \end_layout
97
98 \begin_layout Title
99 Capitalized Title Here
100 \end_layout
101
102 \begin_layout Author
103 by Author A and Author B
104 \end_layout
105
106 \begin_layout Standard
107 \begin_inset Flex Abstract
108 status open
109
110 \begin_layout Plain Layout
111 An abstract of less than 150 words.
112 \end_layout
113
114 \end_inset
115
116
117 \end_layout
118
119 \begin_layout Section
120 Section title in sentence case
121 \end_layout
122
123 \begin_layout Standard
124 Write something here.
125  A sample citation is 
126 \begin_inset CommandInset citation
127 LatexCommand citet
128 key "Lam94"
129
130 \end_inset
131
132 .
133 \end_layout
134
135 \begin_layout Section
136 R code chunks
137 \end_layout
138
139 \begin_layout Standard
140 Press 
141 \begin_inset Info
142 type  "shortcut"
143 arg   "ert-insert"
144 \end_inset
145
146  and input R code chunks which will be compiled with the 
147 \series bold
148 knitr
149 \series default
150  package (
151 \begin_inset Flex URL
152 status collapsed
153
154 \begin_layout Plain Layout
155
156 http://yihui.name/knitr/
157 \end_layout
158
159 \end_inset
160
161 ).
162 \end_layout
163
164 \begin_layout Standard
165 \begin_inset ERT
166 status open
167
168 \begin_layout Plain Layout
169
170 <<sample-chunk, echo=TRUE>>=
171 \end_layout
172
173 \begin_layout Plain Layout
174
175 x=1:10
176 \end_layout
177
178 \begin_layout Plain Layout
179
180 rev(x)
181 \end_layout
182
183 \begin_layout Plain Layout
184
185 summary(x)
186 \end_layout
187
188 \begin_layout Plain Layout
189
190 @
191 \end_layout
192
193 \end_inset
194
195
196 \end_layout
197
198 \begin_layout Standard
199 You can also plot your data; see Figure 
200 \begin_inset CommandInset ref
201 LatexCommand ref
202 reference "fig:sample-figure"
203
204 \end_inset
205
206  for example.
207 \end_layout
208
209 \begin_layout Standard
210 \begin_inset Float figure
211 placement tbph
212 wide false
213 sideways false
214 status open
215
216 \begin_layout Plain Layout
217 \begin_inset ERT
218 status open
219
220 \begin_layout Plain Layout
221
222 <<sample-figure, fig.width=5, fig.height=3, out.width='.4
223 \backslash
224
225 \backslash
226 linewidth', fig.align='center'>>=
227 \end_layout
228
229 \begin_layout Plain Layout
230
231 par(mar = c(4,4,.1,.1))
232 \end_layout
233
234 \begin_layout Plain Layout
235
236 plot(x, pch=19, col=1:10)
237 \end_layout
238
239 \begin_layout Plain Layout
240
241 @
242 \end_layout
243
244 \end_inset
245
246
247 \end_layout
248
249 \begin_layout Plain Layout
250 \begin_inset Caption
251
252 \begin_layout Plain Layout
253 A sample figure.
254 \begin_inset CommandInset label
255 LatexCommand label
256 name "fig:sample-figure"
257
258 \end_inset
259
260
261 \end_layout
262
263 \end_inset
264
265
266 \end_layout
267
268 \end_inset
269
270
271 \end_layout
272
273 \begin_layout Standard
274 \begin_inset Note Note
275 status open
276
277 \begin_layout Plain Layout
278 When you insert a BibTeX bibliography here, do not use any bib styles.
279  The R Journal has declared the style to be 
280 \begin_inset Quotes eld
281 \end_inset
282
283 abbrvnat
284 \begin_inset Quotes erd
285 \end_inset
286
287 .
288 \end_layout
289
290 \end_inset
291
292
293 \end_layout
294
295 \begin_layout Standard
296 \begin_inset CommandInset bibtex
297 LatexCommand bibtex
298 bibfiles "biblio"
299
300 \end_inset
301
302
303 \end_layout
304
305 \begin_layout Standard
306 \begin_inset Flex Address
307 status collapsed
308
309 \begin_layout Plain Layout
310 Author A
311 \begin_inset Newline newline
312 \end_inset
313
314 Press 
315 \begin_inset Info
316 type  "shortcut"
317 arg   "newline-insert newline"
318 \end_inset
319
320  to input
321 \begin_inset Newline newline
322 \end_inset
323
324 address here
325 \end_layout
326
327 \end_inset
328
329
330 \begin_inset Newline newline
331 \end_inset
332
333
334 \begin_inset Flex Email
335 status collapsed
336
337 \begin_layout Plain Layout
338 author.a@email
339 \end_layout
340
341 \end_inset
342
343
344 \end_layout
345
346 \begin_layout Standard
347 \begin_inset Flex Address
348 status collapsed
349
350 \begin_layout Plain Layout
351 Author B
352 \end_layout
353
354 \end_inset
355
356
357 \begin_inset Newline newline
358 \end_inset
359
360
361 \begin_inset Flex Email
362 status collapsed
363
364 \begin_layout Plain Layout
365 author.b@email
366 \end_layout
367
368 \end_inset
369
370
371 \end_layout
372
373 \end_body
374 \end_document