Previous Up Next

3  Features

3.1  Code highlighting

Some other LATEX macros are provided by option -main to be used in comments:
to typeset code,
for the function names, and
for the module names.

3.2  Helping the programmer

A common error when writing documentation comments is forgetting to escape the ``_'' character. Thus MlDoc detects the incorrect uses of this character in the arguments of the following macros: \fun, \code, \module and \texttt. The following other characters are also automatically escaped (only if the \ has been forgotten): ``^'' and ``#''.

3.3  Automatic title generation

Several options modify MlDoc's behavior with respect to title generation. The default option is -auto.
takes a string in argument to be used to format the title. Any #l character sequence will be replaced by the basename of the file in lower case, #c by the basename capitalized and #u by the basename in upper case, #e by the file extension and ## by a single # character.
produce the same title as
-title '\label{#l#e}'
produce the same title as
-title '\section{Module \module{#c} signature}
produce the same title as
-title '\section{Module \module{#c} implementation}
produce the same title as
-title '\section{Standalone program \module{#c}}
if the file extension is .ml, equivalent to -impl, if it is .mli, equivalent to -intf, else produce the same title as
-title '\section{#l#e}
as with option -ext but if both a signature file and an implementation file exist, process the two files (signature first).

3.4  Miscellaneous

Previous Up Next