cgnieder / xsim

eXercise Sheets IMproved
67 stars 23 forks source link

document the blank/fill option #83

Closed N-Coder closed 3 years ago

N-Coder commented 3 years ago

I just stumbled upon your SO answer here on how to make blanks show the correct solution within the exercise body if solutions are printed, without the need to repeat all the exercise content in the solution (which is super useful). It seems that this code actually already made it into xsim, it was just not documented. I'm not quite sure how the documentation works, but this should fix that.

PS: thanks again for all the nice work on this package, we use it productively to make our exams by now, I just didn't have the time to comment on the issue regarding nested exercises / points in exams yet :sweat_smile:

cgnieder commented 3 years ago

Thanks for this.

cgnieder commented 3 years ago

The description is not entirely true: the \blank command is always filled inside a solution. The option blank/fill will also fill the blanks in an exercise. See the following example:

\documentclass{article}
\usepackage{xsim}
% \xsimsetup{blank/fill}
\begin{document}

\begin{exercise}[solution]
  Text \blank{text} Text
\end{exercise}

\printsolutions[headings=false]

\end{document}

It gives

image

and when the commented line is uncommented

image