# Removing horizontal black line in listings

I'm using listings for code snippets and I can not seem to find a way to remove the horizontal line on the bottom of a listings environment.

My code:

\lstset{
basicstyle=\scriptsize\ttfamily, % Standardschrift
numbers=left,               % Ort der Zeilennummern
numberstyle=\color{blue!20!black!30!green}\tiny\ttfamily,          % Stil der Zeilennummern
%stepnumber=2,               % Abstand zwischen den Zeilennummern
numbersep=5pt,              % Abstand der Nummern zum Text
tabsize=2,                  % Groesse von Tabs
extendedchars=true,         %
breaklines=true,            % Zeilen werden Umgebrochen
keywordstyle=\color{red},
frame=b,
%        keywordstyle=[1]\textbf,    % Stil der Keywords
%        keywordstyle=[2]\textbf,    %
%        keywordstyle=[3]\textbf,    %
%        keywordstyle=[4]\textbf,   \sqrt{\sqrt{}} %
stringstyle=\color{blue}\ttfamily, % Farbe der String
showspaces=false,           % Leerzeichen anzeigen ?
showtabs=false,             % Tabs anzeigen ?
xleftmargin=0pt,
framexleftmargin=0pt,
framexrightmargin=0pt,
framexbottommargin=4pt,
%backgroundcolor=\color{lightgray},
showstringspaces=false,      % Leerzeichen in Strings anzeigen ?
inputencoding=utf8,
literate={å}{{\aa}}1
{æ}{{\ae}}1
{ø}{{\o}}1
}


-
Without checking the documentation, I would guess that the line frame=b is the cause. (b for bottom.) –  Torbjørn T. Jun 10 '12 at 13:07
@TorbjørnT., did the trick! –  JavaCake Jun 10 '12 at 13:13
@TorbjørnT. very good! Perhaps make this an answer, or let us close it as too localized since it was caused just by an accidental setting. –  Stefan Kottwitz Jun 10 '12 at 13:14
@StefanKottwitz, im quite new here, whats best-practice? –  JavaCake Jun 10 '12 at 13:15
best-practice: providing an answer, as @TorbjørnT. did, if it's useful for other LaTeX users; closing as too localized if it's a small mistake or an issue which is very specific for just the questioner. And we remove the (not problem related) comments later, to keep the page clean and readable. –  Stefan Kottwitz Jun 10 '12 at 13:20

## 1 Answer

This is caused by the line

 frame=b


in lstset. As described in the manual, section 4.11 Frames, listings can draw complete or partial frames around the listings, with single or double lines. b is for bottom, and draws a single line at the bottom of the listings.

-