Whenever I try to number my theorems according to the section they are in, they all end up having the same number. I tried the other numbering schemes to see what they do, and the only one that gives different numbers is when I point back to the theorem before it.
Here is my code for all three numbering schemes:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\begin{document}
\section{numbered by section}
\theoremstyle{plain}\newtheorem{fst}{Theorem}[section]
\begin{fst}\end{fst}
\theoremstyle{plain}\newtheorem{snd}{Theorem}[section]
\begin{snd}\end{snd}
\section{counted}
\theoremstyle{plain}\newtheorem{athm}{Theorem}
\begin{athm}\end{athm}
\theoremstyle{plain}\newtheorem{bthm}{Theorem}
\begin{bthm}\end{bthm}
\section{numbered by name of first theorem}
\theoremstyle{plain}\newtheorem{thma}{Theorem}[section]
\begin{thma}\end{thma}
\theoremstyle{plain}\newtheorem{thmb}[thma]{Theorem}
\begin{thmb}\end{thmb}
\end{document}
This is what that gives me:
As you can see, in the first two sections, the theorems did not count properly. What should I be doing differently? While the last version works, I would really like to be able to use the other two. Everything I look up says this is how to do it, so I'm not sure what else to try.
\newtheorem
declares a new type of theorem environment, not a new instance of that type. Something like\newtheorem{thm}{Theorem}[section] \newtheorem{lma}[thm]{Lemma}
declares two types of theorem environments, not two theorems.