refentry
refentry — A reference page (originally a UNIX man-style reference page).
Synopsis
refentry ::=
- Sequence of:
- Zero or more of:
- Indexing inlines
info
? (db.titleforbidden.info)refmeta
?- One or more of:
refsynopsisdiv
?- One of:
- One or more of:
- One or more of:
- Zero or more of:
Attributes
Common attributes and common linking attributes.
Additional attributes:
- label
- status
Additional Constraints
- If this element is the root element, it must have a version attribute.
Description
A refentry
is a reference page. In
UNIX parlance this has historically been called a
“man page” (short for manual page).
A refentry
is an appropriate wrapper for any
small unit of reference documentation describing a single topic.
Canonical examples are programming language functions and user commands
(one refentry
per function or command).1
On some projects, the structure of reference pages may be rigorously defined right down to the number, order, and title of individual sections (some or all of which may be required).
Processing expectations
Formatted as a displayed block. It is not uncommon for
refentry
s to introduce a forced page break in print
media.
Formatting reference pages may require a fairly sophisticated
processing system. Much of the meta-information about a reference page
(its name, type, purpose, title, and classification) is stored in
wrappers near the beginning of the refentry
.
Common presentational features, such as titles and running heads, may require data from several of these wrappers plus some generated text. Other formatting often requires that these elements be reordered.
Attributes
Common attributes and common linking attributes.
- any attribute
Any attribute in any other explicit namespace
- label
Specifies an identifying string for presentation purposes
- status
Identifies the editorial or publication status of the element on which it occurs
Parents
These elements contain refentry
: appendix
, article
, chapter
, part
, partintro
, preface
, reference
, sect1
, sect2
, sect3
, sect4
, sect5
, section
, topic
.
Children
The following elements occur in refentry
: indexterm
(db.indexterm.endofrange), indexterm
(db.indexterm.singular), indexterm
(db.indexterm.startofrange), info
(db.titleforbidden.info), refmeta
, refnamediv
, refsect1
, refsection
, refsynopsisdiv
.
Examples
1 |<article xmlns='http://docbook.org/ns/docbook'>
|<title>Example refentry</title>
||
<refentry xml:id="ls">
5 ||
<refmeta>
|<refentrytitle>ls</refentrytitle>
|<manvolnum>1</manvolnum>
|</refmeta>
10 ||
<refnamediv>
|<refname>ls</refname>
|<refpurpose>list contents of a directory</refpurpose>
|<refclass>UNIX/Linux</refclass>
15 |</refnamediv>
||
<refsynopsisdiv>
|<cmdsynopsis>
|<command>/usr/bin/ls</command>
20 |<arg choice="opt">
|<option>aAbcCdfFgilLmnopqrRstux1</option>
|</arg>
|<arg choice="opt" rep="repeat">file</arg>
|</cmdsynopsis>
25 |</refsynopsisdiv>
||
<refsect1><title>Description</title>
|<para>For each file that is a directory, <command>ls</command>
|lists the contents of the directory; for each file that is an
30 |ordinary file, <command>ls</command> repeats its name and any
|other information requested.
|</para>
|<para>…</para>
|</refsect1>
35 |</refentry>
||
</article>
1 |<article xmlns='http://docbook.org/ns/docbook'>
|<title>Example refentry</title>
||
<refentry xml:id="printf">
5 ||
<refmeta>
|<refentrytitle>printf</refentrytitle>
|<manvolnum>3S</manvolnum>
|</refmeta>
10 ||
<refnamediv>
|<refname>printf</refname>
|<refname>fprintf</refname>
|<refname>sprintf</refname>
15 |<refpurpose>print formatted output</refpurpose>
|</refnamediv>
||
<refsynopsisdiv>
|20 |
<funcsynopsis>
|<funcsynopsisinfo>
|#include <stdio.h>
|</funcsynopsisinfo>
|<funcprototype>
25 |<funcdef>int <function>printf</function></funcdef>
|<paramdef>const char *<parameter>format</parameter></paramdef>
|<paramdef>...</paramdef>
|</funcprototype>
|30 |
<funcprototype>
|<funcdef>int <function>fprintf</function></funcdef>
|<paramdef>FILE *<parameter>strm</parameter></paramdef>
|<paramdef>const char *<parameter>format</parameter></paramdef>
|<paramdef>...</paramdef>
35 |</funcprototype>
||
<funcprototype>
|<funcdef>int <function>sprintf</function></funcdef>
|<paramdef>char *<parameter>s</parameter></paramdef>
40 |<paramdef>const char *<parameter>format</parameter></paramdef>
|<paramdef>...</paramdef>
|</funcprototype>
|</funcsynopsis>
|45 |
</refsynopsisdiv>
||
<refsect1><title>Description</title>
|<para><function>printf</function> places output on the standard
|output stream stdout.
50 |</para>
|<para>…</para>
|</refsect1>
|</refentry>
|55 |
</article>
1 |<article xmlns='http://docbook.org/ns/docbook'>
|<title>Example refentry</title>
||
<refentry xml:id="iovec">
5 ||
<refmeta>
|<refentrytitle>iovec</refentrytitle>
|<manvolnum>9S</manvolnum>
|</refmeta>
10 ||
<refnamediv>
|<refname>iovec</refname>
|<refpurpose>data storage structure for I/O using uio</refpurpose>
|</refnamediv>
15 ||
<refsynopsisdiv>
|<synopsis>
|#include <sys/uio.h>
|</synopsis>
20 |</refsynopsisdiv>
||
<refsect1><title>Interface Level</title>
|<para>Architecture independent level 1 (DDI/DKI).
|</para>
25 |</refsect1>
||
<refsect1><title>Description</title>
||
<para>
30 |An <code>iovec</code> structure describes a data
|storage area for transfer in a
|<citerefentry><refentrytitle>uio</refentrytitle>
|<manvolnum>9S</manvolnum>
|</citerefentry>
35 |structure. Conceptually, it may be thought of as
|a base address and length specification.
|</para>
||
</refsect1>
40 |<refsect1><title>Structure Members</title>
||
<programlisting>
|caddr_t iov_base; /* base address of the data storage area */
|/* represented by the iovec structure */
45 |int iov_len; /* size of the data storage area in bytes */
|</programlisting>
||
<para>…</para>
|</refsect1>
50 |</refentry>
||
</article>