<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2005/05/7eefb30de1ae624335d93464b385be7c"
  from="Jon Harrop &lt;jon@f...&gt;"
  author="Jon Harrop"
  date="2005-05-30T10:41:04"
  subject="Re: [Caml-list] Syntaxe Caml en LaTeX"
  prev="2005/05/4829bcb645589c3e49b7525fdbcfb549"
  next="2005/05/d298027f22c532037195c387de551c13"
  prev-in-thread="2005/05/928667cae629843ec349774c5971067d"
  next-in-thread="2005/05/f7d03a54af7b3da73362c55370fff386"
  prev-thread="2005/05/034a45e75fe608992a6dfbf1786f1d2d"
  next-thread="2005/05/d298027f22c532037195c387de551c13"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Syntaxe Caml en LaTeX">
<msg 
  url="2005/05/56f407dc3d21dc1297cdb13574bdcfa5"
  from="Pierre-Etienne Meunier &lt;meunier.pe@f...&gt;"
  author="Pierre-Etienne Meunier"
  date="2005-05-29T11:53:26"
  subject="Syntaxe Caml en LaTeX">
<msg 
  url="2005/05/928667cae629843ec349774c5971067d"
  from="Martin Jambon &lt;martin_jambon@e...&gt;"
  author="Martin Jambon"
  date="2005-05-29T23:26:16"
  subject="Re: [Caml-list] Syntaxe Caml en LaTeX">
<msg 
  url="2005/05/7eefb30de1ae624335d93464b385be7c"
  from="Jon Harrop &lt;jon@f...&gt;"
  author="Jon Harrop"
  date="2005-05-30T10:41:04"
  subject="Re: [Caml-list] Syntaxe Caml en LaTeX">
</msg>
<msg 
  url="2005/05/f7d03a54af7b3da73362c55370fff386"
  from="Janne Hellsten &lt;jjhellst@g...&gt;"
  author="Janne Hellsten"
  date="2005-05-31T19:56:59"
  subject="ocaml + enscript (was Re: [Caml-list] Syntaxe Caml en LaTeX)">
</msg>
</msg>
<msg 
  url="2005/05/12eb8e9c4d0a3b61eaf2b18ee41fdde4"
  from="Chris Campbell &lt;cyberdanx@g...&gt;"
  author="Chris Campbell"
  date="2005-05-29T23:49:35"
  subject="Re: [Caml-list] Syntaxe Caml en LaTeX">
</msg>
<msg 
  url="2005/05/4829bcb645589c3e49b7525fdbcfb549"
  from="Robert Roessler &lt;roessler@r...&gt;"
  author="Robert Roessler"
  date="2005-05-30T01:59:57"
  subject="Re: [Caml-list] Syntaxe Caml en LaTeX">
</msg>
</msg>
</thread>

<contents>
On Monday 30 May 2005 00:25, Martin Jambon wrote:
&gt; On Sun, 29 May 2005, Pierre-Etienne Meunier wrote:
&gt; &gt; I'd like to include Caml code in a LaTeX file, but since it is pretty
&gt; &gt; big, I want it to be easily readable. Then I want to keep the colored
&gt; &gt; syntax, like in tuareg for emacs. Do you know how to do it ?
&gt;
&gt; I don't know what people have used so far (you can ask Jon Harrop what he
&gt; used for his book
&gt; http://www.ffconsultancy.com/products/ocaml_for_scientists/).

I wrote a little program to color syntax-highlight LyX files by treating 
anything in typewriter font as code. This has several advantages - no need to 
annotate by hand, code can be extracted and even tested, easy to alter the 
document self-consistently and so on.

I chose to put all code snippets on their own minipage, to help lay them out 
aesthetically. However, LaTeX does a poor job of distributing them on the 
page, so any alterations to the document need to be carefully checked to make 
sure the LaTeX output hasn't become very ugly (e.g. huge gaps).

I think the solution I used works reasonably well but there is plenty of room 
for improvement. Ideally, I'd like to get rid of LaTeX...

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists

</contents>

</message>

