TransWikia.com

Lowering the arrow in overset{rightharpoonup}{calR}

TeX - LaTeX Asked by amsmath on April 26, 2021

I have the following:

overset{rightharpoonup}{calR}

which produces

enter image description here

What I would like to do is to lower the rightharpoonup so that it is closer to the calR and doesn’t cause a larger gap between lines. How can I do this?

One Answer

The main problem is the bounding box of rightharpoonup.

Some low level programming will help.

documentclass{article}
usepackage{amsmath}

makeatletter
DeclareRobustCommand{hvec}[1]{{mathpalettehvec@{#1}}}
newcommand{hvec@}[2]{%
  vbox{offinterlineskip
    ialign{%
      hfil##hfilcr
      $m@th#1{}_{rightharpoonup}$kern-scriptspacecr
      $m@th#1#2$cr
    }%
  }%
}
makeatother

begin{document}

$hvec{mathcal{R}}_{hvec{x}}$
% compare with
$overset{rightharpoonup}{mathcal{R}}_{overset{rightharpoonup}{x}}$

end{document}

enter image description here

Correct answer by egreg on April 26, 2021

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