thesis/3_rasta/X_lib.typ
Jean-Marie Mineau ef50ff2f49
here we go
2025-06-21 12:52:35 +02:00

29 lines
581 B
Typst

#let mypercent(numerator, denominator, digits: 2) = {
[#calc.round((100 * numerator) / denominator, digits: digits) %]
}
#let ok = text(fill: olive, sym.checkmark)
#let okk = text(fill: olive, tracking: -5pt, sym.checkmark+sym.checkmark)
#let bad = text(fill: orange, sym.circle.stroked.small)
#let ko = text(fill: maroon, sym.crossmark)
#let nr = sym.dash.en
#let str2sym(s) = {
if s == "ok" {
ok
} else if s == "okk" {
okk
} else if s == "bad" {
bad
} else if s == "ko" {
ko
} else if s == "nr" {
nr
} else {
s
}
}
#let num(n) = [#n]