# exsheets and \PrintSolutionsTF Question

Am I missing something very basic with the exsheets package and its \PrintSolutionsTF command?

I figured that if I set \SetupExSheets{solution/print=true} I would get 4 (this works) and for \SetupExSheets{solution/print=false}, I'd get 5, but I get a blank here instead.

What's going on?

\documentclass[12pt,letterpaper]{article}

\usepackage{amsmath}

\usepackage{exsheets}
\SetupExSheets{solution/print=false}

\begin{document}

\begin{question}
$$2+2=\underline{\hspace{1cm}}$$
\end{question}

\begin{solution}
\end{solution}

\end{document}

• Never mind, I just figured out that I'm not supposed to put \PrintSolutionsTF{}{} in a solution environment. I'll be back soon, though, with a more complex question. :) – WeCanLearnAnything Sep 12 '15 at 3:52

Inside a {solution} environment \PrintSolutionsTF{true}{false} always gives true. Outside a {solution} environment it depends on the value of the option solution/print.

In your example if you have

\begin{solution}
\PrintSolutionsTF{true}{false}
\end{solution}


but say \SetupExSheets{solution/print=false} then the whole solution environment is not printed.

If you additionally ad \printsolutions for a list of solutions then you'll get the true value regardless what value solution/print has: as I said initially: inside a solution it is always true.

PS: I'll correct this in the manual. The current description (v0.19 and earlier) is wrong.