https://github.com/cwickham/typst-div
https://github.com/cwickham/typst-div
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cwickham/typst-div
- Owner: cwickham
- Created: 2024-05-31T21:21:42.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-31T21:29:18.000Z (about 2 years ago)
- Last Synced: 2025-04-02T01:20:38.271Z (about 1 year ago)
- Language: Lua
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Typst-div Extension For Quarto
Adds a filter to pick up divs with a class that starts with `.typst_`. The contents of the div is passed to a function that matches the suffix of the class, e.g. `.typst_page` passes the content to the `page()` function. Attributes to the div are passed as named arguments.
## Installing
```bash
quarto add cwickham/typst-div
```
This will install the extension under the `_extensions` subdirectory.
If you're using version control, you will want to check in this directory.
## Using
````
::: {.typst_page fill='rgb("#39729E")'}
This content will be passed to `page()` setting the `fill` argument:
```typst
#page(fill: rgb("#39729E"))[
{{ Div contents }}
]
```
:::
````
## Example
Minimal example: [Source](example.qmd), [PDF](example.pdf)