tags:

views:

358

answers:

1

Hi,

I'm trying to get a report done and I have a small problem with the twocolums and the line numbering in listings.

The document is on two columns :

\documentclass[8pt,[...],a4paper,twocolumn]{article}

The listings can end up either on the left or the right column. The problem is: if I put

\lstset{numbers=left,frame=tb,[...]}

the space between the columns is not sufficient when the listing is on the right column and the text from the first column is written over.

Is there any way to ask the listings to put the line numbers "outside" ? I know I can modify the space between the columns, but I would prefer to move the numbers on the side.

Thanks

A: 

Try the following (you might have to adjust the sizes):

\lstset{xleftmargin=5mm,framexleftmargin=5mm}
grddev