I have a document class that auto generates header from some user input. The problem is the first page should have a different page header than the others and the headline can be multi line. So \headheight is too small. Here is a demonstration of the problem:
\documentclass[twoside]{scrartcl}
\newcommand{\longfirstpagehead}{%
\begin{minipage}{10cm}
some\\long\\text\\text\\text\\text\\text\\text
\end{minipage}}
\newcommand{\normalhead}{normal}
\usepackage{scrpage2}
\newpagestyle{firstpage}{%
{\longfirstpagehead\hfill} %twoside links
{\longfirstpagehead\hfill} %twoside rechts
{\longfirstpagehead\hfill} %oneside
(\textwidth,1pt)
}{%
{\pagemark\hfill} %twoside links
{\hfill\pagemark} %twoside rechts
{\hfill\pagemark} %oneside
} %
\newpagestyle{normal}{%
{\normalhead\hfill} %twoside links
{\normalhead\hfill} %twoside rechts
{\normalhead\hfill} %oneside
(\textwidth,1pt)
}{%
{\pagemark\hfill} %twoside links
{\hfill\pagemark} %twoside rechts
{\hfill\pagemark} %oneside
} %
\pagestyle{normal}
\AtBeginDocument{
\thispagestyle{firstpage}}
\usepackage{blindtext}
\begin{document}
%\vspace*{1cm}
\blindtext
\blindtext
\pagebreak
\end{document}
I tried to read the height with \settototalheight and:
- add a
\vspaceat beginning of document (unnice hack):- still the bad box warning (of cause)
- first section has different alignment
- manually change
\headheightin pagestyle- text height and page foot is wrong (can't change this because some scoping?)
- use
Komascriptin pagestyle\recalctypeareawarning
geometryin pagestyle- pretty much the same problem like the manual attemp
So I would like to change the \headheight for the pagestyle firstpage, but the page should still have the same page margins, etc. The problem is that this has to work with \thispagestyle. (Better Ideas are also welcome) Something like \thispagegeometry in geometry would be great. ;)
\vspace? – egreg Feb 1 '12 at 22:17vspacethis behavior changed. Hmm, can't reproduce this problem in MWE. Maybe this page filling is non default – someonr Feb 1 '12 at 22:25\vspacedid you use? – egreg Feb 1 '12 at 22:30\vspace*. Sry, I think the MWE isn't including this problem. As soon as I find out why myclsis filling the page by increasing spaces, i'll add MWE. – someonr Feb 1 '12 at 22:37\vspace*? – egreg Feb 1 '12 at 22:37