MathJax icon indicating copy to clipboard operation
MathJax copied to clipboard

Primes don't work properly with class OP in TeX input

Open dpvc opened this issue 1 year ago • 0 comments

The ' is misplaced when used with operators in TeX for both inline and display math. For example, \sum_n' is treated as {\sum_n}' rather than \sum_n^\prime. This is due to the handling of the base in the PrimeItem stack item class, which only takes msubsup bases into account, and not munderover.

Also, using \limits with primes doesn't work, so \int\limits' should put the prime above the integral, but doesn't.

Finally,

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mover>
    <mo>&#x2211;</mo>
    <mo data-mjx-alternate="1" data-mjx-pseudoscript="true">&#x2033;</mo>
  </mover>
</math>

uses the wrong size primes, while

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mover>
    <mo>&#x2211;</mo>
    <mo data-mjx-alternate="1" data-mjx-pseudoscript="true">&#x20323;</mo>
  </mover>
</math>

uses the correct size. This is due to the operator dictionary marking U+2033 as a TeX accent, while U+2032 is not.

Originally pointed out in a mathoverflow post

dpvc avatar Mar 05 '24 14:03 dpvc