thanks for sharing! i like the way the formulas are shown, and TIL about MathJax pic.twitter.com/P29YfN8Gd9
— John Track (@johntrack) May 12, 2020
Here’s a test of an equation I used in a previous post but pasted as a PNG instead of knowing how to write the equation
$$P ∝ {1\over λ^4}.$$
This is text after the equation. In the first edit I just did a few carriage returns in the top sentence, and the formula was still below all the text. Now this is a new text block and it will show after.
This is the code I used to get the formula above.
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"> </script> </head> <body> <p> $$P ∝ {1\over λ^4}.$$ </p>
It’s from a larger chunk of code provided in jsbin from the getting started page on mathjax; I choose to skip the html sections that I think are already addressed in the website, and my assumption was that I can just run the inline script instead of adding global sections.
<html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>MathJax example</title> <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"> </script> </head> <body> <p> $$P ∝ {1\over λ^4}.$$ </p> </body> </html>
I did have to get the lambda sign and I took that from the keyboard instead of the equation editor in Word, which is what I used to make the PNG.