1

I am in the standard scenario for restatable: I am using restatable to state a lemma in the short version of the paper, whose proof is given in the appendix. In the appendix, I want to restate the lemma before giving its proof.

Now here is the catch. I want to use $\spadesuit$ to denote a lemma (in the short version) whose proof is in the appendix. But, I want $\spadesuit$ to only show up in the short version, and not the second time when the statement is printed in the appendix. How do I achieve this?

\documentclass{article}
\usepackage{amsthm,thmtools,thm-restate,amssymb}
\begin{document}
\begin{restatable}{lemma}{mylemma}[$\spadesuit$] \label{lem:mylemm}
$1+1=2$
\end{restatable}
\appendix
\mylemma*
\begin{proof}
We know that $2-1 = 1$, which shows the lemma.
\end{proof}
\end{document}

1 Answer 1

2

Use a command instead of the explicit tokens; you can redefine the command at \appendix so it produces nothing.

\documentclass{article}
\usepackage{amsthm,thmtools,thm-restate,amssymb}

\newtheorem{lemma}{Lemma}

\newcommand{\restatemarker}{\textup{[$\spadesuit$]} \ignorespaces}
\AddToHook{cmd/appendix/after}{\renewcommand{\restatemarker}{}}

\begin{document}

\section{Main}

\begin{restatable}{lemma}{mylemma}\label{lem:mylemm}\restatemarker
$1+1=2$
\end{restatable}

\appendix

\section{Appendix}

\mylemma*

\begin{proof}
We know that $2-1 = 1$, which shows the lemma.
\end{proof}

\end{document}

enter image description here

2
  • You could make the marker automatic with \declaretheorem[postheadhook=\restatemarker]{lemma}. In that case you should also remove the space after \textup
    – mbert
    Jan 29 at 19:07
  • @mbert Yes, that's surely possible.
    – egreg
    Jan 29 at 20:34

You must log in to answer this question.

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