14

Is there a way to fold/unfold certain sections in a pdf. Only when the user clicks on the section or plus sign the items show up.

Example: user clicks on the plus sign and the items appear as drop down list.

  • 3
    You can create things like drop-down menus etc. However, if this is a CV, I strongly recommend not to do this. – cfr Apr 16 '14 at 20:39
  • 4
    Do you know which PDF viewer potential employers will view your CV in? Because many of these features work only in certain viewers. Typically, they work in (certain versions of) Adobe Reader and you take your chances with anything else. Also, what if somebody wants to print your CV? You wouldn't be able to use it in any situation where your application might be circulated on paper. (So that rules out all actual job applications.) At best you could post it online with a note that it requires Adobe Reader version n. That is bound to annoy somebody. – cfr Apr 16 '14 at 20:47
  • 1
    Accepted. I drop this idea. – Rene Duchamp Apr 16 '14 at 20:51
  • 3
    Still it is a good question, with other applications too. – alfC Apr 16 '14 at 20:58
  • 1
    Yes, "unfortunately" the OP mentioned CV in a comment. The question is well posed still (and it doesn't mention CV). – alfC Apr 16 '14 at 21:16
10

"Folding" is a typical application for PDF layers (OCG). This works in most recent viewers, but problems might arise with crippled poppler based so called PDF viewers on Linux

\documentclass[a4paper]{minimal}
\usepackage{ocgx}
\begin{document}
Max Mustermann \switchocg{ocg1}{\fcolorbox{blue}{red}{\bfseries +}}\begin{ocg}{OCG 1}{ocg1}{0}
  \colorbox{yellow}{ \parbox{5cm}{Max Mustermann\\Musterweg 1\\12345 Musterstadt}}
\end{ocg}

Erika Mustermann
\end{document}

folded unfolded

Add a note: Best viewed with Adobe Reader! ;-)

  • 3
    Even works in evince (Poppler based ;). – AlexG Apr 17 '14 at 12:48
  • 2
    Referring to poppler-based PDF viewers as 'crippled' is offensive, frankly. Unlike Adobe's Reader, my poppler-based viewer is, in fact, not crippled by design. Reader is. – cfr Jul 4 '15 at 2:02
  • 2
    @AlexG Doesn't work in Okular which is also Poppler based. – cfr Jul 4 '15 at 2:02
  • 2
    @AlexG Just saw your earlier comment. No, of course I wasn't referring to your comment there. I was referring to the OP's description in the answer. The answer describes poppler-based PDF viewers as 'crippled poppler based so called PDF viewers on Linux' which strikes me as a bit rich considering Adobe distributes deliberately crippled viewers and no longer supports Linux at all. – cfr Jul 4 '15 at 12:47
  • 1
    How would you insert a \switchocg inside of an \eqnarray or \align. This is related to this question: tex.stackexchange.com/questions/431853/… – ranlot May 16 '18 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.