I'm trying to set header with Chapter title on the right and Section title on the left (with appropriate numbers in front of them). Also, I need to use short titles for header and long titles for ToC.

I am using single side document KOMA-Script Book with scrlayer-scrpage.

Please help...

up vote 2 down vote accepted

Set option autoneside=false for package scrlayer-scrpage if you want to use both chapter and section titles in a onesided document.

Set class option headings=optiontohead if the optional argument of sectioning commands should be used for the page header and not for ToC by default.

Example:

\documentclass[
  headings=optiontohead,
  twoside=false
]{scrbook}

\usepackage[autooneside=false,automark]{scrlayer-scrpage}
\clearpairofpagestyles
\ihead{\leftmark}
\ohead{\rightmark}
\cfoot*{\pagemark}

\usepackage{lipsum}% only for dummy text
\begin{document}
\tableofcontents
\chapter[Short chapter title]{Long chapter title for document and TOC}
\section[Short section title]{Long section title for document and TOC}
\lipsum
\chapter{A chapter}
\section{A section}
\lipsum
\end{document}

enter image description here

enter image description here

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.