ویکیپدیا:ریاضینویسی
از ویکیپدیا، دانشنامهٔ آزاد.
نویسههای ریاضی ممکن است اشکال گوناگون داشته باشد. یک روش ریاضینویسی در ویکیپدیا استفاده از دستورات تِک(TeX) در ویرایشگر ویکی است.
فهرست مندرجات |
[ویرایش] مقایسه تِک و HTML
پیش از آشنایی با نحوهٔ استفاده از تِک بهتر است بدانید که بعضی نوشتههای تولید شده با تِک را میتوان با دستورات سادهٔ HTML نیز بدست آورد.
| TeX Syntax (forcing PNG) | TeX Rendering | HTML Syntax | HTML Rendering |
|---|---|---|---|
| <math>\alpha\,</math> | ![]() |
α | α |
| <math>\sqrt{2}</math> | ![]() |
√2 | √2 |
| <math>\sqrt{1-e^2}</math> | ![]() |
√(1-''e''²) | √(1-e²) |
استفادهٔ HTML به جای تِک کماکان زیر سؤال است. ولی میتوان نتیجههای زیر را در مورد آن اعلام کرد:
برتریهای HTML:
- فرمولهای HTML همیشه در یک خط با ادامهٔ متن قرار میگیرد.
- پسزمینه، قلم، رنگ و خصوصیات متن در فرمول مورد استفاده نیز به همان شکل خواهد بود و CSS استفاده شده در صفحه نیز در فرمول ریاضی نیز اعمال خواهد شد.
برتریهای تِک
- ;تِک از نظر معنایی به HTML برتری چشمگیری دارد. "<nowiki>x"</nowiki> در تِک به معنی «متغیر ریاضی x» ولی در HTML هر چیزی میتواند باشد.
- تِک به طور مشخص برای حروفچینی فرمولهای ریاضی ساخته شده و ورودی و خروجی آن مشخصتر و راضی کننده تر است. تقریباً تمام افرادی که به طور حرفهای با ریاضیات سروکار دارند، با دستورات آن آشنا هستند.
- تِک قابل تبدیل به HTML است ولی برعکس آن انجام پذیر نیست.
- نگرانی بابت پشتیبانی مرورگرهای مختلف از خروجی تولید شده وجود ندارد.
[ویرایش] توابع، علائم و کاراکترهای ویژه
| مشخصه | Syntax | خروجی |
|---|---|---|
| Accents/Diacritics |
\acute{a} \quad \grave{a} \quad \breve{a}
\check{a} \quad \tilde{a}
|
![]()
|
| Std. functions (good) |
\sin x + \ln y +\operatorname{sgn} z
\sin a \ \cos b \ \tan c
\cot d \ \sec e \ \csc f
\sinh g \ \cosh h \ \tanh i \ \coth j
\arcsin k \ \arccos l \ \arctan m
\lim n \ \limsup o \ \liminf p
\min q \ \max r \ \inf s \ \sup t
\exp u \ \lg v \ \log w
\ker x \ \deg x \gcd x \Pr x
\det x \hom x \ \arg x \dim x
|
![]()
|
| Std. functions (wrong) |
sin x + ln y + sgn z |
![]() |
| Modular arithmetic |
s_k \equiv 0 \pmod{m}
a \bmod b
|
![]()
|
| Derivatives |
\nabla \; \partial x \; dx \; \dot x \; \ddot y |
![]() |
| Sets (Square symbols may not work for some wikis) |
\forall \; \exists \; \empty \; \emptyset \; \varnothing \in \ni \not\in \notin \subset \subseteq \supset \supseteq \cap \bigcap \cup \bigcup \biguplus |
![]()
|
\sqsubset \sqsubseteq \sqsupset \sqsupseteq \sqcap \sqcup \bigsqcup |
![]()
|
|
| Logic |
p \land \wedge \; \bigwedge \; \bar{q} \to p
\lor \; \vee \; \bigvee \; \lnot \; \neg q
\setminus \; \smallsetminus
|
![]()
|
| Root |
\sqrt{2}\approx 1.4
|
![]() |
\sqrt[n]{x}
|
![]() |
|
| Relations |
\sim \; \approx \; \simeq \; \cong \le \; < \; \ll \; \gg \; \ge > \equiv \; \not\equiv \; \ne \; \propto \pm \; \mp |
![]()
|
| Geometric |
\Diamond \; \Box \; \triangle \; \angle \; \perp \; \mid \; \nmid \; \| \; 45^\circ |
![]() |
| Arrows (Harpoons may not work for some wikis) |
\leftarrow \; \gets \; \rightarrow \; \to \leftrightarrow \; \longleftarrow \; \longrightarrow \mapsto \; \longmapsto \hookrightarrow \; \hookleftarrow \nearrow \; \searrow \; \swarrow \; \nwarrow \uparrow \; \downarrow \; \updownarrow |
![]()
|
\rightharpoonup \; \rightharpoondown \; \leftharpoonup \; \leftharpoondown \; \upharpoonleft \; \upharpoonright \; \downharpoonleft \; \downharpoonright |
![]() |
|
\Leftarrow \; \Rightarrow \; \Leftrightarrow \Longleftarrow \; \Longrightarrow \Longleftrightarrow (or \iff) \Uparrow \; \Downarrow \; \Updownarrow |
![]()
|
|
| Special |
\eth \; \S \; \P \; \% \; \dagger \; \ddagger \star \; * \; \ldots \smile \frown \wr |
![]()
|
\oplus \bigoplus \otimes \bigotimes \times \cdot \circ \bullet \bigodot |
![]()
|
|
\triangleleft \triangleright \infty \bot \top \vdash \vDash \Vdash \models \lVert \rVert |
![]()
|
|
\imath \; \hbar \; \ell \; \mho \; \Finv \Re \; \Im \; \wp \; \complement |
![]()
|
|
\diamondsuit \; \heartsuit \; \clubsuit \; \spadesuit \Game \; \flat \; \natural \; \sharp |
![]()
|
|
| Lowercase \mathcal has some extras |
\mathcal {45abcdenpqs}
|
![]() |
[ویرایش] اندیس، توان و انتگرالها
| ویژگی | Syntax | نحوهٔ نمایش خروجی | |
|---|---|---|---|
| HTML | PNG | ||
| Superscript |
a^2 |
a2 | ![]() |
| Subscript |
a_2 |
a2 | ![]() |
| Grouping |
a^{2+2}
|
a2 + 2 | ![]() |
a_{i,j}
|
ai,j | ![]() |
|
| Combining sub & super |
x_2^3 |
![]() |
|
| Preceding sub & super |
{}_1^2\!X_3^4
|
![]() |
|
| Derivative (forced PNG) |
x', y'', f', f''\! |
![]() |
|
| Derivative (f in italics may overlap primes in HTML) |
x', y'', f', f'' |
x',y'',f',f'' | ![]() |
| Derivative (wrong in HTML) |
x^\prime, y^{\prime\prime}
|
![]() |
![]() |
| Derivative (wrong in PNG) |
x\prime, y\prime\prime |
![]() |
![]() |
| Derivative dots |
\dot{x}, \ddot{x}
|
![]() |
|
| Underlines, overlines, vectors |
\hat a \ \bar b \ \vec c |
![]() |
|
\overrightarrow{a b} \ \overleftarrow{c d} \ \widehat{d e f}
|
![]() |
||
\overline{g h i} \ \underline{j k l}
|
![]() |
||
| Overbraces |
\begin{matrix} 5050 \ \overbrace{ 1+2+\cdots+100 } \end{matrix}
|
![]() |
|
| Underbraces |
\begin{matrix} \underbrace{ a+b+\cdots+z } \ 26 \end{matrix}
|
![]() |
|
| Sum |
\sum_{k=1}^N k^2
|
![]() |
|
| Sum (force \textstyle) |
\begin{matrix} \sum_{k=1}^N k^2 \end{matrix}
|
![]() |
|
| Product |
\prod_{i=1}^N x_i
|
![]() |
|
| Product (force \textstyle) |
\begin{matrix} \prod_{i=1}^N x_i \end{matrix}
|
![]() |
|
| Coproduct |
\coprod_{i=1}^N x_i
|
![]() |
|
| Coproduct (force \textstyle) |
\begin{matrix} \coprod_{i=1}^N x_i \end{matrix}
|
![]() |
|
| Limit |
\lim_{n \to \infty}x_n
|
![]() |
|
| Limit (force \textstyle) |
\begin{matrix} \lim_{n \to \infty}x_n \end{matrix}
|
![]() |
|
| Integral |
\int_{-N}^{N} e^x\, dx
|
![]() |
|
| Integral (force \textstyle) |
\begin{matrix} \int_{-N}^{N} e^x\, dx \end{matrix}
|
![]() |
|
| Double integral |
\iint_{D}^{W} \, dx\,dy
|
![]() |
|
| Triple integral |
\iiint_{E}^{V} \, dx\,dy\,dz
|
![]() |
|
| Quadruple integral |
\iiiint_{F}^{U} \, dx\,dy\,dz\,dt
|
![]() |
|
| Path integral |
\oint_{C} x^3\, dx + 4y^2\, dy
|
![]() |
|
| Intersections |
\bigcap_1^{n} p
|
![]() |
|
| Unions |
\bigcup_1^{k} p
|
![]() |
|




























![\sqrt[n]{x}](../../../math/5/e/4/5e4352778f3b156f05ef056f9793ec36.png)





























































