4

I wrote a transparency with Beamer containing a timed itemize list (overlay) and an OCG layer. When the mouse is not above the OCG link called "circle", it has the following form: sur la page

When the mouse is above the OCG link called "circle", it has the following shape:

sur le lien

The problem is that the shape of the mouse in both cases is really very close and their colors are so identical that in class I often confuse them. Instead of clicking on the mouse when it is above the "circle" link, I click right next to it. This makes the hidden text visible in the bulleted list prematurely. Is there a way to colorize the mouse of the color of the link it flies over? And if not, leave his classic appearance?

the code is this:

\documentclass[hyperref={pdfpagemode=FullScreen},aspectratio=169]{beamer} 
\usepackage[tikz]{ocgx2}
\usetheme{Madrid}

\begin{document}
\begin{frame}

\begin{columns}
\column{0.3\textwidth}
Bla bla bla\dots
\begin{itemize}[<+->]
\item visible text
\item first hidden text
\item second hidden text
\end{itemize}
\switchocg{cercle}{\textcolor{blue}{circle}}

\column{0.7\textwidth}
\begin{tikzpicture}[ocg={name=cercle,ref=cercle,status=invisible}]
\draw[red,very thick] (0,0) circle (2cm);
\end{tikzpicture}
\end{columns}
\end{frame}
\end{document}
2
  • I think you need to see if you can change the behavior of your cursor (its appearance) within the pdf reader, and that this behaviour can't be determined by the pdf: the pdf only tells the viewer "this is a clickable area", but do not indicate which shape should the cursor take. I might be wrong, though, but couldn't find anything related to your question in ocgx or ocgx2 manuals.
    – Clément
    Oct 13, 2017 at 16:15
  • 1
    @Clément The appearance of the mouse can be modified via javascript. Adobe has developed javascript for acrobat as shown here: adobe.com/devnet/acrobat/javascript.html Not being able to program in javascript, nor in javascript for acrobat, I don't know how to do that. Nevertheless, it is possible, but how? gehrcke.de/2010/11/javascript-in-pdf-using-latex
    – AndréC
    Oct 13, 2017 at 20:22

1 Answer 1

2

Customizing the mouse pointer does not seem possible, even by JavaScript.

For obtaining a stronger visual feedback of the current mouse position, a colour change of the link text ("circle") could be implemented, which occurs on mouse-over and mouse-out events.

enter image description here

For this, the example uses the optional <trigger> argument of the \switchocg command, set to onmouseall. It allows configuring all possible mouse events. Though not depending on JavaScript, it does only work in Acrobat Reader (and other non-free PDF viewers).

\documentclass[hyperref={pdfpagemode=FullScreen},aspectratio=169]{beamer}
\usepackage[tikz]{ocgx2}
\usetheme{Madrid}

\begin{document}
\begin{frame}

\begin{columns}
\column{0.3\textwidth}
Bla bla bla\dots
\begin{itemize}[<+->]
\item visible text
\item first hidden text
\item second hidden text
\end{itemize}

%the PDF-layer switching link to be highlighted on mouse-over
\makebox[0pt][l]{\switchocg[onmouseall]{
  circle-orange, % onmousenter: toggle link colour 
  circle-orange, % onmouseexit: toggle link colour
  ,              % onmousedown: -
  cercle         % onmouseup:   toggle visibility of layer with red circle
}{\textcolor{blue}{circle}}}%
\begin{ocg}{circle-orange}{circle-orange}{off}\textcolor{orange}{circle}\end{ocg}

% PDF layer with TikZ graphic
\column{0.7\textwidth}
\begin{tikzpicture}[ocg={name=cercle,ref=cercle,status=invisible}]
\draw[red,very thick] (0,0) circle (2cm);
\end{tikzpicture}
\end{columns}
\end{frame}
\end{document}

You must log in to answer this question.

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