5

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.

EDIT

As suggested by Martin Schröder in the comments here is a similar question regarding ocgx.

  • 3
    I would guess that this functionality is mostly dependent on your choice of PDF viewer... there are a number of similar questions on this site dealing with advanced capabilities of PDF output, you may want to try looking around for them. In addition, I know that the microtype manual contains somewhat similar features as you are asking about – darthbith Sep 23 '14 at 16:29
  • 1
    Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. A suggestion: Do us a favour and change your username to something more telling than "user1234". – Martin Schröder Sep 23 '14 at 16:33
  • I think you have two options: Either use OCGs or ECMAScript. Since neither is TeX-specific, I kindly suggest that you ask your question on [so] and then come back when you know what must be changed in the PDF. – Martin Schröder Sep 23 '14 at 16:37
  • Regarding ocgs, I don't seem to find much online. I do however find ocgx, the demo PDF of which does not seem to provide what I'm looking for on the face of it. Am I missing something? –  Sep 23 '14 at 16:57
  • 1
    @pbs Check the demo at http://archive.cs.uu.nl/mirror/CTAN/macros/latex/contrib/ocgx/demo-ocgx.pdf, check slide 2, with the "Hide" and "Show" buttons. – 1010011010 Sep 23 '14 at 17:21
  • @666 Thanks. I don't think it's what I'm after as I really want all text forward of a collapsed paragraph to appear directly after the expand/collapse button. The slide seems to suggest this does not happen. I will give it a whirl though ! c.f. a GUI tree view with expand/collapse [+]/[-]. –  Sep 23 '14 at 20:38

0 Answers0