1

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!

LaTeXFan
  • 1,573
  • Sounds strange that you want sections numbered 0.1, wouldn't unnumbered sections (\section*{...}) be better for the preface? – Torbjørn T. Oct 19 '15 at 10:12
  • Could you provide a minimal example with the preface, to make it easier to answer your question? In the mean time, you could take a look at, e.g., http://tex.stackexchange.com/questions/61756/how-to-change-equation-numbering-style to get started. – Marijn Oct 19 '15 at 10:12
  • @TorbjørnT. If I use \section*{}, i.e., no numbering of sections. What should I do with the equations, please? Should I leave it as 1 instead of 0.1? What is the common practice? – LaTeXFan Oct 19 '15 at 10:15
  • @TorbjørnT. By the way, I also have theorems in the preface. And currently they are also numbered as 0.1 and alike. What should I do with them? – LaTeXFan Oct 19 '15 at 10:16
  • 4
    So far un-asked: Why do you have equations in the preface at all? And, do these equations need to be numbered? – Mico Oct 19 '15 at 10:17
  • @Mico Yes, because I will refer to them later. – LaTeXFan Oct 19 '15 at 10:18
  • \counterwithout{equation}{section} for the unnumbered section, needs chngcntr package –  Oct 19 '15 at 10:19
  • @TorbjørnT. Also after I use \section*{}, all the sections are no longer in TOC. – LaTeXFan Oct 19 '15 at 10:19
  • @ChristianHupfer Could you give a bit more detail, please? Where to add your command? – LaTeXFan Oct 19 '15 at 10:22
  • @LaTeXfan: I was wrong -- do you have a section in your preface? –  Oct 19 '15 at 10:25
  • 2
    As far as i see it, the preface should have a few common introductory words. The real deal happens in your mainmatter. – Johannes_B Oct 19 '15 at 10:26
  • @ChristianHupfer Yes. In fact, several sections. – LaTeXFan Oct 19 '15 at 10:30
  • Perhaps a complete example would make it more clear. Though on hindsight I understand why Johannes and Mico question the use of equations and theorems in a preface, it doesn't really seem like the place for them. Anyways, I don't know what the common practice is, if there is one. Unnumbered sections can be added to the ToC, see e.g. How do I include a \section*{} in a \tableofcontents? – Torbjørn T. Oct 19 '15 at 10:34
  • @TorbjørnT. Agreed -- and I wouldn't use 0.1 numbering anyway... –  Oct 19 '15 at 10:39

2 Answers2

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}

enter image description here

  • 1
    I am convinced of not using 0.1 and alike. Just look not so nice. – LaTeXFan Oct 19 '15 at 10:43
  • @LaTeXfan: If you want to have 0.1 -- it's there now. I wouldn't it for my personal usage, as well as 0. 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 equations 1 and so on? Remember in later chapters, all equations will be numbered like 1.2 and 2.2 etc. – 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}
epR8GaYuh
  • 2,432
Hnh
  • 1
  • 1
    Welcome 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