2

I am new to LaTex and I need some help with equation numbering format when I use the cmd of begin{equation} it gives me equation number as (2.1) how can I change it so it gives me equation as (1) (2) ... and so on.. see picture for what I mean

marked as duplicate by Mico, Sean Allred, Martin Schröder, Guido, Andrew Jun 26 '15 at 6:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Welcome to TeX.SX! the format you show for the equation numbers isn't the "usual" default, so we need more information. a small example that produces the result you're seeing, beginning with \documentclass and ending with \end{document} will provide the information we need to diagnose the situation and give you an answer. – barbara beeton Jun 15 '15 at 15:09
  • 1
    \renewcommand*\theequation{\textup{(\arabic{equation})(\arabic{chapter})}}? (Did not try it, just the usual output of counters, which I'm not sure is used in equations.) – Manuel Jun 15 '15 at 15:26
  • @Manuel, I think that the OP wants only a single counter, not swap the equation and chapter counters. – Sigur Jun 15 '15 at 15:31
  • @Sigur Ahm, I understood it was (2.1) converted to (1)(2), but he might mean that the equations don't follow any other counter. – Manuel Jun 15 '15 at 15:34
  • 2
    @Werner -- that's one possibility, but there are others. the main problem i see with the question is that it doesn't say how the two-part numbering was established -- it's not a default with any of the "standard" document classes. until that is known, anything else is just a guess. – barbara beeton Jun 15 '15 at 16:31
8

You should be able to modify how the equation numbers are generated with the following:

\renewcommand{\theequation}{\arabic{equation}}

\theequation is the command that prints the current equation number. It is automatically called by the equation environment. Changing it to only print the equation number is what you seem to want.

You could change it back to showing the section and equation number with the following:

\renewcommand{\theequation}{\arabic{section}.\arabic{equation}}

Note that section and equation are counters that LaTeX automatically keeps updated, \arabic{} is telling LaTeX to interpret that counter as an arabic number (1, 2, 3, &c.). If you wanted the equations to be lettered instead of numbered (a, b, c, &c.) you could use:

\renewcommand{\theequation}{\alph{equation}}

You can set this command in your preamble if you want the entire document to have consistent styling, or you can change the command in the middle of the document to change the style temporarily.

\documentclass{article}

\renewcommand{\theequation}{\arabic{section}.\arabic{equation}}

\begin{document}

\section{Example}

\begin{equation}
E = m c^2
\end{equation}

\section{Another Example}
\renewcommand{\theequation}{\arabic{section}.\alph{equation}}

\begin{equation}
P = m v
\end{equation}

\section{A Third Example}
\renewcommand{\theequation}{\arabic{equation}}

\begin{equation}
F = m a
\end{equation}
\end{document}

There is more useful information to be found about counters at wikibooks.

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