From ce40702a501c3159db89693bd7da713ae1b4c011 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Wed, 29 Apr 2026 21:25:40 +0200 Subject: feat(typst): embed fonts --- src/eval/template_math_block.typ | 14 +++++++++----- src/eval/template_math_content.typ | 15 +++++++++------ 2 files changed, 18 insertions(+), 11 deletions(-) (limited to 'src/eval') diff --git a/src/eval/template_math_block.typ b/src/eval/template_math_block.typ index 3d5891a..ecadae1 100644 --- a/src/eval/template_math_block.typ +++ b/src/eval/template_math_block.typ @@ -1,11 +1,15 @@ -#set page( - fill: none, - margin: 2pt, -); +#show math.equation: set text(font: "New Computer Modern Math") +#show math.text: set text(font: "New Computer Modern") #let display(body) = context { + let margin = 2pt let m = measure(body) - set page(width: m.width + page.margin.length*2, height: m.height + page.margin.length*2) + set page( + fill: none, + margin: margin, + width: m.width + margin*2, + height: m.height + margin*2, + ) body } diff --git a/src/eval/template_math_content.typ b/src/eval/template_math_content.typ index 03732af..cd31ef6 100644 --- a/src/eval/template_math_content.typ +++ b/src/eval/template_math_content.typ @@ -1,11 +1,14 @@ -#set page( - fill: none, - margin: 2pt, -); - #let display(body) = context { + show math.equation: set text(font: "New Computer Modern Math") + + let margin = 2pt let m = measure(body) - set page(width: m.width + page.margin.length*2, height: m.height + page.margin.length*2) + set page( + fill: none, + margin: margin, + width: m.width + margin*2, + height: m.height + margin*2, + ) body } -- cgit v1.2.3