Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
211 lines (200 sloc) 7.37 KB
.\" mdoc assemble manual page.
.\" (C) 2008 Novell, Inc.
.\" Author:
.\" Jonathan Pryor (
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
.TH "mdoc-assemble" 1
mdoc assemble \- Compile documentation for use in \fBmonodoc\fR(1)
.B mdoc assemble
\fBmdoc assemble\fR creates \fI.tree\fR and \\fR files from \fIPATHS\fR
for use in the \fBmonodoc\fR(1) documentation browser.
The input files must have a supported \fIformat\fR, specified with the
\fI--format\fR option.
The \fI.tree\fR and \\fR files are copied into \fBmonodoc\fR's
\fIsources\fR directory, alongside a \fI.source\fR file which is used by
\fBmonodoc\fR(1) to specify where the documentation should be displayed.
The \fI.source\fR file has the following format:
<?xml version="1.0"?>
<node label="LABEL" name="PATH" parent="PARENT">
<node label="LABEL2" name="PATH2" />
<!-- ... -->
<source provider="PROVIDER" basefile="BASEFILE" path="PATH" />
<!-- other <source/> elements -->
The \fI/monodoc/node\fR node is an optional node that specifies where in the
monodoc tree the documentation should be displayed, and \fI//node\fR elements
may be nested to any depth to create trees. \fI//node/@label\fR is the label
that will be displayed within the monodoc tree.
\fI//node/@name\fR is the name of the monodoc tree node, and may be used as
the value of the \fI/monodoc/source/@path\fR value.
\fI//node/@parent\fR is the node name to use as the parent node.
\fI$MONO_INSTALL_PREFIX/lib/monodoc/monodoc.xml\fR contains a list of such
names, and this can be any \fI//node/@name\fR value. If the
\fI//node/@parent\fR value isn't found, then it's inserted under the
"Various" tree node.
The \fI/monodoc/source/@provider\fR attribute specifies which format provider
should be used when reading the \fI.tree\fR and \\fR files; this
\fImust\fR correspond to one of the \fI--format\fR values.
The \fI/monodoc/source/@basefile\fR attribute specifies the filename prefix
for the documentation files. This must be the same prefix as used with the
\fI\-\-out\fR parameter. There should be \fIno\fR filename extension on this
The \fI/monodoc/source/@path\fR attribute specifies the parent node in
\fBmonodoc\fR(1)'s tree view where the documentation will be inserted.
See the \fI$MONO_INSTALL_PREFIX/lib/monodoc/monodoc.xml\fR
file for a list of \fIPATH\fR values (the \fI//node/@name\fR values), or it
may be a \fI//node/@name\fR value in the same \fI.source\fR file.
Once the \fIBASEFILE.source\fR has been written, the documentation can be
installed so that \fBmonodoc\fR(1) will display the documentation with the
cp BASEFILE.source BASEFILE.tree \\
`pkg-config monodoc --variable=sourcesdir`
\fB\-f\fR, \fB\-\-format\fR=\fIFORMAT\fR
Specifies the documentation format used within \fIPATHS\fR. Valid
\fIFORMAT\fR values include:
\fIsimple\fR, and
See the \fIFORMATS\fR section below for more information about these formats.
The default format (if none is specifed) is \fIecma\fR.
The \fI\-\-format\fR option may be interleaved with \fIPATHS\fR to
change the format used for the remaining parameters (until the next
\fI\-\-format\fR option is seen), e.g.:
mdoc assemble -o PREFIX A B --format=man C D --format=xhtml E
will assemble directories \fIA\fR and \fIB\fR with the \fIecma\fR format,
files \fIC\fR and \fID\fR with the \fIman\fR formt, and directory
\fIE\fR with the \fIxhtml\fR format.
\fB\-o\fR, \fB\-\-out\fR=\fIPREFIX\fR
Specify the output file prefix. \fBmdoc assemble\fR creates the files
\\fR and \fIPREFIX.tree\fR.
\fB\-h\fR, \fB\-?\fR, \fB\-\-help\fR
Display a help message and exit.
The following documentation formats are supported:
.SS ecma
The \fIMono ECMA Documentation Format\fR, an XML documentation format with one
file per type.
See the \fBmdoc\fR(5) man page for more information.
.SS ecmaspec
The \fIMono ECMA Specification Documentation Format\fR.
This is not the format you're looking for; it is the format used to represent
the ECMA-334 (C#) standard within \fBmonodoc\fR(1). It is not used to display
class library documentation; for class library documentation, use the
.B ecma
.SS error
The \fIError Documentation Format\fR is used to present detailed error
messages, and is used in \fBmonodoc\fR(1)'s "C# Compiler Error Reference"
In this format, \fIPATHS\fR is a configuration file, containing the XML:
The elements mean:
.I /ErrorProviderConfig/FilesPath
Specifies where to look for files.
.I /ErrorProviderConfig/Match
Specifies the filename pattern to look for within the
\fI/ErrorProviderConfig/FilesPath\fR directory.
.I /ErrorProviderConfig/ErrorNumSubstringStart
Specifies where within the filename the error number starts.
.I /ErrorProviderConfig/ErrorNumSubstringLength
Specifies how many characters after
\fI/ErrorProviderConfig/ErrorNumSubstringStart\fR to use for the error number.
.I /ErrorProviderConfig/FriendlyFormatString
Specifies the formatting/display of the node in the \fBmonodoc\fR(1) tree.
For each file found, it is converted to HTML with C# syntax coloring applied.
.SS simple
The \fISimple Documentation Format\fR file format recursively adds all files
and directories underneath \fIPATHS\fR. When displayed, HTML files are
displayed as-is. Text files are converted into HTML by translating each
newline into an HTML \fI<br>\fR element. No other file type is supported.
.SS man
The \fIMan Page Documentation Format\fR displays groff man pages. (This is
\fInot\fR a full groff parser, and only handles the man page constructs used
within the mono man pages.)
\fIPATHS\fR is a set of XML files containing:
<?xml version="1.0"?>
<manpage name="NAME" page="FILE" />
There may be multiple \fI//manpage\fR elements within the root \fI/manpage\fR
The \fI/manpages/manpage/@name\fR attribute contains the display name for the
tree view node, which is also the URL of the man page when using
\fBmonodoc\fR(1)'s \fILookup URL\fR command (before prefixing with a
\fIman:\fR prefix). Thus, if \fI/manpages/manpage/@name\fR contains
\fImono(1)\fR, then \fIman:mono(1)\fR can be used in the \fILookup URL\fR
command to view the \fImono(1)\fR man page.
The \fI/manpages/manpage/@page\fR attribute is the filename that contains the
man page. If this file does not exist, then \fI/manpages/manpage/@name\fR
will not be displayed within the tree view.
.SS xhtml
The XHTML provider interprets \fIPATHS\fR as a Windows Help file XHTML TOC
file and looks for referenced documents to create the help source.
Visit for details.
See also: