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 notes about unicode math with accents are greatly appreciated.
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$
:
\documentclass{article}
\usepackage{unicode-math}
\begin{document}
$ ⃗x$ %this line contains the unicode arrow and the x character (in case your browser doesn't show it).
\end{document}
(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:
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. In later version of gedit 3.34, the arrow appears alone before the x
.
x
. Maybe depends on the font. This is the precise symbol fileformat.info/info/unicode/char/20d7/index.htm.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)$ ⃗x$ %this
to the first text block at people.w3.org/rishida/tools/conversion and hit convert you see the code points displayed as0024 0020 20D7 0078 0024 0020 0025 0074 0068 0069 0073
so the second character is U+0020 ie a space.