I have a large document which has to be edited "heavily", so there is a lot of text content which has to be removed for the final version, but I would like to keep it in sight during editing also in the PDF.

So generally said I have to replace e. g. a large paragraph with one or two short sentences and I'd like to still be able to see the original version in the PDF.

I tried to do that with the pdfcomment package and the pdftooltip command, as it does not consume significant space on the page (it is important for me to see how the final document will look) and in general that works well with simple text, but if there is more complex formatting (e. g. an environment), I get error messages.

I tried to build a minimal example:

\usepackage{color, url}




test of my command: \mycommand{helloworld}

This is my example text. Here comes the tooltip: \weg{This is the tooltip text. \cite{Author2011} \mycommand{helloworld} $y_1 = x^3 +1$  }

here it fails: \weg{\begin{center} centered text \end{center}} 


The custom command \mycommand which outputs only "text" does not pose a problem, the \cite commands seem to be more problematic, an equation gets "simplified" and some commands just fail.

my questions:

  • how could I change my command \weg{} to print all the latex source code verbatim in the tooltip

  • which type of LaTeX code will likely cause problems with the tooltip?

  • 3
    Have you tried/considered fancytooltips or cooltooltips? Both these packages allow for more advanced constructs in the PDF tooltip, including formatting.
    – Werner
    Dec 14, 2011 at 23:36
  • @Werner: no, I did not know about those 2 alternatives. I'll test them and see if it works better. Dec 14, 2011 at 23:51
  • @Werner Please turn your comment into an answer.
    – lockstep
    Feb 4, 2012 at 23:43

1 Answer 1


The fancytooltips and cooltooltips packages provide more advanced constructs in the PDF tooltip, including formatting.

Here is a screenshot from the fancytooltips package documentation:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .