# Number theorems on beamer in Spanish

I'm not sure if I could ask this question here, but I have to do a presentation and I want to number theorems by sections and subsections.

I have to do this in Spanish and so far, the only way I could change "Theorem" for "Teorema" is using \newtheorem... but that way the theorems don't get numbered properly. The theorems get assigned a number and doesn't matter which section or subsection they are part of.

Is there a way I could do this?

• Welcome to TeX SX! You should take a look at the ntheorem package. – Bernard Jul 26 '17 at 19:30

Beamer can do all this for you:

• to number the theorem \setbeamertemplate{theorems}[numbered]
• to number them with the section, use the class option envcountsect
• to translate the theorem name use the class option spanish together with the babel package.

\documentclass[envcountsect,spanish]{beamer}

\usepackage{babel}
\setbeamertemplate{theorems}[numbered]

\begin{document}

\section{sec}

\begin{frame}
\begin{theorem}
text
\end{theorem}
\end{frame}

\end{document}