You are on page 1of 36

1 Gnralits sur T

E
X et L
A
T
E
X
1.1 Principe de base
Fichier source compilation (pdfL
A
T
E
X) chier pdf
Cest du WYSIWYG (What You See Is What You Get). . . asynchrone !
Quest-ce que L
A
T
E
X? Cest la fois un langage et un moteur pour composer des textes, destins une
sortie sur imprimante, et depuis peu produire des chiers pdf avec interactivit.
La rdaction du chier source seectue avec un diteur de texte quelconque (vi, Emacs, Nedit, pico, Kile,
TeXShop, Kwrite, ...). Ces diteurs peuvent aider la rdaction, la compilation et la visualisation.
1.2 Conseils
> Deux moteurs possibles. Avec L
A
T
E
X, on ne peut inclure que des eps. Avec pdfL
A
T
E
X, il est possible
dinclure des photos jpg, png et des graphiques pdf. Utiliser la commande eps2pdf.
> Choisir un bon diteur pour grer le chier source (emacs, TeXShop, Kile, . . .).
> Compiler relativement souvent pour viter laccumulation derreurs
> Regarder le log de la compilation, cest une mine dinformation sur la qualit du chier source et sur
la faon dont L
A
T
E
X le comprend.
> Mettez-vous jour sur les macros de L
A
T
E
X2e, en liminant les vieilleries de L
A
T
E
X2.09 : incompatibilit,
fonctionnalits non assures,. . . Pas de souci pour ceux qui se mettent L
A
T
E
X aujourdhui !
> Pour les gros projets, dcouper le chier source en petits chiers sources (par chapitres par exemple),
et crer un chier matre :
...
\include{chapitre1}
\include{chapitre2}
...
1.3 Les macros et les environnements
T
E
X et L
A
T
E
X utilisent des macros pour fonctionner. Il est possible den dnir soi-mme (voir plus loin).
> Certaines macros sont simples : \alpha est une macro qui produit (en mode mathmatique).
> Certaines macros fonctionnent avec un ou plusieurs arguments :
\section{Ma section} pour dmarrer une section.
\frac{a \times b}{c - d} pour produire des fractions en mathmatique :
ab
cd
en mode \textstyle, et en mode \displaystyle :
a b
c d
> Certaines macros ont des arguments optionnels, ventuellement en plus darguments obligatoires :
\pagebreak[number], number transforme votre demande en requte (0 = cool, . . ., 4 = on simpose !).
\section[Ma section\dots]{Ma section a un titre trs long}, largument optionnel est utilis
dans la table des matires et dans lentte de la page.
L
A
T
E
X introduit la notion denvironnement : \begin{env} ... \end{env}. Il faut y entrer et en sortir !
env = equation, center, abstract, figure, flushleft, minipage, tabular, enumerate,...
> Il y a des environnements avec arguments, y compris optionnels.
> Certaines fonctionnalits semblent disponibles sous formes de macros ou denvironnements :
\begin{center} ... \end{center} et \centering{...}.
En ralit, il y a souvent des dirences : nouveau paragraphe, espaces verticaux avant et aprs,. . .
En T
E
X pur, on a la possibilit de dnir de macros avec la commande \def. Elle ne permet pas les arguments
optionnels.
Caractres rservs : \ $ & % # _ { } ~ ^
1.4 Linstallation sur lordinateur
Toute linstallation des chiers utiliss par T
E
X, L
A
T
E
X et les autres logiciels associs (metafont, metapost,. . .)
est structure dans des dossiers texmf.
> Il y a plusieurs dossiers texmf, chacun reproduit la mme hirarchie, mais pas avec les mmes chiers !
> Linstallation principale et fondamentale se fait dans un texmf auquel personne nest cens toucher. . .
donc on nen parle plus ! Dautant plus quil peut y en avoir plusieurs !
/usr/local/teTeX/share/texmf/, /usr/local/teTeX/share/texmf.tetex/
> Ladministrateur de la machine peut installer des chiers complmentaires linstallation fondamentale
dans un dossier texmf.local. Tout apport dans ce dossier est utilisable par tous les utilisateurs de la
machine.
/usr/local/teTeX/share/texmf.local/
> Chaque utilisateur dispose de son propre dossier texmf, dans son $HOME. Il peut y dposer les chiers
quil veut, il est le seul pouvoir les utiliser.
> Par principe, L
A
T
E
X & Co. cherchent en priorit le chier souhait dans le dossier courant de travail
(celui du chier source), puis dans le dossier texmf de lutilisateur, puis dans texmf.local, enn dans
le texmf fondamental. Par consquent, tout chier dans VOTRE texmf est prioritaire. On trouvera
dans le chier log la liste des chiers trouvs et leur chemin.
> Pour du temps lors de la recherche dun chier dans ces immenses dossiers, chaque dossier texmf com-
porte un chier ls-R, qui contient toute la liste hirarchique des chiers quil renferme. Par consquent,
lorsquon ajoute un chier dans un tel dossier, il faut actualiser le chier ls-R. Cest facile, il faut et
il sut de taper la commande texhash dans un terminal. Mme si vous ntes pas ladministrateur de
la machine !
> En gnral, les chiers que vous aurez installer sont des .sty. Ils se placent dans le dossier :
texmf/tex/latex/ pour le texmf auquel vous avez accs.
Dmonstration et exploration dun tel dossier texmf. . .
1.5 Les dirents types de chiers
. . . aprs vous avoir donn un aperu de ce quon peut y trouver !
> Des chiers textes, dans lesquels on peut reconnatre des macros, des dnitions, de T
E
X ou
L
A
T
E
X. . . : .sty, .cls, . . .
> Des chiers (des milliers !) qui dcrivent les polices de caractres. Car T
E
X nutilise pas les polices
rsidentes sur lordinateur, mais ses propres polices, installes avec lui. . . Pour dcrire ces polices,
constitues de caractres , il faut dirents types de chiers : bien sr le dessin des caractres tels
quils apparaissent lcran ou sur le papier, mais aussi leur mtrique (leurs direntes dimensions),
leur place dans un tableau (chaque caractre a une case bien attribu qui permet de le retrouver
facilement. . . or il ny pas de casier universel. . .), . . .
> Des chiers de conguration de linstallation. Vous pouvez en personnaliser certains, mais seulement
si vous les placez dans votre texmf bien sr.
> De la documentation ! Dans les texmf vous trouverez un dossier doc. Chaque package est souvent
distribu avec une documentation.
1.6 O trouver des chiers installer ?
Pour rentrer chez vous, une seule adresse : la vtre . . . Publicit de Francis Blanche.
> Un seul et unique site Internet : le CTAN, Comprehensive TeX Archive Network
> Deux interfaces possibles (je prfre la seconde !) :
www.ctan.org ou texcatalogue.sarovar.org/
> Pour de la documentation en gnral :
texcatalogue.sarovar.org/bytopic.html
> Les livres permettent de savoir ce qui existe et dobtenir une documentation.
2 Les packages usuels dun chier source
2.1 Un modle de chier source
\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{textcomp}
\usepackage[a4paper,tmargin=3cm,bmargin=3cm,rmargin=2.2cm,lmargin=2.2cm]{geometry}
\usepackage{amssymb,amsmath}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage[french]{babel}
...
\pagestyle{headings}
\begin{document}
Mon texte\dots
\end{document}
> Ne plus utiliser \documentstyle, qui date de L
A
T
E
X2.09. . . On en est L
A
T
E
X2e depuis 1995 au moins !
> Comme vous le savez, il y a diverses classes : article, report, book. . .
La dirence ? Pas de chapitre dans article, pas de partie dans report. . .
Autres classes dnies dans dautres packages : amsart, beamer, KOMA-script, memoir. . .
> Les options de la classe peuvent modier le rendu : la taille des caractres (ici 12pt), la taille du papier
(a4paper), twocolumn, twoside, fleqn, leqno, . . . Se reporter la documentation de la classe utilise.
> Les autres packages seront voqus par la suite.
(Ceci sera utilis par la suite)
2.2 Le package inputenc
\usepackage[latin1]{inputenc} est lencodage en entre. Il vous permet de taper votre code source avec
des accents. latin1 fait rfrence ISO Latin1, lencodage utilis sur Linux.
Il existe plusieurs encodages des lettres accentues, souvent a dpend du systme dexploitation.
Sur Linux, dhabitude, cest ISO Latin1, et le latin1 y fait rfrence (vrier que votre diteur sauve en
ISO Latin1).
Sur Windows, cest souvent Windows ANSI, et loption correspondante pour inputenc est ansinew.
Sur Mac, ctait loption applemac, mais maintenant on peut utiliser nimporte quel encodage.
Aujourdhui, les diteurs savent en gnral interprter dirents encodages. Le mieux est alors de se conformer
au standard UNICODE, (en ralit un sous ensemble, UTF-8, sut pour nos langues occidentales), quon peut
utiliser aussi avec L
A
T
E
X (\usepackage[utf8x]{inputenc}), mais il faut installer un package supplmentaire.
Ce package a quelques dfaults, et je ne conseille pas de lutiliser si tout fonctionne bien avec ISO Latin1. . .
Disponible en cliquant ici.
Une remarque : si vous recevez un chier source dans un encodage exotique, quil sache mal lcran (les
lettres accentues sont remplaces par des hiroglyphes bizarres), la compilation est cependant correcte si
inputenc la bonne option.
Une seconde remarque : il est possible dutiliser plusieurs encodages en entre !
Utiliser la commande \inputencoding{encodage}.
2.3 Le package fontenc
An davoir un rendu correct au niveau du franais, utiliser \usepackage[T1]{fontenc}
2.3.1 Voici un texte avec des accents taps normalement, encodage T1 :
Le texte source : Dun mal il tomba dans un pire, et se vit rduit la fin
jener et mourir de faim. Il en cote qui vous rclame,
mdecins du corps et de lme. temps, murs ! Jai beau
crier, tout le monde se fait payer.
hbtes hbtes hbtes hbtes hbtes hbtes
hbtes hbtes hbtes hbtes hbtes hbtes
hbtes hbtes hbtes hbtes hbtes hbtes
hbtes hbtes hbtes hbtes hbtes hbtes
hbtes hbtes hbtes hbtes
Le rendu : Dun mal il tomba dans un pire, et se vit rduit la n jener
et mourir de faim. Il en cote qui vous rclame, mdecins
du corps et de lme. temps, murs ! Jai beau crier, tout
le monde se fait payer.
hbtes hbtes hbtes hbtes hbtes hbtes hb-
tes hbtes hbtes hbtes hbtes hbtes hbtes
hbtes hbtes hbtes hbtes hbtes hbtes hb-
tes hbtes hbtes hbtes hbtes hbtes hbtes
hbtes hbtes
2.3.2 Le mme texte avec des accents taps la T
E
X, encodage T1 :
Le texte source : Dun mal il tomba dans un pire, et se vit r\eduit \a la
fin \a je\^uner et mourir de faim. Il en co\^ute \a qui
vous r\eclame, m\edecins du corps et de l\^ame. \^O temps,
\^o m\oe urs ! Jai beau crier, tout le monde se fait payer.
h\eb\et\ees h\eb\et\ees h\eb\et\ees h\eb\et\ees
h\eb\et\ees h\eb\et\ees h\eb\et\ees h\eb\et\ees
h\eb\et\ees h\eb\et\ees h\eb\et\ees h\eb\et\ees
h\eb\et\ees h\eb\et\ees h\eb\et\ees h\eb\et\ees
h\eb\et\ees h\eb\et\ees h\eb\et\ees h\eb\et\ees
h\eb\et\ees h\eb\et\ees h\eb\et\ees h\eb\et\ees
h\eb\et\ees h\eb\et\ees h\eb\et\ees h\eb\et\ees
Le rendu : Dun mal il tomba dans un pire, et se vit rduit la n jener
et mourir de faim. Il en cote qui vous rclame, mdecins
du corps et de lme. temps, murs ! Jai beau crier, tout
le monde se fait payer.
hbtes hbtes hbtes hbtes hbtes hbtes hb-
tes hbtes hbtes hbtes hbtes hbtes hbtes
hbtes hbtes hbtes hbtes hbtes hbtes hb-
tes hbtes hbtes hbtes hbtes hbtes hbtes
hbtes hbtes
2.3.3 Le mme texte avec des accents taps normalement, encodage OT1 :
Le rendu : Dun mal il tomba dans un pire, et se vit reduit ` a la n ` a je uner
et mourir de faim. Il en co ute `a qui vous reclame, medecins
du corps et de l ame.

O temps, o murs ! Jai beau crier, tout
le monde se fait payer.
hebetees hebetees hebetees hebetees hebetees hebetees
hebetees hebetees hebetees hebetees hebetees hebetees
hebetees hebetees hebetees hebetees hebetees hebetees
hebetees hebetees hebetees hebetees hebetees hebetees
hebetees hebetees hebetees hebetees
Rappel du rendu en encodage T1 : Dun mal il tomba dans un pire, et se vit rduit la n jener
et mourir de faim. Il en cote qui vous rclame, mdecins
du corps et de lme. temps, murs ! Jai beau crier, tout
le monde se fait payer.
hbtes hbtes hbtes hbtes hbtes hbtes hb-
tes hbtes hbtes hbtes hbtes hbtes hbtes
hbtes hbtes hbtes hbtes hbtes hbtes hb-
tes hbtes hbtes hbtes hbtes hbtes hbtes
hbtes hbtes
e u
2.4 Le package babel
On peut composer des textes multilangues avec une dclaration du type
\usepackage[english,french]{babel} :
\selectlanguage{french} passe en franais,
\selectlanguage{english} passe en anglais.
Ici le texte est en franais. Les csures se font avec les rgles de la typographie franaise. Dautres particularits
sont actives, par exemple les doubles ponctuations ont un espace avant, les mots et expressions internes
sont franciss (chapitre, table des matires, liste des tableaux, . . .), les listes ne se prsentent pas de la mme
faon :
Lundi : cassoulet toulousain
Mardi : choucroute garnie
Mercredi : moules frites
\selectlanguage{english}
In english, lists are displayed like that:
Monday : Scones
Tuesday : Pizza
Wednesday : Fish and Chips
\selectlanguage{french} (retour au franais)
Le package babel gre peu prs toutes les langues, la vtre doit bien y tre. . .
2.5 Le package textcomp
\usepackage{textcomp} vous permet daccder des symboles usuels :
% *
$, le signe est trs moche. . .
Table 36: Miscellaneous textcomp Symbols
\textasteriskcentered
a
\textordfeminine
\textbardbl
o
\textordmasculine
\textbigcircle \textparagraph

\textblank \textperiodcentered
, \textbrokenbar \textpertenthousand
\textbullet \textperthousand
\textdagger

\textpilcrow
\textdaggerdbl

' \textquotesingle
\textdblhyphen \textquotestraightbase
\textdblhyphenchar \textquotestraightdblbase
` \textdiscount B \textrecipe
\textestimated \textreferencemark
\textinterrobang \textsection

\textinterrobangdown \textthreequartersemdash
\textmusicalnote \texttildelow
\textnumero \texttwelveudash
\textopenbullet
Where two symbols are present, the left one is the faked symbol that L
A
T
E
X2

provides by default, and the right one is the true symbol that textcomp makes
available.

Its generally preferable to use the corresponding symbol from Table 3 on page 7
because the symbols in that table work properly in both text mode and math mode.
Table 37: Miscellaneous wasysym Text-mode Symbols
\permil
18
3 Changement daspect des fontes
3.1 Dans le texte
L
A
T
E
X specication Font T
E
X font name
OT1 cmr m n 10 Computer Modern Roman 10 point cmr10
OT1 cmss m sl 1pc Computer Modern Sans Oblique 1 pica cmssi12
OML cmm m it 10pt Computer Modern Math Italic 10 point cmmi10
T1 ptm b it 1in Adobe Times Bold Italic 1 inch ptmb8t at 1in
These ve parameters are displayed whenever L
A
T
E
X gives an overfull box warn-
ing, for example:
Overfull \hbox (3.80855pt too wide) in paragraph at lines 314--318
[]\OT1/cmr/m/n/10 Normally [] and [] will be iden-ti-cal,
The author commands for fonts set the ve attributes:
Author command Attribute Value in article class
\textrm{..} or \rmfamily family cmr
\textsf{..} or \sffamily family cmss
\texttt{..} or \ttfamily family cmtt
\textmd{..} or \mdseries series m
\textbf{..} or \bfseries series bx
\textup{..} or \upshape shape n
\textit{..} or \itshape shape it
\textsl{..} or \slshape shape sl
\textsc{..} or \scshape shape sc
\tiny size 5pt
\scriptsize size 7pt
\footnotesize size 8pt
\small size 9pt
\normalsize size 10pt
\large size 12pt
\Large size 14.4pt
\LARGE size 17.28pt
\huge size 20.74pt
\Huge size 24.88pt
The values used by these commands are determined by the document class,
using the parameters dened in Section 2.4.
Note that there are no author commands for selecting new encodings. These
should be provided by packages, such as the fontenc package.
This section does not explain how L
A
T
E
X font specications are turned into T
E
X
font names. This is described in Section 4.
2.2 Selection commands
The low-level commands used to select a text font are as follows.
6
Banir jamais les vieilles commandes hrites de L
A
T
E
X2.09 :
\rm, \bf, \sl,\it, . . .
5.2 Polices et tailles des caractres 73
Tab. 5.1 Polices
\textrm{...} roman \textsf{...} sans serif
\texttt{...} typewriter
\textmd{...} medium \textbf{...} bold face
\textup{...} upright \textit{...} italic
\textsl{...} slanted \textsc{...} small caps
\emph{...} emphasised \textnormal{...} document font
Tab. 5.2 Tailles des polices
\tiny minuscule
\scriptsize trs petit
\footnotesize assez petit
\small petit
\normalsize normal
\large grand
\Large plus grand
\LARGE trs grand
\huge norme
\Huge gant
Tab. 5.3 Tailles en points dans les classes standard
taille 10pt (dfaut) option 11pt option 12pt
\tiny 5pt 6pt 6pt
\scriptsize 7pt 8pt 8pt
\footnotesize 8pt 9pt 10pt
\small 9pt 10pt 11pt
\normalsize 10pt 11pt 12pt
\large 12pt 12pt 14pt
\Large 14pt 14pt 17pt
\LARGE 17pt 17pt 20pt
\huge 20pt 20pt 25pt
\Huge 25pt 25pt 25pt
5.2 Polices et tailles des caractres 73
Tab. 5.1 Polices
\textrm{...} roman \textsf{...} sans serif
\texttt{...} typewriter
\textmd{...} medium \textbf{...} bold face
\textup{...} upright \textit{...} italic
\textsl{...} slanted \textsc{...} small caps
\emph{...} emphasised \textnormal{...} document font
Tab. 5.2 Tailles des polices
\tiny minuscule
\scriptsize trs petit
\footnotesize assez petit
\small petit
\normalsize normal
\large grand
\Large plus grand
\LARGE trs grand
\huge norme
\Huge gant
Tab. 5.3 Tailles en points dans les classes standard
taille 10pt (dfaut) option 11pt option 12pt
\tiny 5pt 6pt 6pt
\scriptsize 7pt 8pt 8pt
\footnotesize 8pt 9pt 10pt
\small 9pt 10pt 11pt
\normalsize 10pt 11pt 12pt
\large 12pt 12pt 14pt
\Large 14pt 14pt 17pt
\LARGE 17pt 17pt 20pt
\huge 20pt 20pt 25pt
\Huge 25pt 25pt 25pt
3.2 En mode mathmatique
3.2.1 Les commandes
5.2 Polices et tailles des caractres 73
Tab. 5.1 Polices
\textrm{...} roman \textsf{...} sans serif
\texttt{...} typewriter
\textmd{...} medium \textbf{...} bold face
\textup{...} upright \textit{...} italic
\textsl{...} slanted \textsc{...} small caps
\emph{...} emphasised \textnormal{...} document font
Tab. 5.2 Tailles des polices
\tiny minuscule
\scriptsize trs petit
\footnotesize assez petit
\small petit
\normalsize normal
\large grand
\Large plus grand
\LARGE trs grand
\huge norme
\Huge gant
Tab. 5.3 Tailles en points dans les classes standard
taille 10pt (dfaut) option 11pt option 12pt
\tiny 5pt 6pt 6pt
\scriptsize 7pt 8pt 8pt
\footnotesize 8pt 9pt 10pt
\small 9pt 10pt 11pt
\normalsize 10pt 11pt 12pt
\large 12pt 12pt 14pt
\Large 14pt 14pt 17pt
\LARGE 17pt 17pt 20pt
\huge 20pt 20pt 25pt
\Huge 25pt 25pt 25pt
5.2 Polices et tailles des caractres 73
Tab. 5.1 Polices
\textrm{...} roman \textsf{...} sans serif
\texttt{...} typewriter
\textmd{...} medium \textbf{...} bold face
\textup{...} upright \textit{...} italic
\textsl{...} slanted \textsc{...} small caps
\emph{...} emphasised \textnormal{...} document font
Tab. 5.2 Tailles des polices
\tiny minuscule
\scriptsize trs petit
\footnotesize assez petit
\small petit
\normalsize normal
\large grand
\Large plus grand
\LARGE trs grand
\huge norme
\Huge gant
Tab. 5.3 Tailles en points dans les classes standard
taille 10pt (dfaut) option 11pt option 12pt
\tiny 5pt 6pt 6pt
\scriptsize 7pt 8pt 8pt
\footnotesize 8pt 9pt 10pt
\small 9pt 10pt 11pt
\normalsize 10pt 11pt 12pt
\large 12pt 12pt 14pt
\Large 14pt 14pt 17pt
\LARGE 17pt 17pt 20pt
\huge 20pt 20pt 25pt
\Huge 25pt 25pt 25pt
3.2 En mode mathmatique
3.2.1 Les commandes
Commande Description Exemple
\mathnormal default abcXY Z
\mathrm roman abcXYZ
\mathbf gras roman abcXYZ
\mathsf sans srif abcXYZ
\mathit italique abcXYZ
\mathtt typewriter abcXYZ
\mathcal calligraphique ABCXYZ
\mathbb black board ABCXYZ
\mathfrak gothique abcXYZ
3.2.2 La commande boldsymbol
\boldsymbol(A) met le caractre A en gras (il faut tre dans le mode mathmatique). Fonctionne avec
nimporte que symbole mathmatique.
\boldsymbol{A} = \mathbf{A} : A = A
{\mathversion{bold} $A$} = $\boldsymbol{A}$ : A = A
Donc : {\bfseries\mathversion{bold} blabla} passe tout en gras, y compris les mathmatiques :
{\bfseries\mathversion{bold} la relation $0 = e^{2 i \pi} + 1 \neq \infty$ est juste !}
donne
la relation 0 = e
2i
+1 = est juste !
3.2.3 La commande text
Fonctionnalit de amsmath : en mode mathmatique, on peut taper du texte normal en utilisant la com-
mande \text{mon texte insrer}, y compris les accents. Prfrer cette macro \mbox{...} et
\mathrm{...} :
\begin{equation*}
0 \neq 1 \text{ est vident !}
\end{equation*}
donne
0 = 1 est vident !
$A_\text{t} \neq A_{\mbox{t}} \neq A_{\mathrm{t}}$ : A
t
= A
t
= A
t
.
Taille du texte en mathmatique :
\textstyle : mode mathmatique dans le texte courant et dans les tableaux.

n
1
\displaystyle : mode mathmatique pour les quations display .
n

1
\scriptstyle : taille pour les indices et les exposants de premier niveau.
P
n
1
\scriptscriptstyle : taille pour les indices et exposants de niveaux suprieurs.
P
n
1
Banir jamais les vieilles commandes hrites de L
A
T
E
X2.09
3.2.2 Les commandes boldsymbol et mathversion
\boldsymbol(A) met le caractre A en gras (il faut tre dans le mode mathmatique). Fonctionne avec
nimporte que symbole mathmatique.
\boldsymbol{A\infty}+ $\neq$ \verb+\mathbf{A\infty}+ $\neq$ \verb+A\infty

A= A = A
{\mathversion{bold} $A\infty$} = $\boldsymbol{A\infty}$ = {\boldmath $A\infty$}

A= A= A
Contraire de \mathversion{bold} : \mathversion{normal}
Donc : {\bfseries\mathversion{bold} blabla} passe tout en gras, y compris les mathmatiques :
{\Large\bfseries\mathversion{bold} la relation $e^{i \pi} + 1 = 0$ est trs belle !}

la relation e
i
+ 1 = 0 est trs belle !
It is common to use a thin space (\,) between the words of a multiword operators, as in
\DeclareMathOperator*{\argmax}{arg\,max}. \liminf, \limsup, and all of the log-like symbols shown
in Table 97 utilize this spacing convention.
7.4 Bold mathematical symbols
L
A
T
E
X does not normally use bold symbols when typesetting mathematics. However, bold symbols are occa-
sionally needed, for example when naming vectors. Any of the approaches described at http://www.tex.ac.uk/
cgi-bin/texfaq2html?label=boldgreek can be used to produce bold mathematical symbols. Table 231
contrasts the output produced by these various techniques. As the table illustrates, these techniques exhibit
variation in their formatting of Latin letters (upright vs. italic), formatting of Greek letters (bold vs. normal),
formatting of operators and relations (bold vs. normal), and spacing.
Table 231: Producing bold mathematical symbols
Package Code Output
none $\alpha + b = \Gamma \div D$ +b = D (no bold)
none $\mathbf{\alpha + b = \Gamma \div D}$ +b = D
none \boldmath$\alpha + b = \Gamma \div D$ +b = D
amsbsy $\pmb{\alpha + b = \Gamma \div D}$ +b = D +b = D +b = D (faked bold)
amsbsy $\boldsymbol{\alpha + b = \Gamma \div D}$ +b = D
bm $\bm{\alpha + b = \Gamma \div D}$ +b = D
xmath $\mathbold{\alpha + b = \Gamma \div D}$ +b = D
7.5 ASCII and Latin 1 quick reference
Table 232 on the next page amalgamates data from various other tables in this document into a convenient
reference for L
A
T
E
X2

typesetting of ASCII characters, i.e., the characters available on a typical U.S. computer
keyboard. The rst two columns list the characters ASCII code in decimal and hexadecimal. The third
column shows what the character looks like. The fourth column lists the L
A
T
E
X2

command to typeset the


character as a text character. And the fourth column lists the L
A
T
E
X2

command to typeset the character


within a \texttt{. . .} command (or, more generally, when \ttfamily is in eect).
The following are some additional notes about the contents of Table 232:
" is not available in the OT1 font encoding.
The characters <, >, and | do work as expected in math mode, although they produce, respectively,
, , and in text mode when using the OT1 font encoding.
8
The following are some alternatives
for typesetting <, >, and |:
Specify a document font encoding other than OT1 (as described on page 6).
Use the appropriate symbol commands from Table 2 on page 7, viz. \textless, \textgreater,
and \textbar.
Enter the symbols in math mode instead of text mode, i.e., $<$, $>$, and $|$.
Note that for typesetting metavariables many people prefer \textlangle and \textrangle to \textless
and \textgreater, i.e., lename instead of <lename>.
Although / does not require any special treatment, L
A
T
E
X additionally denes a \slash command
which outputs the same glyph but permits a line break afterwards. That is, increase/decrease is
always typeset as a single entity while increase\slash{}decrease may be typeset with increase/
on one line and decrease on the next.
8
Donald Knuth didnt think such symbols were important outside of mathematics so he omitted them from his text fonts.
75
3.2.3 La commande text
Fonctionnalit de amsmath : en mode mathmatique, on peut taper du texte normal en utilisant la com-
mande \text{mon texte insrer}, y compris les accents. Prfrer cette macro \mbox{...} et
\mathrm{...} :
\begin{equation*}
0 \neq 1 \text{ est vident !}
\end{equation*}
0 = 1 est vident !
$A_\text{t} \neq A_{\mbox{t}} \neq A_{\mathrm{t}}$

