Mathjax

<devsite-mathjax> カスタム要素を使用すると、DevSite コンテンツで数学的表記を表示できます。

一般的な使用方法

<devsite-mathjax> カスタム要素を追加し、ファイルの先頭に config 属性を指定します。<devsite-mathjax> 要素は自己完結型であり、ページ上に一度含めるだけで済みます。

これは、<devsite-mathjax> 要素と config 属性を TeX-AMS-MML_SVG に設定した、一般的な相対性のアインシュタインのフィールド方程式の例です。

$$ R_{\mu\nu}-\frac{1}{2}Rg_{\mu\nu}+\Lambda{g_{\mu\nu}} = \frac{8\pi{G}}{c^4}{T_{\mu\nu}} $$

区切り記号

数学表記は区切り文字で囲まれ、スタンドアロンまたはインラインで表示できます。

スタンドアロン

次のピタゴラスの定理は $$ delimiters and wrapped in a <div> element. It is displayed on its own line.

$$ a^2 + b^2 = c^2 $$ に囲まれています。

The following Pythagorean theorem is surrounded by \\[ and \\] delimiters and isn't wrapped in a <div> element. It is displayed on its own line.

\[ a^2 + b^2 = c^2 \]

The following Pythagorean theorem is surrounded by \[ and \] delimiters and is wrapped in a <div> element. It is displayed on its own line.

\[ a^2 + b^2 = c^2 \]

Inline

This inline equation of the area of a circle $ A = \pi{r^2} $ is displayed in this Markdown paragraph by using $ delimiters.

This inline equation of a summation expression \( \sum_{i=1}^n X_i \) is displayed in this Markdown paragraph by using \\( and \\) delimiters.

This inline equation of a straight line \(y=mx+b\) is displayed in this HTML paragraph by using \( and \) delimiters.