5

I am trying to typeset \hat{V} but it turns out not looking right. The hat is too close to the V so it is difficult to decipher the hat on the V. Is there a way to increase the vertical space between the V and the hat?

Thanks

1

REVISED to work with all mathstyles.

I've set it up so that changing the value of \dyhat changes the vertical shift relative to its default placement. Shown below (for all three math styles) with a 0.067ex shift on the first line, and a 0.2ex shift on the second line. Negative shifts are acceptable. Using a scalable shift measurement like ex's will permit the result to scale to the different math sizes.

\documentclass{article}
\usepackage{stackengine}
\usepackage{scalerel}
\def\stacktype{L}
\stackMath
\def\dyhat{.067ex}
\newcommand\myhat[1]{\ThisStyle{%
              \stackon[\dyhat]{\SavedStyle#1}
                              {\SavedStyle\hat{\phantom{#1}}}}}
\begin{document}
\( \myhat V \)
\(\scriptstyle \myhat V \)
\(\scriptscriptstyle \myhat V \)

\def\dyhat{.2ex}
\( \myhat V \)
\(\scriptstyle \myhat V \)
\(\scriptscriptstyle \myhat V \)
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.