title: How to force line wrapping in listings package?
body: <p>I have a problem concerning the listings package in latex. I need to embed a source code of the following XML document <a href="http://www.sparxsystems.com.au/downloads/profiles/EP_Extensions.xml" rel="noreferrer">http://www.sparxsystems.com.au/downloads/profiles/EP_Extensions.xml</a> in my master thesis' appendix. The problem is, no matter what options I pass to the package, I don't seem to be able to fit it on the page. The lines in the listing are too long, and the listings package doesn't wrap them, which seems odd... What combination of options will do the trick?</p>
  
  <p>At the moment I use the following lstset instruction:</p>
  
  <pre><code>\lstset{
  breakindent=0em,
  language=XML,
  basicstyle=\footnotesize,
  numbers=left,
  numberstyle=\footnotesize,
  stepnumber=2,
  numbersep=5pt,
  backgroundcolor=\color{white},
  showspaces=false,
  showstringspaces=false,
  showtabs=false,
  frame=single,
  tabsize=2,
  captionpos=b,
  breaklines=true,
  breakatwhitespace=true,
  breakautoindent=true,
  escapeinside={\%*}{*)},
  linewidth=\textwidth
  }
  </code></pre>
  
  <p>Which, with no other options set, and combined with the following command:</p>
  
  <pre><code>\lstinputlisting{EP_Extensions.xml}
  </code></pre>
  
  <p>Lists the given file's source to the following output:
  <img src="https://files.getdropbox.com/u/214703/2009-06-12-164517.png" alt="alt text"></p>