2

I would like to have a header on the first page of my document, and on subsequent pages I would like both the header and the whitespace where the header was to be usable as space for content so as to be printer friendly.

As a note, I tried this using the \newgeometry & \restoregeometry trick, however something caused the \part of my questions on the later pages to overflow to the right and ignore the margin. Moreover, as has been mentioned many times on here newgeometry is invasive. Is there a more elegant solution to this issue?

\documentclass[12pt,addpoints,answers]{exam}
\usepackage{geometry}
\chead{Center Header}
\lhead{Left Header}
\rhead{Right Header}
\begin{document}
\thispagestyle{head}
    \begin{questions}
        \question Who?
\newpage
\thispagestyle{plain}
        \question What?
    \end{questions}
\end{document}
  • 1
    Is it possible that you really want a title rather than a header? Headers typically appear on all pages, except usually not the first and not the first pages of chapters. – cfr Jul 24 '18 at 23:12
1

Seeing as you just want the header on the first page, you can write it here without resorting to using the built-in header commands.

To make something that looks and feels like a header, I've used a solution from How to make text aligned left/center/right in the same line?, and also added some vertical space after it.

enter image description here

enter image description here

\documentclass[12pt,addpoints,answers]{exam}
\usepackage[top=1.5cm,bottom=3cm,left=3cm,right=3cm]{geometry}

\newcommand\textbox[1]{%
  \parbox{.333\textwidth}{#1}%
}

\begin{document}

\noindent\textbox{Left Header\hfill}\textbox{\hfil Center Header\hfil}\textbox{\hfill Right Header}
\vspace{0.5cm}

\begin{questions}
    \question Who?
\newpage
    \question What?
\end{questions}

\end{document}

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.