diff options
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/Docx.hs | 3 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/ICML.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/ODT.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/RTF.hs | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 56aa29211..1c19c9fa6 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -1184,7 +1184,7 @@ inlineToOpenXML' opts (Image attr alt (src, title)) = do Right (img, mt) -> do ident <- ("rId"++) `fmap` ((lift . lift) getUniqueId) let (xpt,ypt) = desiredSizeInPoints opts attr - (either (const def) id (imageSize img)) + (either (const def) id (imageSize opts img)) -- 12700 emu = 1 pt let (xemu,yemu) = fitToPage (xpt * 12700, ypt * 12700) (pageWidth * 12700) let cNvPicPr = mknode "pic:cNvPicPr" [] $ @@ -1228,6 +1228,7 @@ inlineToOpenXML' opts (Image attr alt (src, title)) = do Just Gif -> ".gif" Just Pdf -> ".pdf" Just Eps -> ".eps" + Just Svg -> ".svg" Nothing -> "" if null imgext then -- without an extension there is no rule for content type diff --git a/src/Text/Pandoc/Writers/ICML.hs b/src/Text/Pandoc/Writers/ICML.hs index efec17d26..3b7d3c4da 100644 --- a/src/Text/Pandoc/Writers/ICML.hs +++ b/src/Text/Pandoc/Writers/ICML.hs @@ -546,7 +546,7 @@ imageICML opts style attr (src, _) = do report $ CouldNotFetchResource src "" return def Right (img, _) -> do - case imageSize img of + case imageSize opts img of Right size -> return size Left msg -> do report $ CouldNotDetermineImageSize src msg diff --git a/src/Text/Pandoc/Writers/ODT.hs b/src/Text/Pandoc/Writers/ODT.hs index ee5fa4c24..61bb63d9b 100644 --- a/src/Text/Pandoc/Writers/ODT.hs +++ b/src/Text/Pandoc/Writers/ODT.hs @@ -153,7 +153,7 @@ transformPicMath opts (Image attr@(id', cls, _) lab (src,t)) = do report $ CouldNotFetchResource src "" return $ Emph lab Right (img, mbMimeType) -> do - (ptX, ptY) <- case imageSize img of + (ptX, ptY) <- case imageSize opts img of Right s -> return $ sizeInPoints s Left msg -> do report $ CouldNotDetermineImageSize src msg diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs index ef012e58e..5172a0ddd 100644 --- a/src/Text/Pandoc/Writers/RTF.hs +++ b/src/Text/Pandoc/Writers/RTF.hs @@ -63,7 +63,7 @@ rtfEmbedImage opts x@(Image attr _ (src,_)) = do "image/jpeg" -> return "\\jpegblip" "image/png" -> return "\\pngblip" _ -> throwError $ PandocSomeError "Unknown file type" - sizeSpec <- case imageSize imgdata of + sizeSpec <- case imageSize opts imgdata of Left msg -> do report $ CouldNotDetermineImageSize src msg return "" |