mdoc is an assembly-based documentation management system.
mdoc permits creating and updating documentation stubs based on
the contents of an assembly. It does not rely on documentation found within
the source code.
The advantages are:
Good documentation is frequently (a) verbose, and (b)
filled with examples. (For comparison, compare Microsoft .NET Framework
documentation, which is often a page or more of docs for each member, to
JavaDoc documentation, which can often be a sentence for each member.)
Inserting good documentation into the source code can frequently bloat the
source file, as the documentation can be longer than the actual method that is
In-source documentation formats (such as csc /doc)
have no support for multiple human languages. If you need to support more
than one human language for documentation purposes, mdoc
is useful as it permits each language's output to reside in its own directory,
and mdoc can add types/members for each separate documentation directory.
It's not unusual to have separate documentation and development teams. It's
also possible that the documentation team will have minimal experience with
the programming language being used. In such circumstances, inline
documentation is not desirable as the documentation team could inadvertantly
insert an error into the source code while updating the documentation.
Alternatively, you may not want the documentation team to have access to the
source code for security reasons. mdoc allows the documentation to be
kept completely separate and distinct from the source code used to
create the assembly.
Documentation can be generated using the mdoc update command:
mdoc update -o docs/en ProjectName.dll
Once the documentation stubs have been generated (and hopefully later filled
in with actual documentation), there are three ways to view the documentation:
To generate a simple directory of HTML pages (one HTML file per type), use
To use the monodoc(1) documentation browser, you must first
assemble the documentation:
mdoc assemble -o ProjectName docs/en
The above command creates the files ProjectName.tree and
ProjectName.zip. An additional ProjectName.sources file
must be provided which describes where in the help system the documentation
should be hooked up; it is a very simple XML file, like this:
The above configuration file describes that the documentation is in
ECMA format, that the base file name is ProjectName and that it
should be hooked up in the "various" part of the documentation tree.
If you want to look at the various nodes defined in the
documentation, you can look at the monodoc.xml file which is typically
installed in /usr/lib/monodoc/monodoc.xml.
Once you have all of the required files (.zip, .tree and .sources) you can
install them into the system with the following command: