// code-listing.typ #let code-listing( body: str, caption: none, lang: "text", label: none, ) = { show raw: set text(size: 9pt) let fig = figure( block( width: 100%, inset: (x: 14pt, y: 12pt), radius: 5pt, stroke: 0.5pt, raw(lang: lang, block: true, body.trim()), ), supplement: "Listing", kind: "code", caption: caption ) if label != none { [#fig #label] } else { fig } }