I am trying to create a LaTeX template with a specific header. Here is what I am trying to do :
- Left odd : \subsubsection
- Right odd : My name, I can deal with this one :)
- Left even : \subsection
- Right even : \chapter
For each title, I only want the title and not "Chapter 1 : chaptername".
I have used this :
\renewcommand{\subsectionmark}[1]{\markright{#1}}
\renewcommand{\subsubsectionmark}[1]{\markleft{#1}}
But it does only work for two titles, right ?
Here is my code :
\documentclass[12pt,twoside]{book}
\usepackage{fontspec}
\usepackage{lipsum}
\setmainfont{[ACaslonPro-Regular.otf]}
\newfontfamily{\acasSb}{ACaslonPro-Semibold.otf}
\newfontfamily{\acasB}{ACaslonPro-Bold.otf}
\newfontfamily{\acasR}{ACaslonPro-Regular.otf}
\newfontfamily{\frutL}{FrutigerLTStd-Light.otf}
\newfontfamily{\frutB}{FrutigerLTStd-Bold.otf}
\newfontfamily{\frutR}{FrutigerLTStd-Roman.otf}
\usepackage[paperheight=240mm,paperwidth=160mm, left=22mm, right = 20mm, top = 20mm, bottom = 22mm]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\subsectionmark}[1]{\markright{#1}}
\renewcommand{\subsubsectionmark}[1]{\markleft{#1}}
\fancyhead[LO]{\fontsize{8}{12} \selectfont \acasB \textsc{\rightmark}}
\fancyhead[RO]{}
\fancyhead[C]{}
\fancyhead[LE]{\fontsize{8}{12} \selectfont \acasB \rightmark}
\fancyhead[RE]{\fontsize{8}{12} \selectfont \acasB \textsc{\leftmark}}
\begin{document}
\chapter{This should be on right even}
\section{This should not appear at all}
\subsection{This should be on left even}
\subsubsection{This should be on odd left}
\lipsum[1-8]
\end{document}
Thanks for your help