Last modified: 2013-07-25 07:03:48 UTC
In all these formulas \bigwedge_x \bigvee_x \sum_{0\le i\le m\atop 0<j<n}P(i,j) the PNG shows the subscript below the symbol, while MathJax puts them in the lower left corner. Consistency would be nice, but not necessary.
s/lower left/lower right/
Created attachment 10325 [details] the png version
Created attachment 10326 [details] the mathjax version They look similar to me. What browser and version do you have, might be browser specific issue ?
I found out where the problem is: While texvc renders every formula in block mode ($$), MathJax is able to render both for block mode and inline mode ($). But the configuration for this in MathJax/extensions/wiki2jax.js is not ideal. Have a look at the ConvertMath function. Block mode is only chosen for formulas directly inside a <DD> with only one child, i. e. when a formula is indented using colons. This will fail when formulas are wrapped inside a span (see bug 35191). Furthermore formulas which form there own paragraph should be treated as block, too. Currently there is some code to insert \displaystyle etc. to do this. I created a test page on http://leuksman.com/mw/index.php/Block_vs._inline. This shows that it actually looks as expected, but a cleaner code would be nice. Perhaps some code like if ( $formula.closest( 'p, div, dd' ).text() === $formula.text() ) { //$$-mode } else { //$-mode } works, but I didn't test this.
Nageh said something about this that is relevant when he detailed his changes: https://en.wikipedia.org/wiki/User_talk:Nageh#MathJax_integration_into_stock_MediaWiki Heuristic detection of inline vs. display maths. Heuristic used: parent HTML element is "DD" and maths element is the only child, then interpret as "display maths", otherwise as "inline maths". Also, if the maths element is classified as "inline maths" but the element is the first child in the parent "DD", precede the maths with "\displaystyle": this effectively treats the maths as a display-style formula but without the newline of ordinary display maths formulas. See ConvertMath() function in User:Nageh/mathJax/config/TeX-AMS-texvc_HTML.js.
*** Bug 36062 has been marked as a duplicate of this bug. ***
From bug 36062: The added \displaystyle also appears on [right click]-Show Math As-TeX Commands, which might be confusing for users.
Thanks for complaining about the added \displaystyle. I agree with you that this can be confusing to users. :) Resolved in http://en.wikipedia.org/wiki/User:Nageh/mathJax . Diffs: http://en.wikipedia.org/w/index.php?title=User%3ANageh%2FmathJax.js&diff=490782790&oldid=487684008 http://en.wikipedia.org/w/index.php?title=User%3ANageh%2FmathJax%2Fconfig%2FTeX-AMS-texvc_HTML.js&diff=490782858&oldid=488904404
https://gerrit.wikimedia.org/r/23079 I've not done the oiint part yet, we will have to add that later.
https://gerrit.wikimedia.org/r/23079 (Gerrit Change Ie0c308c31d38581e556dc73109879c7a3d365121) | change APPROVED and MERGED [by jenkins-bot]
Gerrit patch got merged, can this bug report get closed as RESOLVED FIXED or is there anything else to do?
Tested with Formula <math>\bigwedge_x</math> in text. Here comes a formula: <math>\bigwedge_x</math> Here comes an indented formula: :<math>\bigwedge_x</math> Everything looks as it should.