0

I'm facing this problem since this morning and I don't know how to fix it:

enter image description here

As you can see I've highlighted the issue and this is my code :

\documentclass{stage_iut_mp}
\usepackage{float}
\usepackage{longtable}
\usepackage{afterpage}
\usepackage{array}
\usepackage{makecell}
\usepackage[bottom]{footmisc}
\usepackage{seqsplit}
\usepackage{verbatim}
\usepackage{url}
\usepackage{minitoc}
\usepackage[title]{appendix}
\usepackage{footmisc}
\renewcommand{\labelenumii}{\theenumii}
\renewcommand{\theenumii}{\theenumi.\arabic{enumii}.}
\renewcommand{\thefigure}{\arabic{figure}}
\newcommand\tab[1][1.25cm]{\hspace*{#1}}

\usepackage{chngcntr}

\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}

\usepackage{titletoc}% http://ctan.org/pkg/titletoc
\titlecontents*{chapter}% <section-type>
  [0pt]% <left>
  {}% <above-code>
  {\bfseries\chaptername\ \thecontentslabel\quad}% <numbered-entry-format>
  {}% <numberless-entry-format>
  {\bfseries\hfill\contentspage}% <filler-page-format>

 \let\origaddvspace\addvspace
 \renewcommand{\addvspace}[1]{}

\addto{\captionsfrench}{% Making babel aware of special titles
  \renewcommand{\mtctitle}{Plan}
}

\newcommand*{\blankpage}{%
\vspace*{\fill}
{\centering Cette page a été laissée volontairement libre.\par}
\vspace{\fill}}

\begin{document}

\blankpage
\thispagestyle{empty}

\newpage
\pagenumbering{arabic}
\setcounter{page}{0}
\newpage
\pagestyle{empty}

\section*{\begin{center}
Dédicaces
\end{center} }

\paragraph{}
\newpage
\pagestyle{empty}

\section*{\begin{center}
Remerciements
\end{center} }

\paragraph{}
\newpage
\dominitoc
\tableofcontents
\addtocontents{toc}{\protect\thispagestyle{empty}} 

\newpage
\listoffigures
\vspace{-2em}
\thispagestyle{empty}

\newpage
\listoftables
 \renewcommand{\addvspace}[1]{\origaddvspace{#1}}
\thispagestyle{empty}

\newpage
\pagenumbering{roman}

\pagenumbering{arabic}
\setcounter{page}{1}
\newpage
\section*{\begin{center}
Introduction Générale
\end{center} }
\addcontentsline{toc}{chapter}{\textbf{Introduction Générale}}

\chapter{Étude expérimentale et tests }
\minitoc
\section{Introduction}
\paragraph{}
\section{ Conclusion}
\paragraph{}

\newpage
\phantomsection
\addcontentsline{toc}{chapter}{\textbf{Conclusion Générale}}
\chapter*{\begin{center}
Conclusion Générale
\end{center} }


\end{document} 

and this is stage_iut_mp class :

\ProvidesFile{stage_iut_mp.cls}
\ProvidesClass{stage_iut_mp}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\ProcessOptions
\LoadClass[a4paper,12pt,oneside]{report} 
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{setspace}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb} % pour quelques symboles math�matiques comme <ou=
\usepackage[amssymb,cdot]{SIunits}
\usepackage{mathcomp} % pour avoir le mu droit  $\tcmu$
\usepackage{multirow}
\usepackage{geometry}
\usepackage[Lenny]{fncychap}
\usepackage{palatino}
\geometry{tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm}
\setlength\headheight{15pt}
\renewcommand{\baselinestretch}{1.5} % espace entre les lignes
\pagestyle{headings}
\setcounter{secnumdepth}{3} % permet de num�roter 4 niveaux
\setcounter{tocdepth}{2}    % et en affiche 2 dans la toc   
\def\chapitre#1{\chapter{#1}\newpage}
\renewcommand{\thechapter}{\arabic{chapter}}
\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\thesubsection}{\arabic{subsection})}
\renewcommand{\thesubsubsection}{\alph{subsubsection})} 
\newcommand\remerciements{\chapter*{Remerciements}\addcontentsline{toc}{chapter}{Remerciements}}
\newcommand\introduction{\chapter*{Introduction}\addcontentsline{toc}{chapter}{Introduction}}  
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[R]{\thepage}
\fancyhead[R]{\leftmark} 
\RequirePackage{tocloft}
\renewcommand{\cftchapnumwidth}{\setlength{0.7cm}}
\renewcommand{\cftsecnumwidth}{\setlength{0.7cm}}
\renewcommand{\cftsubsecnumwidth}{\setlength{0.7cm}}
\renewcommand{\cftsubsubsecnumwidth}{\setlength{0.7cm}}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
\renewcommand{\chaptermark}[1]{%
\markboth{\if@mainmatter\@chapapp\ \thechapter. \fi\ #1}%
{\if@mainmatter\@chapapp\ \thechapter. \fi\ #1}}
4
  • 1
    complete MWE please.
    – naphaneal
    May 17 '18 at 12:29
  • i've made edits on my post May 17 '18 at 12:37
  • 1
    What document class is stage_iut_mp? My LaTeX distribution doesn't have it. The kind of thing you're seeing depends a lot on the document class. Try with book and if the error disappears, then post a link to this stage_iut_mp so we can see what's going on. May 17 '18 at 13:07
  • the stage_iut_mp is a cutomized class file i've add it to my post. i've tried with book but it did not work May 17 '18 at 13:19
1

I think I got it. On line 24 of your code excerpt you have:

\usepackage{titletoc}% http://ctan.org/pkg/titletoc
\titlecontents*{chapter}% <section-type>
  [0pt]% <left>
  {}% <above-code>
  {\bfseries\chaptername\ \thecontentslabel\quad}% <numbered-entry-format>
  {}% <numberless-entry-format>
  {\bfseries\hfill\contentspage}% <filler-page-format>

Change this to:

\usepackage{titletoc}% http://ctan.org/pkg/titletoc
\titlecontents*{chapter}% <section-type>
  [0pt]% <left>
  {}% <above-code>
  {\bfseries\chaptername\ \thecontentslabel\quad}% <numbered-entry-format>
  {}% <numberless-entry-format>↓↓↓↓↓↓↓↓ Added \endgraf here to break the line
  {\bfseries\hfill\contentspage\endgraf}% <filler-page-format>

I couldn't test it though, but apparently the section ToC line is on top of the chapter ToC line. The cause apparently is the lack of a line break there. If it doesn't work I'll delete my answer.

2
  • 1
    @ElarbiMohamedAymen Just for clarification: \endgraf is basically the same as \par or a blank line, with the difference that sometimes TeX does not allow \par (or a blank line) in the argument of a macro, whereas \endgraf is allowed. May 17 '18 at 13:23
  • That's good to know really i did not knew that. May 17 '18 at 13:26

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.