3

I am using document class as report in latex and I dont want to use article. Now the problem is when I use section in my document, it begins with 0.0 0.1 0.2 etc instead I want it as 1.0 Abstract 1.1 Introduction etc and subsection should be 1.0.0 1.0.1 etc and same should be reflected to table of contents. Anyone please help me with me this. Thank You

Rohith Nayak
  • 55
  • 1
  • 1
  • 8
  • 1
    possible duplicate of [How to get rid of zeros in the section numbering in LATEX report document class?](http://stackoverflow.com/questions/26957751/how-to-get-rid-of-zeros-in-the-section-numbering-in-latex-report-document-class) – MattAllegro Jun 25 '15 at 21:39

1 Answers1

8

There's no real need to use report (or book) if you don't use any \chapters. Here's a way to do it though:

enter image description here

\documentclass{report}

% Subtract 1 from counters that are used
\renewcommand{\thesection}{\thechapter.\number\numexpr\value{section}-1\relax}
\renewcommand{\thesubsection}{\thesection.\number\numexpr\value{subsection}-1\relax}
\renewcommand{\thesubsubsection}{\thesubsection.\number\numexpr\value{subsubsection}-1\relax}
\setcounter{secnumdepth}{3}

\setcounter{chapter}{1}% Not using chapters, but they're used in the counters
\begin{document}

\tableofcontents

\section{First section}
\subsection{First subsection}
\subsubsection{First subsubsection}
\subsubsection{Second subsubsection}
\subsection{Second subsection}

\section{Second section}
\subsection{First subsection}
\subsubsection{First subsubsection}

\end{document}
Werner
  • 14,324
  • 7
  • 55
  • 77