Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question originated from a confusion created by some Linux systems where, for some software (editor and browser) the combining unicode characters appear to apply to the right (instead of to the left like the documented convention). So it could be a "localized" issue (well, localized to all Linux systems). In fact this bug looks like a useful feature because it allows straight conversion for the typesetter commands. Still answers and workarounds are greatly appreciated. -- The OP

The unicode-math list of symbol describes "combining right arrow above" ( or ⃗x) as translated into \vec in Section 7.

How is one supposed to use this feature of unicode-math?

In this example I don't get the arrow above the $x$:

$ ⃗x$ %this line contains the unicode arrow and the x character (in case your browser doesn't show it).

(The compilation with lualatex and xelatex shows simply x with no arrow)

This is strange because unicode-math works for other things like superindexes, etc.

EDIT: For those having trouble seeing the unicode characters, here it is an screenshot of my editor (gedit), my browser shows basically the same:


EDIT 2: This is how @Jukka answer looks like in my browser:

screenshot: jukka

EDIT 3: I realized that the rendering (of the text/code) is very system dependent, so if you answer this question please add a screenshot of what you see in your editor or browser. There is probable bug filed already about this: https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/51554.

For example, so far, I find that <arrow>x renders the arrow over the x in Gedit 3.10 and Firefox 28.0 and the arrow before the x for TeXworks and Google Chrome.

share|improve this question
Interestingly for me in firefox it is drawn on the character before the x. –  Chris H Apr 14 '14 at 9:27
In Firefox Linux the arrow shows above the x. Maybe depends on the font. This is the precise symbol fileformat.info/info/unicode/char/20d7/index.htm. –  alfC Apr 14 '14 at 9:29
Generally speaking it's best to avoid such combining characters in typeset work and let the typesetter position the vector arrow. Not least because then you will get consistent behaviour if the base is not just a single letter. –  David Carlisle Apr 14 '14 at 9:29
But that transformation is hard in tex as a combining character comes after the base and a tex accent command has to come before, so you would need to make every character such as x look ahead to see if it is followed by a combining character. which is possible but will break some things and be slow, and just telling people not to do that seems like a better option (although I don't maintain unicode-math so it isn't my decision) –  David Carlisle Apr 14 '14 at 9:34
copy the text from your posted code $ ⃗x$ %this to the first text block at people.w3.org/rishida/tools/conversion and hit convert you see the code points displayed as 0024 0020 20D7 0078 0024 0020 0025 0074 0068 0069 0073 so the second character is U+0020 ie a space. –  David Carlisle Apr 14 '14 at 20:28

1 Answer 1

up vote 5 down vote accepted

In Unicode, a combining mark is associated with the character that precedes it, so you should use $x⃗$(the content between dollar signs is letter x followed by U+20D7 COMBINING RIGHT ARROW ABOVE). And you should declare a mathematical font that contains the character.

But it still won’t work, presumably due to limitations in unicode-math, in fonts, or in the LaTeX interpreter(s) you are using. Combining marks are often poorly implemented in fonts (their metrics are wrong, causing the mark to be misplaced) and in rendering software (as we can see here: x⃗ does not look right at all).

The conclusion is that you should use methods like \vec{x} or, if you can choose the notations used, use bold face for vectors instead of an arrow above. Bold face is the primary notation according to the ISO 80000-2 standard and the only notation described in the US standard (ANSI/IEEE Std 260.3-1993). It is also typographically more robust.

share|improve this answer
Ha, ha, ha, you say "as we can see here ... does not look right at all". It does look right in my browser!! I'll add the screen shot in my question. For some reason my browser and my editor seem to work such that the combining character affects to the right. –  alfC Apr 14 '14 at 15:51
I found this in the Wikipedia entry which confirms what you say "In Unicode, diacritics are always added after the main character, so it is possible to add several diacritics to the same character, although as of 2010, few applications support correct rendering of such combinations.". However my applications behave as is if the opposite where true. And, if I believe that it makes it very friendly for the typesetter to transform the combining character into commands. –  alfC Apr 14 '14 at 15:56
To confirm, as you say, the arrow after the letter still doesn't produce the vector in the resulting PDF. –  alfC Apr 14 '14 at 16:01
After all the confusion about the order (TeXworks works as everybody describes). Does "combining character" works in you unicode-math and typesetter? Mine are XeTeX 3.1415926-2.6-0.9999.3 (TeX Live 2014/dev) This is LuaTeX, Version beta-0.76.0-2013122811 (TeX Live 2014/dev) (rev 4627). Fedora 20. –  alfC Apr 14 '14 at 23:46

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.