mirror of
https://github.com/jgm/pandoc.git
synced 2026-07-18 07:17:02 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user