LinuxReviws.org --get your your Linux knowledge
> Linux Reviews > Manual Pages (man) >

mdoc

Mono documentation management tool


  1. mdoc.1.man
  2. mdoc.5.man
  3. mdoc.7.man


1. mdoc.1.man

Manpage of mdoc

mdoc

Section: User Commands (1)
Index Return to Main Contents
 

NAME

mdoc - Mono documentation management tool  

SYNOPSIS

mdoc command [options] [args]  

OVERVIEW

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:

*
Code readability. 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 being documented.

*
Localization. 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.
*
Administration. 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 mdoc export:

    mdoc export -o /srv/www/htdocs/ProjectName docs/en

*
To use an ASP.NET webapp to display the sources, see: http://anonsvn.mono-project.com/source/trunk/monodoc/engine/web/.

From a monodoc source checkout, you can do this:


    cd engine
    make web

This will use xsp(1) to serve the ASP.NET webapp; Visit http://localhost:8080/ to view the documentation.
*
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:

    <?xml version="1.0"?>
    <monodoc>
      <source provider="ecma" basefile="ProjectName"
        path="various" />
    </monodoc>

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:


    cp ProjectName.tree ProjectName.zip ProjectName.source \
      `pkg-config monodoc --variable sourcesdir`

The above will copy the files into the directory that Monodoc has registered; you might need root permissions to do this. The actual directory is returned by the pkg-config invocation.
 

MDOC COMMANDS

mdoc assemble

Compiles documentation for use within the monodoc(1) browser.

See the mdoc-assemble(1) man page for details.

mdoc export

Exports documentation into a directory structure of HTML files.

See the mdoc-export(1) man page for details.

mdoc export-msxdoc

Exports documentation into the single-file Microsoft XML Documentation format.

See the mdoc-export-msxdoc(1) man page for details.

mdoc help

View internal help for a given command.

    mdoc help assemble

is equivalent to:

    mdoc assemble --help

Multiple sub-commands may be listed at once:

    mdoc help assemble export update validate

mdoc update

Updates documentation, adding and removing members based upon a reference assembly.

See the mdoc-update(1) man page for details.

mdoc validate

Validates the documentation against the Mono documentation schema.

See the mdoc-validate(1) man page for details.

 

SEE ALSO

mdoc(5), mdoc-assemble(1), mdoc-export(1), mdoc-update(1), mdoc-validate(1)  

MAILING LISTS

Visit http://lists.ximian.com/mailman/listinfo/mono-docs-list for details.
 

WEB SITE

Visit http://www.mono-project.com/mdoc for details


 

Index

NAME
SYNOPSIS
OVERVIEW
MDOC COMMANDS
SEE ALSO
MAILING LISTS
WEB SITE

This document was created by man2html using the manual pages.
Time: 17:31:39 GMT, October 23, 2013

2. mdoc.5.man

Manpage of mdoc

mdoc

Section: File Formats (5)
Index Return to Main Contents
 

NAME

mdoc - Mono Documentation XML Format  

DESCRIPTION

The assorted Mono documentation programs generate or manipulate XML files following the mono documentation schema:
mdoc update
Creates or updates mono documentation XML for a set of assemblies.
mdoc validate
Validates the mono documentation XML against the mono documentation XML schema.
mdoc assemble
Converts the mono documentation XML within a directory structure into a set of files for use with monodoc(1).
mdoc export
Converts the mono documentation XML within a directory structure into a set of HTML files that can be viewed with a web browser.

All of these tools (and more) use the common XML schema described in this man page.  

FILE/DIRECTORY STRUCTURE

There are three sets of Mono documentation XML files:
*
index.xml: contains a list of all assemblies within the containing directory, and all types and namespaces within those assemblies.
*
ns-*.xml: There is one ns-*.xml file for each namespace within the assembly; these files are siblings to index.xml .

