# Overscript distance

When I write:

Overscript[PQ, \[RightVector]],


the arrow is placed too close to the P and Q. Is there a way to modify the default distance used by Overscript?

-
Quick fix is to select PQ or overscript and ALT+UpArrow/DownArrow. –  Kuba Aug 5 '13 at 11:29
@kuba ...also the best fix –  Mike Honeychurch Aug 5 '13 at 12:15

I see the problem of close spacing only for OverVector, not for the input with Overscript (where in your example I had to add quotation marks around the arrow symbol to avoid getting an error).

So I'm now assuming you're actually referring to the following issue:

OverVector[PQ]


This could be remedied by adding an AdjustmentBox around the arrow with the help of a formatting command like this:

OverVector /: MakeBoxes[OverVector[x_], _] :=
OverscriptBox[ToBoxes[x],

OverVector[PQ]


This enlarged spacing will work by default in StandardForm and TraditionalForm output.

Edit

For backward compatibility with Mathematica version 7, Mr. Wizard pointed out that it's good to add another option:

OverVector /: MakeBoxes[OverVector[x_], _] :=
OverscriptBox[ToBoxes[x],