Hello,

I've got a problem with the listings package. When I insert code from a file like this:

\begin{lstlisting}[caption=program1,frame=Tb,rulesep=10pt,numbers=left,numbersep=5pt,numberstyle=\tiny,language=C]
for (i=0;i<=j;i++){
i+=1;
}
\end{lstlisting}

Example output:
1 for (i=0;i<=j;i++){
2
3 i+=1;
4
5 }

I get only in every second line text.
I tried it with the option "emptylines=0" but then is the problem that all blank lines are away. So in both cases the clearness is gone. Can somebody help me to solve the problem, so that the text is displayed like my editor does?

Best regards
Chris

Reply via email to