TransWikia.com

Using bigtriangledown as the nabla operator: vertical adjustment

TeX - LaTeX Asked by ASPVL on November 30, 2020

I want to use bigtriangledown as the nabla operator, but the vertical spacing doesn’t seem right when I use it. Can someone suggest a way to ensure everything is aligned?

For example:

left (w_E right )_{0}=-frac{1}{rho_0 f}left ( bigtriangledown times vv{tau}^{s} right )_{z}

Renders as

enter image description here

You can see that the vertex is aligned with the base. I wanted the whole symbol to be aligned with the multiplication sign.

2 Answers

Unfortunately mathopbigtriangledown does nothing at all. For instance, the input

bigtriangledowntimesmathopbitriangledowntimesnabla

yields

enter image description here

The reason is in the bounding box of bigtriangledown:

enter image description here

which is already centered with respect to the formula axis, by means of the top white space.

The above is with the default Computer Modern fonts. With other fonts, such as NewTX, the output can be different, because of a different bounding box. With newtxmath you indeed get, from the above input,

enter image description here

and you can see that the triangle in the middle is slightly moved down because of mathop.

So I'm afraid that a solution is font dependent.

What can you do with Computer Modern? An idea might be to raise the symbol by a suitable fraction of its depth. Here I used a factor 0.5

documentclass{article}
usepackage{amsmath,esvect}

makeatletter
renewcommand{nabla}{mathord{mathpaletteraise@halfbigtriangledown}}
newcommandraise@half[2]{%
  raisebox{.5depth}{$m@th#1#2$}%
}
makeatother

begin{document}
[
(w_E)_{0}=-frac{1}{rho_0 f}(nabla times vv{tau}^{s})_{z}
]
[
nabla xquadscriptstylenabla xquadscriptscriptstylenabla x
]
end{document}

enter image description here

Correct answer by egreg on November 30, 2020

Here there are two version. The first it is your code and the second is mine without left( and right) and the your new command aligntridown.

documentclass[a4paper,12pt]{article}
usepackage{amsmath,amssymb}
usepackage{esvect}
newcommand{aligntridown}{raise.4exhbox{$bigtriangledown$}}

begin{document}
verb|without raise and hbox command|
[left (w_E right)_{0}=-frac{1}{rho_0 f}left ( bigtriangledown times vv{tau}^{s} right)_{z}]
verb|Using raise and hbox command to align bigtriangledown|
[(w_E)_{0}=-frac{1}{rho_0 f}(aligntridowntimes vv{tau}^{s})_{z}]
end{document}

enter image description here

Answered by Sebastiano on November 30, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP