diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-02-21 17:17:11 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-02-21 17:18:06 -0800 |
commit | 0690df507b5482acb37e67101162189ab0188f21 (patch) | |
tree | 6392cd696f26a89d061ed28fd801835f69ca66d8 /src/Text/Pandoc/Writers | |
parent | 00d20ccd09a8542fda631ab16c7f569098f2918d (diff) | |
download | pandoc-0690df507b5482acb37e67101162189ab0188f21.tar.gz |
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.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 6 |
1 files changed, 5 insertions, 1 deletions
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 -> |