4

I want to write some theorems with the outputs somewhat self-defined like "Theorem A, Theorem B, Theorem B^+, Theorem B^#" etc. and want theses special theorems to be outside of the normal theorem counter, i.e. the other theorems keep their own numbering like "Theorem 1.1, Theorem 1.2" even through "Theorem B" is between them. Is there an easy way to achieve this?

This might be related to the question here but I think that's not pricise my question here. Thanks in advance!

1 Answer 1

7

Something like this?

enter image description here

\documentclass{article}
\usepackage{amsthm}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{theoremvar}{Theorem}
\newenvironment{theorem*}[1]
 {\renewcommand{\thetheoremvar}{#1}\theoremvar}
 {\endtheoremvar}

\begin{document}

\section{Title}

\ref{normal1},
\ref{normal2},
\ref{normal3},
\ref{normal4},
\ref{special1},
\ref{special2},
\ref{special3}

\begin{theorem}\label{normal1}
This is a normal theorem.
\end{theorem}

\begin{theorem}\label{normal2}
This is a normal theorem.
\end{theorem}

\begin{theorem*}{A}\label{special1}
This is a special theorem.
\end{theorem*}

\begin{theorem}\label{normal3}
This is a normal theorem.
\end{theorem}

\begin{theorem*}{B$^+$}\label{special2}
This is a special theorem.
\end{theorem*}

\begin{theorem*}{B$^{\sharp}$}\label{special3}
This is a special theorem.
\end{theorem*}

\begin{theorem}\label{normal4}
This is a normal theorem.
\end{theorem}

\end{document}

The theorem* environment has a mandatory argument for the special label.

1
  • This is what I want, thanks a lot!
    – Lao-tzu
    Sep 3, 2020 at 17:34

You must log in to answer this question.

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