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

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 10 2016, 12:31 PM
Physikerwelt moved this task from Incoming to Next-up on the Math board.May 10 2016, 1:46 PM
Physikerwelt moved this task from Next-up to Blocked: needs help on the Math board.

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.

Physikerwelt moved this task from Next-up to Doing on the Math board.Jun 3 2016, 2:38 PM

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 triaged this task as Normal priority.
GWicke added a subscriber: GWicke.

Is there anything left to do here?

Physikerwelt lowered the priority of this task from Normal 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?
Physikerwelt moved this task from Doing to Incoming on the Math board.Feb 5 2017, 5:28 PM

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

Pkra moved this task from Incoming to MW Math Extension on the Math board.Dec 10 2018, 8:54 PM