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}} $$

分隔符號

數學標記以分隔符號括住,可以獨立顯示或內嵌。

獨立式

以下 Pythagorean 理論周圍有 $$ 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.