aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorMickaël Canouil <[email protected]>2024-05-12 18:39:27 +0200
committerGitHub <[email protected]>2024-05-12 09:39:27 -0700
commitfef5f2d94cdd1901075b9ba83ba7189601c7f7cd (patch)
tree215ee146103e329fe75b162e59ffc421d5a429b8 /data
parent12de77958fc4bb97707f63cb9d9194f3b050a6f6 (diff)
Add subtitle to Typst template (#9747)
Diffstat (limited to 'data')
-rw-r--r--data/templates/default.typst3
-rw-r--r--data/templates/template.typst5
2 files changed, 8 insertions, 0 deletions
diff --git a/data/templates/default.typst b/data/templates/default.typst
index ee4b8212f..37e8a6247 100644
--- a/data/templates/default.typst
+++ b/data/templates/default.typst
@@ -24,6 +24,9 @@ $endif$
$if(title)$
title: [$title$],
$endif$
+$if(subtitle)$
+ subtitle: [$subtitle$],
+$endif$
$if(author)$
authors: (
$for(author)$
diff --git a/data/templates/template.typst b/data/templates/template.typst
index e1ac3ec37..8672647be 100644
--- a/data/templates/template.typst
+++ b/data/templates/template.typst
@@ -1,5 +1,6 @@
#let conf(
title: none,
+ subtitle: none,
authors: (),
keywords: (),
date: none,
@@ -34,6 +35,10 @@
if title != none {
align(center)[#block(inset: 2em)[
#text(weight: "bold", size: 1.5em)[#title]
+ #(if subtitle != none {
+ parbreak()
+ text(weight: "bold", size: 1.25em)[#subtitle]
+ })
]]
}