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!

marked as duplicate by Werner, Thorsten, user31729, Jesse, Svend Tveskæg Jan 18 '15 at 10:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


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.