I'm trying to apply textbf and ttfamily simultanously, but the font is only getting monospaced and not bold.
Example:
\documentclass{book}
\begin{document}
\chapter{Testing}
\textbf{Bold}\\
\ttfamily{Monospaced}\\
\textbf{\ttfamily{Bold and Monospaced}}\\
\end{document}
Result:

How can I make the output become monospaced and bold at the same time?
\usepackage[lighttt]{lmodern}. Give it a try. – egreg May 21 '13 at 19:27\ttfamilyacts like a switch. So,\ttfamily{A}Beffects both theAand theB. To limit the effect of\ttfamilyyou need to enclose it in parentheses. – A.Ellett May 21 '13 at 19:28\ttfamilyand\bfseries. Usinglistingsis incidental. As I often say, closing as duplicate is not a judgment on the questioner, but rather a way to keep information more compact and useful for future readers. – egreg May 21 '13 at 19:38\usepackage[lighttt]{lmodern}isn't clearly presented in the cited reference, and it would make a much better answer if it were. a logical place to add it there would be in Ulrike's answer, but that would make nonsense out of some of the comments. i'm all for enhancing and consolidating, but i think this one is a bit tricky. – barbara beeton May 21 '13 at 19:45