LaTeX Books


LaTeX Beginners Guide

Limited discount 50%
coupon code tDRet6Y

click here to read the whole story

LaTeX users online

In total there are 14 users online :: 0 registered, 0 hidden and 14 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 14 guests

Curved over-head Arrows connecting Numbers

LaTeX Forum: Text Formatting

Add tags Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)

Postby HunterDX77M on Sun Jul 22nd, 2012

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! :D
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
Posts: 2
Joined: Tue Jun 19th, 2012

Postby cgnieder on Sun Jul 22nd, 2012

New German Q&A site about TeX:
Support for my packages:
User avatar
Site Moderator
Posts: 1858
Joined: Sat Apr 16th, 2011
Location: Germany

Postby localghost on Sun Jul 22nd, 2012

A soluton with pgf/tikZ.
Code: Select all  •  Open in writeLaTeX

    \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)$);

The obtained output.
FOIL.png (7.71 KiB) Viewed 1967 times
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses
User avatar
Site Moderator
Posts: 9218
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Return to Text Formatting

LaTeX users online

Users browsing this forum: No registered users and 14 guests