Remove chapter 0 before table of contents

header-footertable of contents

I want remove 0 before table of contents, also chapitre 0. and the rule.

enter image description here

The code used is:

\documentclass[a4paper,12pt,towside]{book} 
\usepackage{setspace}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern,textcomp}
\usepackage[square,numbers]{natbib}
\usepackage[english,french]{babel}
\usepackage{textgreek}
\usepackage[explicit]{titlesec}

\usepackage{xcolor}

\usepackage{kantlipsum}% only dummy text <<<
\newlength\chapnumb
\setlength\chapnumb{3cm}

\titleformat{\chapter}[block] {
    \normalfont\sffamily}{}{0pt} {
    \parbox[b]{\chapnumb}{
        \fontsize{120}{110}\selectfont\thechapter}
    \parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{
        \raggedleft
        \hfill{\LARGE#1}\\
        \rule{\dimexpr\textwidth-\chapnumb\relax}{0.4pt}
    }
}

\titleformat{name=\chapnumb,numberless}[block]
{\normalfont\Huge\sffamily}{}{0pt}
{\parbox[b]{\chapter}{%
        \mbox{}}%
    \parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{%
        \raggedleft%
        \hfill{\LARGE#1}\\
        \rule{\dimexpr\textwidth-\chapnumb\relax}{0.4pt}}}
    
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength{\headheight}{14pt} % regler l'espace entete/paragraph
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{#1}}

\fancyhf{}
\fancyhead[RO]{\makebox[0pt][l]{
        \colorbox{teal}{\makebox[\textwidth][l]{\bfseries\textcolor{white}{\thepage}\enskip}}\hspace*{0em}}} % numéro de page dans l'en-tête alterné, \textbf : gras,
\fancyhead[LE]{\makebox[0pt][r]{\colorbox{teal}{\makebox[\textwidth][r]{\bfseries\textcolor{white}{\thepage}}}\hspace*{0em}}} 
\fancyhead[LO]{ \textbf{\chaptername~\thechapter{}. \nouppercase{\leftmark}}} % changed <<<<<<<<<<
\fancyhead[RE]{ \textbf{\chaptername~\thechapter{}. \nouppercase{\leftmark}}} % changed <<<<<<<<<<

\renewcommand{\headrulewidth}{0.5pt}

%============== Bibliography ref ==============
\usepackage[sectionbib]{chapterbib}
\addto{\captionsfrench}{\renewcommand{\bibname}{Références}}

\begin{document}


\frontmatter
\newpage
\tableofcontents




%%%%%%%%%%%%%%%% CHAPITRES %%%%%%%%%%%%%%%%
\mainmatter
\setcounter{page}{1}
\include{chp1/chp1_main}
\include{chp2/chp2_main}
\include{chp3/chp3_main}

\end{document}

Best Answer

Define two \fancypagestyles, one for frontmatter with no chapter numbers, and one for mainmatter which is what you have now.

By the way, I combined LO and RE because they are the same. And I left the common definitions for both page styles outside of the \fancypagestyle. You can also copy them in both, however, if you prefer that.

Also in the \titleformat for numberless you had mixed up \chapter and \chapnumb.

\documentclass[a4paper,12pt,towside]{book} 
\usepackage{setspace}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern,textcomp}
\usepackage[square,numbers]{natbib}
\usepackage[english,french]{babel}
\usepackage{textgreek}
\usepackage[explicit]{titlesec}

\usepackage{xcolor}

\usepackage{kantlipsum}% only dummy text <<<
\newlength\chapnumb
\setlength\chapnumb{3cm}

\titleformat{\chapter}[block] {
    \normalfont\sffamily}{}{0pt} {
    \parbox[b]{\chapnumb}{
        \fontsize{120}{110}\selectfont\thechapter}
    \parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{
        \raggedleft
        \hfill{\LARGE#1}\\
        \rule{\dimexpr\textwidth-\chapnumb\relax}{0.4pt}
    }
}

\titleformat{name=\chapter,numberless}[block]
{\normalfont\Huge\sffamily}{}{0pt}
{\parbox[b]{\chapnumb}{%
        \mbox{}}%
    \parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{%
        \raggedleft%
        \hfill{\LARGE#1}\\
        \rule{\dimexpr\textwidth-\chapnumb\relax}{0.4pt}}}
    
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength{\headheight}{14pt} % regler l'espace entete/paragraph
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{#1}}

\fancyhf{}
\fancyhead[RO]{\makebox[0pt][l]{
        \colorbox{teal}{\makebox[\textwidth][l]{\bfseries\textcolor{white}{\thepage}\enskip}}\hspace*{0em}}} % numéro de page dans l'en-tête alterné, \textbf : gras,
\fancyhead[LE]{\makebox[0pt][r]{\colorbox{teal}{\makebox[\textwidth][r]{\bfseries\textcolor{white}{\thepage}}}\hspace*{0em}}} 

\fancypagestyle{mainmatter}{
  \fancyhead[LO,RE]{ \textbf{\chaptername~\thechapter{}. \nouppercase{\leftmark}}} % changed <<<<<<<<<<
  \renewcommand{\headrulewidth}{0.5pt}
}

\fancypagestyle{frontmatter}{
  \fancyhead[LO,RE]{ \textbf{\nouppercase{\leftmark}}} % changed <<<<<<<<<<
  \renewcommand{\headrulewidth}{0pt}
}

%============== Bibliography ref ==============
\usepackage[sectionbib]{chapterbib}
\addto{\captionsfrench}{\renewcommand{\bibname}{Références}}

\begin{document}

\pagestyle{frontmatter}
\frontmatter
\newpage
\tableofcontents

%%%%%%%%%%%%%%%% CHAPITRES %%%%%%%%%%%%%%%%
\mainmatter
\pagestyle{mainmatter}
\setcounter{page}{1}
\include{chp1/chp1_main}
\include{chp2/chp2_main}
\include{chp3/chp3_main}

\end{document}

enter image description here

enter image description here