summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/Typst.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/Typst.hs b/src/Text/Pandoc/Writers/Typst.hs
index 9f3c9a0bf..09bc65e8c 100644
--- a/src/Text/Pandoc/Writers/Typst.hs
+++ b/src/Text/Pandoc/Writers/Typst.hs
@@ -201,14 +201,16 @@ blockToTypst block =
_ -> brackets <$> blocksToTypst blocks
let lab = toLabel FreestandingLabel ident
let kind = case blocks of
- Table{}:_ -> "table"
- CodeBlock{}:_ -> "code"
- _ -> "auto"
+ Table{}:_ -> "kind: table"
+ CodeBlock{}:_ -> "kind: code"
+ Para [Image{}]:_ -> "kind: image"
+ Plain [Image{}]:_ -> "kind: image"
+ _ -> mempty
return $ "#figure(" <> nest 2 ((contents <> ",")
$$
("caption: [" $$ nest 2 caption $$ "],")
$$
- "kind: " <> literal kind
+ kind
)
$$ ")" $$ lab $$ blankline
Div (ident,_,_) (Header lev ("",cls,kvs) ils:rest) ->