]> git.lyx.org Git - lyx.git/blob - lib/templates/RJournal.lyx
Improve the TexRow Cursor->Row algorithm for selections.
[lyx.git] / lib / templates / RJournal.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 474
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_math auto
19 \font_default_family default
20 \use_non_tex_fonts false
21 \font_sc false
22 \font_osf false
23 \font_sf_scale 100
24 \font_tt_scale 100
25 \graphics default
26 \default_output_format default
27 \output_sync 0
28 \bibtex_command bibtex
29 \index_command default
30 \paperfontsize default
31 \spacing single
32 \use_hyperref false
33 \papersize default
34 \use_geometry false
35 \use_package amsmath 1
36 \use_package amssymb 1
37 \use_package cancel 0
38 \use_package esint 1
39 \use_package mathdots 1
40 \use_package mathtools 0
41 \use_package mhchem 1
42 \use_package stackrel 0
43 \use_package stmaryrd 0
44 \use_package undertilde 0
45 \cite_engine natbib
46 \cite_engine_type authoryear
47 \biblio_style plainnat
48 \use_bibtopic false
49 \use_indices false
50 \paperorientation portrait
51 \suppress_date false
52 \justification true
53 \use_refstyle 1
54 \index Index
55 \shortcut idx
56 \color #008000
57 \end_index
58 \secnumdepth 3
59 \tocdepth 3
60 \paragraph_separation indent
61 \paragraph_indentation default
62 \quotes_language english
63 \papercolumns 1
64 \papersides 1
65 \paperpagestyle default
66 \tracking_changes false
67 \output_changes false
68 \html_math_output 0
69 \html_css_as_file 0
70 \html_be_strict false
71 \end_header
72
73 \begin_body
74
75 \begin_layout Standard
76 \begin_inset ERT
77 status open
78
79 \begin_layout Plain Layout
80
81 <<setup, include=FALSE>>=
82 \end_layout
83
84 \begin_layout Plain Layout
85
86 render_sweave() # use Schunk, Sinput and Soutput environments defined by
87  RJournal
88 \end_layout
89
90 \begin_layout Plain Layout
91
92 set_header(highlight = '') # no need for 
93 \backslash
94 usepackage{Sweave}
95 \end_layout
96
97 \begin_layout Plain Layout
98
99 @
100 \end_layout
101
102 \end_inset
103
104
105 \end_layout
106
107 \begin_layout Title
108 Capitalized Title Here
109 \end_layout
110
111 \begin_layout Author
112 by Author A and Author B
113 \end_layout
114
115 \begin_layout Abstract
116 An abstract of less than 150 words.
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 "article-minimal"
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', dev=c('pdf','postscript')>>=
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 Standard
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 "xampl"
299
300 \end_inset
301
302
303 \end_layout
304
305 \begin_layout Address
306 Author A
307 \begin_inset Newline newline
308 \end_inset
309
310 Press 
311 \begin_inset Info
312 type  "shortcut"
313 arg   "newline-insert newline"
314 \end_inset
315
316  to input
317 \begin_inset Newline newline
318 \end_inset
319
320 address here
321 \begin_inset Newline newline
322 \end_inset
323
324
325 \begin_inset Flex Email
326 status open
327
328 \begin_layout Plain Layout
329 author.a@email
330 \end_layout
331
332 \end_inset
333
334
335 \end_layout
336
337 \begin_layout Address
338 Author B
339 \begin_inset Newline newline
340 \end_inset
341
342
343 \begin_inset Flex Email
344 status open
345
346 \begin_layout Plain Layout
347 author.b@email
348 \end_layout
349
350 \end_inset
351
352
353 \end_layout
354
355 \end_body
356 \end_document