[Tex/LaTex] Changing Equation Number Format

formatting

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

Best Answer

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.