https://bugzilla.wikimedia.org/show_bug.cgi?id=35188

Michael M. <listenle...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://leuksman.com/mw/inde
                   |                            |x.php/Block_vs._inline
            Summary|MathJax sometimes shows     |Determine block mode vs.
                   |subscripts in sums at       |inline mode properly for
                   |different position as       |MathJax
                   |rendered PNG                |

--- Comment #4 from Michael M. <listenle...@gmail.com> 2012-03-26 08:54:48 UTC 
---
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.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to