Is there a way of creating an interactive slider by using TikZ and ocgx2 like this?
- Multiple instances of
\actionsocg[onmouseall]{}{convenient code}{convenient code}{convenient space}
are put side by side on top of a TikZ slider, for instance, one of those found here. - As the user moves the mouse across those links, ocgx2 moves slider's button and moves a point along a parabola built in TikZ.
Edit: I realize that the explanation was not sufficiently clear so I decided to modify this example to better show what I have in mind with a working example.
\documentclass{article} \usepackage{mwe} \usepackage{ocgx2}\begin{document}
\begin{figure}\centering \makebox[0pt][l]{% \begin{ocg}{A}{A}{1}% \includegraphics[width=0.3\paperwidth]{example-image-a}% \end{ocg}% }% \makebox[0pt][l]{% \begin{ocg}{B}{B}{0}% \includegraphics[width=0.3\paperwidth]{example-image-b}% \end{ocg}% }% \begin{ocg}{C}{C}{0}% \includegraphics[width=0.3\paperwidth]{example-image-c}% \end{ocg}
\actionsocg[onmouseall]{}{A,,,}{B C}{\fbox{A}} \actionsocg[onmouseall]{}{B,,,}{A C}{\fbox{B}} \actionsocg[onmouseall]{}{C,,,}{A B}{\fbox{C}} \caption{``Slider'' with three sections} \end{figure}
\end{document}
Imagine the boxes A B C as being sections of a slider. Moving the mouse over the boxes A B C it works like a slider. Now imagine the boxes A B C as being transparent and behind them, we also see convenient images of a slider.