From 260f04a61f543e4e026be5e1d5d7515f13fb0806 Mon Sep 17 00:00:00 2001 From: Joscha Date: Tue, 14 May 2024 14:42:23 +0200 Subject: [PATCH] Increase vertical margin This way, inline math sub- and superscript like $B_(1/2)$ or even an extreme example like $integral_(integral_integral)^(integral^integral)$ stays fully visible. While the horizontal margin could probably be reduced to 0mm, I'd rather keep it at 1mm to be on the safe side. --- src/typst.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/typst.rs b/src/typst.rs index 20c942d..76318cd 100644 --- a/src/typst.rs +++ b/src/typst.rs @@ -146,7 +146,8 @@ impl World for DummyWorld { pub fn render_to_png(typst: String) -> anyhow::Result> { let typst = [ - "#set page(width: 11.5cm, height: auto, margin: 0.1cm, fill: rgb(\"#313338\"))", + "#set page(width: 11.5cm, height: auto, margin: (x: 1mm, y: 2mm))", + "#set page(fill: rgb(\"#313338\"))", // Discord background color "#set text(white)", &typst, ]