Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] can I use camlp4 to output latex ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-04-02 (00:45)
From: Pietro Abate <Pietro.Abate@a...>
Subject: [Caml-list] can I use camlp4 to output latex ?
Hi all,
I'd like to use camlp4 to pretty print my files (pseudo-ocaml) in latex.
At the same times I'd like to recycle the same syntax that I use to
produce valid ocaml. The problem is that when I use something like
        str_item: [

the type of this expansion should be str_item, but I actually want to
output a string (containing the latex source). This way I can replace
all <<str_item< ... expansion with sprintf "something" and spit latex
instead of ocaml... a solution would be to add printf before the
str_item expansion and output both ocaml (first) and latex, but this
looks like to me a bad hack... how can I do it ? I basically don't want
to parse my files but use the calmp4 parser to do the job and only add
few hooks for the pretty printing...


++ If you have an apple and I have an apple and we  exchange apples 
   then you and I will still each have one apple. But if you have 
   an idea and I have an idea and we exchange these ideas, then each 
   of us will have two ideas. -- George Bernard Shaw
++ Please avoid sending me Word or PowerPoint attachments.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: