Written and maintained by CASRAI Editorial Board
Last updated
Boldface in LaTeX is set with \textbf{...} in running text and with \mathbf{...} or \bm{...} inside math. The text command needs no package. The math commands work only in math mode, and bm needs the bm package. This guide shows which command to use where, how bold combines with italic and underline, and what to check when the result is not what you expected.
What it is used for in research
In manuscripts, theses and reports, bold type marks defined terms, run-in headings and emphasis in text. In equations, bold marks vectors, matrices and similar objects. These are two separate mechanisms in LaTeX, which is why a command that works in a sentence often does nothing useful inside a formula. Use \textbf for the first job and a math-bold command for the second.
Install or access (official source only)
- Bold text:
\textbfis part of core LaTeX. Nothing to load. - Bold math with
\mathbf: the Overleaf mathematical-fonts documentation demonstrates it in a document that loadsamsmathandamssymb. - Bold math with
bm: add\usepackage{bm}to the preamble. The CTAN package page listsbmas part of the LaTeX tools bundle, within the required LaTeX distribution, so a standard TeX installation already contains it (CTAN, ctan.org/pkg/bm, checked 2026-11-07).
Step-by-step: make text and math bold
Bold text with \textbf
- Write
\textbf{, the text to embolden, then}. - Compile. The braced text is set in bold.
Some of the \textbf{greatest}
discoveries in \underline{science}
were made by \textbf{\textit{accident}}.
This is the example given in Overleaf’s documentation: \textbf bolds a word, \underline underlines one, and the commands can be nested to combine styles (Overleaf, “Bold, italics and underlining”, checked 2026-11-07).
Bold and italic together
Nest the commands: \textbf{\textit{accident}}. Overleaf’s documentation states that these commands can be nested and that the result combines the effects.
Bold math with \mathbf
- Enter math mode, for example
$...$for inline math. - Wrap the expression:
\mathbf{3x^2 \in R \subset Q}.
Overleaf’s mathematical-fonts page shows that \mathbf applies to the whole expression: not only letters but all characters change appearance (Overleaf, “Mathematical fonts”, checked 2026-11-07).
Bold math with \bm
- Add
\usepackage{bm}to the preamble. - In math mode write
\bm{x}for a symbol, or\bm{...}around a whole expression.
The CTAN entry for bm states that the package defines a command \bm which makes its argument bold.
Which command, where
| Goal | Command | Needs | Source |
|---|---|---|---|
| Bold words in running text | \textbf{word} |
Nothing extra | Overleaf, Bold, italics and underlining |
| Bold and italic text | \textbf{\textit{word}} |
Nothing extra | Overleaf, Bold, italics and underlining |
| Italic text | \textit{word} or \emph{word} |
Nothing extra | Overleaf, Bold, italics and underlining |
| Underlined text | \underline{word} |
Nothing extra | Overleaf, Bold, italics and underlining |
| Bold whole math expression, characters included | \mathbf{...} |
Shown with amsmath and amssymb loaded | Overleaf, Mathematical fonts |
| Bold a math symbol or expression | \bm{...} |
\usepackage{bm} |
CTAN, bm package |
Output and how to read it
After compiling, \textbf text appears in the bold weight of the current font, and nested \textit adds slant. In math, \mathbf changes every character in its argument, including digits and operators, so check the PDF that relations such as the element-of sign look as you intended. If you want the package-based alternative, \bm makes its argument bold, as CTAN states.
Troubleshooting
\emph is not italic
Inside normal text \emph gives italic, but inside italicised text the behaviour is reversed and the emphasised word comes out upright. Packages such as Beamer can also change what \emph does (Overleaf, “Bold, italics and underlining”). If you need a guaranteed look, use \textit or \textbf explicitly.
Old \bf and \it behave oddly
These plain-TeX switches still work, but Overleaf’s documentation discourages them because they do not preserve previous styles; that is also why you cannot reliably combine bold and italic with them. Replace them with \textbf and \textit.
\bm is undefined
The command comes from the bm package. Add \usepackage{bm} to the preamble.
Bold applied to text inside a formula
\textbf is a text-mode command. For symbols and expressions inside math mode use \mathbf or bm as in the table above.
For another text-decoration task in LaTeX, see our guide to crossing out text in LaTeX.
Equivalent and related commands
| Style | Preferred command | Older switch (discouraged) |
|---|---|---|
| Bold | \textbf{...} |
\bf |
| Italic | \textit{...} |
\it |
| Emphasis | \emph{...} |
– |
| Underline | \underline{...} |
– |
All entries are as listed in Overleaf’s documentation. Underlining in math and bold-italic math are not covered by that page, so check the relevant package manual before relying on a specific command.
FAQ
How do I make text bold in LaTeX?
Use \textbf{your text}. It is core LaTeX and needs no package.
How do I make math bold in LaTeX?
Use \mathbf{...} for a whole expression, or load the bm package and use \bm{...}, which CTAN describes as making its argument bold.
How do I bold and underline or italicise at once?
Nest the commands, for example \textbf{\underline{word}} or \textbf{\textit{word}}. Overleaf’s documentation states they can be nested.
Does this work in Overleaf?
The commands are the same in Overleaf as in any LaTeX document; the Overleaf documentation above is written for its editor.
Sources
- Overleaf documentation, Bold, italics and underlining, checked 2026-11-07.
- Overleaf documentation, Mathematical fonts, checked 2026-11-07.
- CTAN, bm package, checked 2026-11-07.
Related on CASRAI: collaborative writing in LaTeX and Overleaf, the BibTeX file format and LaTeX bibliography styles.







