diff --git a/main.tex b/main.tex index db21a0ec687e221ecba52aa22aa268d8265524cc..9c6af81fd9a9ad589b7e6f95b2f3942b0caf953d 100644 --- a/main.tex +++ b/main.tex @@ -14,11 +14,11 @@ \begin{document} \input{./cover/cover_front} +\frontmatter \clearemptydoublepage \input{./remerciements/remerciements} -\frontmatter \clearemptydoublepage \renewcommand{\contentsname}{Table of Contents} {\hypersetup{hidelinks}\sffamily\tableofcontents} diff --git a/template_phd.cls b/template_phd.cls index 05d3aef45471997abd673db831d19cd2eaffe789..e6e1c09517cdfd72bc014d1dc19f09facdf90285 100644 --- a/template_phd.cls +++ b/template_phd.cls @@ -20,7 +20,6 @@ \RequirePackage{abstract} \RequirePackage{graphicx} \RequirePackage{sectsty} -\RequirePackage{shorttoc} \RequirePackage{fancyhdr} \RequirePackage{pifont} \RequirePackage{color} @@ -440,8 +439,7 @@ \fancyhf{} % on annule le fancy automatique - -%%%%%%%%%% Gerer les en tetes dans les frontmatter mainmatter et backmatter +% headers and footers \RequirePackage{geometry} \RequirePackage{etoolbox} @@ -449,28 +447,37 @@ \renewcommand{\sectionmark}[1]{} \renewcommand{\chaptermark}[1]{\markboth{\textit{#1}}{}} \fancyhead[LE,RO]{\small\thepage} - \fancyhead[RO]{\small\leftmark} % \rightmark = section courante - \fancyhead[LE]{\small\leftmark} % \leftmark = chapitre courant - \fancyfoot[C]{\thepage} % marque la page au centre +\fancyhead[RO]{\small\sffamily\bfseries\leftmark} +\fancyhead[LE]{\small\sffamily\bfseries\leftmark} +\fancyfoot[C]{\thepage} + +% https://tex.stackexchange.com/questions/170854/headers-of-toc-and-fancyhdr +\patchcmd{\tableofcontents} + {\MakeUppercase} + {} + {}{} +\patchcmd{\tableofcontents} + {\MakeUppercase} + {} + {}{} } \appto\mainmatter{\pagestyle{fancy} \renewcommand{\sectionmark}[1]{\markright{\sffamily\bfseries{\thesection.\ #1}}} \renewcommand{\chaptermark}[1]{\markboth{\sffamily\bfseries\chaptername~\thechapter~--\ #1}{}} \fancyhead[LE,RO]{\small\thepage} - \fancyhead[RO]{\small\rightmark} % \rightmark = section courante - \fancyhead[LE]{\leftmark} % \leftmark = chapitre courant - \fancyfoot[C]{\thepage} % marque la page au centre +\fancyhead[RO]{\small\rightmark} +\fancyhead[LE]{\small\leftmark} +\fancyfoot[C]{\thepage} } \appto\backmatter{\pagestyle{fancy} \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}} \renewcommand{\chaptermark}[1]{\markboth{\chaptername~\thechapter~--\ #1}{}} \fancyhead[LE,RO]{\small\thepage} - \fancyhead[RO]{} % \rightmark = section courante - \fancyhead[LE]{} % \leftmark = chapitre courant - \fancyfoot[C]{\thepage} % marque la page au centre - +\fancyhead[RO]{} +\fancyhead[LE]{} +\fancyfoot[C]{\thepage} } % MATISSE/CS info