-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.qmd
150 lines (110 loc) · 5.2 KB
/
example.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
---
title: Manuscript title
running-head: Running head
author:
- name: Norah Jones
email: [email protected]
affiliation:
- ref: 1
- ref: 2
- name: John Hamm
affiliation:
- ref: 1
- name: Third Author
affiliation:
- ref: 2
affiliations:
- id: 1
name: Department 1, University A
- id: 2
name: Department 2, University B
abstract: |
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ullamcorper eget nulla facilisi etiam dignissim diam quis. Sed adipiscing diam donec adipiscing tristique risus nec feugiat. Justo eget magna fermentum iaculis eu non. Tristique senectus et netus et malesuada fames ac turpis egestas. Consequat ac felis donec et. Scelerisque mauris pellentesque pulvinar pellentesque habitant morbi. Tincidunt augue interdum velit euismod in pellentesque massa placerat duis. Ultricies mi quis hendrerit dolor magna eget est lorem. Morbi tristique senectus et netus et. Faucibus et molestie ac feugiat sed lectus vestibulum. Donec pretium vulputate sapien nec sagittis aliquam. Feugiat nibh sed pulvinar proin gravida hendrerit lectus a.
keywords: "Lorem, ipsum, dolor, sit, amet"
authornote: |
This is an author note.
bibliography: bibliography.bib
bibliographystyle: apa
format:
apaish-typst:
documentmode: doc
---
Enim nec dui nunc mattis. Sed cras ornare arcu dui vivamus. Lorem mollis aliquam ut porttitor. Pellentesque habitant morbi tristique senectus. Nulla aliquet porttitor lacus luctus accumsan tortor posuere ac.
Mauris pharetra et ultrices neque ornare aenean. Viverra nam libero justo laoreet sit amet. Suscipit adipiscing bibendum est ultricies integer quis auctor.
## Level 2 Heading
Non consectetur a erat nam at lectus urna duis convallis. In vitae turpis massa sed elementum tempus egestas sed sed. Consectetur purus ut faucibus pulvinar elementum integer. Phasellus vestibulum lorem sed risus ultricies tristique. Nullam non nisi est sit amet facilisis magna.[^1]
[^1]: This is a footnote.
### Level 3 Heading
Magna eget est lorem ipsum dolor sit amet consectetur. Pellentesque habitant morbi tristique senectus. Iaculis urna id volutpat lacus laoreet non curabitur gravida. Et magnis dis parturient montes nascetur ridiculus mus mauris.
#### Level 4 Heading
Semper risus in hendrerit gravida rutrum quisque non tellus orci. Ultricies leo integer malesuada nunc. Lobortis feugiat vivamus at augue eget arcu dictum varius duis.
##### Level 5 Heading
Aliquam eleifend mi in nulla posuere sollicitudin aliquam. Fermentum et sollicitudin ac orci phasellus egestas.
## Markdown
Markdown should be sufficient for formatting stuff: *Italics*, **bold**.
> *Blockquotes*: This document is a template demonstrating the Apaish format. This document is a template demonstrating the Apaish format. This document is a template demonstrating the Apaish format.
- Lists
- Level 2 item
# Methods
## Math
Apparently latex math works both inline ($Y = \alpha + \beta X$) and in display blocks:
$$
\begin{align}
Y &= \alpha + \beta X \\
\begin{bmatrix}
\alpha \\ \beta
\end{bmatrix} &\sim MVN\left(
\begin{bmatrix}
0 \\ 0
\end{bmatrix},
\begin{pmatrix}
\tau_0 \ \\
\rho_{01} \ &\tau_1
\end{pmatrix}
\right).
\end{align}
$$ {#eq-1}
The latter are easily cited (e.g. @eq-1).
# Results
## Tables
Typst tables are currently somewhat limited (<https://typst.app/docs/reference/layout/table/>).
```{r}
#| label: tbl-1
#| tbl-cap: Mtcars table.
#| echo: false
knitr::kable(mtcars[1:3, 1:3])
```
@tbl-1 shows what happens if you run `mtcars[1:3, 1:3]` in R [@R].
```{r}
#| cache: true
#| message: false
#| echo: false
library(gt)
library(tidyverse)
gtcars |>
slice_head(n = 2, by = ctry_origin) |>
filter(ctry_origin %in% c("Italy", "Japan")) |>
select(1:6, ctry_origin) |>
group_by(ctry_origin) |>
gt() |>
opt_stylize(style = 6) |>
gtsave("tmp.png")
```
![Image of a gt() table](tmp.png){#tbl-tmp width=50%}
Any table can be included as a figure (@tbl-tmp) and will even show with correct "Table" prefixes when referenced.
## Figures
Figures are just fine.
```{r}
#| label: fig-1
#| fig-cap: Mtcars figure.
#| fig-width: 8
#| fig-height: 3
#| echo: false
par(pty = "s")
plot(mtcars$cyl, mtcars$disp)
```
@fig-1 shows what happens if you run `plot(mtcars$cyl, mtcars$disp)` in R [@R].
![Image of Thomas Bayes from <https://en.wikipedia.org/wiki/Thomas_Bayes>](Thomas_Bayes.jpg){#fig-bayes width=50%}
You can also embed figures from files using Markdown syntax: `![Caption](Thomas_Bayes.jpg){#fig-bayes}` shows @fig-bayes.
# Discussion
Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Ullamcorper eget nulla facilisi etiam dignissim diam quis. Luctus venenatis lectus magna fringilla. Posuere ac ut consequat semper viverra nam libero justo laoreet. Interdum posuere lorem ipsum dolor sit amet consectetur adipiscing elit. Id diam vel quam elementum pulvinar etiam non quam lacus. Nisl pretium fusce id velit ut. Risus sed vulputate odio ut enim blandit volutpat maecenas. Massa ultricies mi quis hendrerit dolor magna eget est. Dignissim convallis aenean et tortor at. Tempor id eu nisl nunc mi ipsum faucibus vitae. Tristique et egestas quis ipsum suspendisse ultrices.