2

I would like to present a second version of a theorem (of, say, Theorem 1) and I would like to denote it by Theorem 1'. I reckon the best way to go about it might be to define a new theorem style or environment? The thing is that I want this new theorem environment to be identical to the default one, except for the added dash after the theorem number. Moreover, if I attach a \label to the theorem, I would like the dash to appear as part of the theorem number when referring to it via the \refcommand. I don't know unfortunately how to go about this, in part because I don't know the default settings of the standard theorem environment, e.g. spacing, etc.

As an example, I would like \begin{dashedtheorem}[theorem title] TEXT... \end{dashedtheorem} to translate into Theorem 1' (theorem title). TEXT...

I realize that this question may have already been asked, e.g. New Theorem Style, but I could not find an answer that was enough to help me out.

I would be very grateful for any help with this!

EDIT: See also New theorem environment with manual theorem number.

6
  • Do you mean the theorem content will be exactly the same, except it will begin as Theorem 1' —?
    – Bernard
    Commented Sep 14, 2017 at 19:44
  • @Bernard No, the content will be different. Instead of Theorem 1. I would like the theorem header to read Theorem 1'. I would like be able to do this for any theorem number, though. That's why it would be helpful to have it available as a separate theorem environment.
    – Apollo13
    Commented Sep 14, 2017 at 19:47
  • The link you provided pretty much contains the answer (you only have to replace the . --- by ') -- could you say more precisely what you tried and how it didn't work?
    – magula
    Commented Sep 14, 2017 at 19:48
  • @Apollo13 Maybe the problem needs some clarification: If you replace the . --- by ' in tex.stackexchange.com/a/234707/143325 how is that not what you want?
    – magula
    Commented Sep 14, 2017 at 19:52
  • @magula Sorry, I should have been more specific. If I begin the theorem with \begin{thmd}[theorem title], with thmd defined as in the answer I referred to above, then the the outcome looks like this: Theorem 1 (theorem title)'. I want it to look like this: Theorem 1' (theorem title). Moreover, if I attach a \labelto the theorem, the \ref command gives 1, rather than 1'. The latter is what I would like to get when referring to the label.
    – Apollo13
    Commented Sep 14, 2017 at 19:58

2 Answers 2

7

Use the manualtheorem I gave you in another answer. There is no need that the primed theorem immediately follows the original one; it could also come before it, because we use the \label-\ref mechanism.

\documentclass{article}
\usepackage{amsthm}

\newtheorem{theorem}{Theorem}

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

\begin{document}

\begin{theorem}\label{foo}
This is a theorem.
\end{theorem}

\begin{manualtheorem}{\ref{foo}'}\label{baz}
This is a theorem.
\end{manualtheorem}

Here is \ref{foo} and \ref{baz}.

\end{document}

enter image description here

If you have hyperref loaded, you should use

\begin{manualtheorem}{\ref*{foo}}

in order not to make a wrong hyperlink.

2

We only need create a new counter and modify it so that it always gets printed with a dash after the number.

\documentclass{article}
\usepackage{amsthm}

% New counter that is printed like 1'
\newcounter{countD}
\renewcommand{\thecountD}{\arabic{countD}'}

\newtheorem{theorem}{Theorem}
\newtheorem{theoremD}[countD]{Theorem}

\begin{document}

    \begin{theoremD}[\textbackslash o/]
        lorem ipsum
        \label{theoD}
    \end{theoremD}

%   Set the number of the following theorem to the value 7, if you want to:
    \setcounter{countD}{7}\addtocounter{countD}{-1}
    \begin{theoremD}[\textbackslash o/]
        lorem ipsum
        \label{theoDD}
    \end{theoremD}

    \begin{theorem}[\textbackslash o/]
        lorem ipsum
        \label{theo}
    \end{theorem}

    We have the theorems \ref{theoD}, \ref{theoDD} and \ref{theo}.

\end{document}

enter image description here

7
  • Thank you so much! This is a great reply! Could I also ask you to show me how to adjust your answer so that the theorem number becomes an argument of theoremD, i.e. so that I can manually decide on the number that appears. I'm asking for this because I would like to use the theoremDenvironment for second (or even third, etc.) versions of specific theorems in my text. On this note, it would be great if the number of dashes could also become an argument. I'm imagining something like \begin{theoremD}{3}{''}[title] to get Theorem 3'' (title). Thanks so much again, and...
    – Apollo13
    Commented Sep 14, 2017 at 20:47
  • (continued) ... sorry for the late afterthought! Since I'm fairly new to Latex, it would be very hard for me to come up with this sort of stuff myself.
    – Apollo13
    Commented Sep 14, 2017 at 20:48
  • Changing the number of a theorem is not a problem (I've added that), you can of course also replace the 7 by \ref{ref_to_similar_theorem} so that it always has the same number as the other version of the theorem. (However, for this to work this way ref_to_similar_theorem has to refer to a theorem without dashes.)
    – magula
    Commented Sep 14, 2017 at 20:59
  • I'm not so sure about giving the number of dashes as a parameter. This would be a bit trickier, I suppose, and make it hard to simply use the thm.-class. It might require modifying a copy of some code of the thm. class. As long as you don't have an extreme variety of number of dashes (the number of versions of a theorem you can write in a lifetime is somehow limited, after all), I would strongly recommend just defining a thm. for each of them and using these. You may note that this is often the way of treating different numbers of things in TeX: Just defining a new command for every number.
    – magula
    Commented Sep 14, 2017 at 21:02
  • Thank you very much! Now, you've already helped me a lot. But if you don't mind, I'd like to add one complication to it. I have different sections in my article, and the theorems are numbered according to sections, e.g. Theorem 2.3 for the third theorem in Section 2. Will the above still work in this case? Is there perhaps some way to make the theorem number an argument of the \theoremD command, so that I don't have to keep resetting the counter countD? Thanks again
    – Apollo13
    Commented Sep 14, 2017 at 21:09

You must log in to answer this question.

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