答案1
以下是使用该tikzmark
库执行此操作然后使用该calc
库调整节点位置的一种方法:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\usetikzlibrary{calc}
\begin{document}
\[
(\tikzmark{a}ax + \tikzmark{b}ay) = \tikzmark{c}a(x + y)
\tikz[remember picture, overlay, baseline=0pt] {
\draw[red, thick] ($(pic cs:a) + (0.1, 0.2)$) to[out=90, in=90] ($(pic cs:c) + (0.1, 0.2)$);
\draw[red, thick] ($(pic cs:b) + (0.1, 0.2)$) to[out=90, in=90] ($(pic cs:c) + (0.1, 0.2)$);
}
\]
\end{document}