Simple equation editing

I am writing a simple equation in my thesis:

\begin{align} y &= x^{k}\\ \log(y) &= \log(x^{y})\\ \log(y) &= y\log(x)\\ \frac{\log(y)}{\log(x)} &= y \end{align}


It works perfectly. However, LaTeX numbers it as 1.1 instead of 1. How could I easily correct it? Thank you!

• What documentclass are you using? By the way, remove the outer equation environment, which does nothing good. Jun 30 '15 at 19:28
• @Johnathan: The numbering is 'driven' by the documentclass here, most likely. You could kick out, however, for example, using chngcntr package
– user31729
Jun 30 '15 at 19:36
• What's the \documentclass line in your document? Jun 30 '15 at 19:42
• @egreg Hi! It is "report" However, I realized that 1.1 is better than 1 because it indicate the chapter number as well. :) Jun 30 '15 at 19:46
• @Johnathan: Your calculation is either wrong or they are typos ;-)
– user31729
Jun 30 '15 at 19:57

The report class uses chapter.equation numbering, enclosed by parentheses.

If the equation number should be used alone without referring to the chapter number, then \counterwithout{equation}{chapter} can be used. It requires chngcntr package, however.

\documentclass{report}

\usepackage{amsmath}
\usepackage{chngcntr}

\begin{document}

\chapter{First}
\section{First section}
\subsection{First subsection}

\begin{align}
y &= x^{k}\\
\log(y) &= \log(x^{k})\\
\log(y) &= k\log(x)\\
\frac{\log(y)}{\log(x)} &= k
\end{align}

% Now kick out the chapter number
\counterwithout{equation}{chapter}

\begin{align}
y &= x^{k}\\
\log(y) &= \log(x^{k})\\
\log(y) &= k\log(x)\\
\frac{\log(y)}{\log(x)} &= k
\end{align}

\end{document}


I am writing this answer based on another answer on this site and upon Christian Hupfer's answer here. There are many other useful points on that question too.

%pdfLaTeX
\documentclass{book}
\usepackage{amsmath}

\renewcommand\theequation{\arabic{equation}}

\begin{document}
\chapter{First}
\section{First section}
\subsection{First subsection}

\begin{align}
y &= x^{k}\\
\log(y) &= \log(x^{y})\\
\log(y) &= y\log(x)\\
\frac{\log(y)}{\log(x)} &= y
\end{align}

\end{document}

• This method breaks down starting at chapter 2, since the equation numbers will continue to be reset (to zero!) at the start of each chapter. Presumably, though, the OP would like the equation numbers not to be reset.
– Mico
Jun 30 '15 at 21:25