Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
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. –  Marc van Dongen 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. –  Dane Mar 3 '12 at 2:50
add comment

1 Answer

up vote 7 down vote accepted

\stepcounter{theorem} after Theorem 1.

share|improve this answer
    
Thanks. I thought there should be an easy way to do that. –  Dane 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
add comment

Your Answer

 
discard

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

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