Maybe try the listings package

https://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings

Chris.

On 28 August 2015 at 10:19, Christopher Howard <ch.howard@zoho.com> wrote:
Hi. I'm doing a lot of Literate Haskell lately, with proofs and
commentary in each module. I'm not very familiar with LaTeX, but I'm
learning. (I'm using lhs2tex and texi2pdf.) However, in my commentary,
I occasionally have blocks of example interpreter interaction, and I'm
not sure what to do with it. Is there a certain command enclosure that
would be appropriate? Ideally, it would treat the text like monospace,
and also preserve line breaks. Example text would be:

*GCD> extEuclidean 546 2022
(6,100,-27)
*GCD> 546 * 100 + 2022 * (-27) == 6
True

But this does not come out looking similar in the final output.

--
http://justonemoremathproblem.wordpress.com/

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe