Довідка:Математичні формули та спецсимволи
TeX
MediaWiki використовує розмітку TeX для математичних формул. Вона генерує або зображення у форматі PNG або простий код HTML, залежно від вподобань користувача та складності самих виразів. Зі зростом функціональності оглядачів, генеруватиметься розширений код HTML або навіть MathML.
Математична розмітка розміщується всередині елементу <math> ... </math>, панель редагування відразу над вікном редагування має окрему кнопку для цього.
PNG-зображення є чорно-білими (не прозорими). Ці кольори незалежать від установок браузера чи css. Розмір шрифту та його тип часто можуть відрізнятися від використовуваного в самому тексті. css селектор зображення — img.tex.
У випадку не білого фону, білий фон формул буде його підкреслювати, що може бути як недоліком так і перевагою.
Слід уникати використання розмітки TeX в звичайному тексті, оскільки, як було зазначено, формула не буде правильно вирівняна та шрифти не збігатимуться.
Атрибут alt зображень TeX (текст що з'являється коли переглядаються параметри зображення) є власне його віктекст, без <math> і </math>.
Обговорення, повідомлення про похибки та запити на розширення функціональності розміщуйте в списку розсилки Wikitech-l. Також можна їх розмістити в Mediazilla в категорії MediaWiki extensions.
Вступ
Пробіли та перехід на новий рядок ігноруються. За винятком функцій та операторів, як це прийнято в математиці для змінних, використовуються прописні літери але не цифри. Для іншого тексту, щоб уникнути прописного написання як для змінних, використовуйте \mbox: <math>\mbox{abc}</math> дасть [math]\displaystyle{ \mbox{abc} }[/math]
Щоб вікітекст залишався легкочитним, розміщуйте кожен доданок, множник чи рядок в матриці на окремому рядку.
Функції, символи та спеціальні символи
Як отримати спеціальні символи не використовуючи математичну розмітку, див. Довідка:Спецсимволи.
Порівняння:
- α дає α, <math>\alpha</math> дасть [math]\displaystyle{ \alpha }[/math] (використовуються «&» і «;» замість «\», в цьому випадку такий самий код для «alpha»)
- √2 дасть √2, <math>\sqrt{2}</math> дасть [math]\displaystyle{ \sqrt{2} }[/math] (різниця така ж сама як у попередньому прикладі, але використовується інше кодове слово, «radic» замість «sqrt»; в фігурних дужках TeX)
- √(1-''e''²) дасть √(1-e²), <math>\sqrt{1-e^2}</math> дасть [math]\displaystyle{ \sqrt{1-e^2} }[/math] (дужки замість фігурних дужок, «''e''» замість «e», «²» замість «²»)
| Функціональність | Синтаксис | Як це виглядає на екрані |
|---|---|---|
| Наголоси/Діакритичні знаки | \acute{a} \quad \grave{a} \quad \breve{a} \quad \check{a} \quad \tilde{a} | [math]\displaystyle{ \acute{a} \quad \grave{a} \quad \breve{a} \quad \check{a} \quad \tilde{a} }[/math] |
| Стандартні функції (правильно написані) | \sin x + \ln y +\operatorname{sgn} z \sin a \ \cos b \ \tan c \ \cot d \ \sec e \ \csc f |
[math]\displaystyle{ \sin x + \ln y +\operatorname{sgn} z }[/math] [math]\displaystyle{ \sin a \ \cos b \ \tan c \ \cot d \ \sec e \ \csc f }[/math] |
| Стандартні функції (помилково написані) | sin x + ln y + sgn z | [math]\displaystyle{ sin x + ln y + sgn z\,\! }[/math] |
| Модульна арифметика | s_k \equiv 0 \pmod{m} a \bmod b |
[math]\displaystyle{ s_k \equiv 0 \pmod{m} }[/math] [math]\displaystyle{ a \bmod b\,\! }[/math] |
| Похідні | \nabla \; \partial x \; dx \; \dot x \; \ddot y | [math]\displaystyle{ \nabla \; \partial x \; dx \; \dot x \; \ddot y }[/math] |
| Множини (Квадратні символи можуть не працювати для деяких Вікі) |
\forall \; \exists \; \empty \; \emptyset \; \varnothing \in \ni \not\in \notin \subset \subseteq \supset \supseteq \cap \bigcap \cup \bigcup \biguplus |
[math]\displaystyle{ \forall \; \exists \; \empty \; \emptyset \; \varnothing \in \ni \not\in \notin }[/math] [math]\displaystyle{ \subset \subseteq \supset \supseteq \cap \bigcap \cup \bigcup \biguplus }[/math] |
| \sqsubset \sqsubseteq \sqsupset \sqsupseteq \sqcap \sqcup \bigsqcup | [math]\displaystyle{ \sqsubset \sqsubseteq \sqsupset \sqsupseteq \sqcap \sqcup \bigsqcup }[/math] | |
| Логіка | p \land \wedge \; \bigwedge \; \bar{q} \to p \lor \vee \; \bigvee \; \lnot \; \neg q \; \setminus \; \smallsetminus | [math]\displaystyle{ p \land \wedge \; \bigwedge \; \bar{q} \to p \lor \vee \; \bigvee \; \lnot \; \neg q \; \setminus \; \smallsetminus }[/math] |
| Корені | \sqrt{2}\approx 1.4 | [math]\displaystyle{ \sqrt{2}\approx 1.4 }[/math] |
| \sqrt[n]{x} | [math]\displaystyle{ \sqrt[n]{x} }[/math] | |
| Відношення | \ll \; \gg \; sim \; \approx \; \simeq \; \cong \; \le \; \ge \; \equiv \; \not\equiv \; \ne \; \propto \; \pm \; \mp | [math]\displaystyle{ \ll \; \gg \; \sim \; \approx \; \simeq \; \cong \; \le \; \ge \; \equiv \; \not\equiv \; \ne \; \propto \; \pm \; \mp }[/math] |
| Геометричні | \Diamond \; \Box \; \triangle \; \angle \; \perp \; \mid \; \nmid \; \| \; 45^\circ | [math]\displaystyle{ \Diamond \; \Box \; \triangle \; \angle \; \perp \; \mid \; \nmid \; \| \; 45^\circ }[/math] |
| Стрілки (можуть не працювати для деяких Вікі) |
\leftarrow \; \gets \; \rightarrow \; \to \; \leftrightarrow \longleftarrow \; \longrightarrow |
[math]\displaystyle{ \leftarrow \; \gets \; \rightarrow \; \to \; \leftrightarrow }[/math] [math]\displaystyle{ \longleftarrow \; \longrightarrow }[/math] |
| \rightharpoonup \; \rightharpoondown \; \leftharpoonup \; \leftharpoondown \; \upharpoonleft \; \upharpoonright \; \downharpoonleft \; \downharpoonright | [math]\displaystyle{ \rightharpoonup \; \rightharpoondown \; \leftharpoonup \; \leftharpoondown \; \upharpoonleft \; \upharpoonright \; \downharpoonleft \; \downharpoonright }[/math] | |
| \Leftarrow \; \Rightarrow \; \Leftrightarrow \Longleftarrow \; \Longrightarrow \; \Longleftrightarrow (or \iff) |
[math]\displaystyle{ \Leftarrow \; \Rightarrow \; \Leftrightarrow }[/math] [math]\displaystyle{ \Longleftarrow \; \Longrightarrow \; \Longleftrightarrow (or \iff) }[/math] | |
| Спеціальні | \eth \; \S \; \P \; \% \; \dagger \; \ddagger \; \star \; * \; \ldots \smile \frown \wr \oplus \bigoplus \otimes \bigotimes |
[math]\displaystyle{ \eth \; \S \; \P \; \% \; \dagger \; \ddagger \; \star \; * \; \ldots }[/math] [math]\displaystyle{ \smile \frown \wr \oplus \bigoplus \otimes \bigotimes }[/math] |
| Нижній регістр\mathcal екстра символи | \mathcal {45abcdenpqstuvwx} | [math]\displaystyle{ \mathcal {45abcdenpqstuvwx} }[/math] |
Нижні, верхні індекси та інтеграли
| Функціональність | Синтаксис | Як це виглядає на екрані | |
|---|---|---|---|
| HTML | PNG | ||
| верхні індекси | a^2 | [math]\displaystyle{ a^2 }[/math] | [math]\displaystyle{ a^2 \,\! }[/math] |
| нижні індекси | a_2 | [math]\displaystyle{ a_2 }[/math] | [math]\displaystyle{ a_2 \,\! }[/math] |
| Групування | a^{2+2} | [math]\displaystyle{ a^{2+2} }[/math] | [math]\displaystyle{ a^{2+2}\,\! }[/math] |
| a_{i, j} | [math]\displaystyle{ a_{i,j} }[/math] | [math]\displaystyle{ a_{i,j}\,\! }[/math] | |
| Комбінування нижніх та верхніх регістрів | x_2^3 | [math]\displaystyle{ x_2^3 }[/math] | |
| Слідування верхніх і нижніх | {}_1^2\!X_3^4 | [math]\displaystyle{ {}_1^2\!X_3^4 }[/math] | |
| Похідні (правильно) | x', y'' | [math]\displaystyle{ x', y'' }[/math] | [math]\displaystyle{ x', y''\,\! }[/math] |
| Похідні (неправильні в форматі HTML) | x^\prime, y^{\prime\prime} | [math]\displaystyle{ x^\prime, y^{\prime\prime} }[/math] | [math]\displaystyle{ x^\prime, y^{\prime\prime}\,\! }[/math] |
| Похідні (неправильні в форматі PNG) | x\prime, y\prime\prime | [math]\displaystyle{ x\prime, y\prime\prime }[/math] | [math]\displaystyle{ x\prime, y\prime\prime\,\! }[/math] |
| Похідні точки | \dot{x}, \ddot{x} | [math]\displaystyle{ \dot{x}, \ddot{x} }[/math] | |
| Підкреслення, надкреслення, вектори | \hat a \ \bar b \ \vec c \ \overrightarrow{a b} \ \overleftarrow{c d} \ \widehat{d e f} \ \overline{g h i} \ \underline{j k l} | [math]\displaystyle{ \hat a \ \bar b \ \vec c \ \overrightarrow{a b} \ \overleftarrow{c d} \ \widehat{d e f} \ \overline{g h i} \ \underline{j k l} }[/math] | |
| Наддужки |
\begin{matrix} 5050 \\ \overbrace{ 1+2+\cdots+100 } \end{matrix} |
[math]\displaystyle{ \begin{matrix} 5050 \\ \overbrace{ 1+2+\cdots+100 } \end{matrix} }[/math] |
|
| Піддужки |
\begin{matrix} \underbrace{ a+b+\cdots+z } \\ 26 \end{matrix} |
[math]\displaystyle{ \begin{matrix} \underbrace{ a+b+\cdots+z } \\ 26 \end{matrix} }[/math] |
|
| Суми | \sum_{k=1}^N k^2 | [math]\displaystyle{ \sum_{k=1}^N k^2 }[/math] | |
| Добутки | \prod_{i=1}^N x_i | [math]\displaystyle{ \prod_{i=1}^N x_i }[/math] | |
| Кодобутки | \coprod_{i=1}^N x_i | [math]\displaystyle{ \coprod_{i=1}^N x_i }[/math] | |
| Границі | \lim_{n \to \infty}x_n | [math]\displaystyle{ \lim_{n \to \infty}x_n }[/math] | |
| Інтеграл | \int_{-N}^{N} e^x\, dx | [math]\displaystyle{ \int_{-N}^{N} e^x\, dx }[/math] | |
| Подвійний інтеграл | \iint_{D}^{W} \, dx\,dy | [math]\displaystyle{ \iint_{D}^{W} \, dx\,dy }[/math] | |
| Потрійний інтеграл | \iiint_{E}^{V} \, dx\,dy\,dz | [math]\displaystyle{ \iiint_{E}^{V} \, dx\,dy\,dz }[/math] | |
| Четверний інтеграл | \iiiint_{F}^{U} \, dx\,dy\,dz\,dt | [math]\displaystyle{ \iiiint_{F}^{U} \, dx\,dy\,dz\,dt }[/math] | |
| Криволінійний інтеграл | \oint_{C} x^3\, dx + 4y^2\, dy | [math]\displaystyle{ \oint_{C} x^3\, dx + 4y^2\, dy }[/math] | |
| Перетини | \bigcap_1^{n} p | [math]\displaystyle{ \bigcap_1^{n} p }[/math] | |
| Об'єднання | \bigcup_1^{k} p | [math]\displaystyle{ \bigcup_1^{k} p }[/math] | |
Дроби, матриці, багаторядкові вирази
| Функціональність | Синтаксис | Як це виглядає на екрані | ||||
|---|---|---|---|---|---|---|
| Дроби | \frac{2}{4} або {2 \over 4} | [math]\displaystyle{ \frac{2}{4} }[/math] | ||||
| Біноміальні коефіцієнти | {n \choose k} | [math]\displaystyle{ {n \choose k} }[/math] | ||||
| Малі дроби | \begin{matrix} \frac{2}{4} \end{matrix} | [math]\displaystyle{ \begin{matrix} \frac{2}{4} \end{matrix} }[/math] | ||||
| Матриці | \begin{matrix} x & y \\ z & v \end{matrix} | [math]\displaystyle{ \begin{matrix} x & y \\ z & v \end{matrix} }[/math] | ||||
| \begin{vmatrix} x & y \\ z & v \end{vmatrix} | [math]\displaystyle{ \begin{vmatrix} x & y \\ z & v \end{vmatrix} }[/math] | |||||
| \begin{Vmatrix} x & y \\ z & v \end{Vmatrix} | [math]\displaystyle{ \begin{Vmatrix} x & y \\ z & v \end{Vmatrix} }[/math] | |||||
| \begin{bmatrix} 0 & \cdots & 0 \\ \vdots &
\ddots & \vdots \\ 0 & \cdots & 0\end{bmatrix} |
[math]\displaystyle{ \begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0\end{bmatrix} }[/math] | |||||
| \begin{Bmatrix} x & y \\ z & v \end{Bmatrix} | [math]\displaystyle{ \begin{Bmatrix} x & y \\ z & v \end{Bmatrix} }[/math] | |||||
| \begin{pmatrix} x & y \\ z & v \end{pmatrix} | [math]\displaystyle{ \begin{pmatrix} x & y \\ z & v \end{pmatrix} }[/math] | |||||
| Варіанти вибору | f(n) = \begin{cases} n/2, & \mbox{if }n\mbox{ is even} \\ 3n+1, & \mbox{if }n\mbox{ is odd} \end{cases} | [math]\displaystyle{ f(n) = \begin{cases} n/2, & \mbox{if }n\mbox{ is even} \\ 3n+1, & \mbox{if }n\mbox{ is odd} \end{cases} }[/math] | ||||
| Багаторядкові рівняння | \begin{matrix}f(n+1) & = & (n+1)^2 \\ \ & = & n^2 + 2n + 1 \end{matrix} | [math]\displaystyle{ \begin{matrix}f(n+1) & = & (n+1)^2 \\ \ & = & n^2 + 2n + 1 \end{matrix} }[/math] | ||||
| Альтернативний запис багаторядкових рівняннь(через таблиці) |
{|
|-
|<math>f(n+1)</math>
|<math>=(n+1)^2</math>
|-
|
|<math>=n^2 + 2n + 1</math>
|}
|
|
||||
Шрифти
| Функціональність | Синтаксис | Як це виглядає на екрані | |
|---|---|---|---|
| Грецька абетка (Зауважте відсутність омікрон; зауважте також, що деякі букви грецької абетки у верхньому регістрі промальовуються так само як і відповідні латинські) |
\Alpha\ \Beta\ \Gamma\ \Delta\ \Epsilon\ \Zeta\ \Eta\ \Theta\ \Iota\ \Kappa\ \Lambda\ \Mu\ \Nu\ \Xi\ \Pi\ \Rho\ \Sigma\ \Tau\ \Upsilon\ \Phi\ \Chi\ \Psi\ \Omega |
[math]\displaystyle{ \Alpha\ \Beta\ \Gamma\ \Delta\ \Epsilon\ \Zeta\ \Eta\ \Theta\ \Iota\ \Kappa\ \Lambda\ \Mu\ \Nu\ \Xi\ \Pi\ \Rho\ \Sigma\ \Tau\ \Upsilon\ \Phi\ \Chi\ \Psi\ \Omega }[/math] |
|
| Blackboard bold | x\in\mathbb{R}\sub\mathbb{C} | [math]\displaystyle{ x\in\mathbb{R}\subset\mathbb{C} }[/math] | |
| boldface (вектори) | \mathbf{x}\cdot\mathbf{y} = 0 | [math]\displaystyle{ \mathbf{x}\cdot\mathbf{y} = 0 }[/math] | |
| жирні (грецькі) | \boldsymbol{\alpha} + \boldsymbol{\beta} + \boldsymbol{\gamma} | [math]\displaystyle{ \boldsymbol{\alpha} + \boldsymbol{\beta} + \boldsymbol{\gamma} }[/math] | |
| прописні | \mathit{ABCDE abcde 1234} | [math]\displaystyle{ \mathit{ABCDE abcde 1234}\,\! }[/math] | |
| шрифт Roman | \mathrm{ABCDE abcde 1234} | [math]\displaystyle{ \mathrm{ABCDE abcde 1234}\,\! }[/math] | |
| шрифт Fraktur | \mathfrak{ABCDE abcde 1234} | [math]\displaystyle{ \mathfrak{ABCDE abcde 1234} }[/math] | |
| Шрифт Calligraphy/Script | \mathcal{ABCDE abcde 1234} | [math]\displaystyle{ \mathcal{ABCDE abcde 1234} }[/math] | |
| Єврейська абетка | \aleph \beth \gimel \daleth | [math]\displaystyle{ \aleph\ \beth\ \gimel\ \daleth }[/math] | |
| non-italicised characters | \mbox{abc} | [math]\displaystyle{ \mbox{abc} }[/math] | [math]\displaystyle{ \mbox{abc} \,\! }[/math] |
| змішаний прописний шрифт (поганий) | \mbox{if} n \mbox{is even} | [math]\displaystyle{ \mbox{if} n \mbox{is even} }[/math] | [math]\displaystyle{ \mbox{if} n \mbox{is even} \,\! }[/math] |
| змішаний прописний шрифт (правильний) | \mbox{if }n\mbox{ is even} | [math]\displaystyle{ \mbox{if }n\mbox{ is even} }[/math] | [math]\displaystyle{ \mbox{if }n\mbox{ is even} \,\! }[/math] |
Взяття великих виразів в дужки, фігурні та квадратні дужки
| Функціональність | Синтаксис | Як це виглядає на екрані | |
|---|---|---|---|
| Поганий | (\frac{1}{2}) | [math]\displaystyle{ ( \frac{1}{2} ) }[/math] | |
| Кращий | \left (\frac{1}{2} \right) | [math]\displaystyle{ \left ( \frac{1}{2} \right ) }[/math] | |
Ви можете використовувати різні обмежувачі з \left і \right:
| Функціональність | Синтаксис | Як це виглядає на екрані | |
|---|---|---|---|
| Дужки | \left (\frac{a}{b} \right) | [math]\displaystyle{ \left ( \frac{a}{b} \right ) }[/math] | |
| Квадратні дужки | \left [ \frac{a}{b} \right ] \quad \left \lbrack \frac{a}{b} \right \rbrack | [math]\displaystyle{ \left [ \frac{a}{b} \right ] \quad \left \lbrack \frac{a}{b} \right \rbrack }[/math] | |
| Фігурні дужки | \left \{ \frac{a}{b} \right \} \quad \left \lbrace \frac{a}{b} \right \rbrace | [math]\displaystyle{ \left \{ \frac{a}{b} \right \} \quad \left \lbrace \frac{a}{b} \right \rbrace }[/math] | |
| Кутові дужки | \left \langle \frac{a}{b} \right \rangle | [math]\displaystyle{ \left \langle \frac{a}{b} \right \rangle }[/math] | |
| Прямі та подвійні прямі дужки | \left | \frac{a}{b} \right \vert \left \Vert \frac{c}{d} \right \| | [math]\displaystyle{ \left | \frac{a}{b} \right \vert \left \Vert \frac{c}{d} \right \| }[/math] | |
| Підлога та стеля: | \left \lfloor \frac{a}{b} \right \rfloor \left \lceil \frac{c}{d} \right \rceil | [math]\displaystyle{ \left \lfloor \frac{a}{b} \right \rfloor \left \lceil \frac{c}{d} \right \rceil }[/math] | |
| Прямі та зворотні дроби | \left / \frac{a}{b} \right \backslash | [math]\displaystyle{ \left / \frac{a}{b} \right \backslash }[/math] | |
| Стрілки | \left \uparrow \frac{a}{b} \right \downarrow \quad \left \Uparrow \frac{a}{b} \right \Downarrow \quad \left \updownarrow \frac{a}{b} \right \Updownarrow | [math]\displaystyle{ \left \uparrow \frac{a}{b} \right \downarrow \quad \left \Uparrow \frac{a}{b} \right \Downarrow \quad \left \updownarrow \frac{a}{b} \right \Updownarrow }[/math] | |
|
Обмежувачі можна змішувати, |
\left [ 0,1 \right) |
[math]\displaystyle{ \left [ 0,1 \right ) }[/math] |
|
| Використовуйте \left. і \right. якщо Ви не хочете щоб обмежувач з'являвся на сторінці: |
\left . \frac{A}{B} \right \} \to X | [math]\displaystyle{ \left . \frac{A}{B} \right \} \to X }[/math] | |
| Розмір обмежувачів | \big(\Big(\bigg(\Bigg(… \Bigg] \bigg] \Big] \big] |
[math]\displaystyle{ \big( \Big( \bigg( \Bigg( ... \Bigg] \bigg] \Big] \big] }[/math] |
|
| \big\{ \Big\{ \bigg\{ \Bigg\{ … \Bigg\rangle \bigg\rangle \Big\rangle \big\rangle |
[math]\displaystyle{ \big\{ \Big\{ \bigg\{ \Bigg\{ ... \Bigg\rangle \bigg\rangle \Big\rangle \big\rangle }[/math] |
||
| \big\| \Big\| \bigg\| \Bigg\| … \Bigg| \bigg| \Big| \big| | [math]\displaystyle{ \big\| \Big\| \bigg\| \Bigg\| ... \Bigg| \bigg| \Big| \big| }[/math] | ||
| \big\lfloor \Big\lfloor \bigg\lfloor \Bigg\lfloor … \Bigg\rceil \bigg\rceil \Big\rceil \big\rceil |
[math]\displaystyle{ \big\lfloor \Big\lfloor \bigg\lfloor \Bigg\lfloor ... \Bigg\rceil \bigg\rceil \Big\rceil \big\rceil }[/math] |
||
| \big\uparrow \Big\uparrow \bigg\uparrow \Bigg\uparrow … \Bigg\Downarrow \bigg\Downarrow \Big\Downarrow \big\Downarrow |
[math]\displaystyle{ \big\uparrow \Big\uparrow \bigg\uparrow \Bigg\uparrow ... \Bigg\Downarrow \bigg\Downarrow \Big\Downarrow \big\Downarrow }[/math] |
||
Пробіли та відступи
Зауважте, що TeX робить відступи автоматично, але якщо необхідно, Ви можете робити це вручну.
| Функціональність | Синтаксис | Як це виглядає на екрані | |
|---|---|---|---|
| подвійний четверний пробіл | a \qquad b | [math]\displaystyle{ a \qquad b }[/math] | |
| четверний пробіл | a \quad b | [math]\displaystyle{ a \quad b }[/math] | |
| текстовий пробіл | a\ b | [math]\displaystyle{ a\ b }[/math] | |
| текстовий пробіл без конветування в PNG | a \mbox{ } b | [math]\displaystyle{ a \mbox{ } b }[/math] | |
| великий пробіл | a\;b | [math]\displaystyle{ a\;b }[/math] | |
| середній пробіл | a\>b | [not supported] | |
| маленький пробіл | a\,b | [math]\displaystyle{ a\,b }[/math] | |
| без пробілу | ab | [math]\displaystyle{ ab\, }[/math] | |
| від'ємний відступ | a\!b | [math]\displaystyle{ a\!b }[/math] | |
Вирівнювання формул із текстом
css що використовується по замовчуванню:
img.tex { vertical-align: middle; }
як правило вирівнює вирази, такі як [math]\displaystyle{ \int_{-N}^{N} e^x\, dx }[/math], коректно.
Якщо у Вас є потреба вирівняти їх іншим чином, використайте <font style="vertical-align:-100%;"><math>...</math></font> і пограйтесь з аргументом vertical-align поки не отримаєте бажаний результат; але, як виглядатиме результат, залежатиме від типу та установок браузера.
Явне використання PNG
Щоб перемалювати формулу із використанням PNG, додайте \, (маленький відступ) в кінці формули (де вона не малюватиметься). Це працюватиме для користувачів в режимі «HTML if simple», але не для користувачів в режимі «HTML if possible».
Якщо Ви використаєте \,\! будь-де всередині формули, це змусить використати PNG для всіх режимів.
Приклади:
| Функціональність | Як це виглядає на екрані | |
|---|---|---|
| a^{c+2} | [math]\displaystyle{ a^{c+2} }[/math] | |
| a^{c+2} \, | [math]\displaystyle{ a^{c+2} \, }[/math] | |
| a^{\,\!c+2} | [math]\displaystyle{ a^{\,\!c+2} }[/math] | |
| a^{b^{c+2}} | [math]\displaystyle{ a^{b^{c+2}} }[/math] (НЕПРАВИЛЬНО з опцією «HTML if possible or else PNG»!) | |
| a^{b^{c+2}} \, | [math]\displaystyle{ a^{b^{c+2}} \, }[/math] (НЕПРАВИЛЬНО з опцією «HTML if possible or else PNG»!) | |
| a^{b^{c+2}}\approx 5 | [math]\displaystyle{ a^{b^{c+2}}\approx 5 }[/math] (оскільки «[math]\displaystyle{ \approx }[/math]» перемальовуються коректно, немає необхідності в «\,\!») | |
| a^{b^{\,\!c+2}} | [math]\displaystyle{ a^{b^{\,\!c+2}} }[/math] | |
| \int_{-N}^{N} e^x\, dx | [math]\displaystyle{ \int_{-N}^{N} e^x\, dx }[/math] | |
| \int_{-N}^{N} e^x\, dx \, | [math]\displaystyle{ \int_{-N}^{N} e^x\, dx \, }[/math] | |
| \int_{-N}^{N} e^x\, dx \,\! | [math]\displaystyle{ \int_{-N}^{N} e^x\, dx \,\! }[/math] | |
Додайте коментар в Вікітекст, якщо ВИ не хочете, щоб нові редактори «корегували» математичний код.
Приклади
[math]\displaystyle{ \left(3-x\right) \times \left( \frac{2}{3-x} \right) = \left(3-x\right) \times \left( \frac{3}{2-x} \right) }[/math]
[math]\displaystyle{ 2 = \left( \frac{\left(3-x\right) \times 3}{2-x} \right) }[/math]
[math]\displaystyle{ 4-2x = 9-3x \! }[/math]
[math]\displaystyle{ -2x+3x = 9-4 \! }[/math]
[math]\displaystyle{ \int_a^x \int_a^s f(y)\,dy\,ds = \int_a^x f(y)(x-y)\,dy\, }[/math]
[math]\displaystyle{ \sum_{m=1}^\infty\sum_{n=1}^\infty\frac{m^2\,n}{3^m\left(m\,3^n+n\,3^m\right)} }[/math]
[math]\displaystyle{ u'' + p(x)u' + q(x)u=f(x),\,\,\,x>a }[/math]
[math]\displaystyle{ |\bar{z}| = |z|, \quad |(\bar{z})^n| = |z|^n, \quad \operatorname{arg} z^n = n\operatorname{arg} z\, }[/math]
[math]\displaystyle{ \lim_{z\rightarrow z_0} f(z)=f(z_0)\, }[/math]
[math]\displaystyle{ \phi_n(\kappa) = \frac{1}{4\pi^2\kappa^2} \int_0^\infty \frac{\sin(\kappa R)}{\kappa R} \frac{\partial}{\partial R}\left[R^2\frac{\partial D_n(R)}{\partial R}\right]\,dR\, }[/math]
[math]\displaystyle{ \int_0^\infty x^\alpha \sin x\,dx = 2^\alpha \sqrt{\pi}\, \frac{\Gamma(\frac{\alpha}{2}+1)}{\Gamma(\frac{1}{2}-\frac{\alpha}{2})}\, }[/math]
[math]\displaystyle{ \phi_n(\kappa) = 0.033C_n^2\kappa^{-11/3},\,\,\,\frac{1}{L_0}<\!\!<\kappa<\!\!<\frac{1}{l_0}\, }[/math]
[math]\displaystyle{ f(x) = {a_0\over 2} + \sum_{n=1}^\infty a_n\cos \left({2n\pi x \over T}\right) + b_n\sin\left({2n\pi x\over T}\right)\, }[/math]
[math]\displaystyle{ f(x) = \begin{cases}1 & -1 \le x < 0\\
\frac{1}{2} & x = 0\\x&0
[math]\displaystyle{ \Gamma(z) = \int_0^\infty e^{-t} t^{z-1} \,dt\, }[/math]
[math]\displaystyle{ J_p(z) = \sum_{k=0}^\infty \frac{(-1)^k\left(\frac{z}{2}\right)^{2k+p}}{k!\,\Gamma(k+p+1)}\, }[/math]
[math]\displaystyle{ {}_pF_q(a_1,...,a_p;c_1,...,c_q;z) = \sum_{n=0}^\infty \frac{(a_1)_n\cdot\cdot\cdot(a_p)_n}{(c_1)_n\cdot\cdot\cdot(c_q)_n}\frac{z^n}{n!}\, }[/math]
[math]\displaystyle{ \Gamma(n+1) = n \Gamma(n), \quad n>0\, }[/math]
[math]\displaystyle{ \int_0^1 \frac{1}{\sqrt{-\ln x}} \,dx\, }[/math]
[math]\displaystyle{ \int\limits_0^\infty e^{-st}t^{x-1}\,dt,\,\,\,s>0\, }[/math]
Див. також
Зовнішні посилання
- Не надто короткий вступ до LaTeX: http://www.ctan.org/tex-archive/info/lshort/ukrainian/lshort-ukr.pdf
- A LaTeX tutorial. http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/
- LaTeX керівництво (рос.)
- A PDF document introducing TeX — see page 39 onwards for a good introduction to the maths side of things: http://www.ctan.org/tex-archive/info/gentle/gentle.pdf
- A PDF document introducing LaTeX — skip to page 59 for the math section. See page 72 for a complete reference list of symbols included in LaTeX and AMS-LaTeX. http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf
- TeX reference card: http://www.csit.fsu.edu/~mimi/tex/tex-refcard-letter.pdf
- Can't remember but I put it here so it must be ok ;-) http://www.ams.org/tex/amslatex.html
- A set of public domain fixed-size math symbol bitmaps: http://us.metamath.org/symbols/symbols.html
- Оригінальне керівництво: m:Help:Formula