Aide:Formules TeX

Une nouvelle de Wikinews, la source d'informations que vous pouvez écrire.

plot
Cet article n'est pas fini. Veuillez considérer le plan et le contenu comme incomplets et en préparation, temporaires et sujets à caution. Si vous souhaitez participer, il vous est recommandé de consulter sa page de discussion au préalable.

Depuis janvier 2003, les formules mathématiques sur Wikinews peuvent être écrites avec le système TeX.

Cette syntaxe est beaucoup plus facile à écrire et à lire que l'HTML. Les formules sont présentées en HTML si possible, autrement une image PNG est produite par le serveur.

Les règles de base sont les suivantes :

  • les formules se mettent entre <math> ... </math> ;
  • les caractères + - = / ' | * < > ( ) peuvent être tapés directement ;
  • à l'intérieur d'une formule, on peut délimiter des groupes à l'aide d'accolades {}, pour grouper une expression en indice, par exemple. Pour obtenir une accolade dans le rendu, il faut donc taper \{ ou \}.

Sommaire

[modifier] Caractères spéciaux

Fonctionnalité Syntaxe À quoi ça ressemble
Accents

L'exemple ci-contre montre les différents accents sur la lettre o.

\hat o \acute o \ddot o \vec o \check o \grave o \breve o \widehat {abc} \tilde o \bar o \dot o \hat o \; \acute o \; \ddot o \; \vec o \; \check o \; \grave o \; \breve o \; \widehat {abc} \; \tilde o \; \bar o \; \dot o \;
Opérateurs binaires \star \times \circ \cdot \bullet \cap \cup \vee \wedge \oplus \otimes \triangle \vdots \ddots \star \times \circ \cdot \bullet \cap \cup \vee \wedge \oplus \otimes \triangle \vdots \ddots
\pm \mp \triangleleft \triangleright \pm \mp \; \triangleleft \; \triangleright
Opérateurs n-aires \sum \prod \coprod \int \oint \bigcup \bigcap \bigsqcup \bigvee \bigwedge \bigoplus \bigotimes \bigodot \biguplus \sum \prod \coprod \int \oint \bigcup \bigcap \bigsqcup \bigvee \bigwedge \bigoplus \bigotimes \bigodot \biguplus
Ellipses x + \cdots + y ou x + \ldots + y x + \cdots + y ou x + \ldots + y
Séparateurs ( ) [ ] \{ \} \lfloor \rfloor \lceil \rceil \langle \rangle / \backslash | \| \uparrow \Uparrow \downarrow \Downarrow \updownarrow \Updownarrow ( \; ) \; [ \; ] \; \{ \; \} \; \lfloor \; \rfloor \; \lceil \; \rceil \; \langle \; \rangle \; / \; \backslash \; | \; \| \; \uparrow \; \Uparrow \; \downarrow \; \Downarrow \;\updownarrow \Updownarrow
Fonctions std. (bien) \sin x + \ln y +\operatorname{sgn} z \sin x + \ln y +\operatorname{sgn} z
Fonctions std. (mal) sin x + ln y + sgn z sin x + ln y + sgn z\,
Fonctions trigonométriques \sin \cos \tan \operatorname{cotan} \sec \operatorname{cosec} \sin\ \cos\ \tan\ \operatorname{cotan}\ \sec\ \operatorname{cosec}\,
Fonctions trigonométriques inverses \operatorname{Arcsin} \operatorname{Arccos} \operatorname{Arctan} \operatorname{Arcsin}\ \operatorname{Arccos}\ \operatorname{Arctan},
Fonctions trigonométriques hyperboliques \operatorname{sh} \operatorname{ch} \operatorname{th} \operatorname{coth} \operatorname{sh}\ \operatorname{ch}\ \operatorname{th}\ \operatorname{coth},
Fonctions d'analyse \lim \sup \inf \limsup \liminf \log \ln \lg \exp \lim \sup \inf \limsup \liminf \log \ln \lg \exp \arg \min \max
Fonctions d'algèbre linéaire \det \deg \dim \hom \ker \det \deg \dim \hom \ker
Arithmétique modulaire s_k \equiv 0 \pmod{m} s_k \equiv 0 \pmod{m}
Dérivées \nabla \partial x \ dx \dot x \ddot y \nabla \ \partial x \ dx \dot x\ \ddot y
Ensembles \forall \exists \empty \varnothing \cap \cup \forall \exists \empty \varnothing \cap \cup
Logique p\wedge \land \bar{q} \to p\lor \lnot q \rightarrow p\vee p\wedge \land \bar{q} \to p\lor \lnot q \rightarrow p\vee
Racines \sqrt{2}\approx\pm 1,4 \sqrt{2}\approx\pm 1,4
\sqrt[n]{x} \sqrt[n]{x}
Relations \sim \simeq \cong \le \ge \equiv \not\equiv \approx = \propto  \sim \ \simeq \ \cong \ \le \ \ge \ \equiv \ \approx \ = \ \propto
Relations négativées \not\sim \not\simeq \not\cong \not\le \not\ge \not\equiv \not\approx \ne \not\propto  \not\sim \ \not\simeq \ \not\cong \ \not\le \ \not\ge \ \not\equiv \ \not\approx \ \ne \ \not\propto
Relations d'ensembles \subset \subseteq \supset \supseteq \in \ni \subset \; \subseteq \; \supset \; \supseteq \; \in \; \ni
Relations négativées \not\subset \not\subseteq \not\supset \not\supseteq \not\in \not\ni \not\subset \; \not\subseteq \; \not\supset \; \not\supseteq \; \not\in \; \not\ni
Géometrie \triangle \angle 45^\circ \triangle \ \angle \ 45^\circ
Flèches \leftarrow \rightarrow \leftrightarrow

