MediaWikiの設定 - 数式
概要
MediaWikiでは、LaTeXやAMS-LaTeXの拡張機能を含んだTEXマークアップを利用して数式を記述することができる。
数式は、個人設定と数式の複雑さによって、PNG形式の画像かHTMLのテキストのどちらかの形式で表示される。
より正確には、MediaWikiはマークアップをTexvcに通し、順番にコマンドをTEXに渡して、実際のレンダリングが行われるといった流れになっている。
このように、完全なTEXの言語の限られた部分がサポートされている。
数式を描画させるには、 LocalSettings.phpファイルで$wgUseTeX = true;と設定する必要がある。
このページよりも更に詳細を知る必要がある場合、https://meta.wikimedia.org/wiki/Help:Displaying_a_formula を参照すること。
文字
- \text
- <math>\text {abcdefghijklmnopqrstuvwxyzàáâãäåæçčďèéěêëìíîïňñòóôõöřšť÷øùúůûüýÿž}</math>
- <math>\text {abcdefghijklmnopqrstuvwxyzàáâãäåæçčèéêëìíîïñòóôõö÷øùúûüýÿ}\,</math>
\textよりも\mboxの方が、より多くの文字種を扱えうことができる。
ただし、\mbox{ð}や\mbox{þ}はエラーになるので、文字種によっては\textを使用する。
- \mbox
- <math>\mbox {abcdefghijklmnopqrstuvwxyzàáâãäåæçčďèéěêëìíîïňñòóôõöřšť÷øùúůûüýÿž}</math>
- <math>\mbox {abcdefghijklmnopqrstuvwxyzàáâãäåæçčèéêëìíîïñòóôõö÷øùúûüýÿ}\,</math>
特殊文字
以下の記号は、LaTeXにおいて特別な意味を持ち、全てのフォントで利用不可能な予約文字である。
- $ % ^ & _ { } ~ \
これらの予約文字は、直前にエスケープシーケンスを付けることで表示できる。
<math>\# \$ \% \& \_ \{ \}</math>は、構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \# \$ \% \& \_ \{ \}}
と表示される。
また、他の予約文字は、エスケープシーケンスに記号名を記述することで表示できる。
<math>\hat{} \quad \tilde{} \quad \backslash</math>は、構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \hat{} \quad \tilde{} \quad \backslash}
と表示される。
アルファベット(太字)
| TEX構文 | レンダリング |
|---|---|
| \mathbf{A} \mathbf{B} \mathbf{C} \mathbf{D} \mathbf{E} \mathbf{F} \mathbf{G} \mathbf{H} \mathbf{I} \mathbf{J} \mathbf{K} \mathbf{L} \mathbf{M} \mathbf{N} \mathbf{O} \mathbf{P} \mathbf{Q} \mathbf{R} \mathbf{S} \mathbf{T} \mathbf{U} \mathbf{V} \mathbf{W} \mathbf{X} \mathbf{Y} \mathbf{Z} |
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \mathbf{A} \mathbf{B} \mathbf{C} \mathbf{D} \mathbf{E} \mathbf{F} \mathbf{G}}
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \mathbf{H} \mathbf{I} \mathbf{J} \mathbf{K} \mathbf{L} \mathbf{M} \mathbf{N}} 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \mathbf{O} \mathbf{P} \mathbf{Q} \mathbf{R} \mathbf{S} \mathbf{T} \mathbf{U}} 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \mathbf{V} \mathbf{W} \mathbf{X} \mathbf{Y} \mathbf{Z}} |
| \mathbf{a} \mathbf{b} \mathbf{c} \mathbf{d} \mathbf{e} \mathbf{f} \mathbf{g} \mathbf{h} \mathbf{i} \mathbf{j} \mathbf{k} \mathbf{l} \mathbf{m} \mathbf{n} \mathbf{o} \mathbf{p} \mathbf{q} \mathbf{r} \mathbf{s} \mathbf{t} \mathbf{u} \mathbf{v} \mathbf{w} \mathbf{x} \mathbf{y} \mathbf{z} |
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \mathbf{a} \mathbf{b} \mathbf{c} \mathbf{d} \mathbf{e} \mathbf{f} \mathbf{g}}
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \mathbf{h} \mathbf{i} \mathbf{j} \mathbf{k} \mathbf{l} \mathbf{m} \mathbf{n}} 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \mathbf{o} \mathbf{p} \mathbf{q} \mathbf{r} \mathbf{s} \mathbf{t} \mathbf{u}} 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \mathbf{v} \mathbf{w} \mathbf{x} \mathbf{y} \mathbf{z}} |
ギリシャ文字
| TEX構文 | レンダリング |
|---|---|
| &alpha &beta &gamma &delta &epsilon &zeta &eta &theta &iota &kappa &lambda &mu &nu &xi &omicron &pi &rho &sigma &sigmaf &tau &upsilon &phi &chi &psi &omega &Gamma &Delta &Theta &Lambda &Xi &Pi &Sigma &Phi &Psi &Omega |
α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ ς τ υ φ χ ψ ω Γ Δ Θ Λ Ξ Π Σ Φ Ψ Ω |
| \Alpha \Beta \Gamma \Delta \Epsilon \Zeta \Eta \Theta \Iota \Kappa \Lambda \Mu \Nu \Xi \Omicron \Pi \Rho \Sigma \Tau \Upsilon \Phi \Chi \Psi \Omega |
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \Alpha \Beta \Gamma \Delta \Epsilon \Zeta}
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \Eta \Theta \Iota \Kappa \Lambda \Mu} 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \Nu \Xi \Omicron \Pi \Rho \Sigma \Tau} 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \Upsilon \Phi \Chi \Psi \Omega} |
数学記号
よく使用される記号
| TEX構文 | レンダリング |
|---|---|
| &int &sum &prod &radic &minus ± &infty &asymp &prop = &equiv &ne &le &ge × &sdot ÷ &part &prime &Prime &nabla &permil ° &there4 Ø ø &isin ¬in &cap &cup &sub &sup &sube &supe ¬ &and &or &exist &forall &rArr &hArr &rarr &harr &uarr &alefsym - &ndash &mdash |
∫ ∑ ∏ √ − ± ∞ ≈ ∝ = ≡ ≠ ≤ ≥ × ⋅ ÷ ∂ ′ ″ ∇ ‰ ° ∴ Ø ø ∈ ∉ ∩ ∪ ⊂ ⊃ ⊆ ⊇ ¬ ∧ ∨ ∃ ∀ ⇒ ⇔ → ↔ ↑ ℵ - – — |
アクセント記号・分音符号
| TEX構文 | レンダリング |
|---|---|
| \acute{a} \grave{a} \hat{a} \tilde{a} \breve{a} | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \acute{a} \grave{a} \hat{a} \tilde{a} \breve{a}} |
| \check{a} \bar{a} \ddot{a} \dot{a} | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \check{a} \bar{a} \ddot{a} \dot{a}} |
関数
| TEX構文 | レンダリング |
|---|---|
| \sin a \cos b \tan c | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \sin a \cos b \tan c} |
| \sec d \csc e \cot f | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \sec d \csc e \cot f} |
| \arcsin h \arccos i \arctan j | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \arcsin h \arccos i \arctan j} |
| \sinh k \cosh l \tanh m \coth n | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \sinh k \cosh l \tanh m \coth n} |
| \operatorname{sh}o \operatorname{ch}p \operatorname{th}q | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \operatorname{sh}o \operatorname{ch}p \operatorname{th}q} |
| \operatorname{arsinh}r \operatorname{arcosh}s \operatorname{artanh}t | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \operatorname{arsinh}r \operatorname{arcosh}s \operatorname{artanh}t} |
| \lim u \limsup v \liminf w \min x \max y | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \lim u \limsup v \liminf w \min x \max y} |
| \inf z \sup a \exp b \ln c \lg d \log e \log_{10} f \ker g | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \inf z \sup a \exp b \ln c \lg d \log e \log_{10} f \ker g} |
| \deg h \gcd i \Pr j \det k \hom l \arg m \dim n | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \deg h \gcd i \Pr j \det k \hom l \arg m \dim n} |
モジュロ演算
| TEX構文 | レンダリング |
|---|---|
| s_k \equiv 0 \pmod{m} | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle s_k \equiv 0 \pmod{m}} |
| a \bmod b | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle a \bmod b} |
導関数
| TEX構文 | レンダリング |
|---|---|
| \nabla \partial x dx \dot x \ddot y dy/dx \frac{dy}{dx} \frac{\partial^2 y}{\partial x_1 \partial x_2} | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \nabla \partial x dx \dot x \ddot y dy/dx \frac{dy}{dx} \frac{\partial^2 y}{\partial x_1 \partial x_2}} |
集合
| TEX構文 | レンダリング |
|---|---|
| \forall \exists \empty \emptyset \varnothing | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \forall \exists \empty \emptyset \varnothing} |
| \in \ni \not \in \notin \subset \subseteq \supset \supseteq | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \in \ni \not \in \notin \subset \subseteq \supset \supseteq} |
| \cap \bigcap \cup \bigcup \biguplus \setminus \smallsetminus | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \cap \bigcap \cup \bigcup \biguplus \setminus \smallsetminus} |
| \sqsubset \sqsubseteq \sqsupset \sqsupseteq \sqcap \sqcup \bigsqcup | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \sqsubset \sqsubseteq \sqsupset \sqsupseteq \sqcap \sqcup \bigsqcup} |
演算子
| TEX構文 | レンダリング |
|---|---|
| + \oplus \bigoplus \pm \mp - | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle + \oplus \bigoplus \pm \mp -} |
| \times \otimes \bigotimes \cdot \circ \bullet \bigodot | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \times \otimes \bigotimes \cdot \circ \bullet \bigodot} |
| \star * / \div \frac{1}{2} | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \star * / \div \frac{1}{2}} |
論理演算子
| TEX構文 | レンダリング |
|---|---|
| \land \wedge \bigwedge \bar{q} \to p | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \land \wedge \bigwedge \bar{q} \to p} |
| \lor \vee \bigvee \lnot \neg q \And | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \lor \vee \bigvee \lnot \neg q \And} |
冪根
| TEX構文 | レンダリング |
|---|---|
| \sqrt{2} \sqrt[n]{x} | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \sqrt{2} \sqrt[n]{x}} |
関係演算子
| TEX構文 | レンダリング |
|---|---|
| \sim \approx \simeq \cong \dot= \overset{\underset{\mathrm{def}}{}}{=} | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \sim \approx \simeq \cong \dot= \overset{\underset{\mathrm{def}}{}}{=}} |
| < \le \ll \gg \ge > \equiv \not\equiv \ne \mbox{or} \neq \propto | <mat>< \le \ll \gg \ge > \equiv \not\equiv \ne \mbox{or} \neq \propto</ath> |
| \lessapprox \lesssim \eqslantless \leqslant \leqq \geqq \geqslant \eqslantgtr \gtrsim \gtrapprox | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \lessapprox \lesssim \eqslantless \leqslant \leqq \geqq \geqslant \eqslantgtr \gtrsim \gtrapprox} |
幾何学記号
| TEX構文 | レンダリング |
|---|---|
| 45^\circ | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \Diamond \Box \triangle \angle \perp \mid \nmid \| 45^\circ} |
その他記号
| TEX構文 | レンダリング |
|---|---|
| \eqslantless \lessapprox \approxeq \lessdot \lll \lessgtr \lesseqgtr \lesseqqgtr \doteqdot \risingdotseq | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \eqslantless \lessapprox \approxeq \lessdot \lll \lessgtr \lesseqgtr \lesseqqgtr \doteqdot \risingdotseq} |
| \fallingdotseq \backsim \backsimeq \subseteqq \Subset \preccurlyeq \curlyeqprec \precsim \precapprox \vartriangleleft | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \fallingdotseq \backsim \backsimeq \subseteqq \Subset \preccurlyeq \curlyeqprec \precsim \precapprox \vartriangleleft} |
| \ggg \gtrless \gtreqless \gtreqqless \eqcirc \circeq \triangleq \thicksim \thickapprox \supseteqq | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \ggg \gtrless \gtreqless \gtreqqless \eqcirc \circeq \triangleq \thicksim \thickapprox \supseteqq} |
| \varpropto \blacktriangleleft \therefore \backepsilon \blacktriangleright \because \nleqslant \nleqq \lneq \lneqq | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \varpropto \blacktriangleleft \therefore \backepsilon \blacktriangleright \because \nleqslant \nleqq \lneq \lneqq} |
| \subsetneq \nsupseteqq \varsupsetneq \supsetneqq \varsupsetneqq | 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \subsetneq \nsupseteqq \varsupsetneq \supsetneqq \varsupsetneqq} |