summaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2024-03-17 15:45:23 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2024-03-17 15:46:17 -0700
commit660823e2ecd8893a6fe60a362b49bfe281e79e06 (patch)
tree0d5c1d70bd33fe7740e3ef1561947dabdb06cf81 /src/Text
parent2c5d66cb5cecaec273c3575a1a45b9683f7d924b (diff)
Typst writer: only use explicit figure 'kind' for tables.
The rest of the time the autodetection should work fine.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/Typst.hs10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/Text/Pandoc/Writers/Typst.hs b/src/Text/Pandoc/Writers/Typst.hs
index 09bc65e8c..7d061ed05 100644
--- a/src/Text/Pandoc/Writers/Typst.hs
+++ b/src/Text/Pandoc/Writers/Typst.hs
@@ -200,17 +200,9 @@ blockToTypst block =
-> pure $ mkImage False src kvs
_ -> brackets <$> blocksToTypst blocks
let lab = toLabel FreestandingLabel ident
- let kind = case blocks of
- 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
+ ("caption: [" $$ nest 2 caption $$ "]")
)
$$ ")" $$ lab $$ blankline
Div (ident,_,_) (Header lev ("",cls,kvs) ils:rest) ->