# [Tex/LaTex] How to set style of header and footer with horizontal lines in report document type

How can I set the header and footer for pages as in the picture below:

1. On the top – title of the document and horizontal line below it.
2. On the bottom – author's name and title of subsection on the left side and page numbering on the right, with horizontal line above.

Here's an example using the scrpage2 package from the KOMA-Script bundle.

\documentclass{report}

\automark{section}
\ofoot[\pagemark]{\pagemark}% Optional argument controls chapter-starting pages

\renewcommand*{\footfont}{\normalfont\slshape}

\usepackage{blindtext}

\begin{document}

\blinddocument

\end{document}


EDIT: Used the \automark command in order to display section headings.