---
title: "Margin Table with great_tables"
papersize: us-letter
format:
  html: default
  typst:
    keep-typ: true
_quarto:
  tests:
    typst:
      ensureTypstFileRegexMatches:
        # Cell option produces #notefigure (entire figure in margin)
        - ['#notefigure\(', 'kind: "quarto-float-tbl"']
        - []
      ensurePdfRegexMatches:
        - ['Table 1', 'Large Landmasses']
        - []
      ensurePdfTextPositions:
        - # Table in margin, right of body text
          - subject: "Large Landmasses"
            relation: rightOf
            object: "This tests"
          - subject: "Borneo"
            relation: rightOf
            object: "This tests"
          # Caption above table content (default for tables)
          - subject: "Large Landmasses"
            relation: above
            object: "Borneo"
        - []
      noErrors: default
---

This tests a great_tables table placed in the margin using 

```
#| column: margin
```

```{python}
#| column: margin
#| classes: plain
#| echo: false
#| label: tbl-islands
#| tbl-cap: "Large Landmasses"

from great_tables import GT
from great_tables.data import islands

(
    GT(islands.head(20), rowname_col="name")
    .fmt_integer(columns="size")
)
```

See @tbl-islands for the table in the margin.

More text in the main column to show the layout.
