summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/templates/default.typst2
-rw-r--r--src/Text/Pandoc/Writers/Typst.hs3
2 files changed, 5 insertions, 0 deletions
diff --git a/data/templates/default.typst b/data/templates/default.typst
index c04b5e40f..94a9c88fb 100644
--- a/data/templates/default.typst
+++ b/data/templates/default.typst
@@ -92,6 +92,7 @@ $if(notes)$
$notes$
]
$endif$
+$if(citations)$
$if(bibliographystyle)$
#set bibliography(style: "$bibliographystyle$")
@@ -100,6 +101,7 @@ $for(bibliography)$
#bibliography("$bibliography$")
$endfor$
+$endif$
$for(include-after)$
$include-after$
diff --git a/src/Text/Pandoc/Writers/Typst.hs b/src/Text/Pandoc/Writers/Typst.hs
index b290506a8..a3267f911 100644
--- a/src/Text/Pandoc/Writers/Typst.hs
+++ b/src/Text/Pandoc/Writers/Typst.hs
@@ -78,6 +78,9 @@ pandocToTypst options (Pandoc meta blocks) = do
let context = defField "body" main
$ defField "notes" notes
$ defField "toc" (writerTableOfContents options)
+ $ (if isEnabled Ext_citations options
+ then defField "citations" True
+ else id)
$ (case lookupMetaString "lang" meta of
"" -> id
lang ->