# cleanest way to part answers from questions

I am still typesetting old exams, and I turn to you lads and lassies for help. At the moment I have most of the actual exams typed in, and is currently typing in answers for them.

The problem I run into is that it is quite hard distinguishing the actual exam questions and notes from the solutions.

Now I was thinking of ways to make them different enough, but not so different that it becomes a eyesore reading it. My thoughts was to either alter the text ever so slightly or, tint the background. Perhaps in a relaxing colour, perhaps beige. I guess another way is to add vertical lines or some other form of clear border. Or do nothing at all.

\documentclass{article}
\usepackage{mwe} % new package from Martin scharrer
\usepackage{lipsum,caption,mathtools}
\usepackage{comment}
\setlength{\parindent}{0in}
\begin{document}

\section*{Problem 1}

\paragraph*{a) } Prove that donkeys can fly if and only if they have more arms than penguins. \medskip

\lipsum[1]
%
\begin{figure}[!htbp]
\centering
\begin{minipage}[c]{\textwidth}
\centering
\includegraphics[width=3.0in]{example-image-a}
\caption{Caption for image}
\label{fig:some figure to accompany the answers}
\end{minipage}
\end{figure}
%
\lipsum[2]
Q.E.D

\newpage

\section*{Problem 2}

\paragraph*{a) } If $(x+y)^2=99$ and $x^2+y^2 = 11$ what is $x\cdot y$? \medskip

\lipsum[2]
\begin{align*}
(x+y)^2 & = 99 \\
x^2 + y^2 + 2x\cdot y & = 99 \\
x\cdot y & = 44 \\
\end{align*}
\lipsum[3]
Q.E.D \medskip

Now is it posible finding $x-y$ from the information above? \medskip

\lipsum[6]
Therefore it is not possible finding $x-y$ from the information given.

\end{document}


Here is an MWE, my actual code is more complicated but I guess this will do.

My question is Is it preferable to distinguish the answers and questions further, and if yes; what is the best way to do so?

• I'd recommend putting the answers within an mdframed with a light background color and frame. Or you could use some kind of ornament to separate the question from the answer such as End of paragraph with ornament. Commented Jun 21, 2012 at 23:55
• @Peter Grill I liked the idea of using mdframed, for an example I think \mdfdefinestyle{mystyle}{leftmargin=0pt,% linecolor=Lavender,backgroundcolor=Ivory} Looks good, but the problem is with the figures? I guess I could start and stop the mdframed, but that would look weird, and I would preffer a somewhat more automated solution. Commented Jun 22, 2012 at 0:13
• You have to choose darker colors for the lines on the figures. I have figures on top of frames with a background color and they show up just fine. Commented Jun 22, 2012 at 0:30
• I am going to bed now. Will study this tomorow, but clearly this does not work. Commented Jun 22, 2012 at 0:34
• Have you considered the exam style yet? It gives solution-groups a gray background. Personally I like the exams it produces a lot. Commented Jun 22, 2012 at 10:58