I am using book class for my thesis. I have a preface which is before the first chapter. In this preface, all sections are numbered like 0.1 etc. However, equations are numbered as 1 instead of 0.1, which looks strange. How can I ask LaTeX to number my equations in preface like 0.1, 0.2, etc, please? Thank you!
Asked
Active
Viewed 2,763 times
1
LaTeXFan
- 1,573
2 Answers
2
As long there is no clear setup: Perhaps this one?
\documentclass{book}
\usepackage{chngcntr}
\begin{document}
\counterwithin{equation}{chapter} % Use chapter as driver for the resetting
\section{A section}
\begin{equation}
E = mc^2
\end{equation}
\begin{equation}
c^2 = a^2+b^2
\end{equation}
\chapter{Real stuff}
\section{A section}
\begin{equation}
E = mc^2
\end{equation}
\end{document}
-
1
-
@LaTeXfan: If you want to have
0.1-- it's there now. I wouldn't it for my personal usage, as well as0.sections – Oct 19 '15 at 10:48 -
Yes. Thanks for that. As I wrote earlier, I agree it does not look good. But if I use
\section*{}, is it good to number equations1and so on? Remember in later chapters, all equations will be numbered like1.2and2.2etc. – LaTeXFan Oct 19 '15 at 10:54 -
@LaTeXFan no problemo. You'd refer in the text to equation 1 or 5.17, noone gets confused. But a preface with equations important enough to warrant numbering (and referencing) sounds strange. Perhaps use unnumbered
equation*? – vonbrand Feb 16 '20 at 02:44
-1
Place \renewcommand\theequation{\arabic{equation}} just before your equation.
Example:
\renewcommand\theequation{\arabic{equation}}
\begin{equation}
\label{eqn:eq1}
X = 1+5
\end{equation}
-
1Welcome to TeX-SX! As a new member, it is recommended to visit the Welcome and the Tour pages to be informed about our format. However, your post is not really answering to the original question. – R. N Feb 10 '20 at 12:44

0.1, wouldn't unnumbered sections (\section*{...}) be better for the preface? – Torbjørn T. Oct 19 '15 at 10:12\section*{}, i.e., no numbering of sections. What should I do with the equations, please? Should I leave it as1instead of0.1? What is the common practice? – LaTeXFan Oct 19 '15 at 10:150.1and alike. What should I do with them? – LaTeXFan Oct 19 '15 at 10:16\counterwithout{equation}{section}for the unnumbered section, needschngcntrpackage – Oct 19 '15 at 10:19\section*{}, all the sections are no longer in TOC. – LaTeXFan Oct 19 '15 at 10:190.1numbering anyway... – Oct 19 '15 at 10:39