I am trying to insert some piece of code into my document, using the \lstinputlisting command. However the fonts displayed do not look too good. Is it possible to change the font size and style?


You can use the optional argument to provide any listings options:


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.


\lstinputlisting obeys to the same options that are set with \lstset for the environment form. So something like


should do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.