[Haskell-cafe] LaTeX question: interpreter examples

Christopher Howard ch.howard at zoho.com
Fri Aug 28 08:19:14 UTC 2015


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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150828/7fd8496e/attachment.sig>


More information about the Haskell-Cafe mailing list