|
| 1 | +// |
| 2 | +// TCG Template for Typst |
| 3 | +// Initial version generated by Pandoc v3.6.4 using: |
| 4 | +// pandoc -D typst |
| 5 | +// |
| 6 | + |
| 7 | +#let horizontalrule = line(start: (25%,0%), end: (75%,0%)) |
| 8 | + |
| 9 | +#show terms: it => { |
| 10 | + it.children |
| 11 | + .map(child => [ |
| 12 | + #strong[#child.term] |
| 13 | + #block(inset: (left: 1.5em, top: -0.4em))[#child.description] |
| 14 | + ]) |
| 15 | + .join() |
| 16 | +} |
| 17 | + |
| 18 | +#set table( |
| 19 | + inset: 6pt, |
| 20 | + stroke: 1pt |
| 21 | +) |
| 22 | + |
| 23 | +#show figure.where( |
| 24 | + kind: table |
| 25 | +): set figure.caption(position: $if(table-caption-position)$$table-caption-position$$else$top$endif$) |
| 26 | + |
| 27 | +#show figure.where( |
| 28 | + kind: image |
| 29 | +): set figure.caption(position: $if(figure-caption-position)$$figure-caption-position$$else$bottom$endif$) |
| 30 | + |
| 31 | +$if(template)$ |
| 32 | +#import "$template$": conf |
| 33 | +$else$ |
| 34 | +$template.typst()$ |
| 35 | +$endif$ |
| 36 | + |
| 37 | +$if(smart)$ |
| 38 | +$else$ |
| 39 | +#set smartquote(enabled: false) |
| 40 | + |
| 41 | +$endif$ |
| 42 | +$for(header-includes)$ |
| 43 | +$header-includes$ |
| 44 | + |
| 45 | +$endfor$ |
| 46 | +#show: doc => conf( |
| 47 | +$if(title)$ |
| 48 | + title: [$title$], |
| 49 | +$endif$ |
| 50 | +$if(subtitle)$ |
| 51 | + subtitle: [$subtitle$], |
| 52 | +$endif$ |
| 53 | +$if(author)$ |
| 54 | + authors: ( |
| 55 | +$for(author)$ |
| 56 | +$if(author.name)$ |
| 57 | + ( name: [$author.name$], |
| 58 | + affiliation: [$author.affiliation$], |
| 59 | + email: [$author.email$] ), |
| 60 | +$else$ |
| 61 | + ( name: [$author$], |
| 62 | + affiliation: "", |
| 63 | + email: "" ), |
| 64 | +$endif$ |
| 65 | +$endfor$ |
| 66 | + ), |
| 67 | +$endif$ |
| 68 | +$if(keywords)$ |
| 69 | + keywords: ($for(keywords)$$keyword$$sep$,$endfor$), |
| 70 | +$endif$ |
| 71 | +$if(date)$ |
| 72 | + date: [$date$], |
| 73 | +$endif$ |
| 74 | +$if(lang)$ |
| 75 | + lang: "$lang$", |
| 76 | +$endif$ |
| 77 | +$if(region)$ |
| 78 | + region: "$region$", |
| 79 | +$endif$ |
| 80 | +$if(abstract)$ |
| 81 | + abstract: [$abstract$], |
| 82 | +$endif$ |
| 83 | +$if(margin)$ |
| 84 | + margin: ($for(margin/pairs)$$margin.key$: $margin.value$,$endfor$), |
| 85 | +$endif$ |
| 86 | +$if(papersize)$ |
| 87 | + paper: "$papersize$", |
| 88 | +$endif$ |
| 89 | +$if(mainfont)$ |
| 90 | + font: ("$mainfont$",), |
| 91 | +$endif$ |
| 92 | +$if(fontsize)$ |
| 93 | + fontsize: $fontsize$, |
| 94 | +$endif$ |
| 95 | +$if(section-numbering)$ |
| 96 | + sectionnumbering: "$section-numbering$", |
| 97 | +$endif$ |
| 98 | + pagenumbering: $if(page-numbering)$"$page-numbering$"$else$none$endif$, |
| 99 | + cols: $if(columns)$$columns$$else$1$endif$, |
| 100 | + doc, |
| 101 | +) |
| 102 | + |
| 103 | +$for(include-before)$ |
| 104 | +$include-before$ |
| 105 | + |
| 106 | +$endfor$ |
| 107 | +$if(toc)$ |
| 108 | +#outline( |
| 109 | + title: auto, |
| 110 | + depth: $toc-depth$ |
| 111 | +); |
| 112 | +$endif$ |
| 113 | + |
| 114 | +$body$ |
| 115 | + |
| 116 | +$if(citations)$ |
| 117 | +$if(csl)$ |
| 118 | + |
| 119 | +#set bibliography(style: "$csl$") |
| 120 | +$elseif(bibliographystyle)$ |
| 121 | + |
| 122 | +#set bibliography(style: "$bibliographystyle$") |
| 123 | +$endif$ |
| 124 | +$if(bibliography)$ |
| 125 | + |
| 126 | +#bibliography($for(bibliography)$"$bibliography$"$sep$,$endfor$) |
| 127 | +$endif$ |
| 128 | +$endif$ |
| 129 | +$for(include-after)$ |
| 130 | + |
| 131 | +$include-after$ |
| 132 | +$endfor$ |
0 commit comments