2

I am building a handwritten style presentation. I would like to have all the features very similar to handwritten. As you can see from my example, I am almost able to do that. The problem is the path in the TikZ framework. As you can notice, the key words given for tikzmarknode seem not to work for "path".

So my questions are: 1) Is it possible to have the arrow looking as the tikzmarknode? 2) If yes, where am I wrong?

I have indeed the feeling that "decorations.pathmorphing" could work also for the path.


\documentclass{beamer}
%\url{https://tex.stackexchange.com/q/593958/86}
\usepackage{tikz}
\usetikzlibrary{
  positioning,
  arrows,
  shapes,
  backgrounds,
  tikzmark,
  calc,
  decorations.pathmorphing,
  patterns,
  overlay-beamer-styles %% <-- use this library
}

% \tikzstyle is depreciated \tikzset{ every picture/.append style={remember picture}, na/.style={baseline=-.5ex}, nb/.style={baseline=10.5ex} }

\usepackage{amsmath} \usepackage[subdued]{mathastext}

\begin{document}

\begin{frame} \tikzstyle{na} = [baseline=-.5ex]

\begin{equation} \tikzmarknode[circle,decorate, decoration={random steps,segment length=5pt,amplitude=1pt},alt=<2>{draw=red,line width=0.5mm, minimum size=20pt}{}]{p2}{A} = B ; \end{equation}

\tikz[na] \node[coordinate] (n1) {};Hello

\begin{tikzpicture}[overlay] \path[->,red,line width=0.5mm,decorate, decoration={random steps,segment length=5pt,amplitude=10pt}]<2-> (n1) edge [bend left] (p2); \end{tikzpicture}

\end{frame}

\end{document}

Ingmar
  • 6,690
  • 5
  • 26
  • 47
diedro
  • 179

1 Answers1

3

You need to move your decoration instructions to the edge instead of the path:

\documentclass{beamer}
%\url{https://tex.stackexchange.com/q/593958/86}
\usepackage{tikz}
\usetikzlibrary{
  positioning,
  arrows,
  shapes,
  backgrounds,
  tikzmark,
  calc,
  decorations.pathmorphing,
  patterns,
  overlay-beamer-styles %% <-- use this library
}

% \tikzstyle is depreciated \tikzset{ every picture/.append style={remember picture}, na/.style={baseline=-.5ex}, nb/.style={baseline=10.5ex} }

\usepackage{amsmath} \usepackage[subdued]{mathastext}

\begin{document}

\begin{frame} \tikzset{na/.style={baseline=-.5ex}}

\begin{equation} \tikzmarknode[circle,decorate, decoration={random steps,segment length=5pt,amplitude=1pt},alt=<2>{draw=red,line width=0.5mm, minimum size=20pt}{}]{p2}{A} = B ; \end{equation}

\tikz[na] \node[coordinate] (n1) {};Hello

\begin{tikzpicture}[overlay] \path[->,red,line width=0.5mm]<2-> (n1) edge [bend left,decorate, decoration={random steps,segment length=5pt,amplitude=2pt}] (p2); \end{tikzpicture}

\end{frame}

\end{document}

enter image description here