Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
EmilJ opened this issue Jun 3, 2013 · 4 comments

Comments

Projects
None yet
3 participants
@EmilJ
Copy link

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.

@dpvc

This comment has been minimized.

Copy link
Member

commented Jun 3, 2013

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

@pkra pkra modified the milestone: Next Release Aug 23, 2014

@pkra pkra self-assigned this Aug 24, 2014

@dpvc dpvc unassigned pkra Sep 9, 2014

@dpvc dpvc added this to the Next Release milestone Sep 9, 2014

@dpvc

This comment has been minimized.

Copy link
Member

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 <mover> to add the overline, and the \lim and \sum are also handled using <munderover>. 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 <mo>, which is the same for both. So I've had to resort to a hack: I add an empty <mo> to the base of the outer <mover> in order to make its base not be an embellished operator, and so the movablelimits set on the core <mo> doesn't apply.

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

Davide P. Cervone
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.

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

@dpvc dpvc added Merged and removed Ready for Review labels Sep 11, 2014

@dpvc

This comment has been minimized.

Copy link
Member

commented Sep 11, 2014

=> Merged.

@dpvc dpvc closed this Sep 11, 2014

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

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

@dpvc dpvc added Test Available and removed Test Needed labels Jan 17, 2015

@dpvc

This comment has been minimized.

Copy link
Member

commented Jan 17, 2015

==> In Testsuite

LaTeXToMathML/above-below/issue490.html

@dpvc dpvc added Fixed v2.5 and removed Merged labels Jan 30, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.