aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authormb21 <mb21@users.noreply.github.com>2020-12-12 14:12:39 +0100
committermb21 <mb21@users.noreply.github.com>2020-12-12 14:49:11 +0100
commit208cb9619632ee9490b75158e44213ee6d4ab93e (patch)
treeb4b5cc63b98f26b8724e4988734c61c024756466 /src/Text/Pandoc
parentfcd065818901e57f01aca4c919f6102f9a047ba0 (diff)
downloadpandoc-208cb9619632ee9490b75158e44213ee6d4ab93e.tar.gz
ICML writer: fix image bounding box for custom widths/heights
fixes #6936
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/ICML.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/ICML.hs b/src/Text/Pandoc/Writers/ICML.hs
index dcf5acfef..c254fbc58 100644
--- a/src/Text/Pandoc/Writers/ICML.hs
+++ b/src/Text/Pandoc/Writers/ICML.hs
@@ -621,7 +621,12 @@ imageICML opts style attr (src, _) = do
image = inTags True "Image"
[("Self","ue6"), ("ItemTransform", scale<>" -"<>hw<>" -"<>hh)]
$ vcat [
- inTags True "Properties" [] $ inTags True "Profile" [("type","string")] $ text "$ID/Embedded"
+ inTags True "Properties" [] $ vcat [
+ inTags True "Profile" [("type","string")] $ text "$ID/Embedded"
+ , selfClosingTag "GraphicBounds" [("Left","0"), ("Top","0")
+ , ("Right", showFl $ ow*ow / imgWidth)
+ , ("Bottom", showFl $ oh*oh / imgHeight)]
+ ]
, selfClosingTag "Link" [("Self", "ueb"), ("LinkResourceURI", src')]
]
doc = inTags True "CharacterStyleRange" attrs