Page MenuHomePhabricator

Hovercard ignores math formulae
Closed, DuplicatePublic

Description

Hovercard ignores math formulae, see red circles in screenshot

Testcase: https://de.wikipedia.org/wiki/Helling#Der_Helgenbock and hover over "Tangens".

Hovercard - math.png (558×853 px, 73 KB)

Event Timeline

Raymond raised the priority of this task from to Needs Triage.
Raymond updated the task description. (Show Details)
Raymond added a project: Page-Previews.
Raymond added a subscriber: Raymond.
Prtksxna set Security to None.
Prtksxna added a subscriber: Prtksxna.

TextExtracts removes these as they are images.

Jdlrobson claimed this task.
Jdlrobson added a subscriber: Jdlrobson.

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?

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.

Jdlrobson triaged this task as Low priority.
Jdlrobson raised the priority of this task from Low to Medium.
dr0ptp4kt lowered the priority of this task from Medium to Low.Aug 4 2016, 5:12 PM
dr0ptp4kt moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.

We need to make a decision about whether to render HTML or not to solve this.