I am trying to typeset a document with combining diacritics directly input in it. I use LuaLaTex. Here is a minimal example illustrating the original issue:
\documentclass{minimal}
\usepackage{unicode-math}
\setmathfont{XITS Math}
\begin{document}
$v⃗$
\end{document}
The above vector arrow (U+20D7) is completely lost in the output. In text mode it would be shown, but in math mode it was discarded from the horizontal list alltogether.
Then I tried the following:
\documentclass{minimal}
\usepackage{unicode-math}
\setmathfont{XITS Math}
{
\catcode`\_=11\relax
\catcode`\:=11\relax
\gdef\SetMathCode#1#2{\um_set_mathcode:nnn{#1}{#2}\um_symfont_tl}
}
\SetMathCode{"20D7}\mathaccent
\begin{document}
$v⃗$
\end{document}
This code essentially uses \Umathcode
, indirectly through a macro in the unicode-math package. The reason is, that I found I had to change the math family of the arrow to the XITS font. The mapping of the diacritics (and possibly some of the other characters) are not set up automatically for math mode.
Now the arrow is typeset adjacently to the right of the accented v. I want it to be typeset as accent, above the v. The \vec
macro and \Umathaccent
work, but I want to make the formulas plain-text readable if possible. (I use the Emacs quail system for input.)
Could you please advice?
My LuaTeX version is beta-0.70.2, TeX Live 2012, LaTeX2e <2011/06/27>
XITS font is version 1.105.
Thanks in advance
Note:
Obviously the problem arises when accenting the special script-like letters.
In the end, the issue seems to be with the handling of the special top-accent glyph metric. It is supposed to be done as described in the "Math accent handling" section of the luatex manual, but in reality is done only for the \Umathaccent
command, and I think forgotten for combining characters. The text version of the font uses some other mechanism with horizontal offsets (called "bearings"?), and goes around this limitation.
I will investigate this a bit further. If it is a core issue, I should file this with the LuaTeX guys. Consider the question closed. It became too specific anyway.
Missing character: There is no ⃗ (U+20D7) in font cmmi10!