[Tex/LaTex] LaTeX report – table of contents without chapter

chaptersreportsectioningtable of contents

I am trying to write a LaTeX report (using class report) but I don't want to use chapters, only sections, subsections and subsub. Using

\renewcommand{\thesection}{\arabic{section}},

my sections numbering now start at 1 and not 0.1, which is what I wanted. However, my table of contents keep the 0 before the 1 (eg 0.1 "Title") meant for the chapter numbering. How can I remove it ?

I know that the class article doesn't have chapters and could be a solution but is there a way to remove those 0 before the 1 in the table of contents without using the article class ?

Thanks for your answers

edit : this is what I did :

\documentclass[a4paper]{report}

\begin{document}
\renewcommand{\thechapter}{}%
\renewcommand{\thesection}{\arabic{section}}

\setcounter{tocdepth}{3} %I want the subsubsection in my ToC
\tableofcontents

\section*{Introduction}
\section{first section}

\appendix
\addcontentsline{toc}{section}{Annexes} % I want the appendix title in my ToC
\addtocontents{toc}{\protect\setcounter{tocdepth}{0}}
\section*{Annexes}

\renewcommand{\thesubsection}{\Alph{subsection}} % And the numbering with letters
\subsection{first appendix}

\end{document}

Best Answer

This should work for most cases:

Edit Meanwhile there is a MWE by the OP. Probably, the OP forgot to compile twice.

\documentclass{report}


\renewcommand{\thesection}{\arabic{section}}



\begin{document}
\tableofcontents
\section{First} \label{firstsection}
\subsection{First section} \label{firstsubsection}

\end{document}
Related Question