Support TeX and LaTeX math delimiters (#243)
This commit is contained in:
parent
6688e27787
commit
d162167580
2 changed files with 20 additions and 3 deletions
|
@ -23,8 +23,25 @@
|
||||||
|
|
||||||
{% if page.math %}
|
{% if page.math %}
|
||||||
<!-- MathJax -->
|
<!-- MathJax -->
|
||||||
<script defer src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
<script>
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
// see: <https://docs.mathjax.org/en/latest/options/input/tex.html#tex-options>
|
||||||
|
MathJax = {
|
||||||
|
tex: {
|
||||||
|
inlineMath: [ // start/end delimiter pairs for in-line math
|
||||||
|
['$','$'],
|
||||||
|
['\\(','\\)']
|
||||||
|
],
|
||||||
|
displayMath: [ // start/end delimiter pairs for display math
|
||||||
|
['$$', '$$'],
|
||||||
|
['\\[', '\\]']
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
||||||
|
<script type="text/javascript" id="MathJax-script" async
|
||||||
|
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
|
||||||
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if jekyll.environment == 'production' %}
|
{% if jekyll.environment == 'production' %}
|
||||||
|
|
|
@ -147,7 +147,7 @@ The mathematics powered by [**MathJax**](https://www.mathjax.org/):
|
||||||
|
|
||||||
$$ \sum_{n=1}^\infty 1/n^2 = \frac{\pi^2}{6} $$
|
$$ \sum_{n=1}^\infty 1/n^2 = \frac{\pi^2}{6} $$
|
||||||
|
|
||||||
When \\(a \ne 0\\), there are two solutions to \\(ax^2 + bx + c = 0\\) and they are
|
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} $$
|
$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue