Page MenuHomePhabricator

Unicode characters are now allowed inside a \text{} element in math mode, should this be publicised or prohibited?
Open, Needs TriagePublic

Description

Following the removal of texvc T188879 it is now possible to include unicode characters in <math> mode. For example

<math>\text{БЂЯғشفæ̃∮שא}</math>

does not a cause parse errors and renders correctly, (even with some right to left character in the string).

This new functionality raises some questions:

  • Is is stable across different rendering modes?
  • Should we publicise this for example mentioning it in Help:Formula?
  • Should we modify the linter to raise parse error?

Related Objects

Event Timeline

Slight issue with the right to left characters. The order if different between what is typed and what is renders appears differently.

Following the removal of texvc T188879 it is now possible to include unicode characters in <math> mode.

Note that texvc was removed and was replaced by texvcjs. Moreover, I have created a LaTeX package called https://ctan.org/pkg/texvc?lang=en which is supposed to work exactly as the math tags within wikitext. Unfortunately, I did not update it recently.

Is is stable across different rendering modes?

No. One can not guarantee that. Especially in source mode everything will work;-)

Should we publicise this for example mentioning it in Help:Formula?

I think it is a good idea to mention that this can happen in general. However, I think it would be also good to fix this particular problem and focus on documenting that particular error message and not the specific circumstances. Maybe something along the lines. "The math you entered is a valid expression but during the rendering of the expression a technical error occurred...."

Should we modify the linter to raise parse error?

This depends upon further investigation. On https://mathoid2.wmflabs.org/info.html the test passes. So chances are high that this is a problem with restbase which will hopefully be removed soon.