GeneralAnswering lines for an exam

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
adalbert
Posts: 2
Joined: Thu Dec 04, 2008 2:00 pm

Answering lines for an exam

Post by adalbert »

Hi everyone,
I'm actually creating an exam but now I've some questions in it, where the students have to answer with one or two sentences. For this, I'd like to have right after my question a few empty lines but they should be underlined so that the student's can write their answers on this lines.

Unfortunately I can't find a way to do it without using tables or create a line as a graphic :(

Would be great if someone can help me on this.

Kind regards,
Adalbert

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

Answering lines for an exam

Post by gmedina »

Hi,

you could use \hrulefill as the following example suggests. To increase the vertical space between consecutive lines, you can use \vspace*:

Code: Select all

\documentclass{article}

\begin{document}

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

\noindent\hrulefill

\noindent\hrulefill\vspace*{2em}

\noindent\hrulefill

\end{document}
Edit: perhaps the exam class could be or interest to you.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
adalbert
Posts: 2
Joined: Thu Dec 04, 2008 2:00 pm

Re: Answering lines for an exam

Post by adalbert »

Hi gmedina,
thanks very much, this is exactly what I was looking for :)

PS: I'm already using the exam class but afaik there's no such thing like an answering line.

Regards,
Adalbert
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Answering lines for an exam

Post by gmedina »

Hi Adalbert,
adalbert wrote:...PS: I'm already using the exam class but afaik there's no such thing like an answering line...
Well, the exam class provides the \fillwithlines command:

Code: Select all

\documentclass{exam}

\begin{document}

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

\fillwithlines{4in}

\end{document}
Refer to the package documentation (7.2 Printing lined space for answers, pp. 42ff)
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply