6

A desperate Math educator here. With covid19 the teach from home is turning into a sour experience for me. Usually, I prepare all of my documents and presentations on latex. I am on Windows 10 (64-bit), I use TeXstudio (2.12.22) and have the MiKTeX (2.9) package.

My issue is that when doing PowerPoint presentation through beamer, the pdf file I obtain does not provide for a laser cursor when I am in presentation mode like for instance, Microsoft PowerPoint would. I have tried to change my cursor via the windows system to emulate a laser pointer instead of the arrow. It was successful until I went in presentation mode(i.e. in fullscreen) on my pdf file. I always end up with that hand with an arrow in the middle which is not ideal because I am recording my presentation and sending it to my students. I have looked at an alternative pdf reader in Sumatra pdf but not much luck there too.

Right now I am either forced to convert my beautiful presentations to pictures then feed it to PowerPoint (this is quite some work) or use online websites that convert pdf to ppt files (that's easier, but not ideal the quality is just horrible). After a couple of weeks at this pace, I am starting to burnout. Any suggestion or unknown feature that exists in latex that could allow me to get the laser pointer when doing a presentation with my pdf files.

6

The stupid hand symbol in FullScreen mode of Acrobat Reader is a nuisance.

I filed a feature request to Adobe several years ago in the hope to get something more suitable. Even an ordinary arrow would fit better than the hand. Alas, it was ignored. In older AR versions it was possible to replace the compiled-in hand icon with an arrow icon using a resource editor. But this doesn't seem to be possible anymore.

Update: cursor hidden after 3 s timeout; brighter laser dot.

As a workaround I'd suggest to compile the LaTeX source to SVG instead of PDF and use a web browser for display, such as Chromium, Chrome or Firefox. They all provide a FullScreen mode that can be accessed with F11. Moreover, these browsers are available on many platforms and for all major OS. As a bonus, they allow for embedded multimedia playback everywhere, which is not a widely spread capability among PDF viewers. And, most importantly, they all have the usual arrow in presentation mode.

With SVG, as Martin puts it in his comment, an arbitrary image file can be used as a cursor, such as this one enter image description here, which was made with TikZ.

pdflatex laserdot
convert -geometry 20 -density 150 laserdot.pdf laserdot.png

laserdot.tex:

\documentclass[tikz,border=1pt]{standalone}

\usetikzlibrary{fadings}
\tikzfading[name=fade out, inner color=transparent!0, outer color=transparent!20]
\tikzfading[name=fade out 2, inner color=transparent!0, outer color=transparent!100]

\begin{document}
\tikz {
  \shade [inner color=yellow, outer color=red, path fading=fade out] (0,0) circle (5pt);
  \shade [inner color=white, outer color=yellow!90!white, path fading=fade out 2] (0,0) circle (4pt);
}
\end{document}

In SVG, laserdot.png is set as cursor icon by means of the CSS attribute cursor:

svg { cursor: url('laserdot.png') , auto ; }

Complete example:

latex beamer-example
latex beamer-example
dvisvgm --bbox=papersize --font-format=woff2 --zoom=-1 --page=-  beamer-example

beamer-example.tex:

\documentclass[dvisvgm,hypertex,aspectratio=169]{beamer}

\usepackage{tikz}
\usetikzlibrary{shapes.geometric,calc}

\usefonttheme{serif}
\usepackage[T1]{fontenc}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PageDown, PageUp key event handling; navigation symbols <--, -->
% setting laserdot.png as cursor icon
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[totpages]{zref}
\usepackage{atbegshi}
\usepackage{tikz}
\usepgflibrary{arrows.meta}
\setbeamertemplate{navigation symbols}{}
\def\navBtnSize{9pt}
\def\navBtnLnWd{1.6pt}
\AtBeginShipout{%
  \AtBeginShipoutAddToBox{%
    \special{dvisvgm:raw
      <style> svg {cursor: none} </style>
      <defs>%
        <script type="text/javascript">%
        <![CDATA[%
          var svgRoot=document.getElementsByTagName('svg')[0];
          var cursorTimer;
          document.addEventListener('mousemove', function(e){%
             svgRoot.style.cursor='url("laserdot.png"), auto';
             try{clearTimeout(cursorTimer);}catch(err){};
             cursorTimer=setTimeout(function(){svgRoot.style.cursor='none';},3000);
          });
          document.addEventListener('keydown',function(e){%
            if(e.key=='PageDown'||e.key=='ArrowDown'||e.key=='ArrowRight'){%
              \ifnum\thepage<\ztotpages
                document.location.replace('\jobname-\the\numexpr\thepage+1\relax.svg');%
              \fi%
            }else if(e.key=='PageUp'||e.key=='ArrowUp'||e.key=='ArrowLeft'){%
              \ifnum\thepage>1
                document.location.replace('\jobname-\the\numexpr\thepage-1\relax.svg');%
              \fi%
            }%
          });%
        ]]>%
        </script>%
      </defs>%
    }%
  }%
  \AtBeginShipoutUpperLeftForeground{%
    \raisebox{-\dimexpr\height+0.5ex\relax}[0pt][0pt]{\makebox[\paperwidth][r]{%
      \color{structure!40!}%
      \ifnum\thepage>1%
        \href{\jobname-\the\numexpr\thepage-1\relax.svg}{%
          \tikz{
            \filldraw[black!0!] (-1pt,-\dimexpr\navBtnSize/2+1pt\relax)
              rectangle (\dimexpr\navBtnSize+1pt\relax,\dimexpr\navBtnSize/2+1pt\relax);
              \draw[{Straight Barb[round]}-,line width=\navBtnLnWd] (-1pt,0)--(\navBtnSize,0);}}%
      \else%
        \textcolor{lightgray}{\tikz{
          \filldraw[black!0!] (-1pt,-\dimexpr\navBtnSize/2+1pt\relax)
            rectangle (\dimexpr\navBtnSize+1pt\relax,\dimexpr\navBtnSize/2+1pt\relax);
            \draw[{Straight Barb[round]}-,line width=\navBtnLnWd] (-1pt,0)--(\navBtnSize,0);}}%
      \fi\hspace{0.5ex}%
      \ifnum\thepage<\ztotpages%
        \href{\jobname-\the\numexpr\thepage+1\relax.svg}{%
          \tikz{
            \filldraw[black!0!] (-1pt,-\dimexpr\navBtnSize/2+1pt\relax)
              rectangle (\dimexpr\navBtnSize+1pt\relax,\dimexpr\navBtnSize/2+1pt\relax);
              \draw[-{Straight Barb[round]},line width=\navBtnLnWd] (-1pt,0)--(\navBtnSize,0);}}%
      \else%
        \textcolor{lightgray}{\tikz{
          \filldraw[black!0!] (-1pt,-\dimexpr\navBtnSize/2+1pt\relax)
            rectangle (\dimexpr\navBtnSize+1pt\relax,\dimexpr\navBtnSize/2+1pt\relax);
            \draw[-{Straight Barb[round]},line width=\navBtnLnWd] (-1pt,0)--(\navBtnSize,0);}}%
      \fi%
      \hspace{0.5ex}%
    }}%
  }%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{frame}{Some geometric shapes}

\begin{tikzpicture}[x=2cm,y=2cm]
\foreach \a in {3,...,8}{
\node[regular polygon, regular polygon sides=\a, fill=red,
inner sep=0.3535cm] at (\a,2) {};
}
\foreach \a in {9,...,14}{
\node[regular polygon, regular polygon sides=\a, fill=blue,
inner sep=0.3535cm] at ($(\a,0)-(6,0)$) {};
}
\end{tikzpicture}

\end{frame}

\end{document}

More examples for beamer-class presentations in SVG:

Using the animate package without Adobe

http://mirrors.ctan.org/macros/latex/contrib/media4svg/example/beamer-example-1.svg (embedded video)

  • 1
    With CSS attribute cursor and a proper image file you could even change the cursor to a laser pointer dot. Just add svg {cursor: url("/path/to/image/file"), auto} to the style sections of the svg files. – Martin Apr 17 '20 at 16:54
  • 1
    @Martin : Thank you! I added an example that makes use of your suggestion. – AlexG Apr 19 '20 at 17:20
  • 1
    Great, looks nice! – Martin Apr 20 '20 at 18:11
2

I understand your situation. I am a linux user but I would encourage you to try using Xournal++ (in its Annotate PDF mode) to display your presentation, and OBS Studio to record it. Both of these appear to be cross-platform.

I like Xournal++ because I can use the mouse (or a tablet, if you have one) to draw lines and shapes while recording, and I can type additional text on the slide. You can create a blank slide on the fly and draw on it if you like.

OBS allows you to combine video and audio sources, so you can show a small webcam image of yourself in the corner of your slides while presenting or easily switch to show a document camera or the screen output of some other application.

2

Thanks for the valuable inputs. I have done some more research over the weekend and I came up with Ghaaiho pdf reader. And it has the inbuilt laser pointer option instead of the stupid hand thing. I am using the free version. You can pay for the premium perks. But, for me, the free version is enough. Thanks again.

  • According to @Martin, an arbitrary cursor can be set in SVG. I added an example. – AlexG Apr 19 '20 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.