<?xml version="1.0"?>
<!DOCTYPE article [
<!ENTITY version "1.0.53">
<!ENTITY mdash "--">
<!ENTITY hellip "...">
<!ENTITY copy "©"> <!-- COPYRIGHT SIGN -->
<!-- replace version above with actual application version number-->
<!-- Template Version: 1.0.1 (do not remove this line) -->
<!ENTITY APPLET-TEMPLATE-1x-SHELL SYSTEM
"templates/applet_template_1-applet.sgml.cdata">
<!ENTITY APPLET-TEMPLATE-1x SYSTEM
"templates/applet_template_1.sgml.cdata">
]>
<!-- Version: 1.0.1 -->
<article id="index">
<articleinfo>
<authorgroup>
<author>
<firstname>David</firstname>
<surname>Mason</surname>
<affiliation>
<orgname>Red Hat, Inc.</orgname>
<address>
<email>[email protected]</email>
</address>
</affiliation>
</author>
<author>
<firstname>Daniel</firstname>
<surname>Mueth</surname>
<affiliation>
<address>
<email>[email protected]</email>
</address>
</affiliation>
</author>
<author>
<firstname>Alexander</firstname>
<surname>Kirillov</surname>
<affiliation>
<address>
<email>[email protected]</email>
</address>
</affiliation>
</author>
</authorgroup>
<releaseinfo>
This is a pre-release!
</releaseinfo>
<revhistory>
<revision>
<revnumber>
0.99
</revnumber>
<date>
04.10.2000
</date>
</revision>
</revhistory>
<copyright>
<year>2000</year>
<holder>Red Hat, Inc., Daniel Mueth, and Alexander Kirillov</holder>
</copyright>
<legalnotice>
<para>
Permission is granted to copy, distribute and/or modify this
document under the terms of the <citetitle>GNU Free Documentation
License</citetitle>, Version 1.1 or any later version published
by the Free Software Foundation with no Invariant Sections, no
Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy
of the <citetitle>GNU Free Documentation License</citetitle> from
the Free Software Foundation by visiting <ulink type="http"
url="http://www.fsf.org">their Web site</ulink> or by writing to:
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
</para>
<para>
Many of the names used by companies to distinguish their products and
services are claimed as trademarks. Where those names appear in any
GNOME documentation, and those trademarks are made aware to the members
of the GNOME Documentation Project, the names have been printed in caps
or initial caps.
</para>
</legalnotice>
<title>The GNOME Handbook of Writing Software Documentation</title>
</articleinfo>
<!-- ################# Introduction ############### -->
<sect1 id="intro">
<title>Introduction</title>
<!-- ####### Introduction | The GNOME Documentation Project ####### -->
<sect2 id="gdp">
<title>The GNOME Documentation Project</title>
<sect3 id="goals">
<title>Goals</title>
<para>
The GNOME Documentation Project (GDP) aims to provide GNOME
and GNOME applications with a complete, intuitive, and clear
documentation system. At the center of the GDP is the
<application>GNOME Help Browser</application>, which
presents a unified interface to GNOME-specific documentation
as well as other Linux documentation such as man pages and
texinfo documents. The GNOME Help System provides a
comprehensive view of documentation on a machine by
dynamically assembling the documentation of GNOME
applications and components which are installed. The GDP is
responsible for writing numerous GNOME-related documents,
both for developers and for users. Developer documentation
includes <ulink url="http://developer.gnome.org/doc/API/"
type="http">APIs for the GNOME libraries</ulink>, <ulink
url="http://developer.gnome.org/doc/whitepapers/"
type="http"><citetitle>GNOME White
Papers</citetitle></ulink>, GNOME developer <ulink
url="http://developer.gnome.org/doc/tutorials/"
type="http">tutorials</ulink>, the <ulink
url="http://developer.gnome.org/doc/FAQ/"
type="http"><citetitle>GNOME Developer
FAQ</citetitle></ulink>, the <ulink
url="http://developer.gnome.org" type="http">GNOME
Developer's Website</ulink>, and <citetitle>GNOME
Handbook</citetitle>'s, such as the one you are reading.
User documentation include the <ulink
url="http://www.gnome.org/learn/"
type="http"><citetitle>GNOME User's
Guide</citetitle></ulink>, the <ulink
url="http://www.gnome.org/learn/"
type="http"><citetitle>GNOME FAQ</citetitle></ulink>, and
GNOME application documentation. Most GNOME applications
have their own manual in addition to context sensitive help.
</para>
</sect3>
<sect3 id="joining">
<title>Joining the GDP</title>
<para>
Documenting GNOME and all the numerous GNOME applications is
a very large project. The GDP is always looking for people
to help write, update, and edit documentation. If you are
interested in joining the GDP team, you should join the
<ulink url="http://mail.gnome.org/mailman/listinfo/gnome-doc-list/">
<citetitle>gnome-doc-list mailing list</citetitle> </ulink>.
Read <xref linkend="gettingstarted" />, for help selecting a
project to work on. Feel free to introduce yourself on the
gnome-doc-list mailing list and indicate which project you
intend to work on, or else ask for suggestions of important
documents which need work done. You may also want to join the
#docs IRC channel on irc.gnome.org to meet other GDP members
and discuss any questions you may have. For a list of GDP
projects and members, see the
<ulink url="http://developer.gnome.org/projects/gdp">
<citetitle>GDP Website</citetitle></ulink>.
</para>
</sect3>
<sect3 id="collaborating">
<title>Collaborating with the GDP</title>
<para>
GNOME developers, packagers, and translators may not be
writing GNOME documentation but will want to understand how
the GNOME documentation system works and will need to
collaborate with GDP members. This document should help to
outline the structure of how the GNOME documentation system
works. Developers who do not write the documentation for
their applications are encouraged to find a GDP member to
write the documentation. This is best done by sending an
email to the <ulink
url="http://mail.gnome.org/mailman/listinfo/gnome-doc-list/">
<citetitle>gnome-doc-list mailing list</citetitle> </ulink>
describing the application, where it can be downloaded from,
and that the developer(s) would like a GDP member to write
documentation for the application. The #docs IRC channel on
irc.gnome.org is another option for contacting GDP members.
</para>
</sect3>
</sect2>
<!-- ####### Introduction | Notation and Conventions ####### -->
<sect2 id="notation">
<title>Notation and Conventions</title>
<para>
This Handbook uses the following notation:
<informaltable frame="none">
<tgroup cols="2">
<tbody>
<row>
<entry>
<filename class="directory">/usr/bin</filename>
</entry>
<entry>
Directory
</entry>
</row>
<row>
<entry>
<filename>foo.sgml</filename>
</entry>
<entry>
Filename
</entry>
</row>
<row>
<entry>
<command>command</command>
</entry>
<entry>
Command or text that would be typed.
</entry>
</row>
<row>
<entry>
<command><replaceable>replaceable</replaceable></command>
</entry>
<entry>
"Variable" text that can be replaced.
</entry>
</row>
<row>
<entry>
<literal>Program or Doc Code</literal>
</entry>
<entry>Program or document code</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</sect2>
<!-- ####### Introduction | About This Handbook ####### -->
<sect2 id="about">
<title>About This Handbook</title>
<para>
This Handbook is a guide for both writing documentation for
GNOME components and applications and for properly binding and
packaging documentation into GNOME applications.
</para>
<para>
This Handbook, like all GNOME documentation, was written in
DocBook(SGML) and is available in several formats including
SGML, HTML, PostScript, and PDF. For the latest version, see
<ulink
url="http://developer.gnome.org/projects/gdp/handbook.html">
<citetitle>Getting The GNOME Handbook of Writing Software
Documentation</citetitle> </ulink>. Alternately, one may
download it anonymously from GNOME CVS under <filename
class="directory">gnome-docu/gdp</filename>.
</para>
</sect2>
</sect1>
<!-- ################# Getting Started ############### -->
<sect1 id="gettingstarted">
<title>Getting Started Writing GNOME Documentation</title>
<!--####### Getting Started | Selecting A Document ####### -->
<sect2 id="selecting">
<title>Selecting A Document</title>
<sect3 id="know">
<title>Document Something You Know</title>
<para>
The most frequently asked question of new contributors who
join the GDP is "which document should I start
with?". Because most people involved are volunteers, we do
not <emphasis>assign</emphasis> projects and applications to
write documents for. The first step is all yours - you must
decide what about GNOME interests you most and find out if
it has complete documents or not.
</para>
<para>
It is also important to spend some time with GNOME to make
sure you are familiar enough with it to be
<emphasis>authoritative</emphasis> in your writing. The
best way to do this is to just sit down and play with GNOME
as much as possible before starting to write.
</para>
<para>
The easiest way to get started is to improve existing
documentation. If you notice some inaccuracies or omissions
in the documentation, or you think that you can explain the
material more clearly, just send your suggestions to the
author of the original documentation or to the GNOME
documentation project at <email>[email protected]</email>.
</para>
</sect3>
<sect3 id="doctable">
<title>The GNOME Documentation Status Table</title>
<para>
The <citetitle>GDP Documentation Status Table</citetitle>
(<citetitle>DocTable</citetitle>) (<ulink
url="http://www.gnome.org/gdp/doctable/"
type="http">http://www.gnome.org/gdp/doctable/</ulink>) is a
web page which tracks the status of all the various
documentation components of GNOME. These components include
application documentation, internal GNOME component
documentation, user documentation, and developer
documentation. For each documentation item, it tracks the
current status of the documentation, who is working on the
particular document, where the documentation can be found,
and provides a forum for the discussion of each item.
</para>
<para>
You should use the <citetitle>DocTable</citetitle> to help
you select a documentation item which needs work done. Once
you have selected an item to work on, please register
yourself as an author so that other authors do not duplicate
your work and may contact you to help or offer suggestions.
Also be sure to keep the status icons up-to-date so that
the GDP team can easily identify which items need additional
help. The <citetitle>DocTable</citetitle> also allows
people to make announcements and suggestions and to discuss
issues in the comments section.
</para>
<note>
<title>Note</title>
<para>
Note that the information in the
<citetitle>DocTable</citetitle> may not always be up-to-date
or accurate. When you assign yourself to documenting an
application, make sure you find out the latest status of
documentation by contacting the application author.
</para>
</note>
</sect3>
</sect2>
<!-- ####### Getting Started | Installing And Using DocBook ####### -->
<sect2 id="docbook">
<title>Installing and Using DocBook</title>
<para>
All documentation for the GNOME project is written in SGML
using the DocBook DTD. There are many advantages to using
this for documentation, not least of which is the single
source nature of SGML. To contribute to the GDP you should
learn to use DocBook.
</para>
<note>
<title>NOTE</title>
<para>
To get started writing for the GDP you do not need to rush
out and learn DocBook - if you feel it is too much to handle
for now, you can submit plain ASCII text to the <ulink
url="http://mail.gnome.org/mailman/listinfo/gnome-doc-list/">
<citetitle>gnome-doc-list mailing list</citetitle>
</ulink>and a volunteer will mark it up for you. Seeing your
document marked up will also be a great way for you to start
learning DocBook.
</para>
</note>
<sect3 id="installingdocbook">
<title>Installing DocBook</title>
<para>
Download and install the following <ulink
url="ftp://sourceware.cygnus.com:/pub/docbook-tools/"
type="ftp">DocBook Tools packages</ulink>: jade, docbook,
jadetex, sgml-common, and stylesheets. (RPM users should note
that jade is platform dependent (eg. i386), while the other packages
are in the <filename class="directory">noarch</filename>
directory.) You can find more
information on DocBook Tools <ulink url="
http://sourceware.cygnus.com/docbook-tools/"
type="http">here</ulink>.
</para>
<para>
If you are an <application>Emacs</application> user you may
want to grab the psgml package as well. This is a major mode
for editing sgml files in <application>Emacs</application>.
</para>
</sect3>
<sect3 id="gdpstylesheets">
<title>GDP Stylesheets</title>
<para>
The GDP uses its own DocBook stylesheets. To use the GDP
stylesheets, you should download the file
<filename>gdp-both.dsl</filename> from the <filename
class="directory">gnome-docu/gdp/dsssl</filename> module in
CVS (or from <ulink
url="http://developer.gnome.org/projects/gdp/stylesheets.html">
GDP Custom DSSSL Stylesheet</ulink>)and copy it
<!-- into <filename
class="directory">/usr/lib/sgml/stylesheets</filename>. You
will need to point DocBook Tools to this stylesheet with the
<command><option>-d</option></command> option:
<command>db2html -d /usr/lib/sgml/stylesheets/gdp-both.dsl
<replaceable>foo.sgml</replaceable></command>. (Creating an
alias to include this option and path is convenient.)
Alternately, you could overwrite
<filename>/usr/lib/sgml/stylesheets/cygnus-both.dsl</filename>
with <filename>gdp-both.dsl</filename>.
-->
over the file
<filename>/usr/lib/sgml/stylesheets/cygnus-both.dsl</filename>.
Alternately, you can download and install the
<ulink url="http://people.redhat.com/dcm/software.html"
type="http">gnome-doc-tools package</ulink> which will set
up the stylesheets as well as the DTD discussed below.
</para>
<!-- <note>
<para>
The current version of the DocBook Tools command
<command>db2ps</command> does not have a
<command><option>-d</option></command> option. In order to
create PostScript output, you must overwrite
<filename>/usr/lib/sgml/stylesheets/cygnus-both.dsl</filename>
with <filename>gdp-both.dsl</filename>.
</para>
</note>
-->
</sect3>
<sect3 id="gdpdtd">
<title>GDP DTD (PNG Image Support)</title>
<para>
Due to some license issues involved with the creation of
gifs, the GNOME Documentation Project has decided to use the
PNG image format for all images in GNOME documentation. You
can read more about the issues involved with gifs at <ulink
url="http://www.gnu.org/philosophy/gif.html"
type="http">http://www.gnu.org/philosophy/gif.html</ulink>.
</para>
<para>
The current DocBook DTD(3.1) does not include support for
embedding PNG images in your documents. Since the GDP uses
many screenshots in its documentation, we use our own
variation on the DocBook DTD which has PNG image support.
We encourage everybody to use this DTD instead of the
default DocBook DTD since your source document header and
your output document appearance subtly vary between the two
DTD's. To install the GDP custom DTD with PNG image support
by hand:
</para>
<itemizedlist mark="opencircle">
<listitem>
<para>
Download <ulink
url="http://www.labs.redhat.com/png/png-support.html">the
GDP DocBook DTD for PNG support</ulink> and install it
where you keep your DTD's. (On Red Hat use <filename
class="directory">/usr/lib/sgml/</filename>.) Note that
the 3.0 DTD is missing support for the
<sgmltag><legalnotice></sgmltag> tag, so it is
recommended that you use version 3.1
</para>
</listitem>
<listitem override="bullet">
<para>
Add the new DTD to your SGML CATALOG file. The location
of your SGML CATALOG file may vary depending upon your
distribution. (On Red Hat it is usually in
/usr/lib/sgml/CATALOG.) Add the following line to this
file:
<programlisting>
PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.0//EN" "png-support-3.0.dtd"
</programlisting>
If you are using the 3.1 DTD, use:
<programlisting>
PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN" "png-support-3.1.dtd"
</programlisting>
</para>
</listitem>
</itemizedlist>
<para>
Alternately, you can download and install the
<ulink url="http://people.redhat.com/dcm/software.html"
type="http">gnome-doc-tools package</ulink> which will set
up the custom stylesheets and DTD for you.
</para>
<para>
To include PNG files in your documents, you will need to
indicate that you are using this special DTD. To do
this, use the following headers:
</para>
<para>
Articles:
<programlisting>
<![CDATA[<!DOCTYPE Article PUBLIC "-//GNOME//DTD DocBook PNG Variant
V1.1//EN"[]>]]>
</programlisting>
</para>
<para>
Books:
<programlisting>
<![CDATA[<!DOCTYPE Book PUBLIC "-//GNOME//DTD DocBook PNG Variant
V1.1//EN"[]>]]>
</programlisting>
</para>
</sect3>
<sect3 id="editors">
<title>Editors</title>
<para>
There are many editors on Linux and UNIX systems available
to you. Which editor you use to work on the sgml documents
is completely up to you, as long as the editor is able to
preserve sgml and produce the source in a format that is
readable by everyone.
</para>
<para>
Probably the two most popular editors available are
<application>Emacs</application> and
<application>vi</application>. These and other editors are
used regularly by members of the GDP. Emacs has a major
mode, psgml, for editing sgml files which can save you time
and effort in adding and closing tags. You will find the
psgml package in DocBook Tools, which is the standard set of
tools for the GDP. You may find out more about DocBook Tools
in <xref linkend="installingdocbook" />.
</para>
</sect3>
<sect3 id="make-output">
<title>Creating Something Useful with your Docs</title>
<para>
The tools available in DocBook Tools allow you to convert
your sgml document to many different formats including html
and Postscript. The primary tool used to do the conversion
is an application called <application>Jade</application>. In
most cases you will not have to work directly with
<application>Jade</application>; Instead, you will use the
scripts provided by DocBook Tools.
</para>
<para>
To preview your DocBook document, it is easiest to convert
it to <filename>html</filename>. If you have installed the
DocBook tools described above, all you have to do is to run
the command <prompt>$</prompt><command>db2html
mydocument.sgml</command>. If there are no sgml syntax
errors, this will create a directory <filename
class="directory">mydocument</filename> and place the
resulting html files in it. The title page of the document
will typically be
<filename>mydocument/index.html</filename>. If you have
screenshots in your document, you will have to copy these
files into the <filename
class="directory">mydocument</filename> directory by
hand. You can use any web browser to view your document.
Note that every time you run <command>db2html</command>, it
creates the <filename
class="directory">mydocument</filename> directory over, so
you will have to copy the screenshots over each time.
</para>
<para>
You can also convert your document to PostScript by running
the command <prompt>$</prompt><command>db2ps
mydocument.sgml</command>, after which you can print out or
view the resulting .ps file.
</para>
<note>
<title>NOTE</title>
<para>
The html files you get will not look quite the same as the
documentation distributed with GNOME unless you have the
custom stylesheets installed on your machine. DocBook
Tools' default stylesheets will produce a different look
to your docs. You can read more about the GDP stylesheets
in <xref linkend="gdpstylesheets" />.
</para>
</note>
</sect3>
<sect3 id="jadeimages">
<title>Images in DocBook Tools</title>
<para>
If your document uses images you will need to take note of a
few things that should take place in order for you to make
use of those images in your output.
</para>
<para>
The DocBook Tools scripts and applications are smart enough
to know that when you are creating html you will be using
PNG files and when you are creating Postscript you will be
using EPS files (you must use EPS with Postscript).
</para>
<para>
Thus, you should never explicitly
include the extension of the image file, since DocBook
Tools will automatically insert it for you. For example:
</para>
<programlisting>
<![CDATA[
<figure>
<title>My Image</title>
<screenshot>
<screeninfo>Sample GNOME Display</screeninfo>
<graphic format="png" fileref="myfile" srccredit="me">
</graphic>
</screenshot>
</figure>
]]> </programlisting>
<para>
You will notice in this example that the file
<filename>myfile.png</filename> was referred to as simply
<filename>myfile</filename>. Now when you run
<command>db2html</command> to create an html file, it will
automatically look for <filename>myfile.png</filename> in
the directory.
</para>
<para>
If you want to create PostScript ouput, you will need to create an
EPS version of your image file to be displayed in the
PostScript file. There is a simple script available which
allows you to change a PNG image into an EPS file
easily. You can download this file - img2eps - from <ulink
url="http://people.redhat.com/dcm/sgml.html"
type="html">http://people.redhat.com/dcm/sgml.html</ulink>
(look for the img2eps section). Note that this script is
included in the gnome-doc-tools package, so if you are using
this package, you should already have
<command>img2eps</command> on you system.
</para>
</sect3>
<sect3 id="moredocbookinfo">
<title>Learning DocBook</title>
<para>
There are many resources available to help you learn DocBook.
The following resources on the web are useful for learning
DocBook:
</para>
<itemizedlist mark="bullet">
<listitem>
<para>
<ulink url="http://www.docbook.org"
type="http">http://www.docbook.org</ulink> - Norman
Walsh's <citetitle>DocBook: The Definitive
Guide</citetitle>. Online O'Reilly book on using
DocBook. Contains an excellent element reference. May be
too formal for a beginner.
</para>
</listitem>
<listitem>
<para>
<ulink
url="http://www.oswg.org/oswg-nightly/oswg/en_US.ISO_8859-1/articles/DocBook-Intro/docbook-intro/index.html"
type="http">A Practical Introduction to DocBook</ulink>
- The Open Source Writers Group's introduction to using
DocBook. This is an excellent HOW-TO type article on
getting started.
</para>
</listitem>
<listitem>
<para>
<ulink
url="http://nis-www.lanl.gov/~rosalia/mydocs/docbook-intro/docbook-intro.html"
type="http">Getting Going with DocBook: Notes for
Hackers</ulink> - Mark Galassi's introduction to DocBook
for hackers. This has to be one of the first
introductions to DocBook ever - still as good as it ever
was.
</para>
</listitem>
<listitem>
<para>
<ulink type="http" url="http://www.freebsd.org/tutorials/docproj-primer/">
FreeBSD Documentation Project Primer for New
Contributors</ulink> - FreeBSD documentation project
primer. Chapter 4.2 provides a very good introduction to
writing documentation using DocBook. Note that it also
describes some custom extensions of DocBook;
fortunately, they are clearly marked as such.
</para>
</listitem>
</itemizedlist>
<para>
Norman Walsh's book is also available in print.
</para>
<para>
The following sections of this document are designed to help
documentation authors write correct and consistent DocBook:
</para>
<itemizedlist mark="bullet">
<listitem>
<para>
<xref linkend="docbookbasics" /> - Descriptions of
commonly used DocBook tags.
</para>
</listitem>
</itemizedlist>
<para>
You may also discuss specific DocBook questions with GDP
members on the #docs IRC channel at irc.gnome.org and on the
gnome-doc-list mailing list.
</para>
</sect3>
</sect2>
<!-- ####### Getting Started | GDP Document Examples ####### -->
<!--
<sect2 id="examples">
<title>GDP Document Examples</title>
<para>
Examples of various types of GNOME documents are found in
<xref linkend="examples" />. There is also an example GNOME
application with documentation called
<application>gnome-hello</application> in GNOME cvs.
</para>
</sect2>
-->
<!-- ####### Getting Started | GDP Document Templates ####### -->
<sect2 id="gdptemplates">
<title>GDP Document Templates</title>
<para>
Templates for various types of GNOME documents are found in
<xref linkend="templates" />. They are kept in CVS in
gnome-docu/gdp/templates. The easiest source to get them from
is probably the <ulink
url="http://developer.gnome.org/projects/gdp/templates.html"
type="http">GDP
Document Templates</ulink> web page, which is typically kept
completely up-to-date with CVS and has a basic description of
each file from CVS.
</para>
</sect2>
<!-- ####### Getting Started | Screenshots ####### -->
<sect2 id="screenshots">
<title>Screenshots</title>
<para>
Most GNOME documents will have screenshots of the particular
applet, application, GNOME component, or widget being
discussed. As discussed above in <xref linkend="gdpdtd"/> you
will need to install the special GDP DocBook DTD which
supports PNG images, the format used for all images in GNOME
documentation. For the basic DocBook structure used to insert
images in a document, see <xref linkend="jadeimages"/> above.
</para>
<sect3 id="screenshotappearance">
<title>Screenshot Appearance</title>
<para>
For all screenshots of windows that typically have border
decorations (e.g. applications and dialogs, but not applets
in a <interface>panel</interface>), GDP standards dictate
the appearance of the window. (This is to minimize possible
confusion to the reader, improve the appearance of GNOME
documents, and guarantee the screenshot is readable when
printed.) All screenshots should be taken with the SawFish
(formerly known as Sawmill) window manager using the
MicroGui theme and Helvetica 12pt font. (A different window
manager can be used provided the MicroGui theme is available
for this window manager and the appearance is identical to
that when using the SawFish window manager.) The default
GTK+ theme(gtk) and font (Helvetica 12 pt) should be used
for all screenshots. If you are unable to provide
screenshots in this form, you should create screenshots as
you wish them to appear and send them to the
<ulink url="http://mail.gnome.org/mailman/listinfo/gnome-doc-list/">
<citetitle>gnome-doc-list mailing list</citetitle> </ulink>
requesting a GDP member reproduce these screenshots in the
correct format and email them to you.
</para>
</sect3>
<sect3 id="screenshottools">
<title>Screenshot Tools</title>
<para>
There are many tools for taking screenshots in
GNOME/Linux. Perhaps the most convenient is the
<application>Screen-Shooter Applet</application>. Just click
on the window icon in the applet and then on the window you
would like to take a screenshot of. (Note that
at the time of this writing, PNG images taken by
screenshooter do not appear properly in
<application>Netscape</application> or the
<application>GNOME Help Browser</application>. You
should save your screenshot as a GIF and
then use <command>convert filename.gif
filename.png</command>.) For applets
in a <interface>Panel</interface>,
<application>xv</application> can be used to crop the
screenshot to only include the relevant portion of the
<interface>Panel</interface>. Note that
<application>xv</application> and
<application>gimp</application> can both be used for taking
screenshots, cropping screenshots, and converting image
formats.
</para>
</sect3>
<sect3 id="screenshotfiles">
<title>Screenshot Files</title>
<para>
Screenshots should be kept in the main documentation
directory with your SGML file for applets, or should be
kept in a directory called "figs" for application and other
documentation. After you use <command>db2html</command> to
convert your SGML file to HTML (see <xref
linkend="make-output"/>), you will need to copy your
screenshots (either the individual PNG files for applet
documentation, or the whole "figs" directory for other
documentation) into the newly created HTML directory. Note
that every time you use <command>db2html</command> the HTML
directory is erased and rewritten, so do not store your only
copy of the screenshots in that directory. If you wish to
create PostScript or PDF output, you will need to manually
convert the PNG images to EPS as described in <xref
linkend="jadeimages"/>, but will not need to copy these
images from their default location, as they are included
directly into the output(PostScript of PDF) file.
</para>
</sect3>
</sect2>
<!-- ####### Getting Started | Application Bugs ####### -->
<sect2 id="applicationbugs">
<title>Application Bugs</title>
<para>
Documentation authors tend to investigate and test applets and
applications more thoroughly than most
users. Often documentation authors will discover one or
more bugs in the software. These bugs vary from small ones,
such as mis-spelled words or missing
<interface>About</interface> dialogs in the menu, to large
ones which cause the applet to crash. As all users, you
should be sure to report these bugs so that application
developers know of them and can fix them. The easiest way to
submit a bug report is by using the <application>Bug
Buddy</application> applet which is part of the gnome-applets
package.
</para>
</sect2>
<!-- ####### Getting Started | Using CVS ####### -->
<sect2 id="cvs">
<title>Using CVS</title>
<para>
CVS (Concurrent Versions System) is a tool that allows
multiple developers to concurrently work on a set of
documents, keeping track of the modifications made by each
person. The files are stored on a server and each developer
checks files out, modifies them, and then checks in their
modified version of the files. Many GNOME programs and
documents are stored in CVS. The GNOME CVS server allows
users to anonymously check out CVS files. Most GDP members
will need to use anonymous CVS to download the most up-to-date
version of documentation or programs. Modified documents will
typically be emailed to the the application developer. Core
GDP members may also be granted login CVS privileges so they
may commit modified files directly to CVS.
</para>
<sect3 id="anonymouscvs">
<title>Anonymous CVS</title>
<para>
To anonymously check out documents from CVS, you must first
log in. From the bash shell, you should set your CVSROOT
shell variable with <command> export
CVSROOT=':pserver:[email protected]:/cvs/gnome'</command>
and then login with <command>cvs login</command>(there is no
password, just hit return). As an example, we will use the
"gnome-docu/gdp" module which contains this and several
other documents. To check these documents out for the first
time, type <command>cvs -z3 checkout
gnome-docu/gdp</command>. After you have this document
checked out and you would like to download any updates on
the CVS server, use <command>cvs -z3 update -Pd</command>.
</para>
</sect3>
<sect3 id="logincvs">
<title>Login CVS</title> <para> If you have been given a
login for the GNOME CVS server, you may commit your file
modifications to CVS. Be sure to read the following section
on CVS etiquette before making any commits to CVS. To log in
to the CVS server as user
<command><replaceable>username</replaceable></command> with a
password, you must first set your CVSROOT shell variable with
<command> export
CVSROOT=':pserver:<replaceable>username</replaceable>@cvs.gnome.org:/cvs/gnome'</command>.
Log in with <command>cvs login</command> and enter your
password. You may check out and update modules as described
above for anonymous CVS access. As a login CVS user, you may
also check modified versions of a file into the CVS server.
To check
<command><replaceable>filename</replaceable></command> into
the CVS server, type <command>cvs -z3 commit
<replaceable>filename</replaceable></command>. You will be
given a vi editor window to type in a brief log entry,
summarizing your changes. The default editor can be changed
using the <varname>EDITOR</varname> environment variable or
with the <command><option>-e</option></command> option. You
may also check in any modifications to files in the working
directory and subdirectories using <command>cvs -z3
commit</command>. To
add a new file to the CVS server, use <command>cvs -z3 add
<replaceable>filename</replaceable></command>, followed by the
commit command.
</para>
</sect3>
<sect3 id="cvsetiquette">
<title>CVS Etiquette</title>
<para>
Because files in CVS are typically used and modified by
multiple developers and documentation authors, users should
exercise a few simple practices out of courtesy towards the
other CVS users and the project leader. First, you should
not make CVS commits to a package without first discussing
your plans with the project leader. This way, the project
leader knows who is modifying the files and generally, what
sort of changes/development is being done. Also, whenever a
CVS user commits a file to CVS, they should make an entry in
the CVS log and in the <filename>ChangeLog</filename> so
that other users know who is making modifications and what
is being modified. When modifying files created by others,
you should follow the indentation scheme used by the initial
author.
</para>
</sect3>
</sect2>
</sect1>
<!-- ################# The GNOME Documentation System###############
-->
<sect1 id="gnomedocsystem">
<title>The GNOME Documentation System</title>
<!-- ####### The GNOME Documentation System | The GNOME Help Browser
####### -->
<sect2 id="gnomehelpbrowser">
<title>The GNOME Help Browser</title>
<para>
At the core of the GNOME help system is the <application>GNOME
Help Browser</application>. The <application>Help
Browser</application> provides a unified interface to several
distinct documentation systems on Linux/Unix systems: man
pages, texinfo pages, Linux Documentation Project(LDP)
documents, GNOME application documentation, and other GNOME
documents.
</para>
<para>
The <application>GNOME Help Browser</application> works by
searching standard directories for documents which are to be
presented. Thus, the documentation that appears in the GHB is
specific to each computer and will typically only represent
software that is installed on the computer.
</para>
</sect2>
<!-- ####### The GNOME Documentation System | The GNOME Help Browser
####### -->
<sect2 id="gnomehelpbrowser2">
<title>The GNOME Help Browser (GNOME-2.0)</title> <para> In
GNOME 2.0, the <application>GNOME Help Browser</application>
will be replaced by <application>Nautilus</application>.
Nautilus will be the file manager/graphical shell for GNOME 2.0
and will also implement a more sophisticated help system than
that used by the <application>GNOME Help Browser</application>
used in GNOME 1.0. It will read and display DocBook files
directly, avoiding the need for duplicating documents in both
DocBook and HTML formats. Its display engine for DocBook will
be much faster than running <application>jade</application> to
convert to HTML for rendering. Because it uses the original
DocBook source for documentation, it will be possible to do more
sophisticated searching using the meta information included in
the documents. And since Nautilus is a virtual file system
layer which is Internet-capable, it will be able to find and
display documents which are on the web as well as those on the
local file system. For more information on
<application>Nautilus</application>, visit the #nautilus IRC
channel on irc.gnome.org. </para>
</sect2>
<!-- ####### The GNOME Documentation System | GNOME On-The-Fly
Documentation Generation ####### -->
<sect2 id="gnomehelponthefly">
<title>Dynamic Document Synthesis(GNOME-2.0)</title>
<para>
GNOME uses the documentation presented by all the various
GNOME components and applications installed on the system to
present a complete and customized documentation environment
describing only components which are currently installed on a
users system. Some of this documentation, such as the manuals
for applets, will be combined in such a way that it appears to
be a single document.
</para>
<para>
By using such a system, you can be sure that any GNOME app you
install that has documentation will show up in the index,
table of contents, any search you do in the help browser.
</para>
</sect2>
<!-- ####### The GNOME Documentation System | The GNOME Documentation
Components ####### -->
<sect2 id="gnomehelpcomponents">
<title>The GNOME Documentation Components</title>
<sect3 id="applicationmanualsintro">
<title>Application Manuals</title>
<para>
Every GNOME application should have an application manual.
An application manual is a document specific to the
particular application which explains the various windows
and features of the application. Application Manuals
typically use screenshots (PNG format) for clarity. Writing
application manuals is discussed in more detail in <xref
linkend="writingapplicationmanuals" /> below.
</para>
</sect3>
<sect3 id="applicationhelpintro">
<title>Application Help</title>
<para>
Applications should have a <guibutton>Help</guibutton>
button on screens on which users may need help. These
<guibutton>Help</guibutton> buttons should pull up the
default help browser, determined by the
<varname>ghelp</varname> URL Handler (configured using the
<application>Control Center</application>), typically the
<application>GNOME Help Browser</application>. The help
browser should show either the first page of the application
manual, or else the relevant page thereof. Application help
is described in more detail in <xref
linkend="applicationhelpbuttons" /> below.
</para>
</sect3>
<sect3 id="contextsensitivehelpintro">
<title>Application Context Sensitive Help (coming in
GNOME-2.0)</title>
<para>
Context sensitive help is a system which will allow the user
to query any part (button, widget, etc.) of an application
window. This is done by either entering a CS Help mode by
clicking on an icon or by right clicking on the application
part and selecting "What's This" or whatever is decided on
at the time. Context sensitive help is described in more
detail in <xref linkend="writingcontextsensitivehelp" />
below.
</para>
</sect3>
<sect3 id="userguide">
<title>The GNOME User Guide</title>
<para>
The <citetitle>GNOME User Guide</citetitle> describes the
GNOME desktop environment and core components of GNOME such
as the <application>panel</application> and
<application>control center</application>. In GNOME 1.x this
was the main and only source of documentation. In GNOME 2.0
this will become a document for the web and for printing
that is derived from various parts chosen in the system that
are necessary for the new user to understand.
</para>
</sect3>
<sect3 id="userdocs">
<title>User Documents</title>
<para>
Aside from the <citetitle>GNOME User Guide</citetitle>,
there are several other documents to help GNOME users learn
GNOME, including the <citetitle>GNOME FAQ</citetitle>,
<citetitle>GNOME Installation and Configuration
Guide</citetitle>, and the <citetitle>GNOME Administrators
Guide</citetitle>.
</para>
</sect3>
<sect3 id="developerdocs">
<title>Developer Documents</title>
<para>
There are many White Papers, Tutorials, HOWTO's and FAQ's to
make programming GNOME and GNOME applications as easy as
possible.
</para>
<para>
API documentation is also available for the GNOME libraries. This is
detailed documentation of the code that is used to build GNOME
apps. You can keep up with the GNOME API docs on the <ulink
url="http://developer.gnome.org/doc/API/" type="http">GNOME API
Reference</ulink> page.
</para>
</sect3>
<sect3 id="projectdocs">
<title>Project Documents</title>
<para>
Some GNOME projects have documentation to maintain
consistency in their product and to help new contributors
get up to speed quickly. Among these are the GDP documents,
such as the one you are reading now.
</para>
</sect3>
</sect2>
</sect1>
<!-- ################# DocBook Basics ############### -->
<sect1 id="docbookbasics">
<title>DocBook Basics </title>
<!-- ####### DocBook Basics | Introduction to DocBook ####### -->
<sect2 id="introtodocbook">
<title>Introduction to DocBook</title>
<para>
To understand DocBook, a basic understanding of SGML is
helpful. SGML stands for Standard General Markup Language and
is one of the first markup languages every created. HTML is
actually derived from SGML and XML is a subset of SGML. SGML
uses what is called a Document Type Definition to specify
<emphasis>elements</emphasis> which are contained between
brackets, < and >. Text is marked by both beginning and
ending elements, for example in the DocBook DTD, one denotes a
title with <sgmltag><title></sgmltag>The
Title<sgmltag></title></sgmltag>.
</para>
<para>
The DTD (in the case of the GDP, DocBook) defines rules for how the
elements can be used. For example, if one element can only be used when
embedded within another, this is defined in the DTD.
</para>
<para>
An SGML file is just a plain ASCII file containing the text
with the markup specified above. To convert it to some easily
readable format, you need special tools. The GDP uses <emphasis>DocBook
Tools</emphasis>, a free package of utilities for working with DocBook
which includes <emphasis>Jade</emphasis>, which does the SGML/DSSL
parsing. You can read more about DocBook Tools in <xref
linkend="installingdocbook" />.
</para>
<para>
The final appearance of the output (e.g. PostScript or HTML)
is determined by a
<emphasis>stylesheet</emphasis>. Stylesheets are files,
written in a special language (DSSSL — Document Style
Semantics and Specification Language), which specify the
appearance of various DocBook elements, for example,
what fonts to use for titles and various inline elements, page
numbering style, and much more. DocBook tools come with a
collection of stylesheets (Norman Walsh's modular
stylesheets); GNOME Document Project uses some customized
version of this stylesheets — see <xref
linkend="gdpstylesheets"/>.
</para>
<para>
The advantage of specifying the <emphasis>structure</emphasis>
of a document with SGML instead of specifying the
<emphasis>appearance</emphasis> of the document with a typical
word processor, or with html, is that the resulting document
can be processed in a variety of ways using the structural
information. Whereas formatting a document for appearance
assumes a medium (typically written text on a standard-sized
piece of paper), SGML can be processed to produce output for a
large variety of media such as text, postscript, HTML,
Braille, audio, and potentially many other formats.
</para>
<para>
Using 'content' as the elements to define the text of a document also
allows for search engines to make use of the actual elements to make a
"smarter search". For example, if you are searching for all documents
written by the author "Susie" your search engine could be made smart
enough to only search <author> elements, making for a faster and more
accurate search.
</para>
<para>
Since the overall appearance of the output is determined not by the DTD
or the SGML document, but rather by a stylesheet, the appearance of a
document can be easily changed just by changing the stylesheet. This
allows everyone in the project to create documents that all look the
same.
</para>
<para>
As stated before, the GDP uses the DocBook DTD. For a list of
introductory and reference resources on DocBook, see <xref
linkend="resources" />. The following sections also provide
convenient instructions on which markup tags to use in various
circumstances. Be sure to read <xref linkend="conventions" />
for GDP documentation-specific guidelines.
</para>
</sect2>
<!-- ###### DocBook Basics | XML and SGML ########-->
<sect2 id="xml">
<title>XML and SGML</title>
<para> In not so distant future (probably before GNOME 2.0),
DocBook itself and GNOME Documentation project will migrate from
SGML to XML. This transition should be relatively painless:
(almost) all DocBook tags will remain the same. However, XML has
stricter syntax rules than SGML; thus, some constructions which
are valid in SGML will not be valid in XML. Therefore, to be
ready for this transistion, it is <emphasis>strongly
advised</emphasis> that the documentation writers conform to XML
syntax rules. Here are most important differences:
</para>
<variablelist>
<varlistentry>
<term> <emphasis>Minimization</emphasis></term>
<listitem>
<para>
It is possible with some implementations of SGML to use
minimizations to close elements in a document by using
</>, for example:
<literal><sgmltag><title></sgmltag>The
Title<sgmltag></></sgmltag></literal>. This is not
allowed in XML. You can use <command>sgmlnorm</command> command,
included in DocBook Tools package, to expand minimized tags;
if you are using <application>Emacs</application> with psgml
mode, you can also use menu command
<menuchoice>
<guimenu>Modify</guimenu>
<guimenuitem>Normalize</guimenuitem>
</menuchoice>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term> <emphasis>Self-closing tags</emphasis></term>
<listitem>
<para>
Also, in SGML some tags are allowed not to have closing
tags. For example, it is legal for
<sgmltag><xref></sgmltag> not to have a closing tag:
<literal><sgmltag><xref
linkend="someid"></sgmltag></literal>. In
XML, it is illegal; instead, you should use
<literal><sgmltag><xref
linkend="someid"/></sgmltag></literal> (note the
slash!).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term> <emphasis>Case sensitive tags</emphasis></term>
<listitem>
<para>
In XML, unlike SGML, tags are case-senstive
<sgmltag><title></sgmltag> and
<sgmltag><TITLE></sgmltag> are different tags!
Therefore, please always use lowercase tags (except for
things like <literal>DOCTYPE, CDATA</literal> and
<literal>ENTITY</literal>, which are not DocBook tags).
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<!-- ####### DocBook Basics | Structure Elements ####### -->
<sect2 id="structure"> <title> Structure Elements</title>
<sect3 id="section">
<title>Sections and paragraphs</title>
<para>
Top-level element of a book body must be
<sgmltag><chapter></sgmltag>; it may contain one or more
<sgmltag><sect1></sgmltag>, each of them may contain
<sgmltag><sect2></sgmltag> and so on up to
<sgmltag><sect5></sgmltag>. The top-level element of an
article body is always
<sgmltag><sect1></sgmltag>. Regardless of which elements
you use, give each structural element a unique id, so that
you can link to it. For usage example, see the template.
</para>
<para> Please try to avoid using deeply nested sections; for
most situations, <sgmltag><sect1></sgmltag> and
<sgmltag><sect2></sgmltag> should be sufficient. If not,
you probably should split your <sgmltag><sect1></sgmltag>
into several smaller ones.
</para>
<para> Use the tag <sgmltag><para></sgmltag> for
paragraphs, even if there is only one paragraph in a
section—see template for examples.
</para>
</sect3>
<sect3 id="notes">
<title>Notes, Warnings, And Tips</title>
<para>
For notes, tips, warnings, and important information, which
should be set apart from the main text (usually as a
paragraph with some warning sign on the margin), use tags
<sgmltag><note></sgmltag>, <sgmltag><tip></sgmltag>,
<sgmltag><warning></sgmltag>,
<sgmltag><important></sgmltag> respectively. For example:
<programlisting>
<![CDATA[
<tip>
<title>TIP</title>
<para>
To speed up program compilation, use <application>gcc</application>
compiler with Pentium optimization.
</para>
</tip>]]> </programlisting> produces
</para>
<tip id="extip">
<title>TIP</title>
<para>
To speed up program compilation, use
<application>gcc</application> compiler with Pentium
optimization. </para>
</tip>
<para>
Note that this should not be inside a
<sgmltag><para></sgmltag> but between paragraphs.
</para>
</sect3>
<sect3 id="figures">
<title> Screenshots and other figures</title>
<para>
To include screenshots and other figures, use the following
tags:
<programlisting>
<![CDATA[
<figure id="shot1">
<title>Screenshot</title>
<screenshot>
<screeninfo>Screenshot of a program</screeninfo>
<graphic format="PNG" fileref="figures/example_screenshot" srccredit="ME">
</graphic>
</screenshot>
</figure>]]>
</programlisting>
replacing <filename>example_screenshot</filename> with the
actual file name (without extension). The result will look like this:
<figure id="shot1">
<title>Screenshot</title>
<screenshot>
<screeninfo>Screenshot of a program</screeninfo>
<graphic format="PNG"
fileref="figures/example_screenshot" srccredit="ME"/>
</screenshot>
</figure>
</para>
<note>
<title>NOTE</title>
<para>
Notice in this example that the screenshot file name does
not include the file type extension — to find out
why, please read <xref linkend="jadeimages" />.
</para>
</note>
</sect3>
<sect3 id="listing">
<title>Program listings and terminal session</title> <para>
To show a file fragment—for example, program
listing—use <sgmltag><programlisting></sgmltag> tag:
<programlisting>
<![CDATA[
<programlisting>
[Desktop Entry]
Name=Gnumeric spreadsheet
Exec=gnumeric
Icon=gnome-gnumeric.png
Terminal=0
Type=Application
</programlisting>]]>
</programlisting>
which produces
<programlisting>
[Desktop Entry]
Name=Gnumeric spreadsheet
Exec=gnumeric
Icon=gnome-gnumeric.png
Terminal=0
Type=Application
</programlisting>
As a matter of fact, all examples in this document were
produced using <sgmltag><programlisting></sgmltag>.
</para>
<para>
To show a record of terminal session—i.e., sequence of
commands entered at the command line—use
<sgmltag><screen></sgmltag> tag:
<programlisting>
<![CDATA[
<screen>
<prompt>bash$</prompt><userinput>make love</userinput>
make: *** No rule to make target `love'. Stop.
</screen>]]>
</programlisting>
which produces
<screen>
<prompt>bash$</prompt><userinput>make love</userinput>
make: *** No rule to make target `love'. Stop.
</screen>
Note the use of tags <sgmltag><prompt></sgmltag> and
<sgmltag><userinput></sgmltag> for marking system prompt
and commands entered by user.
<note>
<title>NOTE</title>
<para>
Note that both <sgmltag><programlisting></sgmltag>
and <sgmltag><screen></sgmltag> preserve linebreaks,
but interpret SGML tags (unlike LaTeX
<markup>verbatim</markup> environment). Take a look at
the source of this document to see how you can have SGML
tags literally shown but not interpreted,
</para>
</note>
</para>
</sect3>
<sect3 id="lists">
<title> Lists</title>
<para>
The most common list types in DocBook are
<sgmltag><itemizedlist></sgmltag>,
<sgmltag><orderedlist></sgmltag>, and
<sgmltag><variablelist></sgmltag>.
</para>
<variablelist>
<varlistentry>
<term> <sgmltag><itemizedlist></sgmltag></term>
<listitem><para>
This is the simplest unnumbered list, parallel to
<sgmltag><ul></sgmltag> in HTML. Here is an example:
<programlisting>
<![CDATA[
<itemizedlist>
<listitem>
<para>
<guilabel>Show backup files</guilabel> — This will
show any backup file that might be on your system.
</para>
</listitem>
<listitem>
<para>
<guilabel>Show hidden files</guilabel> — This will
show all "dot files" or files that begin with a dot. This
files typically include configuration files and directories.
</para>
</listitem>
<listitem>
<para>
<guilabel>Mix files and directories</guilabel> — This
option will display files and directories in the order you
sort them instead of
always having directories shown above files.
</para>
</listitem>
</itemizedlist>
]]>
</programlisting>
and output:
</para>
<itemizedlist>
<listitem>
<para>
<guilabel>Show backup files</guilabel> —
This will show any backup file that might be on
your system.
</para>
</listitem>
<listitem>
<para>
<guilabel>Show hidden files</guilabel> —
This will show all "dot files" or files that
begin with a dot. This files typically include
configuration files and directories.
</para>
</listitem>
<listitem>
<para>
<guilabel>Mix files and directories</guilabel>
— This option will display files and
directories in the order you sort them instead
of always having directories shown above files.
</para>
</listitem>
</itemizedlist>
<para> Note the use of <sgmltag>&mdash;</sgmltag>
for long dash (see <xref linkend="specsymb" />). Also,
please note that the result looks much nicer because the
terms being explained (<guilabel>Show backup
files</guilabel>, etc.) are set in a different font. In
this case, it was achieved by using <link
linkend="gui"><sgmltag><guilabel></sgmltag></link>
tag. In other cases, use appropriate tags such as
<link linkend="gui"><sgmltag><guimenuitem></sgmltag></link>,
<link
linkend="filenames"><sgmltag><command></sgmltag></link>,
or — if none of
this applies — use
<link linkend="gui"><sgmltag><emphasis></sgmltag></link>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term> <sgmltag><orderedlist></sgmltag></term>
<listitem><para>
This list is completely analogous to
<sgmltag><itemizedlist></sgmltag> and has the same
syntax, but it produces numbered list. By default,
this list uses Arabic numerals for numbering entries;
you can override this using <sgmltag>numeration</sgmltag>,
for example <sgmltag><orderedlist
numeration="lowerroman"></sgmltag>. Possible values of
these attribute are <sgmltag>arabic</sgmltag>,
<sgmltag>upperalpha</sgmltag>,
<sgmltag>loweralpha</sgmltag>,
<sgmltag>upperroman</sgmltag>,
<sgmltag>lowerroman</sgmltag>.
</para></listitem>
</varlistentry>
<varlistentry>
<term> <sgmltag><variablelist></sgmltag></term>
<listitem><para> This list is used when each entry is
rather long, so it should be formatted as a block of text
with some subtitle, like a small subsection. The
<sgmltag><variablelist></sgmltag> is more complicated
than itemizedlists, but for larger blocks of text, or when
you're explaining