This question already has an answer here:
I'm using Gummi on Ubuntu 14.04. I like Gummi because it gives me a live preview as I type lots of maths equations. But this is besides the point.
My question: Is there a way to "attach" an expandable\collapsible
[-] type button to a given paragraph so that when the button is clicked within the PDF the associated paragraph either appears or disappears?
When writing up my maths notes this would be a very useful feature as it would allow to either display or hide proofs. Sometimes, it's nice just to have the results shown, without the proofs. On the other hand, it would be desirable to have the proofs to hand when required.
Please note I would like this functionality within the compiled PDF, not the actual tex code.
As suggested by Martin Schröder in the comments here is a similar question regarding ocgx.