question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Meta-request: mediawiki Math parity

See original GitHub issue

Is your feature request related to a problem? Please describe. I am trying to use KaTeX on Wikipedia for fun. They have kicked away MathJax because of the server load and the speed issues, but I figured a KaTeX userscript won’t hurt. After all, what’s not to love about having actual text rendered instead of some SVG or even PNG image?

Describe the solution you’d like: KaTeX should add support for everything TeX mentioned in the current Wikipedia formula help page. The errors are:

KaTeX parse error: Limit controls must follow a math operator at position 58: …ratorname {sn} \̲l̲i̲m̲i̲t̲s̲ ̲_{b>c}(b+c)
KaTeX parse error: Undefined control sequence: \S at position 63: …Re ,\circledS ,\̲S̲ ̲,\P ,\mathrm {\…
KaTeX parse error: Undefined control sequence: \P at position 9:  \amalg \̲P̲ ̲\S \%\dagger \d…
KaTeX parse error: Undefined control sequence: \sideset at position 2:  \̲s̲i̲d̲e̲s̲e̲t̲ ̲{_{1}^{2}}{_{3}…
KaTeX parse error: Undefined control sequence: \iiiint at position 2:  \̲i̲i̲i̲i̲n̲t̲ ̲\limits _{F}dx\…
KaTeX parse error: Undefined control sequence: \definecolor at position 2:  \̲d̲e̲f̲i̲n̲e̲c̲o̲l̲o̲r̲ ̲{myorange}{rgb}…

In addition, a good bunch of the colors at the Colors section are falling back to black. Wait, are you just passing the names directly to HTML? That’s cheeky but surprisingly effective.

Link to or name of a (La)TeX package that provides the same feature:

  • I have no idea what the \limits devil is. They are probably doing it wrong.
  • \S and \P in math mode are base LaTeX2e, I think. They can be mapped to unicode chars.
  • \sideset is from amsmath.
  • \iiiint from esint is covered in #2059.
  • \definecolor from xcolor is covered in #750.
  • Additional colors are invoked from xcolor, but probably part of dvips. Still sort of the same lookup-table requirement from 750.

Describe alternatives you’ve considered: Changing the existing formulae is unfortunately not acceptable. I mean, since it’s just for fun, I can choose to not play.

Additional context: Add any other context or screenshots about the feature request here.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
Artoria2e5commented, May 1, 2021

I just found out another cool thing about KaTeX: the HTML output allows line wrap between .base units!

0reactions
Artoria2e5commented, Apr 19, 2021

The definition for sideset looks fine on the playground. Maybe it’s good to be added?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extension:Math - MediaWiki
The Math extension provides support for rendering mathematical formulae. An overview of what can currently be done with this extension is ...
Read more >
Manual:Math - MediaWiki
The Math extension lets you embed mathematical formulas in wiki pages using the ‎<math> tag. If the Math extension does not work, ...
Read more >
Extension:Math/new-version - MediaWiki
The Math extension provides support for rendering mathematical formulae. An overview of what can currently be done with this extension is ...
Read more >
Extension:Math/Help:Formula - MediaWiki
MediaWiki uses a subset of AMS-LaTeX markup, a superset of LaTeX markup which is in turn a superset of TeX markup, for mathematical...
Read more >
Extension:Math/CoverageTest - MediaWiki
MediaWiki uses a subset of AMS-LaTeX markup, a superset of LaTeX markup which is in turn a superset of TeX markup, for mathematical...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found