Scissor LaTeX での amsmath
Scissor LaTeX では amsmath パッケージが動作します。align と gather は各行に番号を付け、\tag、\intertext、subequations、\numberwithin、\genfrac、split、cases、行列の環境、\DeclareMathOperator は LaTeX と同じように動作します。
パッケージの役割
amsmath はディスプレイ数式のための標準的な道具箱です。揃えた数式やまとめた数式の環境、括弧付きの行列、数式中の \text、より良い分数と二項係数、数式を参照する \eqref を追加します。
プリアンブルで \usepackage{amsmath} と書いて読み込みます。Scissor LaTeX ではこの行がなくてもほとんどのコマンドが動作しますが、文書が TeX のインストール環境でもコンパイルできるように残しておいてください。
ここで動作するもの
| コマンドまたは環境 | Scissor LaTeX では | 備考 |
|---|---|---|
equation, equation* | 動作する | 番号 1 つ、または番号なし。 |
align, align* | 動作する | |
gather, gather* | 動作する | |
multline, multline* | 動作する | |
flalign, alignat, eqnarray | 動作する | |
split, aligned, gathered | 動作する | equation や \[ ... \] の中で使います。 |
cases | 動作する | |
matrix, pmatrix, bmatrix, Bmatrix, vmatrix, Vmatrix, smallmatrix | 動作する | |
\text{...}, \operatorname{...} | 動作する | |
\DeclareMathOperator, \DeclareMathOperator* | 動作する | プリアンブルに書いてください。 |
\dfrac, \tfrac, \cfrac, \binom, \dbinom, \genfrac | 動作する | |
\boxed, \substack, \overset, \underset, \smash | 動作する | |
\xrightarrow[...]{...}, \xleftarrow[...]{...} | 動作する | |
\eqref, \label | 動作する | |
\nonumber, \notag | 動作する | |
\tag{...}, \tag*{...} | 動作する | |
\numberwithin, subequations | 動作する | |
\intertext, \shortintertext | 動作する | |
\iint, \iiint | 動作する | \iiiint と \idotsint は赤い数式になります。 |
例
等号で揃えた数式と、ブロックへの参照です。
\label と \eqref を使った align
\begin{align}
f(x) &= (x + 1)^2 \label{eq:square}\\
&= x^2 + 2x + 1
\end{align}
Expanding the square in \eqref{eq:square} gives three terms.cases と \text を使った場合分けの関数と、プリアンブルで宣言した演算子です。
cases、\text、\DeclareMathOperator
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\sgn}{sgn}
\begin{document}
\[
\sgn(x) =
\begin{cases}
1 & \text{if } x > 0,\\
0 & \text{if } x = 0,\\
-1 & \text{otherwise.}
\end{cases}
\]
\end{document}括弧の異なる行列と、split で分割した長い数式です。
行列と split
\[
A = \begin{pmatrix} 1 & 2 \\ 3 & 44 \end{pmatrix},\quad
B = \begin{bmatrix} a & b \\ c & d \end{bmatrix},\quad
\det A = \begin{vmatrix} 1 & 2 \\ 3 & 44 \end{vmatrix} = 38
\]
\begin{equation}
\begin{split}
(a + b)^3 &= (a + b)(a + b)^2 \\
&= a^3 + 3a^2 b + 3a b^2 + b^3
\end{split}
\end{equation}分数、二項係数、枠、積み重ねた添字です。
\dfrac、\binom、\boxed、\substack
\boxed{\, \sum_{\substack{0 \le i \le n \\ i \text{ even}}} \binom{n}{i} = 2^{n-1} \,}
\qquad
\dfrac{1}{1 + \cfrac{1}{2 + \cfrac{1}{3}}}
\qquad
A \xrightarrow{\;f\;} B\intertext は align の行の間に 1 行のテキストを入れます。
2 つの行の間の \intertext
\begin{align}
x &= 44 \intertext{and therefore}
y &= 2x
\end{align}互換性
- TeX のインストール環境からここへ: 文書は同じ番号で組版されます。上で非対応と記した少数のコマンドだけが赤い数式になります。
- ここから TeX のインストール環境へ: 文書はそのまま変更なしでコンパイルできます。
完全なマニュアルは CTAN にあります:ctan.org/pkg/amsmath。段階的な入門は数式、揃え、番号付けと行列をご覧ください。
よくある質問
align の各行に個別の番号が付きますか?
はい、TeX のインストール環境と同じです。番号を付けない行には \nonumber または \notag を書いてください。
\tag で数式に独自のラベルを付けられますか?
はい。\tag{A} は番号の代わりに (A) を表示し、そのラベルへの \eqref はタグを出力します。
\DeclareMathOperator には対応していますか?
はい。TeX のインストール環境と同じようにプリアンブルで演算子を宣言し、\sin のように使ってください。スター付きの形では、ディスプレイ数式で添字が名前の下に置かれます。
このページの例はすべて、サイトのビルド時に Scissor LaTeX で組版されています。 最終更新:2026-11-07