summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author8oldr <8oldr@proton.me>2026-10-13 16:18:46 +0300
committer8oldr <8oldr@proton.me>2026-10-13 16:18:46 +0300
commita7cf241acd5c2802ae8144d437f04b6a97a6f1b2 (patch)
tree1c05a7a4c6b7accd6bb753106f04ec43a5677efa
parent603549dff56cc4c9ffe2dd309579cac74315f59c (diff)
Better inline display
-rw-r--r--template.typ9
1 files changed, 9 insertions, 0 deletions
diff --git a/template.typ b/template.typ
index 4d4b8aa..345ab9c 100644
--- a/template.typ
+++ b/template.typ
@@ -25,3 +25,12 @@
]
#let colourmaths(x, color) = text(fill: color)[$#x$]
+
+// author: eric1102 - https://sitandr.github.io/typst-examples-book/book/typstonomicon/math_display.html
+// may slightly interfere with maths blocks
+#show math.equation: it => {
+ if it.body.fields().at("size", default: none) != "display" {
+ return math.display(it)
+ }
+ it
+}