Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm writing a document using the Koma-Script class scrartcl (3.09a).

I want to have a header and a footer on every page, but the header of the first page should be different from the others.

So using \newpagestyle from the scrpage2 package I define two page styles, MyFirstPageStyle and MyPageStyle, and I use them like this:

\pagestyle{MyPageStyle}
\thispagestyle{MyFirstPageStyle}

Since the header of the first page is quite big, it overlaps with the content of the first page. I could fix this by passing [headinclude=true, headheight=2cm] as class options. But this also affects the headers of all other pages, where the header is just one line in height.

So my question is how can I set headheight for the first page only, without affecting the other pages?

To make more clear how it should look in the end: The white space between the top of the header and the top of the page should be the same for all pages. But the header of the first page is larger, so the content of the first page should move down a little bit.

Full minimal example:

\documentclass{scrartcl}

\usepackage[ngerman]{babel}
\usepackage{cmap}
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}

\usepackage[headsepline,footsepline]{scrpage2}

\usepackage{graphicx}
\usepackage{calc}
\usepackage{lastpage}

\newpagestyle{MyTitlePageStyle}
{
  {}
  {}
  {
    \begin{minipage}{\textwidth-5.5cm}
      \normalfont\sffamily\Large\bfseries
      DigSig1 Praktikum 1 - Lösungen \\
      Signalabtastung / Zeitdiskretisierung
    \end{minipage}
    \hfill
    \begin{minipage}{5cm}
      \includegraphics[width=\textwidth]{HSR}
    \end{minipage}
  }
}
{
  {}
  {}
  {
    \normalfont
    HRO, \today
    \hfill
    \pagemark{}/\pageref{LastPage}
  }
}

\newpagestyle{MyPageStyle}
{
  {}
  {}
  {
    \normalfont
    DigSig1 Praktikum 1 - Lösungen
    \hfill
    Signalabtastung / Zeitdiskretisierung
  }
}
{
  {}
  {}
  {
    \normalfont
    HRO, \today
    \hfill
    \pagemark{}/\pageref{LastPage}
  }
}

\pagestyle{MyPageStyle}
\thispagestyle{MyTitlePageStyle}

\begin{document}

content

\end{document}

With the code provided above, the header of the first page overlaps with the content of the first page. When I use

\documentclass[headinclude=true, headheight=2cm]{scrartcl}

instead, it looks fine for the first page, but it also increases the white space above the headers of the following pages, which I don't want.

share|improve this question
    
Please provide a full minimal example. You can influence options in the document body with the command \KOMAoptions. –  Marco Daniel Oct 2 '11 at 11:30
add comment

2 Answers

up vote 2 down vote accepted

Write

\AtBeginDocument{\vspace*{2\baselineskip}}

or, simply

\begin{document}
\vspace*{2\baselineskip}

The first form is more suitable if you're preparing a personalized .sty file. Change the 2 into what is best for you.

share|improve this answer
    
I like the solution with AtBeginDocument the most because this way I can handle the page setup completely in the preamble. Thanks! –  Robert Hegner Oct 2 '11 at 16:38
add comment

You can customize options within the document using \KOMAoption or \KOMAoptions. If you change the layout parameters, \recalctypearea recalculates the layout for you.

Example:

\KOMAoptions{headheight=3cm,headinclude=true}
\recalctypearea
content of first page
\KOMAoptions{headheight=1.25\baselineskip,headinclude=false}
\recalctypearea
\clearpage
further content

Note that you might have to do further adjustments because of the different values of headinclude. If necessary, you can make further adjustments to the textbody using \areaset.

Or consider using headinclude=true consistently in the document.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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