From 0aec6e268a194c8369e25c5b72a0f3c1e623b422 Mon Sep 17 00:00:00 2001 From: huanyushi Date: Thu, 11 Apr 2024 15:06:28 +0800 Subject: [PATCH 1/3] Update MathJax extension support physics package --- _includes/js-selector.html | 7 +++++++ _posts/2019-08-08-text-and-typography.md | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/_includes/js-selector.html b/_includes/js-selector.html index 662e9a45f26..ffc10d43cfb 100644 --- a/_includes/js-selector.html +++ b/_includes/js-selector.html @@ -75,6 +75,11 @@ -{% if page.math %} - - - - -{% endif %} {% if page.layout == 'post' %} diff --git a/_includes/mathjax-support.html b/_includes/mathjax-support.html new file mode 100644 index 00000000000..f23efdef8a4 --- /dev/null +++ b/_includes/mathjax-support.html @@ -0,0 +1,22 @@ + + + \ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html index 6e865b920f5..a0fc009f880 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -78,6 +78,11 @@ {% include js-selector.html lang=lang %} + + {% if page.math %} + {% include mathjax-support.html %} + {% endif %} + {% if page.mermaid %} {% include mermaid.html %} {% endif %} diff --git a/_posts/2019-08-08-text-and-typography.md b/_posts/2019-08-08-text-and-typography.md index 111e5e88b35..7064d5d4a62 100644 --- a/_posts/2019-08-08-text-and-typography.md +++ b/_posts/2019-08-08-text-and-typography.md @@ -152,12 +152,6 @@ When $a \ne 0$, there are two solutions to $ax^2 + bx + c = 0$ and they are $$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$ -We can also use the physics package in MathJax to render mathematical expressions: - -$$ -i G_{\alpha\beta}(\vb{x}t,\vb{x}'t') = \frac{\mel{\Psi_0}{\hat{\mathsf{T}}[\hat{\psi}_{H\alpha}(\vb{x}t)\hat{\psi}_{H\beta}^\dagger(\vb{x}'t')]}{\Psi_0}}{\braket{\Psi_0}{\Psi_0}} -$$ - ## Mermaid SVG ```mermaid