Skip to content

KaTeXで数式を書く

改行

latex
$$
\begin{aligned} 
  x^2 - (a + b)x + ab = 0 \\
  (x - a) (x - b) = 0 \\
  x = a, b
\end{aligned}
$$

x2(a+b)x+ab=0(xa)(xb)=0x=a,b\begin{aligned} x^2 - (a + b)x + ab = 0 \\ (x - a) (x - b) = 0 \\ x = a, b \end{aligned}

揃える

latex
$$
\begin{aligned} 
  x^2 - (a + b)x + ab &= 0 \\
  (x - a) (x - b) &= 0 \\
  x &= a, b
\end{aligned}
$$

x2(a+b)x+ab=0(xa)(xb)=0x=a,b\begin{aligned} x^2 - (a + b)x + ab &= 0 \\ (x - a) (x - b) &= 0 \\ x &= a, b \end{aligned}

空白

latex
$$
\begin{aligned} 
  x^2 - (a + b)x + ab &= 0 \\
  (x - a) (x - b) &= 0 \\
  x &= a, \qquad\quad b
\end{aligned}
$$

x2(a+b)x+ab=0(xa)(xb)=0x=a,b\begin{aligned} x^2 - (a + b)x + ab &= 0 \\ (x - a) (x - b) &= 0 \\ x &= a, \qquad\quad b \end{aligned}

添字

x^{2} -> x2x^{2}

x^{2+i} -> x2+ix^{2+i}

x_{i} -> xix_{i}

x_{i-1} -> xi1x_{i-1}

x^{2}_{i} -> xi2x^{2}_{i}

x_{i}^{2} -> xi2x_{i}^{2}

{x_{i}}^{2} -> xi2{x_{i}}^{2}

{x^{2}}_{i} -> x2i{x^{2}}_{i}

x^{y^{2}} -> xy2x^{y^{2}}

x^{y_{2}} -> xy2x^{y_{2}}

x_{y_{i}} -> xyix_{y_{i}}

x_{y^{2}} -> xy2x_{y^{2}}

x^{\prime} -> xx^{\prime}

{}^{\forall}x -> x{}^{\forall}x

{}^{\exists}x -> x{}^{\exists}x

{}_{n}C_{r} -> nCr{}_{n}C_{r}

分数

\frac{1}{2} ->

12\frac{1}{2}

y = \frac{1}{x+1} ->

y=1x+1y = \frac{1}{x+1}

根号記号

\sqrt[1]{2} ->

21\sqrt[1]{2}

L = \int_{b}^{a} \sqrt{ \left( \frac{dx}{dt} \right)^{2} + \left( \frac{dy}{dt} \right)^{2} } dt ->

L=ba(dxdt)2+(dydt)2dtL = \int_{b}^{a} \sqrt{ \left( \frac{dx}{dt} \right)^{2} + \left( \frac{dy}{dt} \right)^{2} } dt

シグマ記号

\sum -> \sum

\sum^{n}_{k=1}(a_{k}+b_{k}) = \sum^{n}_{k=1}a_{k} + \sum^{n}_{k=1}b_{k} ->

k=1n(ak+bk)=k=1nak+k=1nbk\sum^{n}_{k=1}(a_{k}+b_{k}) = \sum^{n}_{k=1}a_{k} + \sum^{n}_{k=1}b_{k}

積分記号

\int -> \int

\int^{b}_{a}f(x)dx = \int^{c}_{a}f(x)dx + \int^{b}_{c}f(x)dx ->

abf(x)dx=acf(x)dx+cbf(x)dx\int^{b}_{a}f(x)dx = \int^{c}_{a}f(x)dx + \int^{b}_{c}f(x)dx

省略記号

\ldots -> \ldots

\vdots -> \vdots

\cdots -> \cdots

\ddots -> \ddots

tex
\left( \begin{array}{rrcr}
1      & 2        & \cdots & n      \\
2      & 4        & \cdots & 2n     \\
\vdots & \vdots   & \ddots & \vdots \\
m      & m\cdot 2 & \cdots & m\cdot n 
\end{array} \right) \;\;\; (n , m = 0, 1, 2, \ldots)

->

