Estou tentando fazer uma apresentação matemática funcionar e parece que isso cleveref
está causando problemas. O MWE abaixo dá o erro
Paragraph ended before \@ynthm was complete
Na documentação de cleveref
, encontra-se a seguinte observação:
A
beamer
classe document redefine o\label
comando de uma maneira particularmente tortuosa que quebracleveref
o argumento opcional do comando.
Que argumento opcional? Isso significa isso cleveref
e beamer
são simplesmente incompatíveis? Existe alguma maneira de contornar esse problema?
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}
Responder1
cleveref
redefinido \label
para agora receber um argumento opcional que substitui ocleveref
tipo. No entanto, se você não usar esse argumento opcional, tudo bem.
Alterne a ordem de carregamento entre cleveref
entheorem
.
\documentclass{beamer}
\let\Tiny\tiny% http://tex.stackexchange.com/q/58087/5764
\makeatletter
\let\th@plain\relax
\makeatother
\usepackage{cleveref}
\usepackage{ntheorem}
\theoremstyle{plain}
\newtheorem{MainThm}{Main Theorem}
\crefname{MainThm}{Main Theorem}{Main Theorems}
\mode<presentation>{\usetheme{Frankfurt}}
\begin{document}
\begin{frame}{Test}
See~\cref{thm:mytheorem}.
\begin{MainThm}\label{thm:mytheorem}
blabla
\end{MainThm}
\end{frame}
\end{document}