I am using article, in case that matters. By default, a theorem is numbered in this format:

Theorem 1.2

But I would like to change it to

Theorem 2

i.e. without the "x." part but just a single number starting from 1. How should I do it?

  • 1
    The default for theorems in article is to be numbered with a single digit. That is, not with an x.y format. Can you please provide a minimal example that starts with \documentclass and ends with \end{document} that replicates your current behaviour? That would be much appreciated... – Werner Sep 29 at 6:07
  • 1
    There are several possible reasons for the subordinated numbering of theorem environments. For instance, how is the theorem environment defined? Possibly as \newtheorem{theorem}{Theorem}[section]? Or does the preamble of your document per chance contain either \numberwithin{theorem}{section} or \counterwithin{theorem}{section}? Without further information (other than the fact that you use the article document class), it's not really possible to offer a serious diagnosis. – Mico Sep 29 at 6:07
  • @Mico Yeah I used a \newtheorem{theorem}{Theorem}[counter] command at the beginning. But I don't know which counter to use for what I want. (I am currently using section) – trisct Sep 29 at 6:11
  • 1
    Does your code contain \newtheorem{theorem}{Theorem}[counter] or \newtheorem{theorem}{Theorem}[section]? Please clarify. By the way, if you do not want to subordinate the theorem counter to any other counter (say, the counter called section), just write \newtheorem{theorem}{Theorem}. – Mico Sep 29 at 6:13
  • @Mico Thanks, this works. I didn't know one could do that. But how do I access this counter if I don't put anything in the square brackets, in case I need to modify its value? – trisct Sep 29 at 6:16

You mentioned in a comment that

I used a \newtheorem{theorem}{Theorem}[section] command [in the preamble]. But I don't know which counter to use for what I want.

Some comments and observations:

  • If you run \newtheorem{theorem}{Theorem} in the preamble, then theorem is both the name of the environment and the name of the counter associated with that environment. Moreover, the counter called theorem is not subordinated to any other counter.

    Judging by your query, I believe that this is what you want.

  • In contrast, if you run \newtheorem{theorem}{Theorem}[section], theorem is still both the name of the environment and the counter associated with that environment. But now the theorem counter is subordinated to the section counter. And, assuming the value of the section counter is, say, 3, the theorem counter will be displayed as 3.1, 3.2, etc -- unless you modified the macro \thetheorem.

  • You also asked, "But how do I access the [theorem] counter ... in case I need to modify its value?"

    Assuming the theorem counter is not subordinated, you would "access" the counter just like you would access any other counter. E.g., you could use either \thetheorem or \arabic{theorem} to display its value, and you could use \setcounter, \addtocounter, \stepcounter, or \refstepcounter to change its value. (The latter two commands increment the value of the counter by exactly 1.)

  • 1
    Thanks again! This is a very clear explanation of how counters work. – trisct Sep 29 at 10:36

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.