[Tex/LaTex] Using ntheorem with beamer

beamerntheorem

I am trying to prepare a mathematical presentation using LaTeX's beamer class. Since I already have an article on the subject, I want to copy various parts of it into the presentation, in particular various ntheorem-environments. But even in the MWE below, this seems not possible. Is there some incompatibility between ntheorem and the beamer class?

\documentclass{beamer}

\usepackage{ntheorem}

\theoremstyle{plain}

\newtheorem{Def}{Definition}

\mode<presentation>{\usetheme{Frankfurt}}

\begin{document}
\begin{frame}{Test}
    \begin{Def}
        blabla
    \end{Def}
\end{frame}


\end{document}

Best Answer

Your example brings the error:

! Package ntheorem Error: Theorem style plain already defined.

Explanation: beamer provides a theorem environment, just as ntheorem, and they provide a style with the same name plain. The name colission causes that error.

You can undefine the plain style before loading ntheorem and the error goes away:

\documentclass{beamer}
\makeatletter
\let\th@plain\relax
\makeatother
\usepackage{ntheorem}
\theoremstyle{plain}