DESCRIPTION. The caml-tex filter extracts Caml Light phrases
embedded in LaTeX files, evaluates them, and insert the outcome of the
evaluation after each phrase. 

INSTALLATION. The filter is written in Perl, so you'll need Perl
version 4 installed on your machine. Copy caml-tex to one of the
directories in the path, and caml.sty and caml-sl.sty to one of the
directories that are searched by TeX for input files (see "man tex"
and use the TEXINPUTS variable if needed).

USAGE.

        caml-tex [-n width] file1.tex file2.tex ...

For each file f.tex, caml-tex produces file f.ml.tex, where the
embedded Caml phrases have been evaluated and formatted. The responses
of the toplevel loop are printed on standard output, for diagnostic
purposes.

The -n option specifies the maximal length of output lines. (Longer
lines are folded.) The default is 72.

Two LaTeX environments are provided to enter Caml phrases:

                \begin{caml_example}
                ...
                \end{caml_example}

The phrases between \begin{caml_example} and \end{caml_example} are
evaluated, copied into the output file, along with the output of the
toplevel loop for each phrase.

                \begin{caml_eval}
                ...
                \end{caml_eval}

The phrases between \begin{caml_eval} and \end{caml_eval} are
silently evaluated. They are not copied into the output file, and the
responses of the toplevel loop are discarded.

The resulting .ml.tex files can be directly processed by LaTeX,
provided the `caml' or `caml-sl' document style option is provided in
the \documentstyle. The `caml' style typesets both the Caml phrases and the
toplevel output in typewriter font. The `caml-sl' style typesets the
inputs in typewriter font, and the output in slanted typewriter font.

EXAMPLE. Assume file foo.tex contains:

----------------------------------------------------------------------
\documentstyle[11pt,caml]{article}

\begin{document}

Bla bla.

\begin{caml_example}
1+2;;
let f x = x + 1;;
\end{caml_example}

More bla bla.

\begin{caml_eval}
print_string "foo\n";;
\end{caml_eval}

That's all, folks.

\end{document}
----------------------------------------------------------------------

Do "caml-tex foo.tex", then "latex foo.ml.tex". The resulting text
looks like:

----------------------------------------------------------------------
    Bla bla.

#1+2;;
- : int = 3
#let f x = x + 1;;
- : int -> int = <fun>

    More bla bla.

    That's all, folks.
----------------------------------------------------------------------


CAVEATS. The \begin... and \end... phrases must sit on a line by themselves,
with no characters before the backslash or after the closing brace.
Each Caml phrase must be terminated by ";;" at the end of a line.
Blank space is accepted between ";;" and the newline, but any other
character will cause caml-tex to ignore the end of the phrase,
resulting in an incorrect shuffling of the responses into the phrases.
(The responses ``lag behind''.)

AUTHOR. Contributed by Xavier Leroy (Xavier.Leroy@inria.fr).
