我从今天早上就遇到这个问题,但我不知道如何解决:
正如您所看到的,我已经突出显示了该问题,这是我的代码:
\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}
这是stage_iut_mp
课程:
\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}}
答案1
我想我明白了。在代码摘录的第 24 行中,您有:
\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>
将其更改为:
\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>
虽然我无法测试它,但显然章节目录行位于章节目录行的顶部。原因显然是那里缺少换行符。如果它不起作用,我会删除我的答案。