The problem I am having is, sometimes the section or chapter title is too long to be fit into the header space and overlaps with other content. Is there any way to automatically substitute excessive texts with "…" or whatever is appropriate?
Here is MWE
% !Mode:: "TeX:UTF-8"
\documentclass[UTF8, english]{book}
\usepackage{babel}
\usepackage{blindtext}
\usepackage{lipsum}
\usepackage{fancyhdr}
\fancyhf{}
\fancyhead[LE, RO]{\scriptsize \slshape \rightmark} %% Section number and title.
\fancyhead[RE, LO]{\scriptsize \slshape \leftmark} %% Chapter number and title.
\fancyfoot[R]{\scriptsize \thepage} %% Page number.
\begin{document}
\pagestyle{fancy}
\chapter{Asymptotic Behaviour of Supersymmetric Yang Mills Theories in The Two Loop Approximation}
\blindtext
\section{Calculation of $\beta \left( g \right)$}
\lipsum
\end{document}
Thank you in advance!
\section[short title]{long title}
?\chapter
to define a short version of the chapter title.