1

I would like to insert an overview image (visualizing a timeline) that shows different chapters of a book. When somebody hovers over the image, I would like to show a tooltip ("Go to Chapter 3") that takes you to the respective chapter when you click on it.

Miriam
  • 121
  • 3
    You can use information contained in Drawing on an image with TikZ and, instead of placing text/graphics, you can place hyperlinks. I guess the same would go for tooltips. – Werner Jul 17 '14 at 15:54
  • If tikz isn't what you are looking for, there are other ways to overlay [hyperlinked] text upon an image, such as this: http://tex.stackexchange.com/questions/171483/mathematical-formulas-on-a-graph-not-made-by-tex/171486#171486 – Steven B. Segletes Jul 17 '14 at 16:15

1 Answers1

1

Werner, Steven, thanks for pointing me there. It was exactly what I was looking for. Just to provide an answer to the question. Here is the code I came up with based on your links:

\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.9\textwidth]{figures/some_image.png}};
\begin{scope}[x={(image.south east)},y={(image.north west)}]
    % draw help lines...
    \draw[help lines,xstep=.1,ystep=.1] (0,0) grid (1,1);
    \foreach \x in {0,1,...,9} { \node [anchor=north] at (\x/10,0) {0.\x}; }
    \foreach \y in {0,1,...,9} { \node [anchor=east] at (0,\y/10) {0.\y}; }  
    %insert links to chapters...
    \node[draw, red,ultra thick,rounded corners] (A) at (0.2,0.8) {\hyperref[chap:two]{\color{white} Go to Chapter 2}};
    \node[draw, red,ultra thick,rounded corners] (B) at (0.5,0.1) {\hyperref[chap:three]{\color{white} Go to Chapter 3}};
\end{scope}
\end{tikzpicture}
Miriam
  • 121