2

I want to create a worksheet that gives equal vertical spacing for all problems. I have two questions.

  • What can I do to interchange parts (b) and (c) so that parts (a) and (b) are on the same line and parts (c) and (d) are on the same line? (This was asked in a previous problem. I'm wondering if there is an easier solution, though.)
  • Once this interchanging is finished, how can I alter the code so that parts (a) and (b) of problem 1, parts (c) and (d) of problem 1, and problem 2 all have equal amounts of vertical spacing? (These three spaces should take up the entire page.)

    \documentclass[10pt]{article}
    
    \usepackage{enumitem}
    \usepackage{multicol}
    \usepackage[margin=1.0in]{geometry}
    
    \begin{document}
    
    \begin{enumerate}
    % Problem 1
    \item First problem directions go here.
    \begin{multicols}{2}
    \begin{enumerate}
    \item This is part (a).
    \item This is part (b).
    \item This is part (c).
    \item This is part (d).
    \end{enumerate}
    \end{multicols}
    \vspace*{\stretch{1}}
    % Problem 2
    \item Second problem goes here.
    \vspace*{\stretch{1}}
    \end{enumerate}
    
    \end{document}
    
  • You could wrap each \item in a \parbox with fixed height and alignment. – Martin - マーチン Jul 23 '13 at 8:05
  • How do I do that? Could you give me the code? Will doing so give equal vertical spacing? These two problems should span the entire page. – Noob Jul 23 '13 at 19:27
1

Here is an elementary implementation using minipages:

enter image description here

\documentclass{article}
\usepackage[margin=1in]{geometry}% http://ctan.org/pkg/geometry
\newlength{\subproblemhang}
\newcommand{\subproblem}[3][.5\linewidth]{%
  \settowidth{\subproblemhang}{(#2)~}%
  \begin{minipage}[t]{#1}
    \hangindent=\subproblemhang\hangafter=1%
    (#2)~#3
  \end{minipage}%
}

\begin{document}

\begin{enumerate}
% Problem 1
\item First problem directions go here. \par
\subproblem{a}{This is part (a).}%
\subproblem{b}{This is part (b).}

\vfill

\subproblem{c}{This is part (c).}%
\subproblem{d}{This is part (d).}

\vfill

% Problem 2
\item Second problem goes here.

\vfill

\end{enumerate}

\end{document}

This requires manual specification of the "sub problem" numbering, but this can also be changed, if needed. It depends on how far one is willing to automate things. \subproblem[<width>]{<number>}{<stuff>} allows you to specify the <number> of the problem <stuff>, including an optional <width> (default is 0.5\linewidth for a 2-column look) if you wish to have more than two "columns". Equal spacing between elements is provided by \vfill.

If you use greater-than-one-line "sub problem" statements, then the spacing will be different. However, then one can use a fixed minipage height to adjust each "sub problem" correctly. For now though, this might be sufficient.

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.