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

As the question says,

$\overrightarrow{a} \otimes \overrightarrow{b}$

looks rather unpleasant because the arrow over the a is so much lower than the arrow over the b. I'm not sure that just raising the arrow over the a would lead to a visually pleasing result... but I thought I'd ask if anyone had any suggestions.

Edit: enter image description here

share|improve this question
up vote 18 down vote accepted

You can force the two arrows to be on the same level by adding a \vphantom instruction in the argument of the first \overrightarrow instruction. "vphantom" is short for "vertical phantom"; a vertical phantom has no width (and is therefore invisible) and has the same height and depth as its argument. For your purposes, the argument of the \vphantom command may simply be the character used in the second \overrightarrow command.

$\overrightarrow{a\vphantom{b}} \otimes \overrightarrow{b}$

enter image description here

Addendum: If you find yourself using a lot of \overrightarrow instructions and don't wish to have to keep track of whether the heights of some of the arrows have to be adjusted, you could create a command such as \rarrow (short for "right arrow"):


Here, b is chosen as the argument of the \vphantom command because it has a full-height ascender. The preceding MWE could then be rewritten as

$\rarrow{a} \otimes \rarrow{b}$

Further addendum, prompted by a great comment by @sigur: To address the possibility that both elements of the tensor product consist of characters that either do not contain ascenders or only half-height ascenders (such as "t" and "j"), you could define a command named, say, \tensorpr, as follows:

\usepackage{amsmath} % for less-cramped positioning of arrows
                  \otimes \overrightarrow{#2\vphantom{#1}}}

Note the symmetric use of the \vphantom instructions. By the way, I'd recommend using the amsmath package because it causes the arrows to be typeset ever so slightly higher above their arguments, leading to a less "cramped" look.

share|improve this answer
Nice. What about this command: \newcommand{\oarrow}[2]{\overrightarrow{#1\vphantom{#1#2}}\otimes\overrightarro‌​w{#2}} to write the tensor product with the \vphantom using both arguments so that in case of no letters with ascenders, everything works. ` – Sigur Sep 24 '12 at 23:27
@Sigur -- thanks for this great comment! I've incorporated your idea in a new addendum that sets up a command I call \tensorpr and uses two \vphantom instructions. – Mico Sep 25 '12 at 11:41

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.