I am looking to typeset this in latex.

enter image description here

Could anyone suggest a method or package that would enable me to do this?

Thank you!


One possibility, via tikzmark

enter image description here



\tikz[remember picture,baseline=(#1.base)]  
\node[inner sep=1pt,outer sep=2pt] (#1) {#1};%
\tikzset{myarrow/.style={line width=1mm, color=cyan,preaction={-triangle 90,cyan, thin,draw,shorten >=-1mm}}}

(\tikzmark{a}+\tikzmark{b}) (\tikzmark{c} + \tikzmark{d})={\color{orange} ac+ad+bc+bd}

\begin{tikzpicture}[remember picture,overlay]
\draw[myarrow] (a) to[bend left =60]  (c);
\draw[myarrow] (a) to[bend left =60]  (d);
\draw[myarrow] (b) to[bend left =-60]  (c);
\draw[myarrow] (b) to[bend left =-60]  (d);

Not the answer you're looking for? Browse other questions tagged or ask your own question.