I'm working on a homework set, and one of my answers to a multi-part question has become very long. I've been keen on keeping problems and solutions as much on the same page as possible, and my current solution (of putting both the question and its solution in a minipage
) turns out to be rather less than optimal, as it forces everything too strictly to be on the same page, and moves a question to its own page even when it's not strictly necessary.
What I'd like is something like the following:
1. Question
a) Subquestion #1
Solution
---page break here if necessary---
b) Subquestion #2
Solution
---page break here if necessary---
2. Question
...
I've been doing minipage
around the whole question/subquestion/solution block, but this obviously forces everything onto the same page. I've played around with samepage
and nobreak
and nopagebreak
and even putting each individual block described above in its own minipage
, which seems to really mess up enumeration and all sorts of spacing. nopagebreak
seems to not want to work at all for some reason for me.
What's a good way to a do this? Thanks in advance, and please let me know if I've been vague at all.
\documentclass
and the appropriate packages. In this case it would go a long way toward explaining the enumeration problems you mention as I was about to recommend that you put each subsection in aminipage
.description
list instead of a more appropriate class was ruining horizontal alignment. Sorry, and thanks for your help.