2

I would like to show structure formulas associated with chemical compounds in tooltips, but have not been able to achieve that easily. \includegraphics appears to be ignored silently, rather its filename argument is displayed.

Is there a way to achieve this?

4
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – Adam Liter
    Apr 13, 2014 at 11:59
  • Perhaps consider the fancytooltips package.
    – Werner
    Apr 13, 2014 at 13:57
  • 1
    Perhaps Alex G's solution to this question migth give a hint: tex.stackexchange.com/questions/119988/…
    – user31729
    Apr 13, 2014 at 18:11
  • 1
    With the \tooltip command given in the answer that is linked in @Christian 's comment anything can be used as a tooltip, e. g. \tooltip{some graphics}{\includegraphics{example}}.
    – AlexG
    Apr 14, 2014 at 10:53

1 Answer 1

3

You can add a tooltip to a graphic:

\documentclass[a4paper]{minimal}
\usepackage{graphicx}
\usepackage{pdfcomment}
\begin{document}
\pdftooltip{\includegraphics[scale=2]{chemie}}{tooltip}
\end{document}

chemical structure formula

If you want the graphic to be the tooltip, i'm afrais that's not possible. A PDF tooltip is text only! You may achive something like this by using OCG layers. Take a look at demo-ocgx.pdf And use a full scale PDF viewer like AR! ;-)

You must log in to answer this question.

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