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

After recent update, \boldsymbol \partial renders badly in MathJax 3 (tex-chtml) #2417

Closed
MichaelAllenWarner opened this issue Apr 21, 2020 · 3 comments
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Needed v3 v3.1
Milestone

Comments

@MichaelAllenWarner
Copy link

Issue Summary

A few weeks ago, \boldsymbol \partial was giving beautiful browser-consistent results in MathJax 3 (tex-chtml), and it looked to be simply the boldface version of the \partial symbol, exactly as expected.

Today, I noticed that it's now giving poor and browser-inconsistent results, and looking at the source code I see that the character is rendered not as the content of a ::before pseudo-element (as is the case with other characters in the equations), but rather as a literal 𝛛 character in a Text node.

Steps to Reproduce:

  1. Use the https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js component.
  2. Use \boldsymbol \partial in an equation.

Technical details:

  • MathJax Version: mathjax@3/es5/tex-chtml.js

Supporting information:

@dpvc
Copy link
Member

dpvc commented Apr 21, 2020

Thanks for the report. This is due to changes in the font handling in order to allow MathML mathvariant attributes to select greek letters better (including upright ones, which are not in the default MathJax fonts). The \partial macro should produce mathvariant="italic" but currently does mathvariant="normal", so when \boldsymbol emboldens it, it gets mathvariant="bold" rather than mathvariant="bold-italic" where the proper character can be found.

A work around for now would be to add

<script>
MathJax = {
  startup: {
    ready() {
      MathJax.startup.defaultReady();
      const font = MathJax.startup.output.font;
      font.getChar('bold', 0x2202)[3].smp = font.getChar('bold-italic', 0x2202)[3].smp;
    }
  }
};
</script>

(or merge it into your current configuration). This will put the bold-italic partial into the bold font for now.

@dpvc dpvc added Accepted Issue has been reproduced by MathJax team Ready for Development v3 labels Apr 21, 2020
@dpvc dpvc self-assigned this Apr 21, 2020
@MichaelAllenWarner
Copy link
Author

Like a charm—many thanks.

dpvc added a commit to mathjax/MathJax-src that referenced this issue May 12, 2020
@dpvc dpvc removed their assignment May 12, 2020
dpvc added a commit to mathjax/MathJax-src that referenced this issue May 26, 2020
Make \boldsymbol\partial work properly.  (mathjax/MathJax#2417)
@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels May 26, 2020
@dpvc dpvc added this to the 3.1.0 milestone Aug 25, 2020
@dpvc dpvc added Fixed v3.1 and removed Merged Merged into develop branch labels Aug 25, 2020
@dpvc
Copy link
Member

dpvc commented Aug 25, 2020

Fixed in v3.1 released today.

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 Test Needed v3 v3.1
Projects
None yet
Development

No branches or pull requests

2 participants