I am trying to make a thorough header in LaTeX that will save time later when I write quizzes and tests. I'd like to include solutions to each question in the .tex file, with some flag that toggles whether they appear when compiled.
So in a document like this...
\begin{document}
Some question
\solution{ the answer to the question}
\end{document}
..the solution would be invisible unless I include a "\showsolutions" flag.
Is there a command I can create that will do this?