5

I want to place text under an entire multivariate expression, exactly the way one is able with \underbrace, but without the brace. I want it to specifically describe the first variable in the expression, but for the text to span the entire expression. I have scoured the webs and it's all about placing text under single symbols or commands. For example, \underset, \smashoperator, and \limits can't seem to function with more than one command or variable, even when I use brackets around the command line.

I got what I wanted using this:

    \begin{align*}
      N_{e}(r)\, =\, \sum_{u, v, w}\; &n_{e}\,(\overrightharp{\text{r}}\, -\,  u\overrightharp{\text{a}}\, -\, v\overrightharp{\text{b}}\, -\,  w\overrightharp{\text{c}}) \\[-.4cm]
       & \lcurvearrownw \text{\footnotesize{electron density per}}\\[-.2cm]
       &\; \; \; \; \; \; \; \text{\footnotesize{primitive unit cell.}}
    \end{align*}

but I was wondering if there was a less hacky way of going about it. I want my client to be able to feasibly edit their documents when I am finished. In other words, I want them to know what is going on here.

cmhughes
  • 100,947
Brazos Wolf
  • 155
  • 6

1 Answers1

7

You can use a \parbox to write the text; using \mathrclap (from the mathtools package) and \raisebox you can place the \parbox in the desired position; here's a simple example using a defined command \Desc with two mandatory arguments (the box width and the text) and one optional argument controlling the vertical shifting:

\documentclass{article}
\usepackage{mathtools,MnSymbol,harpoon}

\newcommand\Harp[1]{%
  \overrightharp{\textrm{#1}}}
\newcommand\Desc[3][-2.5ex]{%
  \mathrlap{\raisebox{#1}{$\lcurvearrownw$ \parbox[t]{#2}{\footnotesize #3}}}}

\begin{document}

\[
N_{e}(r) = \sum_{\mathclap{u, v, w}}\, n\Desc{3cm}{electron density per \\ primitive unit cell.}_{e}(\Harp{r} - u\Harp{a} - v\Harp{b} - w\Harp{c}) 
\]

\end{document}

enter image description here

Since you are using the command \lcurvearrownw I assumed that you were loading the MnSymbol package; this package changes many symbols.

Gonzalo Medina
  • 505,128