# Problems with labeling of Chapter 0

I'm writing a final year project and I would like to start it with a "Preliminaries" chapter, whose number I'd like to be 0. I do the trivial \setcounter{chapter}{-1}, which makes the number of the chapter 0, but it also makes all formulae and all figures in the chapter be labeled as (1), (2), ..., instead of (0.1), (0.2), ... How can I fix this?

PS I am not sure which package governs the formulae/figures labeling. I use amsmath, if this matters.

\documentclass[oneside, a4paper, 11pt]{report}
\usepackage{amsmath}

\begin{document}

\setcounter{chapter}{-1}
\chapter{Preliminaries}

Text here...

$$\label{eq} f = f(x)...$$

I would like the label to be (0.1) instead of \eqref{eq}.

\chapter{Next chapter}

Compare the labels:

$$g = g (x)...$$

\end{document}


-
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  karlkoeller Mar 22 at 11:36

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


MWE:

\documentclass[oneside, a4paper, 11pt]{report}
\usepackage{amsmath}

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

\begin{document}

\setcounter{chapter}{-1}
\chapter{Preliminaries}

Text here...

$$\label{eq} f = f(x)...$$

I would like the label to be (0.1) instead of \eqref{eq}.

\chapter{Next chapter}

Compare the labels:

$$g = g (x)...$$

\end{document}


The original definition in report.cls is

\renewcommand\theequation
{\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@equation}


which means that the chapter number is printed only when greater than zero.

-
Thank you for the fast reply. –  Newbie Mar 22 at 11:39
I'd prefer the easier \renewcommand{\theequation}{\thechapter.\arabic{equation}} –  egreg Mar 22 at 11:39
@egreg You're right. No need for low-level commands. –  karlkoeller Mar 22 at 11:40
@Newbie You're welcome. Remember that you can accept (and upvote) the answer, if you want. See How do you accept an answer? –  karlkoeller Mar 22 at 11:46