caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Martin Jambon <martin_jambon@emailuser.net>
To: Pierre-Etienne Meunier <meunier.pe@free.fr>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Syntaxe Caml en LaTeX
Date: Sun, 29 May 2005 16:25:58 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.44.0505291556580.2556-100000@localhost> (raw)
In-Reply-To: <4299ACEA.5050901@free.fr>

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



  reply	other threads:[~2005-05-29 23:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-29 11:52 Pierre-Etienne Meunier
2005-05-29 23:25 ` Martin Jambon [this message]
2005-05-30 10:40   ` [Caml-list] " Jon Harrop
2005-05-31 19:56   ` ocaml + enscript (was Re: [Caml-list] Syntaxe Caml en LaTeX) Janne Hellsten
2005-05-29 23:49 ` [Caml-list] Syntaxe Caml en LaTeX Chris Campbell
2005-05-30  2:01 ` Robert Roessler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0505291556580.2556-100000@localhost \
    --to=martin_jambon@emailuser.net \
    --cc=caml-list@yquem.inria.fr \
    --cc=meunier.pe@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).