From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA10045 for caml-redistribution; Mon, 9 Mar 1998 17:30:08 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA04790 for ; Mon, 9 Mar 1998 14:06:33 +0100 (MET) Received: from tcs.inf.tu-dresden.de (tcs.inf.tu-dresden.de [141.76.75.119]) by nez-perce.inria.fr (8.8.7/8.8.5) with ESMTP id OAA10601 for ; Mon, 9 Mar 1998 14:06:31 +0100 (MET) Received: from ithif18.inf.tu-dresden.de (ithif18 [141.76.75.118]) by tcs.inf.tu-dresden.de (8.8.3/8.8.3) with SMTP id OAA20024 for ; Mon, 9 Mar 1998 14:05:29 +0100 (MET) Received: by ithif18.inf.tu-dresden.de (SMI-8.6/SMI-SVR4) id OAA01172; Mon, 9 Mar 1998 14:06:53 +0100 Date: Mon, 9 Mar 1998 14:06:53 +0100 Message-Id: <199803091306.OAA01172@ithif18.inf.tu-dresden.de> From: Hendrik Tews MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: caml-list@inria.fr Subject: Re: O'Caml prettyprinting to TeX/LaTeX anyone? In-Reply-To: <199803041607.RAA31788@heplix.ikp.physik.tu-darmstadt.de> References: <199803041607.RAA31788@heplix.ikp.physik.tu-darmstadt.de> X-Mailer: VM 6.34 under Emacs 19.34.1 Sender: weis Hi, 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:\ :cb=\(*:ce=*\):\ #lb=':le=\e':\ sb=":se=\e":bb=begin:be=end:\ :tb=%%:te=%%:mb=%\$:me=\$%:vb=%\|:ve=\|%:\ :id=_':\ :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:\ :pl:px=\dlet:pb=let: 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 ... Bye, Hendrik ----------------------------------------------------------------- Hendrik Tews PhD student in theoretical computer science at Dresden University of Technology, Germany e-mail: tews@tcs.inf.tu-dresden.de www: http://wwwtcs.inf.tu-dresden.de/~tews pgp key: http://wwwtcs.inf.tu-dresden.de/~tews/pgpkey.asc -----------------------------------------------------------------