2

When I write

\[
\left \lVert \overrightarrow{\nabla} \right \rVert
\]

I get way too much extra space under the baseline:

underbaseline

Why is this happening, and how can I fix it?

6
  • matched delimiters (which is what \left and \right does) are vertically symmetrical around the math axis (at the height of a minus sign). this expression, whose height is increased by the overarrow, will gain an equivalent depth using this coding. Aug 25, 2015 at 20:53
  • @barbarabeeton Thank you for explaining. Any suggestions on how to fix this?
    – justin
    Aug 25, 2015 at 20:55
  • Because they ad so much extra space I never use \left and \right and instead use \bigl, \Bigl, ... and \bigr, \Bigr, ... from amsmath.
    – user30471
    Aug 25, 2015 at 21:00
  • @Andrew Unfortunately, even using \Bigl and \Bigr, which make the \lVert and \rVert just reach the top of the \overrightarrow, similarly add a huge amount of space underneath the baseline in this example. \bigl and \bigr don't allow the \lVert and \rVert to reach the top of the \overrightarrow.
    – justin
    Aug 25, 2015 at 21:06
  • 3
    @justin Your error is in thinking that the fences should cover the overarrow: they needn't to. Normal fences or \big ones are sufficient.
    – egreg
    Aug 25, 2015 at 21:15

1 Answer 1

3

The fences are symmetric with respect to the formula axis (the imaginary line where fraction lines sit). In the case of \overrightarrow{\nabla}, the size chosen is the same as for \Bigg, which extends way down the formula axis.

There's no need that the fences cover the whole construction, in particular the arrow.

Here's a visual sample, where I use the handy \DeclarePairedDelimiter function provided by mathtools (that loads amsmath). I also use smaller arrows as defined in https://tex.stackexchange.com/a/248297/4427

\documentclass{article}
\usepackage{mathtools}

\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}

\makeatletter
\newcommand{\overrightsmallarrow}{\mathpalette{\overarrowsmall@\rightarrowfill@}}
\newcommand{\overarrowsmall@}[3]{%
  \vbox{%
    \ialign{%
      ##\crcr
      #1{\smaller@style{#2}}\crcr
      \noalign{\nointerlineskip\vskip1pt}%
      $\m@th\hfil#2#3\hfil$\crcr
    }%
  }%
}
\def\smaller@style#1{%
  \ifx#1\displaystyle\scriptstyle\else
    \ifx#1\textstyle\scriptstyle\else
      \scriptscriptstyle
    \fi
  \fi
}
\makeatother

\begin{document}

\begin{gather*}
\norm{\overrightsmallarrow{\nabla}}\quad
\norm[\big]{\overrightsmallarrow{\nabla}}\quad
\norm[\Big]{\overrightsmallarrow{\nabla}}\quad
\norm*{\overrightsmallarrow{\nabla}}
\\
\norm{\overrightsmallarrow{x}}\quad
\norm[\big]{\overrightsmallarrow{x}}\quad
\norm[\Big]{\overrightsmallarrow{x}}\quad
\norm*{\overrightsmallarrow{x}}
\\
\norm{\overrightsmallarrow{X}}\quad
\norm[\big]{\overrightsmallarrow{X}}\quad
\norm[\Big]{\overrightsmallarrow{X}}\quad
\norm*{\overrightsmallarrow{X}}
\end{gather*}

\end{document}

enter image description here

I have no doubt that the normal version is the right one.

3
  • Do you mind explaining the ialign stuff? I'd just have defined a similar macro using smash and vphantom
    – daleif
    Aug 25, 2015 at 23:41
  • @daleif \ialign is just \halign with an initialization of \everycr to empty and \tabskip to zero.
    – egreg
    Aug 26, 2015 at 8:19
  • 1
    lost me there ;-), never been that far down TeX.
    – daleif
    Aug 26, 2015 at 8:48

Not the answer you're looking for? Browse other questions tagged .