Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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
EXTEND
        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...

:-)
tnx,
p

-- 
++ 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.
   See http://www.fsf.org/philosophy/no-word-attachments.html

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners