答案1
作为起点:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\[
(x + \tikzmarknode{A}{a})^2 = x^2 + 2\tikzmarknode{B}{a}x + \tikzmarknode{C}{a}^2
%
\begin{tikzpicture}[overlay, remember picture,shorten <=1mm,
shorten <=1mm, shorten >=1mm]
\draw[->] (A.south) -- ++ (0,-0.5) -| node[pos=0.25, fill=white] {text} (B.south);
\draw[->] (A.south) -- ++ (0,-1.0) -| node[pos=0.25, fill=white] {text} (C.south);
\end{tikzpicture}
\vspace{3ex} % space for image
\]
\end{document}
注意:为了获得正确的结果,您需要编译文档至少两次,通常三次。