I have a (onesided) document with fancyhdr and pagestyle fancy so it displays the section-title on the right header and the subsection-title on the left header. If section and subsection titles are lengthy they start to overlap each other.
Example:
\documentclass[a4paper,10pt]{scrartcl}
\usepackage[utf8x]{inputenc}
\usepackage{lipsum}
\usepackage{fancyhdr}
\pagestyle{fancy}
\begin{document}
\section{some section with quite a lengthy title}
\lipsum
\subsection{very very very long title of subsection}
\lipsum
\end{document}
I know of two solutions:
give short section/subsection headings like in
\documentclass[a4paper,10pt]{scrartcl} \usepackage[utf8x]{inputenc} \usepackage{lipsum} \usepackage{fancyhdr} \pagestyle{fancy} \begin{document} \section[short section]{some section with quite a lengthy title} \lipsum \subsection[short subsection]{very very very long title of subsection} \lipsum \end{document}I don't like this because I don't want to have the short version in my toc.
use
\sectionmarklike in\documentclass[a4paper,10pt]{scrartcl} \usepackage[utf8x]{inputenc} \usepackage{lipsum} \usepackage{fancyhdr} \pagestyle{fancy} \begin{document} \section{some section with quite a lengthy title} \sectionmark{short section} \lipsum \subsection{very very very long title of subsection} \subsectionmark{short subsection} \lipsum \end{document}But this just doesn't work right - the short subsection mark is not obeyed on page 2, but is used correctly on page 3. That feels just really wrong.
So, how can I make version 2 work 'right'?