generated from quarto-journals/article-format-template
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtemplate.qmd
218 lines (171 loc) · 9.26 KB
/
template.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
---
title: "Demo arXiv template"
format:
arxiv-pdf:
keep-tex: true
linenumbers: false
doublespacing: false
runninghead: "A Preprint"
arxiv-html: default
author:
- name: Michael J Mahoney
affiliations:
- name: State University of New York College of Environmental Science and Forestry
department: Graduate Program in Environmental Science
address: 1 Forestry Drive
city: Syracuse, NY
country: USA
postal-code: 13210
orcid: 0000-0003-2402-304X
email: [email protected]
url: https://mm218.dev
- name: Someone Else
affiliations:
- name: State University of New York College of Environmental Science and Forestry
department: Department of Sustainable Resources Management
address: 1 Forestry Drive
city: Syracuse, NY
country: USA
postal-code: 13210
abstract: |
This document is only a demo explaining how to use the template.
keywords:
- template
- demo
bibliography: bibliography.bib
---
# Introduction {#sec-intro}
This is an example of how to use this template to render journal articles. This template is inspired by the arXiv rticles template for rmarkdown, repurposed for the Quarto publishing system.
This quarto extension format supports PDF and HTML outputs. This template is primarily focused on generating acceptable {{< latex >}} outputs from Quarto, but renders an acceptable HTML output using the standard Quarto options.
# Quarto
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
# Running Code
When you click the **Render** button a document will be generated that includes both content and the output of embedded code. You can embed code like this:
```{r}
1 + 1
```
This format hide chunks by default, but you can set `echo` option to `true` locally in the chunk:
```{r}
#| echo: true
#| label: tbl-glm
#| tbl-cap: "A table."
# install.packages("broom")
# install.packages("kableExtra")
data("quine", package = "MASS")
m_pois <- glm(Days ~ (Eth + Sex + Age + Lrn)^2, data = quine, family = poisson)
kableExtra::kable_styling(
kableExtra::kbl(broom::tidy(m_pois))
)
```
# Markdown Basics
This section of the template is adapted from [Quarto's documentation on Markdown basics](https://quarto.org/docs/authoring/markdown-basics.html).
## Text Formatting
+-----------------------------------+-------------------------------+
| Markdown Syntax | Output |
+===================================+===============================+
| *italics* and **bold** | *italics* and **bold** |
+-----------------------------------+-------------------------------+
| superscript^2^ / subscript~2~ | superscript^2^ / subscript~2~ |
+-----------------------------------+-------------------------------+
| ~~strikethrough~~ | ~~strikethrough~~ |
+-----------------------------------+-------------------------------+
| `verbatim code` | `verbatim code` |
+-----------------------------------+-------------------------------+
## Headings {#headings}
+---------------------+-----------------------------------+
| Markdown Syntax | Output |
+=====================+===================================+
| # Header 1 | # Header 1 {.heading-output} |
+---------------------+-----------------------------------+
| ## Header 2 | ## Header 2 {.heading-output} |
+---------------------+-----------------------------------+
| ### Header 3 | ### Header 3 {.heading-output} |
+---------------------+-----------------------------------+
## Equations
Use `$` delimiters for inline math and `$$` delimiters for display math. For example:
+-------------------------------+-------------------------+
| Markdown Syntax | Output |
+===============================+=========================+
| inline math: $E = mc^{2}$ | inline math: $E=mc^{2}$ |
+-------------------------------+-------------------------+
| display math: | display math:\ |
| | $$E = mc^{2}$$ |
| $$E = mc^{2}$$ | |
+-------------------------------+-------------------------+
If assigned an ID, display math equations will be automatically numbered:
$$
\frac{\partial \mathrm C}{ \partial \mathrm t } + \frac{1}{2}\sigma^{2} \mathrm S^{2}
\frac{\partial^{2} \mathrm C}{\partial \mathrm C^2}
+ \mathrm r \mathrm S \frac{\partial \mathrm C}{\partial \mathrm S}\ =
\mathrm r \mathrm C
$$ {#eq-black-scholes}
## Other Blocks
+-----------------------------+--------------------------+
| Markdown Syntax | Output |
+=============================+==========================+
| > Blockquote | > Blockquote |
+-----------------------------+--------------------------+
| | Line Block | | Line Block |
| | Spaces and newlines | | Spaces and newlines |
| | are preserved | | are preserved |
+-----------------------------+--------------------------+
## Cross-references {#sec-crf}
![A sunflower](sunflower.png){#fig-sunflower}
+---------------------------------------+---------------------------------+
| Markdown Format | Output |
+=======================================+=================================+
| @fig-sunflower is pretty. | @fig-sunflower is pretty. |
+---------------------------------------+---------------------------------+
| @tbl-glm was created from code. | @tbl-glm was created from code. |
+---------------------------------------+---------------------------------+
| @sec-crf is this section. | @sec-crf is this section. |
+---------------------------------------+---------------------------------+
| @eq-black-scholes is above. | @eq-black-scholes is above. |
+---------------------------------------+---------------------------------+
See the [Quarto documentation on cross-references for more](https://quarto.org/docs/authoring/cross-references.html).
# Citations
This section of the template is adapted from the [Quarto citation documentation](https://quarto.org/docs/authoring/footnotes-and-citations.html).
Quarto supports bibliography files in a wide variety of formats including BibTeX and CSL. Add a bibliography to your document using the `bibliography` YAML metadata field. For example:
``` yaml
---
title: "My Document"
bibliography: references.bib
---
```
See the [Pandoc Citations](https://pandoc.org/MANUAL.html#citations) documentation for additional information on bibliography formats.
## Citation Syntax {#sec-citations}
Quarto uses the standard Pandoc markdown representation for citations. Here are some examples:
+-------------------------------------------+---------------------------------------------------------------------+
| Markdown Format | Output |
+===========================================+=====================================================================+
| Blah Blah [see @knuth1984, pp. 33-35; | Blah Blah [see @knuth1984, pp. 33-35; also @wickham2015, chap. 1] |
| also @wickham2015, chap. 1] | |
+-------------------------------------------+---------------------------------------------------------------------+
| Blah Blah [@knuth1984, pp. 33-35, | Blah Blah [@knuth1984, pp. 33-35, 38-39 and passim] |
| 38-39 and passim] | |
+-------------------------------------------+---------------------------------------------------------------------+
| Blah Blah [@wickham2015; @knuth1984]. | Blah Blah [@wickham2015; @knuth1984]. |
+-------------------------------------------+---------------------------------------------------------------------+
| Wickham says blah [-@wickham2015] | Wickham says blah [-@wickham2015] |
+-------------------------------------------+---------------------------------------------------------------------+
You can also write in-text citations, as follows:
+-----------------------------------+-------------------------------+
| Markdown Format | Output |
+===================================+===============================+
| @knuth1984 says blah. | @knuth1984 says blah. |
+-----------------------------------+-------------------------------+
| @knuth1984 [p. 33] says blah. | @knuth1984 [p. 33] says blah. |
+-----------------------------------+-------------------------------+
See the [Pandoc Citations](https://pandoc.org/MANUAL.html#citations) documentation for additional information on citation syntax.
To provide a custom citation stylesheet, provide a path to a CSL file using the `csl` metadata field in your document, for example:
``` yaml
---
title: "My Document"
bibliography: references.bib
csl: nature.csl
---
```
{{< pagebreak >}}
# References {.unnumbered}
::: {#refs}
:::