Skip to content

Commit

Permalink
Increase vertical margin
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Garmelon committed May 14, 2024
1 parent aaa8a30 commit f13497f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/typst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ impl World for DummyWorld {

pub fn render_to_png(typst: String) -> anyhow::Result<Vec<u8>> {
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,
]
Expand Down

0 comments on commit f13497f

Please sign in to comment.