个人工具

UbuntuHelp:DocBookReference

来自Ubuntu中文

Wikibot讨论 | 贡献2007年11月30日 (五) 16:49的版本

跳转至: 导航, 搜索

This reference is incomplete. Just use it to find out how to enter certain contents into your document. See http://www.docbook.org/tdg/en/html/ for the real fun. :) For an introduction on how to write DocBook/XML documents please see the DocBook Wiki entry.

General article layout

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://docbook.org/xml/4.2/docbookx.dtd">
<article>
<title>The Magic of Dragons</title>
<articleinfo>
<author>
<honorific>Dr. H.C</honorific>
<firstname>Joseph</firstname>
<surname>Fischbecker</surname>
</author>
<copyright>
<year>2004</year>
<holder>The Ubuntu Dragons Subproject</holder>
</copyright>
<keywordset>
<keyword>magic</keyword>
<keyword>dragons</keyword>
</keywordset>
<abstract>
<para>
This document deals with the magic of dragons.
</para>
</abstract>
</articleinfo>
<sect1>
<title>History of Magic</title>
<para>
In the middle ages there were two kinds of magic:
</para>
<itemizedlist>
<listitem>
Bad magic: mostly used by evil wizards
</listitem>
<listitem>
Good magic: mostly used by good wizards
</listitem>
</itemizedlist>
<para>
A picture of the flow of mana:
<mediaobject>
<imageobject>
<imagedata fileref="bigpicture.png" format="PNG"/>
</imageobject>
</mediaobject>
</para>
<sect2>
<title>Evil magic</title>
<para>
In this subsection you will learn about evil magic.
</para>
<important>
Be very careful. Evil magic is hard to handle!
</important>
</sect2>
</sect1>
</article>

Sections that can be used in the <articleinfo>

Please see http://www.docbook.org/tdg/en/html/articleinfo.html

Including images

<mediaobject>
<imageobject>
<imagedata fileref="bigpicture.png" format="PNG"/>
</imageobject>
</mediaobject>

Terminal input/output

<screen>
user = service
password = DomAKg07
</screen>

Lists

<itemizedlist>
<listitem>
Bad magic: mostly used by evil wizards
</listitem>
<listitem>
Good magic: mostly used by good wizards
</listitem>
</itemizedlist>

References

If you need to refer to a section in your document place an anchor like this:

<sect1 id="install_packages" xreflabel="installing the needed packages">

Later you can refer to that section using:

See <xref linkend="install_packages"/> for more information.

Which will render to: 'See 'installing the needed packages' for more information.'

Tables

<informaltable frame="none">
<tgroup cols="2">
<thead>
<row>
<entry>Setting</entry>
<entry>Meaning</entry>
</row>
</thead>
<tbody>
<row>
<entry>
$mydomain = 'yourdomain.org';
</entry>
<entry>
Configure this string to your default domain.
</entry>
</row>
<row>
<entry>
@bypass_virus_checks_acl = qw( . );
</entry>
<entry>
If this line is commented out virus checks are enabled.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>

Notes / Warnings

<caution>...</caution>
<note>...</note>
<tip>...</tip>
<warning>...</warning>
<important>...</important>

Use them like:

<warning>
<title>
Careful
</title>
<para>
Dragons may have a bad breath even resulting in bursts of fire.
</para>
</warning>

Hyperlinks

<ulink url="http://workaround.org>workaround.org</ulink>

'Christoph Haas'