Hovercard ignores math formulae, see red circles in screenshot
Testcase: https://de.wikipedia.org/wiki/Helling#Der_Helgenbock and hover over "Tangens".
Raymond | |
May 20 2015, 4:11 PM |
F167331: Hovercard - math.png | |
May 20 2015, 4:11 PM |
Hovercard ignores math formulae, see red circles in screenshot
Testcase: https://de.wikipedia.org/wiki/Helling#Der_Helgenbock and hover over "Tangens".
As @Prtksxna points out this is an image. We could take the value of the text in the alt tag although this would have more serious impacts on other text extracts where the image is not a crucial part of the information. Could the article be rewritten to us one of the many maths extensions we have?
I don't understand you. That aren't real images, but formulas from the math-extension, only rendered in the article output as images.
So the maths formula are wrapped in <math> tags for example <math>\cot x </math> but they resolve to images.
We could print "<math>\cot x </math>" or "\cot x" but this wouldn't make sense without the image. What would you propose happens in this situation?
For Hovercards we may want to consider surfacing HTML in hovercard descriptions and rendering these images but we don't want to render all images - we'd have to be clever and only show inline images which I'm not sure the current parser will support.
Note: <math> formulars on pages doesn't have to be rendered as a plain png, Extension:Math also supports MathML (browser rendering) with SVG/PNG-fallback or (removed) via MathJax (JS-library) and other modes by itself.
Extension:Math even has a user setting for that on wikimedia-wikis (I won't judge if that makes sense in context for hovercards).
How to bring that support to TextExtracts/Hovercard is another thing to think about.