7

I am using the exam document class and I want to implement a layout where the headers and footers span over both the text body and the margins.

I tried using the \fancyhfoffset command from the fancyhdr package, but commands like \cfoot, \lfoot are overruled by the document class.

Is there a way to disable the native header and footers from the exam document class or some other way of implementing this?

My MWE:

\documentclass[11pt,a4paper,fleqn]{exam}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\usepackage[includemp, a4paper, textwidth=0.6\paperwidth, marginparwidth=0.2\paperwidth]{geometry}

\pagestyle{headandfoot}
\firstpagefooter{MyName}{MyTitle}{ThePage}
\runningfooter{MyName}{MyTitle}{ThePage}

\title{MyTitle}
\author{MyName}

\begin{document}

\maketitle
\thispagestyle{headandfoot}
...

\end{document}
4
  • Can you please add a minimal working example (MWE) showing what you would like to achieve? ASAIK, the exam class provides commands for such things. Commented Sep 24, 2013 at 14:30
  • @karlkoeller Like so? Commented Sep 25, 2013 at 10:44
  • Does my answer solve your issue or you were looking for something else? Commented Sep 26, 2013 at 11:28
  • I am looking for a way to make the header and footer broader, including both text area and margins within. Commented Oct 9, 2013 at 12:40

1 Answer 1

7

I'm not sure to understand exactly what you want to achieve.

Anyway the commands to move headers and footers up and and down in your document when using the exam class are, respectively, \extraheadheight and \extrafootheight.

They have to be used in the preamble and their sintax is

\extraheadheight[<1st page spacing>]{<spacing>}

and

\extrafootheight[<1st page spacing>]{<spacing>}

If the optional argument is omitted, then all pages including the first are affected by these commands.

Give positive values if you want headers/footers closer to the text, negative values if you want headers/footers closer to the margins of the page.

The following is an example that shows you how they act when you give different values for the first and the running pages:

\documentclass[11pt,a4paper,fleqn]{exam}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\usepackage[includemp, a4paper, textwidth=0.6\paperwidth, marginparwidth=0.2\paperwidth]{geometry}
\usepackage{lipsum} % only for the example

\pagestyle{headandfoot}
\firstpagefooter{MyName}{MyTitle}{ThePage}
\runningfooter{MyName}{MyTitle}{ThePage}
\firstpageheader{MyName}{MyTitle}{ThePage}
\runningheader{MyName}{MyTitle}{ThePage}

\extraheadheight[.25in]{.5in}
\extrafootheight[.25in]{.5in}

\title{MyTitle}
\author{MyName}

\begin{document}

\maketitle
\thispagestyle{headandfoot}
\lipsum[1-7]

\end{document} 

Result:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .