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

header-footerrules

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.

page layout

Best Answer

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

\documentclass{report}

\usepackage[nouppercase,headsepline,footsepline,plainfootsepline]{scrpage2}
\automark{section}
\pagestyle{scrheadings}
\clearscrheadfoot
\ihead{(Document title)}
\ofoot[\pagemark]{\pagemark}% Optional argument controls chapter-starting pages
\ifoot[(Author) -- \headmark]{(Author) -- \headmark}

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

\usepackage{blindtext}

\begin{document}

\blinddocument

\end{document}

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