15

I am wondering how to label a theorem in LaTeX using a letter but not changing the numbering of the other theorems. For example, I want Theorem 1.3 to be Theorem A and Theorem 1.4 to remain as Theorem 1.4 (not changing its numbering).

2 Answers 2

9

It's not very clear why the theorem following "Theorem A" should be numbered 1.4. So I'll give you two distinct solutions.

Solution A

\documentclass{article}
\newtheorem{thm}{Theorem}[section] % first theorem in section 1 will be 1.1
\newtheorem{thmx}{Theorem}
\renewcommand{\thethmx}{\Alph{thmx}} % "letter-numbered" theorems

\begin{document}
\begin{thm}
$0+0=0$
\end{thm}

\begin{thmx}
$0+1=1$
\end{thmx}

\begin{thm}
$1+1=2$
\end{thm}

\end{document}

The sequence will be 1.1, A, and 1.2

Solution B

\documentclass{article}
\newtheorem{thm}{Theorem}[section] % first theorem in section 1 will be 1.1
\newtheorem{thmy}{Theorem}
\renewcommand{\thethmy}{\Alph{thmy}} % "letter-numbered" theorems
\newenvironment{thmx}{\stepcounter{thm}\begin{thmy}}{\end{thmy}}

\begin{document}
\begin{thm}
$0+0=0$
\end{thm}

\begin{thmx}
$0+1=1$
\end{thmx}

\begin{thm}
$1+1=2$
\end{thm}

\end{document}

The sequence will be 1.1, A, and 1.3

7

You can use an auxiliary counter to store the current value of the theorem counter, then perform the necessary redefinitions for the new numbering schema and then restore the saved value of the theorem counter:

\documentclass{book}
\usepackage{amsthm}

\newtheorem{theo}{Theorem}[chapter]
\newcounter{tmp}

\begin{document}

\chapter{Test Chapter}
\begin{theo}
test
\end{theo}

\begingroup
\setcounter{tmp}{\value{theo}}% store current value of theorem counter
\setcounter{theo}{0} %assign desired value to theorem counter
\renewcommand\thetheo{\Alph{theo}}% locally redefine the representation of the theorem counter
\begin{theo}
test
\end{theo}
\endgroup

\setcounter{theo}{\thetmp} % restore value of theorem counter
\begin{theo}
test
\end{theo}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .