Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to make an arrow under an equation pointing from one part of the equation to another. A bit like an underbrace, but with an arrow. How can I do this?

share|improve this question

migrated from stackoverflow.com Nov 11 '11 at 7:41

This question came from our site for professional and enthusiast programmers.

    
Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. –  N.N. Nov 11 '11 at 8:04
    
Could you clarify whether you want the arrow to point to specific parts of the equation or not. –  Loop Space Nov 11 '11 at 8:09
    
Should the arrow be straight or curved? –  Gonzalo Medina Nov 11 '11 at 14:48

3 Answers 3

Using TikZ, you can place a node for the starting point of the arrow and another one for the ending point, and then join the nodes using the kind of arrow that you desire; a little example, using a curved red arrow and some code to place the nodes borrowed from this answer by Andrew Stacey:

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

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

\begin{document}

\begin{equation}
  a\tikzmark{a}x^2 + bx + c = 5\tikzmark{b}x^2 + bx + c.
  \begin{tikzpicture}[overlay,remember picture,out=315,in=225,distance=0.4cm]
    \draw[->,red,shorten >=3pt,shorten <=3pt] (a.center) to (b.center);
  \end{tikzpicture}
\end{equation}

\end{document}

enter image description here

share|improve this answer

Try this one:

\underrightarrow{y = ax^2 + bx + c}

It will look like this:

formula

share|improve this answer

The document mathmode has the sections Over- and underbrackets and Extensible arrows

If you want to define your own style please have a look into the the linked document. An example of the document is shown below.

\documentclass{article}

\usepackage{amsmath}
\makeatletter
\def\mapstofill@{%
\arrowfill@{\mapstochar\relbar}\relbar\rightarrow}
\newcommand*\xmapsto[2][]{%
\ext@arrow0099\mapstofill@{#1}{\displaystyle#2}}
\makeatother
\begin{document}

$\underrightarrow{y = ax^2 + bx + c}$


$\xmapsto{y = ax^2 + bx + c}$
\end{document}

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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