I'm studying at a Cooperative State University and need to write a report about my activities at work. Our department provided us with templates for all kind of document we have to fill out and attach to our report and I converted them from Office to LaTeX documents. In the next step I wanted to combine all the templates to one single document.

Now my question is: Is there a way to define different \headheight in one document? I would need at least 4 different headers for all particular documents.

Here is an example of my documents code:

\documentclass[12pt, oneside]{report}

    \if@filesw % respect \nofiles
        % same write register as environment `filecontents` uses
        \chardef\reserved@c=15 %


\usepackage[top = 2cm, bottom = 2cm, left = 2.5cm, right = 2cm, includehead, showframe]{geometry}




    Hello World!


And here is an example of my title page:





        \textsc{\bfseries\LARGE\color{red} Praxisarbeitsthema} \\[2.5cm]

        \textsc{\Large Praxisarbeit} \\[1cm]
        \textsc{\Large für das 1. Studienjahr} \\[2cm]

        im Studiengang Informatik \\[0.5cm]
        an der Dualen Hochschule \\[0.5cm]
        Baden--Württemberg Heidenheim \\[1cm]

        vorgelegt von \\[0.5cm]
        \textsc{\Large Name} \\[2cm]




    \begin{tabular}{ l l }
        Matrikelnummer: & whatever\\
        Ausbildungsfirma: & whatever\\
         & whatever | whatever \\
        Gutachter der Ausbildungsfirma: & {\color{red}Name}


As you can see, actually I hope you can, the header on the page after my title page still got the same \headheight, but without the content. I hoped that the atveryend package would set the \headheight for each page individually, but it doesn't work or I'm doing something wrong.

So is there a nice and nifty way to solve this problem? And sorry for the really long question and code examples.



Since you're using the geometry package, you can set the \headheight using that. To set the initial value, use

\usepackage[...other options...,headheight=<length>]{geometry}

and to change it on successive pages, use

\newgeometry{headheight=<new value>}

However, all of the other options will also have to be given again in \newgeometry.

For more information, check the geometry package documentation, also available from your local distrubution with texdoc geometry.

| improve this answer | |
  • Thank you for your fast reply and it really does the job. I've got some little issues with the layout, but I think that shouldn't be a problem. – Chris.V Jun 10 '13 at 8:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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