2

I would like to have a header in my thesis looking like the one in the picture below. I have everything except the chapter title besides the vertical bar. How can I manage that? My document class is report and I'm working with a two sided document. (See code example)

Thank you alot for your help. enter image description here

\documentclass[11pt,a4paper,openright,twoside]{report}

\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage[T1]{fontenc}                            
\usepackage{amsmath}

\RequirePackage[times]{quotchap}
\definecolor{chaptergrey}{rgb}{0.5,0.5,0.5}
\usepackage{fancyhdr}                               
\pagestyle{fancy}

\def\layout{2}  

\ifnum\layout=2 
    \fancyhf{}      
    \renewcommand{\headrulewidth}{0pt}
    \renewcommand{\chaptermark}[1]{\markboth{#1}{}}
    \fancyhead[LE]{\nouppercase{\chaptername~ \thechapter~ |}}
    \fancyhead[RO]{\nouppercase{ \rightmark}}
    \fancyfoot[LE,RO]{\thepage}
    \fancypagestyle{plain}{         
    \fancyhf{}
    \fancyfoot[LE,RO]{\thepage}}    
 \else          
    \renewcommand{\headrulewidth}{0pt}
    \fancyhf{}                  
    \fancyhead[C]{\nouppercase{ \leftmark}}
    \fancyfoot[C]{\thepage}
\fi

\begin{document}
\chapter{Introduction}
\blindtext
\blindtext
\blindtext
\section{subsection}
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext

\end{document}
4

It is very simple with titleps:

\documentclass[11pt,a4paper,openright,twoside]{report}

\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage[T1]{fontenc}
\usepackage{amsmath}

\RequirePackage[times]{quotchap}
\definecolor{chaptergrey}{rgb}{0.5,0.5,0.5}
\usepackage{titleps}
\newpagestyle{mine}{
\sethead[\chaptername~ \thechapter~|~\chaptertitle][][]{}{}{\thesection.~\sectiontitle}
\setfoot[\thepage][][]{}{}{\thepage}
}
\renewpagestyle{plain}{%
\setfoot[\thepage][][]{}{}{\thepage}
}
\pagestyle{mine}

\begin{document}

\chapter{Introduction}
\blindtext
\blindtext
\blindtext
\section{subsection}
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext

\end{document} 

enter image description here

3

Seems like adding \leftmark would give your desired output:

\documentclass[11pt,a4paper,openright,twoside]{report}

\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage[T1]{fontenc}                            
\usepackage{amsmath}

\RequirePackage[times]{quotchap}
\definecolor{chaptergrey}{rgb}{0.5,0.5,0.5}
\usepackage{fancyhdr}                               
\pagestyle{fancy}

\def\layout{2}  

\ifnum\layout=2 
    \fancyhf{}      
    \renewcommand{\headrulewidth}{0pt}
    \renewcommand{\chaptermark}[1]{\markboth{#1}{}}
    \fancyhead[LE]{\nouppercase{\chaptername~ \thechapter~ |~ \leftmark}}
    \fancyhead[RO]{\nouppercase{ \rightmark}}
    \fancyfoot[LE,RO]{\thepage}
    \fancypagestyle{plain}{         
    \fancyhf{}
    \fancyfoot[LE,RO]{\thepage}}    
 \else          
    \renewcommand{\headrulewidth}{0pt}
    \fancyhf{}                  
    \fancyhead[C]{\nouppercase{ \leftmark}}
    \fancyfoot[C]{\thepage}
\fi

\begin{document}
\chapter{Introduction}
\blindtext
\blindtext
\blindtext
\section{subsection}
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext

\end{document}

enter image description here

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.