git.iko.soy/typeable/pandoc
on master help sign in
Revert "LaTeX writer: Add keepaspectratio to includegraphics..."

This reverts commit 171187a4527497701b3c77bd56cea2d770d4e3b0.

commitb2a190546d9f8bbc853b5e65539093275252e0ef authorJohn MacFarlane <jgm@berkeley.edu> dateFri 1 Dec 2017, 13:51 (9 years ago) parent3f1f953
2 files changed+2−7
src/Text/Pandoc/Writers/LaTeX.hs+1−6 test/command/3450.md+1−1
src/Text/Pandoc/Writers/LaTeX.hs+1−6
@@ -1125,12 +1125,7 @@ inlineToLaTeX (Image attr _ (source, _)) = do
11251125 [d <> text (show dim)]
11261126 Nothing ->
11271127 []
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
1128+ dimList = showDim Width ++ showDim Height
11341129 dims = if null dimList
11351130 then empty
11361131 else brackets $ cat (intersperse "," dimList)
test/command/3450.md+1−1
@@ -8,5 +8,5 @@
88% pandoc -fmarkdown-implicit_figures -t latex
99![image](lalune.jpg){height=2em}
1010^D
11−\includegraphics[height=2em,keepaspectratio]{lalune.jpg}
11+\includegraphics[height=2em]{lalune.jpg}
1212```