calepin 0.0.17

A Rust CLI for preprocessing Typst documents with executable code chunks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#import "/.calepin/calepin.typ": code-block

#show raw.where(block: true): it => {
  if it.theme != auto {
    it
  } else if it.lang != none and _fenced-chunks-runs(
    it.lang,
    _resolve-options(it.lang, _call-defaults).at("fenced-chunks"),
  ) {
    it
  } else if sys.inputs.at("calepin-target", default: "paged") == "html" {
    _html-themed-raw-block(it)
  } else {
    code-block(it)
  }
}

{{ document.body }}