Page MenuHomePhabricator

FrederikHennecke1 (FrederikHennecke1)
User

Projects

User does not belong to any projects.

Today

  • No visible events.

Tomorrow

  • No visible events.

Monday

  • No visible events.

User Details

User Since
Nov 5 2024, 9:27 PM (65 w, 3 d)
Availability
Available
LDAP User
FrederikHennecke1
MediaWiki User
Unknown

Recent Activity

Tue, Feb 3

FrederikHennecke1 added a comment to T414994: Load all MathJax files from WMF servers.

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;
				}
Tue, Feb 3, 8:28 PM · Essential-Work, Content-Transform-Team (Work In Progress), Patch-For-Review, Math
FrederikHennecke1 added a comment to T416255: Math Symbols in TOC result in strip markers.

This issue seems to only apply to the SVG rendering mode. MathML and MathJax both display the TeX formula.

Tue, Feb 3, 1:03 AM · MediaWiki-Parser, Math

Tue, Jan 20

FrederikHennecke1 created T415006: Math: switch all polyfills to skipFunctions.
Tue, Jan 20, 3:00 AM · MW-1.46-notes (1.46.0-wmf.15; 2026-02-10), Math
FrederikHennecke1 created T415005: Switch to anchor tags for linking in MathML.
Tue, Jan 20, 2:52 AM · Math

Sun, Jan 18

FrederikHennecke1 added a comment to T414289: Use mrow elements for linking instead of anchor tags.

Firefox 140.7.0esr (64-bit) on Debian 13.

Sun, Jan 18, 1:41 PM · Patch-For-Review, RemexHtml, Math
FrederikHennecke1 added a comment to T414289: Use mrow elements for linking instead of anchor tags.

Firefox 140.7.0esr (64-bit) on Debian 13.

Sun, Jan 18, 12:56 PM · Patch-For-Review, RemexHtml, Math

Sat, Jan 17

FrederikHennecke1 added a comment to T414289: Use mrow elements for linking instead of anchor tags.

In the MathWG we defined that it should be possible to replace all mrow with a and stop outputting mrow at all see
https://codepen.io/physikerwelt/pen/XJKMMyo

Sat, Jan 17, 4:53 PM · Patch-For-Review, RemexHtml, Math
FrederikHennecke1 added a comment to T414289: Use mrow elements for linking instead of anchor tags.
<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.

Sat, Jan 17, 1:20 AM · Patch-For-Review, RemexHtml, Math

Mon, Jan 12

FrederikHennecke1 added a comment to T414289: Use mrow elements for linking instead of anchor tags.

@FrederikHennecke1 do you think it is a bug in MathJax that the title is not used? If yes, we should file an issue here https://github.com/mathjax/mathjax/issues

Mon, Jan 12, 6:45 PM · Patch-For-Review, RemexHtml, Math

Sun, Jan 11

FrederikHennecke1 created T414289: Use mrow elements for linking instead of anchor tags.
Sun, Jan 11, 9:45 PM · Patch-For-Review, RemexHtml, Math

Dec 27 2025

FrederikHennecke1 added a comment to T388985: Add support for more complex linking in <math/> formulas.

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:

Dec 27 2025, 8:29 PM · RemexHtml, Patch-For-Review, Math

Nov 14 2025

FrederikHennecke1 added a comment to T409110: Update to MathJax v4.

I found one problem with the new font:

Screenshot From 2025-11-14 14-41-00.png (274×1 px, 35 KB)

\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.

Nov 14 2025, 1:43 PM · MW-1.46-notes (1.46.0-wmf.3; 2025-11-19), Upstream, Patch-For-Review, Math-Chemistry-Support, Math
FrederikHennecke1 added a comment to T409110: Update to MathJax v4.

I did a visual regression test and I noticed two issues:

Nov 14 2025, 1:37 AM · MW-1.46-notes (1.46.0-wmf.3; 2025-11-19), Upstream, Patch-For-Review, Math-Chemistry-Support, Math

Nov 5 2025

FrederikHennecke1 added a comment to T409110: Update to MathJax v4.

The current MathML looks like:

Nov 5 2025, 1:31 PM · MW-1.46-notes (1.46.0-wmf.3; 2025-11-19), Upstream, Patch-For-Review, Math-Chemistry-Support, Math

Nov 3 2025

FrederikHennecke1 added a comment to T375238: Client-side MathJax rendering problems.

