Title: Theory / Unimportant / CS / Programming / oCaml / Manual{ / 16 documentation / options
Tags: computer_to_instruction fromCommandLine
On every note of this deck, unless a note says otherwise:
Prefix: ocaml

Fla: -html
Effect: Generate documentation in HTML default format. The generated HTML pages are stored in the current directory, or in the directory specified with the -d option. You can customize the style of the generated pages by editing the generated style.css file, or by providing your own style sheet using option -css-style. The file style.css is not generated if it already exists or if -css-style is used.

Fla: -latex
Effect: Generate documentation in LATEX default format. The generated LATEX document is saved in file ocamldoc.out, or in the file specified with the -o option. The document uses the style file ocamldoc.sty. This file is generated when using the -latex option, if it does not already exist. You can change this file to customize the style of your LATEX documentation.

Fla: -texi
Effect: Generate documentation in TeXinfo default format. The generated LATEX document is saved in file ocamldoc.out, or in the file specified with the -o option.

Fla: -man
Effect: 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 -d option.

Fla: -dot
Effect: Generate a dependency graph for the toplevel modules, in a format suitable for displaying and processing by dot. The dot tool is available from http://www.research.att.com/sw/tools/graphviz/. The textual representation of the graph is written to the file ocamldoc.out, or to the file specified with the -o option. Use dot ocamldoc.out to display it.

Effect: Dynamically load the given file, which defines a custom documentation generator. See section 16.4.1. This option is supported by the ocamldoc command (to load .cmo and .cma files) and by its native-code version ocamldoc.opt (to load .cmxs files). 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, and in the directories specified with optional -i options.
Language: ocaml
Abbreviation: -g file.cm[o,a,xs]

Fla: -customdir
Effect: Display the custom generators default directory.

Effect: Add the given directory to the path where to look for custom generators.
Language: ocaml
Abbreviation: -i directory

Effect: Generate files in directory dir, rather than the current directory.
Language: ocaml
Abbreviation: -d dir

Fla: -dump file
Effect: Dump collected information into file. This information can be read with the -load option in a subsequent invocation of ocamldoc.

Fla: -hide modules
Effect: Hide the given complete module names in the generated documentation. modules is a list of complete module names separated by ’,’, without blanks. For instance: Pervasives,M2.M3.

Fla: -inv-merge-ml-mli
Effect: Reverse the precedence of implementations and interfaces when merging. All elements in implementation files are kept, and the -m option indicates which parts of the comments in interface files are merged with the comments in implementation files.

Fla: -keep-code
Effect: Always keep the source code for values, methods and instance variables, when available.

Fla: -load file
Effect: Load information from file, which has been produced by ocamldoc -dump. Several -load options can be given.

Effect: Specify merge options between interfaces and implementations. (see section 16.1.2 for details).
Language: ocaml
Abbreviation: -m flags

Fla: -no-custom-tags
Effect: Do not allow custom @-tags (see section 16.2.5).

Fla: -no-stop
Effect: Keep elements placed after/between the (**/**) special comment(s) (see section 16.2).

Effect: Output the generated documentation to file instead of ocamldoc.out. This option is meaningful only in conjunction with the -latex, -texi, or -dot options.
Language: ocaml
Abbreviation: -o file

Fla: -pp command
Effect: Pipe sources through preprocessor command.

Fla: -impl filename
Effect: Process the file filename as an implementation file, even if its extension is not .ml.

Fla: -intf filename
Effect: Process the file filename as an interface file, even if its extension is not .mli.

Fla: -text filename
Effect: Process the file filename as a text file, even if its extension is not .txt.

Fla: -sort
Effect: Sort the list of top-level modules before generating the documentation.

Fla: -stars
Effect: Remove blank characters until the first asterisk (’*’) in each line of comments.

Effect: Use title as the title for the generated documentation.
Language: ocaml
Abbreviation: -t title

Fla: -intro file
Effect: Use content of file 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.

Fla: -v
Effect: Verbose mode. Display progress information.

Fla: -version
Effect: Print version string and exit.

Fla: -vnum
Effect: Print short version number and exit.

Fla: -warn-error
Effect: Treat Ocamldoc warnings as errors.

Fla: -hide-warnings
Effect: Do not print OCamldoc warnings.

Fla: -help or --help
Effect: Display a short usage summary and exit.

Effect: Add directory to the list of directories search for compiled interface files (.cmi files).
Language: ocaml
Abbreviation: -I directory

Fla: -nolabels
Effect: Ignore non-optional labels in types.

Fla: -rectypes
Effect: Allow arbitrary recursive types. (See the -rectypes option to ocamlc.)

Fla: -all-params
Effect: Display the complete list of parameters for functions and methods.

Fla: -charset charset
Effect: Add information about character encoding being charset (default is iso-8859-1).

Fla: -colorize-code
Effect: 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.

Fla: -css-style filename
Effect: Use filename as the Cascading Style Sheet file.

Fla: -index-only
Effect: Generate only index files.

Fla: -short-functors
Effect: Use a short form to display functors: module M : functor (A:Module) -> functor (B:Module2) -> sig .. end is displayed as: module M (A:Module) (B:Module2) : sig .. end

Fla: -latex-value-prefix prefix
Effect: 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 -latex-type-prefix, -latex-exception-prefix, -latex-module-prefix, -latex-module-type-prefix, -latex-class-prefix, -latex-class-type-prefix, -latex-attribute-prefix and -latex-method-prefix. 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.

Fla: -latextitle n,style
Effect: Associate style number n 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.

Fla: -noheader
Effect: Suppress header in generated documentation.

Fla: -notoc
Effect: Do not generate a table of contents.

Fla: -notrailer
Effect: Suppress trailer in generated documentation.

Fla: -sepfiles
Effect: Generate one .tex file per toplevel module, instead of the global ocamldoc.out file.

Fla: -esc8
Effect: Escape accented characters in Info files.

Fla: -info-entry
Effect: Specify Info directory entry.

Fla: -info-section
Effect: Specify section of Info directory.

Fla: -noindex
Effect: Do not build index for Info files.

Fla: -dot-colors colors
Effect: Specify the colors to use in the generated dot code. When generating module dependencies, ocamldoc uses different colors for modules, depending on the directories in which they reside. When generating types dependencies, ocamldoc 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 Red,Blue,Green. The available colors are the ones supported by the dot tool.

Fla: -dot-include-all
Effect: Include all modules in the dot output, not only modules given on the command line or loaded with the -load option.

Fla: -dot-reduce
Effect: 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.

Fla: -dot-types
Effect: Output dot code describing the type dependency graph instead of the module dependency graph.

Fla: -man-mini
Effect: Generate man pages only for modules, module types, classes and class types, instead of pages for all elements.

Fla: -man-suffix suffix
Effect: Set the suffix used for generated man filenames. Default is ’3o’, as in List.3o.

Fla: -man-section section
Effect: Set the section number used for generated man filenames. Default is ’3’.