Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subscript of ∫ misplaced if the superscript is too deep #3097

Open
hbghlyj opened this issue Aug 29, 2023 · 1 comment
Open

subscript of ∫ misplaced if the superscript is too deep #3097

hbghlyj opened this issue Aug 29, 2023 · 1 comment
Labels
Accepted Issue has been reproduced by MathJax team Code Example Contains an illustrative code example, solution, or work-around Merged Merged into develop branch Test Needed
Milestone

Comments

@hbghlyj
Copy link

hbghlyj commented Aug 29, 2023

Issue Summary

If the superscript of $\int$ is so deep that it reaches the level of the subscript, the subscript will be misplaced.

MathJax
$$\Large\int_0^{1+\frac1{\frac2{\frac34}}+1}+\int_0^{1+\frac1{\frac2{\frac3{\frac45}}}+1}+\int_0^{1+\frac1{\frac2{\frac3{\frac4{\frac5{\frac67}}}}}+1}+\int_0^{1+\frac{\frac{\frac{\frac{\frac{\frac76}5}4}3}2}1+1}+\int^0_{1+\frac{\frac{\frac{\frac{\frac{\frac76}5}4}3}2}1+1}$$
LaTeX (texlive)
Untitled

Technical details:

  • MathJax Version: 3.2
@hbghlyj hbghlyj changed the title integral subscript misalign integral subscript misalign if the superscript of $\int$ is too deep Aug 29, 2023
@hbghlyj hbghlyj changed the title integral subscript misalign if the superscript of $\int$ is too deep ∫ subscript misalign if the superscript is too deep Aug 29, 2023
@hbghlyj hbghlyj changed the title ∫ subscript misalign if the superscript is too deep ∫ subscript misplaced if the superscript is too deep Aug 29, 2023
@hbghlyj hbghlyj changed the title ∫ subscript misplaced if the superscript is too deep subscript of ∫ misplaced if the superscript is too deep Aug 29, 2023
dpvc added a commit to mathjax/MathJax-src that referenced this issue Aug 30, 2023
@dpvc
Copy link
Member

dpvc commented Aug 30, 2023

The issue turned out to be cause by using the box size of the subscript in place of the superscript in one place in the calculations of the positions. I have made a PR to resolve the problem.

In the meantime, you can use

MathJax = {
  startup: {
    ready() {
      const {CHTMLWrappers} = MathJax._.output.chtml.Wrappers_ts;
      CHTMLWrappers.msubsup = class myMsubsup extends CHTMLWrappers.msubsup {
        get scriptChild() {return this.supChild}
      }
      MathJax.startup.defaultReady();
    }
  }
};

as part of your configuration to correct the problem.

@dpvc dpvc added Ready for Review Accepted Issue has been reproduced by MathJax team Test Needed Code Example Contains an illustrative code example, solution, or work-around labels Aug 30, 2023
@dpvc dpvc added this to the v4.0 milestone Sep 15, 2023
dpvc added a commit to mathjax/MathJax-src that referenced this issue Sep 15, 2023
Use superscript for scriptChild in msubsup.  (mathjax/MathJax#3097)
@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue has been reproduced by MathJax team Code Example Contains an illustrative code example, solution, or work-around Merged Merged into develop branch Test Needed
Projects
None yet
Development

No branches or pull requests

2 participants