(12n242nmm2mn)      (n,m=0,1,2,) \left( \begin{array}{rrcr} 1 & 2 & \cdots & n \\ 2 & 4 & \cdots & 2n \\ \vdots & \vdots & \ddots & \vdots \\ m & m\cdot 2 & \cdots & m\cdot n \end{array} \right) \;\;\; (n , m = 0, 1, 2, \ldots)

文字修飾記号

\vec{x} -> x\vec{x}

\hat{x} -> x^\hat{x}

\dot{x} -> x˙\dot{x}

\acute{x} -> xˊ\acute{x}

\check{x} -> xˇ\check{x}

\bar{x} -> xˉ\bar{x}

\tilde{x} -> x~\tilde{x}

\ddot{x} -> x¨\ddot{x}

\grave{x} -> xˋ\grave{x}

\breve{x} -> x˘\breve{x}

\vec{a} + \vec{b} + \vec{c} + \vec{d} + \vec{e} + \vec{f} -> a+b+c+d+e+f\vec{a} + \vec{b} + \vec{c} + \vec{d} + \vec{e} + \vec{f}

上線

\overline{A} \cup \overline{B} = \overline{A \cap B} -> AB=AB\overline{A} \cup \overline{B} = \overline{A \cap B}

否定記号

a \neq b -> aba \neq b

その他の数学記号

\log -> log\log

\sin -> sin\sin

\cos -> cos\cos

\tan -> tan\tan

\max -> max\max

\min -> min\min

\gcd -> gcd\gcd

\det -> det\det

\exp -> exp\exp

\ln -> ln\ln

\pm -> ±\pm

\mp -> \mp

\times -> ×\times

\div -> ÷\div

\ast -> \ast

\star -> \star

\circ -> \circ

\bullet -> \bullet

\cdot -> \cdot

\bigcirc -> \bigcirc

\setminus -> \setminus

\wr -> \wr

\in -> \in

\ni -> \ni

\cap -> \cap

\cup -> \cup

\vee -> \vee

\wedge -> \wedge

\subset -> \subset

\subseteq -> \subseteq

\supset -> \supset

\supseteq -> \supseteq

\oplus -> \oplus

\ominus -> \ominus

\otimes -> \otimes

\oslash -> \oslash

\leq -> \leq

\geq -> \geq

\ll -> \ll

\gg -> \gg

\neq -> \neq

\equiv -> \equiv

\sim -> \sim

\cong -> \cong

\propto -> \propto

\approx -> \approx

\parallel -> \parallel

\perp -> \perp

\emptyset -> \emptyset

\angle -> \angle

\langle -> \langle

\rangle -> \rangle

\lfloor -> \lfloor

\rfloor -> \rfloor

\lceil -> \lceil

\rceil -> \rceil

\infty -> \infty

\partial -> \partial

\prime -> \prime

\ell -> \ell

\imath -> ı\imath

\jmath -> ȷ\jmath

\surd -> \surd

\nabla -> \nabla

\forall -> \forall

\exists -> \exists

\neg -> ¬\neg

\backslash -> \\backslash

\prod -> \prod

\coprod -> \coprod

\dagger -> \dagger

\ddagger -> \ddagger

\aleph -> \aleph

\sharp -> \sharp

\flat -> \flat

\natural -> \natural

\triangleleft -> \triangleleft

\triangleright -> \triangleright

\bigtriangleup -> \bigtriangleup

\bigtriangledown -> \bigtriangledown

\triangle -> \triangle

\Box -> \Box

\Diamond -> \Diamond

\diamond -> \diamond

\clubsuit -> \clubsuit

\diamondsuit -> \diamondsuit

\heartsuit -> \heartsuit

\spadesuit -> \spadesuit

矢印記号

\leftarrow -> \leftarrow

\longleftarrow -> \longleftarrow

\uparrow -> \uparrow

\Leftarrow -> \Leftarrow

\Longleftarrow -> \Longleftarrow

\Uparrow -> \Uparrow

\rightarrow -> \rightarrow

\longrightarrow -> \longrightarrow

\downarrow -> \downarrow

\Rightarrow -> \Rightarrow

\Longrightarrow -> \Longrightarrow

\Downarrow -> \Downarrow

\leftrightarrow -> \leftrightarrow

\longleftrightarrow -> \longleftrightarrow

\updownarrow -> \updownarrow

\Leftrightarrow -> \Leftrightarrow

\Longleftrightarrow -> \Longleftrightarrow

