I almost always use the following environments: equation, eqnarray and environments that are defined in the preamble with the command \newtheorem (i.e. definition, theme, Theorema, proposition etc ...) for my dissertation.

But I would like to customize these environments as follows:

  1. having a unified numbering all these environments of the type X.Y.Z where x = "chapter number" y = "section number" z = "number of the subsection"

  2. numbering stay to the left of the right environment and not the name I mentioned these environments. Exemple:

**"X.Y.Z Theorem " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

(X.Y.(Z+1)) equation = equation


  1. do not lose the automatic spacing before or after the environments defined by the command \newtheorem (i.e. definition, theme, Theorema, proposition etc ...)

  2. Did not lose the italic font environments defined by the command \newtheorem (i.e. definition, theme, Theorema, proposition etc ...)

  3. What did not come in with the environment comflito enumerate.

  4. That I could set the font in the preamble to these environments.

  • Please elaborate: (2) Does this specifically refer to equations? (3) Have something like X.Y.Z.n Theorem or keep the traditional Theorem X.Y.Z.n? (5) What does this mean? – Werner Feb 26 '12 at 23:22
  • 2
    I changed the wording of your first point a little, hope it reflects what you meant. Also, you should Avoid eqnarray! – Torbjørn T. Feb 26 '12 at 23:24
  • Are you thinking to a numbering similar to Dieudonné's "Treatise on Analysis"? – egreg Feb 26 '12 at 23:25
  • @egreg, yes similar to Dieudonné's "Treatise on Analysis". But not a list of paragraphs. The abientes must be specified. – MathOverview Feb 26 '12 at 23:50
  • @Werner, I edit may question. See exemple. – MathOverview Feb 26 '12 at 23:51

You can get sequential numbers by defining the theorem-like environments sharing the equation counter; the number on the left of the theorem header can be obtained by \swapnumbers (package amsthm):





Some text.

A theorem

Some text and an equation

A definition.

Some final text.


enter image description here

| improve this answer | |

As mentioned in the comments, you should avoid eqnarray and use something from the amsmath package such as align; see eqnarray vs align for details on how to get started.

The numbering convention you requested can be achieved by combining \numberwithin from the amsmath package (which hopefully you'll be loading now so that you can avoid eqnarray!) and \swapnumbers from the amsthm package.

enter image description here

You can customize the fonts for your theorem-like environments using the format specified in the amsthm package, as detailed in section 4.3 of the documentation

enter image description here

Here's a complete MWE for your reference- note that other theorem packages are available such as ntheorem.


\usepackage{lipsum} % sample text
\usepackage{amsthm} % for theorems
\usepackage{amsmath}% for mathematical environments




| improve this answer | |
  1. Definitely do not use eqnarray. Check the amsmath package.

  2. As for theorems: you might want to check the amsthm package or the ntheorem package (also look here: http://ctan.org/keyword/theorems).

| improve this answer | |
  • Do you mean amsmath? – qubyte Feb 26 '12 at 23:56
  • @mbork. Thank1's. I'll look at these packages in your answer. But I would be grateful if he had somewhere ready commands. But for many exorcise "eqnarry"? I need my dissertation on the numbering of the equations remain to the left of the equation as the eqnarray. – MathOverview Feb 26 '12 at 23:57
  • @mbork. Thanks for your answer. Your link's been very helpful. – MathOverview Feb 27 '12 at 0:26
  • 1
    @MarkS.Everitt: thanks, obviously yes. Corrected. – mbork Feb 27 '12 at 8:45

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.