You can use the optional argument to provide any listings
options:
\lstinputlisting[basicstyle=\ttfamily\scriptsize,language=somelang]{filename}
For multiple listings you can set this settings globally (or locally to the current group) using \lstset{<options>}
. See the listings
manual for more details.
https://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings
From the tagging, it seems that you are using KOMAscript
and the class scrbook
. Then you change the font either with \setkomafont
or \addtokomafont
(see section 3.6, page 51 in the revised manual), and with the modifier chapterprefix
. Try:
\setkomafont{chapterprefix}{\rmfamily\Large\bfseries}
or, to change to a serif typeface only:
\addtokomafont{chapterprefix}{\rmfamily}
To change all sectioning to the default Roman font, reverse all font changes you have done to chapter
, and try
\addtokomafont{sectioning}{\rmfamily}
It seems from your comment that somebody has tampered with the definitions in your classfile. This minimal example works for me, giving me sans serif in heading and body text.
\documentclass[twoside,12pt,a4paper,pointlessnumbers,headsepline,idxtotoc]{scrbook}
\usepackage{fixltx2e}
\usepackage[UKenglish]{babel}
\usepackage{tgheros}
\renewcommand*\familydefault{\sfdefault}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{blindtext}
\begin{document}
\blinddocument
\end{document}
In your document, comment out (or delete) all usepackage{secsty}
etc. that changes the headings. Or add packages and commands from you preamble to my code.
If you are going to use Helvetica as sans serif font, I suggest using the Tex-Gyre version instead, by loading the package tgheros
. I have changed my MWE correspondingly.
Best Answer
I would try
Replace
\refname
by\bibname
if your class isbook
.If you are using
biblatex
, the relevant commands are described in section 3.5.7 of the manual (seetexdoc biblatex
).