diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-12-12 08:28:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-12 08:28:14 -0800 |
commit | 3a7d97f02fbad0c7dbe6428535c7e8e9a6d0df12 (patch) | |
tree | d9e098dc5264f1c4fc6cc2ad2956926b82f6c761 /src | |
parent | ccd235e31ff00c4741ba52552ba58669f700bbdc (diff) | |
parent | 208cb9619632ee9490b75158e44213ee6d4ab93e (diff) | |
download | pandoc-3a7d97f02fbad0c7dbe6428535c7e8e9a6d0df12.tar.gz |
Merge pull request #6946 from mb21/icml-image-fit
ICML writer: fix image bounding box for custom widths/heights
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/ICML.hs | 7 |
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 |