Document ClassesTheorems counters with beamer

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
eoa
Posts: 7
Joined: Sat Oct 10, 2009 9:09 pm

Theorems counters with beamer

Post by eoa »

Hi. I hope this is not an unnecessary post (again), in that, though I did search for related topics, I hope I didn't commit another silly error. Anyhow, here's my MWE:

Code: Select all

\documentclass{beamer}

\usepackage{beamerthemesplit}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}

\newtheorem{lem}{Lemma}[section]
\newtheorem{thm}[lem]{Theorem}
\newtheorem{exm}[lem]{Example}

\begin{document}

\frame
{
	\begin{itemize}
	\item<1->	\begin{lem}
						Let $A = (a_{ij}) \in M_{n}$ and suppose $A \geq O.$ If the row sums of $A$ are all greater than zero (that is, $\sum\limits_{j = 1}^{n} a_{ij} > 0$ for all $i = 1,2,\ldots,n$), then $\rho(A) > 0,$ and in particular, we have that $\rho(A) > 0$ if $A > O$ or $A$ is non-negative and irreducible.
						\end{lem}
	
	\end{itemize}
}

\end{document}
My question is: why aren't the Lemma numbers appearing? I think it might be because I have [section] in

Code: Select all

\newtheorem{lem}{Lemma}[section]
, but don't actually define a new section. However, I changed that, and still no luck. Also, I don't want it numbered according to sections, I want it numbered from 1, 2, 3.... Actually, I thought this was default.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Theorems counters with beamer

Post by Stefan Kottwitz »

Hi,

use

Code: Select all

\setbeamertemplate{theorems}[numbered]
Stefan
LaTeX.org admin
eoa
Posts: 7
Joined: Sat Oct 10, 2009 9:09 pm

Re: Theorems counters with beamer

Post by eoa »

Thanks for that Stefan_K. And for the speedy reply. ;)
Post Reply