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.
This commit is contained in:
John MacFarlane 2018-02-21 17:17:11 -08:00
parent 00d20ccd09
commit 0690df507b

View file

@ -1122,7 +1122,11 @@ inlineToLaTeX (Image attr _ (source, _)) = do
Just (Pixel a) -> Just (Pixel a) ->
[d <> text (showInInch opts (Pixel a)) <> "in"] [d <> text (showInInch opts (Pixel a)) <> "in"]
Just (Percent a) -> Just (Percent a) ->
[d <> text (showFl (a / 100)) <> "\\textwidth"] [d <> text (showFl (a / 100)) <>
case dir of
Width -> "\\textwidth"
Height -> "\\textheight"
]
Just dim -> Just dim ->
[d <> text (show dim)] [d <> text (show dim)]
Nothing -> Nothing ->