문제

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.

도움이 되었습니까?

해결책

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.

다른 팁

Look at the listings or fancyvrb package.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top