1

I need something like the \underbracket command from the mathtools package:

\documentclass{article}
\usepackage{mathtools}% http://ctan.org/pkg/mathtools
\begin{document}
\[
\underbracket{u'-P(x)u^2-Q(x)u-R(x)}_{\text{=0, since~$u$ is a particular solution.}}
\]
\end{document}

[Underbracket as provided by mathtools]

Except that I need an arrowhead on one side of the bracket, pointing upward. I don't mind having to construct this symbol myself, if only I knew where to find the bare arrowhead to use. But perhaps someone else has already created a package to have such "underarrows"?

Here's an approximate example of the kind of thing I'm looking for:

[arrows from heim 1998]

It'd be nice if it were possible to do this with something lighter-weight than pstricks or TikZ, but I'd be happy for any solution.

dubiousjim
  • 1,035
  • 1
  • 8
  • 14
  • Do any of the techniques under http://tex.stackexchange.com/q/35717/15925 help? – Andrew Swann Jan 22 '16 at 08:16
  • Great, thanks, http://tex.stackexchange.com/a/61990/3627 looks like what I'm after. I'd hope there is a solution that doesn't need TikZ, but that is at least an workable fallback. – dubiousjim Jan 22 '16 at 08:37

1 Answers1

5

Modifying the TikZ method at this answer, gives:

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

\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}
\tikzset{square arrow/.style={to path={-- ++(0,-.25) -| (\tikztotarget)}}}
\tikzset{deep square arrow/.style={to path={-- ++(0,-.5) -| (\tikztotarget)}}}
\begin{document}

\begin{equation}
  a\tikzmark{a}x\tikzmark{b}^2 + bx + c = 5\tikzmark{c}x^2 + \tikzmark{d}bx + c.
  \tikz[overlay,remember picture]
   {\draw[->,square arrow] (c.south) to (b.south);}
  \tikz[overlay,remember picture]
   {\draw[->,deep square arrow] (d.south) to (a.south);}
\end{equation}

\begin{equation}
  a\tikzmark{a}x^2 + bx + c = 5\tikzmark{c}x\tikzmark{b}^2 + \tikzmark{d}bx + c.
  \tikz[overlay,remember picture]
   {\draw[->,square arrow] (d.south) to (b.south);}
  \tikz[overlay,remember picture]
   {\draw[->,square arrow] (c.south) to (a.south);}
\end{equation}

\end{document}

which yields:

heim arrows

which was just what I needed.

dubiousjim
  • 1,035
  • 1
  • 8
  • 14