How-to

How to Make Text Bold in LaTeX

The fix

To make text bold in LaTeX, wrap it in \textbf{...}, for example \textbf{important}. For a longer passage, switch the font inside a group: {\bfseries several sentences}. In math, use \mathbf{x} for upright bold letters and \bm{\alpha} (from the bm package) for bold Greek and italic symbols. For bold italic, nest them: \textbf{\textit{...}}.

Not sure it worked on your document? Paste it into LetX and compile it, free and in the browser.

Why it happens

LaTeX has two kinds of font command. \textbf{...} takes an argument and bolds only that argument; \bfseries is a declaration that stays in force until the current group or environment ends. Math is set in separate math fonts, so text commands do not bold a symbol the way you expect: \textbf{x} inside $...$ gives an upright text-font x, not a bold variable. That is why math has its own bold commands.

Example

\usepackage{bm}   % preamble, only needed for \bm
% in the document:
This is \textbf{bold}, \textit{italic}, \underline{underlined}
and \texttt{monospaced}.

% Bold and italic together:
\textbf{\textit{bold italic}}

% A longer passage: \bfseries lasts until the group ends
{\bfseries This sentence is bold.

So is this whole paragraph.}

% Bold in math:
$\mathbf{v} = (v_1, v_2)$ and $\bm{\alpha} + \bm{\beta}$

\textbf vs \bfseries vs \bf

Use \textbf{...} for a word or a phrase. It takes one argument, so it cannot run on by accident. It also cannot hold more than one paragraph: a blank line inside \textbf{...} stops the compile with "Paragraph ended before \text@command was complete".

Use \bfseries for anything longer, and inside your own commands and environments: {\bfseries ...} or \begin{center}\bfseries ... \end{center}. It bolds everything up to the closing brace or the \end.

Avoid \bf. It is a LaTeX 2.09 command that the standard classes keep only for old documents, and it resets the font before switching, so {\bf\it text} comes out italic but not bold, while \textbf{\textit{text}} gives real bold italic. The KOMA-Script classes (scrartcl, scrreprt, scrbook) reject it with "Class scrartcl Error: undefined old font command". The same is true of \it, \rm, \tt and \sc.

Bold in math: \mathbf, \bm and \boldsymbol

\mathbf{v} gives upright bold Roman letters and digits, the usual style for vectors and matrices. It has no effect on lowercase Greek: \mathbf{\alpha} prints an ordinary alpha, with no error to tell you.

For bold Greek letters and bold italic variables, load \usepackage{bm} and write \bm{\alpha} or \bm{x}. amsmath provides \boldsymbol{...}, which does the same job for most symbols.

To set a whole formula in bold, for example inside a bold heading, put \boldmath before the math starts: {\boldmath $f(x) = x^2$}. Inside math it does nothing, and LaTeX warns "Command \boldmath invalid in math mode". The reverse mistake, \mathbf in ordinary text, stops with "LaTeX Error: \mathbf allowed only in math mode"; use \textbf there.

\usepackage{amsmath}
\usepackage{bm}
% in the document:
$\mathbf{A}\mathbf{x} = \mathbf{b}$     % bold upright vectors
$\bm{\mu} = \bm{\Sigma}^{-1}\bm{x}$     % bold Greek and italic
{\boldmath $f(x) = x^2$}              % a whole formula in bold

Bold in tables, headings and the title

Section headings are already bold, so \textbf inside \section{...} changes nothing you can see. To take the bold off part of a heading, use \textmd{...}, as in \section{Results \textmd{(draft)}}. To restyle every heading, use the titlesec package rather than editing each one.

The title printed by \maketitle in the article class is large but not bold. Write \title{\textbf{Your title}} if you want it bold.

In a table, bold one cell with \textbf{...}. To bold a whole column, load the array package and put >{\bfseries} before the column letter.

\usepackage{array}
\usepackage{booktabs}
% in the document:
\begin{tabular}{>{\bfseries}l r}
  \toprule
  Model    & \textbf{Accuracy} \\
  \midrule
  Baseline & 71.2 \\
  Ours     & \textbf{84.5} \\
  \bottomrule
\end{tabular}

When the bold does not show up

Bold monospace: with the default Computer Modern fonts, \texttt{\textbf{code}} prints ordinary typewriter text. Computer Modern has no bold typewriter face, and LaTeX substitutes the regular one without a warning. Add \usepackage[T1]{fontenc} and \usepackage{lmodern}, which include a bold monospace.

Bold small caps: \textbf{\textsc{...}} has no matching face in Computer Modern or Latin Modern either. Here the log does tell you: "LaTeX Font Warning: Font shape `OT1/cmr/bx/sc' undefined", and LaTeX falls back to ordinary bold, without the small capitals. Only a font family that has bold small caps can fix that.

"Undefined control sequence" on a line with \bm means the bm package is not loaded.

Frequently asked questions

How do I make a whole paragraph bold?

Put \bfseries at the start of a group: {\bfseries your paragraph}. It also works across several paragraphs, which \textbf{...} cannot do.

How do I bold text in a math equation?

Use \mathbf{x} for upright bold letters such as vectors, and \bm{\alpha} from the bm package for bold Greek letters and italic variables. \mathbf has no effect on lowercase Greek.

Why should I not use \bf?

\bf is an old LaTeX 2.09 command. The standard classes still accept it, but it resets the font, so {\bf\it text} gives italic only, and the KOMA-Script classes reject it with an error. Use \textbf{...} or \bfseries.

How do I make text bold and italic?

Nest the commands: \textbf{\textit{text}} or \textit{\textbf{text}}. Both give bold italic, because each command changes only one property of the font.

How do I make text bold in a LaTeX table?

Use \textbf{...} in the cell. For a whole column, load the array package and write >{\bfseries}l in the column specification.

How do I emphasize without bold?

\emph{...} is the semantic choice: it italicizes in normal text and switches back to upright inside text that is already italic. Keep \textbf for strong emphasis and labels.

Related LaTeX fixes

Browse all LaTeX problems & fixes, or start with the LaTeX guide.

Try the fix in LetX

Open the editor, paste your code, and compile in seconds to see the error clear. Free, in your browser.

Open LetX Free