LaTeX

在 WordPress 中使用 MathJax-LaTeX

必要前置條件

在原始檔頁首插入標籤 

單行公式

在公式前後加上「$$」符號

多行公式

  • 以 \begin{align} 開始
  • 用「\\」換行
  • 在每行想對齊的位置插入「&」
  • 以 \end{align} 結束
  • 從 \begin 到 \end 之間,只可以換行 (shift + enter) 不可以分段 (enter)

※ MathJax-LaTeX 中的 equation 並不會產生公式的編號

等號對齊

  • 以 \begin{eqnarray} 開始
  • 到 \end{eqnarray} 結束
  • 使用「&=&」或「&:=&」等
    讓等號左右兩邊對齊
  • ex:
    \begin{eqnarray}
    a &=& b \\
    &=& c
    \end{eqnarray}
  • 你也可以使用 align environment
    並在其中使用「&=」達到相同效果

    ex:
    \begin{align}
    a &= b \\
    &= c
    \end{align}

置中對齊

利用 eqnarray enviroment,並在前後加上「&」

常用記號

計算

乘以 a \cdot b $$a\cdot b$$
  a \times b $$a \times b$$
除以 a \div b $$a \div b$$
分數 \frac{a}{b} $$\frac{a}{b}$$
 

\frac{a}{b}c
\tfrac{a}{b}c

\begin{align}
& \frac{a}{b}c \\
& \tfrac{a}{b}c
\end{align}
大於等於 ≥

a \geq b

$$a \geq b$$

小於等於 ≤

a \leq b

$$a \leq b$$

無限 \infty $$\infty$$
Theta \theta $$\theta$$

集合

屬於 a \in A $$a \in A$$
真包含於 a \subset b $$a \subset b$$
包含於 a \subseteq b $$a \subseteq b$$

非真包含於

a \not\subset b $$a \not\subset b$$
非包含於 a \not\subseteq b $$a \not\subseteq b$$
空集合 \emptyset $$\emptyset$$
自然數 \mathbb{N} $$\mathbb{N}$$
整數 \mathbb{Z} $$\mathbb{Z}$$
有理數 \mathbb{Q} $$\mathbb{Q}$$
實數 \mathbb{R} $$\mathbb{R}$$
複數 \mathbb{C} $$\mathbb{C}$$

邏輯

因為 \because
所以 / 故 \therefore
存在 \exists $$\exists$$
所有 \forall $$\forall$$
\land $$\land$$
\lor $$\lor$$
XOR a \oplus b $$a \oplus b$$
箭頭 / 箭號 \leftarrow $$\leftarrow$$
  \rightarrow $$\rightarrow$$
  \leftrightarrow $$\leftrightarrow$$
  \Leftarrow $$\Leftarrow$$
  \Rightarrow $$\Rightarrow$$
  \Leftrightarrow $$\Leftrightarrow$$
  \Longleftrightarrow

$$\Longleftrightarrow$$

\equiv

$$\equiv$$

函式

上標 / 下標

expr_{subscript}^{superscript}

$$expr_{subscript}^{superscript}$$

 

\mathop{expr}\limits_{subscript}^{superscript}
(\limits 前方必須是個math operator
故使用 \mathop)

$$\mathop{expr}\limits_{subscript}^{superscript}$$

Sum \sum_{i = 1}^{n}{x ^ i} $$\sum_{i = 1}^{n}{x ^ i}$$
Product \prod_{i = 1}^{n}{x ^ i} $$\prod_{i = 1}^{n}{x ^ i}$$
prime x’ $$x’$$
  x^{\prime} $$x^{\prime}$$
  x \prime $$x \prime$$
bar \bar{x} $$\bar{x}$$
  \overline{x} $$\overline{x}$$
tilde \tilde{x} $$\tilde{x}$$
dot \dot{x} $$\dot{x}$$
hat / caret / circumflex \hat{x} $$\hat{x}$$
grave \grave{x} $$\grave{x}$$
arrow \overleftarrow{x} $$\overleftarrow{x}$$
  \vec{x} $$\vec{x}$$
  \overleftrightarrow{x} $$\overleftrightarrow{x}$$

括號

小括號 / 圓括號
parentheses / (round) brackets
\left( a \right) $$\left( a \right)$$
中括號 / 方括號
square brackets
\left[ a \right] $$\left[ a \right]$$
大括號 / 花括號
(curly) braces / curly brackets
\left\{ a \right\} $$\left\{ a \right\}$$

\begin{align}

f(x) = \left\{
\begin{aligned}

a \\
b \\
c

\end{aligned}
\right.

\end{align}

\begin{align}
f(x) = \left\{
\begin{aligned}
a \\
b \\
c
\end{aligned}
\right.
\end{align}

 

$$ f(x) = \left\{
\begin{aligned}

a \\
b \\
c

\end{aligned}
\right. $$

$$ f(x) = \left\{
\begin{aligned}
a \\
b \\
c
\end{aligned}
\right. $$

 

$$f(x) = \\

\begin{cases}
a \\
b \\
c

\end{cases}$$

使用 cases environment
取代 \left\{, \right.

$$f(x) = 
\begin{cases}
a \\
b \\
c
\end{cases}$$

絕對值 \left| a \right| $$\left| a \right|$$
  \vert a \vert $$\vert a \vert$$
放大符號 \big \{ $$\big \{$$
  \Big \{ $$\Big \{$$
  \bigg \{ $$\bigg \{$$
  \Bigg \{ $$\Bigg \{$$

空格

兩個全形空格

a \qquad b

$$a \qquad b$$

一個全形空格 a \quad b $$a \quad b$$
半形空格 a \ b $$a \ b$$
  a \; b $$a\;b$$
  a \, b $$a \, b$$
無空格 ab $$ab$$
緊貼 a \! b $$a \! b$$

字體

顏色

\color{red}{text}

$$\color{red}{text}$$

 

\color{#00aaaa}{text}

$$\color{#00aaaa}{text}$$

符號

浪紋號

\sim

$$\sim$$

偏微分符號 \partial $$ \partial $$
Epsilon \epsilon
\varepsilon
\mathcal{E}
\begin{align}
\epsilon \\
\varepsilon \\
\mathcal{E}
\end{align}

SCI 論文寫作字體標準

斜體 (Italic; 向右傾斜30度) \textit{…}

下列符號應使用斜體:

  • 變數 (variables)、描述變數的函式
  • 座標軸 (axes)
  • 平面 (planes)
  • 行列式 (determinants) 和矩陣 (matrices) 中的元素
  • 常數 (constants)

羅馬字體 (Roman; 正體): \mathop{…}

下列符號應使用正體:

  • 數字

  • 標點符號和括號

  • 運算子

  • 量度和時間單位

  • 非數學符號和數量

  • 變數的多字元縮寫

  • 數學常量 (mathematical constants): 自然對數 (e) 、複數的虛部 (i) 、圓周率 (π)…等

  • 矩陣的轉置 (transposes) 符號

  • 點 (point) 和線 (line)

  • 行列式(determinants)

  • 三角函式和其他數學函式

粗體 (Boldface): \textbf{…}

下列符號應使用粗體:

  • 向量 (vectors)

  • 張量 (tensors)

  • 矩陣 (matrics)

  • 多維物理量

Last Updated on 2023/08/02 by A1go

目錄
Bitnami