\longleftarrow \longrightarrow
\mapsto \longmapsto
\nearrow \searrow \swarrow \nwarrow

\leftarrow\ \rightarrow\ \leftrightarrow

\longleftarrow\ \longrightarrow \mapsto\ \longmapsto \nearrow\ \searrow\ \swarrow\ \nwarrow

\Leftarrow \Rightarrow \Leftrightarrow

\Longleftarrow \Longrightarrow \Longleftrightarrow

\Leftarrow\ \Rightarrow\ \Leftrightarrow

\Longleftarrow\ \Longrightarrow\ \Longleftrightarrow

Symboles divers \hbar \wr \dagger \ddagger \infty \vdash \top \bot \models \vdots \ddots \imath \ell \Re \Im \wp \mho \pm \mp \hbar \wr \dagger \ddagger

\infty \ \vdash \ \top \bot \models \vdots \ddots \imath \; \ell \; \Re \; \Im  \; \wp \; \mho

[modifier] Indices, exposants

Fonctionnalité Syntaxe À quoi ça ressemble
en HTML en PNG
Exposant a^2 a2 a^2 \,\!
Indice a_2 a2 a_2 \,\!
Regroupement a^{2+2} a2 + 2 a^{2+2} \,\!
a_{i,j} ai,j a_{i,j} \,\!
Combiner indice et exposant x_2^3 x_2^3 x_2^3 \,\!
Indice et exposant précédents {}_1^2\!X_3^4 {}_1^2\!X_3^4
Dérivée (bon) x' x' x' \,\!
Dérivée (mauvais en HTML) x^\prime x^\prime x^\prime \,\!
Dérivée (mauvais en PNG) x\prime x\prime x\prime \,\!
Dérivées temporelles \dot{x}, \ddot{x} \dot{x}, \ddot{x}
Soulignés et surlignés \hat a \bar b \vec c \overline {g h i} \underline {j k l} \hat a \ \bar b \ \vec c\ \overline {g h i} \ \underline {j k l}
Vecteurs et angles \vec U \overrightarrow{AB} \widehat {POQ} \vec U\ \ \overrightarrow{AB}\ \ \widehat {POQ}
Somme \sum_{k=1}^N k^2 \sum_{k=1}^N k^2
Produit \prod_{i=1}^N x_i \prod_{i=1}^N x_i
Limite \lim_{n \to \infty}x_n \lim_{n \to \infty}x_n
Intégrale indéfinie ou définie \int \frac{1}{1+t^2}\, dt \int_{-N}^{N} e^x\, dx \int \frac{1}{1+t^2}\, dt \int_{-N}^{N} e^x\, dx
Intégrale curviligne \oint_{C} x^3\, dx + 4y^2\, dy \oint_{C} x^3\, dx + 4y^2\, dy
Intégrale double \iint e^{-\frac{x^2+y^2}{2}\, dx dy \iint e^{-\frac{x^2+y^2}{2}}\, dx dy
Intersections \bigcap_1^{n} p \bigcap_1^{n} p
Réunions \bigcup_1^{k} p \bigcup_1^{k} p


[modifier] Fractions, matrices, plusieurs lignes

Fractions \frac{2}{4} ou {2 \over 4} \frac{2}{4} ou {2 \over 4}
Coefficients binomiaux, combinaisons {n \choose k} ou C_n^k {n \choose k} ou C_n^k
Matrices \begin{pmatrix} x & y \\ z & v \end{pmatrix} \begin{pmatrix} x & y \\ z & v \end{pmatrix}
\begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0\end{bmatrix} \begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0\end{bmatrix}
\begin{Bmatrix} x & y \\ z & v \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{Vmatrix} x & y \\ z & v \end{Vmatrix} \begin{Vmatrix} x & y \\ z & v \end{Vmatrix}
\begin{matrix} x & y \\ z & v \end{matrix} \begin{matrix} x & y \\ z & v \end{matrix}
Distinctions de cas f(n)=\left\{\begin{matrix} n/2, & \mbox{si }n\mbox{ est pair} \\ 3n+1, & \mbox{si }n\mbox{ est impair} \end{matrix}\right. f(n)=\left\{\begin{matrix} n/2, & \mbox{si }n\mbox{ est pair} \\ 3n+1, & \mbox{si }n\mbox{ est impair} \end{matrix}\right.
Équations sur plusieurs lignes \begin{matrix}f(n+1)&=& (n+1)^2 \\ \ & =& n^2 + 2n + 1\end{matrix} \begin{matrix}f(n+1)&=& (n+1)^2 \\ \ & =& n^2 + 2n + 1\end{matrix}


[modifier] Jeux de caractères

Lettres grecques minuscules (sans omicron !) \alpha \beta \gamma \delta \epsilon \varepsilon \zeta \eta \theta \iota \kappa \lambda \mu \nu \xi o \pi \varpi \rho \sigma \varsigma \tau \upsilon \phi \varphi \chi \psi \omega \alpha\; \beta\; \gamma\; \delta\; \epsilon\; \varepsilon\; \zeta\; \eta\; \theta\; \iota\; \kappa\; \lambda\; \mu\; \nu\,

\xi\; o\; \pi\; \varpi\; \rho\; \sigma\; \varsigma\; \tau\; \upsilon\; \phi\; \varphi\; \chi\; \psi\; \omega \,

Lettres grecques majuscules (sans Omicron !) \Alpha \Beta \Gamma \Delta \Epsilon \Zeta \Eta \Theta \Iota \Kappa \Lambda \Mu \Nu \Xi O \Pi \Rho \Sigma \Tau \Upsilon \Phi \Chi \Psi \Omega \Alpha \; \Beta \; \Gamma \; \Delta \; \Epsilon \; \Zeta \; \Eta \; \Theta \; \Iota \; \Kappa \; \Lambda \; \Mu \,

\Nu \; \Xi\; O\; \Pi\; \Rho\; \Sigma\; \Tau\; \Upsilon\; \Phi\; \Chi\; \Psi\; \Omega\,

Ensembles usuels x\in\mathbb{R}\sub\mathbb{C} x\in\mathbb{R}\subset\mathbb{C}
gras (pour les vecteurs) \mathbf{x}\cdot\mathbf{y} = 0 \mathbf{x}\cdot\mathbf{y} = 0
Fraktur \mathfrak{a b c d e f g h i j k l m}

\mathfrak{n o p q r s t u v w x y z}
\mathfrak{A B C D E F G H I J K L M N}
\mathfrak{O P Q R S T U V W X Y Z}

\mathfrak{a b c d e f g h i j k l m}

\mathfrak{n o p q r s t u v w x y z}
\mathfrak{A B C D E F G H I J K L M N}
\mathfrak{O P Q R S T U V W X Y Z}

Gras \mathbf{ABCDEFGHIJKLM}

\mathbf{NOPQRSTUVWXYZ}

\mathbf{ABCDEFGHIJKLM}\,

\mathbf{NOPQRSTUVWXYZ}\,

Roman \mathrm{ABCDEFGHIJKLM}

\mathrm{NOPQRSTUVWXYZ}

\mathrm{ABCDEFGHIJKLM}\,

\mathrm{NOPQRSTUVWXYZ}\,

normal ABCDEFGHIJKLM

NOPQRSTUVWXYZ

ABCDEFGHIJKLM \,

NOPQRSTUVWXYZ \,

Script \mathcal{ABCDEFGHIJKLM}

\mathcal{NOPQRSTUVWXYZ}

\mathcal{ABCDEFGHIJKLM},

\mathcal{NOPQRSTUVWXYZ}\,

Hébreu \aleph \beth \daleth \gimel \aleph \; \beth \; \daleth \; \gimel


[modifier] Délimiteurs dans les grandes équations

Mauvais ( \frac{1}{2} ) ( \frac{1}{2} )
Mieux \left ( \frac{1}{2} \right ) \left ( \frac{1}{2} \right )


\left et \right peuvent être utilisés avec divers délimiteurs :

Parenthèses \left( A \right) \left( A \right)
Crochets \left[ A \right] \left[ A \right]
Accolades \left\{ A \right\} \left\{ A \right\}
Chevrons \left\langle A \right\rangle \left\langle A \right\rangle
Barres (de valeur absolue, par exemple) \left| A \right| \left| A \right|
Utilisez \left. et \right. pour ne faire apparaître qu'un seul des délimiteurs \left. {A \over B} \right\} \to X \left. {A \over B} \right\} \to X

[modifier] Espacement

TeX gère automatiquement la plupart des problèmes d'espacement, mais vous pouvez souhaiter contrôler l'espacement manuellement dans certains cas.

double cadratin a \qquad b a \qquad b
cadratin a \quad b  a \quad b
grand espace a\ b a\ b
espace moyenne a\;b a\;b
espace fine a\,b a\,b
pas d'espacement ab ab\,
espacement négatif a\!b a\!b


[modifier] Astuce

Pour forcer une formule à la pleine taille, il suffit d'ajouter une espace fine en fin de formule : \, (contre-oblique virgule )

<math>a(1+e^2/2)</math> donne a(1 + e2 / 2)
<math>a(1+e^2/2)\,</math> donne a(1+e^2/2)\,


[modifier] Voir aussi

[modifier] Lien interne

[modifier] Liens externes

| Bienvenue | Contribuer | Discuter | Pages à suivre | Règles | Wikinewsiens | Pages méta
Syntaxe Wikinews | Caractères spéciaux | Accents | Couleurs | Les tableaux


Lien ancré | Liens externes | Premiers pas | Liens d'interlangue | Ajouter du contenu | Comment rédiger un article journalistique | Modèles de page
Ressources libres de droit | Formules TeX | Modèles | Liste des modèles dynamique