Possible Duplicate:
How do I repeat a theorem number?
I want to set up a simple macro that would do the following: It would be very similar to \label{XX}, (say, \relabel{XX}) only instead of setting the environment/equation/section/etc. to a new number, it will set the counter for that location to \ref{XX}, which already appears previously in the .tex file. It should set the counter to XX according to the current environment setcounter settings. If possible, when leaving the environment, it should restore the counter back.
Is that possible? Does such a macro/command already exist? The closest I could find is setcounter, but that requires stating the type of counter and I am also not sure how to specify a value which is a reference previously in the text.
\labeldoesn't set any counters so it's very hard to understand what you're trying to do here. Can you give an example of the document input you'd like to be able to write and an example of the output you're trying to get? – Will Robertson Oct 19 '10 at 02:53