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

feat(MathJax): Add support for MathJax extension, e.g. physics package #1663

Closed
wants to merge 4 commits into from

Conversation

huanyushi
Copy link
Contributor

@huanyushi huanyushi commented Apr 11, 2024

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (refactoring and improving code)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Description

MathJax provides many extensions that help us input mathematical expressions more conveniently. Among them, the physics package is particularly important for STEM majors, as it allows us to easily input matrices, Dirac notation, adjust bracket sizes, and more.

I modified _includes/js-selector.html to add support for the physics package. I also added an example using the physics package in _posts/2019-08-08-text-and-typography.md.

More extensions of MathJax can be found here

Additional context

Fixed #622

support physics package
@huanyushi huanyushi changed the title Update MathJax extension Support MathJax extension, e.g. physics package Apr 11, 2024
@huanyushi huanyushi changed the title Support MathJax extension, e.g. physics package feat(MathJax): Add support for MathJax extension, e.g. physics package Apr 12, 2024
Copy link
Owner

@cotes2020 cotes2020 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @huanyushi, this PR just loads a certain extension (physics). I think it would be possible to move the mathjax configuration to a js config file so that extensions can be configured on demand.

@huanyushi
Copy link
Contributor Author

huanyushi commented Apr 13, 2024

I think it would be possible to move the mathjax configuration to a js config file so that extensions can be configured on demand.

@cotes2020 Of course, I have updated this PR. I moved the MathJax configuration from _includes/js-selector.html to a new file _includes/mathjax-support.html.

I removed the physics extension that I had added. Users can now add any configurations they need to _includes/mathjax-support.html.

@cotes2020
Copy link
Owner

See #1670

@cotes2020 cotes2020 closed this Apr 13, 2024
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.

how to add mathjax extension
2 participants