From b0013bfb13494648886e50840ccdd850c95c9d19 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 2 Sep 2016 11:44:20 +0200 Subject: PDF: Don't crash with nonexistent image. Instead, emit the alt text, emphasized. This accords with what the ODT writer currently does. The user will still get a warning about a nonexistent image, but will no longer get a LaTeX crash. Closes #3100. --- src/Text/Pandoc/PDF.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs index 4dbe1f000..534bc06bd 100644 --- a/src/Text/Pandoc/PDF.hs +++ b/src/Text/Pandoc/PDF.hs @@ -131,7 +131,8 @@ handleImage' opts tmpdir (Image attr ils (src,tit)) = do return $ Image attr ils (fname,tit) _ -> do warn $ "Could not find image `" ++ src ++ "', skipping..." - return $ Image attr ils (src,tit) + -- return alt text + return $ Emph ils handleImage' _ _ x = return x convertImages :: FilePath -> Inline -> IO Inline -- cgit v1.2.3