TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've come to a situation where I must put a tilde/hat over the vector sign in math mode:

\begin{document} % The start of the document



I find the resulting overly tall character to be a little unsightly, so I was just curious if there was a way to lower the tilde closer to the vector symbol in an aesthetically pleasing way and if I could make it into a command like:


I attempted working through this and playing around with things but it didn't work out in my favour due to my lack of knowledge of the TeX language.

Any pointers to related resources or help would be greatly appreciated! Thanks in advance.

share|improve this question

Here is a stab at something that might work for you. Depending on taste, this may be all you're after:

\usepackage{mathtools}% http://ctan.org/pkg/mathtools
\usepackage{calc}% http://ctan.org/pkg/calc
\newcommand*{\vtilde}[2][0pt]{% \vtilde[<lift>]{<stuff>}

You would use \vtilde[<lift>]{<stuff>} where (the optional argument) <lift> is a length of how much you want to lift the \tilde above <stuff> (default is 0pt). Specifying a positive [negative] length raises [lowers] \tilde. For example,


The mathtools package is used to have access to \mathrlap, while the calc package provides calculations with lengths.

share|improve this answer
This is perfect! Thanks so much! – trthatcher Aug 17 '11 at 13:40
This is a very nice solution: +1. – DJP Aug 17 '11 at 15:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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