3

I'm writing in the document class, and using the align environment from the amsmath package.

My align environment in chapter 2 is giving numbers as (2.2), (2.3) etc (since it's in chapter 2), where I'd like it to appear as just (2), (3) etc.

I've tried using \numberwithin{equation}{document} command, but 'document' isn't accepted.

lockstep
  • 250,273
homebrand
  • 177

2 Answers2

4

Using chngcntr package:

\documentclass{report}
\usepackage{amsmath}
\usepackage{chngcntr}
\begin{document}
\counterwithout{equation}{chapter}
\chapter{Chapter one}
\chapter{Chapter two}
Some text
\begin{align}
  F = ma
\end{align}
Some text to fill space.
\begin{equation}
  E = mc^{2}
\end{equation}

\end{document}

enter image description here

  • As an extra note for anyone else stumbling across this, to reinstate the numbering you can use \counterwithin{equation}{chapter} at some point inside the document – homebrand Sep 16 '13 at 07:08
3

A simpler solution without adding new package, it may or may not cause reference problem:

\documentclass{report}
\usepackage{amsmath}

\renewcommand\theequation{\arabic{equation}}

\begin{document}

\chapter{Chapter one}
\chapter{Chapter two}
Some text
\begin{align}
  F = ma\label{eq:1}
\end{align}
Some text to fill space.
\begin{equation}
  E = mc^{2}
\end{equation}
Now look at equation \eqref{eq:1}.

\end{document}

enter image description here

Francis
  • 6,183
  • This is a good simple hack, but is there a way to re-enable numbering using this method? For example, not have numbering in chapter 2 but have numbering in chapter 3. – homebrand Sep 16 '13 at 06:57
  • 2
    @homebrand \renewcommand\theequation{\thechapter.\arabic{equation}} –  Sep 16 '13 at 07:18