0

I'm trying to place a figure inside a theorem. However, in the following example, the "test" text is rendered under the figure, and not above as it should be. What can I do to fix that? Minimum working example :

\documentclass[a4paper,12pt]{article}

\usepackage[francais]{babel}
\usepackage{graphicx}
\newtheorem{exercice}{Exercice}

\begin{document}
\begin{exercice}
Test
\begin{figure}
    \includegraphics[width=\linewidth]{F2.pdf}
\end{figure}
\end{exercice}
\end{document}
pie3636
  • 111

1 Answers1

1

I simply removed the figure environment, since it wasn't necessary. Here's the working code :

\documentclass[a4paper,12pt]{article}

\usepackage[francais]{babel}
\usepackage{graphicx}
\newtheorem{exercice}{Exercice}

\begin{document}
\begin{exercice}
Test
\includegraphics[width=\linewidth]{F2.pdf}
\end{exercice}
\end{document}
Sigur
  • 37,330
pie3636
  • 111