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
O'Caml prettyprinting to TeX/LaTeX anyone?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1998-03-09 (16:30)
From: Hendrik Tews <tews@t...>
Subject: Re: O'Caml prettyprinting to TeX/LaTeX anyone?
   Has anybody looked into pretty printing O'Caml to TeX and/or LaTeX?
   It should be possible with camlp4, but it doesn't appear to be a
   simple rainy afternoon's hack.  Or is simple textual substitution
   my best bet?  Is it worth the effort or is legibility not improved?
I use a rather old version of lgrind. I think we installed it
about 5 years ago. It does a very good job, I use it for all
source code printing. lgrind is said to be similar to vgrind
except that it produces latex. I use it with the following
.lgindefs entry:

caml|Caml light:\
	:kw=and as asr begin class closed\
	constraint do done downto else end exception external\
	false for fun function functor if in include inherit\
	land let lor lsl lsr lxor match method mod module mutable\
	new of open or parser private rec sig struct then to true\
	try type val virtual when while with:\

There is also a tgrind, which produces tex. Let me know if you
can not find it on the net, I might find it on my disc. If you
are going to give it a try I am happy to share my experience in
changing fonts, supressing line numbers etc ...



Hendrik Tews     PhD student  in theoretical computer science
                 at Dresden University of Technology, Germany

pgp key: