Click & Reveal (Part 2)

A couple of weeks ago, I wrote a post “Click & Reveal” describing a situation that I was trying to solve: for a number of my handouts, I’d like to be able to display them in class and – as and when I feel like it – click to reveal different parts of the working etc. In that original post, I mentioned a solution I hacked together using HTML, CSS and Javascript – not the ideal environment for writing maths handouts!

PDF Sorcery

Well, I’m not one to quit on a problem like this and I’ve now come up with exactly what I want. Try downloading this PDF document and opening it in Adobe Reader. (The only limitation of this approach is that it does need Adobe Reader – not Mac Preview or Chrome’s built-in PDF viewer etc.)

Screen Shot 2017-02-08 at 20.58.23.png

Anything not coloured black in the PDF file is clickable! Click on any of the blue expressions to hide them. Click on the red ‘hide’ eye to blank all the expressions together. Click on the green ‘reveal’ eye to show all of the expressions.

Moreover, you can choose to print the document either filled or blank (and the eye icons don’t appear on the printout)! Students could even use the PDF file to test themselves in a similar way to flashcards.

The beauty of this approach is that the solutions can be revealed in any order, at any time (unlike say a Powerpoint where the order is pre-determined).

LaTeX Sorcery

This solution works wholly in Latex (which is a drawback as I’d be surprised if many teachers know about Latex, let alone use it to produce documents). It uses the ocgx2 package which takes advantage of the Layers (and Javascript) functionality that Adobe Reader supports.

If you’d like to see behind the scenes, I’ve shared the source for this document on Overleaf.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s