From a7cf241acd5c2802ae8144d437f04b6a97a6f1b2 Mon Sep 17 00:00:00 2001 From: 8oldr <8oldr@proton.me> Date: Tue, 13 Oct 2026 16:18:46 +0300 Subject: Better inline display --- template.typ | 9 +++++++++ 1 file changed, 9 insertions(+) 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 +} -- cgit