\Updownarrow -> \Updownarrow

\mapsto -> \mapsto

\longmapsto -> \longmapsto

\nearrow -> \nearrow

\hookleftarrow -> \hookleftarrow

\hookrightarrow -> \hookrightarrow

\searrow -> \searrow

\leftharpoonup -> \leftharpoonup

\rightharpoonup -> \rightharpoonup

\swarrow -> \swarrow

\leftharpoondown -> \leftharpoondown

\rightharpoondown -> \rightharpoondown

\nwarrow -> \nwarrow

\rightleftharpoons -> \rightleftharpoons

基本的な数学記号

\int -> \int ->

\int

\int_{0}^{\infty} -> 0\int_{0}^{\infty} ->

0\int_{0}^{\infty}

\sum -> \sum ->

\sum

\sum_{n = 1}^{\infty} -> n=1\sum_{n = 1}^{\infty} ->

n=1\sum_{n = 1}^{\infty}

\lim -> lim\lim ->

lim\lim

\lim_{n \to -\infty} -> limn\lim_{n \to -\infty} ->

limn\lim_{n \to -\infty}

数式モードでの空白制御

a\;b -> a  ba\;b

a\:b -> aba\:b

a\,b -> aba\,b

a\!b -> a ⁣ba\!b

\int\int_{G}f(x,y)dxdy ->

Gf(x,y)dxdy\int\int_{G}f(x,y)dxdy

\int\!\!\!\int_{G}f(\,x,\,y\,)\;\,dx\:dy ->

 ⁣ ⁣ ⁣Gf(x,y)  dxdy\int\!\!\!\int_{G}f(\,x,\,y\,)\;\,dx\:dy

ギリシャ文字

\Gamma -> Γ\Gamma

\Delta -> Δ\Delta

\Theta -> Θ\Theta

\Lambda -> Λ\Lambda

\Xi -> Ξ\Xi

\Pi -> Π\Pi

\Sigma -> Σ\Sigma

\Upsilon -> Υ\Upsilon

\Phi -> Φ\Phi

\Psi -> Ψ\Psi

\Omega -> Ω\Omega

\alpha -> α\alpha

\beta -> β\beta

\gamma -> γ\gamma

\delta -> δ\delta

\epsilon -> ϵ\epsilon

\varepsilon -> ε\varepsilon

\zeta -> ζ\zeta

\eta -> η\eta

\theta -> θ\theta

\vartheta -> ϑ\vartheta

\iota -> ι\iota

\kappa -> κ\kappa

\lambda -> λ\lambda

\mu -> μ\mu

\nu -> ν\nu

\xi -> ξ\xi

\pi -> π\pi

\varpi -> ϖ\varpi

\rho -> ρ\rho

\varrho -> ϱ\varrho

\sigma -> σ\sigma

\varsigma -> ς\varsigma

\tau -> τ\tau

\upsilon -> υ\upsilon

\phi -> ϕ\phi

\varphi -> φ\varphi

\chi -> χ\chi

\psi -> ψ\psi

\omega -> ω\omega

大きさの変化する括弧,矢印記号

( \frac{x}{z} )^{2} + \left( \frac{y}{z} \right)^{2} = 1 ->

(xz)2+(yz)2=1( \frac{x}{z} )^{2} + \left( \frac{y}{z} \right)^{2} = 1

f(x) = \left\{ \frac{( x + 1 )( x + 2 )}{x}\right\} ->

f(x)={(x+1)(x+2)x}f(x) = \left\{ \frac{( x + 1 )( x + 2 )}{x}\right\}

行列を書く

tex
\left( \begin{array}{rr}
a & b \\ c & d
\end{array} \right) \left( \begin{array}{r}
x \\ y
\end{array} \right) = 0 \; \Longleftrightarrow \; \left\{
\begin{array}{rrrrr}
ax & + & by & = & 0 \\
cx & + & dy & = & 0
\end{array} \right.

->

(abcd)(xy)=0    {ax+by=0cx+dy=0\left( \begin{array}{rr} a & b \\ c & d \end{array} \right) \left( \begin{array}{r} x \\ y \end{array} \right) = 0 \; \Longleftrightarrow \; \left\{ \begin{array}{rrrrr} ax & + & by & = & 0 \\ cx & + & dy & = & 0 \end{array} \right.