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

Missing spacing for \bmod in subscripts #2806

Closed
int-y1 opened this issue Nov 21, 2021 · 2 comments
Closed

Missing spacing for \bmod in subscripts #2806

int-y1 opened this issue Nov 21, 2021 · 2 comments
Labels
Accepted Issue has been reproduced by MathJax team Fixed v3 v3.2
Milestone

Comments

@int-y1
Copy link

int-y1 commented Nov 21, 2021

Issue Summary

I discovered this issue while working with MathJax 3.2.0. This issue is the same as #794, but the solution was specific to MathJax 2.

Steps to Reproduce:

  1. Go to https://www.mathjax.org/#demo
  2. Type in AA $i \bmod N$ AA $c_i = c_{i \bmod N}$ AA.
  3. Capture

In the subscript, there should be spaces around the bmod.

Technical details:

  • MathJax Version: 3.2.0
  • Client OS: Windows 10 21H1
  • Browser: Chrome 96.0.4664.45
@dpvc dpvc added Accepted Issue has been reproduced by MathJax team v2 v3 labels Dec 2, 2021
@dpvc
Copy link
Member

dpvc commented Dec 2, 2021

Thanks for the report. This is due to the fact that MathJax makes \bmod into a "math operator" as <mo>mod</mo> in MathML, and that will normally get spacing around it, but spacing around operators is removed in script and script-script modes, so that space is lost in the subscript in your example. I will look into resolving the issue.

@dpvc
Copy link
Member

dpvc commented Jan 18, 2022

OK, it turns out that the lspace and rspace attributes were being given explicitly, as in the v2 solution, but that these spaces were being removed at a later stage by a filter that removes attributes when they equal the defaults. That means the space was not added in the scripts, since the explicit lspace and rspace were no longer there to force the spacing (only the default space, which is removed in scripts).

I've made a pull request (listed above) to resolve the issue.

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 Fixed v3 v3.2
Projects
None yet
Development

No branches or pull requests

2 participants