# Theorem numbering like Theorem $1'$

This is a question similar to

Dash after theorem number: e.g. Theorem 1'

I mimic the answer 1 in the following way. But it doesn't display proposition 1'.

\documentclass[12pt]{amsart}

\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\newtheorem{proposition}[theorem]{Proposition}

\newtheorem{manualtheoreminner}{Theorem}
\newenvironment{manualtheorem}[1]{%
\renewcommand\themanualtheoreminner{#1}%
\manualtheoreminner
}{\endmanualtheoreminner}

\newtheorem{manualpropositionminner}{Proposition}
\newenvironment{manualproposition}[1]{%
\renewcommand\themanualtheoreminner{#1}%
\manualpropositionminner
}{\endmanualpropositionminner}

\begin{document}

\begin{proposition} \label{a}
text a
\end{proposition}

\begin{manualproposition}{\ref{a}'}
text

\end{manualproposition}

\end{document}


You're using the wrong counter name:

\documentclass[12pt]{amsart}

\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\newtheorem{proposition}[theorem]{Proposition}

\newtheorem{manualtheoreminner}{Theorem}
\newenvironment{manualtheorem}[1]{%
\renewcommand\themanualtheoreminner{#1}%
\manualtheoreminner
}{\endmanualtheoreminner}

\newtheorem{manualpropositioninner}{Proposition}
\newenvironment{manualproposition}[1]{%
\renewcommand\themanualpropositioninner{#1}%
\manualpropositioninner
}{\endmanualpropositioninner}

\begin{document}

\begin{proposition} \label{a}
text a
\end{proposition}

\begin{manualproposition}{\ref{a}'}
text
\end{manualproposition}

\end{document}


A more general solution that avoids defining different environments:

\documentclass[12pt]{amsart}

\usepackage{amsthm,xparse}

\newtheorem{theorem}{Theorem}
\newtheorem{proposition}[theorem]{Proposition}

\NewDocumentEnvironment{manual}{O{theorem}m}
{%
\renewcommand\thetheorem{#2}%
\begin{#1}
}
{\end{#1}}

\begin{document}

\begin{proposition}\label{a}
text a
\end{proposition}

\begin{manual}[proposition]{\ref{a}'}
text
\end{manual}

\begin{theorem}\label{b}
text b
\end{theorem}

\begin{manual}{\ref{b}'}
text
\end{manual}

\begin{theorem}
Next
\end{theorem}

\end{document}


A version with a proper prime that uses boldface when appropriate.

\documentclass[12pt]{amsart}

\usepackage{amsthm,xparse}

\makeatletter
\DeclareRobustCommand{\thmprime}{%
\begingroup
\expandafter\in@\expandafter b\expandafter{\f@series}%
\ifin@ \boldmath \fi
$\m@th{}^{\prime}$%
\endgroup
}
\makeatother

\newtheorem{theorem}{Theorem}
\newtheorem{proposition}[theorem]{Proposition}

\NewDocumentEnvironment{manual}{O{theorem}m}
{%
\renewcommand\thetheorem{#2}%
\begin{#1}
}
{\end{#1}}

\begin{document}

\begin{proposition}\label{a}
text a
\end{proposition}

\begin{manual}[proposition]{\ref{a}\thmprime}\label{a'}
text
\end{manual}

\begin{theorem}\label{b}
text b
\end{theorem}

\begin{manual}{\ref{b}\thmprime}
text
\end{manual}

\begin{theorem}
Next
\end{theorem}

\ref{a} and \ref{a'}

\end{document}


• that's not a prime. it's an apostrophe. Commented May 22, 2018 at 21:06
• @barbarabeeton That's what the OP is using in the body of the question. If a prime is wanted, \ref{foo}$'$ can be used. Commented May 22, 2018 at 21:07
• yes, but in the title he has $1'$ which definitely indicates a prime. the appearance of an apostrophe is a limitation of what's available on a keyboard. Commented May 22, 2018 at 21:11
• @barbarabeeton Happier now? ;-) Commented May 22, 2018 at 21:32
• yes. the pedant is indeed happier. thank you. Commented May 23, 2018 at 13:02