数学方程需要用线连接起来

数学方程需要用线连接起来

在此处输入图片描述

有人可以帮忙在 Latex Beamer 中写出以下表达式吗

答案1

\documentclass[fleqn]{beamer}
\usepackage{tikz}
\newcommand{\tikznode}[3][]{\tikz[remember
picture,baseline=(#2.base)]{\node(#2)[inner sep=0pt,#1]{$\displaystyle #3$};}}
\usepackage{amsmath}
\begin{document}
\begin{frame}
\frametitle{Title}
\begin{overlayarea}{\textwidth}{8cm}
\begin{align*}
 P\,\sin\frac{\pi}{15}
 =&\frac{1}{2}\tikznode{1}{\left(\sin\frac{\pi}{15}\,\cos\frac{\pi}{15}\right)}
 \,\tikznode{2}{\cos\frac{2\pi}{15}}\,\cos\frac{3\pi}{15}
 \,\tikznode{3}{\cos\frac{4\pi}{15}}\,\cos\frac{6\pi}{15}
 \,\tikznode{4}{\cos\frac{7\pi}{15}}
\\[0.2cm]
&\hspace*{1cm}\tikznode{1p}{\frac{1}{2}\sin\frac{2\pi}{15}}\\[0.3cm]
&\hspace*{1.5cm}\tikznode{2p}{\frac{1}{2^2}\sin\frac{4\pi}{15}}\\[0.3cm]
&\hspace*{2.5cm}\tikznode{3p}{\frac{1}{2^3}\sin\frac{8\pi}{15}=
\frac{1}{2^3}\sin\frac{7\pi}{15}}\\[0.3cm]
&\hspace*{3.5cm}\tikznode{4p}{\frac{1}{2^4}\sin\frac{14\pi}{15}=\frac{1}{2^4}\sin\frac{1\pi}{15}}\\[0.3cm]
\end{align*}
\begin{tikzpicture}[remember picture,overlay]
 \draw[dashed] ([yshift=-4pt]1.south west) -- ([yshift=-4pt]1.south east);
 \foreach \X in {2,3,4}
 {\draw ([yshift=2.5mm]\X p.north west) -- ++(0,-0.15cm) -| (\X.south);}
\end{tikzpicture}
\end{overlayarea}
\end{frame}
\end{document}

在此处输入图片描述

相关内容