# Yathesis: problem with part headers

I am writing my dissertation with a class Yathesis and I am facing a problem with headers. My work consists of chapters divisions which are themselves divided in parts. I need to write text (the introduction of each part) between each part's title and the first chapter of each part. However, the header of the text of the introduction of each part is wrongly refering a previous chapter. I would need either to erase the header of the introduction of my parts, or to make appear the proper part's title. As the \part division are "numbered" and appear in the TOC, I can't understand why there is overlapping headers, neither how to fix it.

Neither \markboth{}{} nor markright{} works: the title I manually added don't erase the automatic header, which leads to have two headers.

\thispagestyle{empty} clears the header on one page, when introduction of part may takes several pages. \pagestyle{empty} clears all headers from the use of this command, including headers of the following chapters.

Thank you for your help !

Here is my MWE:

\documentclass{yathesis}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{lipsum}

\begin{document}

\tableofcontents
\mainmatter

\chapter*{Introduction}
\lipsum[1-15]

\part{Titre partie 1}
\lipsum[1-15]
\chapter{Titre chapitre 1}
\section{Titre section 1.1}
\lipsum[1-15]

\end{document}

• Your "work consists of chapters divisions which are themselves divided in parts." but this is a misuse of sectioning scheme of the book class (upon which is based yathesis): parts (level -1) are "above" chapters (level 0). – Denis Bitouzé Jul 21 '18 at 13:31
• @DenisBitouzé Do you mean that sectioning with parts is a misuse of the sectioning scheme of the book class (upon which is based yathesis) ? I checked the link you gave but I didn't understand your point. – mailysmanu Jul 23 '18 at 18:49
• No: sectioning with parts is okay. What I meant is parts are divided in chapters but not the other way round. – Denis Bitouzé Jul 24 '18 at 12:42
• @DenisBitouzé Ok in that case the misdoing is the writing of my sentence rather than my use of sectioning scheme. I am dividing parts in chapters. I should have said "chapters grouped into parts" – mailysmanu Jul 25 '18 at 18:46
• Okay. Because empty headers as well as headers containing the parts' titles may be desirable, I'm not inclined to implement either one or the other. As a workaround, you could start the content of your part with a chapter entitled e.g. "Introduction de la partie 1". – Denis Bitouzé Jul 29 '18 at 13:24

You could define and use an environment for the part introdcutions.

\documentclass{yathesis}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{lipsum}

\makeatletter
\newenvironment{partintroduction}
{\cleardoublepage}
\makeatother

\begin{document}
\tableofcontents

\mainmatter
\chapter*{Introduction}
\lipsum[1-15]

\part{Titre partie 1}
\begin{partintroduction}
\lipsum[1-15]
\end{partintroduction}
\chapter{Titre chapitre 1}
\section{Titre section 1.1}
\lipsum[1-15]

\part{Titre partie 2}
\begin{partintroduction}
\lipsum[1-15]
\end{partintroduction}
\chapter{Titre chapitre 2}
\section{Titre section 2.1}
\lipsum[1-15]
\end{document}


Or to get page style empty on these pages:

\documentclass{yathesis}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{lipsum}% only for dummy text

\newenvironment{partintroduction}
{\thispagestyle{empty}\pagestyle{empty}}
{\cleardoublepage}

\begin{document}
\tableofcontents

\mainmatter
\chapter*{Introduction}
\lipsum[1-15]

\part{Titre partie 1}
\begin{partintroduction}
\lipsum[1-15]
\end{partintroduction}
\chapter{Titre chapitre 1}
\section{Titre section 1.1}
\lipsum[1-15]

\part{Titre partie 2}
\begin{partintroduction}
\lipsum[1-15]
\end{partintroduction}
\chapter{Titre chapitre 2}
\section{Titre section 2.1}
\lipsum[1-15]
\end{document}