2

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!

6

One possibility, via tikzmark

enter image description here

Code

\documentclass[border=1cm]{standalone}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{arrows}
%\usepackage[margin=1cm]{geometry}

\newcommand\tikzmark[1]{%
\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}}}
\begin{document}


(\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);
\end{tikzpicture}%
\end{document}

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