Arrow in math mode

Here's something to get you started using Andrew Stacey's \tikzmark idea, first posted here

Adding a large brace next to a body of text

screenshot

MWE

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{calc}

\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1){};}

\begin{document}

\[
    \int\limits_{\tikzmark{Vi}V_i}f(r)\mathrm{d}r
    \tikz[overlay, remember picture] \node[below right=1cm of Vi](annotate){Your text here};
    \tikz[overlay,remember picture]\path[red,->] ($(Vi.south)+(.2em,0em)$) edge[bend right=45](annotate.west);
\]
\end{document}

The idea is to add nodes to your expression, and then connect them as you see fit. The main tool is overlay, remember picture from tikz.

And if you want the right angled line

screenshot

then you can use something like

\tikz[overlay,remember picture]\draw[red,->] ($(Vi.south)+(.2em,0em)$) -- ++(0,-.95cm)--(annotate.west);

This had to be fine tuned but it is completely general and requires no tikz. It's in plain TeX, but it should work with LaTeX after minor edits.

The idea is to manually position boxes to form an arrow with the specified shape (\cornerarr). Then one uses the equation alignment environment to place this arrow below the desired point.

The MWE:

\def\cornerarr{\hbox to 1.7cm{$\uparrow$\hskip-2.5pt\hbox{\lower2pt\vbox{\hbox to 1.5cm{\hrulefill}}}}}

$$\eqalignno{
= {1\over v(r)} \sum_{i}^{N(v(r))} m_i &\int_{v_i} d^3r f_i(r)\cr
&\hskip3pt\cornerarr\hbox{\lower2pt\vbox{\hbox{Volumen des i-ten Teilchens}}}
}$$

\bye

enter image description here

Update: MWE in LaTeX:

\documentclass{article}
\usepackage{amsmath}

\def\cornerarr{\hbox to 1.7cm{$\uparrow$\hskip-2.5pt\hbox{\lower2pt\vbox{\hbox to 1.5cm{\hrulefill}}}}}

\begin{document}

\begin{align*}
= {1\over v(r)} \sum_{i}^{N(v(r))} m_i &\int_{v_i} d^3r f_i(r) \\
&\hskip3pt\cornerarr\hbox{\lower2pt\vbox{\hbox{Volumen des i-ten Teilchens}}} \\
\end{align*}

\end{document}

Tags:

Math Mode