| 1 |
<refentry id="literallayout.element"> |
| 2 |
<?dbhtml filename="literallayout.html"?> |
| 3 |
<refentryinfo> |
| 4 |
<pubdate>$Date$</pubdate> |
| 5 |
<releaseinfo>$Revision$</releaseinfo> |
| 6 |
</refentryinfo> |
| 7 |
|
| 8 |
<refmeta> |
| 9 |
<indexterm><primary>elements</primary> |
| 10 |
<secondary>literallayout</secondary></indexterm> |
| 11 |
<refentrytitle>literallayout</refentrytitle> |
| 12 |
<refmiscinfo>Element</refmiscinfo> |
| 13 |
</refmeta> |
| 14 |
<refnamediv> |
| 15 |
<refname>literallayout</refname> |
| 16 |
<refpurpose>&literallayout.purpose;</refpurpose> |
| 17 |
</refnamediv> |
| 18 |
|
| 19 |
&literallayout.synopsis.gen; |
| 20 |
<refsect1 condition='ref.description'><title>Description</title> |
| 21 |
|
| 22 |
<para> |
| 23 |
<sgmltag>LiteralLayout</sgmltag> is a verbatim environment. Unlike the other |
| 24 |
verbatim environments, it does not have strong semantic overtones and |
| 25 |
may not imply a font change. |
| 26 |
</para> |
| 27 |
|
| 28 |
<refsect2><title>Processing expectations</title> |
| 29 |
<para> |
| 30 |
&pexp.linespecific; |
| 31 |
</para> |
| 32 |
|
| 33 |
<para> |
| 34 |
Unlike |
| 35 |
<sgmltag>ProgramListing</sgmltag> and <sgmltag>Screen</sgmltag>, which usually |
| 36 |
imply a font change, <sgmltag>LiteralLayout</sgmltag> does not. |
| 37 |
How spaces are to be represented faithfully in a proportional |
| 38 |
font is not addressed by DocBook. |
| 39 |
</para> |
| 40 |
|
| 41 |
<para> |
| 42 |
In DocBook <acronym>V3.1</acronym>, the <sgmltag class='attribute'>Class</sgmltag> attribute |
| 43 |
was added to give users control over the font used in |
| 44 |
<sgmltag>LiteralLayout</sgmltag>s. If the <sgmltag |
| 45 |
class='attribute'>Class</sgmltag> attribute is specified and its value is |
| 46 |
<literal>Monospaced</literal>, then the <sgmltag>LiteralLayout</sgmltag> |
| 47 |
will be presented in a monospaced font, probably the same one |
| 48 |
used for other verbatim environments. The default value for |
| 49 |
<sgmltag class='attribute'>Class</sgmltag> is <literal>Normal</literal>, meaning |
| 50 |
that no font change will occur. |
| 51 |
</para> |
| 52 |
</refsect2> |
| 53 |
|
| 54 |
<refsect2 role='fu' revision="4.0"><title>&FutureChanges;</title> |
| 55 |
<para> |
| 56 |
|
| 57 |
&fu.interfacedefinition; |
| 58 |
</para> |
| 59 |
</refsect2> |
| 60 |
|
| 61 |
<refsect2 role='fu' revision="5.0"><title>&FutureChanges;</title> |
| 62 |
<para>The <literal>xml:space</literal> attribute is automatically |
| 63 |
provided in the XML DTD. |
| 64 |
</para> |
| 65 |
</refsect2> |
| 66 |
|
| 67 |
|
| 68 |
&literallayout.parents.gen; |
| 69 |
&literallayout.children.gen; |
| 70 |
</refsect1> |
| 71 |
<refsect1 condition='ref.elem.attrdesc'><title>Attributes</title> |
| 72 |
<variablelist> |
| 73 |
<varlistentry><term>class</term> |
| 74 |
<listitem> |
| 75 |
<para> |
| 76 |
<sgmltag class="attribute">Class</sgmltag> distinguishes between literal layout |
| 77 |
environments that are presented in a monospaced font and literal layout |
| 78 |
environments that have no implicit font change. |
| 79 |
</para> |
| 80 |
</listitem> |
| 81 |
</varlistentry> |
| 82 |
<varlistentry><term>format</term> |
| 83 |
<listitem> |
| 84 |
<para> |
| 85 |
The <sgmltag class="attribute">Format</sgmltag> attribute applies the |
| 86 |
<literal>linespecific</literal> notation to all <sgmltag>LiteralLayout</sgmltag>s. |
| 87 |
All white space and line breaks must be preserved. |
| 88 |
</para> |
| 89 |
</listitem> |
| 90 |
</varlistentry> |
| 91 |
<varlistentry><term>linenumbering</term> |
| 92 |
<listitem> |
| 93 |
<para revision="4.0">Line numbering indicates whether or not the lines |
| 94 |
of a <sgmltag>LiteralLayout</sgmltag> are to be automatically numbered. The details |
| 95 |
of numbering (every line or only selected lines, on the left or right, etc.) |
| 96 |
are left up to the processing application. Be aware that not all processors |
| 97 |
are capable of numbering lines.</para> |
| 98 |
</listitem> |
| 99 |
</varlistentry> |
| 100 |
<varlistentry><term>width</term> |
| 101 |
<listitem> |
| 102 |
<para> |
| 103 |
<sgmltag class="attribute">Width</sgmltag> specifies the width (in characters) |
| 104 |
of the longest line in this <sgmltag>LiteralLayout</sgmltag> (formatters may use |
| 105 |
this value to determine scaling or rotation). |
| 106 |
</para> |
| 107 |
</listitem> |
| 108 |
</varlistentry> |
| 109 |
</variablelist> |
| 110 |
</refsect1> |
| 111 |
<refsect1 condition='ref.elem.seealso'><title>See Also</title> |
| 112 |
&literallayout.seealso.gen; |
| 113 |
</refsect1> |
| 114 |
<refsect1><title>Examples</title> |
| 115 |
|
| 116 |
<informalexample role="example-source"> |
| 117 |
<programlisting>&literallayout.example.1.txt;</programlisting> |
| 118 |
</informalexample> |
| 119 |
|
| 120 |
<anchor id="ex.os.literallayout.1" role="HACK-ex.out.start"/> |
| 121 |
&literallayout.example.1.gen; |
| 122 |
<anchor id="ex.oe.literallayout.1" role="HACK-ex.out.end"/> |
| 123 |
|
| 124 |
&literallayout.example.seealso.gen; |
| 125 |
</refsect1> |
| 126 |
</refentry> |
| 127 |
|