- Mentioned In
- T151055: [Spike: 3 Hours] Investigate page_summary RESTBase API
T112137: Hovercards loses manual superscript formatting by requesting plain text
T141766: hovercards don't show equations correctly
T113094: [EPIC] The Page Summary API needs to provide useful content for the majority of articles
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?
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.