From 1141e163647d24e7de1e7c9157c7b887bd221270 Mon Sep 17 00:00:00 2001 From: Joscha Date: Sat, 2 Aug 2025 18:57:06 +0200 Subject: [PATCH] Tweak HTML export look --- whiteprint.typ | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/whiteprint.typ b/whiteprint.typ index 39e50f2..dc41aec 100644 --- a/whiteprint.typ +++ b/whiteprint.typ @@ -1,6 +1,8 @@ +#import "@preview/bullseye:0.1.0": * #import "@preview/diagraph:0.3.5" #import "@preview/theorion:0.4.0" + // Custom corollary that is at the same counter depth as theorems etc. #let ( _corollary-counter, @@ -20,6 +22,7 @@ show: _show-corollary theorion.set-inherited-levels(1) + // Basic styling set par(justify: true) set heading( numbering: "1.1", @@ -27,6 +30,13 @@ ) show link: set text(fill: blue.darken(20%)) + // HTML export + show math.equation.where(block: true): show-target(html: html.frame) + show math.equation.where(block: false): show-target(html: it => html.elem( + "span", + html.frame(it), + )) + body } @@ -39,7 +49,7 @@ #let _elem( kind: none, - title: "", + title: none, lean: none, uses: (), statement, @@ -57,10 +67,13 @@ #metadata(( kind: kind, title: title, - lean: lean, - uses: uses, + lean: str(lean), + uses: uses.map(str), )) - #_elem-fns.at(kind)(title: title, statement) #lean + #_elem-fns.at(kind)( + title: if title == none { "" } else { title }, + statement, + ) #lean #if proof != none { theorion.proof(proof) } ] }