Zum Inhalt springen

Hilfe:TeX

aus Wikipedia, der freien Enzyklopädie
Dies ist eine alte Version dieser Seite, zuletzt bearbeitet am 19. Januar 2003 um 15:05 Uhr durch Nerd (Diskussion | Beiträge). Sie kann sich erheblich von der aktuellen Version unterscheiden.


Seit Januar 2003 haben wir TeX markup für mathematische Formeln in Wikipedia. Entweder werden PNG-Bilder oder einfacher HTML-Code generiert, abhängig von Benutzereinstellungen und der Komplexität des Ausdrucks. In Zukunft, wenn die Browser es unterstützen, wird es möglich sein, enhanced HTML zu generieren oder sogar in vielen Fällen eine Art XML für Mathematiker,MathML.

Formeln werden in "math"-Befehlen eingeschlossen: <math> ... </math>. Zeilenumbrüche innerhalb dieser tags sind erlaubt, werden aber nicht in ein Bild umgesetzt, "gerendert". Sie sind nützlich um den Code übersichtlich zu halten (z.B. eine Zeile für jeden Term oder Zeile einer Matrix).

Diskussionen, Bug Reports und Feature Requests sollten wohin gehen? Wikitech-l mailing list or to Wikipedia:TeX requests. (englisches Original)

For style issues regarding the typesetting of math, see Wikipedia:WikiProject Mathematics. In particular, please avoid using this feature as part of a line of regular text, as the formulas don't align properly and the font is too large.

die Sonderzeichen

Feature Syntax so siehts gerendert aus
std. functions (good)\sin x + \ln y +\operatorname{sgn} z
std. functions (wrong)sin x + ln y + sgn z
Derivatives \nabla \partial dx
Sets x\not\in\empty\subseteq A\cap B\cup \{x,y\}
Logic p\wedge \bar{q} \rightarrow p\vee \bar{q} \Rightarrow r
Root \sqrt{2}\approx\pm 1.4
\sqrt[n]{x}
Relations \cong \le \ge \equiv \approx \ne


Subscripts, superscripts

Feature Syntax so siehts gerendert aus
Superscript a^2
Subscript a_2
Grouping a^{2+2}
a_{i,j}
Combining sub & super x_2^3
Derivative (good) x'
Derivative (acceptable)x^\prime
Derivative (wrong) x\prime
Sum \sum_{k=1}^N k^2
Product \prod_{i=1}^N x_i
Limit \lim_{n \to \infty}x_n
Integral \int_{-N}^{N} e^x\, dx

Fractions, matrices, multilines

Fractions\frac{2}{4} or {2 \over 4}
Binomial coefficients{n \choose k}
Matrices \begin{pmatrix} x & y \\ z & v \end{pmatrix}
\begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0\end{bmatrix}
\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}
Case distinctionsf(n)=\left\{\begin{matrix} n/2, & \mbox{if }n\mbox{ is even} \\ 3n+1, & \mbox{if }n\mbox{ is odd} \end{matrix}\right.
Multiline equations\begin{matrix}f(n+1)&=& (n+1)^2 \\ \ & =& n^2 + 2n + 1\end{matrix}

Fonts

Griechische Buchstaben \alpha \beta \gamma \Gamma \phi \Phi
Blackboard boldx\in\mathbb{R}\sub\mathbb{C}
boldface (vectors)\mathbf{x}\cdot\mathbf{y} = 0
Fraktur typeface\mathfrak{a} \mathfrak{B}
Script\mathcal{ABC}
Hebräisch\aleph \beth

Parenthesizing big expressions

unschön ( \frac{1}{2} )
Besser \left( \frac{1}{2} \right)

You can use various delimiters with \left and \right:

Parentheses \left( A \right)
Brackets \left[ A \right]
Braces \left\{ A \right\}
Angle brackets \left\langle A \right\rangle
Bars \left| A \right|
Use \left. and \right. if you dont want a delimiter to appear: \left. A \over B \right\} \to X Fehler beim Parsen (SVG (MathML kann über ein Browser-Plugin aktiviert werden): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „http://localhost:6011/de.wikipedia.org/v1/“:): {\displaystyle \left. A \over B \right\} \to X}


Spacing

Für manuelle Kontrolle der Leerzeichen stellt Tex folgende Befehle zur Verfügung.

double quad space a \qquad b
quad space a \quad b
large spacea\ b
medium spacea\;b
small spacea\,b
no spaceab
negative spacea\!b

See also: