From dc4bcd23cc323072dfd07a396cfaae2d69941f68 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 17 Mar 2026 09:58:29 +0100 Subject: [PATCH] typst template: put title block in a conditional. This avoids an empty block for documents that lack metadata information. The empty block causes problems if `#set page` is used, as it will cause a page break. Closes #11529. --- data/templates/template.typst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/data/templates/template.typst b/data/templates/template.typst index dd34ae096..ad3ef956e 100644 --- a/data/templates/template.typst +++ b/data/templates/template.typst @@ -73,6 +73,9 @@ } } +#let has-title-block = title != none or (authors != none and authors != ()) or + date != none or abstract != none +#if has-title-block { place(top, float: true, scope: "parent", clearance: 4mm, block(below: 1em, width: 100%)[ #if title != none { align(center, block[ @@ -114,6 +117,6 @@ ] } ]) - +} doc }