Estoy intentando que funcione una presentación de proyector matemático y parece que eso cleveref
está causando problemas. El MWE a continuación da el error
Paragraph ended before \@ynthm was complete
En la documentación de cleveref
, se encuentra la siguiente observación:
La
beamer
clase de documento redefine el\label
comando de una manera particularmente tortuosa que rompecleveref
el argumento opcional de ese comando.
¿Qué argumento opcional? ¿Eso significa eso cleveref
y beamer
son simplemente incompatibles? ¿Hay alguna forma de solucionar ese 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}
Respuesta1
cleveref
redefinido \label
para ahora tomar un argumento opcional que anula elcleveref
tipo. Sin embargo, si no utiliza este argumento opcional, entonces está bien.
Cambiar el orden de carga entre cleveref
yntheorem
.
\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}