User Details
- User Since
- Feb 21 2016, 10:04 AM (425 w, 5 d)
- Availability
- Available
- LDAP User
- Inyono
- MediaWiki User
- Inyono [ Global Accounts ]
Apr 5 2019
Jun 11 2018
Apr 28 2016
Mar 9 2016
Mar 8 2016
Mar 1 2016
my bad, I missed that: https://github.com/google/primarysources/pull/81
Thanks for the link. I created a Pull Request: https://github.com/google/primarysources/pull/80
Should be solved by https://www.wikidata.org/wiki/User:Inyono/freebase2wikidata.js (starting point: https://www.wikidata.org/wiki/User:Tomayac/freebase2wikidata.js). Not sure how to submit the changes, though.
Feb 25 2016
Okay, apparently the line break before the fallback image is the reason for the space. This works:
The formula, <span><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>E</mi> <mo>=</mo> <mi>m</mi> <msup> <mi>c</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle E=mc^{2}}</annotation> </semantics> </math></span><meta class="mwe-math-fallback-image-inline" aria-hidden="true" style="background-image: url('https://www.mediawiki.org/api/rest_v1/media/math/render/svg/9f73dbd37a0cac34406ee89057fa1b36a1e6a18e'); background-repeat: no-repeat; background-size: 100% 100%; vertical-align: -0.338ex;height: 2.676ex; width: 9.025ex;"></span>, is valid.
DOM in Firefox:
The formula, <span><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>E</mi> <mo>=</mo> <mi>m</mi> <msup> <mi>c</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle E=mc^{2}}</annotation> </semantics> </math></span> <meta class="mwe-math-fallback-image-inline" aria-hidden="true" style="background-image: url('https://www.mediawiki.org/api/rest_v1/media/math/render/svg/9f73dbd37a0cac34406ee89057fa1b36a1e6a18e'); background-repeat: no-repeat; background-size: 100% 100%; vertical-align: -0.338ex;height: 2.676ex; width: 9.025ex;"></span>, is valid.
Somehow, the outer span is wider than the inner ones (although there are no interesting styles set according to the Firefox style inspector. The fallback image is not at fault, you can safely delete it from the DOM and the spacing effect still occurs. If we modify the DOM a little bit, it works:
The formula, <span><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>E</mi> <mo>=</mo> <mi>m</mi> <msup> <mi>c</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle E=mc^{2}}</annotation> </semantics> </math></span>, is valid. <meta class="mwe-math-fallback-image-inline" aria-hidden="true" style="background-image: url('https://www.mediawiki.org/api/rest_v1/media/math/render/svg/9f73dbd37a0cac34406ee89057fa1b36a1e6a18e'); background-repeat: no-repeat; background-size: 100% 100%; vertical-align: -0.338ex;height: 2.676ex; width: 9.025ex;"></span>
But inserting it after the fallback image does not work either:
<p>The formula, <span><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>E</mi> <mo>=</mo> <mi>m</mi> <msup> <mi>c</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle E=mc^{2}}</annotation> </semantics> </math></span> <meta class="mwe-math-fallback-image-inline" aria-hidden="true" style="background-image: url('https://www.mediawiki.org/api/rest_v1/media/math/render/svg/9f73dbd37a0cac34406ee89057fa1b36a1e6a18e'); background-repeat: no-repeat; background-size: 100% 100%; vertical-align: -0.338ex;height: 2.676ex; width: 9.025ex;">, is valid.</span></p>
Feb 24 2016
@Physikerwelt I'm glad it helped :)
The problem seems to be that the parser also replaces markers in the mw-editsection. If we comment out the actual mathml rendering, we get the following DOM tree: