GeneralAdding space under headers in exam.cls

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
dmt
Posts: 82
Joined: Sat Mar 15, 2008 8:13 pm

Adding space under headers in exam.cls

Post by dmt »

I'm using the document class "exam" and would like to add some more space under the header on the first page (more space between the header and the first question of the exam), but I can't figure out how to do this. Does anyone know?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Adding space under headers in exam.cls

Post by gmedina »

Hi,

use \vspace*, as the following example suggests:

Code: Select all

\documentclass{exam}
\pagestyle{headandfoot}
\runningfootrule
\lhead[Math 115]{}
\chead[First Exam]{}
\rhead[July 4, 1776]{}
\lfoot[]{Math 115}
\cfoot[]{First Exam}
\rfoot[]{Page \thepage\ of \numpages}

\begin{document}

\vspace*{5cm}%change the argument to suit your needs

\begin{questions}
  \question
  Why is there air?
  \question
  How much wood would a woodchuck chuck if a woodchuck could chuck wood?
  \question Compute $\displaystyle\int_0^1 x^2 \, dx$.
\end{questions}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
dmt
Posts: 82
Joined: Sat Mar 15, 2008 8:13 pm

Re: Adding space under headers in exam.cls

Post by dmt »

I tried that ... but without the star and it didn't work. Is it the star that makes the difference, and if so, why?
metric
Posts: 61
Joined: Mon Mar 24, 2008 8:34 am

Adding space under headers in exam.cls

Post by metric »

dmt wrote:I tried that ... but without the star and it didn't work. Is it the star that makes the difference, and if so, why?
\vspace* inserts vertical space after the line in which it appears. Vertical space can also be inserted by \vspace the difference is that space inserted by \vspace will be deleted if it occurs at the top of a new page.

space inserted by \vspace* will never be deleted. Hence \vspace* is used.

See page no. 42 of the package documentation for more info.

Thanks,
Arif
Post Reply