aboutsummaryrefslogtreecommitdiff
path: root/src/eval/template.typ
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-04-30 19:20:16 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2026-04-30 19:20:16 +0200
commita9e8d0e9c929bec830b086e473ef1362e1f873d9 (patch)
tree9ff2e2c2f49f5ca918c976dde000e0ee61a7b8bf /src/eval/template.typ
parenta36f5482ad90d6899d56e016666a2ca09240abd6 (diff)
refactor(typst): generalize template
Diffstat (limited to 'src/eval/template.typ')
-rw-r--r--src/eval/template.typ18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/eval/template.typ b/src/eval/template.typ
new file mode 100644
index 0000000..18a2695
--- /dev/null
+++ b/src/eval/template.typ
@@ -0,0 +1,18 @@
+#let display(param, body) = context {
+ show math.equation: set text(font: "New Computer Modern Math")
+ show math.text: set text(font: "New Computer Modern")
+
+ let m = measure(body)
+
+ let data = param(m)
+
+ set page(
+ fill: none,
+ margin: data.margin,
+ width: data.width,
+ height: data.height,
+ )
+
+ body
+}
+