1

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}
\PrintSolutionsTF{4 is a true answer}{5 is a false answer}
\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
2

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.

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.