latex appendix subsections overlap toc code example
Example: latex chapter name and subsection overlap headers
\documentclass[a4paper,12pt]{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[LE,RO]{\itshape \nouppercase \rightmark}
\fancyhead[LO,RE]{\itshape \nouppercase Chapter \arabic{chapter}}
\begin{document}
\chapter{This chapter has a rather long name}
\section{This section also has a long name}
\eject
abc
\eject
def
\eject
ghi
\end{document}