Rilpedia:Användarhandledning för TeX
Från Rilpedia
(→Specialtecken) |
(→Teckensnitt) |
||
(14 mellanliggande versioner visas inte.) | |||
Rad 1: | Rad 1: | ||
- | <noinclude>{{rpsv.basedon.wpsv}}</noinclude>Sedan december 2007 kan '''[[TeX]]-kod''' användas för [[matematik|matematiska]] formler på [[Rilpedia]]. TeX skapar antingen [[PNG]]-bilder eller enkel [[HTML]]-kod, beroende på användarinställningar och komplexiteten hos uttrycket. | + | <noinclude>{{rpsv.basedon.wpsv}}</noinclude>{{rpsv.todo|SHL}} |
+ | Sedan december 2007 kan '''[[TeX]]-kod''' användas för [[matematik|matematiska]] formler på [[Rilpedia]]. TeX skapar antingen [[PNG]]-bilder eller enkel [[HTML]]-kod, beroende på användarinställningar och komplexiteten hos uttrycket. | ||
Matematiska märkord skrivs inom <nowiki><math> ... </math></nowiki>. Eventuella radbrytningar inom dessa <nowiki><math></nowiki>-taggar medför inga problem, då de inte visas alls. Det är t o m klokt att använda dessa radbrytningar för att hålla källkoden läslig (exempelvis genom att bryta raden efter varje term eller rad i en matris). | Matematiska märkord skrivs inom <nowiki><math> ... </math></nowiki>. Eventuella radbrytningar inom dessa <nowiki><math></nowiki>-taggar medför inga problem, då de inte visas alls. Det är t o m klokt att använda dessa radbrytningar för att hålla källkoden läslig (exempelvis genom att bryta raden efter varje term eller rad i en matris). | ||
Rad 8: | Rad 9: | ||
== Specialtecken == | == Specialtecken == | ||
- | {| style="border: 1px solid #aaa;" cellspacing=" | + | {| style="border: 1px solid #aaa;" cellspacing="5" cellpadding="4" |
! Funktion || Syntax || Hur den visas | ! Funktion || Syntax || Hur den visas | ||
- | |- style="background: # | + | |- style="background: #e9e9e9;" |
| decimalkomma (rätt) | | decimalkomma (rätt) | ||
| <code>3,\!14159</code> | | <code>3,\!14159</code> | ||
Rad 18: | Rad 19: | ||
| <code>3,14159</code> | | <code>3,14159</code> | ||
| <math>3,14159\,\!</math> | | <math>3,14159\,\!</math> | ||
- | |- style="background: # | + | |- style="background: #e9e9e9;" |
| standardfunktioner (rätt) | | standardfunktioner (rätt) | ||
| <code>\sin x + \ln y +\operatorname{sgn} z</code> | | <code>\sin x + \ln y +\operatorname{sgn} z</code> | ||
Rad 26: | Rad 27: | ||
| <code>sin x + ln y + sgn z</code> | | <code>sin x + ln y + sgn z</code> | ||
| <math>sin x + ln y + sgn z\,</math> | | <math>sin x + ln y + sgn z\,</math> | ||
- | |- style="background: # | + | |- style="background: #e9e9e9;" |
| Derivata | | Derivata | ||
| <code>\nabla \partial x dx</code> | | <code>\nabla \partial x dx</code> | ||
Rad 34: | Rad 35: | ||
| <code>\forall x\in \not\in\subseteq A\cap B\cup \exists \{x,y\} \times C</code> | | <code>\forall x\in \not\in\subseteq A\cap B\cup \exists \{x,y\} \times C</code> | ||
| <math>\forall x \in \; \not\in \subseteq A\cap B\cup \exists \{x,y\} \times C</math> | | <math>\forall x \in \; \not\in \subseteq A\cap B\cup \exists \{x,y\} \times C</math> | ||
- | |- style="background: # | + | |- style="background: #e9e9e9;" |
| Logik | | Logik | ||
| <code>p\wedge \bar{q} \rightarrow p\vee \bar{q} \Rightarrow r</code> | | <code>p\wedge \bar{q} \rightarrow p\vee \bar{q} \Rightarrow r</code> | ||
| <math>p\wedge \bar{q} \rightarrow p\vee \bar{q} \Rightarrow r</math> | | <math>p\wedge \bar{q} \rightarrow p\vee \bar{q} \Rightarrow r</math> | ||
|- | |- | ||
- | | | + | | Kvadratrötter |
| <code>\sqrt{2}\approx 1,\!4</code> | | <code>\sqrt{2}\approx 1,\!4</code> | ||
| <math>\sqrt{2}\approx 1,\!4</math> | | <math>\sqrt{2}\approx 1,\!4</math> | ||
- | |- style="background: # | + | |- style="background: #e9e9e9;" |
+ | | Högre ordnings rötter | ||
| <code>\sqrt[n]{x}</code> | | <code>\sqrt[n]{x}</code> | ||
| <math>\sqrt[n]{x}</math> | | <math>\sqrt[n]{x}</math> | ||
Rad 49: | Rad 51: | ||
| <code>\sim \simeq \le \ge \equiv \approx \ne</code> | | <code>\sim \simeq \le \ge \equiv \approx \ne</code> | ||
| <math> \sim \ \simeq \ \le \ \ge \ \equiv \ \approx \ \ne</math> | | <math> \sim \ \simeq \ \le \ \ge \ \equiv \ \approx \ \ne</math> | ||
- | |- style="background: # | + | |- style="background: #e9e9e9;" |
| Geometri | | Geometri | ||
| <code><nowiki>\angle \perp \|</nowiki></code> | | <code><nowiki>\angle \perp \|</nowiki></code> | ||
Rad 65: | Rad 67: | ||
<br><math>\nearrow \searrow \swarrow \nwarrow </math> | <br><math>\nearrow \searrow \swarrow \nwarrow </math> | ||
<br><math>\uparrow \downarrow \updownarrow</math> | <br><math>\uparrow \downarrow \updownarrow</math> | ||
- | |- style="background: # | + | |- style="background: #e9e9e9; vertical-align: top;" |
| Pilar (Dubbla) | | Pilar (Dubbla) | ||
| | | | ||
Rad 83: | Rad 85: | ||
== Exponenter, index == | == Exponenter, index == | ||
- | {| border=" | + | {| style="border: 1px solid #aaa;" cellspacing="5" cellpadding="4" |
|----- | |----- | ||
! Funktion | ! Funktion | ||
! Syntax | ! Syntax | ||
! Hur den visas | ! Hur den visas | ||
+ | |- style="background: #e9e9e9;" | ||
+ | | Exponent || <code>a^2</code> || <math>a^2</math> | ||
|----- | |----- | ||
- | | | + | | Index || <code>a_2</code> || <math> a_2 </math> |
+ | |- style="background: #e9e9e9;" | ||
+ | | rowspan="2" | Gruppering || <code>a^{2+2}</code> || <math>a^{2+2}</math> | ||
|----- | |----- | ||
- | + | | <code>a_{i,j}</code> || <math>a_{i,j}</math> | |
- | + | |- style="background: #e9e9e9;" | |
- | + | | Kombinationer av "sub" och "super" || <code>x_2^3</code> | |
- | + | ||
- | + | ||
- | |- | + | |
- | | Kombinationer av "sub" och "super" || x_2^3 | + | |
| <math>x_2^3</math> | | <math>x_2^3</math> | ||
|----- | |----- | ||
- | | Derivata (bra) || x' || <math>x'</math> | + | | Derivata (bra) || <code>x'</code> || <math>x'</math> |
- | |- | + | |- style="background: #e9e9e9;" |
- | | Derivata (acceptabelt) | + | | Derivata (acceptabelt) || <code>x^\prime</code> || <math>x^\prime</math> |
- | + | ||
- | + | ||
|----- | |----- | ||
+ | | Derivata (fel) || <code>x\prime</code> || <math>x\prime</math> | ||
+ | |- style="background: #e9e9e9;" | ||
| Under och överlinjer | | Under och överlinjer | ||
- | | \hat a \bar b \vec c \widehat {d e f} \overline {g h i} \underline {j k l} | + | | <code>\hat a \bar b \vec c \widehat {d e f} \overline {g h i} \underline {j k l}</code> |
| <math>\hat a \ \bar b \ \vec c \ \widehat {d e f} \ \overline {g h i} \ \underline {j k l}</math> | | <math>\hat a \ \bar b \ \vec c \ \widehat {d e f} \ \overline {g h i} \ \underline {j k l}</math> | ||
|----- | |----- | ||
- | | Summa || \sum_{k=1}^N k^2 || <math>\sum_{k=1}^N k^2</math> | + | | Summa || <code>\sum_{k=1}^N k^2</code> || <math>\sum_{k=1}^N k^2</math> |
+ | |- style="background: #e9e9e9;" | ||
+ | | Produkt || <code>\prod_{i=1}^N x_i</code> || <math>\prod_{i=1}^N x_i</math> | ||
|----- | |----- | ||
- | | | + | | Gränsvärde || <code>\lim_{n \to \infty}x_n</code> |
- | + | ||
- | + | ||
| <math>\lim_{n \to \infty}x_n</math> | | <math>\lim_{n \to \infty}x_n</math> | ||
+ | |- style="background: #e9e9e9;" | ||
+ | | Integral || <code>\int_{-N}^{N} e^x\, dx</code> || <math>\int_{-N}^{N} e^x\, dx</math> | ||
|----- | |----- | ||
- | | | + | | Linjeintegral || <code>\oint_{C} x^3\, dx + 4y^2\, dy</code> |
- | + | ||
- | + | ||
| <math>\oint_{C} x^3\, dx + 4y^2\, dy</math> | | <math>\oint_{C} x^3\, dx + 4y^2\, dy</math> | ||
|} | |} | ||
Rad 125: | Rad 127: | ||
== Bråk, matriser, uttryck på flera rader == | == Bråk, matriser, uttryck på flera rader == | ||
- | {| border=" | + | {| style="border: 1px solid #aaa;" cellspacing="5" cellpadding="4" |
- | |- | + | |- style="background: #e9e9e9;" |
! Funktion | ! Funktion | ||
! Syntax | ! Syntax | ||
! Hur den visas | ! Hur den visas | ||
|----- | |----- | ||
- | | Bråk || \frac{2}{4} eller {2 \over 4} | + | | Bråk || <code>\frac{2}{4} eller {2 \over 4}</code> |
| <math>\frac{2}{4}</math> | | <math>\frac{2}{4}</math> | ||
- | |- | + | |- style="background: #e9e9e9;" |
- | | Binomialkoefficienter || {n \choose k} | + | | Binomialkoefficienter || <code>{n \choose k}</code> |
| <math>{n \choose k}</math> | | <math>{n \choose k}</math> | ||
|----- | |----- | ||
| rowspan="6" | Matriser | | rowspan="6" | Matriser | ||
- | | \begin{pmatrix} x & y \\ z & v \end{pmatrix} | + | | <code>\begin{pmatrix} x & y \\ z & v \end{pmatrix}</code> |
| <math>\begin{pmatrix} x & y \\ z & v | | <math>\begin{pmatrix} x & y \\ z & v | ||
\end{pmatrix}</math> | \end{pmatrix}</math> | ||
- | |- | + | |- style="background: #e9e9e9;" |
- | | \begin{bmatrix} 0 & \cdots & 0 \\ \vdots & | + | | <code>\begin{bmatrix} 0 & \cdots & 0 \\ \vdots &</code> |
- | \ddots & \vdots \\ 0 & \cdots & | + | <code>\ddots & \vdots \\ 0 & \cdots &</code> |
- | 0\end{bmatrix} | + | <code>0\end{bmatrix}</code> |
| <math>\begin{bmatrix} 0 & \cdots & 0 \\ \vdots | | <math>\begin{bmatrix} 0 & \cdots & 0 \\ \vdots | ||
& \cdots & \vdots \\ 0 & \cdots & | & \cdots & \vdots \\ 0 & \cdots & | ||
0\end{bmatrix} </math> | 0\end{bmatrix} </math> | ||
|----- | |----- | ||
- | | \begin{Bmatrix} x & y \\ z & v \end{Bmatrix} | + | | <code>\begin{Bmatrix} x & y \\ z & v \end{Bmatrix}</code> |
| <math>\begin{Bmatrix} x & y \\ z & v | | <math>\begin{Bmatrix} x & y \\ z & v | ||
\end{Bmatrix}</math> | \end{Bmatrix}</math> | ||
- | |- | + | |- style="background: #e9e9e9;" |
- | | \begin{vmatrix} x & y \\ z & v \end{vmatrix} | + | | <code>\begin{vmatrix} x & y \\ z & v \end{vmatrix}</code> |
| <math>\begin{vmatrix} x & y \\ z & v | | <math>\begin{vmatrix} x & y \\ z & v | ||
\end{vmatrix}</math> | \end{vmatrix}</math> | ||
|----- | |----- | ||
- | | \begin{Vmatrix} x & y \\ z & v \end{Vmatrix} | + | | <code>\begin{Vmatrix} x & y \\ z & v \end{Vmatrix}</code> |
| <math>\begin{Vmatrix} x & y \\ z & v | | <math>\begin{Vmatrix} x & y \\ z & v | ||
\end{Vmatrix}</math> | \end{Vmatrix}</math> | ||
- | |- | + | |- style="background: #e9e9e9;" |
- | | \begin{matrix} x & y \\ z & v \end{matrix} | + | | <code>\begin{matrix} x & y \\ z & v \end{matrix} |
| <math>\begin{matrix} x & y \\ z & v | | <math>\begin{matrix} x & y \\ z & v | ||
\end{matrix}</math> | \end{matrix}</math> | ||
|----- | |----- | ||
- | | Fritext<sup>[1]</sup> || f(n)=\left\{\begin{matrix} | + | | Fritext<sup>[1]</sup> || |
- | n/2, & \mbox{om }n\mbox{ ar jamn} \\ | + | <code>f(n)=\left\{\begin{matrix} </code> |
- | 3n+1, & \mbox{om }n\mbox{ ar udda} | + | <code>n/2, & \mbox{om }n\mbox{ ar jamn} \\ </code> |
- | \end{matrix}\right. | + | <code>3n+1, & \mbox{om }n\mbox{ ar udda}</code> |
+ | <code>\end{matrix}\right.</code> | ||
| <math>f(n)=\left\{\begin{matrix} n/2, & \mbox{om }n\mbox{ ar jamn} \\ 3n+1, & \mbox{om }n\mbox{ ar udda} \end{matrix}\right. </math> | | <math>f(n)=\left\{\begin{matrix} n/2, & \mbox{om }n\mbox{ ar jamn} \\ 3n+1, & \mbox{om }n\mbox{ ar udda} \end{matrix}\right. </math> | ||
- | |- | + | |- style="background: #e9e9e9;" |
| Ekvationer på flera rader | | Ekvationer på flera rader | ||
- | | \begin{matrix}f(n+1)&=& (n+1)^2 \\ \ & | + | | <code>\begin{matrix}f(n+1)&=& (n+1)^2 \\ \ &</code> |
- | =& n^2 + 2n + 1\end{matrix} | + | <code>=& n^2 + 2n + 1\end{matrix}</code> |
| <math>\begin{matrix}f(n+1)&=& (n+1)^2 \\ \ & =& n^2 + 2n + 1\end{matrix}</math> | | <math>\begin{matrix}f(n+1)&=& (n+1)^2 \\ \ & =& n^2 + 2n + 1\end{matrix}</math> | ||
|} | |} | ||
Rad 180: | Rad 183: | ||
== Teckensnitt == | == Teckensnitt == | ||
- | {| border=" | + | {| style="border: 1px solid #aaa;" cellspacing="5" cellpadding="4" |
- | |- | + | |- style="background: #e9e9e9;" |
! Funktion | ! Funktion | ||
! Syntax | ! Syntax | ||
Rad 187: | Rad 190: | ||
|----- | |----- | ||
| [[Grekiska alfabetet|Grekiska bokstäver]] | | [[Grekiska alfabetet|Grekiska bokstäver]] | ||
- | | \alpha \beta \gamma \Gamma \phi \Phi \Psi\ \tau \Omega | + | | <code>\alpha \beta \gamma \Gamma \phi \Phi \Psi\ \tau \Omega</code> |
| <math>\alpha\ \beta\ \gamma\ \Gamma\ \phi\ \Phi\ \Psi\ \tau\ \Omega</math> | | <math>\alpha\ \beta\ \gamma\ \Gamma\ \phi\ \Phi\ \Psi\ \tau\ \Omega</math> | ||
- | |- | + | |- style="background: #e9e9e9;" |
- | | Dubbelskrift || x\in\mathbb{R}\sub\mathbb{C} | + | | Dubbelskrift || <code>x\in\mathbb{R}\sub\mathbb{C}</code> |
| <math>x\in\mathbb{R}\subset\mathbb{C}</math> | | <math>x\in\mathbb{R}\subset\mathbb{C}</math> | ||
|----- | |----- | ||
- | | Dubbelskrift || \mathbb{ABC} || <math>\mathbb{ABC}</math> | + | | Dubbelskrift || <code>\mathbb{ABC}</code> || <math>\mathbb{ABC}</math> |
+ | |- style="background: #e9e9e9;" | ||
+ | | Fet stil || <code>\mathbf{x}\cdot\mathbf{y} = 0</code> | ||
+ | | <math>\mathbf{x}\cdot\mathbf{y} = 0</math> | ||
|----- | |----- | ||
- | + | | Fet stil (grekiska) || <code>\boldsymbol{\alpha+\beta+\gamma}</code> | |
- | + | ||
- | + | ||
- | | Fet stil (grekiska) || \boldsymbol{\alpha+\beta+\gamma} | + | |
| <math>\boldsymbol{\alpha+\beta+\gamma} </math> | | <math>\boldsymbol{\alpha+\beta+\gamma} </math> | ||
- | |- | + | |- style="background: #e9e9e9;" |
- | | Frakturstil || \mathfrak{a} \mathfrak{B} | + | | Frakturstil || <code>\mathfrak{a} \mathfrak{B}</code> |
| <math>\mathfrak{a} \mathfrak{B}</math> | | <math>\mathfrak{a} \mathfrak{B}</math> | ||
|----- | |----- | ||
- | | Skrivstil || \mathcal{ABC} || <math>\mathcal{ABC}</math> | + | | Skrivstil || <code>\mathcal{ABC}</code> || <math>\mathcal{ABC}</math> |
- | | [[Hebreiska alfabetet|Hebreiska]] || \aleph \beth \gimel \daleth | + | |- style="background: #e9e9e9;" |
+ | | [[Hebreiska alfabetet|Hebreiska]] || <code>\aleph \beth \gimel \daleth</code> | ||
| <math>\aleph\ \beth\ \gimel\ \daleth</math> | | <math>\aleph\ \beth\ \gimel\ \daleth</math> | ||
|} | |} | ||
Rad 211: | Rad 215: | ||
== Parentessättning i långa uttryck == | == Parentessättning i långa uttryck == | ||
- | {| border=" | + | {| style="border: 1px solid #aaa;" cellspacing="5" cellpadding="4" |
- | |- | + | |- style="background: #e9e9e9;" |
! Funktion | ! Funktion | ||
! Syntax | ! Syntax | ||
Rad 218: | Rad 222: | ||
|----- | |----- | ||
| Mindre bra || ( \frac{1}{2} ) || <math>( \frac{1}{2} )</math> | | Mindre bra || ( \frac{1}{2} ) || <math>( \frac{1}{2} )</math> | ||
- | |- | + | |- style="background: #e9e9e9;" |
| Bättre || \left( \frac{1}{2} \right) | | Bättre || \left( \frac{1}{2} \right) | ||
| <math>\left ( \frac{1}{2} \right )</math> | | <math>\left ( \frac{1}{2} \right )</math> | ||
Rad 224: | Rad 228: | ||
<br><br>Du kan använda olika separatorer vid \left och \right: | <br><br>Du kan använda olika separatorer vid \left och \right: | ||
- | {| border=" | + | {| style="border: 1px solid #aaa;" cellspacing="5" cellpadding="4" |
- | |- | + | |- style="background: #e9e9e9;" |
! Funktion | ! Funktion | ||
! Syntax | ! Syntax | ||
Rad 231: | Rad 235: | ||
|----- | |----- | ||
| Parenteser || \left( A \right) || <math>\left( A \right)</math> | | Parenteser || \left( A \right) || <math>\left( A \right)</math> | ||
- | |- | + | |- style="background: #e9e9e9;" |
| Hakparenteser || \left[ A \right] || <math>\left[ A \right]</math> | | Hakparenteser || \left[ A \right] || <math>\left[ A \right]</math> | ||
|----- | |----- | ||
| Klammrar || \left\{ A \right\} || <math>\left\{ A \right\}</math> | | Klammrar || \left\{ A \right\} || <math>\left\{ A \right\}</math> | ||
- | |- | + | |- style="background: #e9e9e9;" |
| Vinkelparenteser || \left\langle A \right\rangle | | Vinkelparenteser || \left\langle A \right\rangle | ||
| <math>\left\langle A \right\rangle</math> | | <math>\left\langle A \right\rangle</math> | ||
|----- | |----- | ||
| Streck || \left| A \right| || <math>\left| A \right|</math> | | Streck || \left| A \right| || <math>\left| A \right|</math> | ||
- | |- | + | |- style="background: #e9e9e9;" |
| Använd \left. and \right. om du inte vill att separatorn ska synas: | | Använd \left. and \right. om du inte vill att separatorn ska synas: | ||
| \left. {A \over B} \right\} \to X | | \left. {A \over B} \right\} \to X | ||
Rad 250: | Rad 254: | ||
ibland kan man vilja kunna styra i detalj: | ibland kan man vilja kunna styra i detalj: | ||
- | {| border=" | + | {| style="border: 1px solid #aaa;" cellspacing="5" cellpadding="4" |
- | |- | + | |- style="background: #e9e9e9;" |
! Funktion | ! Funktion | ||
! Syntax | ! Syntax | ||
Rad 257: | Rad 261: | ||
|----- | |----- | ||
| double quad space || a \qquad b || <math>a \qquad b</math> | | double quad space || a \qquad b || <math>a \qquad b</math> | ||
- | |- | + | |- style="background: #e9e9e9;" |
| quad space || a \quad b || <math> a \quad b</math> | | quad space || a \quad b || <math> a \quad b</math> | ||
|----- | |----- | ||
| large space || a\ b || <math>a\ b</math> | | large space || a\ b || <math>a\ b</math> | ||
- | |- | + | |- style="background: #e9e9e9;" |
| medium space || a\;b || <math>a\;b</math> | | medium space || a\;b || <math>a\;b</math> | ||
|----- | |----- | ||
| small space || a\,b || <math>a\,b</math> | | small space || a\,b || <math>a\,b</math> | ||
- | |- | + | |- style="background: #e9e9e9;" |
| no space || ab || <math>ab\,</math> | | no space || ab || <math>ab\,</math> | ||
|----- | |----- |
Nuvarande version från 19 maj 2007 kl. 03.41
Sedan december 2007 kan TeX-kod användas för matematiska formler på Rilpedia. TeX skapar antingen PNG-bilder eller enkel HTML-kod, beroende på användarinställningar och komplexiteten hos uttrycket.
Matematiska märkord skrivs inom <math> ... </math>. Eventuella radbrytningar inom dessa <math>-taggar medför inga problem, då de inte visas alls. Det är t o m klokt att använda dessa radbrytningar för att hålla källkoden läslig (exempelvis genom att bryta raden efter varje term eller rad i en matris).
Diskutera buggrapporter och önskemål om nya funktioner på artikeldiskussion.
För frågor om stil när det gäller att skriva matematiska formler, se Rilpedia:Projekt matematik. Specifikt bör man undvika att använda denna finess mitt i en rad med vanlig text, eftersom formlerna inte placeras rätt och tecknens grad blir fel.
Innehåll |
Specialtecken
Funktion | Syntax | Hur den visas |
---|---|---|
decimalkomma (rätt) | 3,\!14159 |
![]() |
decimalkomma (fel) | 3,14159 |
![]() |
standardfunktioner (rätt) | \sin x + \ln y +\operatorname{sgn} z |
![]() |
standardfunktioner (fel) | sin x + ln y + sgn z |
![]() |
Derivata | \nabla \partial x dx |
![]() |
Mängder | \forall x\in \not\in\subseteq A\cap B\cup \exists \{x,y\} \times C |
![]() |
Logik | p\wedge \bar{q} \rightarrow p\vee \bar{q} \Rightarrow r |
![]() |
Kvadratrötter | \sqrt{2}\approx 1,\!4 |
![]() |
Högre ordnings rötter | \sqrt[n]{x} |
![]() |
Relationer | \sim \simeq \le \ge \equiv \approx \ne |
![]() |
Geometri | \angle \perp \| |
![]() |
Pilar (enkla) |
|
|
Pilar (Dubbla) |
|
|
Annat | \oplus \otimes \pm \mp \hbar \dagger \ddagger \star \circ \cdot \bullet |
![]() |
Exponenter, index
Funktion | Syntax | Hur den visas |
---|---|---|
Exponent | a^2 |
a2 |
Index | a_2 |
a2 |
Gruppering | a^{2+2} |
a2 + 2 |
a_{i,j} |
ai,j | |
Kombinationer av "sub" och "super" | x_2^3 |
![]() |
Derivata (bra) | x' |
x' |
Derivata (acceptabelt) | x^\prime |
![]() |
Derivata (fel) | x\prime |
![]() |
Under och överlinjer | \hat a \bar b \vec c \widehat {d e f} \overline {g h i} \underline {j k l} |
![]() |
Summa | \sum_{k=1}^N k^2 |
![]() |
Produkt | \prod_{i=1}^N x_i |
![]() |
Gränsvärde | \lim_{n \to \infty}x_n |
![]() |
Integral | \int_{-N}^{N} e^x\, dx |
![]() |
Linjeintegral | \oint_{C} x^3\, dx + 4y^2\, dy |
![]() |
Bråk, matriser, uttryck på flera rader
Funktion | Syntax | Hur den visas |
---|---|---|
Bråk | \frac{2}{4} eller {2 \over 4} |
![]() |
Binomialkoefficienter | {n \choose k} |
![]() |
Matriser | \begin{pmatrix} x & y \\ z & v \end{pmatrix} |
![]() |
\begin{bmatrix} 0 & \cdots & 0 \\ \vdots &
|
![]() |
|
\begin{Bmatrix} x & y \\ z & v \end{Bmatrix} |
![]() |
|
\begin{vmatrix} x & y \\ z & v \end{vmatrix} |
![]() |
|
\begin{Vmatrix} x & y \\ z & v \end{Vmatrix} |
![]() |
|
\begin{matrix} x & y \\ z & v \end{matrix} |
![]() |
|
Fritext[1] |
|
![]() |
Ekvationer på flera rader | \begin{matrix}f(n+1)&=& (n+1)^2 \\ \ &
|
![]() |
[1]Notera att åäö och andra "specialtecken" för närvarande inte fungerar i math-omgivning.
Teckensnitt
Funktion | Syntax | Hur den visas |
---|---|---|
Grekiska bokstäver | \alpha \beta \gamma \Gamma \phi \Phi \Psi\ \tau \Omega |
![]() |
Dubbelskrift | x\in\mathbb{R}\sub\mathbb{C} |
![]() |
Dubbelskrift | \mathbb{ABC} |
![]() |
Fet stil | \mathbf{x}\cdot\mathbf{y} = 0 |
![]() |
Fet stil (grekiska) | \boldsymbol{\alpha+\beta+\gamma} |
![]() |
Frakturstil | \mathfrak{a} \mathfrak{B} |
![]() |
Skrivstil | \mathcal{ABC} |
![]() |
Hebreiska | \aleph \beth \gimel \daleth |
![]() |
Parentessättning i långa uttryck
Funktion | Syntax | Hur den visas |
---|---|---|
Mindre bra | ( \frac{1}{2} ) | ![]() |
Bättre | \left( \frac{1}{2} \right) | ![]() |
Du kan använda olika separatorer vid \left och \right:
Funktion | Syntax | Hur den visas |
---|---|---|
Parenteser | \left( A \right) | ![]() |
Hakparenteser | \left[ A \right] | ![]() |
Klammrar | \left\{ A \right\} | ![]() |
Vinkelparenteser | \left\langle A \right\rangle | ![]() |
Streck | A \right| | ![]() |
Använd \left. and \right. om du inte vill att separatorn ska synas: | \left. {A \over B} \right\} \to X | ![]() |
Teckenmellanrum
Observera att TeX hanterar de flesta fallen automatiskt, men ibland kan man vilja kunna styra i detalj:
Funktion | Syntax | Hur den visas |
---|---|---|
double quad space | a \qquad b | ![]() |
quad space | a \quad b | ![]() |
large space | a\ b | ![]() |
medium space | a\;b | ![]() |
small space | a\,b | ![]() |
no space | ab | ![]() |
negative space | a\!b | ![]() |
Se även
Externa länkar
- Ett PDF-dokument som förklarar grunderna i TeX - se sida 39 och framåt för en bra introduktion till att skriva matematiska formler i TeX: http://www.ctan.org/tex-archive/info/gentle/gentle.pdf