A
t
= A
t
= A
t
.
3.3 Un conseil. . .
Il est prfrable de sparer le fond de la forme. Pour a, viter de mettre directement les commandes de
changement daspect du texte dans le corps du document lorsque leur utilisation est rcurrente : dnitions,
rsultats, mettre en valeur quelque chose dimportant, . . .
Utiliser des macros (voir plus loin) dnies dans le prambule :
\definition{On appellera $1$ le plus petit entier strictement positif}
donne
On appellera 1 le plus petit entier strictement positif
avec la macro \newcommand{\definition}[1]{\textbf{\mathversion{bold}#1}}
Un changement de la macro dans le prambule change alors laspect de TOUTES les dnitions !
4 Une page L
A
T
E
X
4.1 La gomtrie de la page
Pour grer toutes ces dimensions, utiliser le package geo-
metry :
\usepackage[a4paper,tmargin=3cm,bmargin=3cm,
rmargin=2.2cm,lmargin=2.2cm]{geometry}
\usepackage[a4paper,landscape,textheight=23cm,
textwidth=17.5cm]{geometry}
La page actuelle a les caractristiques suivantes :
\paperwidth=597.50787pt,
\paperheight=845.04684pt,
\textwidth=284.52756pt,
\textheight=799.52228pt
Elle a t caractrise par les options suivantes :
papersize={20cm,15cm},tmargin=0.3cm,
bmargin=0.3cm,rmargin=0.3cm,lmargin=0.3cm
Un besoin de place passager ? Utiliser la commande
\enlargethispage{dimension} qui agrandit (ou rtr-
cit !) la page de dimension
5.4 Disposition dune page 79
Entte
Corps
Pied de page
Note dans
la marge
i
8
-
i
7
?
6
i
1
-
- i
3
i
10
-
- i
9
6
?
i
11
i
2
?
6
i
4
6
?
i
5
6
?
i
6
6
?
1 un pouce + \hoffset 2 un pouce + \voffset
3 \evensidemargin = 70pt 4 \topmargin = 22pt
5 \headheight = 13pt 6 \headsep = 19pt
7 \textheight = 595pt 8 \textwidth = 360pt
9 \marginparsep = 7pt 10 \marginparwidth = 106pt
11 \footskip = 27pt \marginparpush = 5pt (non affich)
\hoffset = 0pt \voffset = 0pt
\paperwidth = 597pt \paperheight = 845pt
Fig. 5.2 Paramtres de la disposition dune page
4.2 Le style de la page
\pagestyle{option}
\thispagestyle{option}
Spcie le style de la page partir
de la page courante, ou de la page
courante seulement.
1.7 Les chiers manipuls 13
1.7 Les chiers manipuls
Lutilisateur de L
A
T
E
X est amen cotoyer un grand nombre de chiers
aux suxes divers, chaque suxe renseigne sur le rle du chier, il est donc
utile den connatre la signication, voici les suxes les plus courants :
.tex chier source T
E
X ou L
A
T
E
X;
.sty chier contenant des commandes, que lon charge dans le prambule
dun document grce une commande \usepackage ;
.dtx chier contenant du code L
A
T
E
X (commandes) document, le lancement
de L
A
T
E
X sur un chier .dtx en extrait la documentation.
.ins chier permettant dinstaller le contenu du chier .dtx de mme nom.
Une extension L
A
T
E
X tlcharge de lInternet est compose dun chier
.dtx et dun .ins. Excuter L
A
T
E
X sur le chier .ins pour extraire les
chiers installer du .dtx.
.cls dsigne un chier de classe contenant la description dun type de docu-
ment, charg par la commande \documentclass;
.fd chier contenant des dnitions pour les polices de caractres ;
Les chiers suivants sont produits par L
A
T
E
X partir du chier source (de
suxe .tex) :
.dvi signie DeVice Independent, cest le chier que lon visualise lcran
et qui servira limpression (par dvips par exemple) ;
.log chier contenant le compte-rendu dtaill de la compilation du chier
source (avec les messages derreur ventuels),
.toc contient le matriel ncessaire la production de la table des matires,
si celle-ci a t demande ;
.lof contient la liste numrote des gures, si elle a t demande ;
.lot contient la liste numrote des tableaux, si elle a t demande ;
.aux contient diverses informations utiles L
A
T
E
X, en particulier ce qui est
ncessaire au fonctionnement des rfrences croises. Le chier .aux
produit lors dune excution de L
A
T
E
X est lu lors de lexcution sui-
vante ;
Tab. 1.4 Les styles de page de L
A
T
E
X
plain imprime le numro de page au milieu du pied de page. Cest le
style par dfaut.
headings imprime le titre du chapitre courant et le numro de page dans
len-tte de chaque page et laisse le pied de page vide. Cest peu
prs le style utilis dans ce document.
empty laisse len-tte et le pied de page vides.
\pagenumbering{numstyle} : spcie le style de la numrotation de la page.
numstyle = arabic, roman, Roman, alph, Alph.
4.3 Personnalisation du style de la page et autres. . .
Il est possible de personnaliser un peu lapparence dune page, ou le comportement de quelques automatismes
de L
A
T
E
X : la numrotation des chapitres, des sections. . ., la profondeur de la table des matires, . . .
En gnral, pour aller plus loin quun simple repltrage, il est prfrable (et plus agrable) dutiliser des
packages ddis :
> fancyhdr : Extensive control of page headers and footers in L
A
T
E
X2e.
> titlesec : A package providing an interface to sectioning commands for selection from various title
styles. E.g., marginal titles and to change the font of all headings with a single command, also providing
simple one-step page styles. Also includes a package to change the page styles when there are oats in
a page. You may assign headers/footers to individual oats, too.
> titletoc : A companion for titlesec handling toc/lof/lot entries.
Voir le livre disponible la bibliothque !
5 Les mathmatiques et le package amsmath
5.1 Les quations en displaystyle
$$...$$
2
_
1
0
xdx = 1
\[...\]
2
_
1
0
xdx = 1
\begin{displaymath}...\end{displaymath}
2
_
1
0
xdx = 1
\begin{equation*}...\end{equation*}
2
_
1
0
xdx = 1
> $$...$$ est la version T
E
X. Aucune gestion des numros et des labels. Aucun intrt si on veut travailler
en L
A
T
E
X.
> \[...\] = \begin{displaymath}...\end{displaymath} sont les versions quivalentes L
A
T
E
X. Aucune
gestion des numros et des labels.
> \begin{equation*}...\end{equation*} est la version la plus aboutie.
Sa version non toile, \begin{equation}...\end{equation}, gre les numros dquation automa-
tiquement, ainsi que les labels. Cest celle quil faut prfrer (compatibilit, passage de la version
numrote la version non numrote. . .).
Rgle gnrale : prfrer les environnement venant du package amsmath plutt que les autres,
mme ceux de L
A
T
E
X pur. Ils sont plus aboutis. Ainsi, prfrer
\begin{align}...\end{align} \begin{eqnarray}...\end{eqnarray}.
Short Math Guide for L
A
T
E
X, version 1.09 (2002-03-22) 2
Table 1: Multi-line equations and equation groups (vertical lines indicating nominal mar-
gins).
\begin{equation}\label{xx}
\begin{split}
a& =b+c-d\\
& \quad +e-f\\
& =g+h\\
& =i
\end{split}
\end{equation}
a = b + c d
+ e f
= g + h
= i
(2.1)
\begin{multline}
a+b+c+d+e+f\\
+i+j+k+l+m+n
\end{multline}
a + b + c + d + e + f
+ i + j + k + l + m + n (2.2)
\begin{gather}
a_1=b_1+c_1\\
a_2=b_2+c_2-d_2+e_2
\end{gather}
a
1
= b
1
+ c
1
(2.3)
a
2
= b
2
+ c
2
d
2
+ e
2
(2.4)
\begin{align}
a_1& =b_1+c_1\\
a_2& =b_2+c_2-d_2+e_2
\end{align}
a
1
= b
1
+ c
1
(2.5)
a
2
= b
2
+ c
2
d
2
+ e
2
(2.6)
\begin{align}
a_{11}& =b_{11}&
a_{12}& =b_{12}\\
a_{21}& =b_{21}&
a_{22}& =b_{22}+c_{22}
\end{align}
a
11
= b
11
a
12
= b
12
(2.7)
a
21
= b
21
a
22
= b
22
+ c
22
(2.8)
\begin{flalign*}
a_{11}& =b_{11}&
a_{12}& =b_{12}\\
a_{21}& =b_{21}&
a_{22}& =b_{22}+c_{22}
\end{flalign*}
a
11
= b
11
a
12
= b
12
a
21
= b
21
a
22
= b
22
+ c
22
Note 1. The split environment is something of a special case. It is a subordinate environment that can
be used as the contents of an equation environment or the contents of one line in a multiple-equation
structure such as align or gather.
Note 2. The eqnarray and eqnarray* environments described in [Lamport] are not recommended because
they produce inconsistent spacing of the equal signs and make no attempt to prevent overprinting of the
equation body and equation number.
5.2 Les sous-quations
Le package amsmath permet de crer des sous-quations :
\begin{equation} \label{a}
a^2 + b^2 = c^2
\end{equation}
Now we start sub-numbering.
\begin{subequations} \label{b}
\begin{equation} \label{b1}
d^2 + e^2 = f^2
\end{equation}
We can refer to equation~\eqref{a},
\eqref{b} and~\eqref{b1}.
\begin{equation} \label{b2}
g^2 + h^2 = i^2
\end{equation}
\end{subequations}
This was equation~\eqref{b2}.
\begin{subequations} \label{c}
\begin{align}
x &= y+z\label{c1}\\
u &= v+w\label{c2}
\end{align}
This was expression~\eqref{c}, consisting of parts~\eqref{c1} and~\eqref{c2}.
\end{subequations}
a
2
+ b
2
= c
2
(1)
Now we start sub-numbering.
d
2
+ e
2
= f
2
(2a)
We can refer to equation (1), (2) and (2a).
g
2
+ h
2
= i
2
(2b)
This was equation (2b).
x = y + z (3a)
u = v + w (3b)
This was expression (3), consisting of parts (3a) and (3b).
On notera lusage de la commande \eqref{label} pour faire rfrence une quation.
5.3 Les matrices
5 environnements de matrices : matrix, pmatrix, bmatrix, Bmatrix, vmatrix, Vmatrix :


_ _


_ _

_
_
_
_


_
_
_
_
et un environnement pour des matrices dans le texte :
_
a b
c d
_
est obtenu par
$\bigl( \begin{smallmatrix} a&b\\ c&d \end{smallmatrix} \bigr)$
5.4 Crer un nouvel oprateur mathmatique
\DeclareMathOperator*{\limperso}{lim-perso} cre une macro \limperso qui sache en roman.
Utiliser cette macro dans lentte du document.
\mathrm{lim-perso}+ $\neq$ \verb+\text{lim-perso}+ $\neq$ \verb+\limperso
limperso
n
= lim-perso
n
= lim-perso
n
\newcommand{\lightbulb}{{\usefont{U}{bulb}{m}{n}A}}
Figure 6: L
A
T
E
X2

style le (lightbulb.sty)
Acrobat

(at least in versions prior to 6.0) and of being more memory-ecient when handled by a PostScript
interpreter. See http://www.tex.ac.uk/cgi-bin/texfaq2html?label=textrace for pointers to tools that can
produce Type 1 fonts from METAFONT.
7.3 Math-mode spacing
Terms such as binary operators, relations, and punctuation in Section 3 primarily regard the surrounding
spacing. (See the Short Math Guide for L
A
T
E
X [Dow00] for a nice exposition on the subject.) To use a symbol
for a dierent purpose, you can use the T
E
X commands \mathord, \mathop, \mathbin, \mathrel, \mathopen,
\mathclose, and \mathpunct. For example, if you want to use \downarrow as a variable (an ordinary
symbol) instead of a delimiter, you can write $3 x + \mathord{\downarrow}$ to get the properly spaced
3x + rather than the awkward-looking 3x+ . Similarly, to create a dotted-union symbol (

) that
spaces like the ordinary set-union symbol (\cup) it must be dened with \mathbin, just as \cup is. Contrast
$A \dot{\cup} B$ (A

B) with $A \mathbin{\dot{\cup}} B$ (A

B). See The T
E
Xbook [Knu86a]
for the denitive description of math-mode spacing.
The purpose of the log-like symbols in Tables 96 and 97 is to provide the correct amount of spacing
around and within multiletter function names. Table 229 contrasts the output of the log-like symbols with
various, nave alternatives. In addition to spacing, the log-like symbols also handle subscripts properly. For
example, \max_{p \in P} produces max
pP
in text, but max
pP
as part of a displayed formula.
Table 229: Spacing Around/Within Log-like Symbols
L
A
T
E
X expression Output
$r \sin \theta$ r sin (best)
$r sin \theta$ rsin
$r \mbox{sin} \theta$ rsin
$r \mathrm{sin} \theta$ rsin
The amsmath package makes it straightforward to dene new log-like symbols:
\DeclareMathOperator{\atan}{atan}
\DeclareMathOperator*{\lcm}{lcm}
The dierence between \DeclareMathOperator and \DeclareMathOperator* involves the handling of sub-
scripts. With \DeclareMathOperator*, subscripts are written beneath log-like symbols in display style and
to the right in text style. This is useful for limit operators (e.g., \lim) and functions that tend to map over
a set (e.g., \min). In contrast, \DeclareMathOperator tells T
E
X that subscripts should always be displayed
to the right of the operator, as is common for functions that take a single parameter (e.g., \log and \cos).
Table 230 contrasts symbols declared with \DeclareMathOperator and \DeclareMathOperator* in both text
style ($. . .$) and display style (\[. . .\]).
7
Table 230: Dening new log-like symbols
Declaration function $\newlogsym {p \in P}$ \[ \newlogsym {p \in P} \]
\DeclareMathOperator newlogsym
pP
newlogsym
pP
\DeclareMathOperator* newlogsym
pP
newlogsym
pP
7
Note that \displaystyle can be used to force display style within $. . .$ and \textstyle can be used to force text style
within \[. . .\].
74
5.5 Autres trucs en vrac
Short Math Guide for L
A
T
E
X, version 1.09 (2002-03-22) 4
Class
number Mnemonic
Description
(part of speech) Examples
0 Ord simple/ordinary (noun) A 0
1 Op prex operator

2 Bin binary operator (conjunction) +
3 Rel relation/comparison (verb) = <
4 Open left/opening delimiter ( [ {
5 Close right/closing delimiter ) ] }
6 Pun postx/punctuation . , ; !
Note 1. The distinction in T
E
X between class 0 and an additional class 7 has to do only with font selection
issues and is immaterial here.
Note 2. Symbols of class Bin, notably the minus sign , are automatically coerced to class 0 (no space) if
they do not have a suitable left operand.
The spacing for a few symbols follows tradition instead of the general rule: although /
is (semantically speaking) of class 2, we write k/2 with no space around the slash rather
than k / 2. And compare p|q p|q (no space) with p\mid q p | q (class-3 spacing).
The proper way to dene a new math symbol is discussed in L
A
T
E
X2

font selection
[LFG]. It is not really possible to give a useful synopsis here because one needs rst to
understand the ramications of font specications.
3.2. Some symbols intentionally omitted here The following math symbols that
are mentioned in the L
A
T
E
X book [Lamport] are intentionally omitted from this discussion
because they are superseded by equivalent symbols when the amssymb package is loaded.
If you are using the amssymb package anyway, the only thing that you are likely to gain by
using the alternate name is an unnecessary increase in the number of fonts used by your
document.
\Box, see \square
\Diamond, see \lozenge
\leadsto, see \rightsquigarrow
\Join, see \bowtie
\lhd, see \vartriangleleft
\unlhd, see \trianglelefteq
\rhd, see \vartriangleright
\unrhd, see \trianglerighteq
Furthermore, there are many, many additional symbols available for L
A
T
E
X use above
and beyond the ones included here. This list is not intended to be comprehensive. For a
much more comprehensive list of symbols, including nonmathematically oriented ones such
as phonetic alphabetic or dingbats, see The Comprehensive L
A
T
E
X Symbols List (Pakin):
http://www.ctan.org/tex-archive/info/symbols/comprehensive/.
3.3. Latin letters and Arabic numerals The Latin letters are simple symbols, class 0.
The default font for them in math formulas is italic.
ABC DE F GH I J K LM N OP QRS T U V W X Y Z
a b c d e f g hi j k l mno p q r s t uv wxy z
When adding an accent to an i or j in math, dotless variants can be obtained with \imath
and \jmath:
\imath \jmath \hat{\jmath}
Arabic numerals 09 are also of class 0. Their default font is upright/roman.
0 1 2 3 4 5 6 7 8 9
Short Math Guide for L
A
T
E
X, version 1.09 (2002-03-22) 11
\bigl( \begin{smallmatrix}
a&b\\ c&d
\end{smallmatrix} \bigr)
To produce a row of dots in a matrix spanning a given number of columns, use \hdotsfor.
For example, \hdotsfor{3} in the second column of a four-column matrix will print a row
of dots across the nal three columns.
For piece-wise function denitions there is a cases environment:
P_{r-j}=\begin{cases}
0& \text{if $r-j$ is odd},\\
r!\,(-1)^{(r-j)/2}& \text{if $r-j$ is even}.
\end{cases}
Notice the use of \text and the embedded math.
Note. The plain T
E
X form \matrix{...\cr...\cr} and the related commands \pmatrix, \cases should be
avoided in L
A
T
E
X (and when the amsmath package is loaded they are disabled).
4.5. Math spacing commands When the amsmath package is used, all of these math
spacing commands can be used both in and out of math mode.
Abbrev. Spelled out Example Abbrev. Spelled out Example
no space 34 no space 34
\, \thinspace 3 4 \! \negthinspace 34
\: \medspace 3 4 \negmedspace 34
\; \thickspace 3 4 \negthickspace 34
\quad 3 4
\qquad 3 4
For ner control over math spacing, use \mspace and math units. One math unit, or mu,
is equal to 1/18 em. Thus to get a negative half \quad write \mspace{-9.0mu}.
There are also three commands that leave a space equal to the height and/or width of
a given fragment of L
A
T
E
X material:
Example Result
\phantom{XXX} space as wide and high as three Xs
\hphantom{XXX} space as wide as three Xs; height 0
\vphantom{X} space of width 0, height = height of X
4.6. Dots For preferred placement of ellipsis dots (raised or on-line) in various contexts
there is no general consensus. It may therefore be considered a matter of taste. By using
the semantically oriented commands
\dotsc for dots with commas
\dotsb for dots with binary operators/relations
\dotsm for multiplication dots
\dotsi for dots with integrals
\dotso for other dots (none of the above)
instead of \ldots and \cdots, you make it possible for your document to be adapted to
dierent conventions on the y, in case (for example) you have to submit it to a publisher
who insists on following house tradition in this respect. The default treatment for the
various kinds follows American Mathematical Society conventions:
We have the series $A_1,A_2,\dotsc$,
the regional sum $A_1+A_2+\dotsb$,
the orthogonal product $A_1A_2\dotsm$,
and the infinite integral
\[\int_{A_1}\int_{A_2}\dotsi\].
We have the series A
1
, A
2
, . . . , the re-
gional sum A
1
+A
2
+ , the orthogonal
product A
1
A
2
, and the innite inte-
gral

A
1

A
2
.
Short Math Guide for L
A
T
E
X, version 1.09 (2002-03-22) 10
3.18.1. Calligraphic letters (cmsy; no lowercase)
Usage: \mathcal{M}.
ABC DE F G HI J KLMN OP QRS T U V WX Y Z
3.18.2. Blackboard Bold letters (msbm; no lowercase)
Usage: \mathbb{R}.
ABCDEFGHI J KLMNOPQRSTUVWXYZ
3.18.3. Fraktur letters (eufm)
Usage: \mathfrak{S}.
ABCDEFGHI J KLMNOPQRSTUVWXYZ
a b c d e f g h i j k l mn o p q r s t u v wx y z
4. Notations
4.1. Top and bottom embellishments These are visually similar to accents but gen-
erally span multiple symbols rather than being applied to a single base symbol. For ease
of reference, \widetilde and \widehat are redundantly included here and in the table of
math accents.
xxx \widetilde{xxx}
xxx \widehat{xxx}
xxx \overline{xxx}
xxx \underline{xxx}
..
xxx \overbrace{xxx}
xxx
..
\underbrace{xxx}

xxx \overleftarrow{xxx}
xxx

\underleftarrow{xxx}

xxx \overrightarrow{xxx}
xxx

\underrightarrow{xxx}

xxx \overleftrightarrow{xxx}
xxx

\underleftrightarrow{xxx}
4.2. Extensible arrows \xleftarrow and \xrightarrow produce arrows that extend
automatically to accommodate unusually wide subscripts or superscripts. These commands
take one optional argument (the subscript) and one mandatory argument (the superscript,
possibly empty):
A
n+1
B
ni1

T
C (4.1)
\xleftarrow{n+\mu-1}\quad \xrightarrow[T]{n\pm i-1}
4.3. Affixing symbols to other symbols In addition to the standard accents (Sec-
tion 3.16), other symbols can be placed above or below a base symbol with the \overset and
\underset commands. For example, writing \overset{*}{X} will place a superscript-size
above the X, thus:

X. See also the description of \sideset in Section 8.4.
4.4. Matrices The environments pmatrix, bmatrix, Bmatrix, vmatrix and Vmatrix
have (respectively) ( ), [ ], { }, | |, and delimiters built in. There is also a matrix environ-
ment sans delimiters, and an array environment that can be used to obtain left alignment
or other variations in the column specs.
\begin{pmatrix}
\alpha& \beta^{*}\\
\gamma^{*}& \delta
\end{pmatrix}
_


_
To produce a small matrix suitable for use in text, there is a smallmatrix environment
(e.g.,
_
a b
c d
_
) that comes closer to tting within a single text line than a normal matrix.
This example was produced by
Short Math Guide for L
A
T
E
X, version 1.09 (2002-03-22) 10
3.18.1. Calligraphic letters (cmsy; no lowercase)
Usage: \mathcal{M}.
ABC DE F G HI J KLMN OP QRS T U V WX Y Z
3.18.2. Blackboard Bold letters (msbm; no lowercase)
Usage: \mathbb{R}.
ABCDEFGHI J KLMNOPQRSTUVWXYZ
3.18.3. Fraktur letters (eufm)
Usage: \mathfrak{S}.
ABCDEFGHI J KLMNOPQRSTUVWXYZ
a b c d e f g h i j k l mn o p q r s t u v wx y z
4. Notations
4.1. Top and bottom embellishments These are visually similar to accents but gen-
erally span multiple symbols rather than being applied to a single base symbol. For ease
of reference, \widetilde and \widehat are redundantly included here and in the table of
math accents.
xxx \widetilde{xxx}
xxx \widehat{xxx}
xxx \overline{xxx}
xxx \underline{xxx}
..
xxx \overbrace{xxx}
xxx
..
\underbrace{xxx}

xxx \overleftarrow{xxx}
xxx

\underleftarrow{xxx}

xxx \overrightarrow{xxx}
xxx

\underrightarrow{xxx}

xxx \overleftrightarrow{xxx}
xxx

\underleftrightarrow{xxx}
4.2. Extensible arrows \xleftarrow and \xrightarrow produce arrows that extend
automatically to accommodate unusually wide subscripts or superscripts. These commands
take one optional argument (the subscript) and one mandatory argument (the superscript,
possibly empty):
A
n+1
B
ni1

T
C (4.1)
\xleftarrow{n+\mu-1}\quad \xrightarrow[T]{n\pm i-1}
4.3. Affixing symbols to other symbols In addition to the standard accents (Sec-
tion 3.16), other symbols can be placed above or below a base symbol with the \overset and
\underset commands. For example, writing \overset{*}{X} will place a superscript-size
above the X, thus:

X. See also the description of \sideset in Section 8.4.
4.4. Matrices The environments pmatrix, bmatrix, Bmatrix, vmatrix and Vmatrix
have (respectively) ( ), [ ], { }, | |, and delimiters built in. There is also a matrix environ-
ment sans delimiters, and an array environment that can be used to obtain left alignment
or other variations in the column specs.
\begin{pmatrix}
\alpha& \beta^{*}\\
\gamma^{*}& \delta
\end{pmatrix}
_


_
To produce a small matrix suitable for use in text, there is a smallmatrix environment
(e.g.,
_
a b
c d
_
) that comes closer to tting within a single text line than a normal matrix.
This example was produced by
3.4. SPLIT EQUATIONS WITH ALIGNMENT 5
3.3 Split equations without alignment
The multline environment is a variation of the equation environment used for
equations that dont t on a single line. The rst line of a multline will be at
the left margin and the last line at the right margin, except for an indention on
both sides in the amount of \multlinegap. Any additional lines in between will
be centered independently within the display width (unless the fleqn option is
in eect).
Like equation, multline has only a single equation number (thus, none
of the individual lines should be marked with \notag). The equation number
is placed on the last line (reqno option) or rst line (leqno option); vertical
centering as for split is not supported by multline.
Its possible to force one of the middle lines to the left or right with com-
mands \shoveleft, \shoveright. These commands take the entire line as an
argument, up to but not including the nal \\; for example
(3.10) A
B
C
D
\begin{multline}
\framebox[.65\columnwidth]{A}\\
\framebox[.5\columnwidth]{B}\\
\shoveright{\framebox[.55\columnwidth]{C}}\\
\framebox[.65\columnwidth]{D}
\end{multline}
The value of \multlinegap can be changed with the usual L
A
T
E
X commands
\setlength or \addtolength.
3.4 Split equations with alignment
Like multline, the split environment is for single equations that are too long
to t on one line and hence must be split into multiple lines. Unlike multline,
however, the split environment provides for alignment among the split lines,
using & to mark alignment points. Unlike the other amsmath equation structures,
the split environment provides no numbering, because it is intended to be used
only inside some other displayed equation structure, usually an equation, align,
or gather environment, which provides the numbering. For example:
H
c
=
1
2n
n

l=0
(1)
l
(n l)
p2

l
1
++l
p
=l
p

i=1

n
i
l
i

[(n l) (n
i
l
i
)]
n
i
l
i

(n l)
2

j=1
(n
i
l
i
)
2

.
(3.11)
6 3. DISPLAYED EQUATIONS
\begin{equation}\label{e:barwq}\begin{split}
H_c&=\frac{1}{2n} \sum^n_{l=0}(-1)^{l}(n-{l})^{p-2}
\sum_{l _1+\dots+ l _p=l}\prod^p_{i=1} \binom{n_i}{l _i}\\
&\quad\cdot[(n-l )-(n_i-l _i)]^{n_i-l _i}\cdot
\Bigl[(n-l )^2-\sum^p_{j=1}(n_i-l _i)^2\Bigr].
\end{split}\end{equation}
The split structure should constitute the entire body of the enclosing struc-
ture, apart from commands like \label that produce no visible material.
3.5 Equation groups without alignment
The gather environment is used for a group of consecutive equations when there
is no alignment desired among them; each one is centered separately within
the text width (see Table 3.1). Equations inside gather are separated by a
\bslash command. Any equation in a gather may consist of a \begin{split}
. . . \end{split} structurefor example:
\begin{gather}
first equation\\
\begin{split}
second & equation\\
& on two lines
\end{split}
\\
third equation
\end{gather}
3.6 Equation groups with mutual alignment
The align environment is used for two or more equations when vertical align-
ment is desired; usually binary relations such as equal signs are aligned (see
Table 3.1).
To have several equation columns side-by-side, use extra ampersands to sep-
arate the columns:
x = y X = Y a = b + c (3.12)
x

= y

= Y

a

= b (3.13)
x + x

= y + y

X + X

= Y + Y

a

b = c

b (3.14)
\begin{align}
x&=y & X&=Y & a&=b+c\\
x&=y & X&=Y & a&=b\\
x+x&=y+y & X+X&=Y+Y & ab&=cb
\end{align}
Line-by-line annotations on an equation can be done by judicious application of
8 3. DISPLAYED EQUATIONS
Like the array environment, these -ed variants also take an optional [t] or
[b] argument to specify vertical positioning.
Cases constructions like the following are common in mathematics:
(3.21) P
rj
=

0 if r j is odd,
r! (1)
(rj)/2
if r j is even.
and in the amsmath package there is a cases environment to make them easy
to write:
P_{r-j}=\begin{cases}
0& \text{if $r-j$ is odd},\\
r!\,(-1)^{(r-j)/2}& \text{if $r-j$ is even}.
\end{cases}
Notice the use of \text (cf. 6) and the nested math formulas.
3.8 Adjusting tag placement
Placing equation numbers can be a rather complex problem in multiline displays.
The environments of the amsmath package try hard to avoid overprinting an
equation number on the equation contents, if necessary moving the number
down or up to a separate line. Diculties in accurately calculating the prole of
an equation can occasionally result in number movement that doesnt look right.
There is a \raisetag command provided to adjust the vertical position of the
current equation number, if it has been shifted away from its normal position.
To move a particular number up by six points, write \raisetag{6pt}. This
kind of adjustment is ne tuning like line breaks and page breaks, and should
therefore be left undone until your document is nearly nalized, or you may end
up redoing the ne tuning several times to keep up with changing document
contents.
3.9 Vertical spacing and page breaks in multiline displays
You can use the \\[dimension] command to get extra vertical space be-
tween lines in all the amsmath displayed equation environments, as is usual
in L
A
T
E
X. When the amsmath package is in use page breaks between equa-
tion lines are normally disallowed; the philosophy is that page breaks in such
material should receive individual attention from the author. To get an in-
dividual page break inside a particular displayed equation, a \displaybreak
command is provided. \displaybreak is best placed immediately before the
\\ where it is to take eect. Like L
A
T
E
Xs \pagebreak, \displaybreak takes
an optional argument between 0 and 4 denoting the desirability of the page-
break. \displaybreak[0] means it is permissible to break here without
encouraging a break; \displaybreak with no optional argument is the same as
\displaybreak[4] and forces a break.
If you prefer a strategy of letting page breaks fall where they may, even in the
middle of a multi-line equation, then you might put \allowdisplaybreaks[1]
in the preamble of your document. An optional argument 14 can be used for
3.11. EQUATION NUMBERING 9
ner control: [1] means allow page breaks, but avoid them as much as possi-
ble; values of 2,3,4 mean increasing permissiveness. When display breaks are
enabled with \allowdisplaybreaks, the \\* command can be used to prohibit
a pagebreak after a given line, as usual.
Note: Certain equation environments wrap their contents in an
unbreakable box, with the consequence that neither \displaybreak
nor \allowdisplaybreaks will have any eect on them. These include
split, aligned, gathered, and alignedat.
3.10 Interrupting a display
The command \intertext is used for a short interjection of one or two lines
of text in the middle of a multiple-line display structure (see also the \text
command in 6). Its salient feature is preservation of the alignment, which
would not happen if you simply ended the display and then started it up again
afterwards. \intertext may only appear right after a \\ or \\* command.
Notice the position of the word and in this example.
A
1
= N
0
(;

) (;

), (3.22)
A
2
= (;

) (; ), (3.23)
and
A
3
= N(; ). (3.24)
\begin{align}
A_1&=N_0(\lambda;\Omega)-\phi(\lambda;\Omega),\\
A_2&=\phi(\lambda;\Omega)-\phi(\lambda;\Omega),\\
\intertext{and}
A_3&=\mathcal{N}(\lambda;\omega).
\end{align}
3.11 Equation numbering
3.11.1 Numbering hierarchy
In L
A
T
E
X if you wanted to have equations numbered within sectionsthat is,
have equation numbers (1.1), (1.2), . . . , (2.1), (2.2), . . . , in sections 1, 2, and so
forthyou could redene \theequation as suggested in the L
A
T
E
X manual [7,
6.3, C.8.4]:
\renewcommand{\theequation}{\thesection.\arabic{equation}}
This works pretty well, except that the equation counter wont be reset to
zero at the beginning of a new section or chapter, unless you do it yourself using
\setcounter. To make this a little more convenient, the amsmath package pro-
vides a command \numberwithin. To have equation numbering tied to section
numbering, with automatic reset of the equation counter, write
\numberwithin{equation}{section}
As its name implies, the \numberwithin command can be applied to any counter,
not just the equation counter.
20 8. COMMUTATIVE DIAGRAMS
7.3 Placement of subscripts and limits
The default positioning for subscripts depends on the base symbol involved. The
default for sum-class symbols is displaylimits positioning: When a sum-class
symbol appears in a displayed formula, subscript and superscript are placed in
limits position above and below, but in an inline formula, they are placed to
the side, to avoid unsightly and wasteful spreading of the surrounding text lines.
The default for integral-class symbols is to have sub- and superscripts always to
the side, even in displayed formulas. (See the discussion of the intlimits and
related options in Section 2.)
Operator names such as sin or lim may have either displaylimits or limits
positioning depending on how they were dened. The standard operator names
are dened according to normal mathematical usage.
The commands \limits and \nolimits can be used to override the normal
behavior of a base symbol:

X
,

A
, lim
n
To dene a command whose subscripts follow the same displaylimits behavior
as \sum, put \displaylimits at the tail end of the denition. When multiple
instances of \limits, \nolimits, or \displaylimits occur consecutively, the
last one takes precedence.
7.4 Multiple integral signs
\iint, \iiint, and \iiiint give multiple integral signs with the spacing be-
tween them nicely adjusted, in both text and display style. \idotsint is an
extension of the same idea that gives two integral signs with dots between them.

A
f(x, y) dxdy

A
f(x, y, z) dxdy dz (7.2)

A
f(w, x, y, z) dwdxdy dz

A
f(x
1
, . . . , x
k
) (7.3)
8
Commutative diagrams
Some commutative diagram commands like the ones in A
M
S-T
E
X are available
as a separate package, amscd. For complex commutative diagrams authors will
need to turn to more comprehensive packages like kuvio or XY-pic, but for
simple diagrams without diagonal arrows the amscd commands may be more
Conseil : lire au moins une fois dans sa vie la documentation de amsmath. Il y a dautres macros
trs utiles. . .
6 Divers
6.1 Lenvironnement tabbing
\begin{tabbing}
Du texte quon souhaite aligner sur 1
\= puis sur le chiffre qui suit 1 c--d 2
\= puis la suite de la ligne\dots\\
\> align \> et hop \\
\> comme un beau tableau \> sans bord
\end{tabbing}
Du texte quon souhaite aligner sur 1 puis sur le chire qui suit 1 c--d 2 puis la suite de la ligne. . .
align et hop
comme un beau tableau sans bord
6.2 Les packages exscale et relsize
\usepackage{exscale, relsize}
{\Large Voici du texte en grand {\relsize{-2}et en plus petit} lintrieur\dots}
\begin{equation*}
\mathsmaller \sum_{i=1}^n \neq \sum_{i=1}^n \neq \mathlarger\sum_{i=1}^n
\end{equation*}
Voici du texte en grand et en plus petit lintrieur. . .

n
i=1
=
n

i=1
=
n

i=1
6.3 Le package hyperref
Le package hyperref permet de crer des hyperliens dans des documents pdf : hyperliens externes (sites
internet), hyperliens internes (saut vers une page du mme document).
Exemple : Ce lien porte sur le modle de chier source
La table des matires, les labels et leurs rfrences, la bibliographie crent automatiquement des hyperliens
internes au document.
Le package hyperref permet aussi dinclure des mtadonnes pdf, consultables dans le menu Fichier

Proprits du document dans Acrobat Reader.


% renseignements pour le fichier pdf
\hypersetup{
plainpages=false, colorlinks=true,
linkcolor=blue, urlcolor=red,
anchorcolor=grey, citecolor=black,
menucolor=black, bookmarks=true,
bookmarksopen=true, bookmarksnumbered=true,
pdftitle={Un cours sur Latex}, pdfauthor={Thierry Masson},
pdfsubject={latex}, pdfkeywords={tex, latex, packages},
pdfcreator={LaTeX}, pdfproducer={pdfLaTeX}}
La table des matires prsente par Acrobat Reader dteste les formules de mathmatiques. . . Mais elle
rcupre ses informations des arguments de \chapter, \section, \subsection. . . et parfois on y place des
symboles mathmatiques.
Utiliser alors la macro suivante dans ces arguments :
\texorpdfstring{Texte pour TeX}{Texte pour Acrobat Reader}
Exemple :
\section{\texorpdfstring{$a=b$}{a=b}}
6.4 Le package soul
\usepackage{soul, color}
Matre \st{Corbeau}, sur un arbre perch,
Tenait en son bec un \ul{fromage}.
Matre \hl{Renard}, par l\so{odeur all\ech\e},
Lui tint peu prs ce langage :
\og H ! bonjour, Monsieur du \st{Corbeau}.
Que vous tes joli ! que vous me semblez beau !\dots
Matre Corbeau, sur un arbre perch, Tenait en son bec un fromage. Matre Renard,
par lo d e u r a l l c h , Lui tint peu prs ce langage : H ! bonjour, Monsieur
du Corbeau. Que vous tes joli ! que vous me semblez beau !. . .
6.5 Le problme des ottants
Un ottant, cest un gros truc qui gne la mise en page : gure, tableau,. . . Alors L
A
T
E
X essaie de traiter
le problme lui-mme, en positionnant ce truc au mieux . Au mieux pour lui nest pas ncessairement au
mieux pour celui qui rdige !
Il existe des packages pour mieux grer le positionnement des ottants. Mais ils ne sont pas ncessairement
trs ecaces !
\usepackage{float} :
Improves the interface for dening oating objects such as gures and tables.
Introduces the boxed oat, the ruled oat and the plaintop oat. You can
dene your own oats and improve the behaviour of the old ones.
The package also provides the H oat modier option of the obso-
lete here package. You can select this as automatic default with
\floatplacement{figure}{H}.
6.6 Le package fancybox
\usepackage{fancybox}
\shadowbox{\large\bf Une premire bote}
Une premire bote
\doublebox{\large\bf Une seconde bote} Une seconde bote
\ovalbox{\large\bf Une troisime bote}

Une troisime bote


\Ovalbox{\large\bf Une quatrime bote}

Une quatrime bote


6.7 Le package empheq
\usepackage{empheq}
\begin{empheq}[box=\shadowbox*]{align*}
E&=mc^2 \\
Y&= \sum_{n=1}^\infty \frac{1}{n^2}
\end{empheq}

E = mc
2
Y =

n=1
1
n
2
\definecolor{myblue}{rgb}{.8, .8, 1}
\newcommand*\mybluebox[1]{%
\colorbox{myblue}{\hspace{1em}#1\hspace{1em}}}
\begin{empheq}[box=\mybluebox]{gather}
a&=b\\
E&=mc^2 + \int_a^a x\, dx
\end{empheq}

a = b
E = mc
2
+
_
a
a
x dx
(4)
(5)
6.8 Le package pifont
\usepackage{pifont}
Lutilisation du package pifont permet daccder des symboles divers :
\ding{217} \ding{34} \ding{188} \ding{52} \ding{80} \ding{114} \ding{40}
donne
O v . O +
L je superpose deux symboles : OX Pratique pour les formulaires non ?
Il permet aussi de crer des listes en puisant dans
ces symboles :
le premier item de ma liste
le second item de ma liste
le troisime item de ma liste
O le premier item de ma liste
O le second item de ma liste
O le troisime item de ma liste
On peut utiliser les caractres de numrotation :
' le premier item de ma liste
^ le second item de ma liste
le troisime item de ma liste
0 le premier item de ma liste
O le second item de ma liste
O le troisime item de ma liste
On peut remplir une ligne de texte avec un symbole particulier :
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
ou mieux, dcouper selon les ciseaux. . .

Table 178: bbding Pencils and Nibs


\NibLeft \PencilLeft \PencilRightDown
\NibRight \PencilLeftDown \PencilRightUp
\NibSolidLeft \PencilLeftUp
\NibSolidRight \PencilRight
Table 179: pifont Pencils and Nibs
! \ding{46} " \ding{47} # \ding{48} $ \ding{49} % \ding{50}
Table 180: dingbat Hands
\leftpointright \rightpointleft \rightpointright
\leftthumbsdown \rightthumbsdown
\leftthumbsup \rightthumbsup
Table 181: bbding Hands
\HandCuffLeft \HandCuffRightUp \HandPencilLeft
\HandCuffLeftUp \HandLeft \HandRight
\HandCuffRight \HandLeftUp \HandRightUp
Table 182: pifont Hands
& \ding{42} ' \ding{43} ( \ding{44} ) \ding{45}
Table 183: bbding Crosses and Plusses
\Cross \CrossOpenShadow \PlusOutline
\CrossBoldOutline \CrossOutline \PlusThinCenterOpen
\CrossClowerTips \Plus
\CrossMaltese \PlusCenterOpen
Table 184: pifont Crosses and Plusses
* \ding{57} + \ding{59} , \ding{61} - \ding{63}
. \ding{58} / \ding{60} 0 \ding{62} 1 \ding{64}
Table 185: bbding Xs and Check Marks
\Checkmark \XSolid \XSolidBrush
\CheckmarkBold \XSolidBold
52
Table 178: bbding Pencils and Nibs
\NibLeft \PencilLeft \PencilRightDown
\NibRight \PencilLeftDown \PencilRightUp
\NibSolidLeft \PencilLeftUp
\NibSolidRight \PencilRight
Table 179: pifont Pencils and Nibs
! \ding{46} " \ding{47} # \ding{48} $ \ding{49} % \ding{50}
Table 180: dingbat Hands
\leftpointright \rightpointleft \rightpointright
\leftthumbsdown \rightthumbsdown
\leftthumbsup \rightthumbsup
Table 181: bbding Hands
\HandCuffLeft \HandCuffRightUp \HandPencilLeft
\HandCuffLeftUp \HandLeft \HandRight
\HandCuffRight \HandLeftUp \HandRightUp
Table 182: pifont Hands
& \ding{42} ' \ding{43} ( \ding{44} ) \ding{45}
Table 183: bbding Crosses and Plusses
\Cross \CrossOpenShadow \PlusOutline
\CrossBoldOutline \CrossOutline \PlusThinCenterOpen
\CrossClowerTips \Plus
\CrossMaltese \PlusCenterOpen
Table 184: pifont Crosses and Plusses
* \ding{57} + \ding{59} , \ding{61} - \ding{63}
. \ding{58} / \ding{60} 0 \ding{62} 1 \ding{64}
Table 185: bbding Xs and Check Marks
\Checkmark \XSolid \XSolidBrush
\CheckmarkBold \XSolidBold
52
Table 186: pifont Xs and Check Marks
! \ding{51} " \ding{53} # \ding{55}
$ \ding{52} % \ding{54} & \ding{56}
Table 187: wasysym Xs and Check Marks
\CheckedBox \Square \XBox
Table 188: pifont Circled Numbers
' \ding{172} ( \ding{182} ) \ding{192} * \ding{202}
+ \ding{173} , \ding{183} - \ding{193} . \ding{203}
/ \ding{174} 0 \ding{184} 1 \ding{194} 2 \ding{204}
3 \ding{175} 4 \ding{185} 5 \ding{195} 6 \ding{205}
7 \ding{176} 8 \ding{186} 9 \ding{196} : \ding{206}
; \ding{177} < \ding{187} = \ding{197} > \ding{207}
? \ding{178} @ \ding{188} A \ding{198} B \ding{208}
C \ding{179} D \ding{189} E \ding{199} F \ding{209}
G \ding{180} H \ding{190} I \ding{200} J \ding{210}
K \ding{181} L \ding{191} M \ding{201} N \ding{211}
pifont (part of the psnfss package) provides a dingautolist environment which
resembles enumerate but uses circled numbers as bullets.
2
See the psnfss docu-
mentation for more information.
Table 189: wasysym Stars
\davidsstar \hexstar \varhexstar
Table 190: bbding Stars, Flowers, and Similar Shapes
\Asterisk \FiveFlowerPetal \JackStar
\AsteriskBold \FiveStar \JackStarBold
\AsteriskCenterOpen \FiveStarCenterOpen \SixFlowerAlternate
\AsteriskRoundedEnds \FiveStarConvex \SixFlowerAltPetal
\AsteriskThin \FiveStarLines \SixFlowerOpenCenter
\AsteriskThinCenterOpen \FiveStarOpen \SixFlowerPetalDotted
\DavidStar \FiveStarOpenCircled \SixFlowerPetalRemoved
\DavidStarSolid \FiveStarOpenDotted \SixFlowerRemovedOpenPetal
\EightAsterisk \FiveStarOutline \SixStar
\EightFlowerPetal \FiveStarOutlineHeavy \SixteenStarLight
\EightFlowerPetalRemoved \FiveStarShadow \Snowflake
\EightStar \FourAsterisk \SnowflakeChevron
\EightStarBold \FourClowerOpen \SnowflakeChevronBold
\EightStarConvex \FourClowerSolid \Sparkle
\EightStarTaper \FourStar \SparkleBold
\FiveFlowerOpen \FourStarOpen \TwelweStar
2
In fact, dingautolist can use any set of consecutive Zapf Dingbats symbols.
53
Table 186: pifont Xs and Check Marks
! \ding{51} " \ding{53} # \ding{55}
$ \ding{52} % \ding{54} & \ding{56}
Table 187: wasysym Xs and Check Marks
\CheckedBox \Square \XBox
Table 188: pifont Circled Numbers
' \ding{172} ( \ding{182} ) \ding{192} * \ding{202}
+ \ding{173} , \ding{183} - \ding{193} . \ding{203}
/ \ding{174} 0 \ding{184} 1 \ding{194} 2 \ding{204}
3 \ding{175} 4 \ding{185} 5 \ding{195} 6 \ding{205}
7 \ding{176} 8 \ding{186} 9 \ding{196} : \ding{206}
; \ding{177} < \ding{187} = \ding{197} > \ding{207}
? \ding{178} @ \ding{188} A \ding{198} B \ding{208}
C \ding{179} D \ding{189} E \ding{199} F \ding{209}
G \ding{180} H \ding{190} I \ding{200} J \ding{210}
K \ding{181} L \ding{191} M \ding{201} N \ding{211}
pifont (part of the psnfss package) provides a dingautolist environment which
resembles enumerate but uses circled numbers as bullets.
2
See the psnfss docu-
mentation for more information.
Table 189: wasysym Stars
\davidsstar \hexstar \varhexstar
Table 190: bbding Stars, Flowers, and Similar Shapes
\Asterisk \FiveFlowerPetal \JackStar
\AsteriskBold \FiveStar \JackStarBold
\AsteriskCenterOpen \FiveStarCenterOpen \SixFlowerAlternate
\AsteriskRoundedEnds \FiveStarConvex \SixFlowerAltPetal
\AsteriskThin \FiveStarLines \SixFlowerOpenCenter
\AsteriskThinCenterOpen \FiveStarOpen \SixFlowerPetalDotted
\DavidStar \FiveStarOpenCircled \SixFlowerPetalRemoved
\DavidStarSolid \FiveStarOpenDotted \SixFlowerRemovedOpenPetal
\EightAsterisk \FiveStarOutline \SixStar
\EightFlowerPetal \FiveStarOutlineHeavy \SixteenStarLight
\EightFlowerPetalRemoved \FiveStarShadow \Snowflake
\EightStar \FourAsterisk \SnowflakeChevron
\EightStarBold \FourClowerOpen \SnowflakeChevronBold
\EightStarConvex \FourClowerSolid \Sparkle
\EightStarTaper \FourStar \SparkleBold
\FiveFlowerOpen \FourStarOpen \TwelweStar
2
In fact, dingautolist can use any set of consecutive Zapf Dingbats symbols.
53
5 Dingbats
Dingbats are symbols such as stars, arrows, and geometric shapes. They are commonly used as bullets in
itemized lists or, more generally, as a means to draw attention to the text that follows.
The pifont dingbat package warrants special mention. Among other capabilities, pifont provides a L
A
T
E
X
interface to the Zapf Dingbats font (one of the standard 35 PostScript fonts). However, rather than name each
of the dingbats individually, pifont merely provides a single \ding command, which outputs the character that
lies at a given position in the font. The consequence is that the pifont symbols cant be listed by name in this
documents index, so be mindful of that fact when searching for a particular symbol.
Table 172: bbding Arrows
\ArrowBoldDownRight \ArrowBoldRightShort \ArrowBoldUpRight
\ArrowBoldRightCircled \ArrowBoldRightStrobe
Table 173: pifont Arrows
! \ding{212} " \ding{221} # \ding{230} $ \ding{239} % \ding{249}
& \ding{213} ' \ding{222} ( \ding{231} ) \ding{241} * \ding{250}
+ \ding{214} , \ding{223} - \ding{232} . \ding{242} / \ding{251}
0 \ding{215} 1 \ding{224} 2 \ding{233} 3 \ding{243} 4 \ding{252}
5 \ding{216} 6 \ding{225} 7 \ding{234} 8 \ding{244} 9 \ding{253}
: \ding{217} ; \ding{226} < \ding{235} = \ding{245} > \ding{254}
? \ding{218} @ \ding{227} A \ding{236} B \ding{246}
C \ding{219} D \ding{228} E \ding{237} F \ding{247}
G \ding{220} H \ding{229} I \ding{238} J \ding{248}
Table 174: marvosym Scissors
s \Cutleft q \Cutright S \Leftscissors
r \Cutline R \Kutline Q \Rightscissors
Table 175: bbding Scissors
\ScissorHollowLeft \ScissorLeftBrokenTop
\ScissorHollowRight \ScissorRight
\ScissorLeft \ScissorRightBrokenBottom
\ScissorLeftBrokenBottom \ScissorRightBrokenTop
Table 176: pifont Scissors
K \ding{33} L \ding{34} M \ding{35} N \ding{36}
Table 177: dingbat Pencils
\largepencil \smallpencil
51
Table 194: bbding Geometric Shapes
\CircleShadow \Rectangle \SquareShadowTopLeft
\CircleSolid \RectangleBold \SquareShadowTopRight
\DiamondSolid \RectangleThin \SquareSolid
\Ellipse \Square \TriangleDown
\EllipseShadow \SquareCastShadowBottomRight \TriangleUp
\EllipseSolid \SquareCastShadowTopLeft
\HalfCircleLeft \SquareCastShadowTopRight
\HalfCircleRight \SquareShadowBottomRight
Table 195: pifont Geometric Shapes
! \ding{108} " \ding{111} # \ding{114} $ \ding{117} % \ding{121}
& \ding{109} ' \ding{112} ( \ding{115} ) \ding{119} * \ding{122}
+ \ding{110} , \ding{113} - \ding{116} . \ding{120}
Table 196: universa Geometric Shapes
\baucircle \bausquare \bautriangle
Table 197: manfnt Dangerous Bend Symbols
\dbend \lhdbend \reversedvideodbend
Note that these symbols descend far beneath the baseline. manfnt also denes non-
descending versions, which it calls, correspondingly, \textdbend, \textlhdbend,
and \textreversedvideodbend.
Table 198: skull Symbols
\skull
Table 199: Non-Mathematical mathabx Symbols
\rip
Table 200: marvosym Information Symbols
\Bicycle o \Football Z \Pointinghand
V \Checkedbox x \Gentsroom w \Wheelchair
U \Clocklogo I \Industry b \Writinghand
K \Coffeecup i \Info
X \Crossedbox y \Ladiesroom
55
6.9 Les couleurs
\usepackage{color}
> \definecolor{nom}{modele}{specification} dnit une couleur dont le nom est nom, en utilisant
un modle parmi modele = rgb, cmyk, gray, named. La spcication dpend du modle.
> \color{nom} utilise la couleur nomme, pour le texte qui suit.
\textcolor{nom}{texte}, quivalent de {\color{nom}texte}.
> \colorbox{nom}{texte} et \fcolorbox{nom}{texte} crent une bote de couleur avec le texte sp-
ci.
> \pagecolor{nom} met le fond de la page dans le couleur nom.
\definecolor{macouleur1}{rgb}{0.2, 0.5, 0.8}
\definecolor{macouleur2}{cmyk}{0.2, 0.5, 0.8, 0.3}
\definecolor{macouleur3}{gray}{0.9}
\textcolor{macouleur1}{Texte dans la couleur \texttt{macouleur1}}
\colorbox{macouleur2}{Une bote dans la couleur \texttt{macouleur2}}
\pagecolor{macouleur3}
\textcolor{red}{Texte dans la couleur \texttt{red}}
\colorbox{yellow}{\color{blue}Du texte en \texttt{blue}
dans une bote en \texttt{yellow}}
Texte dans la couleur macouleur1 Une bote dans la couleur macouleur2
Texte dans la couleur red Du texte en blue dans une bote en yellow
(\pagecolor{white})
\usepackage{colortbl}, ou comment colorer des tableaux. . .
\begin{tabular}{>{\columncolor{blue}\color{white}\bfseries}lr}
\rowcolor[gray]{0.8}
\color{black} Jour & \bfseries Nombre \\[2pt]
Lundi & 10 \\ Mardi & 15 \\
Mercredi & 2 \\ Jeudi & 35 \\
Vendredi & 7 \\ Samedi & 22 \\
Dimanche & 17 \\
\cellcolor[gray]{0.8}\color{black}Total & 108
\end{tabular}

Jour Nombre
Lundi 10
Mardi 15
Mercredi 2
Jeudi 35
Vendredi 7
Samedi 22
Dimanche 17
Total 108
\setlength\arrayrulewidth{2pt}\arrayrulecolor{blue}
\setlength\doublerulesep{2pt}\doublerulesepcolor{yellow}
\begin{tabular}{||l||c||}
\hline\hline
one&two\\
three&four\\
\hline\hline
\end{tabular}

one two
three four
6.10 Quelques packages en vrac
> array et tabularx : extension des fonctionnalits de lenvironnement tabular de L
A
T
E
X.
> longtable : gestion des tableaux qui dpassent une page. Utile par exemple dans les projets ANR!
> lscape : permet de passer en mode landscape pour quelques pages dans un document portrait. Utile
par exemple pour des tableaux larges.
> enumitem : permet de personnaliser les environnements enumerate, itemize et description.
> showlabels : permet de placer le nom des labels dans la marge, et ainsi y faire rfrence plus facilement
dans une phase prliminaire dcriture.
> bezos : extensions des accents en mode mathmatique, criture des tenseurs plus facile.
> ifthen : syntaxe pour grer des condition if...then...else, case, whiledo.
> calc : syntaxe pour mener des calculs sur les compteurs et les dimensions.
> ntheorem : extension de lenvironnement theorem de L
A
T
E
X.
> eurosym : donne accs un caractre euro plus joli que celui de textcomp.
\euro : e (rappelez-vous de !).
> xy : permet de crer des diagrammes trs compliqus, mais la syntaxe est elle aussi trs complique !
> hhline : meilleure gestion des barres horizontales dans les tableaux.
> titling : meilleur contrle de lapparence de \maketitle.
> pdfpages : permet dinsrer dans un document latex des pages dun document pdf externe.
> bundledoc : permet de crer une archive contenant TOUS les chiers utiles la compilation de votre
document (.sty, .cls, .fd, images,. . .).
7 Crer des macros et des environnements
7.1 Les commandes
Il est possible de dnir des macros trs complexes. Dans L
A
T
E
X, utiliser les macros suivantes pour en dnir
de nouvelles :
> \newcommand{\macommandenouvelle}{ce quelle doit faire} : ds quon place
\macommandenouvelle dans le chier source, L
A
T
E
X le remplace par ce quelle doit faire .
> \newcommand{\macommandeavecargument}[1]{ce quelle fait avec #1 ? Nul ne le sait !} :
\macommandeavecargument{mon texte} donne ce quelle fait avec mon texte ? Nul ne le sait ! .
> \renewcommand{\unecommandequiexistedj}{ce quelle doit faire} : pareil que ci-dessus, mais
pour une macro qui existe dj et quon souhaite rednir.
Pour dnir des environnements nouveaux :
> \newenvironment{nom}[nombre]{avant}{aprs} : cre une nouvel environnement appel nom, qui ad-
met nombre arguments. avant et aprs sont les commandes excute louverture de lenvironnement
et la fermeture. Nombre est compris entre 1 et 9.
> \renewenvironment{nom}[nombre]{avant}{aprs} : modie un environnement dj existant.
> \newenvironment{nom}[nombre][option]{avant}{aprs} : idem que ci-dessus, mais cette fois le
premier argument est optionnel, et il est remplac par option sil nest pas prsent lors de lutilisation
de cet environnement. . .
7.2 Exemples
7.2.1 Jouons avec itemize
Litem dune liste de type itemize est obtenu par la macro \labelitemi.
Ainsi, \renewcommand{\labelitemi}{\ding{109}} rednit litem en .
Et maintenant, on peut essayer, et on obtient comme voulu. . .
On peut emboter jusqu 4 environnements de type liste (itemize, enumerate, description).
Les 3 autres macros sont : \labelitemii, \labelitemiii, \labelitemiv.
Seconde liste
Troisime liste
Quatrime liste.
Je change les items : \renewcommand{\labelitemiv}{\ding{110}} B
B Et voici litem iv.
Retour dans la troisime liste.
\renewcommand{\labelitemiii}{\ding{115}} A
A Et voici litem iii.
Retour dans la seconde liste.
\renewcommand{\labelitemii}{\ding{117}} 4
4 Et voici litem ii.
Et voici litem i qui revient. On replace des itemize embots, et l surprise !
Seconde liste
Troisime liste
Quatrime liste.
On a perdu nos dnitions !
7.2.2 La porte dune dnition
La porte dune dnition est bloque par ce quon appelle un groupe : {...} ou un environnement.
Il en est de mme par exemple pour des changements daspect des polices : {\bfseries ...} a sa porte
limite aux accolades.
Je viens dentrer dans un environnement itemize.
Je place maintenant \bfseries ici (sans accolades) : le texte qui suit est en gras.
et ici aussi, car le groupe local est \begin{itemize}...\end{itemize} (celui de ).
Une seconde liste embote est aussi touche. . .
Ici je suis hors de itemize, et je ne suis pas aect par \bfseries.
Pour rendre une dnition globale, il faut la placer hors dun groupe.
7.2.3 Jouons en mode mathmatique
On souhaite crer une macro qui donne a
2
+ b
2
. On peut poser
\newcommand{\hypothenuse}{$a^{2}+b^{2}$}. a fonctionne trs bien. . . sauf si je suis dj en mode
mathmatique !
Alors utilisons \newcommand{\hypothenuse}{a^{2}+b^{2}}. . . a fonctionne bien sauf si on est sorti du
mode mathmatique !
Comment rsoudre ce problme ? En utilisant \ensuremath :
\newcommand{\hypothenuse}{\ensuremath{a^{2}+b^{2}}} fonctionne partout :
Lhypothnuse est \hypothenuse,
en math cest $\hypothenuse$.

Lhypothnuse est a
2
+ b
2
, en math cest a
2
+ b
2
.
7.2.4 Un environnement pour mettre du texte en retrait
\newenvironment{texteenretrait}{\par\medskip\leftskip=50pt\rightskip=60pt plus 10em}%
{\par\medskip}
\begin{texteenretrait}
Il y a aujourdhui ...
\end{texteenretrait}
Il y a aujourdhui trois cent quarante-huit ans six mois et dix-neuf jours que les
parisiens sveillrent au bruit de toutes les cloches sonnant grande vole dans la
triple enceinte de la Cit, de lUniversit et de la Ville.
\newenvironment{texteenretrait2}[1][\mdseries]%
{\par\medskip\leftskip=50pt\rightskip=60pt plus 10em #1}{\par\medskip}
\begin{texteenretrait2}[\bfseries]
Il y a aujourdhui ...
\end{texteenretrait2}
\begin{texteenretrait2}
Il y a aujourdhui ...
\end{texteenretrait2}
Il y a aujourdhui trois cent quarante-huit ans six mois et dix-neuf jours que
les parisiens sveillrent au bruit de toutes les cloches sonnant grande
vole dans la triple enceinte de la Cit, de lUniversit et de la Ville.
Il y a aujourdhui trois cent quarante-huit ans six mois et dix-neuf jours que les parisiens
sveillrent au bruit de toutes les cloches sonnant grande vole dans la triple enceinte
de la Cit, de lUniversit et de la Ville.
8 Les compteurs
8.1 Liste des compteurs
Les compteurs usuels de L
A
T
E
X :
part paragraph figure enumi
chapter subparagraph table enumii
section page footnote enumiii
subsection equation mpfootnote enumiv
subsubsection tocdepth
Bien sr, chaque package peut dnir son propre compteur, donc cette liste est trs minimale.
On peut personnaliser leur valeur : \setcounter{equation}{12} met le compteur dquation 12...
On peut changer la faon dont ils apparaissent : L
A
T
E
X utilise pour chaque compteur une commande
"\the..." qui ache le contenu du compteur. Cest cette commande quil faut rednir.
Ici, nous en sommes la page 22 (la page \thepage), dans la section 8 (section \thesection), sous-
section 8.1 (sous-section \thesubsection). Le compteur dquation en est 5.
Avec les commandes qui vont suivre, on peut changer lapparence des compteurs, par exemple le compteur
enumi utilis par les listes enumerate :
. premier
. second
. troisime
8.2 Commandes pour manipuler les compteurs
8.2.1 Commandes pour manipuler directement les compteurs :
> \addtocounter : ajoute une certaine valeur un compteur :
\addtocounter{counter}{value}
> \newcounter : cr un nouveau compteur. En option, un compteur dj existant. Lorsque oldcounter
est incrment, newcounter est remis 0 :
\newcounter{newname}[oldcounter]
\numberwithin{equation}{section} permet de remettre 0 le compteur equation lorsque le comp-
teur section est incrment (fonctionnalit de amsmath).
> \setcounter : met un compteur une certaine valeur :
\setcounter{counter}{value}
> \usecounter : utilis dans lenvironnement list, cest le compteur utilis pour les item :
\usecounter{counter}
> \value : retourne la valeur du compteur, en tant quentier. Peut servir l o L
A
T
E
X attend un entier :
\value{counter}
Par exemple : \hspace{\value{moncompteur}\parindent}
8.2.2 Commande qui retourne la valeur du compteur dans dirents formats :
> \arabic : chires arabes, 1,2,3,... \arabic{counter}
> \alph, \Alph : lettres (Capitales) a,b,c,... ou A,B,C,... \alph{counter}
> \roman, \Roman : en chire romain, petit ou grand i,ii,iii,iv,... I,II,III,IV,... \roman{counter}
> \fnsymbol : symboles des footnotes. 9 symboles qui se suivent : asterisk, dagger, double dagger, section
mark, paragraph mark, double vertical lines, double asterisks, double daggers, double double daggers.
Par exemple : 8 (\arabic{section}), h (\alph{section}), viii (\roman{section}), (\fnsymbol{section}).
8.3 Exemples
8.3.1 Les quations et les sections
a = b (6)
\renewcommand{\theequation}{\Alph{equation}} : maintenant les quations sont numrotes avec des
lettres capitales :
E = mc
2
(G)
\setcounter{equation}{12} et \renewcommand{\theequation}{\roman{equation}} met le compteur
dquation 12 en chire romain, ce qui donne ici :
0 = 1 (xiii)
Tiens, a donne 13 ! Normal, le compteur est incrment dune unit AVANT dtre utilis. . .
On peut utiliser plusieurs compteurs :
\renewcommand{\theequation}{\thesubsection---\alph{equation}} donne
c = d (8.3n)
\renewcommand{\thesubsection}{\thesection-\roman{subsection}}
sin(0) = 0 (8-iiio)
Et pourquoi pas \renewcommand{\theequation}{page \thepage, \Roman{equation}} ?
sin(/2) = 1 (page 23, XVI)
Lquation (page 23, XVI) est bizarrement numrote, alors que la (xiii) est plus normale. . .
\renewcommand{\thesubsubsection}{\thesubsection.\alph{subsubsection}}
8-iii.b Les notes de bas de page
Ceci est un renvoi une note de bas de page
1
.
Ceci est un autre renvoi une note de bas de page
2
.
\renewcommand{\thefootnote}{\fnsymbol{footnote}}.
Ceci est un renvoi une note de bas de page

.
Ceci est un autre renvoi une note de bas de page

.
\renewcommand{\thefootnote}{\Alph{footnote}}.
Ceci est un renvoi une note de bas de page
E
.
Ceci est un autre renvoi une note de bas de page
F
.
\renewcommand{\thefootnote}{\engrec{footnote}}
Ceci est un renvoi une note de bas de page

.
Ceci est un autre renvoi une note de bas de page

.
8-iii.c La profondeur de la table des matires
\setcounter{tocdepth}{2} limite la table des matires au niveau 2, le niveau des sections
part = 1, chapter = 0, section = 1, subsection = 2, subsubsection = 3, paragraph = 4.
\tableofcontents ne prsente que les sections.
1
On fait rfrence cette note grce un numro
2
On fait rfrence cette note grce un numro

On fait rfrence cette note grce un symbole

On fait rfrence cette note grce un symbole


E
On fait rfrence cette note grce une lettre capitale
F
On fait rfrence cette note grce une lettre capitale

Il ma fallu crer une macro pour obtenir ce rsultat. Cette macro ma t demande par Fabien.

Idem
Table des matires
1 Gnralits sur T
E
X et L
A
T
E
X 1
2 Les packages usuels dun chier source 3
3 Changement daspect des fontes 7
4 Une page L
A
T
E
X 10
5 Les mathmatiques et le package amsmath 11
6 Divers 15
7 Crer des macros et des environnements 20
8 Les compteurs 22
9 Les botes et les dimensions 25
10 Personnalisation grce titlesec et titletoc 28
11 Le package graphicx et les inclusions dimages 30
12 Des outils externes 35
13 Documentation 36
9 Les botes et les dimensions
9-i La mise en botes
Quest-ce que T
E
X au fond ? Un manipulateur de botes ! Lettres, symboles, mots, lignes, paragraphes, . . .
sont des botes.
Il est possible de crer et manipuler des botes soi-mme.
Comprendre quune bote a des attributs de dimension : largeur (\width, la largeur au sens ordinaire),
hauteur (\height, la hauteur au dessus de la ligne de texte) et profondeur (\depth : ce qui est sous la ligne
de texte). On a accs la hauteur totale : \totalheight = \height + \depth.
9-ii Manipuler des dimensions
T
E
X sait manipuler direntes units de longueur :
78 Personnalisation de L
A
T
E
X
Tab. 5.5 Units T
E
X
mm millimtre
cm centimtre = 10 mm
in pouce
a
= 25,4 mm
pt point 1/72 pouce 0, 35 mm
em largeur dun M dans la police courante
ex hauteur dun x dans la police courante
a
Inch en anglais. NdT.
De lespace supplmentaire entre deux lignes du mme paragraphe ou
lintrieur dune table peut tre obtenu par la commande :
\\[longueur]
Les commandes \bigskip et \smallskip permettent de crer des espa-
cements verticaux prdnis sans se proccuper des dimensions exactes.
5.4 Disposition dune page
L
A
T
E
X2

permet dindiquer la taille du papier en paramtre de la com-


mande \documentclass. Il dnit ensuite automatiquement les marges les
mieux adaptes. Parfois, on peut ne pas tre satisfait par les valeurs pr-
dnies et vouloir les modier. La gure 5.2 montre tous les paramtres qui
peuvent tre modis. Cette gure a t ralise avec lextension layout de
lensemble tools.
Attendez !. . . avant de vous lancer dans largissons un peu ce texte ,
prenez deux secondes pour rchir. Comme souvent avec L
A
T
E
X, il y a de
bonnes raisons pour disposer les pages de cette faon.
Sans doute, compar avec une page standard produite avec MS Word, une
page de L
A
T
E
X lair horriblement troite. Mais regardez votre livre prfr
4
et comptez le nombre de caractres sur une ligne normale. Vous verrez quil
ny a gure plus de soixante-six caractres par ligne. Lexprience montre
quun texte devient moins lisible si le nombre de caractres par ligne dpasse
cette valeur, cela parce quil devient plus dicile pour les yeux de passer de
la n dune ligne au dbut de la ligne suivante. Ceci explique aussi que les
journaux utilisent plusieurs colonnes.
Ainsi, si vous largissez le corps du texte, ayez conscience que vous le
rendez aussi moins lisible. Ceci dit, si vous tenez modier les paramtres
qui contrlent la disposition dune page, voici comment procder :
4
Un vrai livre, imprim par un grand diteur. . .
Quelques dimensions usuelles :
\parindent : indentation dun paragraphe
\baselineskip : distance entre les lignes dun pa-
ragraphe.
\baselinestretch : multiplie \baselineskip.
\parskip : espace vertical supplmentaire entre les
paragraphes.
\textwidth, \textheight : dimensions de la com-
posante texte dune page.
\linewidth : largeur dune ligne de texte dans
lenvronnement local.
\unitlength : unit de longueur dans lenvironne-
ment picture.
Combien mesure la bote paquet ?
Rponse grce ces macros :
\newlength{\lalargeur} \settowidth{\lalargeur}{paquet}
\newlength{\lahauteur} \settoheight{\lahauteur}{paquet}
\newlength{\laprofondeur}\settodepth{\laprofondeur}{paquet}
Largeur = \the\lalargeur, Hauteur = \the\lahauteur, Profondeur = \the\laprofondeur
Largeur = 34.91508pt, Hauteur = 7.37915pt, Profondeur = 2.33276pt
Autres macros :
> \the\unelongueur ache la dimension \unelongueur.
> \newlength{\unelongeur} cre une nouvelle dimension nomme \unelongueur.
> \setlength{\lalargeur}{1cm} :
Maintenant Largeur = \the\lalargeur donne Largeur = 28.45274pt
> \addtolength{\laprofondeur}{\the\lahauteur} :
Maintenant Profondeur = \the\laprofondeur donne Profondeur = 9.71191pt
(ce qui reprsente \totalheight)
T
E
X introduit la notion de longueur lastique : 1cm plus 10pt minus 5pt signie que la longueur peut
varier de plus 10pt moins 5pt, en fonction des besoins !
Exemple de longueur lastique : \parskip = 0.0pt plus 1.0pt
On dnit une longueur lastique avec la mme macro :
\newlength{\unelongeur}
\setlength{\unelongeur}{1cm plus 10pt minus 5pt}
\the\unelongeur

28.45274pt plus 10.0pt minus 5.0pt


9-iii Manipuler des botes
> \makebox[largeur][position]{Le contenu} cr une bote contenant Le contenu, de largeur nale
largeur et dont le contenu est positionn selon position = c, l, r, s.
Il existe une version avec cadre
\framebox[largeur][position]{Le contenu}
\framebox{Le contenu}

Le contenu
\framebox[1cm][l]{Le contenu}

Le contenu
\framebox[1cm][l]{Le contenu} et du texte ensuite

Le contenu et du texte ensuite


\framebox[3cm][c]{Le contenu}

Le contenu
\framebox[3cm][s]{Le contenu}

Le contenu
> Botes pour des paragraphes entiers : \parbox[position]{largeur}{contenu} ou
\begin{minipage}[position]{largeur}
contenu
\end{minipage}
Exemple :
\framebox{%
\begin{minipage}[t]{5cm}
Voici un texte contenu
dans une bote de 5 cm.
Il comporte plusieurs
paragraphes.
\end{minipage}}
voici du texte aprs\dots

Voici un texte contenu dans


une bote de 5 cm.
Il comporte plusieurs para-
graphes.
voici du texte aprs. . .
> lever une bote : \raisebox{elevation}[profondeur][hauteur]{contenu} lve la bote de la di-
mansion elevation, et fournit une bote nale de profondeur et de hauteur donnes.
\raisebox{10pt}{Hello !} donne
Hello !
et \raisebox{-10pt}{a va ?} donne
a va ?
\raisebox{-10pt}[0pt][\height]{Coucou !} donne
Coucou !
, maintenant, pour voir la dirence,
il faut au moins une seconde ligne en dessous, et l on se rend compte que la profondeur est nulle !
Vous voulez crer une bote de dimensions nulles ? Facile, il sut de combiner les macros prcdentes :
AVANT \raisebox{0pt}[0pt][0pt]{\makebox[0pt][c]{\color{red}cest ici}} APRS
AVANT cest ici APRS
Intrt ? Vous pouvez placer une bote relativement votre point courant sans quelle ne perturbe la mise
en page qui suit !
Exemple, je veux placer le mot FIN en bout de cette ligne, 0.6cm en dessous.
FIN
Je suis pass la ligne, mais avant, jai insr derrire le point ci-dessus la commande
\hfill\raisebox{-0.6cm}[0pt][0pt]{\makebox[0pt][r]{FIN}}
Du coup, le mot est au bout de la ligne, mais il ne compte pas ! T
E
X le considre comme une bote de taille
nulle place juste aprs le point de en dessous. Pratique pour des mises en pages un peu complexes. . .
9-iv Faites de lespace. . .
Vous voulez rserver une place entre deux mots qui correspondrait la taille de la bote du texte. . .
> Premire solution, mesurer cette boite, et crer, dune faon ou dune autre, une bote vide avec ces
dimensions.
Seconde solution : utiliser un fantme de du texte .
Entre ce mot et celui-ci, se cache un fantme !
Entre ce mot du texte et celui-ci, se cache un fantme ! (ligne pour vrier)
On obtient a en tapant
Entre ce mot \phantom{du texte} et celui-ci, se cache un fantme !
> Comment rserver un espace dont on connat les dimensions ?
En utilisant \rule[elevation]{largeur}{hauteur} (les lets)
\rule{3mm}{.1pt}\rule[-1mm]{5mm}{1cm}\rule{3mm}{.1pt}
\rule[1mm]{1cm}{5mm}\rule{3mm}{.1pt}
donne
Donc pour crer une bote de largeur 1cm, de hauteur 1.1cm et de profondeur 15pt, on tape
\rule[-15pt]{0pt}{1.1cm}\rule{1cm}{0pt}
Un premire ligne pour constater la hauteur.
Jinsre la commande ici et a me rserve lespace de la bote.
Une troisime ligne pour constater la profondeur.
10 Personnalisation grce titlesec et titletoc
% redfinition de la prsentation des chapitres
\titleformat{\chapter}[display]%
{\raggedright\normalfont\sffamily\huge\bfseries\mathversion{bold}}
{\chaptertitlename\ \thechapter}{20pt}
{\Huge}
\titlespacing*{\chapter} {0pt}{50pt}{40pt}
% redfinition de la prsentation des sections
\titleformat{\section}%
{\normalfont\sffamily\Large\bfseries\mathversion{bold}}{\thesection}{1em}{}
\titlespacing*{\section} {0pt}{3ex plus 1ex minus .2ex}{2ex plus .2ex}
...
171
Chapitre 6
Cohomologies et actions de groupes
6.1 Oprations algbriques
La notion dopration dune algbre de Lie sur une algbre direntielle gradue com-
mutative tire son origine de ltude des brs principaux avec connexions. Le formalisme
purement algbrique qui a ainsi t construit a t dgag par les mathmaticiens H. Car-
tan, C. Chevalley, J.-L. Koszul et A. Weil dans les annes 1940-50.
Lide de base est simple : elle consiste ne conserver que laspect algbrique des objets
dnis sur un br principal. Par exemple, dans un premier temps, nous verrons comment
remplacer laction dun groupe de Lie connexe G sur un br principal P par une opration
de son algbre de Lie g sur lalgbre direntielle gradue

(P) des formes direntielles.


6.1.1 Oprations de Cartan
Dnitions
Soient A une algbre direntielle gradue commutative unitale, et g une algbre de Lie
de dimension nie. Nous dirons que nous avons une opration de g sur A (ou encore que A
est une g-opration), sil existe une application linaire
i : g Der
1
(A) = {drivations de degr 1 de A}
drivations que nous noterons i
X
: A A pour tout X g, telle que
i
X
i
Y
+i
Y
i
X
= 0
pour tous X, Y g et telle que lapplication
L
X
= i
X
d +di
X
: A A
vrie
[L
X
, i
Y
] = i
[X,Y ]
[L
X
, L
Y
] = L
[X,Y ]
pour tous X, Y g. Il faut noter que L
X
est une drivation de degr 0 sur A qui commute
avec la direntielle,
L
X
d = dL
X
8 mars 2006
% redfinition de la prsentation de la table des matires
\titlecontents{chapter}[20pt]%
{\addvspace{1pc}\normalfont\sffamily\bfseries\large}
{\contentslabel[\thecontentslabel]{20pt}}{}{\hfill\contentspage}[]
\titlecontents{section}[40pt]%
{\addvspace{0.3pc}\normalfont\sffamily}
{\contentslabel[\thecontentslabel]{25pt}}{}{\dotfill\contentspage}[]
\titlecontents*{subsection}[60pt]%
{\filright\normalfont\sffamily\footnotesize}{}{}{}[~{}\ ][]
\setcounter{tocdepth}{2}
2 Table des matires
3.3 Cohomologie de de Rham . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Lalgbre direntielle

(M) Le lemme de Poincar La suite de Mayer-Vietoris


Couplage lhomologie singulire La formule de Knneth et le polynme de Poincar
3.4 Varit compacte, oriente et sans bord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Les groupes dhomologie et de cohomologie de plus haut degr Dualit de Poincar
Lapplication de Hodge, la codirentielle et le laplacien
3.5 Cohomologies supports compacts et dcroissance rapide . . . . . . . . . . . . . . . . . . . . . 106
Cohomologie support compact Courants de de Rham Suite de Mayer-Vietoris
support compact Cohomologie dcroissance rapide Classe de Thom dun br
vectoriel rel orient
3.6 Cohomologie de ech . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Le complexe de ech La cohomologie de ech Relation avec la cohomologie de
de Rham Cohomologie de ech valeurs dans des faisceaux Application aux brs en
droites complexes
4 Homologies et cohomologies des groupes et algbres de Lie 117
4.1 (Co)homologies dalgbres de Lie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Homologie dalgbres de Lie Cohomologie dalgbres de Lie Homologie et cohomologie
invariantes Extensions dalgbres de Lie Dformation dun crochet de Lie
4.2 Algbres de Lie rductives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Dnitions Rsultats sur les homologies et les cohomologies Structures de I(

g) et
I(

)
4.3 (Co)homologies de groupes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Dnitions et premires proprits Les groupes de (co)homologie en bas degrs
Rsultats structurels
5 Homologies et cohomologies des algbres associatives 133
5.1 Calculs direntiels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Calculs direntiels universels Lalgbre TA et le calcul direntiel universel unital
Calcul direntiel bas sur les drivations
5.2 Homologies de Hochschild. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Dnition des complexes La trace et linvariance de Morita Produit de battage
Relations avec dautres homologies Homologie de Hochschild dune algbre
commutative Homologie de Hochschild des algbres non unitales
5.3 Cohomologie de Hochschild. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Dnition des complexes Exemples pour deux bimodules particuliers Cohomologie de
Hochschild valeurs dans lalgbre Dformation dalgbres associatives Cohomologie de
Hochschild des algbres topologiques
5.4 Homologie cyclique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Les complexes et leurs oprateurs Proprits structurelles Lhomologie cyclique des
algbres commutatives Homologies priodique et ngative Cohomologie cyclique
6 Cohomologies et actions de groupes 171
6.1 Oprations algbriques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Oprations de Cartan Connections et courbures algbriques Lalgbre des formes sur un
br principal Les oprations de A
Lie
sur TA,
U
(A) et C

(A, A) Lopration de g
8 mars 2006
% redfinition des styles de page
\renewpagestyle{myheadings}[\normalfont\sffamily\bfseries\mathversion{bold}]{
\headrule
\setfoot[][][]{}{}{}
\sethead[\usepage][]
[\ifthechapter{\chaptertitlename\ \thechapter\ \chaptertitle}{\chaptertitle}]
{\ifthesection{Section \thesection\ \sectiontitle}{\chaptertitle}}{}{\usepage}}
172 Chapitre 6 Cohomologies et actions de groupes
puisque d
2
= 0. Nous noterons (A, g, i) une telle opration.
Dans lalgbre A, nous avons alors des sous espaces vectoriels canoniquement associs
cette opration :
I(A) = {a A / L
X
a = 0 X g}, ensemble des lments invariants de A. Il est
facile de vrier que cest une sous algbre direntielle gradue de A.
B(A) = {a A / i
X
a = 0 et L
X
a = 0 X g}, ensemble des lments basiques de
A. Il est l aussi facile de vrier que cest une sous algbre direntielle gradue de
A, et mme plus prcisment de I(A).
H(A) = {a A / i
X
a = 0 X g}, ensemble des lments horizontaux de A. Cest
une sous algbre gradue invariante par L
X
, mais a priori non munie dune direntielle.
Soit : A A

un morphisme dalgbres direntielles gradues commutatives. Nous


dirons que est un morphisme de g-oprations si, tant donnes deux g-oprations i et
i

sur A et A

, nous avons
i
X
= i

X

pour tout X g. Nous avons alors L
X
= L

X
pour tout X g, (I(A)) I(A

),
(B(A)) B(A

) et (H(A)) H(A

).
Soient (A, g, i) et (A

, g, i

) deux g-oprations. On dnit sur lalgbre direntielle gra-


due commutative AA

une g-opration en posant i

X
(a
p
a

) = (i
X
a
p
)a

+(1)
p
a
p
(i

X
a

)
pour tous X g, a
p
A
p
et a

. On a alors L

X
(a a

) = (L
X
a) a

+ a (L

X
a

) pour
tous X g, a A et a

. On appelle cette opration lopration produit tensoriel.


Cohomologies associes
Nous pouvons associer une opration (A, g, i) trois cohomologies :
H(A, d) la cohomologie de lalgbre direntielle gradue (A, d) ;
H
I
(A, d) la cohomologie invariante, qui est la cohomologie de lalgbre direntielle
gradue (I(A), d) ;
H
B
(A, d) la cohomologie basique, qui est la cohomologie de lalgbre direntielle
gradue (B(A), d).
Si : A A

est un morphisme de g-oprations, alors induit des morphismes

entre
les diverses cohomologies introduites.
6.1.2 Connections et courbures algbriques
La thorie des brs principaux utilise de faon essentielle la notion de connexion. Dans
ce qui suit, nous en donnons un quivalent algbrique.
Notations
Nous allons manipuler des objets dans Ag o (A, g, i) est une opration. Nous utiliserons
les notations suivantes : {E
k
} est une base de g, =
k
E
k
A
n
g, avec
k
A
n
, et
i
X
= i
X

k
E
k
L
X
= L
X

k
E
k
d = d
k
E
k
[X, ] =
k
[X, E
k
]
[,

] =
k

[E
k
, E

]
pour tout X g et

Ag.
8 mars 2006
Section 6.1 Oprations algbriques 173
Connexion algbrique
Soit (A, g, i) une opration. Une connexion algbrique sur cette opration est un l-
ment A
1
g tel que
1. i
X
= 1 X A
0
g pour tout X g ;
2. L
X
= ad
X
= [X, ] pour tout X g.
Soit : A A

un morphisme de g-oprations. Supposons que A et A

soient munies
chacune dune connexion algbrique et

. Nous dirons que est un morphisme de


g-oprations avec connexions si
() =

o () = (
k
) E
k
.
Courbure algbrique
Nous dnissons la courbure algbrique de la connexion par
= d +
1
2
[, ] A
2
g
Il est alors facile de vrier que satisfait
i
X
= 0 L
X
= [X, ]
pour tout X g, et
d + [, ] = 0
Cette dernire relation est lidentit de Bianchi .
6.1.3 Lalgbre des formes sur un br principal
Soit P(M, G) un br principal, et g lalgbre de Lie du groupe de Lie connexe G. Ce
groupe agit droite sur P. Nous notons (p, g) p g cette action pour p P et g G.
Cette action permet dassocier tout vecteur X g un champ de vecteur vertical X
v
sur P
par la relation habituelle
X X
v
|p
=

d
dt
p exp(tX)

|t=0
qui permet didentier g une sous algbre de Lie de lalgbre de Lie (P) des champs de
vecteurs sur P.
Soit A =

(P) lalgbre direntielle gradue commutative des formes direntielles sur


P. Nous dnissons une opration de g sur

(P) en posant
i
X
= i
X
v
pour tout X g. Au second membre, i
X
v est loprateur dinsertion habituel dun champ de
vecteurs sur les formes direntielles. Alors L
X
= i
X
d + di
X
est la drive de Lie habituelle
L
X
v dans la direction du champ de vecteurs X
v
.
Dans ce contexte, H(

(P)) est la sous algbre des formes horizontales sur P au sens


habituel du terme sur un br, do le nom de lespace H(A) dans le cas gnral. Les formes
invariantes I(

(P)) sont les formes invariantes par laction induite de G sur les formes, do
8 mars 2006
11 Le package graphicx et les inclusions dimages
\usepackage{graphicx}.
Le package graphicx dnit des commandes permettant de manipuler des botes :
> \rotatebox[options]{angle}{boite} eectue une rotation sur une bote. Les options sont origin
= lrctbB ou x=..., y=... qui spcient le centre de la rotation et units = ... qui spcie lunit
de langle.
> \scalebox{echelle-h}[echelle-v]{boite} eectue une mise lchelle selon les spcications hori-
zontales et verticales. Si loption verticale nest pas spcie, son facteur est identique lhorizontale.
> \reflectbox{boite} quivaut \scalebox{-1}[1]{boite}
> \resizebox{longueur-h}{longueur-v}{boite} et \resizebox*{longueur-h}{longueur-v}{boite}
redimensionnent la bote aux spcications donnes. La version toile utile la hauteur totale, alors que
la version sans toile utile la hauteur au dessus de la ligne de base.
Du texte\dots
\rotatebox{180}{A lenvers}
\rotatebox[origin=c]{180}{A lenvers}
\rotatebox[origin=tr]{180}{A lenvers}
et du texte.\\
Du texte\dots
\scalebox{2}{tir !}
\scalebox{2}[1]{tir !}
et du texte.\\
Du texte\dots
\resizebox{2cm}{1cm}{$\dfrac{1}{2}$}
\resizebox*{2cm}{1cm}{$\dfrac{1}{2}$}
et du texte.
Du texte. . . A l e n v e r s
A l e n v e r s
A l e n v e r s
et du texte.
Du texte. . . tir ! tir ! et du texte.
Du texte. . .
1
2
1
2
et du texte.
11-i Photos jpeg et png
\begin{center}
\includegraphics[width=6cm]{LogoUPS}\\
\includegraphics[width=6cm]{LogoCNRS}
\reflectbox{\includegraphics[width=6cm]{LogoCNRS}}
\end{center}
\begin{center}
\includegraphics[width=4cm, angle=6]{tourdepise}
\includegraphics[width=8cm, angle=-6]{tourdepise2}
\end{center}
La Tour de Pise semble pencher de 6
(La Tour de Pise semble pencher de 6\textdegree)
11-ii Dessins produits avec Metapost
Merci Fabien et Emmanuel. . .
j(3)
j(1)
i(6)
i(5)
i(4) i(2)
i(7)
x
11
x
21
x
31
x
41
x
12
x
22
x
32
x
42
x
13
x
23
x
33
x
43
x
14
x
24
x
34
x
44
1 2 3 4 + +
+
+
+ +
+
+


k cells
k levels
k odd
k even
=
O
A
B
C
P
Q
R
G
M
d
r
u
x
u
z
u
y

+
+

X
2
X
1
X
3
X
4
L
1
L
2
L
3
l
1
l
2
l
3
l
1
l
4
l
2
l
3
1
1
2
2
3
4
3
4
5
5
6
7
8
6
9
10
11
7
12
13
14
15
8
9
16
17
18
10
19
20
21
22
23
24

F
el

T
O
l
d/

3
u
x
u
y
1 3
2
O

F
1

F
2

F
el
u
x

u
y

d
r

C
A
B
O
d
h
Ecran
V

V
+
P
+
O
d

B
r

C
A
B
O
d
h
Ecran
d

B
r
O
y2
E
V2
P2
V1
P1
r2
cran
obstacle perc
de deux fentes
source lumineuse
rayons
lumineux
11-iii Images dans du texte
\usepackage{floatflt}
\begin{floatingfigure}[l]{4cm}
\caption{La sance du Gun-Club.}
\includegraphics[width=4cm]{JulesVerne}
\end{floatingfigure}
Permettez-moi, reprit-il, de vous...
Permettez-moi, reprit-il, de vous rappeler en quelques mots
Fig. 1 La sance du
Gun-Club.
comment certains esprits ardents, embarqus pour des
voyages imaginaires, prtendirent avoir pntr les secrets
de notre satellite. Au XVIIe sicle, un certain David Fa-
bricius se vanta davoir vu de ses yeux des habitants de
la Lune. En 1649, un Franais, Jean Baudoin, publia le
Voyage fait au monde de la Lune par Dominique Gonza-
ls , aventurier espagnol. A la mme poque, Cyrano de
Bergerac t paratre cette expdition clbre qui eut tant
de succs en France. Plus tard, un autre Franais ces
gens-l soccupent beaucoup de la Lune , le nomm Fon-
tenelle, crivit la Pluralit des Mondes , un chef-doeuvre
en son temps ; mais la science, en marchant, crase mme
les chefs-doeuvre ! Vers 1835, un opuscule traduit du New
York American raconta que Sir John Herschell, envoy
au cap de Bonne-Esprance pour y faire des tudes astro-
nomiques, avait, au moyen dun tlescope perfectionn par un clairage intrieur,
ramen la Lune une distance de quatre-vingts yards [Le yard vaut un peu moins
que le mtre, soit 91 cm.]. Alors il aurait aperu distinctement des cavernes dans
lesquelles vivaient des hippopotames, de vertes montagnes franges de dentelles dor,
des moutons aux cornes divoire, des chevreuils blancs, des habitants avec des ailes
membraneuses comme celles de la chauve-souris. Cette brochure, oeuvre dun Amri-
cain nomm Locke [Cette brochure fut publie en France par le rpublicain Laviron,
qui fut tu au sige de Rome en 1840.], eut un trs grand succs. Mais bientt on
reconnut que ctait une mystication scientique, et les Franais furent les premiers
en rire.
\usepackage{wrapfig}
Permettez-moi, reprit-il, de vous rappeler en quelques mots
comment certains esprits ardents, embarqus pour des
voyages imaginaires, prtendirent avoir pntr les secrets
de notre satellite. Au XVIIe sicle, un certain David Fa-
bricius se vanta davoir vu de ses yeux des habitants de
la Lune. En 1649, un Franais, Jean Baudoin, publia le
Voyage fait au monde de la Lune par Dominique Gon-
zals , aventurier espagnol. A la mme poque, Cyrano de
Bergerac t paratre cette expdition clbre qui eut tant
de succs en France. Plus tard, un autre Franais ces
gens-l soccupent beaucoup de la Lune , le nomm Fon-
tenelle, crivit la Pluralit des Mondes , un chef-doeuvre
en son temps ; mais la science, en marchant, crase mme
les chefs-doeuvre ! Vers 1835, un opuscule traduit du New
York American raconta que Sir John Herschell, envoy au cap de Bonne-Esprance
pour y faire des tudes astronomiques, avait, au moyen dun tlescope perfectionn
par un clairage intrieur, ramen la Lune une distance de quatre-vingts yards [Le
yard vaut un peu moins que le mtre, soit 91 cm.]. Alors il aurait aperu distincte-
ment des cavernes dans lesquelles vivaient des hippopotames, de vertes montagnes
franges de dentelles dor, des moutons aux cornes divoire, des chevreuils blancs, des
habitants avec des ailes membraneuses comme celles de la chauve-souris. Cette bro-
chure, oeuvre dun Amricain nomm Locke [Cette brochure fut publie en France
par le rpublicain Laviron, qui fut tu au sige de Rome en 1840.], eut un trs grand
succs. Mais bientt on reconnut que ctait une mystication scientique, et les
Franais furent les premiers en rire.
\begin{wrapfigure}{r}[0pt]{4cm}
\includegraphics[width=4cm]{JulesVerne}
\end{wrapfigure}
Permettez-moi, reprit-il, de vous...
12 Des outils externes
> makeindex : permet de crer un index. Utiliser le package makeidx. Les entres sont personnalisables :
\index{suite exacte},
\index{suite exacte!courte},
\index{suite exacte!courte!scindee@scinde},
\index{commutative!algebre@algbre --},
\index{z(a)@$\mathcal{Z}(\mathbf{A})$} (ache Z(A) dans la position alphabtique z(a) ).
> bibtex : permet de grer la bibliographie partir dun chier contenant toutes les rfrences.
@book{Blac:98,
Author = {Blackadar, B.},
Keywords = {Personnel},
Number = {5},
Publisher = {Cambridge University
Press},
Series = {Math. Sc. Research
Inst. Pub.},
Title = {{$K$}-Theory for
Operator Algebras},
Year = {1998}}
@Article{Feynman:1948ur,
author = "Feynman, R. P.",
title = "Space-time approach to
nonrelativistic quantum mechanics",
journal = "Rev. Mod. Phys.",
volume = "20",
year = "1948",
pages = "367-387"
}
13 Documentation
> Les sites ociels :
Le CTAN et The T
E
X Catalogue On Line

on y retrouve tous les packages dcrits ici !


La page de lAMS sur AMSLaTeX.
> Lassociation GUTENBERG des utilisateurs francophones de L
A
T
E
X :
> Cours sur L
A
T
E
X :
Documentations ocielles sur L
A
T
E
X : classes (clsguide.pdf), fontes (fntguide.pdf), user guide
(usrguide.pdf). . .
A not so short Introduction to Latex, disponible dans diverses langues.
A beginners guide to LaTeX (beginlatex-3.6.pdf)
Faire des prsentations avec L
A
T
E
X
> Un journal en ligne : PracTeX, journal avec des articles pour les utilisateurs de base de T
E
X, L
A
T
E
X &
Co.
> Les polices de caractres :
L
A
T
E
X2e font selection (fntguide.pdf)
Liste de tous les symboles disponibles sous L
A
T
E
X (symbols-a4.pdf)
PSNFSS (psnfss2e.pdf), utilisation des polices PostScript standard sous L
A
T
E
X.
> Graphiques :
Using Imported Graphics in L
A
T
E
X and pdfL
A
T
E
X (epslatex.pdf)
Le package graphicx
> Listes de diusion :
Liste de listes sur tex.org
Groupe comp.text.tex, Groupe fr.comp.text.tex et Groupe L
A
T
E
X chez Google.

You might also like