8

I am trying to get a math beamer presentation to work and it seems that cleveref is causing problems. The MWE below gives the error

Paragraph ended before \@ynthm was complete

In the documentation of cleveref, one finds the following remark:

The beamer document class rededefines the \label command in a particularly devious way that breaks cleveref's optional argument to that command.

What optional argument? Does that mean that cleveref and beamer are simply incompatible? Is there any way around that problem?

MWE:

\documentclass{beamer}

\makeatletter
\let\th@plain\relax
\makeatother

\usepackage{ntheorem}
\usepackage{cleveref}

\theoremstyle{plain}

\newtheorem{MainThm}{Main Theorem}

\crefname{MainThm}{Main Theorem}{Main Theorems}

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

\begin{document}
\begin{frame}{Test}
    \begin{MainThm}
        blabla
    \end{MainThm}
\end{frame}
\end{document}
Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
Meneldur
  • 953
  • 5
    You do know that you shouldn't be using cross-references in a presentation in any case? – Joseph Wright Mar 24 '14 at 13:46
  • 3
  • Born to be wild. ;P
  • It is very useful to have that feature, if one can include LaTeX code from other documents like articles into the presentation without having to modify it.
  • It very useful to have that feature, if the document is supposed to be complied to multiple output formats.
  • – Meneldur Mar 24 '14 at 14:54