-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.qmd
153 lines (114 loc) · 5.53 KB
/
index.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
---
title: "*quarto-preprint*: An example document"
running-head: "*quarto-preprint*"
author:
- name: Matti Vuorre
email: [email protected]
orcid: 0000-0001-5052-066X
url: https://www.tilburguniversity.edu/staff/m-j-vuorre
corresponding: true
affiliation:
- ref: 1
affiliations:
- id: 1
name: Tilburg University
department: Department of Social Psychology
abstract: |
This is an example Quarto document using the `preprint-typst` format.
keywords: [Quarto, Typst, extension, preprint]
wordcount: "{{< words-body >}}"
date: "`r Sys.Date()`"
citation:
type: article
container-title: "PsyArXiv"
doi: "an.example.doi"
url: example.com
number-sections: true
bibliography: bibliography.bib
suppress-bibliography: true
fontsize: 11pt
mainfont: Libertinus Serif
format:
preprint-typst:
section-numbering: "1.1.1.A.a"
bibliographystyle: apa
authornote: This is an example author note.
keep-typ: true
---
# Introduction
This is an example `preprint-typst` document. Let us first take a look at body text and headings.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Enim sed faucibus turpis in. Nec dui nunc mattis enim ut tellus. Bibendum ut tristique et egestas quis ipsum suspendisse ultrices gravida. Convallis posuere morbi leo urna. Sed velit dignissim sodales ut eu sem integer vitae justo. Convallis posuere morbi leo urna molestie at elementum eu facilisis. Aliquam sem et tortor consequat. Quam viverra orci sagittis eu. Sed arcu non odio euismod lacinia at quis risus sed. Egestas dui id ornare arcu odio ut sem. Lorem ipsum dolor sit amet consectetur.
## Heading level 2
Eget arcu dictum varius duis at. Netus et malesuada fames ac turpis. Pellentesque sit amet porttitor eget. Egestas tellus rutrum tellus pellentesque eu tincidunt tortor. Risus quis varius quam quisque id diam. Vel pretium lectus quam id leo in vitae. Sit amet aliquam id diam maecenas ultricies mi eget mauris. Auctor urna nunc id cursus metus aliquam eleifend. Arcu dictum varius duis at consectetur lorem. Tempus iaculis urna id volutpat lacus laoreet non. Adipiscing elit ut aliquam purus sit amet. At auctor urna nunc id cursus metus aliquam. Pharetra vel turpis nunc eget lorem dolor.
### Heading level 3
Tristique et egestas quis ipsum suspendisse ultrices gravida dictum fusce. Mauris commodo quis imperdiet massa tincidunt nunc pulvinar. Commodo elit at imperdiet dui accumsan sit amet nulla. Consectetur lorem donec massa sapien faucibus. In vitae turpis massa sed elementum tempus egestas sed sed. Aliquam faucibus purus in massa tempor. Dignissim diam quis enim lobortis scelerisque fermentum dui faucibus in. Montes nascetur ridiculus mus mauris vitae ultricies leo. Sociis natoque penatibus et magnis dis parturient montes nascetur.
#### Heading level 4
Consectetur libero id faucibus nisl. Consequat interdum varius sit amet mattis vulputate enim. Amet mattis vulputate enim nulla aliquet porttitor lacus luctus. Mauris augue neque gravida in fermentum et sollicitudin ac. Pharetra diam sit amet nisl suscipit adipiscing bibendum est ultricies. Nisi quis eleifend quam adipiscing. Diam ut venenatis tellus in. Dignissim enim sit amet venenatis urna cursus eget. Hac habitasse platea dictumst quisque sagittis. In fermentum et sollicitudin ac orci phasellus egestas tellus rutrum.
##### Heading level 5
Aliquam faucibus purus in massa tempor nec feugiat nisl pretium. Malesuada proin libero nunc consequat interdum varius. Vulputate dignissim suspendisse in est. Congue eu consequat ac felis donec et odio pellentesque diam. Viverra justo nec ultrices dui sapien. Faucibus vitae aliquet nec ullamcorper sit amet risus. Metus aliquam eleifend mi in. Risus quis varius quam quisque id diam vel quam. Et malesuada fames ac turpis egestas integer eget aliquet.
## Floats
### Tables
```{r}
#| include: false
set.seed(1)
data <- data.frame(x = rnorm(30), y = rnorm(30))
```
Here are a couple of example tables (@tbl-example, @tbl-example2).
```{r}
#| label: tbl-example
#| tbl-cap: Table created with `tinytable::tt()`
#| echo: true
tinytable::tt(
head(data, 2),
digits = 2,
notes = "Note. This is a footnote."
)
```
```{r}
#| label: tbl-example2
#| tbl-cap: Table created with `knitr::kable()`
#| echo: false
knitr::kable(
head(data, 2),
digits = 2
)
```
### Figures
Below is an example figure created in R [@r2024] (@fig-example).
```{r}
#| label: fig-example
#| fig-cap: Example R scatterplot.
#| fig-height: 3
#| fig-width: 7
#| echo: false
plot(data)
```
## Quarto markdown features
### Maths
LaTeX math notation is automatically converted to Typst and as such works just fine either inline ($y_i = \alpha + \beta x_i + \epsilon_i$) or in display mode (@eq-1):
$$
f(x \mid \mu, \sigma^2) = \frac{1}{\sqrt{2\pi \sigma^2}} \exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)
$$ {#eq-1}
### Block quotes
To insert a quote block, prepend a paragraph with `>`:
>A quote: "*Elit ullamcorper dignissim cras tincidunt lobortis feugiat vivamus at.*"
### Callouts
[Callout blocks](https://quarto.org/docs/authoring/callouts.html), such as @tip-example, can be useful for highlighting content, such as one might do in a box that defines key terms, etc.
::: {#tip-example .callout-tip}
#### All kinds of markup
````
This is basic markdown: **bold text** & ~subscript~.
````
This is basic markdown: **bold text** & ~subscript~.
:::
### Code listings
Code listings can also be cross-referenced (@lst-r).
```{r}
#| lst-label: lst-r
#| lst-cap: R code for pRos.
#| collapse: true
1 + 1
```
```{r}
1 + 1 + 1
```