# How to abreviate the headmark in automark

I have to following setup

\documentclass[12pt,a4paper]{scrreprt}

\automark[chapter]{chapter}
\renewcommand{\chaptermarkformat}{}
\cfoot[\pagemark]{\pagemark}

\begin{document}
\chapter[xxx really long title xxx xxx really long title xxx xxx really long title xxx]{Study 1}
\label{study1}
\section*{xxx really long title xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
\end{document}


Since automark uses the TOC entry in \lohead, it gets 3 lines long which is too much. Is there a way to somehow tweak some latex variables that instead of the long TOC entry the Study 1 would be taken?

• Hi @Gabriel, did my answer solved you problem? If yes, it would be nice if you accept it. If no, why not? – Tobi Oct 8 at 21:02

If you activate the klasse option headings=optiontohead|optiontotoc|optiontoheadandtoc*, you can use the options head={…} and tocentry={…} in the optional argument of sectioning macros.

\documentclass[12pt,a4paper,headings=optiontohead]{scrreprt}

\automark[chapter]{chapter}

\usepackage{lipsum}% only for demonstration

\begin{document}
\tableofcontents
\lipsum
\chapter[Only in Head (B)]{In ToC and Text (B)}
\lipsum

(*) all possible three settings activate the extended support for the optional argument of sectioning macros. The option you give defines what happens when you use the optional argument as usual. (the fourth possible value optiontotocandhead is just a synonym of optiontoheadandtoc)
• Yes, perfect! I used headings=optiontohead – Gabriel Oct 30 at 12:39