Examples of ns-*.xml files include: ns-System.xml, ns-System.Collections.xml, and ns-.xml (for the root namespace, though it is recommended to NOT place types into the root namespace, as monodoc(1) doesn't display them).

The ns-*.xml files contain per-namespace documentation.

*
NamespaceName/TypeName.xml: These files are within a dotted NamespaceName directory, and TypeName is the name of the type.

Examples include: RootType.xml (if the type has no namespace), System/String.xml, System.Collections/IEnumerable.xml, and System.Collections.Generic/List`1+Enumerator.xml (the `1 is the number of generic type parameters the type accepts, and everything after the + is a nested type).

Thus, typical directory contents would resemble:

    index.xml
    ns-System.xml
    ns-System.Collections.Generic.xml
    System/String.xml
    System.Collections.Generic/List`1.xml
 

DOCUMENTATION FORMAT

 

index.xml File Format

The index.xml file contains a list of the assemblies nested under the directory containing index.xml and all namespaces and types within those assemblies. It looks something like this:

    <Overview>
      <Assemblies>
        <Assembly Name="mscorlib" Version="2.0.0.0" />
        <!-- other <Assembly/> elements... -->
      </Assemblies>
      <Remarks>To be added.</Remarks>
      <Copyright>To be added.</Copyright>
      <Types>
        <Namespace Name="System">
          <Type Name="String" />
          <!-- Other <Type/> elements -->
        </Namespace>
        <Namespace Name="System.Collections.Generic">
          <Type Name="List`1" DisplayName="List&lt;T&gt;" />
          <!-- Other <Type/> elements -->
        </Namespace>
        <!-- other <Namespace/> elements -->
      </Types>
      <Title>DocTest</Title>
    </Overview>

Most of this is maintained automatically, in particular the /Overview/Assemblies and /Overview/Types elements.

The //Namespace/@Name attribute corresponds to a directory which contains files named //Type/@Name.xml, while the //Type/@DisplayName attribute contains a C# type name (if //Type/@DisplayName isn't found, then //Type/@Name is used as the display name). There should also be a ns-[//Namespace/@Name].xml file.

There are three elements of interest to authors: /Overview/Remarks, /Overview/Copyright, and /Overview/Title, which contain assembly-level documentation. These elements can contain any of the following XML elements (documented in the Documentation XML Elements section): block, code, example, list, para, paramref, typeparamref, see, and ul.  

ns-*.xml File Format

The ns-*.xml files contain namespace documentation:

    <Namespace Name="System">
      <Docs>
        <summary>To be added.</summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Namespace>

The /Namespace/Docs/summary and /Namespace/Docs/remarks elements should contain namespace documentation.

The remarks and summary elements are documented in the Documentation XML Elements section.  

NamespaceName/TypeName.xml File Format

The mono documentation format is similar to the Ecma documentation format, as described in ECMA-335 3rd Edition, Partition IV, Chapter 7. The principal difference from the ECMA format is that each type gets its own file, within a directory identical to the namespace of the type. There is a lot of information that is maintained automatically by mdoc(1); Most of the information within the documentation should not be edited. This includes the type name (/Type/@FullName), implemented interfaces (/Type/Interfaces), member information (/Type/Members/Member/@MemberName, /Type/Members/Member/MemberSignature, /Type/Members/Member/MemberType, /Type/Members/Member/Parameters, etc.).

    <Type Name="DocAttribute" FullName="Mono.DocTest.DocAttribute">
      <TypeSignature Language="C#" Value="public class DocAttribute : Attribute" />
      <AssemblyInfo>
        <AssemblyName>DocTest</AssemblyName>
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Base>
        <BaseTypeName>System.Attribute</BaseTypeName>
      </Base>
      <Interfaces />
      <Attributes>
        <Attribute>
          <AttributeName>System.AttributeUsage(System.AttributeTargets.All)</AttributeName>
        </Attribute>
      </Attributes>
      <Docs>
        <summary>To be added.</summary>
        <remarks>To be added.</remarks>
      </Docs>
      <Members>
        <Member MemberName=".ctor">
          <MemberSignature Language="C#" Value="public DocAttribute (string docs);" />
          <MemberType>Constructor</MemberType>
          <AssemblyInfo>
            <AssemblyVersion>0.0.0.0</AssemblyVersion>
          </AssemblyInfo>
          <Parameters>
            <Parameter Name="docs" Type="System.String" />
          </Parameters>
          <Docs>
            <param name="docs">To be added.</param>
            <summary>To be added.</summary>
            <remarks>To be added.</remarks>
          </Docs>
        </Member>
      </Members>
    </Type>

