From 39b87d4d281394b842d725a125266319961ed1d4 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 29 Oct 2024 14:49:06 -0700 Subject: [PATCH] Adjust test suite for typst template changes. Note: the new templates presuppose typst 0.12; if you try to use an earlier version of typst, an error will be raised. --- data/templates/template.typst | 2 +- test/writer.typst | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/data/templates/template.typst b/data/templates/template.typst index f29ef409a..27e133f78 100644 --- a/data/templates/template.typst +++ b/data/templates/template.typst @@ -84,5 +84,5 @@ } ] -doc + doc } diff --git a/test/writer.typst b/test/writer.typst index 70298b2ed..c15d7e844 100644 --- a/test/writer.typst +++ b/test/writer.typst @@ -65,7 +65,8 @@ paper: paper, margin: margin, numbering: "1", - ) + columns: cols, + ) set par(justify: true) set text(lang: lang, region: region, @@ -73,7 +74,8 @@ size: fontsize) set heading(numbering: sectionnumbering) - if title != none { + place(top, float: true, scope: "parent", clearance: 4mm)[ + #if title != none { align(center)[#block(inset: 2em)[ #text(weight: "bold", size: 1.5em)[#title] #(if subtitle != none { @@ -83,7 +85,7 @@ ]] } - if authors != none and authors != [] { + #if authors != none and authors != [] { let count = authors.len() let ncols = calc.min(count, 3) grid( @@ -99,23 +101,20 @@ ) } - if date != none { + #if date != none { align(center)[#block(inset: 1em)[ #date ]] } - if abstract != none { + #if abstract != none { block(inset: 2em)[ #text(weight: "semibold")[Abstract] #h(1em) #abstract ] } + ] - if cols == 1 { - doc - } else { - columns(cols, doc) - } + doc } #show: doc => conf( title: [Pandoc Test Suite],