I'm writing a problem set with a solution. Right now I have the following setup:
\newtheorem*{sol}{Solution}
\newif\ifshow
\showfalse
\ifshow
\newenvironment{bluesol}
{\begin{sol} \color{NavyBlue}}
{\end{sol}}
\else
\excludecomment{bluesol}
\fi
So my solutions would be in the bluesol environment.
Currently, if I want to compile a problem set questions, I'd do \showfalse, and when I want to compile the solutions, I'd do \showtrue instead. This works... but the output files are the same, so I have to manually change the file name to something like pset1questions.pdf before compiling the solutions.
I'm wondering if there's a way to automatically do this; i.e. run once for \showfalse, and rename the target file to pset1questions.pdf, and run again for \showtrue, and rename the target file to pset1sol.pdf
I'm also open to a completely new way to do this (but I still would like my solutions to be within the environment though).
Thanks a lot!
\documentclass{...}and ending with\end{document}. – Jul 08 '15 at 19:24probsoln,answers,exsheetsetc. – Jul 08 '15 at 19:28inside... but as long as the O.P. does not provide a clear MWE, it's difficult to tell – Jul 08 '15 at 21:18