From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id CEF59BCAC for ; Mon, 30 May 2005 01:49:35 +0200 (CEST) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.192]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j4TNnYBf022509 for ; Mon, 30 May 2005 01:49:35 +0200 Received: by zproxy.gmail.com with SMTP id 40so2038844nzk for ; Sun, 29 May 2005 16:49:34 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=D3+oNL+pRjRieotHVT/P9GrlzNOfW0shdv3I3xuJCUxW4D30bXcJGcnxrNFTijM19Gt8D+CI9Mzl5zUbR58TYUTyg1vgGdmR3j2ofOr8xKJ2kY7hn9YbUzE1Ol50JfX7t5gmIJ3SHdFFCe5ze2cilCbtrVZTy05rph9iRiA1kY8= Received: by 10.36.97.13 with SMTP id u13mr1401070nzb; Sun, 29 May 2005 16:49:34 -0700 (PDT) Received: by 10.36.41.11 with HTTP; Sun, 29 May 2005 16:49:34 -0700 (PDT) Message-ID: Date: Mon, 30 May 2005 00:49:34 +0100 From: Chris Campbell Reply-To: Chris Campbell To: Pierre-Etienne Meunier Subject: Re: [Caml-list] Syntaxe Caml en LaTeX Cc: caml-list@yquem.inria.fr In-Reply-To: <4299ACEA.5050901@free.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13535_4101422.1117410574139" References: <4299ACEA.5050901@free.fr> X-Miltered: at nez-perce with ID 429A550E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 syntaxe:01 syntax:01 tuareg:01 emacs:01 ocaml:01 snippets:01 snippets:01 colours:01 ocaml:01 syntax:01 tweak:01 tuareg:01 emacs:01 colours:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=HTML_30_40,HTML_MESSAGE, RCVD_BY_IP autolearn=disabled version=3.0.2 X-Spam-Level: ------=_Part_13535_4101422.1117410574139 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 29/05/05, Pierre-Etienne Meunier wrote: >=20 >=20 > 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=3Dproducts/listings I have not used it for OCaml code, but I think you can use \lstset{language=3D[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=3D\color{blue}, stringstyle=3D\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 twea= k=20 it. ------=_Part_13535_4101422.1117410574139 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

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 prettybig, 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 regard= s,
Pierre-Etienne Meunier (meunier.p= e@free.fr)

You might consider using the listings p= ackage for latex.
 
http://www.atscire.de/index.php?nav=3Dproducts/listings

I have n= ot used it for OCaml code, but I think you can use

\lstset{language= =3D[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.<= br>
\lstset{keywordstyle=3D\color{blue}, stringstyle=3D\color{green}}
It's all documented in the pdf inside the zip.

If it doesn't su= pport of the current ocaml syntax, it's fairly easy to tweak it. =20
------=_Part_13535_4101422.1117410574139--