2026年6月4日木曜日

BloggerでMathJax4を使用する

導入方法

  1. Blogger管理画面に行く
  2. "テーマ" を選び、 "HTMLの編集" をクリック
  3. </body>要素の直前に次のMathJaxのCDNを貼り付ける
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@4.0.0/tex-mml-chtml.js"></script>

使い方

(1) ブロック記法

\[…\] で数式を囲む。

・記入例

\[x = {-b \pm \sqrt{b^2-4ac} \over 2a}\]

・結果

\[x = {-b \pm \sqrt{b^2-4ac} \over 2a}\]

(2) テキスト(インライン)記法

\(…\) で数式を囲む。

・記入例

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}\]

・結果

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}\]

0 件のコメント:

BloggerでMathJax4を使用する

導入方法 Blogger管理画面に行く "テーマ" を選び、 "HTMLの編集" をクリック </body>要素の直前に次のMathJaxのCDNを貼り付ける <script id="M...