Up TeX 作成: 2017-10-20
更新: 2022-11-23


  • TeX 式の書き方
      teststyle  : 式を \( \)  で挟む
      	
      displaystyle: 式を \[ \] で挟む

  • phtml 文書の中では,<? ?> から外れて書かないと,改行 \\ などが効かない。

  • \begin{align} - \end{align} は,\[ \] の中で1回しか使えない。

    teststyle displaystyle TeX 式
    \[ \begin{align} a_1&=b_1+c_1 \\ a_2&=b_2+c_2-d_2+e_2 \end{align} \]
    \begin{align}
    a_1&=b_1+c_1 \\
    a_2&=b_2+c_2-d_2+e_2
    \end{align}
    
    \[ \begin{align*} a_1&=b_1+c_1 \\ a_2&=b_2+c_2-d_2+e_2 \end{align*} \]
    \begin{align*}
    a_1&=b_1+c_1 \\
    a_2&=b_2+c_2-d_2+e_2
    \end{align*}
    
    \[ \begin{align*} a_{11} &=b_{11} & a_{12}&=b_{12} \\ a_{21} &=b_{21} & a_{22}&=b_{12}+c_{22} \end{align*} \]
    \begin{align*}
    a_{11} &=b_{11}
     & a_{12}&=b_{12} \\
    a_{21} &=b_{21}
     & a_{22}&=b_{12}+c_{22} 
    \end{align*}
    
    \[ \begin{align} f(b)&=f(a)+\frac {b-a}{1!}f'(a)\\ &\quad +\frac {(b-a)^2}{2!}f''(a)\\ &\qquad +\frac {(b-a)^3}{3!}f''(a)\\ &\qquad\quad +\frac {(b-a)^4}{4!}f''(a)\\ &\qquad\qquad \cdots +\frac {(b-a)^n}{n!}f^{(n)}(a)+R_n(a) \end{align} \]
    \begin{align}
    f(b)&=f(a)+\frac {b-a}{1!}f'(a)\\
    &\quad +\frac {(b-a)^2}{2!}f''(a)\\
    &\qquad +\frac {(b-a)^3}{3!}f''(a)\\
    &\qquad\quad +\frac {(b-a)^4}{4!}f''(a)\\
    &\qquad\qquad \cdots 
    +\frac {(b-a)^n}{n!}f^{(n)}(a)+R_n(a)
    \end{align}
    
    \( x^2 + y^2 - z^2 =2 \) \[ x^2 + y^2 - z^2 =2 \] x^2 + y^2 - z^2 =2
    \( x=\sqrt{2} \) \[ x=\sqrt{2} \] x=\sqrt{2}
    \( e^{i\pi} = -1 \) \[ e^{i\pi} = -1 \] e^{i\pi} = -1
    \( x = \frac{a}{b} \) \[ x = \frac{a}{b} \] x = \frac{a}{b}
    \( \overrightarrow{AB} \) \[ \overrightarrow{AB} \] \overrightarrow{AB}
    \( \frac{-b\pm\sqrt{b^2-4ac}}{2a} \) \[ \frac{-b\pm\sqrt{b^2-4ac}}{2a} \] \frac{-b\pm\sqrt{b^2-4ac}}{2a}
    \( F \propto \frac{q_1\ q_2}{r^2} \) \( \vec{F} = \frac{1}{4\pi \varepsilon_0} \frac{q_1\ q_2}{|\vec{r}|^2} \frac{\vec{r}}{|\vec{r}|} \) \[ F \propto \frac{q_1\ q_2}{r^2} \] \[ \vec{F} = \frac{1}{4\pi \varepsilon_0} \frac{q_1\ q_2}{|\vec{r}|^2} \frac{\vec{r}}{|\vec{r}|} \]
    \F \propto \frac{q_1\ q_2}{r^2}

    \vec{F} =
    \frac{1}{4\pi \varepsilon_0}
    \frac{q_1\ q_2}{|\vec{r}|^2}
    \frac{\vec{r}}{|\vec{r}|}
    \( N(m,\sigma^{2})=\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{(x-m)^2}{2\sigma^{2}}} \) \[ N(m,\sigma^{2})=\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{(x-m)^2}{2\sigma^{2}}} \]
    N(m,\sigma^{2})=
    \frac{1}{\sigma\sqrt{2\pi}}
    e^{-\frac{(x-m)^2}{2\sigma^{2}}}
    \( f(x)=\int_0^{x}g(t)\,dt \) \[ f(x)=\int_0^{x}g(t)\,dt \] f(x)=\int_0^{x}g(t)\,dt
    \( \iota(f,z_{0})=\frac{1}{2 \pi i}\oint\frac{dz}{z_{0}-f(z)} \) \[ \iota(f,z_{0})=\frac{1}{2 \pi i}\oint\frac{dz}{z_{0}-f(z)} \]
    \iota(f,z_{0})=
    \frac{1}{2 \pi i}
    \oint\frac{dz}{z_{0}-f(z)}
    \[ \left( \begin{array}{c} x^1 \\ \vdots \\ x^n \\ \end{array} \right) \qquad \begin{array}{c} t \\ \\ \\ \end{array} \left( \begin{array}{c} x^1 \\ x^2 \\ x^3 \\ \end{array} \right) \]
    \left(
    \begin{array}{c}
    x^1 \\
    \vdots \\
    x^n \\
    \end{array}
    \right)
    
    \begin{array}{c}
    t \\
     \\
     \\
    \end{array}
    
    \left(
    \begin{array}{c}
    x^1 \\
    x^2 \\
    x^3 \\
    \end{array}
    \right)
    
    \[ \left( \begin{array}{ccc} a_{11} & \cdots & a_{1n} \\ & \cdots & \\ a_{n1} & \cdots & a_{nn} \\ \end{array} \right) \\  \\ \left( \begin{array}{ccc} a^1_1 & \cdots & a^1_n \\ & \cdots & \\ a^n_1 & \cdots & a^n_n \\ \end{array} \right) \\  \\ \left( \begin{array}{ccc} a^1_1 & \cdots & a^n_1 \\ & \cdots & \\ a^1_n & \cdots & a^n_n \\ \end{array} \right) \]
    \left(
    \begin{array}{ccc}
    a_{11} & \cdots & a_{1n} \\
    & \cdots & \\
    a_{n1} & \cdots & a_{nn} \\
    \end{array}
    \right)
    
    \left(
    \begin{array}{ccc}
    a^1_1 & \cdots & a^1_n \\
    & \cdots & \\
    a^n_1 & \cdots & a^n_n \\
    \end{array}
    \right)
    
    \left(
    \begin{array}{ccc}
    a^1_1 & \cdots & a^n_1 \\
    & \cdots & \\
    a^1_n & \cdots & a^n_n \\
    \end{array}
    \right)
    
    \( A=\left( \begin{array}{ccc} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \\ \end{array} \right) \) \[ A=\left( \begin{array}{ccc} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \\ \end{array} \right) \]
    A=\left(
    \begin{array}{ccc}
    a_{11} & a_{12} & a_{13} \\
    a_{21} & a_{22} & a_{23} \\
    a_{31} & a_{32} & a_{33} \\
    \end{array}
    \right)
    \( \left( \begin{array}{cccc} a_1 & 0 & \cdots &\\ 0 & a_2 & 0 & \cdots \\ & \cdots & \ddots & \cdots \\ & \cdots & 0 & a_n \\ \end{array} \right) \) \[ \left( \begin{array}{cccc} a_1 & 0 & \cdots &\\ 0 & a_2 & 0 & \cdots \\ & \cdots & \ddots & \cdots \\ & \cdots & 0 & a_n \\ \end{array} \right) \]
    \left(
    \begin{array}{cccc}
    a_1 & 0 & \cdots &\\
    0 & a_2 & 0 & \cdots \\
     & \cdots & \ddots & \cdots \\
     & \cdots & 0 & a_n \\
    \end{array}
    \right)
    
    \( \int_S \vec{F}(\vec{x}) \cdot d\vec{S} = \begin{cases} 4 \pi & (\vec{a} \in D) \\ 0 & (\vec{a} \notin D) \end{cases} \) \[ \int_S \vec{F}(\vec{x}) \cdot d\vec{S} = \begin{cases} 4 \pi & (\vec{a} \in D) \\ 0 & (\vec{a} \notin D) \end{cases} \]
    \int_S \vec{F}(\vec{x}) 
    \cdot d\vec{S} = 
    \begin{cases}
    4 \pi & (\vec{a} \in D) \\
    0  & (\vec{a} \notin D) 
    \end{cases}


    \( \hat{x} \) \hat{x} \( \check{x} \) \check{x}
    \( \breve{x} \) \breve{x} \( \acute{x} \) \acute{x}
    \( \grave{x} \) \grave{x} \( \tilde{x} \) \tilde{x}
    \( \bar{x} \) \bar{x} \( \vec{x} \) \vec{x}
    \( \dot{x} \) \dot{x} \( \ddot{x} \) \ddot{x}
      
    \( \overline{x + y} \) \overline{x + y}
    \( \underline{x + y} \) \underline{x + y}
    \( \newcommand{\overarc}[1]{\stackrel{\Large\mbox{$\frown$}}{#1}} \\ \overarc{P_1 P_2} \) \newcommand{\overarc}[1]{\stackrel{\Large\mbox{$\frown$}}{#1}}
    \overarc{P_1 P_2}
    \( \widehat{xyz} \) \widehat{xyz}
    \( \widetilde{xyz} \) \widetilde{xyz}
    \( \overbrace{x + y} \) \overbrace{x + y}
    \( \underbrace{x + y} \) \underbrace{x + y}
    \( \overbrace{a + \cdots + z}^{26} \) \overbrace{a + \cdots + z}^{26}
    \( \underbrace{a + \cdots + z}_{26} \) \underbrace{a + \cdots + z}_{26}
    \( \overrightarrow{AB} \) \overrightarrow{AB}
    \( \overleftarrow{AB} \) \overleftarrow{AB}


  • スペース
    \, a \, b
    a \,\,\,\,\, b
    \( a \, b \)
    \( a \,\,\,\,\, b \)
    \スペース a \ b
    a \ \ \ \ \ b
    \( a \ b \)
    \( a \ \ \ \ \ b \)
    ~ a ~ b
    a ~~~~~ b
    \( a ~ b \)
    \( a ~~~~~ b \)
    \hspace{長さ} \hspace{5pt} \( a \hspace{5pt} b \)

  • 書体
    {\rm ‥‥ } ローマン体 (標準)
    {\bf ‥‥ } ボールド体 (太字)
    {\it ‥‥ } イタリック体 (強調)
    {\pmb ‥‥ } ボールドイタリック体
    {\boldsymbol ‥‥ } ボールドシンボル
    {\sf ‥‥ } サンセリフ体
    {\sl ‥‥ } 斜体
    {\sc ‥‥ } スモールキャップス (全部大文字)
    {\tt ‥‥ } タイプライタ体
    {\gt ‥‥ } ゴシック体 (日本語)
    {\mc ‥‥ } 明朝体 (日本語)


  • 各種記号
    対象記号
    \(\ \mathbb{N} \) \mathbb{N}
    \(\ \mathbb{Z} \) \mathbb{Z}
    \(\ \mathbb{Q} \) \mathbb{Q}
    \(\ \mathbb{R} \) \mathbb{R}
    \(\ \mathbb{C} \) \mathbb{C}
    \(\ \mathbb{F} \) \mathbb{F}
    \(\ \infty \) \infty

    二項関係
    \(\ne\) \ne
    \(\le\) \le
    \(\ge\) \ge
    \(\leqq\) \leqq
    \(\geqq\) \geqq
    \(\sim\) \sim
    \(\approx\) \approx
    \(\simeq\) \simeq
    \(\cong\) \cong
    \(\equiv\) \equiv
    \(\in\) \in
    \(\ni\) \ni
    \(\notin\) \notin
    \(\subset\) \subset
    \(\supset\) \supset
    \(\propto\) \propto
    \(\perp\) \perp

    論理記号
    \lnot \(\lnot\)
    \land \(\land\)
    \lor \(\lor\)
    \models \(\models\)
    \to \(\to\)
    \Rightarrow \(\Rightarrow\)
    \Leftrightarrow \(\Leftrightarrow\)
    \equiv \(\equiv\)
    \forall \(\forall\)
    \exists \(\exists\)
      矢印
    \leftarrow \(\leftarrow\)
    \rightarrow \(\rightarrow\)
    \leftrightarrow \(\leftrightarrow\)
    \uparrow \(\uparrow\)
    \downarrow \(\downarrow\)
    \updownarrow \(\updownarrow\)
    \Leftarrow \(\Leftarrow\)
    \Rightarrow \(\Rightarrow\)
    \Leftrightarrow \(\Leftrightarrow\)
    \Uparrow \(\Uparrow\)
    \Downarrow \(\Downarrow\)
    \Updownarrow \(\Updownarrow\)
    \longleftarrow \(\longleftarrow\)
    \longrightarrow \(\longrightarrow\)
    \longleftrightarrow \(\longleftrightarrow\)
    \Longleftarrow \(\Longleftarrow\)
    \Longrightarrow \(\Longrightarrow\)
    \Longleftrightarrow \(\Longleftrightarrow\)
    \longmapsto \(\longmapsto\)

    ドット
    \(\ \cdot \) \cdot
    \(\ \cdots \) \cdots
    \(\ \ldots \) \ldots
    \(\ \vdots \) \vdots
    \(\ \ddots \) \ddots

    括弧
    \(\ \langle \ \ \rangle \) \langle \rangle }
    \(\ ( \ \ ) \) ( )
    \(\ \bigl( \ \ \bigr) \) \bigl( \bigr)
    \(\ \bigl( \ \ \bigr) \) \bigl( \bigr)
    \(\ \Bigl( \ \ \Bigr) \) \Bigl( \Bigr)
    \(\ \biggl( \ \ \biggr) \) \biggl( \biggr)
    \(\ \Biggl( \ \ \Biggr) \) \Biggl( \Biggr)
    \(\ \{ \ \ \} \) \{ \}
    \(\ \bigl\{ \ \ \bigr\} \) \bigl\{ \bigr\}
    \(\ \Bigl\{ \ \ \Bigr\} \) \Bigl\{ \Bigr\}
    \(\ \biggl\{ \ \ \biggr\} \) \biggl\{ \biggr\}
    \(\ \Biggl\{ \ \ \Biggr\} \) \Biggl\{ \Biggr\}
    \(\ [ \ \ ] \) [ ]
    \(\ \bigl[ \ \ \bigr] \) \bigl[ \bigr]
    \(\ \Bigl[ \ \ \Bigr] \) \Bigl[ \Bigr]
    \(\ \biggl[ \ \ \biggr] \) \biggl[ \biggr]
    \(\ \Biggl[ \ \ \Biggr] \) \Biggl[ \Biggr]
      二項演算
    \(\ \pm \) \pm
    \(\ \mp \) \mp
    \(\ \times \) \times
    \(\ \div \) \div
    \(\ \ast \) \ast
    \(\ \circ \) \circ
    \(\ \bullet \) \bullet
    \(\ \cdot \) \cdot
    \(\ \cap \) \cap
    \(\ \bigcap \) \bigcap
    \(\ \cup \) \cup
    \(\ \bigcup \) \bigcup
    \(\ \vee \) \vee
    \(\ \wedge \) \wedge
    \(\ \bigwedge \) \bigwedge
    \(\ \oplus \) \oplus
    \(\ \bigoplus \) \bigoplus
    \(\ \otimes \) \otimes
    \(\ \bigotimes \) \bigotimes
    \(\ \triangle \) \triangle
    \(\ \bigtriangleup \) \bigtriangleup
    \(\ \bigtriangledown \) \bigtriangledown
    \(\ \square \) \square
    \(\ \ddagger \) \ddagger

    微積分記号
    \sum_{i=0}^n x_i \[\sum_{i=0}^n x_i\]
    \prod \[prod\]
    \lim_{n \to \infty} \[\lim_{n \to \infty}\]
    dx \(dx\)
    dt \(dt\)
    \partial^2 x \(\partial^2 x\)
    \partial x^2 \(\partial x^2\)
    \Delta \(\Delta\)
    \nabla^2 \(\nabla^2\)
    \int \(\int\)
    \int_a^b \(\int_a^b\)
    \oint \(\oint\)
    f'' \(f''\)
    f^{(k)} \(f^{(k)}\)
      ギリシャ文字
    \( A \) A \( \alpha \) \alpha
    \( B \) B \( \beta \) \beta
    \( \Gamma \) \Gamma \( \gamma \) \gamma
    \( \Delta \) \Delta \( \delta \) \delta
    \( E \) E \( \epsilon \) \epsilon \( \varepsilon \) \varepsilon
    \( Z \) Z \( \zeta \) \zeta
    \( H \) H \( \eta \) \eta
    \( \Theta \) \Theta \( \theta \) \theta \( \vartheta \) \vartheta
    \( I \) I \( \iota \) \iota
    \( K \) K \( \kappa \) \kappa
    \( \Lambda \) \Lambda \( \lambda \) \lambda
    \( M \) M \( \mu \) \mu
    \( N \) N \( \nu \) \nu
    \( \Xi \) \Xi \( \xi \) \xi
    \( O \) O \( o \) o
    \( \Pi \) \Pi \( \pi \) \pi \( \varpi \) \varpi
    \( P \) P \( \rho \) \rho \( \varrho \) \varrho
    \( \Sigma \) \Sigma \( \sigma \) \sigma \( \varsigma \) \varsigma
    \( T \) T \( \tau \) \tau
    \( \Upsilon \) \Upsilon \( \upsilon \) \upsilon
    \( \Phi \) \Phi \( \phi \) \phi \( \varphi \) \varphi
    \( X \) X \( \chi \) \chi
    \( \Psi \) \Psi \( \psi \) \psi
    \( \Omega \) \Omega \( \omega \) \omega


    \mathscr{·}
    \( \mathfrak{A} \) \( \mathfrak{a} \)
    \( \mathfrak{B} \) \( \mathfrak{b} \)
    \( \mathfrak{C} \) \( \mathfrak{c} \)
    \( \mathfrak{D} \) \( \mathfrak{d} \)
    \( \mathfrak{E} \) \( \mathfrak{e} \)
    \( \mathfrak{F} \) \( \mathfrak{f} \)
    \( \mathfrak{G} \) \( \mathfrak{g} \)
    \( \mathfrak{H} \) \( \mathfrak{h} \)
    \( \mathfrak{I} \) \( \mathfrak{i} \)
    \( \mathfrak{J} \) \( \mathfrak{j} \)
    \( \mathfrak{K} \) \( \mathfrak{k} \)
    \( \mathfrak{L} \) \( \mathfrak{l} \)
    \( \mathfrak{M} \) \( \mathfrak{m} \)
    \( \mathfrak{N} \) \( \mathfrak{n} \)
    \( \mathfrak{O} \) \( \mathfrak{o} \)
    \( \mathfrak{P} \) \( \mathfrak{p} \)
    \( \mathfrak{Q} \) \( \mathfrak{q} \)
    \( \mathfrak{R} \) \( \mathfrak{r} \)
    \( \mathfrak{S} \) \( \mathfrak{s} \)
    \( \mathfrak{T} \) \( \mathfrak{t} \)
    \( \mathfrak{U} \) \( \mathfrak{u} \)
    \( \mathfrak{V} \) \( \mathfrak{v} \)
    \( \mathfrak{W} \) \( \mathfrak{w} \)
    \( \mathfrak{X} \) \( \mathfrak{x} \)
    \( \mathfrak{Y} \) \( \mathfrak{y} \)
    \( \mathfrak{Z} \) \( \mathfrak{z} \)
    \mathscr{·}
    \( \mathscr{A} \)
    \( \mathscr{B} \)
    \( \mathscr{C} \)
    \( \mathscr{D} \)
    \( \mathscr{E} \)
    \( \mathscr{F} \)
    \( \mathscr{G} \)
    \( \mathscr{H} \)
    \( \mathscr{I} \)
    \( \mathscr{J} \)
    \( \mathscr{K} \)
    \( \mathscr{L} \)
    \( \mathscr{M} \)
    \( \mathscr{N} \)
    \( \mathscr{O} \)
    \( \mathscr{P} \)
    \( \mathscr{Q} \)
    \( \mathscr{R} \)
    \( \mathscr{S} \)
    \( \mathscr{T} \)
    \( \mathscr{U} \)
    \( \mathscr{V} \)
    \( \mathscr{W} \)
    \( \mathscr{X} \)
    \( \mathscr{Y} \)
    \( \mathscr{Z} \)
    \mathcal{·}
    \( \mathcal{A} \)
    \( \mathcal{B} \)
    \( \mathcal{C} \)
    \( \mathcal{D} \)
    \( \mathcal{E} \)
    \( \mathcal{F} \)
    \( \mathcal{G} \)
    \( \mathcal{H} \)
    \( \mathcal{I} \)
    \( \mathcal{J} \)
    \( \mathcal{K} \)
    \( \mathcal{L} \)
    \( \mathcal{M} \)
    \( \mathcal{N} \)
    \( \mathcal{O} \)
    \( \mathcal{P} \)
    \( \mathcal{Q} \)
    \( \mathcal{R} \)
    \( \mathcal{S} \)
    \( \mathcal{T} \)
    \( \mathcal{U} \)
    \( \mathcal{V} \)
    \( \mathcal{W} \)
    \( \mathcal{X} \)
    \( \mathcal{Y} \)
    \( \mathcal{Z} \)