This module allows Markdown (and most HTML) to be hidden and revealed by pressing a button in an Jupyter notebook. You can also encode and decode the content using a Caesar cipher.
Revealables
is useful for hiding and revealing answers to practice problems. When you choose, you can give students the password so they can decode the answers.
] add Revealables
You will generally want to use Revealables.jl with the hide_input Jupyter extension installed. This extension hides the code cells. Revealables will reveal the output when a button is pressed. If the extension is not installed, then the code will not be hidden. You can unhide the code cells by clicking on the chevron-up icon.
Instructions for installing Jupyter extensions can be found here. If you are using anaconda, which supplies the conda command, you can run the following:
conda install -c conda-forge jupyter_contrib_nbextensions
Then you must run:
jupyter contrib nbextension install --user
jupyter nbextension enable hide_input/main
Hide and show blocks of Markdown through code like this:
revealable("""Any Markdown can go here!""", "Button Label")
Please see the example notebook for more detail.