diff --git a/lib/matisse-thesis.typ b/lib/matisse-thesis.typ index 2590eb2..555fde6 100644 --- a/lib/matisse-thesis.typ +++ b/lib/matisse-thesis.typ @@ -179,7 +179,19 @@ // ---------- LISTING ---------- show raw.where(block: true): it => { - block(radius: 1em, fill: luma(240), inset: 1em, width: 80%, { + // Line number, not verry good (cannot copy code whitout line number) + // see https://github.com/typst/typst/issues/344 + show raw.line: line => { + if line.number < 10 { + text(fill: gray)[~#line.number] + } else { + text(fill: gray)[#line.number] + } + h(1em) + line.body + } + + block(radius: 1em, fill: luma(240), inset: 1em, width: 90%, { set align(left) it })