I want to add dots in my table of contents, and modify its size. I know there were tons of questions in the style, but I'm incredibly dumb. I don't even know what the \begin command do. I also want to change the language. I don't want it to write "contents" but "table des matieres" which is in french.

Here are my 2 lines


Please tell me what I should add and where. I tried many stuff, and I don't have time in front of me to learn latex.

Thank you very much

  • Welcome to TeX.SE... Can you elaborate your question with a required screenshot or something else...
    – MadyYuvi
    Mar 20 '20 at 11:35
  • The titletoc package, which comes with titlesec, but can be used independently, has a \dottedcontents command, and other tools to format the title of contents. See §6, pp. 14–20 of the titlesec documentation.
    – Bernard
    Mar 20 '20 at 12:02

Inspired by @Bernard's comment and borrowing from Overleaf and @cmhughes' answer to a similar question:




% \dottedcontents{<section>}[<left>]{<above-code>}{<label width>}{<leader width>}



\vspace{2cm} % Add a 2cm space

Ceci est un bref résumé du contenu du document écrit en français.

\section{Section d'introduction}
Il s'agit de la première section, nous ajoutons des éléments supplémentaires et tout sera correctement orthographiés. En outre, si un mot est trop long et doit être tronqué, babel va essayer de tronquer correctement en fonction de la langue.


\section{Section théorèmes}
Cette section est de voir ce qui se passe avec les commandes de texte qui définissent.



enter image description here


I don't really know what you are after: what does "changing size" refer to; where do you want to add dots?

However the tocloft package is the answer. Below is an MWE that shows how it can be used.

% tocprob4.tex SE 533373 Customize ToC, dots and size
\renewcommand{\contentsname}{table des matieres} % change the title
\renewcommand{\cftchapdotsep}{\cftdotsep} % add dots for chapters
\renewcommand{\cftsecdotsep}{10} % increase space between dots for sections
\renewcommand{\cftdot}{\ensuremath{\ast}} % replace dots by asterisks
%\renewcommand{\cftdot}{\Large .} % make dots Large

\addtocontents{toc}{\hfill \textbf{Page}\par} % put Page above page numbers

\chapter{A chapter}
\section{A section}
Some text in a section.
\subsection{A subsection}
Some text in a subsection.

Read the documentation (texdoc tocloft) for more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.