# two vector symbols above symbol (tensor notation) #877

Closed
opened this issue Jul 21, 2014 · 6 comments

Projects
None yet
2 participants

### kapet3 commented Jul 21, 2014

 I have problems with two vector symbols which I frequently use to denote a tensor quantity, for example \vec{\vec{a}} . The second vector arrow above the symbol is substantially larger and it does not look good, especially when compared to the TeX/LaTeX result. Tested with Firefox 24, 30, and Chrome 35. MathJax: LaTeX:
Member

### dpvc commented Jul 21, 2014

 The \vec macro is implements using MathML that puts a right arrow (U+2192) over its argument, rather than the combining right arrow above (U+20D7). Apparently this is the preferred notation (using combining characters in this way is frowned upon). MathJax uses a heuristic to replace the arrow with the combining arrow when the argument is a letter, so that \vec works as expected in that case. But if the argument is not a single letter, it uses the arrow, which is larger. I suppose it might be better to check for an embellished letter as the base, as that would handle this case as well. In the meantime, you could use   just before the script that loads MathJax.js. This will change the arrow used by \vec to being the combining arrow rather than the regular arrow. If you don't manage the page where you want to enter this, it gets to be a bit harder. You could use \mathop{\vec{a}}^{\mmlToken{mo}{⃗}}  or \def\vvec#1{\mathop{\vec{#1}}^{\mmlToken{mo}{⃗}}} \vvec{a}  but this is a bit awkward.
Author

### kapet3 commented Jul 22, 2014

 That StartupHook is helpfull, just a small imperfection occurs with a greek letter like \tau or \delta, for example, where the upper arrow is shifted left slightly. Thanks a lot.
Member

### dpvc commented Jul 22, 2014

 The positioning of accents gets italic correction only when the base is a single character, which it isn't when it is \vec\tau for the second \vec. When I fix the issue with the base as an embellished operator, I will check to see if I can do the italic correction in that case as well.

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Aug 19, 2014

 Move CoreParent, CoreText, remap, and remapChars to element jax (sinc… 
…e shared among the output jax), and fix positioning of double accents like \vec{\vec{x}}. Resolves issue mathjax#877.
 c9a4e22 

Member

### dpvc commented Aug 19, 2014

 The issue877 branch of my fork of MathJax includes a fix for the multiple-accent problem.

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Aug 19, 2014

 Move CoreParent, CoreText, remap, and remapChars to element jax (sinc… 
…e shared among the output jax), and fix positioning of double accents like \vec{\vec{x}}. Resolves issue mathjax#877.
 ddb96b1 

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Aug 20, 2014

 Merge branch 'issue877' into develop. Issue mathjax#877. 
 42c0f32 
Member

### dpvc commented Aug 20, 2014

 => Merged.

Closed

### dpvc pushed a commit to mathjax/MathJax-test that referenced this issue Jan 16, 2015

 Add test for double vectors being the same size. (mathjax/MathJax#877) 
 37ac3dc 

Member

### dpvc commented Jan 16, 2015

 ==> In Testsuite LaTeXToMathML/above-below/issue877.html