Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ocamldoc manpage #8470

Closed
vicuna opened this issue Feb 4, 2004 · 2 comments
Closed

Ocamldoc manpage #8470

vicuna opened this issue Feb 4, 2004 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Feb 4, 2004

Original bug ID: 2149
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Hello,

I've made a manpage for ocamldoc which is mainly a cut and paste from
the html documentation (I have attached it to this mail, it may be not
perfect but it looks like a manpage). It was originally for the Debian
package but, since anyway you would have to authorize us because of the
documentation's license, I think the best would be to include it
directly in the OCaml distribution. Would this be possible ?

Thanks,

Samuel.

--
Samuel Mimram

samuel.mimram@ens-lyon.fr


.de Sh " Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\$1\fR
.PP
..

.TH OCAMLDOC 1

.SH NAME
ocamldoc - The Objective Caml documentation generator

.SH SYNOPSIS
.B ocamldoc
[
.B -html
]
[
.B -latex
]
[
.B -texi
]
[
.B -man
]
[
.B -dot
]
[
.BI -g \ file
]
[
.BI -d \ dir
]
[
.BI -dump \ file
]
[
.BI -hide \ module
]
[
.B -inv-merge-ml-mli
]
[
.B -keep-code
]
[
.BI -load \ file
]
[
.BI -m \ flags
]
[
.BI -o \ file
]
[
.BI -I \ directory
]
[
.BI ...
]
.I filename ...

.SH DESCRIPTION

The Objective Caml documentation generator
.BR ocamldoc (1)
generates documentation from special comments embedded in source files. The
comments used by OCamldoc are of the form
.I (**...*)
and follow the format described in the
.IR "The Objective Caml user's manual" .

OCamldoc can produce documentation in various formats: HTML, LaTeX, TeXinfo,
Unix man pages, and dot dependency graphs. Moreover, users can add their own
custom generators.

In this manpage, we use the word
.IR element
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.

.SH OPTIONS

The following command-line options determine the format for the generated
documentation generated by
.BR ocamldoc (1).

.Sh "Options for choosing the output format"

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

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

.TP
.B -texi
Generate documentation in TeXinfo default format. The generated LaTeX document
is saved in file
.IR ocamldoc.out ,
or in the file specified with the
.B -o
option.

.TP
.B -man
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
.B -d
option.

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

.TP
.BI -g \ file
Dynamically load the given file (which extension usually is .cmo or .cma),
which defines a custom documentation generator. This option is supported by the
.BR ocamldoc (1)
command, but not by its native-code version
.BR ocamldoc.opt .

.Sh "General options"

.TP
.BI -d \ dir
Generate files in directory
.IR dir ,
rather than in the current directory.

.TP
.BI -dump \ file
Dump collected information into file. This information can be read with the
.B -load
option in a subsequent invocation of
.BR ocamldoc (1).

.TP
.B -hide modules
Hide the given complete module names in the generated documentation modules is
a list of complete module names are separated by ',', without blanks. For
instance:
.IR Pervasives,M2.M3 .

.TP
.B -inv-merge-ml-mli
Inverse implementations and interfaces when merging. All elements in
implementation files are kept, and the
.B -m
option indicates which parts of the comments in interface files are merged with
the comments in implementation files.

.TP
.B -keep-code
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.

.TP
.BI -load \ file
Load information from
.IR file ,
which has been produced by
.B ocamldoc
.BR -dump .
Several
.B -load
options can be given.

.TP
.BI -m flags
Specify merge options between interfaces and implementations.
.I flags
can be one or several of the following characters:

.B d
merge description

.B a
merge @author

.B v
merge @Version

.B l
merge @see

.B s
merge @SInCE

.B o
merge @deprecated

.B p
merge @param

.B e
merge @raise

.B r
merge @return

.B A
merge everything

.TP
.B -no-custom-tags
Do not allow custom @-tags.

.TP
.B -no-stop
Keep elements placed after the
.I (/)
special comment.

.TP
.BI -o \ file
Output the generated documentation to
.I file
instead of
.IR ocamldoc.out .
This option is meaningful only in conjunction with the
.BR -latex ,
.BR -texi ,
or
.B -dot
options.

.TP
.BI -pp \ command
Pipe sources through preprocessor command.

.TP
.B -sort
Sort the list of top-level modules before generating the documentation.

