This is a follow-up question to the previous one of mine.
Consider the following MWE.
\documentclass{article}
\usepackage[all]{tcolorbox}
% \usepackage{newtxtt}
\begin{document}
\begin{docCommand}{foo}{}
\verb|\foo|
\end{docCommand}
\end{document}
The result (with Computer Modern) is like the following and this is as intended:
If we uncomment the line \usepackage{newtxtt}, the red \foo gets bold while the black one remains regular weight.
Font packages with which this issue can be confirmed are
- Courier (
\usepackage{courier}), - DejaVu (
\usepackage{dejavu}), - Fira (
\usepackage{FiraMono}), - Incondolata (
\usepackage{zi4}), and - Source Code Pro (
\usepackage{sourcecodepro}).
I find it very weird that the font series used in the first argument of docCommand environment varies according to the font family. How come this happens?


keywords boldto the nexttcolorboxversion to switch off boldface, if needed. – Thomas F. Sturm Apr 25 '17 at 09:05\tcb@Print@***s is easy but provision of such interface would be much better IMHO. – yudai-nkt Apr 25 '17 at 11:02