[texhax] Theorem numbering

Barbara Beeton bnb at ams.org
Fri Jun 4 15:34:59 CEST 2010

stefan witzel asks for the ability to
"re-use" a theorem with the same number
as the original.

    I'm using the amsthm-Package and number my theorem within sections, i.e.


    Now I would like to quote a theorem from the end of the paper in the
    introduction with its original number (which is 9.1 in my case).
    Of course I could do so by manually setting the counters:


    but this destroys the idea of automatic numbering, because if my
    theorem becomes Theorem 9.2 because it is preceded by Lemma 9.1, it
    has the wrong number in the introduction.
    When I once had the problem of quoting a theorem *after* it had been
    stated, I used the following makros the save and recover the counters:


    But how can I can obtain the number before the actual statement (using
    the \label)? I imagine there should exist solutions to this, but I did
    not find them on the web (and I don't know enough about
    makro-programming, to extract the necessary information from the
    \label-data myself). Many thanks in advance!

the test file attached below uses \label
to identify the theorem number, and also
allows for multiple "re-used" theorem
numbers.  re-using the theorem text is
left as an exercise for the reader.
						-- bb



\newtheorem*{thexrefthm}{Theorem \thexref}


In this section we have two theorems.

The first is an ordinary theorem.

The other is a duplicate of a theorem in a later
section, with its original number.

Here we have a different ``forward referenced'' theorem.

This theorem also has a number from a later section.


In this section we have three theorems.

The first is an ordinary theorem.

But this one will be referenced earlier in the
paper with the theorem number from here.

And this one will also be referenced earlier
with its own number.


More information about the texhax mailing list