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

MathJax changes to support MathJax 3 #81

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

tfeb
Copy link
Contributor

@tfeb tfeb commented Feb 25, 2020

This changes the way that MathJax is generated to make things work with MathJax 3 This is the second PR associated with greghendershott/frog#252

Rather than generating script tags, this now simply wraps suitable delimiters around the maths, which MathJax will then find. This is essentially because I could not work out how to make the script tags work with MathJax 3.

In fact I can't work out how the script tags ever worked: there doesn't seem to be any mention of embedding maths this way even for MathJax 2: all the focus is on using delimiters which MathJax looks for. So this would seem to make things a lot closer to how the MathJax people expect things to work, which think is a good thing.

In both MathJax 2 and 3 this makes the output look better: using the script approach seems to result in maths which, unless you apply additional styling, is blue, while this approach results in maths which is just ordinary.

This change

  • only changes the output when using MathJax;
  • makes the output simpler in that case;
  • makes the formatted output better-looking I think;
  • works with at least MathJax 2 as well as 3 (I've tested this).

I'm willing to handle any problems which result from this PR.

Rather than generating script tags, this now simply wraps suitable
delimiters around the maths, which MathJax will then find.  This is
essentially because I could not work out how to make the script tags
work with MatJax 3.

In fact I can't work out how the script tags ever worked: there doesn't
seem to be any mention of embedding maths this way even for MathJax 2:
all the focus is on using delimiters which MathJax looks for.

In both MathJax 2 and 3 this makes the output look nicer: using the
script approach seems to result in maths which, unless you apply
additional styling, is blue, while this approach results in maths which
is just ordinary.

This change

- only changes the output when using MathJax;
- makes the output simpler in that case;
- makes the formatted output better-looking I think;
- works with at least MathJax 2 as well as 3.
@greghendershott greghendershott merged commit 5997437 into greghendershott:master Dec 14, 2023
3 checks passed
@tfeb tfeb deleted the mathjax-3 branch January 29, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants