How to Write Bold Text in LaTeX

In LaTeX, you can write bold text using the \textbf command or the \bfseries declaration.

The following examples show how to write bold text in LaTeX.

How to Write Bold Text in Text

We can use the \textbf command or the \bfseries declaration to write bold text in LaTeX document for text.

Suppose we want to write bold text in the text.

We can use the following LaTeX code to do so:

\documentclass{article}
\begin{document}

This is an example of using the \textbf{bold} text with the \texttt{\textbackslash textbf} command.

This is another example using the {\bfseries bold} text with the \texttt{\textbackslash bfseries} declaration.

\end{document}

Output: 👇️

Bold Text

In this example, both the \textbf command and the \bfseries declaration are used to display the bold text in the document.

How to Write Bold Text in Mathematical Expressions

For mathematical expressions, we can use the \mathbf command to ensure proper formatting.

Suppose we would like to write mathematical expressions that contain bold text.

We can use the following LaTeX code to do so:

\documentclass{article}
\begin{document}

An inline mathematical expression: \( \mathbf{a + b} \).

A displayed mathematical expression:
\[
\mathbf{a + b}
\]

\end{document}

Output: 👇️

Bold Text in Math Expression

In this example, we use the \mathbf command to denote bold text in both inline and displayed mathematical expressions. \mathbf command only bold the letters and not operators like + as used in the above latex document.

Conclusion

We can use the \textbf command or the \bfseries declaration for text, and the \mathbf command for mathematical expressions.