Editing

Differences between revisions 1 and 9 (spanning 8 versions)
Revision 1 as of 2008-08-31 13:04:29
Size: 5017
Editor: 79-72-87-179
Comment: dumping from DocumentationTeam/Contribute
Revision 9 as of 2014-01-29 23:10:04
Size: 4678
Editor: dsmythies
Comment: Fix packaging guide link
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
<<Include(DocumentationTeam/MenuBar)>> <<Include(DocumentationTeam/SystemDocumentation/MenuBar)>>
Line 5: Line 5:
This page describes the format used by the DocumentationTeam for the system documentation, ''docbook xml''. This page briefly describes how to edit the system documentation. The official Ubuntu documentation uses two formats: Mallard, used by Desktop help; And ''Doc``Book XML'' used by xubuntu and the Serverguide. We assume that you have already downloaded one of the branches which stores the system documentation. If not, visit the [[DocumentationTeam/SystemDocumentation/Repository|Repository]] page.
Line 7: Line 7:
= Introduction = = Structure of the branch =
Line 9: Line 9:
The Official Documentation in Ubuntu is written in Docbook XML. This is a simple language, like html. This page details how to edit files in the Documentation Team repository. Gedit is one of the text editors that you can use to edit these files. The DocBook documents, and using the Serverguide as an example, that can be edited will typically be found in {{{serverguide/C/*.xml}}}.
Line 11: Line 11:
Before you start, you need to get the files, so follow the instructions on [[DocumentationTeam/Repository]]. The Mallard documents, and using Desktop help as an example, that can be edited will typically be found in {{{ubuntu-help/C/*.page}}}.

The {{{C}}} directory represents the default language of the system (in our case, U.S. English). Depending on the project, translations of each document are found in the {{{documentname/language}}} directory or the {{{documentname/po}}} directory.

There are some directories there which do not correspond to documents. Some are briefly explained as follows:
 * ''build/'' - this is where HTML and/or PDF versions of the documents are put when generated as explained on the [[DocumentationTeam/SystemDocumentation/BuildingDocumentation|Building Documentation]] page.
 * ''debian/'' - (for projects that also have package versions) this contains the files used to generate an Ubuntu package from the branch. For more information on packaging, see the [[http://packaging.ubuntu.com/html/|PackagingGuide]] page.
 * ''libs/'' - this contains the files used to generate HTML and/or PDF from the documents.
 * ''scripts/'' - this contains specific scripts which are used by the team for various tasks, especially translation. (Not all projects have this directory.)

= A look at Mallard =

TODO
Line 15: Line 27:
Try editing a file in one of the docteam branches (for example {{{~/ubuntu/about-ubuntu/C/about-ubuntu.xml}}}, which is the DocBook source of the ''About Ubuntu'' document). It starts with something like:{{{ Try editing a file in one of the docteam branches (for example {{{~/your_branch_name/serverguide/C/introduction.xml}}}, which is the DocBook source of the Serverguide ''Introduction'' chapter). It starts with something like:{{{
Line 21: Line 33:
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
Line 25: Line 37:
<!ENTITY % cdo-C SYSTEM "../../../libs/cdo-C.ent">
%cdo-C;
<!ENTITY % gnome-menus-C SYSTEM "../../libs/gnome-menus-C.ent">
%gnome-menus-C;
<!ENTITY % xinclude SYSTEM "../../libs/xinclude.mod">
%xinclude;
Line 30: Line 40:
<!ENTITY language "en">
Line 32: Line 41:
Line 36: Line 46:
In the case of the about-ubuntu document, you can see a {{{<article>}}} which contains many {{{<sect1>}}} which contain many {{{<para>}}}. It makes some sense. Some longer documents use {{{<book>}}} rather than {{{<article>}}}, like the ''Internet'' document. These also have several {{{<chapter>}}} tags.

The top-level element that contains all the rest is called the ''root element'', and in ''About Ubuntu'' it is called {{{<article>}}}.
In the case of the introduction document, you can see a {{{<chapter>}}} which can contain many {{{<sect1>}}} which can contain many {{{<para>}}}. It makes some sense. The overall document, serverguide.xml uses {{{<book>}}} rather than {{{<chapter>}}}, and it includes that various chapters.
Line 55: Line 63:
= Marking Section Status = = Checking your changes =
Line 57: Line 65:
To help keep track of what we are doing in the documents we mark the status of items and leave messages of what we are doing. This information is collected into the 'Project Status Reports' found on the [[DocumentationTeam/Projects]] page. The first thing to know about this is how to mark an item status. To mark item status '''add the 'status' attribute ''' to any of the following elements: {{{<chapter>}}}, {{{<sect1>}}}, {{{<sect2>}}}, {{{<sect3>}}}, {{{<sect4>}}}, {{{<sect5>}}}. The value of the 'status' attribute is, well, its status. Valid state values include:

 * status="'''help'''" = Help Wanted
 * status="'''writing'''" = In Progress
 * status="'''review'''" = Awaiting Review
 * status="'''reviewing'''" = In Review
 * status="'''complete'''" = Finished

To add a message add an {{{<authorblurb>}}} block after the {{{<title>}}} element containing a {{{<para>}}} with your name and a short message.

 Here is an example::
{{{
<chapter id="chp-admin-serv-nntp" status="writing">
  <title>News Servers</title>
  <authorblurb>
     <para>Sean Wheller: adding theoretical introduction</para>
  </authorblurb>
  <para>body of doc content continues here</para>
</chapter>
}}}

To build the status pages, run {{{make status}}}. This will build the status reports in your working copy under {{{build/status}}}. There are two formats: XML and HTML. The reports can therefore be viewed under Yelp or a Web Browser.

= Submitting your changes =

For more information on how to contribute your changes, see the [[DocumentationTeam/Repository]] page.
For more information on how to contribute your changes, see the '''[[DocumentationTeam/SystemDocumentation/Checking|Checking]]''' page.

This page briefly describes how to edit the system documentation. The official Ubuntu documentation uses two formats: Mallard, used by Desktop help; And DocBook XML used by xubuntu and the Serverguide. We assume that you have already downloaded one of the branches which stores the system documentation. If not, visit the Repository page.

Structure of the branch

The DocBook documents, and using the Serverguide as an example, that can be edited will typically be found in serverguide/C/*.xml.

The Mallard documents, and using Desktop help as an example, that can be edited will typically be found in ubuntu-help/C/*.page.

The C directory represents the default language of the system (in our case, U.S. English). Depending on the project, translations of each document are found in the documentname/language directory or the documentname/po directory.

There are some directories there which do not correspond to documents. Some are briefly explained as follows:

  • build/ - this is where HTML and/or PDF versions of the documents are put when generated as explained on the Building Documentation page.

  • debian/ - (for projects that also have package versions) this contains the files used to generate an Ubuntu package from the branch. For more information on packaging, see the PackagingGuide page.

  • libs/ - this contains the files used to generate HTML and/or PDF from the documents.

  • scripts/ - this contains specific scripts which are used by the team for various tasks, especially translation. (Not all projects have this directory.)

A look at Mallard

TODO

A look at DocBook

Try editing a file in one of the docteam branches (for example ~/your_branch_name/serverguide/C/introduction.xml, which is the DocBook source of the Serverguide Introduction chapter). It starts with something like:

<?xml version="1.0." encoding "UTF-8"?>

That's called the xml declaration, and is found at the beginning of any XML file. DocBook is a dialect of XML, so it must have that starting line.

Then there's something like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 
        "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY % globalent SYSTEM "../../../libs/global.ent">
%globalent;
<!ENTITY % xinclude SYSTEM "../../libs/xinclude.mod">
%xinclude;
<!ENTITY language "&EnglishAmerican;">
]>

This is called the Document Type Declaration: basically it says that this xml file must conform to the rules of the Docbook DTD version 4.3.

The rest is the XML tree. XML files are made of elements, which contain elements, which contain sub-elements, and so on. DocBook is just a dialect of XML, so it follows the same structure.

In the case of the introduction document, you can see a <chapter> which can contain many <sect1> which can contain many <para>. It makes some sense. The overall document, serverguide.xml uses <book> rather than <chapter>, and it includes that various chapters.

Scroll down slowly, reading the names of the xml elements: you can see that the elements are a semantic nomenclature that defines the role of the text.

For more details about the tags which are found in docbook xml documents, see the Docbook Tags page.

Some modifications

Now try to add some text: find a <para> element and type something in it, then save. You'll have changed an existing paragraph. You can easily review text and correct typos and spelling this way.

You can add a new paragraph by adding a new <para> element next to some other. For many other similar kinds of editing, you can easily guess how DocBook works just by looking at what has been written already, as you probably noticed even before reading these lines.

For more complicated things, the Docteam Mailing List is there for you.

There is some information on using gEdit for docbook/xml at https://help.ubuntu.com/community/gedit.

Checking your changes

For more information on how to contribute your changes, see the Checking page.

DocumentationTeam/SystemDocumentation/Editing (last edited 2014-07-02 21:59:08 by xdsl-83-150-81-40)