git.iko.soy/typeable/pandoc
on master help sign in
Revert "LaTeX writer: Add keepaspectratio to includegraphics..."
b2a1905John MacFarlane
src/Text/Pandoc/Writers/LaTeX.hs+1−6
@@ -1125,12 +1125,7 @@ inlineToLaTeX (Image attr _ (source, _)) = do
1125 [d <> text (show dim)]
1125 [d <> text (show dim)]
1126 Nothing ->
1126 Nothing ->
1127 []
1127 []
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
1134 dims = if null dimList
1129 dims = if null dimList
1135 then empty
1130 then empty
1136 else brackets $ cat (intersperse "," dimList)
1131 else brackets $ cat (intersperse "," dimList)
test/command/3450.md+1−1
@@ -8,5 +8,5 @@
8% pandoc -fmarkdown-implicit_figures -t latex
8% pandoc -fmarkdown-implicit_figures -t latex
9![image](lalune.jpg){height=2em}
9![image](lalune.jpg){height=2em}
10^D
10^D
11−\includegraphics[height=2em,keepaspectratio]{lalune.jpg}
11+\includegraphics[height=2em]{lalune.jpg}
12```
12```