Typesetting of problems and solutions

I want to typeset my problems and solutions in my coursework. How do you do that keeping in mind that I want both the problem and the solution typeset?

Questions?

• What should I use/how to separate the problem statement/question and my solution? (important)

• Does anyone have some really great templates/examples for me?

• – touhami Sep 9 '15 at 11:25
• Have a look at the packages exsheets, answers, probsoln, exam... – cgnieder Sep 9 '15 at 11:31
• related: tex.stackexchange.com/q/22269 (sadly this question and its answers don't cover exsheets, but…) – cgnieder Sep 9 '15 at 11:55
• @clemens: Shamelessly promoting your own package :-P – user31729 Sep 9 '15 at 12:49
• @ChristianHupfer in a way :) Promoting own packages actually is counterprodutive: the more people use it the more people mail you for support. This is the reason why I always mention alternatives – cgnieder Sep 9 '15 at 12:56

Whenever I want questions and answers in close proximity of each other I tend to use tcolorbox.

\documentclass{article}
\usepackage{tcolorbox}

\begin{document}
This is the question
\tcblower
This is the answer
\end{tcolorbox}
\end{document}


With tcolorbox it's easy to control many aspects of the upper and lower parts of the box (colors, borders, separators, sizes etc...) which is something I like a lot. I would suggest a look into the manual as well as the examples document at ctan

• Can your style add in theorem environment? – minthao_2011 Oct 9 '15 at 1:34
• @minthao_2011 : You may want to read ch 14 of the tcolorbox manual, "Library theorems", but the short answer is yes. The longer and more correct answer would probably be - it depends on how you want to use it. – Fredrik Johansson Oct 9 '15 at 6:22

(I wanted to comment this since it's a shameless plug, but I don't have enough reputation to comment yet.)

[Self-promotion warning] I recently wrote a class for doing exactly what you want! You can find it on GitHub here. Documentation and examples are included there as well.