Page MenuHomePhabricator

Fix formatting issues with mathematic formulas: fix display of special characters
Open, Needs TriagePublic

Description

When rendering <math> formulas, some special characters are displayed wrong.

Examples are given in the original wish: https://de.wikipedia.org/wiki/Wikipedia:Umfragen/Technische_Wünsche_2017/Lesen#Follow-up_zu_dem_Wunsch_Schriftgröße_mathematischer_Formeln_vereinheitlichen, section "Anmerkungen":

It says here that characters like the ü in "für alle"

  • <math>\text{für alle}</math>

or the "Å"

  • <math>\AA</math>

should look like they do outside of the <math> markup
or like they do when created with workarounds like

  • {\displaystyle \mathrm {f{\ddot {u}}r\ alle} } for ü
  • or {\displaystyle {\overset {\circ }{\mathrm {A} }}} for Å

This issue seems to occur in SVG rendering.

This ticket is tagged as Need-volunteer, e.g. to be tackled during the Wikimania Hackathon 2017.

Event Timeline

Restricted Application added a project: TCB-Team. · View Herald TranscriptAug 9 2017, 11:33 AM

If anyone want's to hack on this but needs help finding where to start, whom to speak with or similar – starting this week there is now a weekly Technical Advice IRC meeting open for all volunteer developers: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting

Pkra added a subscriber: Pkra.Nov 21 2017, 8:41 AM

FYI this comes down to the math font not having any glyphs for these characters (and the rendering falling back to system fonts).

Aklapper renamed this task from Fix formatting issues with mathematic formulas: fix display of special characters to Fix formatting issues / display of special characters in mathematic formulas by installing appropraite font.Nov 21 2017, 11:22 AM
Aklapper renamed this task from Fix formatting issues / display of special characters in mathematic formulas by installing appropraite font to Fix formatting issues / display of special characters in mathematic formulas by installing appropriate font.
Aklapper added a project: Math.
Pkra added a comment.Nov 21 2017, 11:27 AM

The new title of the issue is not quite capturing the complexity. MathJax only supports a very specific group of fonts because it needs to know the glyph metrics which are hard to determine at rendering time. So it's either about switching mathoid to a different font (with more glyphs, e.g., LatinModern or STIX) or it's about adding support for new fonts to MathJax (which should be easier once MathJax v3 is ready - we've just released the first public alpha btw).

Aklapper renamed this task from Fix formatting issues / display of special characters in mathematic formulas by installing appropriate font to Fix formatting issues with mathematic formulas: fix display of special characters.Nov 21 2017, 12:37 PM

switching mathoid to a different font (with more glyphs, e.g., LatinModern or STIX)

@Lea_WMDE This is something I would support and it's also doable for a volunteer. However, changing of the fonts will give the formulae a more modern appearance. I expect that not everybody will like that.

Pkra moved this task from Incoming to Mathoid on the Math board.Dec 7 2018, 11:33 AM