diff --git a/macros.typ b/macros.typ new file mode 100644 index 0000000..54b160c --- /dev/null +++ b/macros.typ @@ -0,0 +1,23 @@ +#let Skylighting(fill: none, number: false, start: 1, sourcelines) = { + let blocks = [] + let lnum = start - 1 + let bgcolor = rgb("#f1f3f5") + for ln in sourcelines { + if number { + lnum = lnum + 1 + blocks = blocks + box(width: if start + sourcelines.len() > 999 { 30pt } else { 24pt }, text(fill: rgb("#aaaaaa"), [ #lnum ])) + } + blocks = blocks + ln + EndLine() + } + block(fill: bgcolor, width:100%, inset:(x:5pt, y:8pt), stroke:( left: 2pt + green), below:0pt, blocks) +} + + +#set math.mat(delim: "[") + +// now in index.qmd +//#set math.equation(numbering: none) +// not enough +//#let equation-numbering = it => { +// numbering(none, it) +//} \ No newline at end of file