LaTeX記法メモ

最近LaTeXを使い始めたので、利便性のためにコマンドをまとめておく。
ほとんどはこちらwikibooksから転載させていただきました。

必要なpackage

packageの入れ方:\documentclass以後\begin{document}以前に\usepackage{パッケージ名}を書くことでpackageを使える。

  • mathtools…ないと話にならない
  • amsfonts…mathbbとかに必要っぽい
  • bm…数式の中で太字にするために必要

マークアップの始め方

  • インラインなら$$で囲む。(例:$e^x$)
  • 独立した行とするなら\ begin{equation}と\ end{equation}(スペースなし)で囲む

書式系

コマンド出力
\mathbb{N}\(\mathbb{N}\)
\mathcal{N}\(\mathcal{N}\)
\mathrm{x}\(\mathrm{x}\)
\underline{x}\(\underline{x}\)
\overline{x}\(\overline{x}\)
\underbrace{x}\(\underbrace{x}\)
\overbrace{x}\(\overbrace{x}\)
\bm\(u\) ※太字

数式

コマンド出力
\frac{a}{b}\(\frac{a}{b}\)
e^{2x}\(e^{2x}\)
\exp x\(\exp x\)
\sqrt{x}\(\sqrt{x}\)
\sqrt[n]{x}\(\sqrt[n]{x}\)
\log x\(\log x\)
\log_a x\(\log_a x\)
\ln x\(\ln x\)
|x|\(|x|\)
\lim_{n \to \infty}\(\lim_{n \to \infty}\)
\limsup_{n \to \infty}\(\limsup_{n \to \infty}\)
\liminf_{n \to \infty}\(\liminf_{n \to \infty}\)

三角関数

コマンド出力
\sin x\(\sin x\)
\cos x\(\cos x\)
\tan x\(\tan x\)
\csc x\(\csc x\)
\sec x\(\sec x\)
\cot x\(\cot x\)
\arcsin x\(\arcsin x\)
\arccos x\(\arccos x\)
\arctan x\(\arctan x\)
\sinh x\(\sinh x\)
\cosh x\(\cosh x\)
\tanh x\(\tanh x\)

演算子

コマンド出力
\sum_{i=1}^{N}\(\sum_{i=1}^{N}\)
\prod_{i=1}^{N}\(\prod_{i=1}^{N}\)
\int_{a}^{b}\(\int_{a}^{b}\)
\iint_{a}^{b}\(\iint_{a}^{b}\)
\iiint_{a}^{b}\(\iiint_{a}^{b}\)

ベクトル

コマンド出力
\vec{x}\(\vec{x}\)
\overrightarrow{x}\(\overrightarrow{x}\)
\hat{x}\(\hat{x}\)

行列

コマンド出力
\ begin{matrix}
1 & 2 \\
3 & 4
\ end{matrix}
\(\begin{matrix}
1 & 2 \\
3 & 4
\end{matrix}\)
\ begin{pmatrix}
1 & 2 \\
3 & 4
\ end{pmatrix}
\(\begin{pmatrix}
1 & 2 \\
3 & 4
\end{pmatrix}\)
\ begin{bmatrix}
1 & 2 \\
3 & 4
\ end{bmatrix}
\(\begin{bmatrix}
1 & 2 \\
3 & 4
\end{bmatrix}\)
\ begin{vmatrix}
1 & 2 \\
3 & 4
\ end{vmatrix}
\(\begin{vmatrix}
1 & 2 \\
3 & 4
\end{vmatrix}\)
\ begin{Bmatrix}
1 & 2 \\
3 & 4
\ end{Bmatrix}
\(\begin{Bmatrix}
1 & 2 \\
3 & 4
\end{Bmatrix}\)
\ begin{Vmatrix}
1 & 2 \\
3 & 4
\ end{Vmatrix}
\(\begin{Vmatrix}
1 & 2 \\
3 & 4
\end{Vmatrix}\)
ソース

組み合わせ

コマンド出力
{}_nC_r\({}_nC_r\)
{}_nH_r\({}_nH_r\)
{}_nP_r\({}_nP_r\)

記号

各種記号

コマンド出力
\partial\(\partial\)
\nabla\(\nabla\)
=\(=\)
+\(+\)
\(–\)
\times\(\times\)
\div\(\div\)
\pm\(\pm\)
\mp\(\mp\)
\neq\(\neq\)
\sim\(\sim\)
\simeq\(\simeq\)
\equiv\(\equiv\)
>\(>\)
<\(<\)
\geq\(\geq\)
\leq\(\leq\)
\gg\(\gg\)
\ll\(\ll\)
\preceq\(\preceq\)
\succeq\(\succeq\)
\oplus\(\oplus\)
\ominus\(\ominus\)
\otimes\(\otimes\)
\oslash\(\oslash\)
\circ\(\circ\)
\cdot\(\cdot\)
\cdots\(\cdots\)
\ldots\(\ldots\)
\vdots\(\vdots\)
\ddots\(\ddots\)
\bullet\(\bullet\)
\mid\(\mid\)
\emptyset\(\emptyset\)
\infty\(\infty\)
\not\in\(\not\in\)

集合と論理

コマンド出力
\exists\(\exists\)
\forall\(\forall\)
\in\(\in\)
\ni\(\ni\)
\subset\(\subset\)
\supset\(\supset\)
\subseteq\(\subseteq\)
\supseteq\(\supseteq\)
\cup\(\cup\)
\cap\(\cap\)
\bigcup_{k}{A_k}\(\bigcup_{k}{A_k}\)
\bigcap_{k}{A_k}\(\bigcap_{k}{A_k}\)
\bigcup_{k=1}^{n}{A_k}\(\bigcup_{k=1}^{n}{A_k}\)
\bigcap_{k=1}^{n}{A_k}\(\bigcap_{k=1}^{n}{A_k}\)

矢印

コマンド出力
\leftarrow\(\leftarrow\)
\rightarrow\(\rightarrow\)
\Leftarrow\(\Leftarrow\)
\Rightarrow\(\Rightarrow\)
\leftrightrarrow\(\leftrightarrow\)
\Leftrightarrow\(\Leftrightarrow\)
\mapsto\(\mapsto\)
ソース

ギリシャ文字

コマンド出力コマンド出力
A\(A\)\alpha\(\alpha\)
B\(B\)\beta\(\beta\)
\Gamma\(\Gamma\)\gamma\(\gamma\)
\Delta\(\Delta\)\delta\(\delta\)
E\(E\)\epsilon\(\epsilon\)
Z\(Z\)\zeta\(\zeta\)
H\(H\)\eta\(\eta\)
\Theta\(\Theta\)\theta\(\theta\)
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\)
P\(P\)\rho\(\rho\)
\Sigma\(\Sigma\)\sigma\(\sigma\)
T\(T\)\tau\(\tau\)
\Upsilon\(\Upsilon\)\upsilon\(\upsilon\)
\Phi\(\Phi\)\phi\(\phi\)
X\(X\)\chi\(\chi\)
\Psi\(\Psi\)\psi\(\psi\)
\Omega\(\Omega\)\omega\(\omega\)

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です