I'm designing an exercise sheet and need some help with the header. It looks as it should with my code, but is way too high on the page. Changing the headheight
does not seem to have any effect, only that LaTeX complains if i choose it too low.
Is there a way to get it lower onto the page? Or do i have to do the two-line header in another way?
Additionally, i'd like to know if there's an easy possibility to only show the header on those pages where a new section begins, and not on the other pages (e.g. on the first two pages, but not the last one in the example).
\documentclass[paper=a4, twoside=true, fontsize=11pt, parskip=half, headheight=1cm, DIV=12]{scrartcl}
% Designing the head of the page
\usepackage[automark,headsepline]{scrlayer-scrpage}
\pagestyle{scrheadings}
\ihead{{\normalfont\bfseries Exercise Sheet \thesection\ for some Lecture, Summer 2015}\\
\normalfont Due date: Thursday, 01. January 2015, 10:00}
\ohead{{\normalfont\bfseries Prof. Dr. John Doe}\\
\normalfont email@professor.com}
\chead{}
\usepackage{blindtext}
\begin{document}
\blinddocument
\end{document}
Best Answer
Maybe you are looking for the
headinclude=true
option. You can set this option explicitly\documentclass[...,headinclude=true,...]{scrartcl}
. Or you can set theheadsepline
option as an class option. Thenheadinclude=true
will be set automatically.If there should only be a header in case a section starts on the page use the
plain
pagestyle and switch toscrheadings
using\thispagestyle{scrheadings}
after the\section
commandAlternatively you can load
etoolbox
to patch the\section
command