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

Here is my MWE:

\documentclass[a4paper, 12pt]{report}
\usepackage{amssymb, amscd}

        \begin{tabular}{l | r}
            Two & 2 \\
            Four & 4

    Test equation:

It produces this:

enter image description here

Now I would like to change equation numbering style. I want (1-1) instead of (1.1). How can I do that? Also, I want to preserve numbering style for tables and figures (Table 1.1:) , I don't want (Table 1-1:)

share|improve this question
You can try to redefine \theequation with \renewcommand{\theequation}{\thechapter--\arabic{equation}}. :) – Paulo Cereda Jun 30 '12 at 14:20
@PauloCereda: That's it, thanks :) Please post it as answer so I can accept it :) – xx77aBs Jun 30 '12 at 15:58
up vote 15 down vote accepted

I was looking for some hints in the amsmath documentation and found the following trick (adapted, of course):


If we look at the original definition of \theequation, we can find that it's more robust than our first attempt:

\long macro:->\ifnum \c@chapter >\z@ \thechapter .\fi \@arabic \c@equation

we can easily redefine it accordingly:

\long\def\theequation{\ifnum \c@chapter > \z@ \thechapter --\fi \@arabic \c@equation}

Interestingly enough, there's another approach with the etoolbox package:



There we go. :)

share|improve this answer

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.