Skip to content

Commit

Permalink
Adjust test suite for typst template changes.
Browse files Browse the repository at this point in the history
Note: the new templates presuppose typst 0.12; if you try to
use an earlier version of typst, an error will be raised.
  • Loading branch information
jgm committed Oct 29, 2024
1 parent e01023c commit 39b87d4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion data/templates/template.typst
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,5 @@
}
]

doc
doc
}
19 changes: 9 additions & 10 deletions test/writer.typst
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,17 @@
paper: paper,
margin: margin,
numbering: "1",
)
columns: cols,
)
set par(justify: true)
set text(lang: lang,
region: region,
font: font,
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 {
Expand All @@ -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(
Expand All @@ -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],
Expand Down

0 comments on commit 39b87d4

Please sign in to comment.