The amsthm package comes with an several theorem-like environments. Is there a way to adjust the indexing on a sequence of theorems to skip a number? That is, I would like to have it do something like this,

Theorem 1.

Theorem 3.

Theorem 4.

without having anything appearing in between Theorem 1 and Theorem 3.

  • 1
    Why do you want to do this? Is the number 2 used for some other environment and do you want to share the number? If yes then amsmath lets you do this. – user10274 Mar 2 '12 at 5:49
  • No, I just want to skip it. I'm taking a test where I only have to answer some of the questions, and wanted the problem numbers on my solutions to correspond to the problem numbers on the test. – Cardboard Box Mar 3 '12 at 2:50

\stepcounter{theorem} after Theorem 1.

  • Thanks. I thought there should be an easy way to do that. – Cardboard Box Mar 2 '12 at 4:07
  • wouldn't you want \refstepcounter? – cmhughes Mar 2 '12 at 4:23
  • 2
    @cmhughes: I didn't think of that, but actually, you wouldn't. \refstepcounter sets the current label, and therefore, after calling it, every \label command until the next \refstepcounter (a section or another theorem) will incorrectly point to the nonexistent Theorem 2. Theorem 3 itself will \refstepcounter in the correct place. – Ryan Reich Mar 2 '12 at 4:36
  • Actually, it's even worse than that, since if you are calling \refstepcounter in the global context, it requires another globally-scoped \refstepcounter to override it. So only another section will do (inside of environments it can be overridden locally). Of course, most of the time you don't have \labels flying around in the middle of the text, but it's still philosophically wrong. – Ryan Reich Mar 2 '12 at 5:14
  • Ok, thanks for the clarification- an interesting discussion :) +1 from me – cmhughes Mar 2 '12 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.