tags:

views:

285

answers:

2

How do I define a font to a listing?

I would like one font on the line numbers (Sans 6pt) and another (Monospace (8pt) on the code.

+1  A: 

Look at the listings or fancyvrb package.

Little Bobby Tables
+1  A: 

You can define the style of the line numbers using the following command:

\lstdefinestyle{numbers}{numberstyle=\tiny}

The code appearance can be defined using:

\lstset{basicstyle=\small}

You can replace \tiny and \small by your own style specifications.

Lohrun