-
Notifications
You must be signed in to change notification settings - Fork 432
Expand file tree
/
Copy pathtbl-column-margin.qmd
More file actions
49 lines (45 loc) · 1.13 KB
/
tbl-column-margin.qmd
File metadata and controls
49 lines (45 loc) · 1.13 KB
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
---
title: "Tbl-Column Margin Test"
papersize: us-letter
tbl-column: margin
format:
html: default
typst:
keep-typ: true
_quarto:
tests:
typst:
ensureTypstFileRegexMatches:
# Table should use notefigure for margin placement
- ['#notefigure\(', 'kind: "quarto-float-tbl"']
- []
ensurePdfRegexMatches:
- ['Table 1', 'TblColMarginCap', 'Alpha']
- []
ensurePdfTextPositions:
- # Table text should be in the margin, right of body text
- subject: "Alpha"
relation: rightOf
object: "BODYTEXT"
- []
noErrors: default
---
BODYTEXT: This tests the document-level `tbl-column: margin` option. Tables should go to the margin; figures should stay in the body.
```{r}
#| label: fig-tc-test
#| fig-cap: "FigBodyCap"
#| echo: false
library(ggplot2)
ggplot(mtcars, aes(x = wt, y = mpg)) +
geom_point() +
theme_minimal()
```
```{r}
#| label: tbl-tc-test
#| tbl-cap: "TblColMarginCap"
#| echo: false
knitr::kable(
data.frame(Item = c("Alpha", "Beta"), Value = c(10, 20))
)
```
The table should be in the margin and the figure in the body.