Tweak HTML export look
This commit is contained in:
parent
20b90393aa
commit
1141e16364
1 changed files with 17 additions and 4 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
|
#import "@preview/bullseye:0.1.0": *
|
||||||
#import "@preview/diagraph:0.3.5"
|
#import "@preview/diagraph:0.3.5"
|
||||||
#import "@preview/theorion:0.4.0"
|
#import "@preview/theorion:0.4.0"
|
||||||
|
|
||||||
|
|
||||||
// Custom corollary that is at the same counter depth as theorems etc.
|
// Custom corollary that is at the same counter depth as theorems etc.
|
||||||
#let (
|
#let (
|
||||||
_corollary-counter,
|
_corollary-counter,
|
||||||
|
|
@ -20,6 +22,7 @@
|
||||||
show: _show-corollary
|
show: _show-corollary
|
||||||
theorion.set-inherited-levels(1)
|
theorion.set-inherited-levels(1)
|
||||||
|
|
||||||
|
// Basic styling
|
||||||
set par(justify: true)
|
set par(justify: true)
|
||||||
set heading(
|
set heading(
|
||||||
numbering: "1.1",
|
numbering: "1.1",
|
||||||
|
|
@ -27,6 +30,13 @@
|
||||||
)
|
)
|
||||||
show link: set text(fill: blue.darken(20%))
|
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
|
body
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -39,7 +49,7 @@
|
||||||
|
|
||||||
#let _elem(
|
#let _elem(
|
||||||
kind: none,
|
kind: none,
|
||||||
title: "",
|
title: none,
|
||||||
lean: none,
|
lean: none,
|
||||||
uses: (),
|
uses: (),
|
||||||
statement,
|
statement,
|
||||||
|
|
@ -57,10 +67,13 @@
|
||||||
#metadata((
|
#metadata((
|
||||||
kind: kind,
|
kind: kind,
|
||||||
title: title,
|
title: title,
|
||||||
lean: lean,
|
lean: str(lean),
|
||||||
uses: uses,
|
uses: uses.map(str),
|
||||||
)) <whiteprint-metadata>
|
)) <whiteprint-metadata>
|
||||||
#_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) }
|
#if proof != none { theorion.proof(proof) }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue