bookdown: reveal solution to exercise

This kind of feature is included in learnr :package: but I don't know if the solution feature could be extracted to work on bookdown. It seems possible looking at how to create custom format.

Similarly, you have also unilur :package: features that could be useful here. I think its custom blocks (including a solution one) can be used in bookdown and it is pretty straightforward.

Also, there was a book which participate to bookdown contest that include lots of feature regarding teaching. See the community post. It is pretty advanced but it showcases how it is possible to do so with several features (small one like a hide button, and more advanced with inclusion of datacamp.js feature to do exercice in a R console inside the book)

3 Likes