# \overline does not cope well with text-style limits on operators #490

Closed
opened this issue Jun 3, 2013 · 4 comments

Projects
None yet
3 participants

### EmilJ commented Jun 3, 2013

 $\overline{\lim_{n\to\infty}}$ or $\overline{\sum_{n=0}^N}$ are rendered with a short line in a superscript position after the main expression instead of an overline. (Yes, I know about \varlimsup, that’s not the point.) The bug seems to affect only named operators with \nolimits-style subscripts or superscripts, but without an explicit \nolimits declaration. The following all render corerctly: $\overline{\lim}$, $$\overline{\lim_{n\to\infty}}$$, $\overline{\lim\limits_{n\to\infty}}$, $\overline{\lim\nolimits_{n\to\infty}}$, $\overline{\operatorname{lim}_{n\to\infty}}$, $\overline{X_{n\to\infty}}$, $\overline{\int_n}$. I’ve been testing it with the HTML–CSS output of MathJax versions 2.2 and 2.0, using local TeX fonts, in Firefox 14.0.1 and Opera 11.61 on Linux.
Member

### dpvc commented Jun 3, 2013

 OK, I see the same thing (in in-line mode only), and will check into it. Thanks for the report.

Member

### dpvc commented Sep 9, 2014

 This turns out to be an unusual interaction in the MathML used to handle the overline (and other similar constructs). We use  to add the overline, and the \lim and \sum are also handled using . These have movablelimits set to true so that in in-line mode, the limits become super and subscripts. The limits are moved as long as the base is an operator with movablelimits set, or an embellished operator whose base has it set. When the two under-over constructs are nested, the inner one is an embellished operator with movablelimits set, so the outer one moves the accent to a super-script position! This seems to be a limitation of the MathML spec. You can't have the inner one have movablelimits set one way and the outer one set another way, since the control is on the core , which is the same for both. So I've had to resort to a hack: I add an empty  to the base of the outer  in order to make its base not be an embellished operator, and so the movablelimits set on the core  doesn't apply.

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Sep 9, 2014

 Add an empty <mo> to nested <munderover> used for overline and friend… 
…s to avoid being an embellished operator that gets movablelimits. Resolves issue mathjax#490.
 612e622 

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Sep 11, 2014

 Merge branch 'issue490' into develop. Issue mathjax#490. 
 f307196 

Member

### dpvc commented Sep 11, 2014

 => Merged.

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Jan 17, 2015

 Make \overline{\lim_{x}} have correct spacing for overline with Firef… 
…ox. Issue mathjax#490.
 9f14997 

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

 Add test for nested mover movablelimits interaction. (mathjax/MathJax… 
…#490)
 490bbe2 

Member

### dpvc commented Jan 17, 2015

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