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
?
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityWhen 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
?
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],
AdjustmentBox["\[RightVector]", BoxBaselineShift -> -0.5]]
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],
AdjustmentBox["\[RightVector]", BoxBaselineShift -> -0.5,
BoxMargins -> {{0, 0}, {0.5, 0}}]]
PQ
or overscript and ALT+UpArrow/DownArrow. $\endgroup$