2

My main problem is the following. I would like to put the problems and their solutions together into separate input files. In the source code I would like to switch easily between two modes. In mode 1 the solution of a problem follows the problem itself. In mode 2 there is a separate chapter for solutions at the end of the book. It is possible to solve this problem with the usage of a short predefined command between the problem and the solution in each input files and nothing else?

5

The package exsheets meets all your requirements.

You have two environments, 'question' and 'solution '. You can choose whether you want to print the answers and where. You can give IDs and include from external files by them. The appearance is very customizable.

Have a look into the documentation: http://mirrors.ctan.org/macros/latex/contrib/exsheets/exsheets_en.pdf

  • exsheets sounds good, however a begin-end block is not the most simple solution, is it possible to do with only one command between the 'question' and the 'solution' in the input files? – user3058699 Jan 4 '15 at 11:12
  • Do I understand you correctly, you want to spare 1 line of code? – MaxNoe Jan 4 '15 at 12:23
  • Yes, I would like to use only source text in the input files, and as little code as possible, and not environments – user3058699 Jan 4 '15 at 20:30
  • Why? Could you elaborate on that? That does not aound like a good idea to me and clearly not like a reasonable restriction. – MaxNoe Jan 4 '15 at 20:32
  • And what about exsol? which is the best? – user3058699 Jan 4 '15 at 20:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.