
我正在用 Beamer 編寫演示文稿,我希望獲得以下效果:我有公式
\begin{align}
a=b
\end{align}
我想(在 a=b 出現之後)將 b 放在一個藍色區塊內,並放置一個從區塊中開始並向下的箭頭,並在箭頭後面加一個零(只是說 b 收斂到 0)
我該怎麼做?
答案1
一個粗略的解決方案是基於其他問題:
\documentclass{beamer}
\usepackage{amsmath}
\usepackage[most]{tcolorbox}
\tcbset{colback=yellow!10!white, colframe=blue!50!black,
highlight math style= {enhanced, %<-- needed for the ’remember’ options
colframe=blue,colback=blue!10!white,boxsep=0pt}
}
\begin{document}
\begin{frame}
\begin{align*}
a=&\tcbhighmath[remember as=fx]{b}\\
\visible<2->{\\
&\tcbhighmath[remember, opacityback=0,enhanced jigsaw, boxrule=-0pt, no borderline, colframe=white, overlay={%
\draw[black,very thick,->] (fx.south) to ([yshift=0mm]frame.north);}]{0}
}
\end{align*}
\end{frame}
\end{document}
答案2
使用該套件的一種可能方法hf-tikz
:
\documentclass{beamer}
\usepackage[beamer,markings]{hf-tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{frame}
\begin{align}
a=\tikzmarkin<2>{a}b\tikzmarkend{a}
\end{align}
\begin{tikzpicture}[overlay,remember picture]
\draw<2>[->,red, thick] (a) ++(0.2,-0.4) -- ++(0,-1) node[yshift=-8] {0};
\end{tikzpicture}
\end{frame}
\end{document}