How to write text bold in LaTeX?

When you’re working on a document in LaTeX, you might often need to convert normal text to bold multiple times to enhance the overall look of the document.

In LaTeX, the three main commands for converting text from normal to bold are \textbf, \bfseries, and \bf.

With the \textbf command, you need to pass the text as an argument. However, the \bfseries and \bf commands work differently. For example:

\documentclass{article}
\begin{document}
  \textbf{Computational physics} is a combination branch of {\bf physics}, {\bf math}, and 
  {\bf computer science} where {\bfseries complex mathematical problems of physics} are 
  solved very subtly with the help of {\bfseries computational power}.
\end{document}

Output :

Use textbf, bfseries, and bf commands to convert text from normal to bold.

It’s possible to represent the \bfseries and \bf commands using the \textbf command by creating a new command for convenience.

\documentclass{article}
\newcommand{\boldx}[1]{{\bf #1}}
\newcommand{\boldy}[1]{{\bfseries #1}}
\begin{document}
  \textbf{Computational physics} is a combination branch of \boldx{physics}, \boldx{math}, and 
  \boldx{computer science} where \boldy{complex mathematical problems of physics} are 
   solved very subtly with the help of \boldy{computational power}.
\end{document}

Output :

Use textbf, bfseries, and bf commands to convert text from normal to bold.

Use text bold with italic style in LaTeX

To make text both bold and italic in LaTeX, you can use the \textbf and \textit commands together.

\documentclass{article}
\begin{document}
  \textbf{\textit{Physics}} \\ [6pt]
  \textit{\textbf{Chemistry}} \\ [6pt]
  \textit{\bfseries Math} \\ [6pt]
  \bfseries \textit{Biology}
\end{document}

Output :

Use textbf, bfseries, and textit commands to convert text from normal to bold-italic style.

If you have difficulty writing such a large expression more than once, you can simplify things by creating a macro.

\documentclass{article}
\newcommand{\ibx}[1]{\textbf{\textit{#1}}}
\newcommand{\iby}[1]{\textit{\textbf{#1}}}
\newcommand{\ibz}[1]{\textit{\bfseries #1}}
\begin{document}
  \ibx{Physics} \\ [6pt]
  \iby{Chemistry} \\ [6pt]
  \ibz{Mathematics} 
\end{document}

Output :

Use textbf, bfseries, and textit commands to convert text from normal to bold-italic style.

Interestingly, if you pass the \bf command as an argument to the \textit command, the text style remains unchanged.

\documentclass{article}
\begin{document}
  \textit{\bf Python} best {\bf \textit{programming language}}. 
\end{document}

Output :

Use bf command bold-italic style.

Similarly, LaTeX offers the \it command to italicize text, just like the \bf command. If you use it inside a \textbf command, the text becomes italic but not bold.

\documentclass{article}
\begin{document}
  \textbf{\it Python} best {\it \textbf{programming language}}. 
\end{document}

Output :

Use \it command to convert any text to italic style like the \bf command.

So, it’s generally not recommended to use both \bf and \it commands in modern LaTeX documents.

Use textbf command in math mode

You can use the \textbf command in Math mode, but you will not be able to pass any mathematical symbol instead of text in this command.

However, many non-symbolic expressions, like vectors, can still be written in bold.

\documentclass{article}
\begin{document}
 \[ \hat{r} = \frac{\textbf{r}}{\vert\textbf{r}\vert} \]
 \[ \vec{r} = \textbf{r}_x + \textbf{r}_y + \textbf{r}_z \]
\end{document}

Output :

Use textbf command in math mode.

Share tutorial

2 thoughts on “How to write text bold in LaTeX?”

    1. Thank you very much for the comment. Of course, I agree with you. This tutorial has shown just “how to use \bf and \it commands”. And as mentioned in this tutorial, using the \bf and \it commands is not the best practice for modern latex.

Leave a Comment

Your email address will not be published. Required fields are marked *