##
#use "topfind";;
#camlp4o;;
#require "netstring";;
#require "mikmatch_pcre";;
open Mikmatch;;
.##
<html>
<head>
  <title>How to use Caml2html</title>
</head>

<body style="font-family:sans-serif; background-color:white; color:black">
<center><h1>How to use Caml2html</h1></center>

<p>
More information about Caml2html
<a href="http://martin.jambon.free.fr/caml2html.html">here</a>.

<h2>Usage</h2>

<pre>
##= Netencoding.Html.encode
      ~in_enc:`Enc_iso88591
      ~out_enc:`Enc_iso88591 ()
      (Text.file_contents "caml2html-help") .##
</pre>


<h2>Examples</h2>

<p>Process a single file <code>code.ml</code>:
<pre>caml2html code.ml</pre>

<p>Same thing with a title for the page:
<pre>caml2html -t code.ml</pre>

<p>Process a file with a title and line numbers:
<pre>caml2html -t -ln code.ml</pre>

<p>Process a file with a title, line numbers and replace tabs by 4 spaces:
<pre>caml2html -t -ln -tab 4 code.ml</pre>

<p>Process a file without footnotes (the most simple output):
<pre>caml2html -nf code.ml</pre>

<p>Process a file and use a css (style.css):
<pre>caml2html -css code.ml</pre>

<p>Process a file and use a specific css (http://blabla.com/style2.css):
<pre>caml2html -css -cssurl http://blabla.com/style2.css code.ml</pre>

<p>Read from stdin and output to stdout:
<pre>caml2html</pre>

<p>Process many files into a single file:
<pre>caml2html -o result.html *.mli *.ml</pre>

<p>Process many files, and create one HTML page for each file:
<pre>caml2html *.ml</pre>

<p>Same thing, but write result in the <code>html</code> directory:
<pre>caml2html -d html *.ml</pre>

<p>Same thing, but write result in the <code>html</code> directory:
<pre>caml2html -d html *.ml</pre>

<p>You can specify the character encoding with the -charset option:
<pre>
caml2html -charset euc-jp input.ml -o output.html
</pre>

<p>You can write the comments in HTML. This lets you add simple
formatting such as hyperlinks. Beware that one HTML tag cannot
span over several lines, and that the characters
<code>&lt;</code>, <code>&gt;</code> and <code>&amp;</code>
must be written as <code>&amp;lt;</code>, <code>&amp;gt;</code>
and <code>&amp;amp;</code>.
<pre>
(* This is file1.ml.
   &lt;a href="#file2.ml"&gt;This is a link to file2.ml&lt;/a&gt;. *)
...
</pre>
<p>
In this case, use the <code>-hc</code> option:
<pre>
caml2html -hc file1.ml file2.ml -o result.html
</pre>



<hr>
<p>
<em>This document was not generated by caml2html!</em>
</body>
</html>
