@@ -1125,7 +1125,12 @@ inlineToLaTeX (Image attr _ (source, _)) = do
11251125 [d <> text (show dim)]
11261126 Nothing ->
11271127 []
1128− dimList = showDim Width ++ showDim Height
1128+ -- if we just have a width or a height, we add keepaspectratio:
1129+ keepaspectratio = case (dimension Height attr, dimension Width attr) of
1130+ (Nothing, Just _) -> ["keepaspectratio"]
1131+ (Just _, Nothing) -> ["keepaspectratio"]
1132+ _ -> []
1133+ dimList = showDim Width ++ showDim Height ++ keepaspectratio
11291134 dims = if null dimList
11301135 then empty
11311136 else brackets $ cat (intersperse "," dimList)