The only elements that normally need to be edited are children of the //Docs elements, which usually contain the text To be added. The /Type/Docs element contains type-level documentation, while the /Type/Members/Member/Docs element contains per-member documentation.

The //Docs elements can contain the following elements: altcompliant, altmember, example, exception, param, permission, remarks, returns, since, summary, threadsafe, typeparam, and value.

Nested types are not members; they are types, and are documented in their own file. Consequently, the NamespaceName/TypeName.xml files are not recursive; you do not store a <Type/> element within a <Type/> element.  

Documentation XML Elements

The contents of the Docs element is identical in semantics and structure to the inline C# documentation format, consisting of these elements (listed in ECMA-334 3rd Edition, Annex E, Section 2). The following are used within the element descriptions:
CREF
Refers to a class (or member) reference, and is a string in the format described below in the CREF FORMAT section.
TEXT
Non-XML text, and XML should not be nested.
XML
Only XML elements should be nested (which indirectly may contain text), but non-whitespace text should not be an immediate child node.
XML_TEXT
Free-form text and XML, so that other XML elements may be nested.

The following elements are used in documentation:

<altmember cref=CREF />
<altmember/> is a top-level element, and should be nested directly under the <Docs/> element.

Allows an entry to be generated for the See Also section. Use <see/> to specify a link from within text.

    <altmember cref="P:System.Exception.Message" />
<block subset=SUBSET type=TYPE>XML_TEXT</block>
Create a block of text, similar in concept to a paragraph, but is used to create divisions within the text. To some extent, a <block/> is equivalent to the HTML <h2/> tag.

SUBSET should always be the value "none".

TYPE specifies the heading and formatting to use. Recognized types are:

behaviors Creates a section with the heading Operation.

note Creates a section with the heading Note:.

overrides Creates a section with the heading Note to Inheritors.

usage Creates a section with the heading Usage.

The block element can contain the following elements: block, c, code, list, para, paramref, see, subscript, sup, and typeparamref.

<c>XML_TEXT</c>
Set text in a code-like font (similar to the HTML <tt/> element).

The c element can contain the following elements: code, para, paramref, see, and typeparamref.

<code lang=LANGUAGE src=SOURCE>TEXT</code>
Display multiple lines of text in a code-like font (similar to the HTML <pre/> element).

LANGUAGE is the language this code block is for. For example, if LANGUAGE is C#, then TEXT will get syntax highlighting for the C# language within the Mono Documentation Browser.

