git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: don't apply theorem default styling to a figure inside.
ddb76cbJohn MacFarlane
src/Text/Pandoc/Readers/LaTeX.hs+1
@@ -1812,6 +1812,7 @@ theoremEnvironment name = do
1812 _ -> bs
1812 _ -> bs
1813
1813
1814italicize :: Block -> Block
1814italicize :: Block -> Block
1815+italicize x@(Para [Image{}]) = x -- see #6925
1815italicize (Para ils) = Para [Emph ils]
1816italicize (Para ils) = Para [Emph ils]
1816italicize (Plain ils) = Plain [Emph ils]
1817italicize (Plain ils) = Plain [Emph ils]
1817italicize x = x
1818italicize x = x
test/command/6925.mdnew file+34
@@ -0,0 +1,34 @@
1+```
2+% pandoc -f latex -t markdown
3+\documentclass{amsart}
4+\newtheorem{thm}{Theorem}[section]
5+\theoremstyle{definition}
6+\newtheorem{thm2}[section]{Theorem}
7+\begin{document}
8+\begin{thm}
9+a
10+\begin{figure}
11+\includegraphics[]{1.png}
12+\end{figure}
13+\end{thm}
14+
15+\begin{thm2}
16+a
17+\begin{figure}
18+\includegraphics[]{1.png}
19+\end{figure}
20+\end{thm2}
21+\end{document}
22+^D
23+::: {.thm}
24+**Theorem 1**. *a*
25+
26+![image](1.png)
27+:::
28+
29+::: {.thm2}
30+**Theorem 1**. a
31+
32+![image](1.png)
33+:::
34+```