Browse thread
Syntaxe Caml en LaTeX
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2005-05-29 (23:26) |
From: | Martin Jambon <martin_jambon@e...> |
Subject: | Re: [Caml-list] Syntaxe Caml en LaTeX |
On Sun, 29 May 2005, Pierre-Etienne Meunier wrote: > Bonjour, > > Je voudrais savoir s'il y a un moyen d'intégrer les couleurs de syntaxe > Caml (comme avec tuareg dans emacs) dans une page LaTeX, pour rendre le > code présentable. > Amicalement, > Pierre-Etienne Meunier (meunier.pe@free.fr) > > Here comes the english version : > > I'd like to include Caml code in a LaTeX file, but since it is pretty > big, I want it to be easily readable. Then I want to keep the colored > syntax, like in tuareg for emacs. Do you know how to do it ? > Best regards, > Pierre-Etienne Meunier (meunier.pe@free.fr) I don't know what people have used so far (you can ask Jon Harrop what he used for his book http://www.ffconsultancy.com/products/ocaml_for_scientists/). One solution would be to adapt Caml2html (http://martin.jambon.free.fr/caml2html.html). You can either (1) start an independent Caml2latex library/executable and reuse some code from Caml2html, or (2) make Caml2html polyglot. IMO solution (1) is better than (2) since the OCaml parser does not require a lot of maintenance as opposed to the formatting options which are not really reusable anyway. Otherwise, you can convert your program to colorized PostScript with enscript (ask Janne Hellsten, google for "ocaml and enscript") or directly from emacs. Martin -- Martin Jambon, PhD http://martin.jambon.free.fr