diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2024-03-17 11:39:32 -0700 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2024-03-17 11:39:32 -0700 |
| commit | 2c5d66cb5cecaec273c3575a1a45b9683f7d924b (patch) | |
| tree | 7b1c50188bfc38ddbbd3d6bf645a1e27d6e85ba6 /src | |
| parent | a6392207fc560fff2d136132ecd6219b7e5f6bfd (diff) | |
Typst writer: use `kind: image` for image figures.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Writers/Typst.hs | 10 |
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) -> |
