## LaTeX forum ⇒ Text Formatting ⇒ Curved over-head Arrows connecting Numbers

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
HunterDX77M
Posts: 2
Joined: Tue Jun 19, 2012 6:48 pm

### Curved over-head Arrows connecting Numbers

Hello all,

I am going to be teach my student about the FOIL method of multiplication. In order to do that, I thought it would be a nice visual helper if I could draw arrows curving from one number to another and I was wondering if that was possible with LaTeX.

For example if I have (a + b)*(c + d), I want to draw an arrow coming out of "a" going over "b" and terminating at "c". Can that be done with LaTeX?

Thanks for any input!
WARNING: You are in the presence of a n00b. Stupid questions can and will be asked.

Operating System: Ubuntu Linux 12.04 LTS
Editor/IDE: TexMaker

cgnieder
Site Moderator
Posts: 1948
Joined: Sat Apr 16, 2011 7:27 pm
Location: Germany
Contact:
Very similar questions have been asked and answered on TeX.SE. Maybe one of them can give you a start:

Regards
Clemens
------------------------------
New German Q&A site about TeX: http://texwelt.de/wissen

localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany
A soluton with pgf/tikZ.
\documentclass{scrartcl}\usepackage[T1]{fontenc}\usepackage{tikz}\usetikzlibrary{calc,matrix} \begin{document}   \begin{equation}     \begin{tikzpicture}[>=stealth,baseline,anchor=base,inner sep=0pt]       \matrix (foil) [matrix of math nodes,nodes={minimum height=0.5em}] {         ( & a & + & b & ) & \cdot & ( & c & + & d & ) \\       };       \path[->] ($(foil-1-2.north)+(0,1ex)$)   edge[red,bend left=45]    ($(foil-1-8.north)+(0,1ex)$)                 ($(foil-1-2.north)+(0,1ex)$)   edge[green,bend left=60]  ($(foil-1-10.north)+(0,0.5ex)$)                 ($(foil-1-4.north)+(0,0.5ex)$) edge[blue,bend left]      ($(foil-1-8.north)+(0,1ex)$)                 ($(foil-1-4.north)+(0,0.5ex)$) edge[orange,bend left=45] ($(foil-1-10.north)+(0,0.5ex)$);     \end{tikzpicture}   \end{equation}\end{document}

Thorsten
Attachments
The obtained output.
FOIL.png (7.71 KiB) Viewed 2659 times
LaTeX Community Moderator

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses