diff options
| author | John MacFarlane <[email protected]> | 2023-03-27 10:46:07 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2023-03-27 10:47:15 -0700 |
| commit | fd85560b848e1cd83cef737ed9d0b9bdc587fff2 (patch) | |
| tree | c8c14aade7fbbf719782baad2fc456ab616ec5bd /data | |
| parent | cf6a742710f631364bbb3145566927b17b794a02 (diff) | |
Typst: Use customized term instead of custom macro for def lists.
Diffstat (limited to 'data')
| -rw-r--r-- | data/templates/default.typst | 9 | ||||
| -rw-r--r-- | data/templates/definitions.typst | 5 |
2 files changed, 9 insertions, 5 deletions
diff --git a/data/templates/default.typst b/data/templates/default.typst index 43674bc32..c04b5e40f 100644 --- a/data/templates/default.typst +++ b/data/templates/default.typst @@ -1,5 +1,14 @@ $definitions.typst()$ +#show terms: it => { + it.children + .map(child => [ + #strong[#child.term] + #block(inset: (left: 1.5em, top: -0.4em))[#child.description] + ]) + .join() +} + $if(template)$ #import "$template$": conf $else$ diff --git a/data/templates/definitions.typst b/data/templates/definitions.typst index 02fe80f38..acdc9ea89 100644 --- a/data/templates/definitions.typst +++ b/data/templates/definitions.typst @@ -1,9 +1,4 @@ // Some definitions presupposed by pandoc's typst output. -#let definition(term, ..defs) = [ - #strong(term) \ - #(defs.pos().join("\n")) -] - #let blockquote(body) = [ #set text( size: 0.92em ) #block(inset: (left: 1.5em, top: 0.2em, bottom: 0.2em))[#body] |
