I am using \addchap it does not seem to work in my code when I dont include \usepackage{unnumberedtotoc}, when I include\usepackage{unnumberedtotoc} it works but I still get some errors like command\nonumberline already defined and command\addxcontentsline already defined. Anyway I want to know if I can get rid of \addchap by using another command here is the code:
\immediate\write18{makeindex \jobname.nlo -s nomencl.ist -o \jobname.nls}
\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[french]{babel}
\usepackage{setspace}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\usepackage{unnumberedtotoc} %https://github.com/johannesbottcher/unnumberedtotoc/
\usepackage[automark,
plainheadsepline,
headsepline,
plainfootsepline,
footsepline,
markcase=ignoreupper]{scrlayer-scrpage}
\ihead*{\leftmark}
\cfoot*{\pagemark}
\setkomafont{pageheadfoot}{\scshape}
\usepackage{titlesec}
\def\frenchlistfigurename{Liste des figures}
\usepackage[a4paper,right=20mm,left=25mm,top=26mm, bottom=26mm]{geometry}
\makeatletter
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}{0pt}{0pt}{20pt}
\makeatother
\title {Title of the thesis}
\titleformat{\paragraph}
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\usepackage[thin, , thinc]{esdiff}
\usepackage{nomencl}
\begin{document}
\doublespacing
\maketitle
\tableofcontents
\addchap{Publications et communications}
\section*{$\:$ a. Publications:}
\section*{$\:$ b. Communications:}
\addchap{Remerciements}
\end{document}
\chapter*{Publications et communications} \addcontentsline{toc}{chapter}{Publications et communications}give you the desired result? – leandriis Mar 08 '20 at 14:01