# Enumerating theorems with numbers and letters

I want to have my theorem environments to enumerate using both numbers and letters. Right now I have this:

\documentclass{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}[section]
\begin{document}
\setcounter{section}{1}
\begin{theorem}
This enumerates as 1.1." but I want 1.1.a."
\end{theorem}
\begin{theorem}
Then this one would be 1.1.b"
\end{theorem}
\end{document}


I know I can use

\renewcommand*{\thetheorem}{\alph{theorem}}


to enumerate with letters but I'm not sure how to proceed in applying that to this situation.

• The other 1 refer to what? May 22, 2018 at 16:39
• @Bernard a subsection May 22, 2018 at 16:41
• And if there's a section but no subsection yet when the theorem is enunciated? May 22, 2018 at 16:42
• so it I change it to \newtheorem{theorem}{Theorem}[subsection] I can get 1.1.1, but how would I get the lettering? May 22, 2018 at 16:45

If you want to prefix the section and subsection numbers to the theorem "number" (here: lowercase letter), you need to replace \newtheorem{theorem}{Theorem}[section] with \newtheorem{theorem}{Theorem}[subsection].

\documentclass{article}
\usepackage{amsthm} % for '\newtheorem' macro
\newtheorem{theorem}{Theorem}[subsection]
\renewcommand\thetheorem{\thesubsection.\alph{theorem}}

\begin{document}
\setcounter{section}{1}
\setcounter{subsection}{1}

\begin{theorem}
I want 1.1.a.'' -- check!
\end{theorem}
\begin{theorem}
This one should be 1.1.b.'' -- check!
\end{theorem}
\end{document}

• If I start a new subsection afterwards, the letter enumeration does not reset. So, after setcounter{subsection}{2}, the next theorem is numbered 1.2.c rather than resetting to 1.2.a May 22, 2018 at 17:51
• @CrimsonRain - \setcounter{subsection}{2} will definitely not give you the desired result -- but that's not because of any mistake in the code I posted. In fact, \setcounter{subsection}{2}, \stepcounter{subsection}, and \addtocounter{subsection}{1} will all fail to increment the theorem "slave counter". What you need to do is execute \refstepcounter{subsection} -- or, probably more simply, issue a \subsection{...} instruction.
– Mico
May 22, 2018 at 20:07