SOURCE is only interpreted by mdoc-update(1). If the src attribute is present when mdoc-update(1) is run, then SOURCE is a file (relative to mdoc-update(1)'s --out directory) that should be inserted as the value for TEXT. The contents of TEXT will be ignored by mdoc-update(1) and replaced on every invocation. SOURCE can also contain an "anchor", e.g. src="path/to/file.cs#RegionMarker". If an anchor is present, and LANGUAGE is C#, then #region RegionMarker will be searched for, and the contents between the #region and the following #endregion will be inserted as the value for TEXT element.

<example>XML_TEXT</example>
Indicates an example that should be displayed specially. For example:

    <example>
      <para>An introductory paragraph.</para>
      <code lang="C#">
        class Example {
          public static void Main ()
          {
            System.Console.WriteLine ("Hello, World!");
          }
        }
      </code>
    </example>

The example element can contain the following elements: c, code, list, para, and see.

<exception cref=CREF>XML_TEXT</exception>
Identifies an exception that can be thrown by the documented member.

<exception/> is a top-level element, and should be nested directly under the <Docs/> element.

CREF is the exception type that is thrown, while XML_TEXT contains the circumstances that would cause CREF to be thrown.

    <exception cref="T:System.ArgumentNullException">
      <paramref name="foo" /> was <see langword="null" />.
    </exception>

The exception element can contain the following elements: block, para, paramref, see, and typeparamref.

<format type=TYPE>XML_TEXT</format>
The <format/> element is an "escape hatch," for including (possibly XML) content that is not valid mdoc(5) content. It's the moral equivalent of perlpod(1) =begin format blocks.

TYPE is the mime type of XML_TEXT. mdoc(5) processors may skip format/> blocks of they use a type that isn't supported.

For example:

    <format type="text">
      <table width="100%">
        <tr><td style="color:red">Hello, world!</td></tr>
      </table>
    </format>

would cause the embedded HTML <table/> element to be inserted inline into the resulting HTML document when mdoc-export(1) processes the file. (Likewise, it may be skipped if processed by another program.)

format/> is intended to simplify importing documentation from existing documentation sources. It should not be relied upon, if at all possible.

<list>XML</list>
Create a list or table of items. <list/> makes use of nested <item>XML</item>, <listheader>XML</listheader>, <term>XML_TEXT</term>, and <description>XML_TEXT</description> elements.

Lists have the syntax:

    <list type="bullet"> <!-- or type="number" -->
      <item><term>Bullet 1</term></item>
      <item><term>Bullet 2</term></item>
      <item><term>Bullet 3</term></item>
    </list>

Tables have the syntax:

    <list type="table">
      <listheader> <!-- listheader bolds this row -->
        <term>Column 1</term>
        <description>Column 2</description>
        <description>Column 3</description>
      </listheader>
      <item>
        <term>Item 1-A</term>
        <description>Item 1-B</description>
        <description>Item 1-C</description>
      </item>
      <item>
        <term>Item 2-A</term>
        <description>Item 2-B</description>
        <description>Item 2-C</description>
      </item>
    </list>

The item and description elements can each contain text and the following elements: block, c, para, paramref, see, sup, and typeparamref.

<para>XML_TEXT</para>
Insert a paragraph of XML_TEXT. For example,

    <para>
      This is a paragraph of text.
    </para>

The para element can contain the following elements: block, c, example, link, list, onequarter, paramref, see, sub, sup, typeparamref, and ul.

<param name=NAME>XML_TEXT</param>
<param/> is a top-level element, and should be nested directly under the <Docs/> element.

Describes the parameter NAME of the current constructor, method, or property:

    <param name="count">
      A <see cref="T:System.Int32" /> containing the number
      of widgets to process.
    </param>

The param element can contain the following elements: block, c, example, para, paramref, see, and typeparamref.

<paramref name=NAME />
Indicates that NAME is a parameter.

This usually renders NAME as italic text, so it is frequently (ab)used as an equivalent to the HTML <i/> element. See the <exception/> documentation (above) for an example.

<permission cref=CREF>XML_TEXT</permission>
Documents the security accessibility requirements of the current member.

<permission/> is a top-level element, and should be nested directly under the <Docs/> element.

CREF is a type reference to the security permission required, while XML_TEXT is a description of why the permission is required.

    <permission cref="T:System.Security.Permissions.FileIOPermission">
      Requires permission for reading and writing files. See 
      <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Read" />, 
      <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Write" />.
    </permission>

The permission element can contain the following elements: block, para, paramref, see, and typeparamref.

<remarks>XML_TEXT</remarks>
Contains detailed information about a member.

<remarks/> is a top-level element, and should be nested directly under the <Docs/> element.

    <remarks>
      Insert detailed information here.
    </remarks>

The remarks element can contain the following elements: block, c, code, example, list, para, paramref, see, and typeparamref.

<returns>XML_TEXT</returns>

<returns/> is a top-level element, and should be nested directly under the <Docs/> element.

Describes the return value of a method:

    <returns>
      A <see cref="T:System.Boolean" /> specifying whether 
      or not the process can access 
      <see cref="P:Mono.Unix.UnixFileSystemInfo.FullName" />.
    </returns>

The returns element can contain the following elements: list, para, paramref, see, and typeparamref.

<see cref="CREF" />, <see langword="LANGWORD" />
Creates a link to the specified member within the current text:

    <see cref="M:Some.Namespace.With.Type.Method" />

or specifies that LANGWORD is a language keyword:

    <see langword="null" />

<seealso cref=CREF />
Do not use seealso, use altmember.
<since version=VERSION />

<since/> is a top-level element, and should be nested directly under the <Docs/> element.

Permits specification of which version introduced the specified type or member.

    <since version="Gtk# 2.4" />

This generally isn't required, as the //AssemblyInfo/AssemblyVersion elements track which assembly versions contain type or member.

<summary>XML_TEXT</summary>

<summary/> is a top-level element, and should be nested directly under the <Docs/> element.

Provides a (brief!) overview about a type or type member.

This is usually displayed as part of a class declaration, and should be a reasonably short description of the type/member. Use <remarks/> for more detailed information.

The summary element can contain the following elements: block, list, para, paramref, see, and typeparamref.

<typeparam name=NAME>XML_TEXT</typeparam>
<typeparam/> is a top-level element, and should be nested directly under the <Docs/> element.

This is used to document a type parameter for a generic type or generic method.

NAME is the name of the type parameter, while XML_TEXT contains a description of the parameter (what it's used for, what restrictions it must meet, etc.).

    <typeparam name="T">
      The type of the underlying collection
    </typeparam>

The typeparam element can contain the following elements: block, c, para, paramref, see, and typeparamref.

<typeparamref name=NAME>
Used to indicate that NAME is a type parameter.
<value>XML_TEXT</value>
<value/> is a top-level element, and should be nested directly under the <Docs/> element.

Allows a property to be described.

    <value>
      A <see cref="T:System.String" /> containing a widget name.
    </value>

The value element can contain the following elements: block, c, example, list, para, paramref, see, and typeparamref.

 

CREF FORMAT

String IDs (CREFs) are used to refer to a type or member of a type. String IDs are documented in ECMA-334 3rd Edition, Annex E.3.1. They consist of a member type prefix, the full type name (namespace + name, separated by .), possibly followed by the member name and other information.

Member type prefixes:

C:
The CREF refers to a constructor. The (optional) parameter list is enclosed in parenthesis and follows the type name: C:System.String(System.Char,System.Int32).
E:
The CREF refers to an event. The event name follows the type name: E:System.AppDomain.AssemblyLoad.
F:
The CREF refers to a field. The field name follows the type name: F:System.Runtime.InteropServices.DllImportAttribute.SetLastError.
M:
Refers to a constructor or method. Constructors may append .ctor to the type name (instead of using the above C: constructor format), while methods append the method name and an (optional) count of the number of generic parameters. Both constructors and methods may append the method parameter list enclosed in parenthesis.

Examples: M:System.Object..ctor, M:System.String..ctor(System.Char[]), M:System.String.Concat(System.Object), M:System.Array.Sort``1(``0[]), M:System.Collections.Generic.List`1..ctor, M:System.Collections.Generic.List`1.Add(`0).

N:
Refers to a namespace, e.g. N:System.
P:
Refers to a property. If the property is an indexer or takes parameters, the parameter types are appended to the property name and enclosed with paranthesis: P:System.String.Length, P:System.String.Chars(System.Int32).
T:
The CREF refers to a type, with the number of generic types appended: T:System.String, T:System.Collections.Generic.List`1, T:System.Collections.Generic.List`1.Enumerator.

To make matters more interesting, generic types & members have two representations: the "unbound" representation (shown in examples above), in which class names have the count of generic parameters appended to their name. There is also a "bound" representation, in which the binding of generic parameters is listed within '{' and '}' or '<' and '>'. (Use of '<' and '>' is less common, as within an XML document their escaped character entities must instead be used, leading to '&lt;' and '&gt;'.)

Unbound:

*
T:System.Collections.Generic.List`1
*
T:System.Collections.Generic.Dictionary`2

Bound:

*
T:System.Collections.Generic.List{System.Int32}
*
T:System.Collections.Generic.List<System.Int32>
*
T:System.Collections.Generic.List&lt;System.Int32&gt;
*
T:System.Predicate{System.Action{System.String}}

As you can see, bound variants can be arbitrarily complex (just like generics).

Furthermore, if a generic parameter is bound to the generic parameter of a type or method, the "index" of the type/method's generic parameter is used as the binding, so given

    class FooType {
      public static void Foo<T> (System.Predicate<T> predicate)
      {
      }
    }

The CREF for this method is M:FooType.Foo``1(System.Predicate{``0}), ``0 is the 0th generic parameter index which is bound to System.Predicate<T>.  

SEE ALSO

mdoc(1), monodocer(1)  

MAILING LISTS

Visit http://lists.ximian.com/mailman/listinfo/mono-docs-list for details.
 

WEB SITE

Visit http://www.mono-project.com for details


 

Index

NAME
DESCRIPTION
FILE/DIRECTORY STRUCTURE
DOCUMENTATION FORMAT
index.xml File Format
ns-*.xml File Format
NamespaceName/TypeName.xml File Format
Documentation XML Elements
CREF FORMAT
SEE ALSO
MAILING LISTS
WEB SITE

This document was created by man2html using the manual pages.
Time: 17:31:39 GMT, October 23, 2013

3. mdoc.7.man

Manpage of MDOC

MDOC

Section: Environments, Tables, and Troff Macros (7)
Index Return to Main Contents

BSD mandoc
Linux  

NAME

mdoc - quick reference guide for the -mdoc macro package  

SYNOPSIS

groff -m doc files ...  

DESCRIPTION

The -mdoc package is a set of content-based and domain-based macros used to format the BSD man pages. The macro names and their meanings are listed below for quick reference; for a detailed explanation on using the package, see the tutorial sampler mdoc.samples7.

Note that this is not the usual macro package for Linux documentation, although it is used for documentation of several widely used programs; see man(7).

The macros are described in two groups, the first includes the structural and physical page layout macros. The second contains the manual and general text domain macros which differentiate the -mdoc package from other troff formatting packages.  

PAGE STRUCTURE DOMAIN

 

Title Macros

To create a valid manual page, these three macros, in this order, are required:

. Month day, year
Document date.
.
Title, in upper case.
. OPERATING_SYSTEM [version/release]
Operating system (BSD )

 

Page Layout Macros

Section headers, paragraph breaks, lists and displays.

.
 

Section Headers.

Valid headers, in the order of presentation:

NAME
Name section, should include the `.groff ' or `.Fn and ' the `. - macros. '
SYNOPSIS
Usage.
DESCRIPTION
General description, should include options and parameters.
RETURN VALUE
Sections two and three function calls.
ENVIRONMENT
Describe environment variables.
FILES
Files associated with the subject.
EXAMPLES
Examples and suggestions.
DIAGNOSTICS
Normally used for section four device interface diagnostics.
ERRORS
Sections two and three error and signal handling.
SEE ALSO
Cross references and citations.
CONFORMING TO
Conformance to standards if applicable.
HISTORY
If a standard is not applicable, the history of the subject should be given.
BUGS
Gotchas and caveats.
other
Customized headers may be added at the authors discretion.

Li .Ss Subsection Headers. Li .Pp Paragraph Break. Vertical space (one line). Li .D1 (D-one) Display-one Indent and display one text line. Li .Dl (D-ell) Display-one literal. Indent and display one line of literal text. Li .Bd Begin-display block. Display options:

-ragged
Unjustified (ragged edges).
-filled
Justified.
-literal
Literal text or code.
-file name
Read in named file and display.
-offset string
Offset display. Acceptable string values:

left
Align block on left (default).
center
Approximate center margin.
indent
Six constant width spaces (a tab).
indent-two
Two tabs.
right
Left aligns block 2 inches from right.
xx n
Where xx is a number from 4 n to 99 n
Aa Where
Aa is a callable macro name.
string
The width of string is used.

Li .Ed End-display (matches .Bd). Li .Bl Begin-list. Create lists or columns. Options:

List-types

-bullet Ta Bullet Item List
-item Ta Unlabeled List
-enum Ta Enumerated List
-tag Ta Tag Labeled List
-diag Ta Diagnostic List
-hang Ta Hanging Labeled List
-ohang Ta Overhanging Labeled List
-inset Ta Inset or Run-on Labeled List

List-parameters

-offset
(All lists.) See `. ' begin-display above.
-width
( -tag and -hang lists only.) See `. '
-compact
(All lists.) Suppresses blank lines.

Li .El End-list. Li .It List item.

 

MANUAL AND GENERAL TEXT DOMAIN MACROS

The manual and general text domain macros are special in that most of them are parsed for callable macros for example:

.[-s file ]
Produces [-s file ]

In this example, the option enclosure macro `.[is] ' parsed, and calls the callable content macro `- ' which operates on the argument `s' and then calls the callable content macro `file ... ' which operates on the argument `file' Some macros may be callable, but are not parsed and vice versa. These macros are indicated in the parsed and callable columns below.

Unless stated, manual domain macros share a common syntax:

.argument [ . , ; : ( ) [ ] argument ...]

Note Opening and closing punctuation characters are only recognized as such if they are presented one at a time. The string `),' is not recognized as punctuation and will be output with a leading white space and in what ever font the calling macro uses. The argument list `]' ) , is recognized as three sequential closing punctuation characters and a leading white space is not output between the characters and the previous argument (if any). The special meaning of a punctuation character may be escaped with the string `\&' For example the following string,

.file1 , file2 , file3 ) .
Produces file1 , file2 , file3 )

 

