MathJax icon indicating copy to clipboard operation
MathJax copied to clipboard

Difference in size of MathJax with LaTeX in `\scriptstyle\underbrace{X}`

Open hbghlyj opened this issue 1 year ago • 5 comments

Issue Summary

In LaTeX \underbrace and \overbrace seem to reset the style of argument to display-style. (cf. https://github.com/KaTeX/KaTeX/issues/764)

Steps to Reproduce:

${\textstyle\prod}  {\displaystyle\prod}  \underbrace{\prod}$

In LaTeX image

Technical details:

  • MathJax Version: 3.2

hbghlyj avatar Oct 23 '24 13:10 hbghlyj

Similar:

$X\scriptstyle\begin{matrix}X\end{matrix}$

LaTeX:

image

MathJax: image

hbghlyj avatar Oct 23 '24 15:10 hbghlyj

OK, it looks like under- and overbrace are outliers among the under- and over- macros, as they do seem to reset the style to text-style. I will look into fixing that.

Similarly, the matrix and array environments do seem to reset to text-style as well.

dpvc avatar Oct 23 '24 23:10 dpvc

I have made a pull request for v4 that resolves these issues.

dpvc avatar Oct 24 '24 21:10 dpvc

The PR I made does set display-style for the under and over braces.

dpvc avatar Oct 26 '24 19:10 dpvc

Fixed in v4.0.

dpvc avatar Aug 13 '25 14:08 dpvc