LaTeX reader: don't apply theorem default styling to a figure inside.
If we put an image in italics, then when rendering to Markdown we no longer get an implicit figure. Closes #6925.
This commit is contained in:
parent
6f35600204
commit
ddb76cb356
2 changed files with 35 additions and 0 deletions
|
@ -1812,6 +1812,7 @@ theoremEnvironment name = do
|
|||
_ -> bs
|
||||
|
||||
italicize :: Block -> Block
|
||||
italicize x@(Para [Image{}]) = x -- see #6925
|
||||
italicize (Para ils) = Para [Emph ils]
|
||||
italicize (Plain ils) = Plain [Emph ils]
|
||||
italicize x = x
|
||||
|
|
34
test/command/6925.md
Normal file
34
test/command/6925.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
```
|
||||
% pandoc -f latex -t markdown
|
||||
\documentclass{amsart}
|
||||
\newtheorem{thm}{Theorem}[section]
|
||||
\theoremstyle{definition}
|
||||
\newtheorem{thm2}[section]{Theorem}
|
||||
\begin{document}
|
||||
\begin{thm}
|
||||
a
|
||||
\begin{figure}
|
||||
\includegraphics[]{1.png}
|
||||
\end{figure}
|
||||
\end{thm}
|
||||
|
||||
\begin{thm2}
|
||||
a
|
||||
\begin{figure}
|
||||
\includegraphics[]{1.png}
|
||||
\end{figure}
|
||||
\end{thm2}
|
||||
\end{document}
|
||||
^D
|
||||
::: {.thm}
|
||||
**Theorem 1**. *a*
|
||||
|
||||
![image](1.png)
|
||||
:::
|
||||
|
||||
::: {.thm2}
|
||||
**Theorem 1**. a
|
||||
|
||||
![image](1.png)
|
||||
:::
|
||||
```
|
Loading…
Add table
Reference in a new issue