I faced a problem with the Table Of Content in LaTeX (see the picture)problem with the table of content in LaTeX

The code I'm using:








\renewcommand{\headrulewidth}{0.5pt}% Remove header rule
\fancyhead[L]{\small{Rapport Projet Maths}}
\fancyhead[C]{Projet Maths}
\fancyhead[R]{\small{ENSISA -- Mulhouse (2021--2022)}}


\subsection*{Définition des termes utilisés}
\addcontentsline{toc}{subsection}{Définition des termes utilisés}
\section{choix uniforme de l'un des $K$ traitements}

Also, I would like to know why there are no dots for section like there are for subsection.

  • 3
    First of your should provide a full but minimal exmaple that others can copy and test as is. Secondly, it is probably not a good idea to redefine \thesection like that. Perhaps you should explain what your end goal is here.
    – daleif
    May 17, 2022 at 16:06
  • What is the \no does? Did you define it?
    – Tom
    May 17, 2022 at 16:06
  • @Tom, the \no command is defined in \usepackage[french]{babel} which show May 17, 2022 at 16:14
  • Could you provide a minimal work example? include all the setting in your preamble and some basic content in the document
    – Tom
    May 17, 2022 at 16:19
  • 1
    Not really, we cannot copy this and compile it without adding anything. For example there's no document class
    – daleif
    May 17, 2022 at 16:55

1 Answer 1


Use the tocloft package.


Provide more space for the section number:

\renewcommand{\cftsecnumwidth}{4em} % change 4em to suit

Dotted leader for sections:


Read the manual for more information.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .