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

3.2 setting adaptiveCSS to false does not generate full css #2724

Closed
mt4c opened this issue Jun 29, 2021 · 5 comments
Closed

3.2 setting adaptiveCSS to false does not generate full css #2724

mt4c opened this issue Jun 29, 2021 · 5 comments
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Needed v3 v3.2
Milestone

Comments

@mt4c
Copy link

mt4c commented Jun 29, 2021

Issue Summary

Setting adaptiveCSS to false only generate the necessary css to render the initial maths.
New maths add to page do not render correctly.

Steps to Reproduce:

  1. Add one math to page and typeset.
  2. Add more math to page and typeset.

Technical details:

  • MathJax Version: 3.2
  • Client OS: Win 10
  • Browser: Chrome

Supporting information:

https://codepen.io/mt4c/pen/PomoRmQ

@dpvc dpvc added Accepted Issue has been reproduced by MathJax team v3 labels Jun 29, 2021
@dpvc
Copy link
Member

dpvc commented Jun 29, 2021

Thanks for the report. The handling of the adaptive CSS was updated substantially in v3.2, and it looks like there is a spot where the adaptiveCSS setting wasn't being taken in to account.

Can you use adaptiveCSS: true for now? The performance of this is much better in v3.2, and since the full CSS has a large number of rules, that can cause performance problems (e.g., when zooming in and out). Just for my information, can you say why you have it set to false?

@mt4c
Copy link
Author

mt4c commented Jun 30, 2021

Setting adaptiveCSS: true is ok.

It was set to false because we tried to render math on some slow devices. If the css updates dynamically, the page will filcker when the browser reloads css.

@dpvc
Copy link
Member

dpvc commented Jul 6, 2021

If the css updates dynamically, the page will filcker when the browser reloads css.

The 3.2 release includes better handling of the CSS updates that should reduce or eliminate the flicker. Give it a try and see if that is an improvement for you.

@Eumeryx
Copy link

Eumeryx commented Sep 29, 2021

Just for my information, can you say why you have it set to false?

Hello! I use MathJax.tex2chtml() in the markdown-it plugin to convert the math in markdown, not in html file, so I need a full CSS import to the final generated html.

@dpvc
Copy link
Member

dpvc commented Oct 9, 2021

@Eumeryx, if you do multiple MathJax.tex2chtml() calls and then get the CSS via MathJax.chtmlStylesheet(), it will include everything needed for all the calls you have made up to that point, so you should not need the complete CSS.

@dpvc dpvc self-assigned this Jan 11, 2022
@dpvc dpvc added this to the 3.2.1 milestone Jan 31, 2022
dpvc added a commit to mathjax/MathJax-src that referenced this issue Apr 6, 2022
Make sure all character data is included when adaptiveCSS is false.  (mathjax/MathJax#2724)
@dpvc dpvc added Test Needed Merged Merged into develop branch and removed Ready for Review labels Apr 6, 2022
@dpvc dpvc added Fixed v3.2 and removed Merged Merged into develop branch labels Jun 1, 2022
@dpvc dpvc closed this as completed Jun 1, 2022
@dpvc dpvc removed their assignment Jan 31, 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 Fixed Test Needed v3 v3.2
Projects
None yet
Development

No branches or pull requests

3 participants