# Curved arrow describing a step in a mathematical derivation

Is it possible to achieve something like this in LaTeX?

I want a curved arrrow pointing from 1st line to the other line and is coupled with an equation number which indicates the equation used. I want to be able to specify equation used manually like for example \eqref{2.10}.

I have learned TikZ a bit and found something what might look like a solution:

\begin{tikzpicture}
\path (0,1) coordinate(c1)
(-0.5,0.85) coordinate(c2)
(-0.5,0.15) coordinate(c3)
(0,0) coordinate(c4)
(-1,0.5) coordinate(c5);
\draw [-latex] (c1) .. controls (c2) and (c3)
.. (c4);
\draw (c5) node [anchor=east] {\text{\eqref{2.10}}};
\end{tikzpicture}


This produces a lovely arrow (below) which i don't know how to put on the left side of two rows of an equation. Please someone give me advice on this.

Is it possible for this arrow to dynamically change coordinates c1, c2, c4 and c4 if equation rows are sepparated more or less?

• That sounds like a job for tikzmark. Related question: tex.stackexchange.com/questions/76506/… Commented May 5, 2013 at 12:15
• Where can i get any good PDF e-book to learn tikzmark? I don't understand much by only reading that topic.
– 71GA
Commented May 5, 2013 at 12:29
• Beware the tikzmark, my son should be a good start. Commented May 5, 2013 at 12:31

Just another suggestion with PSTricks.

\documentclass[preview,border=12pt,leqno,varwidth]{standalone}
\usepackage{pst-node}
\usepackage{amsmath}
\begin{document}
\begin{align}
\rnode[l]{A}{y} &= ax^2 +bx +c\\
\rnode[l]{B}{y} &= mx +c
\pcbar[angle=180,nodesep=3pt,linearc=3pt,linecolor=blue]{->}(A)(B)
\end{align}
\end{document}

• Nice! With this we can skip some middle lines. For example, connect the 1st and 3rd ones. Unfortunately I can not compile with pdflatex. Commented May 6, 2013 at 13:13
• @Sigur: Put \usepackage{auto-pst-pdf} in your preamble to be compilable with pdflatex. Commented May 6, 2013 at 13:30
• @Bugbusters This might come usefull.
– 71GA
Commented May 7, 2013 at 6:13

If the equations have the same length the code below works fine.

Use xymatrix with an empty column to produce the arrow.

$$\begin{gathered} \xymatrix@R=1ex@C=-2pt{ \ar@/_7pt/[d] & \hat{H}= -\frac{num}{den}\cdots\\ & \hat{H}= -\frac{num}{den}\cdots} \end{gathered}$$


The @R= controls the distance between the (R)ows. The same to the (C)olumns.

The @/_7pt/ controls the curvature of the arrow. _ is to curve down (from top to bottom).

• This is not as compact as i would like it to be. I don't like the empty row inbetween.
– 71GA
Commented May 5, 2013 at 15:06
• @71GA, there is no empty row. You can control the distance between the rows and columns. See the edited code. I'll update the image. Commented May 5, 2013 at 15:07

Tongue-in-cheek solution: rip the character from MnSymbol, and make it huge:

\documentclass[leqno]{article}

\usepackage{graphicx}
\usepackage{amsmath}

\DeclareFontFamily{U}{MnSymbolA}{}
\DeclareSymbolFont{MnSyA}{U}{MnSymbolA}{m}{n}
\DeclareFontShape{U}{MnSymbolA}{m}{n}{
<-6>  MnSymbolA5
<6-7>  MnSymbolA6
<7-8>  MnSymbolA7
<8-9>  MnSymbolA8
<9-10> MnSymbolA9
<10-12> MnSymbolA10
<12->   MnSymbolA12}{}
\DeclareMathSymbol{\rcurvearrowdown}{\mathrel}{MnSyA}{195}
\newcommand{\follows}{\raisebox{-6pt}{\scalebox{3}{$\rcurvearrowdown$}}}

\begin{document}
\tag{2.10} \follows\quad \begin{aligned} \widehat{H} & = - \frac{\hbar^2}{2m} \frac{d^2}{x^2} + \frac{1}{2} m \omega^2 x^2 \\ \widehat{H} & = - \frac{\hbar^2}{2m} \frac{d^2}{x^2} + \frac{1}{2} m \omega^2 x^2 \end{aligned}
\end{document}


• Is it possible to make the arrow look more like the one on my picture - i mean smaller, more discrete?
– 71GA
Commented May 6, 2013 at 7:18
• @71GA Unfortunately not. Because of the scaling (here: factor 3) of the original glyph the arrow gets fat.
– mafp
Commented May 6, 2013 at 7:38

With tikz, you can use tkz-linknodes. margin=11cm is determined with the right margin of the document.

\documentclass[preview,border=12pt,leqno,varwidth]{standalone}
\usepackage{amsmath}
\begin{document}

\begin{NodesList}
\begin{align}
\tikzset{ArrowStyle/.append style = {blue,rounded corners=.25cm}}
\end{align}
\end{NodesList}
\end{document}


A more complex example

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{minipage}{11cm}
{\renewcommand{\arraystretch}{2}%
\begin{NodesList}
$y = \left\{% \begin{array}{ll} x^2+2x &\textrm{if }x<0, \AddNode \\ x^3 &\textrm{if }0\le x<1, \AddNode[2]\\ x^2+x &\textrm{if }1\le x<2, \AddNode \\ x^3-x^2 &\textrm{if }2\le x. \AddNode[2] \end{array}\right.$
\tikzset{ArrowStyle/.append style = {<->,red,rounded corners=.25cm}}
\tikzset{LabelStyle/.append style = {pos=0.20}}