.TP
.B -stars
Remove blank characters until the first asterisk ('*') in each line of comments.

.TP
.BI -t \ title
Use
.I title
as the title for the generated documentation.

.TP
.B -v
Verbose mode. Display progress information.

.TP
.B -warn-error
Treat warnings as errors.

.Sh "Type-checking options"

.BR ocamldoc (1)
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
.BR ocamlc (1)
and
.BR ocamlopt (1)
commands.

.TP
.BI -I \ directory
Add directory to the list of directories search for compiled interface files
(.cmi files).

.TP
.B -nolabels
Ignore non-optional labels in types.

.TP
.B -rectypes
Allow arbitrary recursive types. (See the
.B -rectypes
option to
.BR ocamlc (1).)

.Sh "Options for generating HTML pages"

The following options apply in conjunction with the
.B -html
option:

.TP
.B -all-params
Display the complete list of parameters for functions and methods.

.TP
.BI -css-style \ filename
Use filename as the Cascading Style Sheet file.

.TP
.B -colorize-code
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.

.TP
.B -index-only
Generate only index files.

.Sh "Options for generating LaTeX files"

The following options apply in conjunction with the
.B -latex
option:

.TP
.B -latex-value-prefix prefix
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
.BR -latex-type-prefix ,
.BR -latex-exception-prefix ,
.BR -latex-module-prefix ,
.BR -latex-module-type-prefix ,
.BR -latex-class-prefix ,
.BR -latex-class-type-prefix ,
.B -latex-attribute-prefix
and
.BR -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.

.TP
.BI -latextitle \ n,style
Associate style number
.I 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.

.TP
.B -noheader
Suppress header in generated documentation.

.TP
.B -notoc
Do not generate a table of contents.

.TP
.B -notrailer
Suppress trailer in generated documentation.

.TP
.B -sepfiles
Generate one .tex file per toplevel module, instead of the global
.I ocamldoc.out
file.

.Sh "Options for generating TeXinfo files"

The following options apply in conjunction with the
.B -texi
option:

.TP
.B -esc8
Escape accented characters in Info files.

.TP
.B
-info-entry
Specify Info directory entry.

.TP
.B -info-section
Specify section of Info directory.

.TP
.B -noheader
Suppress header in generated documentation.

.TP
.B -noindex
Do not build index for Info files.

.TP
.B -notrailer
Suppress trailer in generated documentation.

.Sh "Options for generating dot graphs"

The following options apply in conjunction with the
.B -dot
option:

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

.TP
.B -dot-include-all
Include all modules in the
.BR dot (1)
output, not only modules given on the command line or loaded with the
.B -load
option.

.TP
.B -dot-reduce
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.

.TP
.B -dot-types
Output dot code describing the type dependency graph instead of the module
dependency graph.

.Sh "Options for generating man files"

The following options apply in conjunction with the
.B -man
option:

.TP
.B -man-mini
Generate man pages only for modules, module types, clases and class types,
instead of pages for all elements.

.TP
.B -man-suffix
Set the suffix used for generated man filenames. Default is 'o', like in
.IR List.o .

.SH SEE ALSO
.BR ocaml (1),
.BR ocamlc (1),
.BR ocamlopt (1).
.br
.IR "The Objective Caml user's manual",
chapter "The documentation generator".



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAIMbOIae1O4AJae8RAkSoAJ0ZZ1JkHqW6c2OqMiZTJpUN1SmNpwCfdm7x
cnUehYQ7EHXT8JQf2kPx5WQ=
=nV7v
-----END PGP SIGNATURE-----



@vicuna
Copy link
Author

vicuna commented Feb 6, 2004

Comment author: administrator

Hello,

I've made a manpage for ocamldoc which is mainly a cut and paste from
the html documentation (I have attached it to this mail, it may be not
perfect but it looks like a manpage). It was originally for the Debian
package but, since anyway you would have to authorize us because of the
documentation's license, I think the best would be to include it
directly in the OCaml distribution. Would this be possible ?

Thanks a lot ! Yes I think the best is to include it in the distribution.
Maybe be it is only me but the file was not encoded correctly in the mail.
could you resend it me directly ?
Thanks again,

Regards,

Maxence Guesdon

@vicuna
Copy link
Author

vicuna commented Mar 22, 2004

Comment author: administrator

Man page added. -MG

@vicuna vicuna closed this as completed Mar 22, 2004
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant