1

I've been trying to do someting with LaTeX. I have some emails that I want to insert in a document. I've searched all over the web but can't find a valid solution. What I want to do is to have those emails looking like typewriter emails, with line breaking. Right now I'm using lstlistings with the following options :

\lstset{
    language=,
    basicstyle=\ttfamily,
    breaklines=true,
    frame=single,
    breakindent=0pt,
}

I get a fairly god result, but the problem is that the line breaks don't break words, they check for overflowing words and return them to the line. It works, but there are trailing spaces (at the end, and sometimes at the beginning of lines).

I just want every line to start on the left (i.e. to be aligned and touching the left). I want spaces at the beginning of lines to be removed if there are any.

I tried adding these options :

\lstset{
    %...
    columns={l}, % this doesn't change anything
    keepspaces=false, % I tried this too, but it doesn't change anything either
    showstringspaces=false % tried this too
}
Werner
  • 603,163

0 Answers0