I'm using scrbook for a collection of papers. Every chapter has a different author, and is typeset with a custom command. I want the headers alternate between chapter and author (rather than whatever is section) -- so I redefine \markright and afterwards use \rightmark in scrlayer-scrpage's \cohead.
Here's an MWE:
\documentclass[a4paper,10pt,headings=optiontohead,version=last,openany]{scrbook}
\author{Immanuel Kant}
\title{Doubling section titles}
\usepackage{kantlipsum}\date{}
%% make individual papers chapters
\usepackage{suffix}
\renewcommand{\sectionmark}{}%prevent rewriting \markright
\renewcommand{\subsectionmark}{}%prevent rewriting \markright
\newcommand{\chapterauthor}[1]{\authortoc{#1}\printchapterauthor{#1}\markright{#1}}% setting \markright to author
\makeatletter
\newcommand{\printchapterauthor}[1]{%
{\parindent0pt\vspace*{-10pt}%
\linespread{1.1}\large\scshape#1%
\par\nobreak\vspace*{30pt}}
\@afterheading%
}
\newcommand{\authortoc}[1]{%
\addtocontents{toc}{\vskip-10pt}%
\addtocontents{toc}{%
\protect\contentsline{chapter}%
{\hskip1.3em\mdseries\scshape\protect\scriptsize#1}{}{}}
\addtocontents{toc}{\vskip5pt}%
}
\makeatother
%% put authors in headers
%% http://tex.stackexchange.com/a/228219/12934
\usepackage{scrlayer-scrpage}
\clearpairofpagestyles
\renewcommand{\chaptermarkformat}{}
\cohead{\small{\rightmark}}
\cehead{\small{\leftmark}}
\cfoot*{\pagemark}
\begin{document}
\maketitle
\chapter{Erst}
\chapterauthor{Auguste Comte}
\kant[2]
\section{Quite positive}
\kant[3]
\end{document}
Something happens because of fiddling with \sectionmark, and section titles print twice. My question is: What causes doubling of the titles and how to avoid it? Thank you for suggestions!


\sectionmark.;-)– egreg May 21 '15 at 17:46\sectionmark-- but that didn't take me too far :) – Ivan Kapitonov May 21 '15 at 17:50