| 1 |
<!-- -*- DocBook -*- -->
|
| 2 |
<?xml version='1.0'?>
|
| 3 |
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" [
|
| 4 |
<!ENTITY arches SYSTEM "arches.ent" >
|
| 5 |
<!ENTITY debianwebsite "http://www.debian.org" >
|
| 6 |
<!ENTITY entities "entities" >
|
| 7 |
]>
|
| 8 |
|
| 9 |
<book>
|
| 10 |
<title>The Title for the Book</title>
|
| 11 |
|
| 12 |
<chapter>
|
| 13 |
<title>The Chapter Title</title>
|
| 14 |
|
| 15 |
<!-- note to debiandoc users: there is no sect, start with sect1 -->
|
| 16 |
<sect1 id="sect1-cross-referencable-id">
|
| 17 |
<title>First Level Section</title>
|
| 18 |
<para>
|
| 19 |
|
| 20 |
A paragraph explaining something In this manual we will make extensive
|
| 21 |
use of &entities;, to insert the contents of smaller independent
|
| 22 |
files. This should help translators; any changes will be easier to
|
| 23 |
find within the files. We will try to keep the files
|
| 24 |
<emphasis>small</emphasis>, feel free to create new ones for new
|
| 25 |
subjects or subtopics.
|
| 26 |
|
| 27 |
</para><para>
|
| 28 |
|
| 29 |
This example document contains some of the most useful types
|
| 30 |
of xml markup for our purposes. Some quick rules:
|
| 31 |
|
| 32 |
<itemizedlist>
|
| 33 |
<listitem><para>
|
| 34 |
|
| 35 |
All tags must be in lower case
|
| 36 |
|
| 37 |
</para></listitem>
|
| 38 |
<listitem><para>
|
| 39 |
|
| 40 |
Every tag must have a closing tag also
|
| 41 |
|
| 42 |
</para></listitem>
|
| 43 |
<listitem><para>
|
| 44 |
|
| 45 |
No abbreviations in the tags
|
| 46 |
|
| 47 |
</para></listitem>
|
| 48 |
</itemizedlist>
|
| 49 |
|
| 50 |
and preferences:
|
| 51 |
|
| 52 |
<orderedlist>
|
| 53 |
<listitem><para>
|
| 54 |
|
| 55 |
Keep starting tags to the left margin as much as possible
|
| 56 |
|
| 57 |
</para></listitem>
|
| 58 |
<listitem><para>
|
| 59 |
|
| 60 |
Keep tag pairs intact on one line if it's reasonable to do so
|
| 61 |
|
| 62 |
</para></listitem>
|
| 63 |
<listitem><para>
|
| 64 |
|
| 65 |
The right margin will not be even, it doesn't matter
|
| 66 |
|
| 67 |
</para></listitem>
|
| 68 |
<listitem><para>
|
| 69 |
|
| 70 |
Use 1-space indentation, but don't sweat it
|
| 71 |
|
| 72 |
</para></listitem>
|
| 73 |
<listitem><para>
|
| 74 |
|
| 75 |
Try to leave a blank line between paragraph tags and the
|
| 76 |
words in the paragraph (this makes word wrapping much easier)
|
| 77 |
|
| 78 |
</para></listitem>
|
| 79 |
</orderedlist>
|
| 80 |
</para>
|
| 81 |
|
| 82 |
<sect2 id="cross-referencable-id">
|
| 83 |
<title>Second Level Section</title>
|
| 84 |
<para>
|
| 85 |
|
| 86 |
I use the docbookide xemacs mode to edit:
|
| 87 |
|
| 88 |
<informalexample>
|
| 89 |
<screen>
|
| 90 |
|
| 91 |
<userinput>apt-get install docbookide</userinput>
|
| 92 |
or <command>apt-get install docbookide</command>
|
| 93 |
|
| 94 |
</screen>
|
| 95 |
</informalexample>
|
| 96 |
|
| 97 |
It displays syntax coloring and closes your tags if you
|
| 98 |
are at the end of a line. Here is an internal cross reference:
|
| 99 |
<xref linkend="cross-referencable-id"></xref>
|
| 100 |
and here is an external link to
|
| 101 |
<ulink url="http://www.debian.org">the main Debian website</ulink>.
|
| 102 |
Many times we will put common urls in an entity document and use
|
| 103 |
something like a link to
|
| 104 |
<ulink url="&debianwebsite;">Debian Website</ulink>
|
| 105 |
instead of using url directly.
|
| 106 |
|
| 107 |
</para><para>
|
| 108 |
|
| 109 |
If you need to specify text that is only present for a certain
|
| 110 |
condition or a given architecture, use attributes arch and
|
| 111 |
condition. For example,
|
| 112 |
|
| 113 |
<code>
|
| 114 |
|
| 115 |
<para arch="i386">
|
| 116 |
A paragraph only interesting for i386 users
|
| 117 |
</para>
|
| 118 |
|
| 119 |
<sect3 condition="bootable-from-hard-disk">
|
| 120 |
A section pertaining only to computers which
|
| 121 |
can boot from their hard disk
|
| 122 |
</sect3>
|
| 123 |
|
| 124 |
<phrase arch="powerpc">PowerPC-only text within a para</phrase>
|
| 125 |
|
| 126 |
</code>
|
| 127 |
|
| 128 |
</para>
|
| 129 |
<!-- More example tags, all these must occur within a block: -->
|
| 130 |
<para>
|
| 131 |
|
| 132 |
<prompt>the command prompt text</prompt>
|
| 133 |
<replaceable>text to be replaced by user, debiandoc var</replaceable>
|
| 134 |
<computeroutput>that's self explanatory!</computeroutput>
|
| 135 |
<application>abiword</application>
|
| 136 |
<filename>/install/basedebs.tar</filename>
|
| 137 |
<medialabel>/dev/hda1</medialabel>
|
| 138 |
|
| 139 |
You can exit from GNU Emacs with
|
| 140 |
|
| 141 |
<menuchoice>
|
| 142 |
<shortcut>
|
| 143 |
|
| 144 |
<keycombo><keysym>C-x</keysym><keysym>C-c</keysym></keycombo>
|
| 145 |
|
| 146 |
</shortcut>
|
| 147 |
|
| 148 |
<guimenu>Files</guimenu>
|
| 149 |
<guimenuitem>Exit Emacs</guimenuitem>
|
| 150 |
|
| 151 |
</menuchoice>.
|
| 152 |
|
| 153 |
<keycombo>
|
| 154 |
<keycap>Ctrl</keycap>
|
| 155 |
<keycap>Alt</keycap>
|
| 156 |
<keycap>F1</keycap>
|
| 157 |
</keycombo> selects console 1.
|
| 158 |
|
| 159 |
</para>
|
| 160 |
|
| 161 |
<!-- This is what used to be a taglist in debiandoc -->
|
| 162 |
<variablelist>
|
| 163 |
<varlistentry>
|
| 164 |
|
| 165 |
<term>1st term to be defined</term>
|
| 166 |
<listitem><para>
|
| 167 |
|
| 168 |
A paragraph definition of the term.
|
| 169 |
|
| 170 |
</para></listitem>
|
| 171 |
|
| 172 |
</varlistentry>
|
| 173 |
<varlistentry>
|
| 174 |
|
| 175 |
<term>2nd term to be defined</term>
|
| 176 |
|
| 177 |
<listitem><para>
|
| 178 |
|
| 179 |
A paragraph definition of the 2nd term.
|
| 180 |
|
| 181 |
</para></listitem>
|
| 182 |
</varlistentry>
|
| 183 |
</variablelist>
|
| 184 |
|
| 185 |
<!-- Admonitions must have paragraph level tags within them -->
|
| 186 |
|
| 187 |
<tip><para>making things easier on yourself</para></tip>
|
| 188 |
<note><para>something of interest</para></note>
|
| 189 |
<important><para>pay attention now</para></important>
|
| 190 |
<caution><para>watch out here</para></caution>
|
| 191 |
<warning><para>this is really critical to success</para></warning>
|
| 192 |
|
| 193 |
<informaltable>
|
| 194 |
<tgroup cols="2"><tbody><row>
|
| 195 |
|
| 196 |
<entry>1st row, 1st column</entry>
|
| 197 |
<entry>1st row, 2nd column</entry>
|
| 198 |
|
| 199 |
</row><row>
|
| 200 |
|
| 201 |
<entry>2nd row, 1st column</entry>
|
| 202 |
<entry>2nd row, 2nd column</entry>
|
| 203 |
|
| 204 |
</row></tbody></tgroup>
|
| 205 |
</informaltable>
|
| 206 |
|
| 207 |
<table><title>A Formal Table has a Title</title>
|
| 208 |
<tgroup cols="2"><tbody><row>
|
| 209 |
|
| 210 |
<entry>1st row, 1st column</entry>
|
| 211 |
<entry>1st row, 2nd column</entry>
|
| 212 |
|
| 213 |
</row><row>
|
| 214 |
|
| 215 |
<entry>2nd row, 1st column</entry>
|
| 216 |
<entry>2nd row, 2nd column</entry>
|
| 217 |
|
| 218 |
</row></tbody></tgroup>
|
| 219 |
</table>
|
| 220 |
|
| 221 |
<screenshot>
|
| 222 |
<graphic fileref="some-graphic-reference.jpg"></graphic>
|
| 223 |
</screenshot>
|
| 224 |
|
| 225 |
<informalfigure>
|
| 226 |
<graphic fileref="some-figure-reference.png"></graphic>
|
| 227 |
</informalfigure>
|
| 228 |
|
| 229 |
<figure>
|
| 230 |
<title>A Formal Figure has a Title (Caption)</title>
|
| 231 |
<graphic fileref="some-figure-reference.jpg"></graphic>
|
| 232 |
</figure>
|
| 233 |
|
| 234 |
</sect2>
|
| 235 |
</sect1>
|
| 236 |
</chapter>
|
| 237 |
|
| 238 |
<glossary>
|
| 239 |
<glossentry>
|
| 240 |
|
| 241 |
<glossterm>some glossary entry</glossterm>
|
| 242 |
<glossdef><para>
|
| 243 |
|
| 244 |
Some appropriate glossary definition goes here.
|
| 245 |
|
| 246 |
</para> </glossdef>
|
| 247 |
</glossentry>
|
| 248 |
</glossary>
|
| 249 |
|
| 250 |
</book>
|
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|