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}
1
  • 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. :) Commented Sep 12, 2015 at 3:52

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .