I am currently working on a document where I want the default font to be, as usual, Computer Modern. In particular, unless otherwise specified, this is the font that should be displayed.
Notwithstanding, at some points of the paper, I would like to be able to write a word with the font bookman, and then change back to Computer modern. I tried to use the advices given here, and produced something like this.
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm,xparse}
\usepackage{bookman}
\usepackage[OT1]{fontenc}
\newcommand{\cmr}{\fontfamily{cmr}\selectfont}
\newcommand{\pbk}{\fontfamily{pbk}\selectfont}
\begin{document}
\cmr
\section{Irrational Numbers.}
Let the set of rational numbers be defined by
\[\mathbb Q:=\left\{\frac{a}{b} \mid a\in \mathbb Z, b\in \mathbb N, \gcd(a,b)=1\right\}\]
\textbf{Claim. } The {\pbk square root} of 2 is irrational.
\begin{proof}
Assume for the sake of contradiction that \ldots
\end{proof}
\end{document}
As you can see in the image, even though Computer Modern was set to be the default font at the beginning via \cmr, and bookman was in fact used when appealing to \pbk, the later was also used in several environments such as \section or \begin{proof}, which was not what I wanted. What have I made wrong? And how could I repare it? Are there easier/alternative proceedings?
Thanks in advance.


gcdcondition. All in all, 2/4 is a rational number as well :) – user265131 Nov 21 '21 at 16:04