[Haskell-cafe] LaTeX question: interpreter examples

Christopher Witte chris at witte.net.au
Fri Aug 28 08:32:57 UTC 2015


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 at 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 at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150828/1cde02c8/attachment.html>


More information about the Haskell-Cafe mailing list