User Details
- User Since
- Nov 5 2024, 9:27 PM (65 w, 3 d)
- Availability
- Available
- LDAP User
- FrederikHennecke1
- MediaWiki User
- Unknown
Tue, Feb 3
There is currently a problem with the Previews. The current wrapper only works with the chtml output but not with the SVG output. Here is a working prototype:
....
startup: {
// MathJax creates anchor tags from MathML elements with href attributes.
// But it does not add the title attributes from these elements
// that we need for the extension Popups
ready() {
const { MML } = window.MathJax._.core.MmlTree.MML;
MML.a = MML.mrow;
const { ChtmlWrapper } = window.MathJax._.output.chtml.Wrapper;
ChtmlWrapper.prototype.handleHref = function ( parents ) {
if ( !this.node.attributes.hasExplicit( 'href' ) ) {
return parents;
}
const attrs = { href: this.node.attributes.get( 'href' ) };
if ( this.node.attributes.hasExplicit( 'title' ) ) {
attrs.title = this.node.attributes.get( 'title' );
}
return parents.map(
( parent ) => this.adaptor.append( parent, this.html( 'a', attrs ) )
);
};
const { SvgWrapper } = window.MathJax._.output.svg.Wrapper;
SvgWrapper.prototype.handleHref = function ( parents ) {
const href = this.node.attributes.get( 'href' );
if ( !href ) {
return parents;
}This issue seems to only apply to the SVG rendering mode. MathML and MathJax both display the TeX formula.
Tue, Jan 20
Sun, Jan 18
Firefox 140.7.0esr (64-bit) on Debian 13.
Sat, Jan 17
<math xmlns="http://www.w3.org/1998/Math/MathML" class="mwe-math-element mwe-math-element-inline">
<mrow data-mjx-texclass="ORD">
<mstyle displaystyle="true" scriptlevel="0"><a href="https://en.wikipedia.org/wiki/Energy" title="energy">
<mi>E</mi>
</a>
<mo stretchy="false">=</mo><a href="https://en.wikipedia.org/wiki/Mass" title="mass">
<mi>m</mi>
</a>
<msup><a href="https://en.wikipedia.org/wiki/Speed_of_light" title="speed of light in vacuum">
<mi>c</mi>
</a>
<mrow data-mjx-texclass="ORD">
<mn>2</mn>
</mrow>
</msup>
</mstyle>
</mrow>
</math>
<br>
<math xmlns="http://www.w3.org/1998/Math/MathML" class="mwe-math-element mwe-math-element-inline">
<mrow data-mjx-texclass="ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>E</mi>
<mo stretchy="false">=</mo>
<mi>m</mi>
<msup>
<mi>c</mi>
<mrow data-mjx-texclass="ORD">
<mn>2</mn>
</mrow>
</msup>
</mstyle>
</mrow>
</math>This is the rendering in Firefox. Chrome and Webkit look normal. But this issue is a bit wonky. I did screenshot it in my default Firefox browser(140.7.0esr ). This issue did not show up when I tried to compare it with BackstopJS so it may just be my local font.
Mon, Jan 12
Sun, Jan 11
Dec 27 2025
I just tried to find all formulas in enwiki with QIDs with a short python script but I could only find 161 unique formulas. Is this correct? If that is the case I think that we don't necessarily have to rewrite the cache to cache these formulas. I also tested the performance of with / without caching and got the following results:
Nov 14 2025
I found one problem with the new font:
\big and \Big now have the same size. This issue is only with the new font and on both Firefox and Chromium.
Everything else looks good to me with the new font.
I did a visual regression test and I noticed two issues:
Nov 5 2025
The current MathML looks like:
Nov 3 2025
Oct 17 2025
It looks like this was fixed in commit id c5188b11172842b1afe3a6dcabb48a05ad04413d in T401623.
Oct 11 2025
Oct 9 2025
Sep 30 2025
I thought I did but I was mistaken. Seems like I forgot to set one specific cache value and the caching did not work. I fixed the benchmark and now the results are completely different:
benchAllMissCore........................I49 - Mo195.291ms (±2.60%) benchAllHitCore.........................I49 - Mo18.568ms (±4.47%)
Sep 29 2025
I created a small benchmarking script for LocalChecker: https://github.com/FrederikHennecke/mediawiki-extensions-Math-testing/tree/master/benchmarks
I used memcached for caching. The results show that the difference between a hit and a miss in the cache is relatively small. As for the input data, I used the reference.json file from the tests. Btw, this is my first time working with the cache, so take these results with a grain of salt.
benchAllMissCore........................I49 - Mo152.840ms (±1.30%) benchAllHitCore.........................I49 - Mo148.083ms (±2.42%)
Sep 14 2025
Sep 13 2025
I propose the following changes for this task:
Aug 27 2025
Looks like the patch has two types of issues: first, the errors from T402362, T402434, and T402660, which should all be fixed.
And the other issues are from commit d562047, where the default tex checker was changed from restbase to local. The local mhchem parser does seem to be missing some features.
Aug 20 2025
Jul 21 2025
Jun 1 2025
May 23 2025
I propose the following steps for Step 5:
May 21 2025
I just noticed that one step is missing: we have to replace MMLbase::getEmpty. This is only called for MMLmspace or MMLmrow and returns the empty Element <mspace\>. With our current implementation, we get the full tag just without an inner text: <mspace><\mspace>. Either we change the tests, or we change MMLDomVisitor::getHTML from $this->dom->saveHTML( $this->dom->documentElement ) to $this->dom->saveXML( $this->dom->documentElement, LIBXML_NOEMPTYTAG ). That should automatically close all empty elements while keeping everything else the same.
May 7 2025
For Task 4.c, I have the following points:
- Keep
if ( $node instanceof MMLleaf ) {
$textNode = $this->dom->createTextNode( $node->getText() );
$element->appendChild( $textNode );
return;
}instead of
Apr 22 2025
Ok, then we can keep supporting the DOMVisitor. We can still change the visitor later on if needed.
Apr 17 2025
I noticed some performance issues with the new MMLDomVisitor implementation.
I merely tested the old .encapsulate function against the new toString implemenation. I also wrote several other classes to test different XML/HTML implemntations.
Here are the times for 10,000 repetitions:
Mar 15 2025
Feb 18 2025
Feb 11 2025
I created a patch, where we automatically take the symbols and the urls from Wikibase property "in defining formula" and add them as anchor tags to the corresponding MathML Element. Also, for MathJax, the links are set via href in the MathML elements, because MathJax does currently not support anchor tags (but will soon in ver 4).
Dec 10 2024
Dec 2 2024
Small note: The interaction with Popup is currently broken (see T381310). So an older version of Extension:Popup should be used to test.
Nov 28 2024
Because the popup module is currently looking for image tags inside .mwe-math-element elements with data-qid attributes, and the MathML mode is not using any images or the data-qid attribute.
- Is there any output in the browser's console?
No.
- How is the situation with other browsers?
I just also tested in MS Edge 131.0.2903.70 and Safari 14.1. where it's also broken.


