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

I want to number my equations in a manner similar to this. However, what I want is that when the equation is not within a theorem environment, there should be normal numbering 1,2,3,4. However, each equation within the theorem environment should be subnumbered. For example, in the code like below:

\lim x = 0 % Suppose this equation is numbered 55
\lim x = 0 % Then this equation should be numbered 56

    \lim x = 1 %This equation should be numbered 57.1

    \lim x = 1 %This equation should be numbered 57.2
    \lim x = 1 %This equation should be numbered 57.3

\lim x = 1 %This equation should be numbered 58

Is such a thing possible? If it helps, I am using the following declaration in my package.

\usepackage[amsthm, framed, thmmarks]{ntheorem}

EDIT: I want to change my question a little bit. Is it possible to define a discontinuous environment so that I can subnumber my equations within that environment? For example, I already know that I can use environments like align with conditions so that the equations are subnumbered within that environment, but then, it is a consecutive sets of equations which are subnumbered, I am looking for something which would enable me to separate the environment while still maintaining the numbering.

This is useful when I am discussing equations both inside and outside of a theorem environment. Sometimes a proof of the theorem is very long and there are a lot of substitutions, and a lot of equations are numbered, however, the numbering then takes the focus away from the nested-property of the equation making the equation numbers hard to follow. For example, you are more likely to remember equations 4.1 4.2 inside a theorem rather than equations 117 and 118 since you are in that proof reading mode and hence, you can more easily remember the first equation in that proof or ninth equation in that proof.

So probably something like \startsubnumbering,\endsubnumbering commands which I can then insert at the beginning of whatever I see fit.

share|improve this question
What if a theorem contains only one equation to be numbered? – egreg Oct 10 '12 at 12:18
@egreg Hmm. Yup, I am not decided if this is a good idea or not, as of now. I might be able to do with just $57.1$. I wanted to know if it is possible in a nice manner that is, without doing too much of low level programming. – Jayesh Badwaik Oct 10 '12 at 12:21
up vote 3 down vote accepted

You can do it with some work and the help of etoolbox.




% First of all we want to change how subequations numbers equations

% Now we patch the theorem-like environments where we want subnumbering
% add similar lines for the other theorems you need    

\setcounter{equation}{54} % not to start from 1, only by way of example

Here are two equations
\lim x = 0 \label{A} % Suppose this equation is numbered 55
\lim x = 0 \label{B} % Then this equation should be numbered 56

Here is a theorem, which states an equation
    \lim x = 1 \label{C} %This equation should be numbered 57.1
and then two other equations
    \lim x = 1 \label{D} %This equation should be numbered 57.2
    \lim x = 1 \label{E} %This equation should be numbered 57.3
So this finishes the theorem.

Now another equation.
\lim x = 1 \label{F} %This equation should be numbered 58
and that's all, folks. But let's cite all equations we wrote: \eqref{A}, \eqref{B},
\eqref{C}, \eqref{D}, \eqref{E}, and \eqref{F}.

enter image description here

Personally, I don't find this a good idea.

share|improve this answer
Thank You. Your application uses patchcmd and then I can patch any environment I want, so it is nice. Also, you might look at the second paragraph of my edit, if you want to understand my motivation for doing so, and if you think there might be a better way to do what I am doing, I would be thankful to know it. Thank you again. – Jayesh Badwaik Oct 10 '12 at 12:46

Your Answer


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.