Simple Problem Set Hack

Simple Problem Set Hack

I had a problem set where each question had multiple sub-parts: a, b, c; etc. I was typing the solution up in LaTeX and it wasn’t obvious what was the cleanest way to identify my answers.

I ended up with code like this:

\section*{Question 1}
\new This is my answer to part a.

\new This is my answer to part b

This formatting results in something like this:

That’s exactly what I was looking for. It requires two lines of code at the start of your document:

\newcounter{my_count}
\newcommand{\new}{\vspace{0.3cm}\addtocounter{my_count}{1} (\alph{my_count}) }

2 thoughts on “Simple Problem Set Hack

  1. How about

    \usepackage{paralist}

    \begin{enumerate}[(a)]
    \item blah
    \item blah
    \end{enumerate}

    ?

    If you want indentation like in your example, use asparaenum instead of enumerate

Leave a Reply

Your email address will not be published. Required fields are marked *