aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2024-10-29 14:49:06 -0700
committerJohn MacFarlane <[email protected]>2024-10-29 14:49:06 -0700
commit39b87d4d281394b842d725a125266319961ed1d4 (patch)
tree2a8c34d3a93aa0e4c9587e6e76e89fce50da959d
parente01023c1f4b37fe9a7c8304462f7603f65019c01 (diff)
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.
-rw-r--r--data/templates/template.typst2
-rw-r--r--test/writer.typst19
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],