summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2024-01-22 22:08:03 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2024-01-22 22:09:01 -0800
commit3e54d3a45d4260e6a7c993ebaab9cca418661538 (patch)
treeb91e5b7361675a16a259bf7900c59bf3ca85d507
parent57774d79e86c8645b5f8252c8be8554f1c412a24 (diff)
Use reference form (e.g. `@jones2000[p. 30]`) for citations.
Previously we were using `#cite` and trying to put the supplement in brackets; but a bracketed supplement only works with the reference form.
-rw-r--r--src/Text/Pandoc/Writers/Typst.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Typst.hs b/src/Text/Pandoc/Writers/Typst.hs
index 5847f411e..afcff1419 100644
--- a/src/Text/Pandoc/Writers/Typst.hs
+++ b/src/Text/Pandoc/Writers/Typst.hs
@@ -273,7 +273,7 @@ inlineToTypst inline =
suppl <- case citationSuffix cite of
[] -> pure mempty
suff -> brackets <$> inlinesToTypst suff
- pure $ "#cite" <> parens (toLabel (citationId cite)) <> suppl
+ pure $ literal ("@" <> citationId cite) <> suppl
<> endCode
if isEnabled Ext_citations opts
-- Note: this loses prefix