ocamldoc - The Objective Caml documentation generator [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] The Objective Caml documentation generator generates documentation from special comments embedded in source files. The comments used by OCamldoc are of the form and follow the format described in the OCamldoc can produce documentation in various formats: HTML, LaTeX, TeXinfo, Unix man pages, and dependency graphs. Moreover, users can add their own custom generators. In this manpage, we use the word to refer to any of the following parts of an OCaml source file: a type declaration, a value, a module, an exception, a module type, a type constructor, a record field, a class, a class type, a class method, a class value or a class inheritance clause. The following command-line options determine the format for the generated documentation generated by

Options for choosing the output format
Generate documentation in HTML default format. The generated HTML pages are stored in the current directory, or in the directory specified with the option. You can customize the style of the generated pages by editing the generated file, or by providing your own style sheet using option is not generated if it already exists. Generate documentation in LaTeX default format. The generated LaTeX document is saved in file or in the file specified with the option. The document uses the style file This file is generated when using the option, if it does not already exist. You can change this file to customize the style of your LaTeX documentation. Generate documentation in TeXinfo default format. The generated LaTeX document is saved in file or in the file specified with the option. Generate documentation as a set of Unix man pages. The generated pages are stored in the current directory, or in the directory specified with the option. Generate a dependency graph for the toplevel modules, in a format suitable for displaying and processing by dot. The tool is available from The textual representation of the graph is written to the file or to the file specified with the option. Use to display it. Dynamically load the given file (which extension usually is .cmo or .cma), which defines a custom documentation generator. This option is supported by the command, but not by its native-code version If the given file is a simple one and does not exist in the current directory, then ocamldoc looks for it in the custom generators default directory. Display the custom generators default directory. Add the given directory to the path where to look for custom generators.

General options
Generate files in directory rather than in the current directory. Dump collected information into file. This information can be read with the option in a subsequent invocation of Hide the given complete module names in the generated documentation. is a list of complete module names are separated by ',', without blanks. For instance: Inverse implementations and interfaces when merging. All elements in implementation files are kept, and the option indicates which parts of the comments in interface files are merged with the comments in implementation files. Always keep the source code for values, methods and instance variables, when available. The source code is always kept when a .ml file is given, but is by default discarded when a .mli is given. This option allows to always keep the source code. Load information from which has been produced by Several options can be given. Specify merge options between interfaces and implementations. can be one or several of the following characters: merge description merge @author merge @version merge @see merge @since merge @deprecated merge @param merge @raise merge @return merge everything Do not allow custom @-tags. Keep elements placed after the special comment. Output the generated documentation to instead of This option is meaningful only in conjunction with the or options. Pipe sources through preprocessor command. Sort the list of top-level modules before generating the documentation. Remove blank characters until the first asterisk ('*') in each line of comments. Use as the title for the generated documentation. Use content of as ocamldoc text to use as introduction (HTML, LaTeX and TeXinfo only). For HTML, the file is used to create the whole "index.html" file. Verbose mode. Display progress information. Treat warnings as errors.

Type-checking options
calls the Objective Caml type-checker to obtain type informations. The following options impact the type-checking phase. They have the same meaning as for the and commands. Add directory to the list of directories search for compiled interface files (.cmi files). Ignore non-optional labels in types. Allow arbitrary recursive types. (See the option to

Options for generating HTML pages
The following options apply in conjunction with the option: Display the complete list of parameters for functions and methods. Use filename as the Cascading Style Sheet file. Colorize the OCaml code enclosed in [ ] and \{[ ] using colors to emphasize keywords, etc. If the code fragments are not syntactically correct, no color is added. Generate only index files.

Options for generating LaTeX files
The following options apply in conjunction with the option: Give a prefix to use for the labels of the values in the generated LaTeX document. The default prefix is the empty string. You can also use the options and These options are useful when you have, for example, a type and a value with the same name. If you do not specify prefixes, LaTeX will complain about multiply defined labels. Associate style number to the given LaTeX sectioning command style, e.g. section or subsection. (LaTeX only.) This is useful when including the generated document in another LaTeX document, at a given sectioning level. The default association is 1 for section, 2 for subsection, 3 for subsubsection, 4 for paragraph and 5 for subparagraph. Suppress header in generated documentation. Do not generate a table of contents. Suppress trailer in generated documentation. Generate one .tex file per toplevel module, instead of the global file.

Options for generating TeXinfo files
The following options apply in conjunction with the option: Escape accented characters in Info files. -info-entry Specify Info directory entry. Specify section of Info directory. Suppress header in generated documentation. Do not build index for Info files. Suppress trailer in generated documentation.

Options for generating dot graphs
The following options apply in conjunction with the option: Specify the colors to use in the generated dot code. When generating module dependencies, uses different colors for modules, depending on the directories in which they reside. When generating types dependencies, uses different colors for types, depending on the modules in which they are defined. colors is a list of color names separated by ',', as in The available colors are the ones supported by the tool. Include all modules in the output, not only modules given on the command line or loaded with the option. Perform a transitive reduction of the dependency graph before outputting the dot code. This can be useful if there are a lot of transitive dependencies that clutter the graph. Output dot code describing the type dependency graph instead of the module dependency graph.

Options for generating man files
The following options apply in conjunction with the option: Generate man pages only for modules, module types, classes and class types, instead of pages for all elements. Set the suffix used for generated man filenames. Default is 'o', like in
chapter "The documentation generator".