Search code examples
latextexpdflatexlistings

Some abundant text when inserting code into latex with listing


My lstset as below:

\lstset{ %
language = c++,
basicstyle = \footnotesize,
numbers = left,
numberstyle = \tiny\color{gray},
stepnumber = 2,
keepspaces = true,
numbersep = 5pt,
backgroundcolor = \color{white},
showspaces = false,
showstringspaces = false,
showtabs = false,
frame = single,
rulecolor = \color{black}
tabsize = 2,
captionpos = b,
breaklines = true,
breakatwhitespace = false,
title = \lstname,
keywordstyle = \color{blue},
commentstyle = \color{dkgreen},
stringstyle = \color{mauve},
escapeinside = {\%*}{*)},
morekeywords = {*,...}
}

and I insert my code through

\lstinputlisting{my.cc}

But I get this:

image

How can I obliterate the "Tabsize" at left?


Solution

  • Could it be because you are missing a comma after the rulecolor line?