typesetting with lhs2tex

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

typesetting with lhs2tex

Permjacov Evgeniy
I write docs for my iteratee-like library and I have problem with
lhs2tex. When I execute lhs2tex and then latex, I get a document with
long typesignatures and expressions expanded beyound page margins. I
attached a sourcefile I have problem with. Can someone give me an advise
how to force long signatures and expressions to be broken into multible
lines ?

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Types.lhs (13K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: typesetting with lhs2tex

Tom Nielsen
I think you have to do it yourself. lhs2TeX isn't that clever - it
doesn't really know haskell syntax, it just applies some very simple
transformation rules.

e.g. change

runE :: Monad m => Enumerator e s m -> m r -> (e -> m r) -> (s ->
Enumerator e s m -> m r) -> m r

to

runE :: Monad m =>  Enumerator e s m
                              -> m r -> (e -> m r)
                              -> (s -> Enumerator e s m -> m r)
                              -> m r

A double space anywhere in indicates that you want vertical alignment.
"Enumerator" above will be aligned with the arrows if they are in the
same column. (it's probably messed up above because I am typing this
in a variable width font.)

On Thu, Dec 16, 2010 at 9:18 AM, Permjacov Evgeniy <[hidden email]> wrote:

> I write docs for my iteratee-like library and I have problem with
> lhs2tex. When I execute lhs2tex and then latex, I get a document with
> long typesignatures and expressions expanded beyound page margins. I
> attached a sourcefile I have problem with. Can someone give me an advise
> how to force long signatures and expressions to be broken into multible
> lines ?
>
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe