Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical Supply Distributor100,000+ medical supplies. 48-hour critical dispatch.Ships from 8 regional U.S. hubs. Net-30 terms for verified institutional accounts.Shop lac.us CodeCASRAIlac.us

LaTeX Boldface: Bold Text and Bold Math (\textbf, \mathbf, \bm)

LaTeX boldface explained: textbf for text, mathbf and bm for math, nesting with italic and underline, and fixes when bold does not appear.

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: \textbf is part of core LaTeX. Nothing to load.
  • Bold math with \mathbf: the Overleaf mathematical-fonts documentation demonstrates it in a document that loads amsmath and amssymb.
  • Bold math with bm: add \usepackage{bm} to the preamble. The CTAN package page lists bm as 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

  1. Write \textbf{, the text to embolden, then }.
  2. 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

  1. Enter math mode, for example $...$ for inline math.
  2. 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

  1. Add \usepackage{bm} to the preamble.
  2. 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

Related on CASRAI: collaborative writing in LaTeX and Overleaf, the BibTeX file format and LaTeX bibliography styles.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about LaTeX Boldface: Bold Text and Bold Math (\textbf, \mathbf, \bm)

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →