From 08232f43ed991ef03272261bb56b2ce8cea88795 Mon Sep 17 00:00:00 2001 From: Popa <115492561+Popa-42@users.noreply.github.com> Date: Wed, 28 Oct 2026 19:29:20 +0100 Subject: [PATCH] Enhance modern template math support --- src/templates/modern.typ | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/templates/modern.typ b/src/templates/modern.typ index 66e3b9f..2e7167e 100644 --- a/src/templates/modern.typ +++ b/src/templates/modern.typ @@ -186,6 +186,7 @@ #let modern-template( + document-lang: "en", seminar: [], professor: [], assistant: none, @@ -329,7 +330,7 @@ }, ) - set text(font: _theme.text-font) + set text(font: _theme.text-font, lang: document-lang) show math.equation: set text(font: _theme.math-font) show raw: set text(font: "Fira Code") @@ -366,7 +367,18 @@ #let _qed = $square$ #let qed-equation(eq) = { - set math.equation(numbering: n => _qed, number-align: right + bottom) + set math.equation(numbering: _ => _qed, number-align: right + bottom) eq } #let qed = [#h(1fr)#_qed] +#let Re = math.op("Re") +#let Im = math.op("Im") + +#let clap(body) = math.display(box( + width: 0pt, + height: 1em, + align(center, box( + width: float.inf * 1pt, + $script(body)$, + )), +))