Aide:Formules TeX

De testwiki
Version datée du 17 avril 2008 à 11:02 par imported>Bapti (-Catégorie:TeX)
(diff) ← Version précédente | Version actuelle (diff) | Version suivante → (diff)
Aller à la navigation Aller à la recherche

Modèle:Pas fini

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 \}.

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 o^o´o¨ooˇo`o˘abc^o~o¯o˙
Opérateurs binaires \star \times \circ \cdot \bullet \cap \cup \vee \wedge \oplus \otimes \triangle \vdots \ddots ×
\pm \mp \triangleleft \triangleright ±
Opérateurs n-aires \sum \prod \coprod \int \oint \bigcup \bigcap \bigsqcup \bigvee \bigwedge \bigoplus \bigotimes \bigodot \biguplus
Ellipses x + \cdots + y ou x + \ldots + y x++y ou x++y
Séparateurs ( ) [ ] \{ \} \lfloor \rfloor \lceil \rceil \langle \rangle / \backslash | \| \uparrow \Uparrow \downarrow \Downarrow \updownarrow \Updownarrow ()[]{}/|
Fonctions std. (bien) \sin x + \ln y +\operatorname{sgn} z sinx+lny+sgnz
Fonctions std. (mal) sin x + ln y + sgn z sinx+lny+sgnz
Fonctions trigonométriques \sin \cos \tan \operatorname{cotan} \sec \operatorname{cosec} sin cos tan cotan sec cosec
Fonctions trigonométriques inverses \operatorname{Arcsin} \operatorname{Arccos} \operatorname{Arctan} Arcsin Arccos Arctan,
Fonctions trigonométriques hyperboliques \operatorname{sh} \operatorname{ch} \operatorname{th} \operatorname{coth} sh ch th coth,
Fonctions d'analyse \lim \sup \inf \limsup \liminf \log \ln \lg \exp limsupinflim suplim infloglnlgexpargminmax
Fonctions d'algèbre linéaire \det \deg \dim \hom \ker detdegdimhomker
Arithmétique modulaire s_k \equiv 0 \pmod{m} sk0(modm)
Dérivées \nabla \partial x \ dx \dot x \ddot y  x dxx˙ y¨
Ensembles \forall \exists \empty \varnothing \cap \cup
Logique p\wedge \land \bar{q} \to p\lor \lnot q \rightarrow p\vee pq¯p¬qp
Racines \sqrt{2}\approx\pm 1,4 2±1,4
\sqrt[n]{x} xn
Relations \sim \simeq \cong \le \ge \equiv \not\equiv \approx = \propto        = 
Relations négativées \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
Relations négativées \not\subset \not\subseteq \not\supset \not\supseteq \not\in \not\ni ⊄⊈⊅⊉∉∌
Géometrie \triangle \angle 45^\circ   45
Flèches \leftarrow \rightarrow \leftrightarrow

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

  

       

\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 ±

  ı

Indices, exposants

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


Fractions, matrices, plusieurs lignes

Fractions \frac{2}{4} ou {2 \over 4} 24 ou 24
Coefficients binomiaux, combinaisons {n \choose k} ou C_n^k (nk) ou Cnk
Matrices \begin{pmatrix} x & y \\ z & v \end{pmatrix} (xyzv)
\begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0\end{bmatrix} [0000]
\begin{Bmatrix} x & y \\ z & v \end{Bmatrix} {xyzv}
\begin{vmatrix} x & y \\ z & v \end{vmatrix} |xyzv|
\begin{Vmatrix} x & y \\ z & v \end{Vmatrix} xyzv
\begin{matrix} x & y \\ z & v \end{matrix} xyzv
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)={n/2,si n est pair3n+1,si n est impair
Équations sur plusieurs lignes \begin{matrix}f(n+1)&=& (n+1)^2 \\ \ & =& n^2 + 2n + 1\end{matrix} f(n+1)=(n+1)2 =n2+2n+1


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 αβγδϵεζηθικλμν<br\>

ξoπϖρσςτυϕφχψω

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 ABΓΔEZHΘIKΛM<br\>

NΞOΠPΣTΥΦXΨΩ

Ensembles usuels x\in\mathbb{R}\sub\mathbb{C} x
gras (pour les vecteurs) \mathbf{x}\cdot\mathbf{y} = 0 𝐱𝐲=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}

𝔞𝔟𝔠𝔡𝔢𝔣𝔤𝔥𝔦𝔧𝔨𝔩𝔪

𝔫𝔬𝔭𝔮𝔯𝔰𝔱𝔲𝔳𝔴𝔵𝔶𝔷
𝔄𝔅𝔇𝔈𝔉𝔊𝔍𝔎𝔏𝔐𝔑
𝔒𝔓𝔔𝔖𝔗𝔘𝔙𝔚𝔛𝔜

Gras \mathbf{ABCDEFGHIJKLM}

\mathbf{NOPQRSTUVWXYZ}

𝐀𝐁𝐂𝐃𝐄𝐅𝐆𝐇𝐈𝐉𝐊𝐋𝐌

𝐍𝐎𝐏𝐐𝐑𝐒𝐓𝐔𝐕𝐖𝐗𝐘𝐙

Roman \mathrm{ABCDEFGHIJKLM}

\mathrm{NOPQRSTUVWXYZ}

ABCDEFGHIJKLM

NOPQRSTUVWXYZ

normal ABCDEFGHIJKLM

NOPQRSTUVWXYZ

ABCDEFGHIJKLM

NOPQRSTUVWXYZ

Script \mathcal{ABCDEFGHIJKLM}

\mathcal{NOPQRSTUVWXYZ}

𝒜𝒞𝒟𝒢𝒥𝒦,

𝒩𝒪𝒫𝒬𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵

Hébreu \aleph \beth \daleth \gimel


Délimiteurs dans les grandes équations

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


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

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

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 ab
cadratin a \quad b ab
grand espace a\ b a b
espace moyenne a\;b ab
espace fine a\,b ab
pas d'espacement ab ab
espacement négatif a\!b ab


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+e2/2)


Voir aussi

Lien interne

Liens externes

Modèle:Contribuer