0

I read: I cannot rename table of contents Renaming the Table of Contents doesn't work! Renaming table of content to something else

But I didn't find the right answer.

I would like to modify the default text generated by the command

\tableofcontents

Someone has the solutions ?

  • 1
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 08 '22 at 19:51
  • It's ok now, as you can see below. Thanks – Jean-Yves L Jan 09 '22 at 16:12

2 Answers2

0

I found the answer:

\addto\captionsfrench{% Replace "french" with the language you use
    \renewcommand{\contentsname}%
    {Liste des pièces}%
}
0

I know that I am a GOM (Grumpy Old Man) but at my time of life that is par for the course. I think that the generic answer to the question as asked is:

The standard LaTeX classes (and many others) use \contentsname, \listfigurename and \listtablename as the titles of the ToC, LoF and LoT repectively. Hence just redefine \contentsname.

% tocnameprob.tex SE 629526

\documentclass{article} \renewcommand{\contentsname}{Liste des pi`{e}ces} \begin{document} \tableofcontents \section{First} \end{document}

Note that the question made no mention of French.

Peter Wilson
  • 28,066