From 0690df507b5482acb37e67101162189ab0188f21 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 21 Feb 2018 17:17:11 -0800 Subject: LaTeX writer: Fix image height with percentage. This previously caused the image to be resized to a percentage of textwidth, rather than textheight. Closes #4389. --- src/Text/Pandoc/Writers/LaTeX.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index fa72f0f1a..ca59e451b 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -1122,7 +1122,11 @@ inlineToLaTeX (Image attr _ (source, _)) = do Just (Pixel a) -> [d <> text (showInInch opts (Pixel a)) <> "in"] Just (Percent a) -> - [d <> text (showFl (a / 100)) <> "\\textwidth"] + [d <> text (showFl (a / 100)) <> + case dir of + Width -> "\\textwidth" + Height -> "\\textheight" + ] Just dim -> [d <> text (show dim)] Nothing -> -- cgit v1.2.3