![在投影仪幻灯片上添加注释,模拟手绘?](https://linux22.com/image/386776/%E5%9C%A8%E6%8A%95%E5%BD%B1%E4%BB%AA%E5%B9%BB%E7%81%AF%E7%89%87%E4%B8%8A%E6%B7%BB%E5%8A%A0%E6%B3%A8%E9%87%8A%EF%BC%8C%E6%A8%A1%E6%8B%9F%E6%89%8B%E7%BB%98%EF%BC%9F.png)
我想在我的投影仪幻灯片上添加一些模拟手工绘制注释的内容。这会变成圆圈,位于文本或公式之上,并允许插入文本。理想情况下,我可以将其与投影仪覆盖规范一起使用,即仅在第二步中添加它。请参阅下面的示例。
有什么可以让我接近那个目标吗?
\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}
谢谢!
答案1
如果您遇到问题tikzmark
,这里有一个纯 TikZ 解决方案。
该命令\mypos
有 2 个参数:要突出显示的内容和要为其指定的名称。如果数字处于数学模式,请输入$...$
第\mypos
一个参数。
\documentclass[english]{beamer}
\usepackage{babel}
\usepackage{tikz}
\newcommand{\mypos}[2]{\tikz[remember picture]{\node[inner sep=0pt, anchor=base](#2){#1};}}
\newcommand{\myund}{}
\begin{document}
\begin{frame}{Make Titles Informative. }
Iintroduce here two \mypos{theorems}{myth}:
\begin{theorem}
Algebra
1+2=3
\end{theorem}
\begin{corollary}
2+1=\mypos{3}{mynum}
\end{corollary}
\begin{tikzpicture}[overlay, remember picture]
\node[draw, red, circle] (A) at (mynum){};
\draw[red] ([yshift=-2pt]myth.south west)--([yshift=-2pt]myth.south east) to[bend right] ++(1,-1) node[red, anchor=west] {Comment};
\draw[red] (A.south east) to[bend right] ++(1,-1) node[red, anchor=west] {Some text};
\end{tikzpicture}
\end{frame}
答案2
正如@cfr 指出的那样,tikzmark
在这里非常有用。此外,还decorations.pathmorphing
附带random steps
,可以说看起来就像您用自己的爪子(呃,对不起,是手)绘制的一样。
\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}