# Listings without a border?

I'm using listings to format blocks of code in my LaTeX, and I like it. But, except for large blocks of code, the border around the code block is bulky and breaks up the flow of how I read the document. I've tried searching around for a way to disable this code, but thus far I haven't found anything. Is it just impossible? Seems strange if this is the case.

-
Does \begin{lstlisting}[frame=none] work? –  Scott H. Oct 10 '12 at 1:48
–  Peter Grill Oct 10 '12 at 2:00
Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. –  Jubobs Mar 1 '14 at 18:59

Use the available options for the selected lstlisting environments; a litle example in which the style selected uses numbers to the left and a frame on the four sides of the listing; using frame=<valid values> and numbers=<valid values> one can change the behaviour for selected environments (for a list of all the keys and their <valid values> refer to the package documentation):

\documentclass{article}
\usepackage{listings}
\lstset{
basicstyle=\small\ttfamily,
frame=lrtb,
numbers=left
}

\begin{document}

\begin{lstlisting}
test
\end{lstlisting}

\begin{lstlisting}[frame=none]
test
\end{lstlisting}

\begin{lstlisting}[frame=bt,numbers=none]
test
\end{lstlisting}

\end{document}


-
Awesome! Then as a follow-up question, is it possible to selectively enable borders, or otherwise specify options specific to a particular block? For example, if I normally didn't want to display line numbers, but I want to use them on some. –  limp_chimp Oct 10 '12 at 1:53
@limp_chimp of course, see my updated answer. –  Gonzalo Medina Oct 10 '12 at 2:02