# Line Numbers in Listing Outside of Paragraph

I use the listings package for code listings and I turned the line numbers on. But they appear left of the paragraph. I want them inside the paragraph. In the documentation it looks just right. Here is my code:

\documentclass[12pt,a4paper]{scrartcl}
\usepackage{listings}
\lstset{numbers=left}
\begin{document}
\section{Test}
Test
\begin{lstlisting}
test()
\end{lstlisting}
\end{document}

-
If you accept an answer you probably find it useful and hence you should upvote it. – N.N. Aug 8 '11 at 13:38

\lstset{numbers=left,xleftmargin=2em,frame=single,framexleftmargin=1.5em}