[Tex/LaTex] Add annotation on beamer slide, simulating hand-drawing

annotationsbeamertikz-pgf

I would like to add on my beamer slides something that simulate as if I had been drawing a comment by hand. This would circle, come on top of text or formulas, and allows to insert text. Ideally, I could use this with the beamer overlay specification, i.e. add it only in a second step. See example below.

Is there anything that could bring me somewhere close to that?

enter image description here

\documentclass[english]{beamer}

\usepackage{babel}

\begin{document}
\begin{frame}{Make Titles Informative. }

Iintroduce here two theorems:
  \begin{theorem}
Algebra

1+2=3
\end{theorem}

\begin{corollary}
2+1=3
\end{corollary}

\end{frame}


\end{document}

Thanks!

Best Answer

As pointed out by @cfr, tikzmark is very useful here. In addition, decorations.pathmorphing comes with random steps, which arguably looks as if you would have drawn it with your own claws, err, sorry, hands.

\documentclass[english]{beamer}
\usepackage{tikz}
\usetikzlibrary{tikzmark,decorations.pathmorphing}

\begin{document}
\begin{frame}{Make Titles Informative}

Introduce two \tikzmarknode{theorems}{theorems} here:
\begin{theorem}
Algebra

1+2=3
\end{theorem}

\begin{corollary}
2+1=\tikzmarknode[circle,draw=red,decorate,decoration={random steps,segment
length=1pt,amplitude=0.4pt}]{3}{3}
\end{corollary}
\begin{tikzpicture}[overlay,remember picture,decoration={random steps,segment
length=1pt,amplitude=0.4pt},red]
\draw[decorate] (theorems.south west) -- (theorems.south east)
to[out=-40,in=180] ++ (2,-1) node[right]{comment};
\draw[decorate] (3)
to[out=-40,in=180] ++ (2,-1) node[right]{some text};
\end{tikzpicture}
\end{frame}
\end{document}

enter image description here