Knowledge base dedicated to Linux and applied mathematics.
Accueil > Latex > FAQ > Latex - FAQ > Comment faire un tableau en Latex ? begintabular...endtabular
Toutes les versions de cet article : <English> <français>
Vous devez utiliser l’environnement tabular.
La description des colonnes est faite par les lettres r, l ou c
– r colonne de texte justifié à droite
– l colonne de texte à gauche
– c colonne de texte centré
Une colonne peut àªtre délimitée par une séparation
verticale : | ou rien.
Lorsque plusieurs colonnes voisines possèdent la màªme description, un regroupement est possible :
*{nb_colonne}{description}
– \hline permet d’obtenir une ligne horizontale entre deux lignes
– le symbole & sépare chaque colonne .
– le symbole \}} permet un changement de ligne
– \cline{i-j} ligne horizontalle entre les colonnes i et j
Exemple :
\begin{center}
\begin{tabular}{| l | c || r | }
\hline
1 & 2 & 3 \\ \hline
4 & 5 & 6 \\ \hline
7 & 8 & 9 \\
\hline
\end{tabular}
\end{center}
\begin{tabular}{|*{2}{c|}l r|}
\hline
math & linux & dot & com \\
center & center& left & right \\
\hline
$\sigma$ & $\alpha$ & $\rho$ & $\theta$ \\
\hline
\end{tabular}
\begin{tabular}{|r|l|}
\hline
2B & hexadecimal \\
53 & octal \\ \cline{2-2}
101011 & binary \\
\hline \hline
43 & decimal \\
\hline
\end{tabular}