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.
This commit is contained in:
John MacFarlane
2026-03-17 09:58:29 +01:00
parent 1cc6fec234
commit dc4bcd23cc
+4 -1
View File
@@ -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
}