Manual Domain Macros

Name   Parsed  Callable        Description
Ta Yes Ta Yes Ta Address. (This macro may be deprecated.)
An Ta Yes Ta Yes Ta Author name.
Ta Yes Ta Yes Ta Command-line argument.
Ta Ta Ta Configuration declaration (section four only).
Ta Yes Ta Yes Ta Command-line argument modifier.
Ta Yes Ta Yes Ta Defined variable (source code).
Er Ta Yes Ta Yes Ta Error number (source code).
Ta Yes Ta Yes Ta Environment variable.
Fa Ta Yes Ta Yes Ta Function argument.
Fd Ta Yes Ta Yes Ta Function declaration.
Fn Ta Yes Ta Yes Ta Function call (also .Fo and .Fc).
Ta Yes Ta Yes Ta Interactive command.
Ta Yes Ta Yes Ta Literal text.
Ta Yes Ta Yes Ta Command name.
[Ta Yes Ta Yes Ta Option (also .[and .Oc). ]
Ot Ta Yes Ta Yes Ta Old style function type (Fortran only).
Ta Yes Ta Yes Ta Pathname or filename.
St Ta Yes Ta Yes Ta Standards (-p1003.2, -p1003.1 or -ansiC)
Ta Yes Ta Yes Ta Variable name.
Vt Ta Yes Ta Yes Ta Variable type (Fortran only).
TaYesTaYesTaManualPageCrossReference.

 

General Text Domain Macros

Name  Parsed  Callable        Description
%A Ta Yes Ta Ta Reference author.
%B Ta Yes Ta Yes Ta Reference book title.
%C Ta Ta Ta Reference place of publishing (city).
%D Ta Ta Ta Reference date.
%J Ta Yes Ta Yes Ta Reference journal title.
%N Ta Ta Ta Reference issue number.
%O Ta Ta Ta Reference optional information.
%P Ta Ta Ta Reference page number(s).
%R Ta Ta Ta Reference report Name.
%T Ta Yes Ta Yes Ta Reference article title.
%V Ta Ta Ta Reference volume.
Ac Ta Yes Ta Yes Ta Angle close quote.
Ao Ta Yes Ta Yes Ta Angle open quote.
Ap Ta Yes Ta Yes Ta Apostrophe.
Aq Ta Yes Ta Yes Ta Angle quote.
AT&T System Ta Ta Ta AT&T UNIX
Bc Ta Yes Ta Yes Ta Bracket close quote.
Bf Ta Ta Ta Begin font mode.
Bo Ta Yes Ta Yes Ta Bracket open quote.
Bq Ta Yes Ta Yes Ta Bracket quote.
BSD Ta Yes Ta Yes Ta BSD
Db Ta Ta Ta Debug (default is \*qoff\*q)
Dc Ta Yes Ta Yes Ta Double close quote.
Do Ta Yes Ta Yes Ta Double open quote.
``Ta Yes Ta Yes Ta Double quote. ''
Ec Ta Yes Ta Yes Ta Enclose string close quote.
Ef Ta Ta Ta End font mode.
Ta Yes Ta Yes Ta Emphasis (traditional English).
Eo Ta Yes Ta Yes Ta Enclose string open quote.
Fx Ta Ta Ta FreeBSD operating system
Ta Yes Ta Yes Ta Normal text (no-op).
Ta Yes Ta Yes Ta space.
Pc Ta Yes Ta Yes Ta Parenthesis close quote.
Ta Yes Ta Ta Prefix string.
Po Ta Yes Ta Yes Ta Parenthesis open quote.
(Ta Yes Ta Yes Ta Parentheses quote. )
Qc Ta Yes Ta Yes Ta Straight Double close quote.
`Ta Yes '
Ta Yes Ta Quoted literal.
Qo Ta Yes Ta Yes Ta Straight Double open quote.
Qq Ta Yes Ta Yes Ta Straight Double quote.
Li Rs Ta No Ta No Ta "Reference start." Li Rv Ta No Ta No Ta "Return values (sections two and three only)." Li Sc Ta Yes Ta Yes Ta "Single close quote." Li So Ta Yes Ta Yes Ta "Single open quote." Li Sq Ta Yes Ta Yes Ta "Single quote." Li Sm Ta No Ta No Ta "Space mode (default is \*qon\*q)" Li Sx Ta Yes Ta Yes Ta "Section Cross Reference." Li Sy Ta Yes Ta Yes Ta "Symbolic (traditional English)." Li Tn Ta Yes Ta Yes Ta "Trade or type name (small Caps)." Li Ux Ta Yes Ta Yes Ta Ux Li Xc Ta Yes Ta Yes Ta "Extend argument list close." Li Xo Ta Yes Ta Yes Ta "Extend argument list open."

Macro names ending in `q' quote remaining items on the argument list. Macro names ending in `o' begin a quote which may span more than one line of input and are close quoted with the matching macro name ending in `c' Enclosure macros may be nested and are limited to eight arguments.

Note: the extended argument list macros ( `. ' `. ' and the function enclosure macros ( `.Fo , ' `.Fc ) ' are irregular. The extended list macros are used when the number of macro arguments would exceed the troff limitation of nine arguments.

The macros UR (starting a URI/URL hypertext reference), UE (ending one), and UN (identifying a target for a reference) are also available. See man(7) for more information on these macros.  

FILES

doc.tmac
Manual and general text domain macros.
tmac/doc-common
Common structural macros and definitions.
tmac/doc-nroff
Site dependent nroff style file.
tmac/doc-ditroff
Site dependent troff style file.
tmac/doc-syms
Special defines (such as the standards macro).

 

SEE ALSO

groff_mdoc7, mdoc.samples7, man(7), man-pages7  

COLOPHON

This page is part of release 3.32 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.


 

Index

NAME
SYNOPSIS
DESCRIPTION
PAGE STRUCTURE DOMAIN
Title Macros
Page Layout Macros
Section Headers.
MANUAL AND GENERAL TEXT DOMAIN MACROS
Manual Domain Macros
General Text Domain Macros
FILES
SEE ALSO
COLOPHON

This document was created by man2html using the manual pages.
Time: 17:31:39 GMT, October 23, 2013

ENGLISH - ja

Meet new people