# LaTeX source code listing with less Space between characters

I'm trying out LaTex and I want to write shell Code in my document. Therefore I took this code from: http://stackoverflow.com/a/742069

\documentclass{report}

\usepackage{color}
\usepackage{xcolor}
\usepackage{listings}

\usepackage{caption}
\DeclareCaptionFont{white}{\color{white}}
\DeclareCaptionFormat{listing}{\colorbox{gray}{\parbox{\textwidth}{#1#2#3}}}
\captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white}

% This concludes the preamble

\begin{document}

\begin{lstlisting}[label=some-code,caption=Some Code]
NETWORKING=YES

HOSTNAME= f e −19. l o c a l d o m a i n

}
\end{lstlisting}

\end{document}


The problem is that there is a space between every character when I generate a PDF. I would like the code without the space between.You see It at the part HOSTNAME=

Thanks for any help.

-
 – egreg Feb 22 at 13:34

## migrated from stackoverflow.comFeb 22 at 13:29

columns=fullflexible solved the problem.

For example:

\begin{lstlisting}[columns=fullflexible,caption=The Name]