| 1 | <refentry id="refentry.element"> |
| 2 | <?dbhtml filename="refentry.html"?> |
| 3 | <refentryinfo> |
| 4 | <pubdate>$Date$</pubdate> |
| 5 | <releaseinfo>$Revision$</releaseinfo> |
| 6 | </refentryinfo> |
| 7 | |
| 8 | <refmeta> |
| 9 | <indexterm><primary>elements</primary> |
| 10 | <secondary>refentry</secondary></indexterm> |
| 11 | <refentrytitle>refentry</refentrytitle> |
| 12 | <refmiscinfo>Element</refmiscinfo> |
| 13 | </refmeta> |
| 14 | <refnamediv> |
| 15 | <refname>refentry</refname> |
| 16 | <refpurpose>&refentry.purpose;</refpurpose> |
| 17 | </refnamediv> |
| 18 | |
| 19 | &refentry.synopsis.gen; |
| 20 | <refsect1 condition='ref.description'><title>Description</title> |
| 21 | |
| 22 | <para> |
| 23 | A <sgmltag>RefEntry</sgmltag> is a reference page. In &UNIX; parlance this has |
| 24 | historically been called a “man page” (short for manual page). |
| 25 | </para> |
| 26 | |
| 27 | <para> |
| 28 | <sgmltag>RefEntry</sgmltag> is an appropriate wrapper for any small unit of |
| 29 | reference documentation describing a single topic. Canonical examples |
| 30 | are programming language functions and user commands |
| 31 | (one <sgmltag>RefEntry</sgmltag> per function or command).<footnote><para> |
| 32 | You're reading a <sgmltag>RefEntry</sgmltag> right now.</para></footnote> |
| 33 | </para> |
| 34 | |
| 35 | <para> |
| 36 | On some projects, the structure of reference pages may be rigorously |
| 37 | defined right down to the number, order, and title of individual sections |
| 38 | (some or all of which may be required). |
| 39 | </para> |
| 40 | |
| 41 | <refsect2><title>Processing expectations</title> |
| 42 | <para> |
| 43 | &format.block; It is not uncommon for <sgmltag>RefEntry</sgmltag>s to introduce |
| 44 | a forced page break in print media. |
| 45 | </para> |
| 46 | <para> |
| 47 | Formatting reference pages may require a fairly sophisticated |
| 48 | processing system. Much of the meta-information about a |
| 49 | reference page (its name, type, purpose, title, and |
| 50 | classification) is stored in wrappers near the beginning of |
| 51 | the <sgmltag>RefEntry</sgmltag>. |
| 52 | </para> |
| 53 | <para> |
| 54 | Common presentational features, such as titles and running |
| 55 | heads, may require data from several of these wrappers plus |
| 56 | some generated text. Other formatting often requires that |
| 57 | these elements be reordered. |
| 58 | </para> |
| 59 | </refsect2> |
| 60 | |
| 61 | |
| 62 | |
| 63 | &refentry.parents.gen; |
| 64 | &refentry.children.gen; |
| 65 | </refsect1> |
| 66 | <refsect1 condition='ref.elem.attrdesc'><title>Attributes</title> |
| 67 | <variablelist> |
| 68 | <varlistentry><term>status</term> |
| 69 | <listitem> |
| 70 | <para> |
| 71 | <sgmltag class="attribute">Status</sgmltag> identifies the editorial or publication |
| 72 | status of the <sgmltag>RefEntry</sgmltag>. |
| 73 | </para> |
| 74 | <para> |
| 75 | Publication status might be used to control formatting (for example, |
| 76 | printing a <quote>draft</quote> watermark on drafts) or processing (perhaps |
| 77 | a document with a status of <quote>final</quote> should not include any |
| 78 | components that are not final). |
| 79 | </para> |
| 80 | </listitem> |
| 81 | </varlistentry> |
| 82 | </variablelist> |
| 83 | </refsect1> |
| 84 | <refsect1><title>Examples</title> |
| 85 | |
| 86 | <para> |
| 87 | A typical reference page for a command: |
| 88 | </para> |
| 89 | |
| 90 | <informalexample role="example-source"> |
| 91 | <programlisting>&refentry.example.1.txt;</programlisting> |
| 92 | </informalexample> |
| 93 | |
| 94 | <para> |
| 95 | A typical reference page for a function: |
| 96 | </para> |
| 97 | |
| 98 | <informalexample role="example-source"> |
| 99 | <programlisting>&refentry.example.2.txt;</programlisting> |
| 100 | </informalexample> |
| 101 | |
| 102 | <para> |
| 103 | A reference page for a data structure: |
| 104 | </para> |
| 105 | |
| 106 | |
| 107 | <informalexample role="example-source"> |
| 108 | <programlisting>&refentry.example.3.txt;</programlisting> |
| 109 | </informalexample> |
| 110 | |
| 111 | &refentry.example.seealso.gen; |
| 112 | </refsect1> |
| 113 | </refentry> |
| 114 |