From 13d74ba0dfc20b619c436047a3770bf40d6325b7 Mon Sep 17 00:00:00 2001 From: Luis Rivera <12088563+jarnowic@users.noreply.github.com> Date: Fri, 18 Oct 2024 20:17:18 -0600 Subject: [PATCH] Update template.typst for typst 0.12 styling --- data/templates/template.typst | 40 ++++++++++++++++------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/data/templates/template.typst b/data/templates/template.typst index 4394c5d3da97..b9884c422868 100644 --- a/data/templates/template.typst +++ b/data/templates/template.typst @@ -43,44 +43,40 @@ size: fontsize) set heading(numbering: sectionnumbering) - if title != none { - place(top + center, float: true, scope: "parent")[ - #text(weight: "bold", size: 1.5em)[#title] - #(if subtitle != none { + place(top + center, float: true, scope: "parent", clearance: 4mm)[ + #if title != none { + text(weight: "bold", size: 1.5em)[#title] + (if subtitle != none { parbreak() text(weight: "bold", size: 1.25em)[#subtitle] }) - ] } - if authors != none and authors != [] { + #if authors != none and authors != [] { let count = authors.len() let ncols = calc.min(count, 3) - place(top + center, float: true, scope: "parent")[ - #grid( - columns: (1fr,) * ncols, - row-gutter: 1.5em, - ..authors.map(author => + grid( + columns: (1fr,) * ncols, + row-gutter: 1.5em, + ..authors.map(author => align(center)[ #author.name \ #author.affiliation \ #author.email ] - ) - ) - ] + ) + ) } - if date != none { - place(top + center, float: true, scope: "parent")[ - #date - ] + #if date != none { + date } - if abstract != none { - place(top + center, float: true, scope: "parent")[ - #text(weight: "semibold")[Abstract] #h(1em) #abstract - ] + #if abstract != none { + text(weight: "semibold")[Abstract] + h(1em) + abstract } +] doc }