# How to set author, title and date in KOMA script header (scrlayer-scrpage)?

How can I customize the header to have \author, the \title and the \date in the header and underline it?

Since I use a Koma Script document class I want to avoid the fancyhdr package and use scrlayer-scrpage. I have tried \chead{\title \author \date} but it does not change maybe due to the automark option in \usepackage[automark]{scrlayer-scrpage}. I want the header to be on every page except the title page and list of contents.

So in fancyhdr the code would be:

\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{}
\fancyfoot[CE,CO]{\thepage}
\fancyfoot[LE,RO]{}


Here is how you could 'translate' your fancyhdr into scrlayer-scrpage:

\documentclass[headinclude=true]{scrbook}
\usepackage{blindtext}

\clearpairofpagestyles

\cfoot*{\pagemark}

% If you want to change the font/shape etc.:
%   \setkomafont{pagenumber}{...}

\begin{document}
\blinddocument
\end{document}


If you want to automate the author/title insertion, you could add

   ...
\usepackage{titling}