Page MenuHomePhabricator

Improve Math rendering errors
Open, LowestPublic

Description

Currently, whenever there is a rendering problem with a math tag big red color is displayed.
I propose to change that and display the input LaTeX code instead with the error message in a footnote or a popup.
Moreover, a tracking category should be assigned to that particular page.

However, to start with the implementation I need to find out.

  1. How to assign tracking categories?
  2. How to bring the message into the footnote, i.e. are there build in MediaWiki functions I could use, or do I need to use plain HTML?

Event Timeline

You assign tracking categories with

$this->mParser->addTrackingCategory( 'math-tracking-category-error-foo' );

Where math-tracking-category-error-foo is a registered i18n string; Cite only has one, I think, but you can have multiple if it's needed.

Change 292576 had a related patch set uploaded (by Physikerwelt):
Add tracking category for math errors

https://gerrit.wikimedia.org/r/292576

Change 292576 merged by jenkins-bot:
Add tracking category for math errors

https://gerrit.wikimedia.org/r/292576

GWicke edited projects, added Services (blocked); removed Services.
GWicke subscribed.

Is there anything left to do here?

Physikerwelt lowered the priority of this task from Medium to Lowest.Oct 13 2016, 9:37 AM

Yes,

  1. How to bring the message into the footnote, i.e. are there build in MediaWiki functions I could use, or do I need to use plain HTML?

There is a related discussion about surfacing errors / warnings more systematically in T141970.

Syntax error should include details, for examples "Missing close brace", "Missing argument for \frac".