LaTeX provides several commands for text formatting: bold, italic, underline and their combinations. This guide also covers bold in math mode.
Text formatting
The three essential commands are \textbf (bold), \textit (italic) and \emph (emphasis, which automatically alternates between italic and upright).
LaTeX
Texte \textbf{en gras} et \textit{en italique}.
\textbf{\textit{Gras et italique combinés.}}
Texte \underline{souligné}.
Avec \emph{emph}, le texte est en italique.
\textit{Mais dans un contexte déjà italique, \emph{emph} revient en romain.}
Bold in math mode
In math mode, \textbf does not work. Use \mathbf for upright letters or \boldsymbol for symbols and Greek letters.
LaTeX
% mathbf : lettres droites (pas italiques)
$ \mathbf{A} \cdot \mathbf{x} = \mathbf{b} $
% boldsymbol : conserve l'italique et les symboles grecs
$ \boldsymbol{\alpha} + \boldsymbol{\beta} = \boldsymbol{\gamma} $
Reference table
| Command | Effect | Mode |
|---|---|---|
\textbf{...} | Gras | Texte |
\textit{...} | Italique | Texte |
\emph{...} | Emphase | Texte |
\underline{...} | Souligné | Texte + Maths |
\mathbf{...} | Gras droit | Maths |
\boldsymbol{...} | Gras italique | Maths |