# Easiest way to create dotted lines for writing answers without exam class

I wish to recreate the dotted-line "answer box" seen below. What is the simplest and easiest way to do this? I do not need any of the other functionality of the exam class, so I would rather not use that.

I would like the lines to be linewidth in length (so that the length of the lines depend on which level 1)a)i) of the question I'm at), and be 8 mm (0.3 in) apart. I would prefer to specify the number of lines, rather than the space they occupy, but am not averse to simply copy-and-pasting a command once per line required.

It would be a bonus if I could (occasionally) prefix the lines, so when asking for two answers I could have:

1: ...............

2: ...............

For this example I will use a simple list with \dotfill for the dotted lines.

\documentclass{article}

\begin{document}

\begin{enumerate}
\item Question
\begin{enumerate}
\item SubQuestion \label{a}
\item SubQuestion \label{b}
\end{enumerate}
\subitem \ref{a} \dotfill
\subitem \dotfill
\subitem \ref{b} \dotfill
\end{enumerate}

\end{document}


You could also define your own command \newcommand\mydotfill{\dotfill\vspace*{...}} to influence the space between the dotted lines.

• I found that changing the textsize of the \dotfill will also have the desired effect, and looks a bit better (in my opinion). So, I would suggest \newcommand\mydotfill{\tiny\dotfill} or something similar. – sk8forether May 24 '17 at 15:29