\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{listings}
\lstdefinestyle{General} {
basicstyle=\small\ttfamily
}
\lstset{style=General}
\begin{document}
\chapter{MyChapter with some \lstinline|inline text|}
Here is some text with some \lstinline|inline text|
\end{document}
I am using the \lstinline
very often in my texts. The font size should be \small
within these texts. But sometimes I have to use the \lstinline in my chapter headlines. Of course now there are small too which looks weird. How can I change the fontsize only for these chapter headers?