Browse thread
Syntaxe Caml en LaTeX
-
Pierre-Etienne Meunier
- Martin Jambon
- Chris Campbell
- Robert Roessler
[
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: | -- (:) |
| From: | Chris Campbell <cyberdanx@g...> |
| Subject: | Re: [Caml-list] Syntaxe Caml en LaTeX |
On 29/05/05, Pierre-Etienne Meunier <meunier.pe@free.fr> wrote:
>
>
> 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)
You might consider using the listings package for latex.
http://www.atscire.de/index.php?nav=products/listings
I have not used it for OCaml code, but I think you can use
\lstset{language=[objective]Caml}
or something like that.
It supports small code snippets, larger snippets and separate files.
You can customise it to set the colours of keywords, symbols, etc.
\lstset{keywordstyle=\color{blue}, stringstyle=\color{green}}
It's all documented in the pdf inside the zip.
If it doesn't support of the current ocaml syntax, it's fairly easy to tweak
it.