I looked at \grave{a} and was unable to identify the underlying problem. The generated MathML code is identical to the MathML code generated by mathoid. If I render the resulting MathML code with the interactive Mathjax demo from https://mathjax.github.io/MathJax-demos-web/input/tex2mml.html the result looks fine

Screenshot 2025-11-02 at 05.44.08.png (1×1 px, 298 KB)

Nov 3 2025, 6:02 PM · Patch-For-Review, Math-Chemistry-Support, Math

Oct 17 2025

FrederikHennecke1 added a comment to T405439: Investigate <math>1\definecolor{c}{RGB}{255,0,0}+2</math> .

It looks like this was fixed in commit id c5188b11172842b1afe3a6dcabb48a05ad04413d in T401623.

Oct 17 2025, 9:51 PM · Math

Oct 11 2025

FrederikHennecke1 added a comment to T388985: Add support for more complex linking in <math/> formulas.

Thank you. That seems to better match my expectations. I'll try to run your github on my machine to see if I can match those values. In https://ceur-ws.org/Vol-1785/W48.pdf we show the rendering time over the input length (Fig. 3). I find that a bit more intuitive (but more complicated) than the median.

Oct 11 2025, 1:21 AM · RemexHtml, Patch-For-Review, Math

Oct 9 2025

FrederikHennecke1 added a watcher for Math: FrederikHennecke1.
Oct 9 2025, 6:39 PM

Sep 30 2025

FrederikHennecke1 added a comment to T388985: Add support for more complex linking in <math/> formulas.

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 30 2025, 2:27 AM · RemexHtml, Patch-For-Review, Math

Sep 29 2025

FrederikHennecke1 added a comment to T388985: Add support for more complex linking in <math/> formulas.

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 29 2025, 4:32 PM · RemexHtml, Patch-For-Review, Math

Sep 14 2025

FrederikHennecke1 added a comment to T388985: Add support for more complex linking in <math/> formulas.

Thank you that’s a great plan. However I think it’s most effective if we discuss the caching and rendering question a bit more in detail before proceeding with the implementation.

  1. do we have current measurements of the performance and the impact of caching?
  1. can we estimate how the proposed changes would affect the performance? (Now, we have almost no qid / vs future with x % qid)
  1. can we generate a code pen, with a few complex and simple examples that demonstrates how the rendering will look like when implementation is done. That would help us to test the impact on even individual browsers.
Sep 14 2025, 4:47 PM · RemexHtml, Patch-For-Review, Math

Sep 13 2025

FrederikHennecke1 added a comment to T388985: Add support for more complex linking in <math/> formulas.

I propose the following changes for this task:

Sep 13 2025, 1:20 AM · RemexHtml, Patch-For-Review, Math

Aug 27 2025

FrederikHennecke1 added a comment to T402102: Regression problem in <chem> following latest Math version update.

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 27 2025, 11:23 PM · Math-Chemistry-Support, Math

Aug 20 2025

FrederikHennecke1 created T402358: Italic for math formulas not working if anchor tag is in MathML.
Aug 20 2025, 12:41 AM · Browser-Support-Firefox, Math

Jul 21 2025

FrederikHennecke1 added a comment to T389712: Make MMLbase support trees.

I just updated the progress marks...
@FrederikHennecke1 is 5d complete?

Jul 21 2025, 3:23 PM · MW-1.45-notes (1.45.0-wmf.13; 2025-08-05), MW-1.44-notes (1.44.0-wmf.28; 2025-05-06), Patch-For-Review, RemexHtml, Math

Jun 1 2025

FrederikHennecke1 created T395764: Incorrect number of empty elements when creating bracket-free matrix.
Jun 1 2025, 7:10 PM · Math

May 23 2025

FrederikHennecke1 added a comment to T389712: Make MMLbase support trees.

I propose the following steps for Step 5:

May 23 2025, 3:43 PM · MW-1.45-notes (1.45.0-wmf.13; 2025-08-05), MW-1.44-notes (1.44.0-wmf.28; 2025-05-06), Patch-For-Review, RemexHtml, Math

May 21 2025

FrederikHennecke1 added a comment to T389712: Make MMLbase support trees.

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 21 2025, 2:10 PM · MW-1.45-notes (1.45.0-wmf.13; 2025-08-05), MW-1.44-notes (1.44.0-wmf.28; 2025-05-06), Patch-For-Review, RemexHtml, Math

May 7 2025

FrederikHennecke1 added a comment to T389712: Make MMLbase support trees.

For Task 4.c, I have the following points:

  1. Keep
