「MediaWikiの設定 - 数式」の版間の差分
ナビゲーションに移動
検索に移動
(ページの作成:「== 概要 == MediaWikiでは、LaTeXやAMS-LaTeXの拡張機能を含んだTEXマークアップを利用して数式を記述することができる。<br> 数式は、…」) |
(→関数) |
||
92行目: | 92行目: | ||
</center> | </center> | ||
<br> | <br> | ||
===== モジュロ演算 ===== | |||
<center> | |||
{| class="wikitable" | |||
|- | |||
! TEX構文 !! レンダリング | |||
|- | |||
| s_k \equiv 0 \pmod{m} || <math>s_k \equiv 0 \pmod{m}</math> | |||
|- | |||
| a \bmod b || <math>a \bmod b</math> | |||
|} | |||
</center> | |||
<br> | |||
===== 導関数 ===== | |||
<center> | |||
{| class="wikitable" | |||
|- | |||
! TEX構文 !! レンダリング | |||
|- | |||
| \nabla \partial x dx \dot x \ddot y dy/dx \frac{dy}{dx} \frac{\partial^2 y}{\partial x_1 \partial x_2} || <math>\nabla \partial x dx \dot x \ddot y dy/dx \frac{dy}{dx} \frac{\partial^2 y}{\partial x_1 \partial x_2}</math> | |||
|} | |||
</center> | |||
<br> | |||
===== 集合 ===== | |||
<center> | |||
{| class="wikitable" | |||
|- | |||
! TEX構文 !! レンダリング | |||
|- | |||
| \forall \exists \empty \emptyset \varnothing || <math>\forall \exists \empty \emptyset \varnothing</math> | |||
|- | |||
| \in \ni \not \in \notin \subset \subseteq \supset \supseteq || <math>\in \ni \not \in \notin \subset \subseteq \supset \supseteq</math> | |||
|- | |||
| \cap \bigcap \cup \bigcup \biguplus \setminus \smallsetminus || <math>\cap \bigcap \cup \bigcup \biguplus \setminus \smallsetminus</math> | |||
|- | |||
| \sqsubset \sqsubseteq \sqsupset \sqsupseteq \sqcap \sqcup \bigsqcup || <math>\sqsubset \sqsubseteq \sqsupset \sqsupseteq \sqcap \sqcup \bigsqcup</math> | |||
|} | |||
</center> | |||
<br> | |||
===== 演算子 ===== | |||
<center> | |||
{| class="wikitable" | |||
|- | |||
! TEX構文 !! レンダリング | |||
|- | |||
| + \oplus \bigoplus \pm \mp - || <math>+ \oplus \bigoplus \pm \mp -</math> | |||
|- | |||
| \times \otimes \bigotimes \cdot \circ \bullet \bigodot || <math>\times \otimes \bigotimes \cdot \circ \bullet \bigodot</math> | |||
|- | |||
| \star * / \div \frac{1}{2} || <math>\star * / \div \frac{1}{2}</math> | |||
|} | |||
</center> | |||
<br> | |||
2020年8月2日 (日) 10:33時点における版
概要
MediaWikiでは、LaTeXやAMS-LaTeXの拡張機能を含んだTEXマークアップを利用して数式を記述することができる。
数式は、個人設定と数式の複雑さによって、PNG形式の画像かHTMLのテキストのどちらかの形式で表示される。
より正確には、MediaWikiはマークアップをTexvcに通し、順番にコマンドをTEXに渡して、実際のレンダリングが行われるといった流れになっている。
このように、完全なTEXの言語の限られた部分がサポートされている。
数式を描画させるには、 LocalSettings.phpファイルで$wgUseTeX = true;
と設定する必要がある。
文字
- \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>は、と表示される。
また、他の予約文字は、エスケープシーケンスに記号名を記述することで表示できる。
<math>\hat{} \quad \tilde{} \quad \backslash</math>は、と表示される。
ギリシャ文字
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 |
α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ ς τ υ φ χ ψ ω Γ Δ Θ Λ Ξ Π Σ Φ Ψ Ω |
数学記号
よく使用される記号
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} | |
\check{a} \bar{a} \ddot{a} \dot{a} |
関数
TEX構文 | レンダリング |
---|---|
\sin a \cos b \tan c | |
\sec d \csc e \cot f | |
\arcsin h \arccos i \arctan j | |
\sinh k \cosh l \tanh m \coth n | |
\operatorname{sh}o \operatorname{ch}p \operatorname{th}q | |
\operatorname{arsinh}r \operatorname{arcosh}s \operatorname{artanh}t | |
\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 | |
\deg h \gcd i \Pr j \det k \hom l \arg m \dim n |
モジュロ演算
TEX構文 | レンダリング |
---|---|
s_k \equiv 0 \pmod{m} | |
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} |
集合
TEX構文 | レンダリング |
---|---|
\forall \exists \empty \emptyset \varnothing | |
\in \ni \not \in \notin \subset \subseteq \supset \supseteq | |
\cap \bigcap \cup \bigcup \biguplus \setminus \smallsetminus | |
\sqsubset \sqsubseteq \sqsupset \sqsupseteq \sqcap \sqcup \bigsqcup |
演算子
TEX構文 | レンダリング |
---|---|
+ \oplus \bigoplus \pm \mp - | |
\times \otimes \bigotimes \cdot \circ \bullet \bigodot | |
\star * / \div \frac{1}{2} |