Take the 2-minute tour ×

this is my style defined for C#:

  ,lineskip={-1.5pt} % single line spacing

The problem is that for some reason, when the embedded strings are rendered, they look like this:


but should:


I would appreciate any help.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

The tell-tale hint is the presence of multiple semicolons just before each "token" (syntactic unit of characters) involved in the string.

If you inspect your source code, you'll find the line stringstyle=\color{BrickRed};, which is telling lstlisting to add a semicolon and switch the color to BrickRed each time a token inside a string is typeset. Get rid of the semi-colon and the problem should be fixed.

share|improve this answer
How could I miss that, thanks! –  JanuszL Oct 6 '11 at 16:05

Your Answer