if ( $node instanceof MMLleaf ) {
	$textNode = $this->dom->createTextNode( $node->getText() );
	$element->appendChild( $textNode );
	return;
}

instead of

May 7 2025, 10:32 PM · MW-1.45-notes (1.45.0-wmf.13; 2025-08-05), MW-1.44-notes (1.44.0-wmf.28; 2025-05-06), Patch-For-Review, RemexHtml, Math

Apr 22 2025

FrederikHennecke1 added a comment to T389712: Make MMLbase support trees.

Ok, then we can keep supporting the DOMVisitor. We can still change the visitor later on if needed.

Apr 22 2025, 2:37 PM · MW-1.45-notes (1.45.0-wmf.13; 2025-08-05), MW-1.44-notes (1.44.0-wmf.28; 2025-05-06), Patch-For-Review, RemexHtml, Math

Apr 17 2025

FrederikHennecke1 added a comment to T389712: Make MMLbase support trees.

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:

Apr 17 2025, 7:56 AM · MW-1.45-notes (1.45.0-wmf.13; 2025-08-05), MW-1.44-notes (1.44.0-wmf.28; 2025-05-06), Patch-For-Review, RemexHtml, Math

Mar 15 2025

FrederikHennecke1 created T388985: Add support for more complex linking in <math/> formulas.
Mar 15 2025, 9:32 PM · RemexHtml, Patch-For-Review, Math

Feb 18 2025

FrederikHennecke1 updated the task description for T386760: Remove link to current site inside formula.
Feb 18 2025, 10:01 PM · MW-1.44-notes (1.44.0-wmf.18; 2025-02-25), Math
FrederikHennecke1 created T386760: Remove link to current site inside formula.
Feb 18 2025, 9:57 PM · MW-1.44-notes (1.44.0-wmf.18; 2025-02-25), Math

Feb 11 2025

FrederikHennecke1 added a comment to T134311: Allow for links in <math/> tags.

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).

Feb 11 2025, 9:12 PM · MW-1.44-notes (1.44.0-wmf.19; 2025-03-04), Math-Macro-Proposals, Mathoid, Wikidata, Math

Dec 10 2024

FrederikHennecke1 added a comment to T381046: Preview not working with MathML rendering.

@FrederikHennecke1 Can you document as a step-by-step guide what you did to get the popups working locally?

Dec 10 2024, 12:54 PM · Test Platform (Tria), Testing Support, MW-1.44-notes (1.44.0-wmf.6; 2024-12-03), User-zeljkofilipin, Page Content Service, Math

Dec 2 2024

FrederikHennecke1 added a comment to T381311: Preview has wrong location in MathML mode.

Small note: The interaction with Popup is currently broken (see T381310). So an older version of Extension:Popup should be used to test.

Dec 2 2024, 7:44 PM · MW-1.44-notes (1.44.0-wmf.8; 2024-12-17), Math
FrederikHennecke1 updated the task description for T381311: Preview has wrong location in MathML mode.
Dec 2 2024, 7:25 PM · MW-1.44-notes (1.44.0-wmf.8; 2024-12-17), Math
FrederikHennecke1 created T381311: Preview has wrong location in MathML mode.
Dec 2 2024, 7:05 PM · MW-1.44-notes (1.44.0-wmf.8; 2024-12-17), Math
FrederikHennecke1 created T381310: Math Popup not working in newer version of Popup-Extension.
Dec 2 2024, 7:05 PM · Math

Nov 28 2024

FrederikHennecke1 added a comment to T381046: Preview not working with MathML rendering.
  1. Did you analyze why the popup is not showing?

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.

  1. Is there any output in the browser's console?

No.

  1. 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.

Nov 28 2024, 3:50 PM · Test Platform (Tria), Testing Support, MW-1.44-notes (1.44.0-wmf.6; 2024-12-03), User-zeljkofilipin, Page Content Service, Math

Nov 27 2024

FrederikHennecke1 claimed T381046: Preview not working with MathML rendering.
Nov 27 2024, 10:24 PM · Test Platform (Tria), Testing Support, MW-1.44-notes (1.44.0-wmf.6; 2024-12-03), User-zeljkofilipin, Page Content Service, Math
FrederikHennecke1 created T381046: Preview not working with MathML rendering.
Nov 27 2024, 9:59 PM · Test Platform (Tria), Testing Support, MW-1.44-notes (1.44.0-wmf.6; 2024-12-03), User-zeljkofilipin, Page Content Service, Math