I need to produce exercise sheets, and I am looking for a package providing exercise/answer environments. I tried for now exercise and exsheets packages, and I can almost do what I want but there is always a restriction.
I would like to produce a list of exercises such that :
- An exercise can possibly be just one line "Exercise 1. Blah blah blah?"
- An exercise can possibly be longer, with multiple questions. In that case the first line would just be "Exercise X. Title" and then there would be one line per question, with proper numeration.
- I should be able to give the solution for each exercise or question, and choose to display the solution or not.
- When there are multiple questions, I should be able to give an answer for each question (and not only for the whole exercise). The answer should appear after each question.
- The exercises and answers are written directly in the same source file.
- It is possible to customize the way the answer are written (e.g. to add a fbox or color)
- Ideally, also being able to add some symbol to specify the difficulty, but this is not essential.
What would be, according to you, the best package to do that, or the one requiring as few tricks as possible?


xsim. – TeXnician Oct 09 '17 at 10:26xsimwas never part of TeX Live 2016 and it relies on other packages newer than the ones in TeX Live 2016. You need to install TeX Live 2017. I would recommend installing “vanilla” TeX Live instead of the one in the repo, any way. See https://tex.stackexchange.com/questions/301126/how-to-install-vanilla-texlive-on-fedora – cgnieder Oct 09 '17 at 12:21