TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What I want


\begin{thm} A \end{thm}
\begin{thm} B \end{thm}
\begin{thm} C \end{thm}

Ends up generating

Theorem 1 A.
Theorem 2 B.
Theorem 3 C.

What I want instead:

Theorem 3 A.
Theorem 2 B.
Theorem 1 C.

Why would anyway want this insanity?

I'm logging ideas I'm considering in LaTeX.

I want everything appear in reverse chronological order (i.e. newest ideas first; oldest idea last.)

Now, I want the numberings to remain valid across versions -- i.e. when I add a new theorem, I want old theorem 20 to remain as theorem 20 [thus all the discussions about theorem 20 do not suddenly become mislabeled.]

share|improve this question
up vote 9 down vote accepted

If you go


it will count backwards, you would need


at the start, either manually, or by counting the number of thm used last time and setting it automatically from a previous run.

a complete document automating the resetting




\begin{thm} A \end{thm}
\begin{thm} B \end{thm}
\begin{thm} C \end{thm}

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.