From e3a8cfceb5b2fab05f2db6150b7886af4d43858e Mon Sep 17 00:00:00 2001 From: szdytom Date: Sun, 6 Jul 2025 23:46:25 +0800 Subject: [PATCH] update styles Signed-off-by: szdytom --- styles.typ | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/styles.typ b/styles.typ index 8186a5d..3f0f234 100644 --- a/styles.typ +++ b/styles.typ @@ -15,20 +15,24 @@ #let ee = "e" #let ii = "i" -#let showy_wrapper(title: "", wrap-border: none, ..args) = { +#let margin-wrapper(margin: 2.5em, body) = { + set align(center) + block(inset: ( + left: margin, + ), width: 100%, body) +} + +#let showy_wrapper(title: "", margin: none, ..args) = { let b = if title != "" { showybox(title: text(font: zhfont_sans, title), ..args) } else { showybox(title: title, ..args) } - if wrap-border == none { + if margin == none { b } else { - set align(center) - block(inset: ( - left: wrap-border, - ), width: 100%, b) + margin-wrapper(b) } } @@ -39,7 +43,6 @@ color: theme_color.darken(40%), sep-thickness: 0pt, font: zhfont_sans - //align: center ), frame: ( title-color: theme_color.lighten(80%), @@ -92,6 +95,7 @@ set highlight(fill: none, stroke: ( bottom: 4pt + theme_color.lighten(80%) )) + set footnote(numbering: "注1") v(10fr) h(2fr)