How can I attach an arrow with text to some part of an equation?



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




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


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

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


then you can use something like

\tikz[overlay,remember picture]\draw[red,->] ($(Vi.south)+(.2em,0em)$) -- ++(0,-.95cm)--(annotate.west);
|improve this answer|||||
  • You may have to add extra vspace after the diagram as this does not create extra space to allocate the labelling. It runs on top of the text that follows. – azetina Nov 12 '12 at 20:02

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}}}}}

= {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}}}


enter image description here

Update: MWE in LaTeX:


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


= {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}}} \\

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.