Mathjax の追加#
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [
["\\(", "\\)"],
],
},
});
</script>
{
mathjax &&
<script async type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/mathjax/3.2.2/es5/tex-chtml.min.js"></script>
}
テスト表示#
$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$
When $a \ne 0$, there are two solutions to $(ax^2 + bx + c = 0)$ and they are
利点:ページにプラグインを追加せずに数式を直接表示できます。
欠点:Mathjax サポートを追加すると、ページの読み込みが遅くなります。